(js/css) Update generated files

This commit is contained in:
InverseBot committed 2019-10-03 01:13:07 -04:00
1 parent 4a93ce344f
commit d8b6feafc5
10 files changed
+520 -514

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
@charset "UTF-8";.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.sg-hide{opacity:0}@-moz-document url-prefix(){[layout-fill]{margin:0;width:100%;min-height:100%;height:100%}}[flex-order]{-webkit-box-ordinal-group:1;-webkit-order:0;order:0}[flex-order="-20"]{-webkit-box-ordinal-group:-19;-webkit-order:-20;order:-20}[flex-order="-19"]{-webkit-box-ordinal-group:-18;-webkit-order:-19;order:-19}[flex-order="-18"]{-webkit-box-ordinal-group:-17;-webkit-order:-18;order:-18}[flex-order="-17"]{-webkit-box-ordinal-group:-16;-webkit-order:-17;order:-17}[flex-order="-16"]{-webkit-box-ordinal-group:-15;-webkit-order:-16;order:-16}[flex-order="-15"]{-webkit-box-ordinal-group:-14;-webkit-order:-15;order:-15}[flex-order="-14"]{-webkit-box-ordinal-group:-13;-webkit-order:-14;order:-14}[flex-order="-13"]{-webkit-box-ordinal-group:-12;-webkit-order:-13;order:-13}[flex-order="-12"]{-webkit-box-ordinal-group:-11;-webkit-order:-12;order:-12}[flex-order="-11"]{-webkit-box-ordinal-group:-10;-webkit-order:-11;order:-11}[flex-order="-10"]{-webkit-box-ordinal-group:-9;-webkit-order:-10;order:-10}[flex-order="-9"]{-webkit-box-ordinal-group:-8;-webkit-order:-9;order:-9}[flex-order="-8"]{-webkit-box-ordinal-group:-7;-webkit-order:-8;order:-8}[flex-order="-7"]{-webkit-box-ordinal-group:-6;-webkit-order:-7;order:-7}[flex-order="-6"]{-webkit-box-ordinal-group:-5;-webkit-order:-6;order:-6}[flex-order="-5"]{-webkit-box-ordinal-group:-4;-webkit-order:-5;order:-5}[flex-order="-4"]{-webkit-box-ordinal-group:-3;-webkit-order:-4;order:-4}[flex-order="-3"]{-webkit-box-ordinal-group:-2;-webkit-order:-3;order:-3}[flex-order="-2"]{-webkit-box-ordinal-group:-1;-webkit-order:-2;order:-2}[flex-order="-1"]{-webkit-box-ordinal-group:0;-webkit-order:-1;order:-1}[flex-order="0"]{-webkit-box-ordinal-group:1;-webkit-order:0;order:0}[flex-order="1"]{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}[flex-order="2"]{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}[flex-order="3"]{-webkit-box-ordinal-group:4;-webkit-order:3;order:3}[flex-order="4"]{-webkit-box-ordinal-group:5;-webkit-order:4;order:4}[flex-order="5"]{-webkit-box-ordinal-group:6;-webkit-order:5;order:5}[flex-order="6"]{-webkit-box-ordinal-group:7;-webkit-order:6;order:6}[flex-order="7"]{-webkit-box-ordinal-group:8;-webkit-order:7;order:7}[flex-order="8"]{-webkit-box-ordinal-group:9;-webkit-order:8;order:8}[flex-order="9"]{-webkit-box-ordinal-group:10;-webkit-order:9;order:9}[flex-order="10"]{-webkit-box-ordinal-group:11;-webkit-order:10;order:10}[flex-order="11"]{-webkit-box-ordinal-group:12;-webkit-order:11;order:11}[flex-order="12"]{-webkit-box-ordinal-group:13;-webkit-order:12;order:12}[flex-order="13"]{-webkit-box-ordinal-group:14;-webkit-order:13;order:13}[flex-order="14"]{-webkit-box-ordinal-group:15;-webkit-order:14;order:14}[flex-order="15"]{-webkit-box-ordinal-group:16;-webkit-order:15;order:15}[flex-order="16"]{-webkit-box-ordinal-group:17;-webkit-order:16;order:16}[flex-order="17"]{-webkit-box-ordinal-group:18;-webkit-order:17;order:17}[flex-order="18"]{-webkit-box-ordinal-group:19;-webkit-order:18;order:18}[flex-order="19"]{-webkit-box-ordinal-group:20;-webkit-order:19;order:19}[flex-order="20"]{-webkit-box-ordinal-group:21;-webkit-order:20;order:20}[flex-offset="0"]{margin-left:0}[flex-offset="5"]{margin-left:5%}[flex-offset="10"]{margin-left:10%}[flex-offset="15"]{margin-left:15%}[flex-offset="20"]{margin-left:20%}[flex-offset="25"]{margin-left:25%}[flex-offset="30"]{margin-left:30%}[flex-offset="35"]{margin-left:35%}[flex-offset="40"]{margin-left:40%}[flex-offset="45"]{margin-left:45%}[flex-offset="50"]{margin-left:50%}[flex-offset="55"]{margin-left:55%}[flex-offset="60"]{margin-left:60%}[flex-offset="65"]{margin-left:65%}[flex-offset="70"]{margin-left:70%}[flex-offset="75"]{margin-left:75%}[flex-offset="80"]{margin-left:80%}[flex-offset="85"]{margin-left:85%}[flex-offset="90"]{margin-left:90%}[flex-offset="95"]{margin-left:95%}[flex-offset="33"]{margin-left:calc(100% / 3)}[flex-offset="66"]{margin-left:calc(200% / 3)}[layout-align="start stretch"],[layout-align]{-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-box-align:stretch;-webkit-align-items:stretch;align-items:stretch}[layout-align="start center"],[layout-align="start end"],[layout-align="start start"],[layout-align="start stretch"],[layout-align=start]{-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}[layout-align="center center"],[layout-align="center end"],[layout-align="center start"],[layout-align="center stretch"],[layout-align=center]{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}[layout-align="end center"],[layout-align="end end"],[layout-align="end start"],[layout-align="end stretch"],[layout-align=end]{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}[layout-align="spacLine truncated
@charset "UTF-8";.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.sg-hide{opacity:0}@-moz-document url-prefix(){[layout-fill]{margin:0;width:100%;min-height:100%;height:100%}}[flex-order]{-webkit-box-ordinal-group:1;-webkit-order:0;order:0}[flex-order="-20"]{-webkit-box-ordinal-group:-19;-webkit-order:-20;order:-20}[flex-order="-19"]{-webkit-box-ordinal-group:-18;-webkit-order:-19;order:-19}[flex-order="-18"]{-webkit-box-ordinal-group:-17;-webkit-order:-18;order:-18}[flex-order="-17"]{-webkit-box-ordinal-group:-16;-webkit-order:-17;order:-17}[flex-order="-16"]{-webkit-box-ordinal-group:-15;-webkit-order:-16;order:-16}[flex-order="-15"]{-webkit-box-ordinal-group:-14;-webkit-order:-15;order:-15}[flex-order="-14"]{-webkit-box-ordinal-group:-13;-webkit-order:-14;order:-14}[flex-order="-13"]{-webkit-box-ordinal-group:-12;-webkit-order:-13;order:-13}[flex-order="-12"]{-webkit-box-ordinal-group:-11;-webkit-order:-12;order:-12}[flex-order="-11"]{-webkit-box-ordinal-group:-10;-webkit-order:-11;order:-11}[flex-order="-10"]{-webkit-box-ordinal-group:-9;-webkit-order:-10;order:-10}[flex-order="-9"]{-webkit-box-ordinal-group:-8;-webkit-order:-9;order:-9}[flex-order="-8"]{-webkit-box-ordinal-group:-7;-webkit-order:-8;order:-8}[flex-order="-7"]{-webkit-box-ordinal-group:-6;-webkit-order:-7;order:-7}[flex-order="-6"]{-webkit-box-ordinal-group:-5;-webkit-order:-6;order:-6}[flex-order="-5"]{-webkit-box-ordinal-group:-4;-webkit-order:-5;order:-5}[flex-order="-4"]{-webkit-box-ordinal-group:-3;-webkit-order:-4;order:-4}[flex-order="-3"]{-webkit-box-ordinal-group:-2;-webkit-order:-3;order:-3}[flex-order="-2"]{-webkit-box-ordinal-group:-1;-webkit-order:-2;order:-2}[flex-order="-1"]{-webkit-box-ordinal-group:0;-webkit-order:-1;order:-1}[flex-order="0"]{-webkit-box-ordinal-group:1;-webkit-order:0;order:0}[flex-order="1"]{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}[flex-order="2"]{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}[flex-order="3"]{-webkit-box-ordinal-group:4;-webkit-order:3;order:3}[flex-order="4"]{-webkit-box-ordinal-group:5;-webkit-order:4;order:4}[flex-order="5"]{-webkit-box-ordinal-group:6;-webkit-order:5;order:5}[flex-order="6"]{-webkit-box-ordinal-group:7;-webkit-order:6;order:6}[flex-order="7"]{-webkit-box-ordinal-group:8;-webkit-order:7;order:7}[flex-order="8"]{-webkit-box-ordinal-group:9;-webkit-order:8;order:8}[flex-order="9"]{-webkit-box-ordinal-group:10;-webkit-order:9;order:9}[flex-order="10"]{-webkit-box-ordinal-group:11;-webkit-order:10;order:10}[flex-order="11"]{-webkit-box-ordinal-group:12;-webkit-order:11;order:11}[flex-order="12"]{-webkit-box-ordinal-group:13;-webkit-order:12;order:12}[flex-order="13"]{-webkit-box-ordinal-group:14;-webkit-order:13;order:13}[flex-order="14"]{-webkit-box-ordinal-group:15;-webkit-order:14;order:14}[flex-order="15"]{-webkit-box-ordinal-group:16;-webkit-order:15;order:15}[flex-order="16"]{-webkit-box-ordinal-group:17;-webkit-order:16;order:16}[flex-order="17"]{-webkit-box-ordinal-group:18;-webkit-order:17;order:17}[flex-order="18"]{-webkit-box-ordinal-group:19;-webkit-order:18;order:18}[flex-order="19"]{-webkit-box-ordinal-group:20;-webkit-order:19;order:19}[flex-order="20"]{-webkit-box-ordinal-group:21;-webkit-order:20;order:20}[flex-offset="0"]{margin-left:0}[flex-offset="5"]{margin-left:5%}[flex-offset="10"]{margin-left:10%}[flex-offset="15"]{margin-left:15%}[flex-offset="20"]{margin-left:20%}[flex-offset="25"]{margin-left:25%}[flex-offset="30"]{margin-left:30%}[flex-offset="35"]{margin-left:35%}[flex-offset="40"]{margin-left:40%}[flex-offset="45"]{margin-left:45%}[flex-offset="50"]{margin-left:50%}[flex-offset="55"]{margin-left:55%}[flex-offset="60"]{margin-left:60%}[flex-offset="65"]{margin-left:65%}[flex-offset="70"]{margin-left:70%}[flex-offset="75"]{margin-left:75%}[flex-offset="80"]{margin-left:80%}[flex-offset="85"]{margin-left:85%}[flex-offset="90"]{margin-left:90%}[flex-offset="95"]{margin-left:95%}[flex-offset="33"]{margin-left:calc(100% / 3)}[flex-offset="66"]{margin-left:calc(200% / 3)}[layout-align="start stretch"],[layout-align]{-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-box-align:stretch;-webkit-align-items:stretch;align-items:stretch}[layout-align="start center"],[layout-align="start end"],[layout-align="start start"],[layout-align="start stretch"],[layout-align=start]{-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}[layout-align="center center"],[layout-align="center end"],[layout-align="center start"],[layout-align="center stretch"],[layout-align=center]{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}[layout-align="end center"],[layout-align="end end"],[layout-align="end start"],[layout-align="end stretch"],[layout-align=end]{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}[layout-align="spacLine truncated
/*# sourceMappingURL=styles.css.map */
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["styles.css","../scss/core/angular.scss","../angular-material/src/core/services/layout/layout-attributes.scss","css/styles.css","../angular-material/src/core/style/structure.scss","../angular-material/src/core/style/mixins.scss","../scss/core/structure.scss","../angular-material/src/core/services/layout/layout.scss","../scss/core/layout.scss","../node_modules/breakpoint-sass/stylesheets/_breakpoint.scss","../angular-material/src/core/style/typography.scss","../scss/core/typography.scss","../angular-material/src/components/autocomplete/autocomplete.scss","../scss/components/autocomplete/autocomplete.scss","../scss/components/backdrop/_extends.scss","../angular-material/src/components/backdrop/backdrop.scss","../scss/components/button/_extends.scss","../angular-material/src/components/button/button.scss","../scss/components/button/button.scss","../scss/components/card/_extends.scss","../angular-material/src/components/card/card.scss","../scss/components/card/card.scss","../scss/components/checkbox/_extends.scss","../angular-material/src/components/checkbox/checkbox.scss","../scss/components/checkbox/checkbox.scss","../scss/components/chips/_extends.scss","../angular-material/src/components/chips/chips.scss","../scss/components/chips/chips.scss","../scss/components/content/_extends.scss","../angular-material/src/components/content/content.scss","../scss/components/content/content.scss","../scss/components/datepicker/_extends-calendar.scss","../angular-material/src/components/datepicker/calendar.scss","../scss/components/datepicker/_extends-datePicker.scss","../angular-material/src/components/datepicker/datePicker.scss","../scss/components/datepicker/datePicker.scss","../scss/components/dialog/_extends.scss","../angular-material/src/components/dialog/dialog.scss","../scss/components/dialog/dialog.scss","../scss/components/divider/_extends.scss","../angular-material/src/components/divider/divider.scss","../scss/components/fabSpeedDial/_extends.scss","../angular-material/src/components/fabSpeedDial/fabSpeedDial.scss","../angular-material/src/components/gridList/grid-list.scss","../scss/components/gridList/grid-list.scss","../scss/components/icon/_extends.scss","../angular-material/src/components/icon/icon.scss","../scss/components/icon/icon.scss","../scss/components/input/_extends.scss","../angular-material/src/components/input/input.scss","../scss/components/input/input.scss","../scss/components/list/_extends.scss","../angular-material/src/components/list/list.scss","../scss/components/list/list.scss","../scss/components/menu/_extends.scss","../angular-material/src/components/menu/menu.scss","../scss/components/menu/menu.scss","../scss/components/panel/_extends.scss","../angular-material/src/components/panel/panel.scss","../scss/components/progressCircular/_extends.scss","../angular-material/src/components/progressCircular/progress-circular.scss","../scss/components/progressCircular/progress-circular.scss","../scss/components/progressLinear/_extends.scss","../angular-material/src/components/progressLinear/progress-linear.scss","../scss/components/progressLinear/progress-linear.scss","../scss/components/radioButton/_extends.scss","../angular-material/src/components/radioButton/radio-button.scss","../scss/components/radioButton/radio-button.scss","../scss/components/select/_extends.scss","../angular-material/src/components/select/select.scss","../scss/components/sidenav/_extends.scss","../angular-material/src/components/sidenav/sidenav.scss","../scss/components/sidenav/sidenav.scss","../scss/components/slider/_extends.scss","../angular-material/src/components/slider/slider.scss","../scss/components/sticky/_extends.scss","../angular-material/src/components/sticky/sticky.scss","../scss/components/subheader/_extends.scss","../angular-material/src/components/subheader/subheader.scss","../scss/components/subheader/subheader.scss","../scss/components/switch/_extends.scss","../angular-material/src/components/switch/switch.scss","../scss/components/tabs/_extends.scss","../angular-material/src/components/tabs/tabs.scss","../scss/components/tabs/tabs.scss","../scss/components/toast/_extends.scss","../angular-material/src/components/toast/toast.scss","../scss/components/toast/toast.scss","../scss/components/toolbar/_extends.scss","../angular-material/src/components/toolbar/toolbar.scss","../scss/components/toolbar/toolbar.scss","../scss/components/tooltip/_extends.scss","../angular-material/src/components/tooltip/tooltip.scss","../scss/components/truncate/_extends.scss","../angular-material/src/components/truncate/truncate.scss","../scss/components/virtualRepeat/_extends.scss","../angular-material/src/components/virtualRepeat/virtual-repeater.scss","../scss/components/whiteframe/_extends.scss","../angular-material/src/components/whiteframe/whiteframe.scss","../scss/components/avatarImage/avatarImage.scss","../scss/components/colorpicker/colorpicker.scss","../scss/components/draggable-droppable/draggaLine truncated
{"version":3,"sources":["styles.css","../scss/core/angular.scss","../angular-material/src/core/services/layout/layout-attributes.scss","css/styles.css","../angular-material/src/core/style/structure.scss","../angular-material/src/core/style/mixins.scss","../scss/core/structure.scss","../angular-material/src/core/services/layout/layout.scss","../scss/core/layout.scss","../node_modules/breakpoint-sass/stylesheets/_breakpoint.scss","../angular-material/src/core/style/typography.scss","../scss/core/typography.scss","../angular-material/src/components/autocomplete/autocomplete.scss","../scss/components/autocomplete/autocomplete.scss","../scss/components/backdrop/_extends.scss","../angular-material/src/components/backdrop/backdrop.scss","../scss/components/button/_extends.scss","../angular-material/src/components/button/button.scss","../scss/components/button/button.scss","../scss/components/card/_extends.scss","../angular-material/src/components/card/card.scss","../scss/components/card/card.scss","../scss/components/checkbox/_extends.scss","../angular-material/src/components/checkbox/checkbox.scss","../scss/components/checkbox/checkbox.scss","../scss/components/chips/_extends.scss","../angular-material/src/components/chips/chips.scss","../scss/components/chips/chips.scss","../scss/components/content/_extends.scss","../angular-material/src/components/content/content.scss","../scss/components/content/content.scss","../scss/components/datepicker/_extends-calendar.scss","../angular-material/src/components/datepicker/calendar.scss","../scss/components/datepicker/_extends-datePicker.scss","../angular-material/src/components/datepicker/datePicker.scss","../scss/components/datepicker/datePicker.scss","../scss/components/dialog/_extends.scss","../angular-material/src/components/dialog/dialog.scss","../scss/components/dialog/dialog.scss","../scss/components/divider/_extends.scss","../angular-material/src/components/divider/divider.scss","../scss/components/fabSpeedDial/_extends.scss","../angular-material/src/components/fabSpeedDial/fabSpeedDial.scss","../angular-material/src/components/gridList/grid-list.scss","../scss/components/gridList/grid-list.scss","../scss/components/icon/_extends.scss","../angular-material/src/components/icon/icon.scss","../scss/components/icon/icon.scss","../scss/components/input/_extends.scss","../angular-material/src/components/input/input.scss","../scss/components/input/input.scss","../scss/components/list/_extends.scss","../angular-material/src/components/list/list.scss","../scss/components/list/list.scss","../scss/components/menu/_extends.scss","../angular-material/src/components/menu/menu.scss","../scss/components/menu/menu.scss","../scss/components/panel/_extends.scss","../angular-material/src/components/panel/panel.scss","../scss/components/progressCircular/_extends.scss","../angular-material/src/components/progressCircular/progress-circular.scss","../scss/components/progressCircular/progress-circular.scss","../scss/components/progressLinear/_extends.scss","../angular-material/src/components/progressLinear/progress-linear.scss","../scss/components/progressLinear/progress-linear.scss","../scss/components/radioButton/_extends.scss","../angular-material/src/components/radioButton/radio-button.scss","../scss/components/radioButton/radio-button.scss","../scss/components/select/_extends.scss","../angular-material/src/components/select/select.scss","../scss/components/sidenav/_extends.scss","../angular-material/src/components/sidenav/sidenav.scss","../scss/components/sidenav/sidenav.scss","../scss/components/slider/_extends.scss","../angular-material/src/components/slider/slider.scss","../scss/components/sticky/_extends.scss","../angular-material/src/components/sticky/sticky.scss","../scss/components/subheader/_extends.scss","../angular-material/src/components/subheader/subheader.scss","../scss/components/subheader/subheader.scss","../scss/components/switch/_extends.scss","../angular-material/src/components/switch/switch.scss","../scss/components/tabs/_extends.scss","../angular-material/src/components/tabs/tabs.scss","../scss/components/tabs/tabs.scss","../scss/components/toast/_extends.scss","../angular-material/src/components/toast/toast.scss","../scss/components/toast/toast.scss","../scss/components/toolbar/_extends.scss","../angular-material/src/components/toolbar/toolbar.scss","../scss/components/toolbar/toolbar.scss","../scss/components/tooltip/_extends.scss","../angular-material/src/components/tooltip/tooltip.scss","../scss/components/truncate/_extends.scss","../angular-material/src/components/truncate/truncate.scss","../scss/components/virtualRepeat/_extends.scss","../angular-material/src/components/virtualRepeat/virtual-repeater.scss","../scss/components/whiteframe/_extends.scss","../angular-material/src/components/whiteframe/whiteframe.scss","../scss/components/avatarImage/avatarImage.scss","../scss/components/colorpicker/colorpicker.scss","../scss/components/draggable-droppable/draggaLine truncated
+1 -1
View File
@@ -1,2 +1,2 @@
!function(){"use strict";function c(e){"function"!=typeof e.then&&(angular.extend(this,e),_.forEach(this.identities,function(e){e.fullName?e.full=e.fullName+" <"+e.email+">":e.full="<"+e.email+">"}),c.$log.debug("Account: "+JSON.stringify(e,void 0,2)))}c.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(e,t,n,s,i,o,a,r){return angular.extend(c,{$q:e,$timeout:t,$log:n,$$resource:new i(s.activeUser("folderURL")+"Mail",s.activeUser()),$Preferences:o,$Mailbox:a,$Message:r}),c}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",c.$factory),c.$findAll=function(e){return e?c.$unwrapCollection(e):c.$accounts?c.$q.when(c.$accounts):c.$$resource.fetch("","mailAccounts").then(function(e){return c.$unwrapCollection(e)})},c.$unwrapCollection=function(e){var n=[];return angular.forEach(e,function(e,t){e.id=t,n[t]=new c(e)}),c.$accounts=n},c.prototype.getLength=function(){return this.$expanded?this.$flattenMailboxes().length:0},c.prototype.getItemAtIndex=function(e){var t;return t=this.$flattenMailboxes(),0<=e&&e<t.length?t[e]:null},c.prototype.$getMailboxes=function(e){var s=this,t=e&&e.reload;return this.$mailboxes&&!t?c.$q.when(this.$mailboxes):(!t&&this.$futureMailboxesData||(this.$futureMailboxesData=c.$Mailbox.$find(this,e).then(function(e){s.$mailboxes=e,s.$expanded=!1;var t,n=function(e){_.forEach(e,function(e){e.$expanded=0<=t.indexOf("/"+e.id),e.children&&0<e.children.length&&n(e.children)})};if(c.$Preferences.settings.Mail.ExpandedFolders){if(angular.isString(c.$Preferences.settings.Mail.ExpandedFolders))try{t=angular.fromJson(c.$Preferences.settings.Mail.ExpandedFolders)}catch(e){c.$log.warn("Can't parse list of expanded folders. String was: "+c.$Preferences.settings.Mail.ExpandedFolders),t=[]}else t=c.$Preferences.settings.Mail.ExpandedFolders;s.$expanded=0<=t.indexOf("/"+s.id),0<t.length&&n(s.$mailboxes)}return c.$accounts&&(s.$expanded|=1==c.$accounts.length),s.$flattenMailboxes({reload:!0}),s.$mailboxes})),this.$futureMailboxesData)},c.prototype.$flattenMailboxes=function(t){var n=[],s=[],i=function(e){_.forEach(e,function(e){n.push(e),(t&&t.all||e.$expanded)&&e.children&&0<e.children.length&&i(e.children)})};return!this.$$flattenMailboxes||t&&(t.reload||t.all)?(i(this.$mailboxes),t&&t.all||(this.$$flattenMailboxes=n,t&&t.saveState&&(_.forEach(c.$accounts,function(e){e.$expanded&&s.push("/"+e.id),_.reduce(e.$$flattenMailboxes,function(e,t){return t.$expanded&&e.push("/"+t.id),e},s)}),c.$$resource.post(null,"saveFoldersState",s)))):n=this.$$flattenMailboxes,n},c.prototype.$getMailboxByType=function(n){var s=function(e){var t=_.find(e,function(e){return e.type==n});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=s(e.children))}),t};return s(this.$mailboxes)},c.prototype.$getMailboxByPath=function(n){var s=function(e){var t=_.find(e,function(e){return e.path==n});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=s(e.children))}),t};return s(this.$mailboxes)},c.prototype.$newMailbox=function(e,t){var n=this;return c.$$resource.post(e.toString(),"createFolder",{name:t}).then(function(){n.$getMailboxes({reload:!0})})},c.prototype.$certificate=function(){var t=this;return this.security&&this.security.hasCertificate?this.$$certificate?c.$q.when(this.$$certificate):c.$$resource.fetch(this.id.toString(),"certificate").then(function(e){return t.$$certificate=e}):c.$q.reject()},c.prototype.$removeCertificate=function(){var e=this;return c.$$resource.fetch(this.id.toString(),"removeCertificate").then(function(){e.security.hasCertificate=!1})},c.prototype.updateQuota=function(e){var t,n;t=Math.round(1e4*e.usedSpace/e.maxQuota)/100,n=l("quotasFormat").formatted(t,Math.round(e.maxQuota/10.24)/100),this.$quota={percent:t,description:n}},c.prototype.$newMessage=function(s){var i=this;return c.$$resource.fetch(this.id.toString(),"compose").then(function(e){return c.$log.debug("New message (compose): "+JSON.stringify(e,void 0,2)),new c.$Message(e.accountId,i.$getMailboxByPath(e.mailboxPath),e)}).then(function(n){return c.$$resource.fetch(n.$absolutePath({asDraft:!0}),"edit").then(function(e){var t=c.$Preferences.defaults.AuxiliaryMailAccounts[i.id];return t.security&&(t.security.alwaysSign&&(e.sign=!0),t.security.alwaysEncrypt&&(e.encrypt=!0)),c.$log.debug("New message (edit): "+JSON.stringify(e,void 0,2)),angular.extend(n.editable,e),n.isNew=!0,s&&s.mailto&&(angular.isObject(s.mailto)?angular.extend(n.editable,s.mailto):n.$parseMailto(s.mailto)),n})})},c.prototype.$addDelegate=function(e){var t=this,n=c.$q.defer(),s={uid:e.uid};return!e.uid||-1<_.indexOf(_.map(this.delegates,"uid"),e.uid)?n.resolve():c.$$resource.fetch(this.id.toString(),"addDelegate",s).then(function(){t.delegates.push(e),n.resolve(t.users)},function(e,t){n.reject(l("An error occured, please try again."))}),n.promise},c.prototype.$removeDelegate=function(Line truncated
!function(){"use strict";function c(e){"function"!=typeof e.then&&(angular.extend(this,e),_.forEach(this.identities,function(e){e.fullName?e.full=e.fullName+" <"+e.email+">":e.full="<"+e.email+">"}),c.$log.debug("Account: "+JSON.stringify(e,void 0,2)))}c.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(e,t,n,s,i,o,a,r){return angular.extend(c,{$q:e,$timeout:t,$log:n,$$resource:new i(s.activeUser("folderURL")+"Mail",s.activeUser()),$Preferences:o,$Mailbox:a,$Message:r}),c}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",c.$factory),c.$findAll=function(e){return e?c.$unwrapCollection(e):c.$accounts?c.$q.when(c.$accounts):c.$$resource.fetch("","mailAccounts").then(function(e){return c.$unwrapCollection(e)})},c.$unwrapCollection=function(e){var n=[];return angular.forEach(e,function(e,t){e.id=t,n[t]=new c(e)}),c.$accounts=n},c.prototype.getLength=function(){return this.$expanded?this.$flattenMailboxes().length:0},c.prototype.getItemAtIndex=function(e){var t;return t=this.$flattenMailboxes(),0<=e&&e<t.length?t[e]:null},c.prototype.$getMailboxes=function(e){var s=this,t=e&&e.reload;return this.$mailboxes&&!t?c.$q.when(this.$mailboxes):(!t&&this.$futureMailboxesData||(this.$futureMailboxesData=c.$Mailbox.$find(this,e).then(function(e){s.$mailboxes=e,s.$expanded=!1;var t,n=function(e){_.forEach(e,function(e){e.$expanded=0<=t.indexOf("/"+e.id),e.children&&0<e.children.length&&n(e.children)})};if(c.$Preferences.settings.Mail.ExpandedFolders){if(angular.isString(c.$Preferences.settings.Mail.ExpandedFolders))try{t=angular.fromJson(c.$Preferences.settings.Mail.ExpandedFolders)}catch(e){c.$log.warn("Can't parse list of expanded folders. String was: "+c.$Preferences.settings.Mail.ExpandedFolders),t=[]}else t=c.$Preferences.settings.Mail.ExpandedFolders;s.$expanded=0<=t.indexOf("/"+s.id),0<t.length&&n(s.$mailboxes)}return c.$accounts&&(s.$expanded|=1==c.$accounts.length),s.$flattenMailboxes({reload:!0}),s.$mailboxes})),this.$futureMailboxesData)},c.prototype.$flattenMailboxes=function(t){var n=[],s=[],i=function(e){_.forEach(e,function(e){n.push(e),(t&&t.all||e.$expanded)&&e.children&&0<e.children.length&&i(e.children)})};return!this.$$flattenMailboxes||t&&(t.reload||t.all)?(i(this.$mailboxes),t&&t.all||(this.$$flattenMailboxes=n,t&&t.saveState&&(_.forEach(c.$accounts,function(e){e.$expanded&&s.push("/"+e.id),_.reduce(e.$$flattenMailboxes,function(e,t){return t.$expanded&&e.push("/"+t.id),e},s)}),c.$$resource.post(null,"saveFoldersState",s)))):n=this.$$flattenMailboxes,n},c.prototype.$getMailboxByType=function(n){var s=function(e){var t=_.find(e,function(e){return e.type==n});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=s(e.children))}),t};return s(this.$mailboxes)},c.prototype.$getMailboxByPath=function(n){var s=function(e){var t=_.find(e,function(e){return e.path==n});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=s(e.children))}),t};return s(this.$mailboxes)},c.prototype.$newMailbox=function(e,t){var n=this;return c.$$resource.post(e.toString(),"createFolder",{name:t}).then(function(){n.$getMailboxes({reload:!0})})},c.prototype.$certificate=function(){var t=this;return this.security&&this.security.hasCertificate?this.$$certificate?c.$q.when(this.$$certificate):c.$$resource.fetch(this.id.toString(),"certificate").then(function(e){return t.$$certificate=e}):c.$q.reject()},c.prototype.$removeCertificate=function(){var e=this;return c.$$resource.fetch(this.id.toString(),"removeCertificate").then(function(){e.security.hasCertificate=!1})},c.prototype.updateQuota=function(e){var t,n;t=Math.round(1e4*e.usedSpace/e.maxQuota)/100,n=l("quotasFormat").formatted(t,Math.round(e.maxQuota/10.24)/100),this.$quota={percent:t,description:n}},c.prototype.$newMessage=function(s){var i=this;return c.$$resource.fetch(this.id.toString(),"compose").then(function(e){return c.$log.debug("New message (compose): "+JSON.stringify(e,void 0,2)),new c.$Message(e.accountId,i.$getMailboxByPath(e.mailboxPath),e)}).then(function(n){return c.$$resource.fetch(n.$absolutePath({asDraft:!0}),"edit").then(function(e){var t=c.$Preferences.defaults.AuxiliaryMailAccounts[i.id];return t.security&&(t.security.alwaysSign&&(e.sign=!0),t.security.alwaysEncrypt&&(e.encrypt=!0)),c.$log.debug("New message (edit): "+JSON.stringify(e,void 0,2)),angular.extend(n.editable,e),n.isNew=!0,s&&s.mailto&&(angular.isObject(s.mailto)?angular.extend(n.editable,s.mailto):n.$parseMailto(s.mailto)),n})})},c.prototype.$addDelegate=function(e){var t=this,n=c.$q.defer(),s={uid:e.uid};return!e.uid||-1<_.indexOf(_.map(this.delegates,"uid"),e.uid)?n.resolve():c.$$resource.fetch(this.id.toString(),"addDelegate",s).then(function(){t.delegates.push(e),n.resolve(t.users)},function(e,t){n.reject(l("An error occured, please try again."))}),n.promise},c.prototype.$removeDelegate=function(Line truncated
//# sourceMappingURL=Mailer.services.js.map
@@ -1 +1 @@
{"version":3,"sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/sgImageGallery.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgAccountSection.directive.js","Mailer/sgIMIP.directive.js","Mailer/sgMailboxListItem.directive.js","Mailer/sgMessageListItem.directive.js","Mailer/sgMessageListItemMain.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","then","angular","extend","this","_","forEach","identities","identity","fullName","full","email","$log","debug","JSON","stringify","undefined","$factory","$q","$timeout","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Mailbox","$Message","module","e","factory","$findAll","data","$unwrapCollection","$accounts","when","fetch","o","collection","i","id","prototype","getLength","$expanded","$flattenMailboxes","length","getItemAtIndex","index","expandedMailboxes","$getMailboxes","options","_this","reload","$mailboxes","$futureMailboxesData","$find","expandedFolders","_visit","mailboxes","indexOf","children","settings","Mail","ExpandedFolders","isString","fromJson","warn","allMailboxes","push","all","$$flattenMailboxes","saveState","account","reduce","mailbox","post","$getMailboxByType","type","_find","find","$getMailboxByPath","path","$newMailbox","name","toString","$certificate","security","hasCertificate","$$certificate","reject","$removeCertificate","updateQuota","percent","description","Math","round","usedSpace","maxQuota","l","formatted","$quota","$newMessage","accountId","mailboxPath","message","$absolutePath","asDraft","accountDefaults","defaults","AuxiliaryMailAccounts","alwaysSign","sign","alwaysEncrypt","encrypt","editable","isNew","mailto","isObject","$parseMailto","$addDelegate","user","deferred","defer","param","uid","map","delegates","resolve","users","status","promise","$removeDelegate","splice","futureMailboxData","$account","init","newMailboxData","create","$unwrap","Acl","PRELOAD","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","$virtualPath","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","quotas","split","component","asCSSIdentifier","join","isUndefined","uidsMap","headers","$isLoading","$messages","$id","$acl","threaded","$collapsedThreads","threadsCollapsed","$displayName","$isEditable","isEditable","$isSpecial","$icon","$isNoInferiors","isNoInferiors","$shadowData","$omit","selectFolder","collapsedThread","filter","msg","first","collapsed","visibleMessages","$lastVisibleIndex","max","$loadMessage","$selectedMessages","selected","$selectedCount","isSelectedMessage","messageId","selectedMessage","$selectedMessage","$selectedMessageIndex","hasSelectedMessage","isDefined","$filter","sortingAttributes","filters","unseenCount","cancel","searchInput","secondFilter","match","searchBy","copy","refreshViewCheck","SOGoRefreshViewCheck","f","bind","timeInterval","endIndex","uids","futureHeadersData","startIndex","loaded","subject","min","loading","$unwrapHeaders","flags","isNoSelect","getClassName","base","$rename","findParent","parent","parentMailbox","$save","sibling","oldPath","localeCompare","pathRE","RegExp","_updateChildren","child","replace","$compact","$canFolderAs","$setFolderAs","$emptyTrash","$markAsRead","isread","$flagMessages","messages","operation","msgUIDs","saveSelectedMessages","selectedMessages","selectedUIDs","filename","download","exportFolder","open","$delete","$_deleteMessages","unseen","firstIndex","forEachRight","selectedIndex","findIndex","$deleteMessages","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$reset","value","key","$move","parentPath","finally","save","response","error","$futureMailboxData","$topIndex","invokeMap","msgs","msgObject","zipObject","count","isError","j","messageHeaders","$updateSubscribe","action","subscribed","futureMessageData","lazy","$mailbox","$hasUnsafeContent","$loadUnsafeContent","to","cc","bcc","threadCount","isNaN","threadMember","Message_STATUS","STATUS","$avatar","avatar","SOGoMailLabelsColors","$tags","SOGoMailDisplayRemoteInlineImages","$displayRemoteInlineImages","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYED_MS","filterTags","query","excludedTags","re","results","keys","tag","pair","search","includes","color","$formatFullAddresses","flag","charAt","buildPath","nocache","draftId","withResourcePath","$setUID","oldUID","attr","constructor","shortname","last","image","$shortRecipients","result","total","$shortAddress","address","allowReplyAll","recipientsCount","typeCount","recipient","isDraft","loadUnsafeContent","$parts","$content","parts","part","msgclass","content","alternatePart","preferredPart","contentType","isArray","signed","valid","certificate","certificates","encrypted","decrypted","opaqueSigned","mixedParLine truncated
{"version":3,"sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/sgImageGallery.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgAccountSection.directive.js","Mailer/sgIMIP.directive.js","Mailer/sgMailboxListItem.directive.js","Mailer/sgMessageListItem.directive.js","Mailer/sgMessageListItemMain.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","then","angular","extend","this","_","forEach","identities","identity","fullName","full","email","$log","debug","JSON","stringify","undefined","$factory","$q","$timeout","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Mailbox","$Message","module","e","factory","$findAll","data","$unwrapCollection","$accounts","when","fetch","o","collection","i","id","prototype","getLength","$expanded","$flattenMailboxes","length","getItemAtIndex","index","expandedMailboxes","$getMailboxes","options","_this","reload","$mailboxes","$futureMailboxesData","$find","expandedFolders","_visit","mailboxes","indexOf","children","settings","Mail","ExpandedFolders","isString","fromJson","warn","allMailboxes","push","all","$$flattenMailboxes","saveState","account","reduce","mailbox","post","$getMailboxByType","type","_find","find","$getMailboxByPath","path","$newMailbox","name","toString","$certificate","security","hasCertificate","$$certificate","reject","$removeCertificate","updateQuota","percent","description","Math","round","usedSpace","maxQuota","l","formatted","$quota","$newMessage","accountId","mailboxPath","message","$absolutePath","asDraft","accountDefaults","defaults","AuxiliaryMailAccounts","alwaysSign","sign","alwaysEncrypt","encrypt","editable","isNew","mailto","isObject","$parseMailto","$addDelegate","user","deferred","defer","param","uid","map","delegates","resolve","users","status","promise","$removeDelegate","splice","futureMailboxData","$account","init","newMailboxData","create","$unwrap","Acl","PRELOAD","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","$virtualPath","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","quotas","split","component","asCSSIdentifier","join","isUndefined","uidsMap","headers","$isLoading","$messages","$id","$acl","threaded","$collapsedThreads","threadsCollapsed","$displayName","$isEditable","isEditable","$isSpecial","$icon","$isNoInferiors","isNoInferiors","$shadowData","$omit","selectFolder","collapsedThread","filter","msg","first","collapsed","visibleMessages","$lastVisibleIndex","max","$loadMessage","$selectedMessages","selected","$selectedCount","isSelectedMessage","messageId","selectedMessage","$selectedMessage","$selectedMessageIndex","hasSelectedMessage","isDefined","$filter","sortingAttributes","filters","unseenCount","cancel","searchInput","secondFilter","match","searchBy","copy","refreshViewCheck","SOGoRefreshViewCheck","f","bind","timeInterval","endIndex","uids","futureHeadersData","startIndex","loaded","subject","min","loading","$unwrapHeaders","flags","isNoSelect","getClassName","base","$rename","findParent","parent","parentMailbox","$save","sibling","oldPath","localeCompare","pathRE","RegExp","_updateChildren","child","replace","$compact","$canFolderAs","$setFolderAs","$emptyTrash","$markAsRead","isread","$flagMessages","messages","operation","msgUIDs","saveSelectedMessages","selectedMessages","selectedUIDs","filename","download","exportFolder","open","$delete","$_deleteMessages","unseen","firstIndex","forEachRight","selectedIndex","findIndex","$deleteMessages","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$reset","value","key","$move","parentPath","finally","save","response","error","$futureMailboxData","$topIndex","invokeMap","msgs","msgObject","zipObject","count","isError","j","messageHeaders","$updateSubscribe","action","subscribed","futureMessageData","lazy","$mailbox","$hasUnsafeContent","$loadUnsafeContent","to","cc","bcc","threadCount","isNaN","threadMember","Message_STATUS","STATUS","$avatar","avatar","SOGoMailLabelsColors","$tags","SOGoMailDisplayRemoteInlineImages","$displayRemoteInlineImages","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYED_MS","filterTags","query","excludedTags","re","results","keys","tag","pair","search","includes","color","$formatFullAddresses","flag","charAt","buildPath","nocache","draftId","withResourcePath","$setUID","oldUID","attr","constructor","shortname","last","image","$shortRecipients","result","total","$shortAddress","address","allowReplyAll","recipientsCount","typeCount","recipient","isDraft","loadUnsafeContent","$parts","$content","parts","part","msgclass","content","alternatePart","preferredPart","contentType","isArray","signed","valid","certificate","certificates","encrypted","decrypted","opaqueSigned","mixedParLine truncated
@@ -1,2 +1,2 @@
!function(){"use strict";function d(e){this.component=e,this.component.attendees&&_.forEach(this.component.attendees,function(e){e.image=d.$gravatar(e.email,32)}),this.workDaysOnly=!0,this.slotStartTimeLimit=new Date,this.slotStartTimeLimit.setMinutes(0),this.slotStartTimeLimit.setHours(d.dayStartHour),this.slotEndTimeLimit=new Date,this.slotEndTimeLimit.setMinutes(0),this.slotEndTimeLimit.setHours(d.dayEndHour),this.$days=[],this.$futureFreebusyData={},this.updateFreeBusyCoverage(),this.updateFreeBusy()}d.$factory=["$q","$timeout","$log","sgSettings","Attendees_ROLES","Preferences","User","Card","Gravatar","Resource",function(e,t,n,i,a,o,r,s,c,l){return angular.extend(d,{$q:e,$timeout:t,$log:n,$settings:i,$User:r,$Preferences:o,$Card:s,$gravatar:c,$$resource:new l(i.activeUser("folderURL")+"Calendar",i.activeUser()),ROLES:a}),d.dayStartHour=parseInt(o.defaults.SOGoDayStartTime.split(":")[0]),d.dayEndHour=parseInt(o.defaults.SOGoDayEndTime.split(":")[0]),d}];try{angular.module("SOGo.SchedulerUI")}catch(e){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").constant("Attendees_ROLES",{REQ_PARTICIPANT:"req-participant",OPT_PARTICIPANT:"opt-participant",NON_PARTICIPANT:"non-participant",CHAIR:"chair"}).factory("Attendees",d.$factory),d.timeToQuarters=function(e){return 4*e.getHours()+Math.ceil(e.getMinutes()/15)},d.prototype.getLength=function(){return this.component.attendees?this.component.attendees.length:0},d.prototype.initOrganizer=function(e){var n=this;(e&&e.isSubscription?d.$User.$filter(e.owner).then(function(e){var t=e[0];n.component.organizer={uid:t.uid,name:t.cn,email:t.c_email}}):(this.component.organizer={uid:d.$settings.activeUser("login"),name:d.$settings.activeUser("identification"),email:d.$settings.activeUser("email")},d.$q.when())).then(function(){n.updateFreeBusyAttendee(n.component.organizer)})},d.prototype.add=function(e,t){var n,i,a=this;e&&((!this.component.attendees||t&&t.organizerCalendar)&&this.initOrganizer(t?t.organizerCalendar:null),e.$isList({expandable:!0})?(i=d.$Card.$find(e.container,e.c_name)).$id().then(function(e){_.forEach(i.refs,function(e){n={name:e.c_cn,email:e.$preferredEmail(t?t.partial:null),role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",uid:e.c_uid,$avatarIcon:"person"},_.find(a.component.attendees,function(e){return e.email==n.email})||(n.image=d.$gravatar(n.email,32),a.component.attendees?a.component.attendees.push(n):a.component.attendees=[n],a.updateFreeBusyAttendee(n))})}):(n={uid:e.c_uid,domain:e.c_domain,isMSExchange:e.ismsexchange,isGroup:e.$isList(),isExpandableGroup:!1,isResource:e.isresource,name:e.c_cn,email:e.$$email,role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",$avatarIcon:e.$avatarIcon},_.find(this.attendees,function(e){return e.email==n.email})||(e.$isList()&&e.$members().then(function(e){n.members=e,n.isExpandableGroup=!0}),n.image=d.$gravatar(n.email,32),this.component.attendees?this.component.attendees.push(n):this.component.attendees=[n],this.updateFreeBusyAttendee(n))))},d.prototype.nextRole=function(t){var e=_.values(d.ROLES),n=_.findIndex(e,function(e){return t.role===e});t.role=e[++n%4]},d.prototype.hasAttendee=function(e){var t=_.find(this.component.attendees,function(t){return _.find(e.emails,function(e){return e.value==t.email})});return angular.isDefined(t)},d.prototype.remove=function(t){var e=_.findIndex(this.component.attendees,function(e){return e.email==t.email});this.component.attendees.splice(e,1)},d.prototype.updateFreeBusyCoverage=function(){var o,r,s,e,c={};this.component.start&&this.component.end&&(o=new Date(this.component.start.getTime()),r=new Date(this.component.end.getTime()),this.component.isAllDay?(o.setHours(d.dayStartHour),o.setMinutes(0),r.setHours(d.dayEndHour),r.setMinutes(0),s=e=0):(s=parseInt(o.getMinutes()/15+.5),e=parseInt(r.getMinutes()/15+.5)),o.setMinutes(15*s),r.setMinutes(15*e),_.forEach(o.daysUpTo(r),function(e,t){var n,i=e.getDate(),a=e.getDayString();if(a===o.getDayString())for(n=e.getHours().toString(),c[a]={},c[a][n]=[];0<s;)c[a][n].push(0),s--;else e=e.beginOfDay(),c[a]={};for(;e.getTime()<r.getTime()&&e.getDate()==i;)n=e.getHours().toString(),angular.isUndefined(c[a][n])&&(c[a][n]=[]),c[a][n].push(1),e.addMinutes(15)}),this.freebusy=c)},d.prototype.coversFreeBusy=function(e,t,n){return this.freebusy&&angular.isDefined(this.freebusy[e])&&angular.isDefined(this.freebusy[e][t])&&1==this.freebusy[e][t][n]},d.prototype.getDays=function(e){var t,n,i,a=this;return e?(t=e,(n=new Date(e.getTime())).addMinutes(this.component.delta)):(t=this.component.start,n=this.component.end),(0===this.$days.length||_.findIndex(this.$days,["getDayString",t.getDayString()])<0||_.findIndex(this.$days,["getDayString",n.getDayString()])<0)&&(t=t.beginOfDay().addDays(-7),n=n.beginOfDay().addDays(7),i=d.$Preferences.$mdDateLocaleProvider.formatDate,this.$days.splice(0,this.$days.length),_.forEach(t.daysUpTo(n),function(e){e.$dateFormat=d.$Preferences.defaults.SOGoLongDateFormat,a.$dLine truncated
!function(){"use strict";function d(e){this.component=e,this.component.attendees&&_.forEach(this.component.attendees,function(e){e.image=d.$gravatar(e.email,32)}),this.workDaysOnly=!0,this.slotStartTimeLimit=new Date,this.slotStartTimeLimit.setMinutes(0),this.slotStartTimeLimit.setHours(d.dayStartHour),this.slotEndTimeLimit=new Date,this.slotEndTimeLimit.setMinutes(0),this.slotEndTimeLimit.setHours(d.dayEndHour),this.$days=[],this.$futureFreebusyData={},this.updateFreeBusyCoverage(),this.updateFreeBusy()}d.$factory=["$q","$timeout","$log","sgSettings","Attendees_ROLES","Preferences","User","Card","Gravatar","Resource",function(e,t,n,i,a,o,r,s,c,l){return angular.extend(d,{$q:e,$timeout:t,$log:n,$settings:i,$User:r,$Preferences:o,$Card:s,$gravatar:c,$$resource:new l(i.activeUser("folderURL")+"Calendar",i.activeUser()),ROLES:a}),d.dayStartHour=parseInt(o.defaults.SOGoDayStartTime.split(":")[0]),d.dayEndHour=parseInt(o.defaults.SOGoDayEndTime.split(":")[0]),d}];try{angular.module("SOGo.SchedulerUI")}catch(e){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").constant("Attendees_ROLES",{REQ_PARTICIPANT:"req-participant",OPT_PARTICIPANT:"opt-participant",NON_PARTICIPANT:"non-participant",CHAIR:"chair"}).factory("Attendees",d.$factory),d.timeToQuarters=function(e){return 4*e.getHours()+Math.ceil(e.getMinutes()/15)},d.prototype.getLength=function(){return this.component.attendees?this.component.attendees.length:0},d.prototype.initOrganizer=function(e){var n=this;(e&&e.isSubscription?d.$User.$filter(e.owner).then(function(e){var t=e[0];n.component.organizer={uid:t.uid,name:t.cn,email:t.c_email}}):(this.component.organizer={uid:d.$settings.activeUser("login"),name:d.$settings.activeUser("identification"),email:d.$settings.activeUser("email")},d.$q.when())).then(function(){n.updateFreeBusyAttendee(n.component.organizer)})},d.prototype.add=function(e,t){var n,i,a=this;e&&((!this.component.attendees||t&&t.organizerCalendar)&&this.initOrganizer(t?t.organizerCalendar:null),e.$isList({expandable:!0})?(i=d.$Card.$find(e.container,e.c_name)).$id().then(function(e){_.forEach(i.refs,function(e){n={name:e.c_cn,email:e.$preferredEmail(t?t.partial:null),role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",uid:e.c_uid,$avatarIcon:"person"},_.find(a.component.attendees,function(e){return e.email==n.email})||(n.image=d.$gravatar(n.email,32),a.component.attendees?a.component.attendees.push(n):a.component.attendees=[n],a.updateFreeBusyAttendee(n))})}):(n={uid:e.c_uid,domain:e.c_domain,isMSExchange:e.ismsexchange,isGroup:e.$isList(),isExpandableGroup:!1,isResource:e.isresource,name:e.c_cn,email:e.$$email,role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",$avatarIcon:e.$avatarIcon},_.find(this.attendees,function(e){return e.email==n.email})||(e.$isList()&&e.$members().then(function(e){n.members=e,n.isExpandableGroup=!0}),n.image=d.$gravatar(n.email,32),this.component.attendees?this.component.attendees.push(n):this.component.attendees=[n],this.updateFreeBusyAttendee(n))))},d.prototype.nextRole=function(t){var e=_.values(d.ROLES),n=_.findIndex(e,function(e){return t.role===e});t.role=e[++n%4]},d.prototype.hasAttendee=function(e){var t=_.find(this.component.attendees,function(t){return _.find(e.emails,function(e){return e.value==t.email})});return angular.isDefined(t)},d.prototype.remove=function(t){var e=_.findIndex(this.component.attendees,function(e){return e.email==t.email});this.component.attendees.splice(e,1)},d.prototype.updateFreeBusyCoverage=function(){var o,r,s,e,c={};this.component.start&&this.component.end&&(o=new Date(this.component.start.getTime()),r=new Date(this.component.end.getTime()),this.component.isAllDay?(o.setHours(d.dayStartHour),o.setMinutes(0),r.setHours(d.dayEndHour),r.setMinutes(0),s=e=0):(s=parseInt(o.getMinutes()/15+.5),e=parseInt(r.getMinutes()/15+.5)),o.setMinutes(15*s),r.setMinutes(15*e),_.forEach(o.daysUpTo(r),function(e,t){var n,i=e.getDate(),a=e.getDayString();if(a===o.getDayString())for(n=e.getHours().toString(),c[a]={},c[a][n]=[];0<s;)c[a][n].push(0),s--;else e=e.beginOfDay(),c[a]={};for(;e.getTime()<r.getTime()&&e.getDate()==i;)n=e.getHours().toString(),angular.isUndefined(c[a][n])&&(c[a][n]=[]),c[a][n].push(1),e.addMinutes(15)}),this.freebusy=c)},d.prototype.coversFreeBusy=function(e,t,n){return this.freebusy&&angular.isDefined(this.freebusy[e])&&angular.isDefined(this.freebusy[e][t])&&1==this.freebusy[e][t][n]},d.prototype.getDays=function(e){var t,n,i,a=this;return e?(t=e,(n=new Date(e.getTime())).addMinutes(this.component.delta)):(t=this.component.start,n=this.component.end),(0===this.$days.length||_.findIndex(this.$days,["getDayString",t.getDayString()])<0||_.findIndex(this.$days,["getDayString",n.getDayString()])<0)&&(t=t.beginOfDay().addDays(-7),n=n.beginOfDay().addDays(7),i=d.$Preferences.$mdDateLocaleProvider.formatDate,this.$days.splice(0,this.$days.length),_.forEach(t.daysUpTo(n),function(e){e.$dateFormat=d.$Preferences.defaults.SOGoLongDateFormat,a.$dLine truncated
//# sourceMappingURL=Scheduler.services.js.map
@@ -1 +1 @@
{"version":3,"sources":["Scheduler/Attendees.service.js","Scheduler/Calendar.service.js","Scheduler/Component.service.js","Scheduler/CalendarController.js","Scheduler/CalendarListController.js","Scheduler/CalendarsController.js","Scheduler/ComponentController.js","Scheduler/sgCalendarDay.directive.js","Scheduler/sgCalendarDayBlock.directive.js","Scheduler/sgCalendarDayTable.directive.js","Scheduler/sgCalendarGhost.directive.js","Scheduler/sgCalendarListEvent.directive.js","Scheduler/sgCalendarListItem.directive.js","Scheduler/sgCalendarMonthDay.directive.js","Scheduler/sgCalendarMonthEvent.directive.js","Scheduler/sgCalendarPrintStylesheet.directive.js","Scheduler/sgCalendarScrollView.directive.js","Scheduler/sgCategoryStylesheet.directive.js","Scheduler/sgDraggableCalendarBlock.directive.js","Scheduler/sgFreebusy.directive.js","Scheduler/sgFreebusyDay.directive.js","Scheduler/sgNowLine.directive.js"],"names":["Attendees","component","this","attendees","_","forEach","attendee","image","$gravatar","email","workDaysOnly","slotStartTimeLimit","Date","setMinutes","setHours","dayStartHour","slotEndTimeLimit","dayEndHour","$days","$futureFreebusyData","updateFreeBusyCoverage","updateFreeBusy","$factory","$q","$timeout","$log","Settings","ROLES","Preferences","User","Card","Gravatar","Resource","angular","extend","$settings","$User","$Preferences","$Card","$$resource","activeUser","parseInt","defaults","SOGoDayStartTime","split","SOGoDayEndTime","module","e","constant","REQ_PARTICIPANT","OPT_PARTICIPANT","NON_PARTICIPANT","CHAIR","factory","timeToQuarters","dateTime","getHours","Math","ceil","getMinutes","prototype","getLength","length","initOrganizer","calendar","_this","isSubscription","$filter","owner","then","results","organizer","uid","name","cn","c_email","when","updateFreeBusyAttendee","add","card","options","list","organizerCalendar","$isList","expandable","$find","container","c_name","$id","listId","refs","ref","c_cn","$preferredEmail","partial","role","partstat","c_uid","$avatarIcon","find","o","push","domain","c_domain","isMSExchange","ismsexchange","isGroup","isExpandableGroup","isResource","isresource","$$email","$members","members","nextRole","roles","values","index","findIndex","hasAttendee","emails","value","isDefined","remove","currentAttendee","splice","roundedStart","roundedEnd","startQuarter","endQuarter","freebusy","start","end","getTime","isAllDay","daysUpTo","date","hourKey","currentDay","getDate","dayKey","getDayString","toString","beginOfDay","isUndefined","addMinutes","coversFreeBusy","day","hour","quarter","getDays","refDate","sd","ed","formatFcn","delta","addDays","$mdDateLocaleProvider","formatDate","$dateFormat","SOGoLongDateFormat","stringWithSeparator","promises","filter","all","promise","resource","params","days","sday","map","eday","userResource","intersection","keys","fetch","data","i","forwardFindDate","currentStart","foundDate","maxOffset","endLimit","duration","offset","firstStep","floor","currentEntries","indexOf","startLimit","testDuration","foundTime","setTime","forwardAdjustCurrentStart","getDay","backwardFindDate","lastIndexOf","testOffset","debug","backwardAdjustCurrentStart","findSlot","direction","findDate","adjustCurrentStart","clone","setSeconds","step","mergeFreebusy","startDay","j","attendeeEntries","flatMap","Calendar","futureCalendarData","init","id","newCalendarData","create","$unwrap","Component","Acl","$Component","$$Acl","$view","EventDragDayLength","EventDragHorizontalOffset","ConflictHTTPErrorCode","$defaultCalendar","SOGoDefaultCalendar","$findAll","active","$add","sibling","isWebCalendar","$webcalendars","$subscriptions","$calendars","localeCompare","settings","FoldersOrder","saveFoldersOrder","$reloadAll","writable","calendars","union","isOwned","acls","objectCreator","calendarData","group","login","$get","$getIndex","$subscribe","path","$addWebCalendar","url","d","defer","urls","webCalendarURL","reject","post","isEditable","isRemote","JSON","stringify","undefined","resolve","response","status","reloadWebCalendars","$error","l","statusText","$deleteComponents","components","pid","uids","saveFoldersActivation","ids","request","folders","color","$acl","isSuperUser","$shadowData","$omit","$futureCalendarData","getClassName","base","$rename","$save","$delete","$reset","key","save","setCredentials","username","password","export","ownerPaths","realOwnerId","type","filename","webDavICSURL","substring","join","open","$setActivation","$getComponent","componentId","recurrenceId","isError","isObject","copy","futureComponentData","newComponentData","newguid","isNew","$rootScope","Component_STATUS","STATUS","$Attendees","timeFormat","$query","search","$queryEvents","sort","asc","filterpopup","$queryTasks","$refreshTimeout","$ghost","EventsFilterState","TasksFilterState","EventsSortingState","TasksSortingState","show_completed","ShowCompletedTasks","$categories","SOGoCalendarCategoriesColors","SOGoTimeFormat","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYEDLine truncated
{"version":3,"sources":["Scheduler/Attendees.service.js","Scheduler/Calendar.service.js","Scheduler/Component.service.js","Scheduler/CalendarController.js","Scheduler/CalendarListController.js","Scheduler/CalendarsController.js","Scheduler/ComponentController.js","Scheduler/sgCalendarDay.directive.js","Scheduler/sgCalendarDayBlock.directive.js","Scheduler/sgCalendarDayTable.directive.js","Scheduler/sgCalendarGhost.directive.js","Scheduler/sgCalendarListEvent.directive.js","Scheduler/sgCalendarListItem.directive.js","Scheduler/sgCalendarMonthDay.directive.js","Scheduler/sgCalendarMonthEvent.directive.js","Scheduler/sgCalendarPrintStylesheet.directive.js","Scheduler/sgCalendarScrollView.directive.js","Scheduler/sgCategoryStylesheet.directive.js","Scheduler/sgDraggableCalendarBlock.directive.js","Scheduler/sgFreebusy.directive.js","Scheduler/sgFreebusyDay.directive.js","Scheduler/sgNowLine.directive.js"],"names":["Attendees","component","this","attendees","_","forEach","attendee","image","$gravatar","email","workDaysOnly","slotStartTimeLimit","Date","setMinutes","setHours","dayStartHour","slotEndTimeLimit","dayEndHour","$days","$futureFreebusyData","updateFreeBusyCoverage","updateFreeBusy","$factory","$q","$timeout","$log","Settings","ROLES","Preferences","User","Card","Gravatar","Resource","angular","extend","$settings","$User","$Preferences","$Card","$$resource","activeUser","parseInt","defaults","SOGoDayStartTime","split","SOGoDayEndTime","module","e","constant","REQ_PARTICIPANT","OPT_PARTICIPANT","NON_PARTICIPANT","CHAIR","factory","timeToQuarters","dateTime","getHours","Math","ceil","getMinutes","prototype","getLength","length","initOrganizer","calendar","_this","isSubscription","$filter","owner","then","results","organizer","uid","name","cn","c_email","when","updateFreeBusyAttendee","add","card","options","list","organizerCalendar","$isList","expandable","$find","container","c_name","$id","listId","refs","ref","c_cn","$preferredEmail","partial","role","partstat","c_uid","$avatarIcon","find","o","push","domain","c_domain","isMSExchange","ismsexchange","isGroup","isExpandableGroup","isResource","isresource","$$email","$members","members","nextRole","roles","values","index","findIndex","hasAttendee","emails","value","isDefined","remove","currentAttendee","splice","roundedStart","roundedEnd","startQuarter","endQuarter","freebusy","start","end","getTime","isAllDay","daysUpTo","date","hourKey","currentDay","getDate","dayKey","getDayString","toString","beginOfDay","isUndefined","addMinutes","coversFreeBusy","day","hour","quarter","getDays","refDate","sd","ed","formatFcn","delta","addDays","$mdDateLocaleProvider","formatDate","$dateFormat","SOGoLongDateFormat","stringWithSeparator","promises","filter","all","promise","resource","params","days","sday","map","eday","userResource","intersection","keys","fetch","data","i","forwardFindDate","currentStart","foundDate","maxOffset","endLimit","duration","offset","firstStep","floor","currentEntries","indexOf","startLimit","testDuration","foundTime","setTime","forwardAdjustCurrentStart","getDay","backwardFindDate","lastIndexOf","testOffset","debug","backwardAdjustCurrentStart","findSlot","direction","findDate","adjustCurrentStart","clone","setSeconds","step","mergeFreebusy","startDay","j","attendeeEntries","flatMap","Calendar","futureCalendarData","init","id","newCalendarData","create","$unwrap","Component","Acl","$Component","$$Acl","$view","EventDragDayLength","EventDragHorizontalOffset","ConflictHTTPErrorCode","$defaultCalendar","SOGoDefaultCalendar","$findAll","active","$add","sibling","isWebCalendar","$webcalendars","$subscriptions","$calendars","localeCompare","settings","FoldersOrder","saveFoldersOrder","$reloadAll","writable","calendars","union","isOwned","acls","objectCreator","calendarData","group","login","$get","$getIndex","$subscribe","path","$addWebCalendar","url","d","defer","urls","webCalendarURL","reject","post","isEditable","isRemote","JSON","stringify","undefined","resolve","response","status","reloadWebCalendars","$error","l","statusText","$deleteComponents","components","pid","uids","saveFoldersActivation","ids","request","folders","color","$acl","isSuperUser","$shadowData","$omit","$futureCalendarData","getClassName","base","$rename","$save","$delete","$reset","key","save","setCredentials","username","password","export","ownerPaths","realOwnerId","type","filename","webDavICSURL","substring","join","open","$setActivation","$getComponent","componentId","recurrenceId","isError","isObject","copy","futureComponentData","newComponentData","newguid","isNew","$rootScope","Component_STATUS","STATUS","$Attendees","timeFormat","$query","search","$queryEvents","sort","asc","filterpopup","$queryTasks","$refreshTimeout","$ghost","EventsFilterState","TasksFilterState","EventsSortingState","TasksSortingState","show_completed","ShowCompletedTasks","$categories","SOGoCalendarCategoriesColors","SOGoTimeFormat","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYEDLine truncated
+250 -265
View File
@@ -4,7 +4,7 @@
* This causes it to be incompatible with plugins that depend on @uirouter/core.
* We recommend switching to the ui-router-core.js and ui-router-angularjs.js bundles instead.
* For more information, see https://ui-router.github.io/blog/uirouter-for-angularjs-umd-bundles
* @version v1.0.22
* @version v1.0.23
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
@@ -265,12 +265,12 @@
* A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array
* where all the elements in the array are Strings, except the last one, which is a Function
*/
function isInjectable(val$$1) {
if (isArray(val$$1) && val$$1.length) {
var head = val$$1.slice(0, -1), tail = val$$1.slice(-1);
function isInjectable(val) {
if (isArray(val) && val.length) {
var head = val.slice(0, -1), tail = val.slice(-1);
return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length);
}
return isFunction(val$$1);
return isFunction(val);
}
/**
* Predicate which checks if a value looks like a Promise
@@ -404,8 +404,8 @@
}
/** pushes a values to an array and returns the value */
var pushTo = curry(_pushTo);
function _pushTo(arr, val$$1) {
return arr.push(val$$1), val$$1;
function _pushTo(arr, val) {
return arr.push(val), val;
}
/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */
var deregAll = function (functions) {
@@ -1392,8 +1392,8 @@
var cfgheader = 'view config state (view name)';
var mapping = pairs
.map(function (_a) {
var uiView = _a.uiView, viewConfig = _a.viewConfig;
var _b;
var uiView = _a.uiView, viewConfig = _a.viewConfig;
var uiv = uiView && uiView.fqn;
var cfg = viewConfig && viewConfig.viewDecl.$context.name + ": (" + viewConfig.viewDecl.$name + ")";
return _b = {}, _b[uivheader] = uiv, _b[cfgheader] = cfg, _b;
@@ -1664,21 +1664,21 @@
var raw = isDefined(config.raw) ? !!config.raw : !!type.raw;
var squash = getSquashPolicy(config, isOptional, urlConfig.defaultSquashPolicy());
var replace = getReplace(config, arrayMode, isOptional, squash);
var inherit$$1 = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;
var inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;
// array config: param name (param[]) overrides default settings. explicit config overrides param name.
function getArrayMode() {
var arrayDefaults = { array: location === exports.DefType.SEARCH ? 'auto' : false };
var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {};
return extend(arrayDefaults, arrayParamNomenclature, config).array;
}
extend(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit$$1, array: arrayMode, config: config });
extend(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit, array: arrayMode, config: config });
}
Param.values = function (params, values$$1) {
if (values$$1 === void 0) { values$$1 = {}; }
Param.values = function (params, values) {
if (values === void 0) { values = {}; }
var paramValues = {};
for (var _i = 0, params_1 = params; _i < params_1.length; _i++) {
var param = params_1[_i];
paramValues[param.id] = param.value(values$$1[param.id]);
paramValues[param.id] = param.value(values[param.id]);
}
return paramValues;
};
@@ -1713,9 +1713,9 @@
return Param.changed(params, values1, values2).length === 0;
};
/** Returns true if a the parameter values are valid, according to the Param definitions */
Param.validates = function (params, values$$1) {
if (values$$1 === void 0) { values$$1 = {}; }
return params.map(function (param) { return param.validates(values$$1[param.id]); }).reduce(allTrueR, true);
Param.validates = function (params, values) {
if (values === void 0) { values = {}; }
return params.map(function (param) { return param.validates(values[param.id]); }).reduce(allTrueR, true);
};
Param.prototype.isDefaultValue = function (value) {
return this.isOptional && this.type.equals(this.value(), value);
@@ -1742,13 +1742,13 @@
}
return defaultValue;
};
var replaceSpecialValues = function (val$$1) {
var replaceSpecialValues = function (val) {
for (var _i = 0, _a = _this.replace; _i < _a.length; _i++) {
var tuple = _a[_i];
if (tuple.from === val$$1)
if (tuple.from === val)
return tuple.to;
}
return val$$1;
return val;
};
value = replaceSpecialValues(value);
return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value);
@@ -1857,7 +1857,7 @@
/** @hidden */
function initDefaultTypes() {
var makeDefaultType = function (def) {
var valToString = function (val$$1) { return (val$$1 != null ? val$$1.toString() : val$$1); };
var valToString = function (val) { return (val != null ? val.toString() : val); };
var defaultTypeBase = {
encode: valToString,
decode: valToString,
@@ -1879,31 +1879,31 @@
inherit: false,
}),
int: makeDefaultType({
decode: function (val$$1) { return parseInt(val$$1, 10); },
is: function (val$$1) {
return !isNullOrUndefined(val$$1) && this.decode(val$$1.toString()) === val$$1;
decode: function (val) { return parseInt(val, 10); },
is: function (val) {
return !isNullOrUndefined(val) && this.decode(val.toString()) === val;
},
pattern: /-?\d+/,
}),
bool: makeDefaultType({
encode: function (val$$1) { return (val$$1 && 1) || 0; },
decode: function (val$$1) { return parseInt(val$$1, 10) !== 0; },
encode: function (val) { return (val && 1) || 0; },
decode: function (val) { return parseInt(val, 10) !== 0; },
is: is(Boolean),
pattern: /0|1/,
}),
date: makeDefaultType({
encode: function (val$$1) {
return !this.is(val$$1)
encode: function (val) {
return !this.is(val)
? undefined
: [val$$1.getFullYear(), ('0' + (val$$1.getMonth() + 1)).slice(-2), ('0' + val$$1.getDate()).slice(-2)].join('-');
: [val.getFullYear(), ('0' + (val.getMonth() + 1)).slice(-2), ('0' + val.getDate()).slice(-2)].join('-');
},
decode: function (val$$1) {
if (this.is(val$$1))
return val$$1;
var match = this.capture.exec(val$$1);
decode: function (val) {
if (this.is(val))
return val;
var match = this.capture.exec(val);
return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;
},
is: function (val$$1) { return val$$1 instanceof Date && !isNaN(val$$1.valueOf()); },
is: function (val) { return val instanceof Date && !isNaN(val.valueOf()); },
equals: function (l, r) {
return ['getFullYear', 'getMonth', 'getDate'].reduce(function (acc, fn) { return acc && l[fn]() === r[fn](); }, true);
},
@@ -2421,25 +2421,11 @@
};
// Invokes the resolve function passing the resolved dependencies as arguments
var invokeResolveFn = function (resolvedDeps) { return _this.resolveFn.apply(null, resolvedDeps); };
/**
* For RXWAIT policy:
*
* Given an observable returned from a resolve function:
* - enables .cache() mode (this allows multicast subscribers)
* - then calls toPromise() (this triggers subscribe() and thus fetches)
* - Waits for the promise, then return the cached observable (not the first emitted value).
*/
var waitForRx = function (observable$) {
var cached = observable$.cache(1);
return cached
.take(1)
.toPromise()
.then(function () { return cached; });
};
// If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.
var node = resolveContext.findNode(this);
var state = node && node.state;
var maybeWaitForRx = this.getPolicy(state).async === 'RXWAIT' ? waitForRx : identity;
var asyncPolicy = this.getPolicy(state).async;
var customAsyncPolicy = isFunction(asyncPolicy) ? asyncPolicy : identity;
// After the final value has been resolved, update the state of the Resolvable
var applyResolvedValue = function (resolvedValue) {
_this.data = resolvedValue;
@@ -2453,7 +2439,7 @@
.when()
.then(getResolvableDependencies)
.then(invokeResolveFn)
.then(maybeWaitForRx)
.then(customAsyncPolicy)
.then(applyResolvedValue));
};
/**
@@ -2674,8 +2660,8 @@
var parseUrl = function (url) {
if (!isString(url))
return false;
var root$$1 = url.charAt(0) === '^';
return { val: root$$1 ? url.substring(1) : url, root: root$$1 };
var root = url.charAt(0) === '^';
return { val: root ? url.substring(1) : url, root: root };
};
function nameBuilder(state) {
return state.name;
@@ -2690,7 +2676,7 @@
}
return state.data;
}
var getUrlBuilder = function ($urlMatcherFactoryProvider, root$$1) {
var getUrlBuilder = function ($urlMatcherFactoryProvider, root) {
return function urlBuilder(stateObject) {
var stateDec = stateObject.self;
// For future states, i.e., states whose name ends with `.**`,
@@ -2708,7 +2694,7 @@
return null;
if (!$urlMatcherFactoryProvider.isMatcher(url))
throw new Error("Invalid url '" + url + "' in state '" + stateObject + "'");
return parsed && parsed.root ? url : ((parent && parent.navigable) || root$$1()).url.append(url);
return parsed && parsed.root ? url : ((parent && parent.navigable) || root()).url.append(url);
};
};
var getNavigableBuilder = function (isRoot) {
@@ -2850,12 +2836,12 @@
function StateBuilder(matcher, urlMatcherFactory) {
this.matcher = matcher;
var self = this;
var root$$1 = function () { return matcher.find(''); };
var root = function () { return matcher.find(''); };
var isRoot = function (state) { return state.name === ''; };
function parentBuilder(state) {
if (isRoot(state))
return null;
return matcher.find(self.parentName(state)) || root$$1();
return matcher.find(self.parentName(state)) || root();
}
this.builders = {
name: [nameBuilder],
@@ -2863,7 +2849,7 @@
parent: [parentBuilder],
data: [dataBuilder],
// Build a URLMatcher if necessary, either via a relative or absolute URL
url: [getUrlBuilder(urlMatcherFactory, root$$1)],
url: [getUrlBuilder(urlMatcherFactory, root)],
// Keep track of the closest ancestor state that has a URL (i.e. is navigable)
navigable: [getNavigableBuilder(isRoot)],
params: [getParamsBuilder(urlMatcherFactory.paramFactory)],
@@ -3300,9 +3286,9 @@
/** @hidden */
StateRegistry.prototype._deregisterTree = function (state) {
var _this = this;
var all$$1 = this.get().map(function (s) { return s.$$state(); });
var all = this.get().map(function (s) { return s.$$state(); });
var getChildren = function (states) {
var _children = all$$1.filter(function (s) { return states.indexOf(s.parent) !== -1; });
var _children = all.filter(function (s) { return states.indexOf(s.parent) !== -1; });
return _children.length === 0 ? _children : _children.concat(getChildren(_children));
};
var children = getChildren([state]);
@@ -3484,7 +3470,7 @@
// Hook returned a promise
if (isPromise(result)) {
// Wait for the promise, then reprocess with the resulting value
return result.then(function (val$$1) { return _this.handleHookResult(val$$1); });
return result.then(function (val) { return _this.handleHookResult(val); });
}
trace.traceHookResult(result, this.transition, this.options);
// Hook returned false
@@ -4441,10 +4427,10 @@
return Rejection.invalid("Cannot transition to abstract state '" + state.name + "'");
}
var paramDefs = state.parameters();
var values$$1 = this.params();
var invalidParams = paramDefs.filter(function (param) { return !param.validates(values$$1[param.id]); });
var values = this.params();
var invalidParams = paramDefs.filter(function (param) { return !param.validates(values[param.id]); });
if (invalidParams.length) {
var invalidValues = invalidParams.map(function (param) { return "[" + param.id + ":" + stringify(values$$1[param.id]) + "]"; }).join(', ');
var invalidValues = invalidParams.map(function (param) { return "[" + param.id + ":" + stringify(values[param.id]) + "]"; }).join(', ');
var detail = "The following parameter values are not valid for state '" + state.name + "': " + invalidValues;
return Rejection.invalid(detail);
}
@@ -4559,7 +4545,7 @@
* @param paramFactory A [[ParamFactory]] object
* @param config A [[UrlMatcherCompileConfig]] configuration object
*/
function UrlMatcher(pattern$$1, paramTypes, paramFactory, config) {
function UrlMatcher(pattern, paramTypes, paramFactory, config) {
var _this = this;
/** @hidden */
this._cache = { path: [this] };
@@ -4572,7 +4558,7 @@
/** @hidden */
this._compiled = [];
this.config = config = defaults(config, defaultConfig);
this.pattern = pattern$$1;
this.pattern = pattern;
// Find all placeholders and create a compiled pattern, using either classic or curly syntax:
// '*' name
// ':' name
@@ -4593,9 +4579,9 @@
var matchArray;
var checkParamErrors = function (id) {
if (!UrlMatcher.nameValidator.test(id))
throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern$$1 + "'");
throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'");
if (find(_this._params, propEq('id', id)))
throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern$$1 + "'");
throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern + "'");
};
// Split into static segments separated by path parameter placeholders.
// The number of segments is always 1 more than the number of parameters.
@@ -4611,14 +4597,14 @@
return {
id: id,
regexp: regexp,
segment: pattern$$1.substring(last, m.index),
segment: pattern.substring(last, m.index),
type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp),
};
};
var details;
var segment;
// tslint:disable-next-line:no-conditional-assignment
while ((matchArray = placeholder.exec(pattern$$1))) {
while ((matchArray = placeholder.exec(pattern))) {
details = matchDetails(matchArray, false);
if (details.segment.indexOf('?') >= 0)
break; // we're into the search part
@@ -4628,7 +4614,7 @@
patterns.push([details.segment, tail(this._params)]);
last = placeholder.lastIndex;
}
segment = pattern$$1.substring(last);
segment = pattern.substring(last);
// Find any search parameter names and remove them from the last segment
var i = segment.indexOf('?');
if (i >= 0) {
@@ -4793,7 +4779,6 @@
UrlMatcher.prototype.exec = function (path, search, hash, options) {
var _this = this;
if (search === void 0) { search = {}; }
if (options === void 0) { options = {}; }
var match = memoizeTo(this._cache, 'pattern', function () {
return new RegExp([
'^',
@@ -4805,7 +4790,7 @@
if (!match)
return null;
// options = defaults(options, { isolate: false });
var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values$$1 = {};
var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values = {};
if (nPathSegments !== match.length - 1)
throw new Error("Unbalanced capture group in route '" + this.pattern + "'");
function decodePathArray(paramVal) {
@@ -4832,7 +4817,7 @@
value = decodePathArray(value);
if (isDefined(value))
value = param.type.decode(value);
values$$1[param.id] = param.value(value);
values[param.id] = param.value(value);
}
searchParams.forEach(function (param) {
var value = search[param.id];
@@ -4842,11 +4827,11 @@
}
if (isDefined(value))
value = param.type.decode(value);
values$$1[param.id] = param.value(value);
values[param.id] = param.value(value);
});
if (hash)
values$$1['#'] = hash;
return values$$1;
values['#'] = hash;
return values;
};
/**
* @hidden
@@ -4892,7 +4877,7 @@
* @returns Returns `true` if `params` validates, otherwise `false`.
*/
UrlMatcher.prototype.validates = function (params) {
var validParamVal = function (param, val$$1) { return !param || param.validates(val$$1); };
var validParamVal = function (param, val) { return !param || param.validates(val); };
params = params || {};
// I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher
var paramSchema = this.parameters().filter(function (paramDef) { return params.hasOwnProperty(paramDef.id); });
@@ -4913,8 +4898,8 @@
* @param values the values to substitute for the parameters in this pattern.
* @returns the formatted URL (path and optionally search part).
*/
UrlMatcher.prototype.format = function (values$$1) {
if (values$$1 === void 0) { values$$1 = {}; }
UrlMatcher.prototype.format = function (values) {
if (values === void 0) { values = {}; }
// Build the full path of UrlMatchers (including all parent UrlMatchers)
var urlMatchers = this._cache.path;
// Extract all the static segments and Params (processed as ParamDetails)
@@ -4937,7 +4922,7 @@
*/
function getDetails(param) {
// Normalize to typed value
var value = param.value(values$$1[param.id]);
var value = param.value(values[param.id]);
var isValid = param.validates(value);
var isDefaultValue = param.isDefaultValue(value);
// Check if we're in squash mode for the parameter
@@ -4985,13 +4970,13 @@
return;
if (!param.raw)
encoded = map(encoded, encodeURIComponent);
return encoded.map(function (val$$1) { return param.id + "=" + val$$1; });
return encoded.map(function (val) { return param.id + "=" + val; });
})
.filter(identity)
.reduce(unnestR, [])
.join('&');
// Concat the pathstring with the queryString (if exists) and the hashString (if exists)
return pathString + (queryString ? "?" + queryString : '') + (values$$1['#'] ? '#' + values$$1['#'] : '');
return pathString + (queryString ? "?" + queryString : '') + (values['#'] ? '#' + values['#'] : '');
};
/** @hidden */
UrlMatcher.nameValidator = /^\w+([-.]+\w+)*(?:\[\])?$/;
@@ -5059,13 +5044,13 @@
* @param config The config object hash.
* @returns The UrlMatcher.
*/
UrlMatcherFactory.prototype.compile = function (pattern$$1, config) {
UrlMatcherFactory.prototype.compile = function (pattern, config) {
var urlConfig = this.router.urlService.config;
// backward-compatible support for config.params -> config.state.params
var params = config && !config.state && config.params;
config = params ? __assign({ state: { params: params } }, config) : config;
var globalConfig = { strict: urlConfig._isStrictMode, caseInsensitive: urlConfig._isCaseInsensitive };
return new UrlMatcher(pattern$$1, urlConfig.paramTypes, this.paramFactory, extend(globalConfig, config));
return new UrlMatcher(pattern, urlConfig.paramTypes, this.paramFactory, extend(globalConfig, config));
};
/**
* Returns true if the specified object is a [[UrlMatcher]], or false otherwise.
@@ -5079,8 +5064,8 @@
if (!isObject(object))
return false;
var result = true;
forEach(UrlMatcher.prototype, function (val$$1, name) {
if (isFunction(val$$1))
forEach(UrlMatcher.prototype, function (val, name) {
if (isFunction(val))
result = result && (isDefined(object[name]) && isFunction(object[name]));
});
return result;
@@ -7914,11 +7899,11 @@
*/
var $q = {
/** Normalizes a value as a promise */
when: function (val$$1) { return new Promise(function (resolve, reject) { return resolve(val$$1); }); },
when: function (val) { return new Promise(function (resolve, reject) { return resolve(val); }); },
/** Normalizes a value as a promise rejection */
reject: function (val$$1) {
reject: function (val) {
return new Promise(function (resolve, reject) {
reject(val$$1);
reject(val);
});
},
/** @returns a deferred object, which has `resolve` and `reject` functions */
@@ -7938,10 +7923,10 @@
if (isObject(promises)) {
// Convert promises map to promises array.
// When each promise resolves, map it to a tuple { key: key, val: val }
var chain = Object.keys(promises).map(function (key) { return promises[key].then(function (val$$1) { return ({ key: key, val: val$$1 }); }); });
var chain = Object.keys(promises).map(function (key) { return promises[key].then(function (val) { return ({ key: key, val: val }); }); });
// Then wait for all promises to resolve, and convert them back to an object
return $q.all(chain).then(function (values$$1) {
return values$$1.reduce(function (acc, tuple) {
return $q.all(chain).then(function (values) {
return values.reduce(function (acc, tuple) {
acc[tuple.key] = tuple.val;
return acc;
}, {});
@@ -8015,10 +8000,10 @@
* @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`
*/
invoke: function (fn, context, locals) {
var all$$1 = extend({}, globals, locals || {});
var all = extend({}, globals, locals || {});
var params = $injector.annotate(fn);
var ensureExist = assertPredicate(function (key) { return all$$1.hasOwnProperty(key); }, function (key) { return "DI can't find injectable: '" + key + "'"; });
var args = params.filter(ensureExist).map(function (x) { return all$$1[x]; });
var ensureExist = assertPredicate(function (key) { return all.hasOwnProperty(key); }, function (key) { return "DI can't find injectable: '" + key + "'"; });
var args = params.filter(ensureExist).map(function (x) { return all[x]; });
if (isFunction(fn))
return fn.apply(context, args);
else
@@ -8045,15 +8030,15 @@
/** @internalapi @module vanilla */ /** */
var keyValsToObjectR = function (accum, _a) {
var key = _a[0], val$$1 = _a[1];
var key = _a[0], val = _a[1];
if (!accum.hasOwnProperty(key)) {
accum[key] = val$$1;
accum[key] = val;
}
else if (isArray(accum[key])) {
accum[key].push(val$$1);
accum[key].push(val);
}
else {
accum[key] = [accum[key], val$$1];
accum[key] = [accum[key], val];
}
return accum;
};
@@ -8078,7 +8063,7 @@
.map(function (key) {
var param = searchObject[key];
var vals = isArray(param) ? param : [param];
return vals.map(function (val$$1) { return key + '=' + val$$1; });
return vals.map(function (val) { return key + '=' + val; });
})
.reduce(unnestR, [])
.join('&');
@@ -8606,14 +8591,14 @@
}
Ng1ViewConfig.prototype.load = function () {
var _this = this;
var $q$$1 = services.$q;
var $q = services.$q;
var context = new ResolveContext(this.path);
var params = this.path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {});
var promises = {
template: $q$$1.when(this.factory.fromConfig(this.viewDecl, params, context)),
controller: $q$$1.when(this.getController(context)),
template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),
controller: $q.when(this.getController(context)),
};
return $q$$1.all(promises).then(function (results) {
return $q.all(promises).then(function (results) {
trace.traceViewServiceEvent('Loaded', _this);
_this.controller = results.controller;
extend(_this, results.template); // Either { template: "tpl" } or { component: "cmpName" }
@@ -8649,8 +8634,8 @@
'$http',
'$templateCache',
'$injector',
function ($http, $templateCache, $injector$$1) {
_this.$templateRequest = $injector$$1.has && $injector$$1.has('$templateRequest') && $injector$$1.get('$templateRequest');
function ($http, $templateCache, $injector) {
_this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');
_this.$http = $http;
_this.$templateCache = $templateCache;
return _this;
@@ -9318,16 +9303,16 @@
]; };
// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)
runBlock.$inject = ['$injector', '$q', '$uiRouter'];
function runBlock($injector$$1, $q$$1, $uiRouter) {
services.$injector = $injector$$1;
services.$q = $q$$1;
function runBlock($injector, $q, $uiRouter) {
services.$injector = $injector;
services.$q = $q;
// https://github.com/angular-ui/ui-router/issues/3678
if (!$injector$$1.hasOwnProperty('strictDi')) {
if (!$injector.hasOwnProperty('strictDi')) {
try {
$injector$$1.invoke(function (checkStrictDi) { });
$injector.invoke(function (checkStrictDi) { });
}
catch (error) {
$injector$$1.strictDi = !!/strict mode/.exec(error && error.toString());
$injector.strictDi = !!/strict mode/.exec(error && error.toString());
}
}
// The $injector is now available.
@@ -9337,7 +9322,7 @@
.map(function (x) { return x.$$state().resolvables; })
.reduce(unnestR, [])
.filter(function (x) { return x.deps === 'deferred'; })
.forEach(function (resolvable) { return (resolvable.deps = $injector$$1.annotate(resolvable.resolveFn, $injector$$1.strictDi)); });
.forEach(function (resolvable) { return (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)); });
}
// $urlRouter service and $urlRouterProvider
var getUrlRouterProvider = function (uiRouter) { return (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter)); };
@@ -9696,8 +9681,8 @@
attrs.$set(type.attr, def.href);
}
if (ref.paramExpr) {
scope.$watch(ref.paramExpr, function (val$$1) {
rawDef.uiStateParams = extend({}, val$$1);
scope.$watch(ref.paramExpr, function (val) {
rawDef.uiStateParams = extend({}, val);
update();
}, true);
rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));
@@ -10242,7 +10227,7 @@
'$uiViewScroll',
'$interpolate',
'$q',
function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q$$1) {
function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) {
function getRenderer(attrs, scope) {
return {
enter: function (element, target, cb) {
@@ -10278,7 +10263,7 @@
transclude: 'element',
compile: function (tElement, tAttrs, $transclude) {
return function (scope, $element, attrs) {
var onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(attrs, scope), inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';
var onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(), inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';
var previousEl, currentEl, currentScope, viewConfig, unregister;
var activeUIView = {
$type: 'ng1',
@@ -10337,7 +10322,7 @@
}
function updateView(config) {
var newScope = scope.$new();
var animEnter = $q$$1.defer(), animLeave = $q$$1.defer();
var animEnter = $q.defer(), animLeave = $q.defer();
var $uiViewData = {
$cfg: config,
$uiView: activeUIView,
@@ -10396,7 +10381,7 @@
];
$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];
/** @hidden */
function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q$$1, $timeout) {
function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q, $timeout) {
var getControllerAs = parse('viewDecl.controllerAs');
var getResolveAs = parse('viewDecl.resolveAs');
return {
@@ -10434,7 +10419,7 @@
// scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));
$element.data('$ngControllerController', controllerInstance);
$element.children().data('$ngControllerController', controllerInstance);
registerControllerCallbacks($q$$1, $transitions, controllerInstance, scope, cfg);
registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);
}
// Wait for the component to appear in the DOM
if (isString(cfg.component)) {
@@ -10449,7 +10434,7 @@
var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) {
if (!ctrlInstance)
return;
registerControllerCallbacks($q$$1, $transitions, ctrlInstance, scope, cfg);
registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);
deregisterWatch_1();
});
}
@@ -10463,9 +10448,9 @@
/** @hidden incrementing id */
var _uiCanExitId = 0;
/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */
function registerControllerCallbacks($q$$1, $transitions, controllerInstance, $scope, cfg) {
function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) {
// Call $onInit() ASAP
if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {
if (isFunction(controllerInstance.$onInit) && !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {
controllerInstance.$onInit();
}
var viewState = tail(cfg.path).state.self;
@@ -10500,7 +10485,7 @@
if (changedToParams.length) {
var changedKeys_1 = changedToParams.map(function (x) { return x.id; });
// Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.
var newValues = filter(toParams, function (val$$1, key) { return changedKeys_1.indexOf(key) !== -1; });
var newValues = filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; });
controllerInstance.uiOnParamsChanged(newValues, $transition$);
}
};
@@ -10519,8 +10504,8 @@
var promise;
var ids = (trans[cacheProp_1] = trans[cacheProp_1] || {});
if (!prevTruthyAnswer_1(trans)) {
promise = $q$$1.when(controllerInstance.uiCanExit(trans));
promise.then(function (val$$1) { return (ids[id_1] = val$$1 !== false); });
promise = $q.when(controllerInstance.uiCanExit(trans));
promise.then(function (val) { return (ids[id_1] = val !== false); });
}
return promise;
};
@@ -10557,171 +10542,171 @@
var index$1 = 'ui.router';
exports.default = index$1;
exports.core = index;
exports.watchDigests = watchDigests;
exports.getLocals = getLocals;
exports.getNg1ViewConfigFactory = getNg1ViewConfigFactory;
exports.ng1ViewsBuilder = ng1ViewsBuilder;
exports.Ng1ViewConfig = Ng1ViewConfig;
exports.StateProvider = StateProvider;
exports.UrlRouterProvider = UrlRouterProvider;
exports.root = root;
exports.fromJson = fromJson;
exports.toJson = toJson;
exports.forEach = forEach;
exports.extend = extend;
exports.equals = equals;
exports.identity = identity;
exports.noop = noop;
exports.createProxyFunctions = createProxyFunctions;
exports.inherit = inherit;
exports.inArray = inArray;
exports._inArray = _inArray;
exports.removeFrom = removeFrom;
exports._removeFrom = _removeFrom;
exports.pushTo = pushTo;
exports._pushTo = _pushTo;
exports.deregAll = deregAll;
exports.defaults = defaults;
exports.mergeR = mergeR;
exports.ancestors = ancestors;
exports.pick = pick;
exports.omit = omit;
exports.pluck = pluck;
exports.filter = filter;
exports.find = find;
exports.mapObj = mapObj;
exports.map = map;
exports.values = values;
exports.allTrueR = allTrueR;
exports.anyTrueR = anyTrueR;
exports.unnestR = unnestR;
exports.flattenR = flattenR;
exports.pushR = pushR;
exports.uniqR = uniqR;
exports.unnest = unnest;
exports.flatten = flatten;
exports.assertPredicate = assertPredicate;
exports.assertMap = assertMap;
exports.assertFn = assertFn;
exports.pairs = pairs;
exports.arrayTuples = arrayTuples;
exports.applyPairs = applyPairs;
exports.tail = tail;
exports.copy = copy;
exports._extend = _extend;
exports.silenceUncaughtInPromise = silenceUncaughtInPromise;
exports.silentRejection = silentRejection;
exports.makeStub = makeStub;
exports.services = services;
exports.$injector = $injector;
exports.$q = $q;
exports.BaseLocationServices = BaseLocationServices;
exports.BaseUrlRule = BaseUrlRule;
exports.BrowserLocationConfig = BrowserLocationConfig;
exports.Glob = Glob;
exports.curry = curry;
exports.compose = compose;
exports.pipe = pipe;
exports.prop = prop;
exports.propEq = propEq;
exports.parse = parse;
exports.not = not;
exports.and = and;
exports.or = or;
exports.all = all;
exports.any = any;
exports.is = is;
exports.eq = eq;
exports.val = val;
exports.invoke = invoke;
exports.pattern = pattern;
exports.isUndefined = isUndefined;
exports.isDefined = isDefined;
exports.isNull = isNull;
exports.isNullOrUndefined = isNullOrUndefined;
exports.isFunction = isFunction;
exports.isNumber = isNumber;
exports.isString = isString;
exports.isObject = isObject;
exports.isArray = isArray;
exports.isDate = isDate;
exports.isRegExp = isRegExp;
exports.isInjectable = isInjectable;
exports.isPromise = isPromise;
exports.Queue = Queue;
exports.maxLength = maxLength;
exports.padString = padString;
exports.kebobString = kebobString;
exports.functionToString = functionToString;
exports.fnToString = fnToString;
exports.stringify = stringify;
exports.beforeAfterSubstr = beforeAfterSubstr;
exports.hostRegex = hostRegex;
exports.stripLastPathElement = stripLastPathElement;
exports.splitHash = splitHash;
exports.splitQuery = splitQuery;
exports.splitEqual = splitEqual;
exports.trimHashVal = trimHashVal;
exports.splitOnDelim = splitOnDelim;
exports.joinNeighborsR = joinNeighborsR;
exports.Trace = Trace;
exports.trace = trace;
exports.HashLocationService = HashLocationService;
exports.HookBuilder = HookBuilder;
exports.MemoryLocationConfig = MemoryLocationConfig;
exports.MemoryLocationService = MemoryLocationService;
exports.NATIVE_INJECTOR_TOKEN = NATIVE_INJECTOR_TOKEN;
exports.Ng1ViewConfig = Ng1ViewConfig;
exports.Param = Param;
exports.ParamTypes = ParamTypes;
exports.StateParams = StateParams;
exports.ParamFactory = ParamFactory;
exports.ParamType = ParamType;
exports.ParamTypes = ParamTypes;
exports.PathNode = PathNode;
exports.PathUtils = PathUtils;
exports.resolvePolicies = resolvePolicies;
exports.defaultResolvePolicy = defaultResolvePolicy;
exports.PushStateLocationService = PushStateLocationService;
exports.Queue = Queue;
exports.RegisteredHook = RegisteredHook;
exports.Rejection = Rejection;
exports.Resolvable = Resolvable;
exports.NATIVE_INJECTOR_TOKEN = NATIVE_INJECTOR_TOKEN;
exports.ResolveContext = ResolveContext;
exports.resolvablesBuilder = resolvablesBuilder;
exports.StateBuilder = StateBuilder;
exports.StateObject = StateObject;
exports.StateMatcher = StateMatcher;
exports.StateObject = StateObject;
exports.StateParams = StateParams;
exports.StateProvider = StateProvider;
exports.StateQueueManager = StateQueueManager;
exports.StateRegistry = StateRegistry;
exports.StateService = StateService;
exports.TargetState = TargetState;
exports.HookBuilder = HookBuilder;
exports.matchState = matchState;
exports.RegisteredHook = RegisteredHook;
exports.makeEvent = makeEvent;
exports.Rejection = Rejection;
exports.Trace = Trace;
exports.Transition = Transition;
exports.TransitionHook = TransitionHook;
exports.TransitionEventType = TransitionEventType;
exports.defaultTransOpts = defaultTransOpts;
exports.TransitionHook = TransitionHook;
exports.TransitionService = TransitionService;
exports.UrlRules = UrlRules;
exports.UIRouter = UIRouter;
exports.UIRouterGlobals = UIRouterGlobals;
exports.UIRouterPluginBase = UIRouterPluginBase;
exports.UrlConfig = UrlConfig;
exports.UrlMatcher = UrlMatcher;
exports.ParamFactory = ParamFactory;
exports.UrlMatcherFactory = UrlMatcherFactory;
exports.UrlRouter = UrlRouter;
exports.UrlRouterProvider = UrlRouterProvider;
exports.UrlRuleFactory = UrlRuleFactory;
exports.BaseUrlRule = BaseUrlRule;
exports.UrlRules = UrlRules;
exports.UrlService = UrlService;
exports.ViewService = ViewService;
exports.UIRouterGlobals = UIRouterGlobals;
exports.UIRouter = UIRouter;
exports.$q = $q;
exports.$injector = $injector;
exports.BaseLocationServices = BaseLocationServices;
exports.HashLocationService = HashLocationService;
exports.MemoryLocationService = MemoryLocationService;
exports.PushStateLocationService = PushStateLocationService;
exports.MemoryLocationConfig = MemoryLocationConfig;
exports.BrowserLocationConfig = BrowserLocationConfig;
exports.keyValsToObjectR = keyValsToObjectR;
exports.getParams = getParams;
exports.parseUrl = parseUrl$1;
exports._extend = _extend;
exports._inArray = _inArray;
exports._pushTo = _pushTo;
exports._removeFrom = _removeFrom;
exports.all = all;
exports.allTrueR = allTrueR;
exports.ancestors = ancestors;
exports.and = and;
exports.any = any;
exports.anyTrueR = anyTrueR;
exports.applyPairs = applyPairs;
exports.arrayTuples = arrayTuples;
exports.assertFn = assertFn;
exports.assertMap = assertMap;
exports.assertPredicate = assertPredicate;
exports.beforeAfterSubstr = beforeAfterSubstr;
exports.buildUrl = buildUrl;
exports.locationPluginFactory = locationPluginFactory;
exports.servicesPlugin = servicesPlugin;
exports.compose = compose;
exports.copy = copy;
exports.core = index;
exports.createProxyFunctions = createProxyFunctions;
exports.curry = curry;
exports.default = index$1;
exports.defaultResolvePolicy = defaultResolvePolicy;
exports.defaultTransOpts = defaultTransOpts;
exports.defaults = defaults;
exports.deregAll = deregAll;
exports.eq = eq;
exports.equals = equals;
exports.extend = extend;
exports.filter = filter;
exports.find = find;
exports.flatten = flatten;
exports.flattenR = flattenR;
exports.fnToString = fnToString;
exports.forEach = forEach;
exports.fromJson = fromJson;
exports.functionToString = functionToString;
exports.getLocals = getLocals;
exports.getNg1ViewConfigFactory = getNg1ViewConfigFactory;
exports.getParams = getParams;
exports.hashLocationPlugin = hashLocationPlugin;
exports.pushStateLocationPlugin = pushStateLocationPlugin;
exports.hostRegex = hostRegex;
exports.identity = identity;
exports.inArray = inArray;
exports.inherit = inherit;
exports.invoke = invoke;
exports.is = is;
exports.isArray = isArray;
exports.isDate = isDate;
exports.isDefined = isDefined;
exports.isFunction = isFunction;
exports.isInjectable = isInjectable;
exports.isNull = isNull;
exports.isNullOrUndefined = isNullOrUndefined;
exports.isNumber = isNumber;
exports.isObject = isObject;
exports.isPromise = isPromise;
exports.isRegExp = isRegExp;
exports.isString = isString;
exports.isUndefined = isUndefined;
exports.joinNeighborsR = joinNeighborsR;
exports.kebobString = kebobString;
exports.keyValsToObjectR = keyValsToObjectR;
exports.locationPluginFactory = locationPluginFactory;
exports.makeEvent = makeEvent;
exports.makeStub = makeStub;
exports.map = map;
exports.mapObj = mapObj;
exports.matchState = matchState;
exports.maxLength = maxLength;
exports.memoryLocationPlugin = memoryLocationPlugin;
exports.UIRouterPluginBase = UIRouterPluginBase;
exports.mergeR = mergeR;
exports.ng1ViewsBuilder = ng1ViewsBuilder;
exports.noop = noop;
exports.not = not;
exports.omit = omit;
exports.or = or;
exports.padString = padString;
exports.pairs = pairs;
exports.parse = parse;
exports.parseUrl = parseUrl$1;
exports.pattern = pattern;
exports.pick = pick;
exports.pipe = pipe;
exports.pluck = pluck;
exports.prop = prop;
exports.propEq = propEq;
exports.pushR = pushR;
exports.pushStateLocationPlugin = pushStateLocationPlugin;
exports.pushTo = pushTo;
exports.removeFrom = removeFrom;
exports.resolvablesBuilder = resolvablesBuilder;
exports.resolvePolicies = resolvePolicies;
exports.root = root;
exports.services = services;
exports.servicesPlugin = servicesPlugin;
exports.silenceUncaughtInPromise = silenceUncaughtInPromise;
exports.silentRejection = silentRejection;
exports.splitEqual = splitEqual;
exports.splitHash = splitHash;
exports.splitOnDelim = splitOnDelim;
exports.splitQuery = splitQuery;
exports.stringify = stringify;
exports.stripLastPathElement = stripLastPathElement;
exports.tail = tail;
exports.toJson = toJson;
exports.trace = trace;
exports.trimHashVal = trimHashVal;
exports.uniqR = uniqR;
exports.unnest = unnest;
exports.unnestR = unnestR;
exports.val = val;
exports.values = values;
exports.watchDigests = watchDigests;
Object.defineProperty(exports, '__esModule', { value: true });
+8 -16
View File
@@ -106,8 +106,8 @@
"/** @publicapi @module state */ /** */\n\nimport { StateDeclaration, StateOrName, TargetStateDef } from './interface';\nimport { TransitionOptions } from '../transition/interface';\nimport { StateObject } from './stateObject';\nimport { isString } from '../common/predicates';\nimport { stringify } from '../common/strings';\nimport { extend } from '../common';\nimport { StateRegistry } from './stateRegistry';\nimport { RawParams } from '../params';\n\n/**\n * Encapsulate the target (destination) state/params/options of a [[Transition]].\n *\n * This class is frequently used to redirect a transition to a new destination.\n *\n * See:\n *\n * - [[HookResult]]\n * - [[TransitionHookFn]]\n * - [[TransitionService.onStart]]\n *\n * To create a `TargetState`, use [[StateService.target]].\n *\n * ---\n *\n * This class wraps:\n *\n * 1) an identifier for a state\n * 2) a set of parameters\n * 3) and transition options\n * 4) the registered state object (the [[StateDeclaration]])\n *\n * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can\n * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).\n * The `TargetState` class normalizes those options.\n *\n * A `TargetState` may be valid (the state being targeted exists in the registry)\n * or invalid (the state being targeted is not registered).\n */\nexport class TargetState {\n private _definition: StateObject;\n private _params: RawParams;\n private _options: TransitionOptions;\n\n /** Returns true if the object has a state property that might be a state or state name */\n static isDef = (obj): obj is TargetStateDef => obj && obj.state && (isString(obj.state) || isString(obj.state.name));\n\n /**\n * The TargetState constructor\n *\n * Note: Do not construct a `TargetState` manually.\n * To create a `TargetState`, use the [[StateService.target]] factory method.\n *\n * @param _stateRegistry The StateRegistry to use to look up the _definition\n * @param _identifier An identifier for a state.\n * Either a fully-qualified state name, or the object used to define the state.\n * @param _params Parameters for the target state\n * @param _options Transition options.\n *\n * @internalapi\n */\n constructor(\n private _stateRegistry: StateRegistry,\n private _identifier: StateOrName,\n _params?: RawParams,\n _options?: TransitionOptions\n ) {\n this._identifier = _identifier;\n this._params = extend({}, _params || {});\n this._options = extend({}, _options || {});\n this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative);\n }\n\n /** The name of the state this object targets */\n name(): string {\n return (this._definition && this._definition.name) || <string>this._identifier;\n }\n\n /** The identifier used when creating this TargetState */\n identifier(): StateOrName {\n return this._identifier;\n }\n\n /** The target parameter values */\n params(): RawParams {\n return this._params;\n }\n\n /** The internal state object (if it was found) */\n $state(): StateObject {\n return this._definition;\n }\n\n /** The internal state declaration (if it was found) */\n state(): StateDeclaration {\n return this._definition && this._definition.self;\n }\n\n /** The target options */\n options() {\n return this._options;\n }\n\n /** True if the target state was found */\n exists(): boolean {\n return !!(this._definition && this._definition.self);\n }\n\n /** True if the object is valid */\n valid(): boolean {\n return !this.error();\n }\n\n /** If the object is invalid, returns the reason why */\n error(): string {\n const base = <any>this.options().relative;\n if (!this._definition && !!base) {\n const stateName = base.name ? base.name : base;\n return `Could not resolve '${this.name()}' from state '${stateName}'`;\n }\n if (!this._definition) return `No such state '${this.name()}'`;\n if (!this._definition.self) return `State '${this.name()}' has an invalid definition`;\n }\n\n toString() {\n return `'${this.name()}'${stringify(this.params())}`;\n }\n\n /**\n * Returns a copy of this TargetState which targets a different state.\n * The new TargetState has the same parameter values and transition options.\n *\n * @param state The new state that should be targeted\n */\n withState(state: StateOrName): TargetState {\n return new TargetState(this._stateRegistry, state, this._params, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified parameter values.\n *\n * @param params the new parameter values to use\n * @param replace When false (default) the new parameter values will be merged with the current values.\n * When true the parameter values will be used instead of the current values.\n */\n withParams(params: RawParams, replace = false): TargetState Line truncated
"/** @internalapi @module path */ /** */\n\nimport {\n extend,\n find,\n pick,\n omit,\n tail,\n mergeR,\n values,\n unnestR,\n Predicate,\n inArray,\n arrayTuples,\n} from '../common/common';\nimport { prop, propEq, not } from '../common/hof';\n\nimport { RawParams } from '../params/interface';\nimport { TreeChanges } from '../transition/interface';\nimport { ViewConfig } from '../view/interface';\nimport { _ViewDeclaration } from '../state/interface';\n\nimport { StateObject } from '../state/stateObject';\nimport { TargetState } from '../state/targetState';\nimport { GetParamsFn, PathNode } from './pathNode';\nimport { ViewService } from '../view/view';\nimport { Param } from '../params/param';\nimport { StateRegistry } from '../state';\n\n/**\n * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n */\nexport class PathUtils {\n /** Given a PathNode[], create an TargetState */\n static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState {\n const state = tail(path).state;\n return new TargetState(registry, state, path.map(prop('paramValues')).reduce(mergeR, {}), {});\n }\n\n static buildPath(targetState: TargetState) {\n const toParams = targetState.params();\n return targetState.$state().path.map(state => new PathNode(state).applyRawParams(toParams));\n }\n\n /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[] {\n const toPath: PathNode[] = PathUtils.buildPath(targetState);\n if (targetState.options().inherit) {\n return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n }\n return toPath;\n }\n\n /**\n * Creates ViewConfig objects and adds to nodes.\n *\n * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n */\n static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]) {\n // Only apply the viewConfigs to the nodes for the given states\n path\n .filter(node => inArray(states, node.state))\n .forEach(node => {\n const viewDecls: _ViewDeclaration[] = values(node.state.views || {});\n const subPath = PathUtils.subPath(path, n => n === node);\n const viewConfigs: ViewConfig[][] = viewDecls.map(view => $view.createViewConfig(subPath, view));\n node.views = viewConfigs.reduce(unnestR, []);\n });\n }\n\n /**\n * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n *\n * For a parameter in a node to be inherited from the from path:\n * - The toPath's node must have a matching node in the fromPath (by state).\n * - The parameter name must not be found in the toKeys parameter array.\n *\n * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n * it is not inherited from the fromPath.\n */\n static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys: string[] = []): PathNode[] {\n function nodeParamVals(path: PathNode[], state: StateObject): RawParams {\n const node: PathNode = find(path, propEq('state', state));\n return extend({}, node && node.paramValues);\n }\n\n const noInherit = fromPath\n .map(node => node.paramSchema)\n .reduce(unnestR, [])\n .filter(param => !param.inherit)\n .map(prop('id'));\n\n /**\n * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n */\n function makeInheritedParamsNode(toNode: PathNode): PathNode {\n // All param values for the node (may include default key/vals, when key was not found in toParams)\n let toParamVals = extend({}, toNode && toNode.paramValues);\n // limited to only those keys found in toParams\n const incomingParamVals = pick(toParamVals, toKeys);\n toParamVals = omit(toParamVals, toKeys);\n const fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit);\n // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n const ownParamVals: RawParams = extend(toParamVals, fromParamVals, incomingParamVals);\n return new PathNode(toNode.state).applyRawParams(ownParamVals);\n }\n\n // The param keys specified by the incoming toParams\n return <PathNode[]>toPath.map(makeInheritedParamsNode);\n }\n\n static nonDynamicParams = (node: PathNode): Param[] =>\n node.state.parameters({ inherit: false }).filter(param => !param.dynamic);\n\n /**\n * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n */\n static Line truncated
"/** @internalapi @module path */ /** */\nexport * from './pathNode';\nexport * from './pathUtils';\n",
"/**\n * # The Resolve subsystem\n *\n * This subsystem is an asynchronous, hierarchical Dependency Injection system.\n *\n * Typically, resolve is configured on a state using a [[StateDeclaration.resolve]] declaration.\n *\n * @publicapi @module resolve\n */ /** */\nimport { Resolvable } from './resolvable';\n\n/**\n * An interface which is similar to an Angular 2 `Provider`\n */\nexport interface ProviderLike {\n provide: any;\n useClass?: any;\n useFactory?: Function;\n useValue?: any;\n useExisting?: any;\n deps?: any[];\n}\n\n/**\n * A plain object used to describe a [[Resolvable]]\n *\n * These objects may be used in the [[StateDeclaration.resolve]] array to declare\n * async data that the state or substates require.\n *\n * #### Example:\n * ```js\n *\n * var state = {\n * name: 'main',\n * resolve: [\n * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() },\n * ],\n * }\n * ```\n */\nexport interface ResolvableLiteral {\n /**\n * A Dependency Injection token\n *\n * This Resolvable's DI token.\n * The Resolvable will be injectable elsewhere using the token.\n */\n token: any;\n\n /**\n * A function which fetches the Resolvable's data\n *\n * A function which returns one of:\n *\n * - The resolved value (synchronously)\n * - A promise for the resolved value\n * - An Observable of the resolved value(s)\n *\n * This function will be provided the dependencies listed in [[deps]] as its arguments.\n * The resolve system will asynchronously fetch the dependencies before invoking this function.\n */\n resolveFn: Function;\n\n /**\n * Defines the Resolve Policy\n *\n * A policy that defines when to invoke the resolve,\n * and whether to wait for async and unwrap the data\n */\n policy?: ResolvePolicy;\n\n /**\n * The Dependency Injection tokens\n *\n * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]].\n *\n * The DI tokens are references to other `Resolvables`, or to other\n * services from the native DI system.\n */\n deps?: any[];\n\n /** Pre-resolved data. */\n data?: any;\n}\n\n/**\n * Defines how a resolve is processed during a transition\n *\n * This object is the [[StateDeclaration.resolvePolicy]] property.\n *\n * #### Example:\n * ```js\n * // Fetched when the resolve's state is being entered.\n * // Wait for the promise to resolve.\n * var policy1 = { when: \"LAZY\", async: \"WAIT\" }\n *\n * // Fetched when the Transition is starting.\n * // Do not wait for the returned promise to resolve.\n * // Inject the raw promise/value\n * var policy2 = { when: \"EAGER\", async: \"NOWAIT\" }\n * ```\n *\n * The policy for a given Resolvable is merged from three sources (highest priority first):\n *\n * - 1) Individual resolve definition\n * - 2) State definition\n * - 3) Global default\n *\n * #### Example:\n * ```js\n * // Wait for an Observable to emit one item.\n * // Since `wait` is not specified, it uses the `wait`\n * // policy defined on the state, or the global default\n * // if no `wait` policy is defined on the state\n * var myResolvablePolicy = { async: \"RXWAIT\" }\n * ```\n */\nexport interface ResolvePolicy {\n /**\n * Defines when a Resolvable is resolved (fetched) during a transition\n *\n * - `LAZY` (default)\n * - Resolved as the resolve's state is being entered\n * - `EAGER`\n * - Resolved as the transition is starting\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched when each state is entered.\n * All of `main` resolves are processed before fetching `main.home` resolves.\n * ```js\n * var state = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n *\n * var state = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n * ```\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched at the same time when the transition starts.\n * This happens earlier in the lifecycle than when states are entered.\n * All of the `main` and `main.home` resolves are fetched as soon as possible.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n *\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n * ```\n */\n when?: PolicyWhen;\n\n /**\n * Determines the unwrapping behavior of asynchronous resolve values.\n *\n * - `WAIT` (default)\n * - If a promise is returned from the resolveFn, wait for the promise before proceeding\n * - The unwrapped value from the promise\n * - `NOWAIT`\n * - If a promise is returned from the resolve, do not wait for the promise.\n Line truncated
"/** @publicapi @module resolve */ /** */\nimport { extend, equals, inArray, identity } from '../common/common';\nimport { services } from '../common/coreservices';\nimport { trace } from '../common/trace';\nimport { ResolvePolicy, ResolvableLiteral, resolvePolicies } from './interface';\n\nimport { ResolveContext } from './resolveContext';\nimport { stringify } from '../common/strings';\nimport { isFunction, isObject } from '../common/predicates';\nimport { Transition } from '../transition/transition';\nimport { StateObject } from '../state/stateObject';\nimport { PathNode } from '../path/pathNode';\nimport { isNullOrUndefined } from '../common/predicates';\n\n// TODO: explicitly make this user configurable\nexport let defaultResolvePolicy: ResolvePolicy = {\n when: 'LAZY',\n async: 'WAIT',\n};\n\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nexport class Resolvable implements ResolvableLiteral {\n token: any;\n policy: ResolvePolicy;\n resolveFn: Function;\n deps: any[];\n\n data: any;\n resolved = false;\n promise: Promise<any> = undefined;\n\n static fromData = (token: any, data: any) => new Resolvable(token, () => data, null, null, data);\n\n /** This constructor creates a Resolvable copy */\n constructor(resolvable: Resolvable);\n\n /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */\n constructor(resolvable: ResolvableLiteral);\n\n /**\n * This constructor creates a new `Resolvable`\n *\n * #### Example:\n * ```js\n * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);\n *\n * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);\n *\n * var resolvable1Clone = new Resolvable(resolvable1);\n * ```\n *\n * @param token The new resolvable's injection token, such as `\"userList\"` (a string) or `UserService` (a class).\n * When this token is used during injection, the resolved value will be injected.\n * @param resolveFn The function that returns the resolved value, or a promise for the resolved value\n * @param deps An array of dependencies, which will be injected into the `resolveFn`\n * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed\n * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.\n */\n constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any);\n constructor(arg1: any, resolveFn?: Function, deps?: any[], policy?: ResolvePolicy, data?: any) {\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n } else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1)) throw new Error('new Resolvable(): token argument is required');\n if (!isFunction(resolveFn)) throw new Error('new Resolvable(): resolveFn argument must be a function');\n\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n } else if (isObject(arg1) && arg1.token && (arg1.hasOwnProperty('resolveFn') || arg1.hasOwnProperty('data'))) {\n const literal = <ResolvableLiteral>arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n\n getPolicy(state: StateObject): ResolvePolicy {\n const thisPolicy = this.policy || {};\n const statePolicy = (state && state.resolvePolicy) || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n }\n\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n resolve(resolveContext: ResolveContext, trans?: Transition) {\n const $q = services.$q;\n\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n const getResolvableDependencies = () =>\n $q.all(resolveContext.getDependencies(this).map(resolvable => resolvable.get(resolveContext, trans))) as Promise<\n any[Line truncated
"/**\n * # The Resolve subsystem\n *\n * This subsystem is an asynchronous, hierarchical Dependency Injection system.\n *\n * Typically, resolve is configured on a state using a [[StateDeclaration.resolve]] declaration.\n *\n * @publicapi @module resolve\n */ /** */\nimport { Resolvable } from './resolvable';\n\n/**\n * An interface which is similar to an Angular 2 `Provider`\n */\nexport interface ProviderLike {\n provide: any;\n useClass?: any;\n useFactory?: Function;\n useValue?: any;\n useExisting?: any;\n deps?: any[];\n}\n\n/**\n * A plain object used to describe a [[Resolvable]]\n *\n * These objects may be used in the [[StateDeclaration.resolve]] array to declare\n * async data that the state or substates require.\n *\n * #### Example:\n * ```js\n *\n * var state = {\n * name: 'main',\n * resolve: [\n * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() },\n * ],\n * }\n * ```\n */\nexport interface ResolvableLiteral {\n /**\n * A Dependency Injection token\n *\n * This Resolvable's DI token.\n * The Resolvable will be injectable elsewhere using the token.\n */\n token: any;\n\n /**\n * A function which fetches the Resolvable's data\n *\n * A function which returns one of:\n *\n * - The resolved value (synchronously)\n * - A promise for the resolved value\n * - An Observable of the resolved value(s)\n *\n * This function will be provided the dependencies listed in [[deps]] as its arguments.\n * The resolve system will asynchronously fetch the dependencies before invoking this function.\n */\n resolveFn: Function;\n\n /**\n * Defines the Resolve Policy\n *\n * A policy that defines when to invoke the resolve,\n * and whether to wait for async and unwrap the data\n */\n policy?: ResolvePolicy;\n\n /**\n * The Dependency Injection tokens\n *\n * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]].\n *\n * The DI tokens are references to other `Resolvables`, or to other\n * services from the native DI system.\n */\n deps?: any[];\n\n /** Pre-resolved data. */\n data?: any;\n}\n\n/**\n * Defines how a resolve is processed during a transition\n *\n * This object is the [[StateDeclaration.resolvePolicy]] property.\n *\n * #### Example:\n * ```js\n * // Fetched when the resolve's state is being entered.\n * // Wait for the promise to resolve.\n * var policy1 = { when: \"LAZY\", async: \"WAIT\" }\n *\n * // Fetched when the Transition is starting.\n * // Do not wait for the returned promise to resolve.\n * // Inject the raw promise/value\n * var policy2 = { when: \"EAGER\", async: \"NOWAIT\" }\n * ```\n *\n * The policy for a given Resolvable is merged from three sources (highest priority first):\n *\n * - 1) Individual resolve definition\n * - 2) State definition\n * - 3) Global default\n *\n * #### Example:\n * ```js\n * // Wait for an Observable to emit one item.\n * // Since `wait` is not specified, it uses the `wait`\n * // policy defined on the state, or the global default\n * // if no `wait` policy is defined on the state\n * var myResolvablePolicy = { async: \"RXWAIT\" }\n * ```\n */\nexport interface ResolvePolicy {\n /**\n * Defines when a Resolvable is resolved (fetched) during a transition\n *\n * - `LAZY` (default)\n * - Resolved as the resolve's state is being entered\n * - `EAGER`\n * - Resolved as the transition is starting\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched when each state is entered.\n * All of `main` resolves are processed before fetching `main.home` resolves.\n * ```js\n * var state = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n *\n * var state = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n * ```\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched at the same time when the transition starts.\n * This happens earlier in the lifecycle than when states are entered.\n * All of the `main` and `main.home` resolves are fetched as soon as possible.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n *\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n * ```\n */\n when?: PolicyWhen;\n\n /**\n * Determines the unwrapping behavior of asynchronous resolve values.\n *\n * - `WAIT` (default)\n * - If a promise is returned from the resolveFn, wait for the promise before proceeding\n * - The unwrapped value from the promise\n * - `NOWAIT`\n * - If a promise is returned from the resolve, do not wait for the promise.\n Line truncated
"/** @publicapi @module resolve */ /** */\nimport { extend, identity } from '../common/common';\nimport { services } from '../common/coreservices';\nimport { trace } from '../common/trace';\nimport { ResolvePolicy, ResolvableLiteral, PolicyAsync } from './interface';\n\nimport { ResolveContext } from './resolveContext';\nimport { stringify } from '../common/strings';\nimport { isFunction, isObject } from '../common/predicates';\nimport { Transition } from '../transition/transition';\nimport { StateObject } from '../state/stateObject';\nimport { PathNode } from '../path/pathNode';\nimport { isNullOrUndefined } from '../common/predicates';\n\n// TODO: explicitly make this user configurable\nexport let defaultResolvePolicy: ResolvePolicy = {\n when: 'LAZY',\n async: 'WAIT',\n};\n\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nexport class Resolvable implements ResolvableLiteral {\n token: any;\n policy: ResolvePolicy;\n resolveFn: Function;\n deps: any[];\n\n data: any;\n resolved = false;\n promise: Promise<any> = undefined;\n\n static fromData = (token: any, data: any) => new Resolvable(token, () => data, null, null, data);\n\n /** This constructor creates a Resolvable copy */\n constructor(resolvable: Resolvable);\n\n /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */\n constructor(resolvable: ResolvableLiteral);\n\n /**\n * This constructor creates a new `Resolvable`\n *\n * #### Example:\n * ```js\n * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);\n *\n * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);\n *\n * var resolvable1Clone = new Resolvable(resolvable1);\n * ```\n *\n * @param token The new resolvable's injection token, such as `\"userList\"` (a string) or `UserService` (a class).\n * When this token is used during injection, the resolved value will be injected.\n * @param resolveFn The function that returns the resolved value, or a promise for the resolved value\n * @param deps An array of dependencies, which will be injected into the `resolveFn`\n * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed\n * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.\n */\n constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any);\n constructor(arg1: any, resolveFn?: Function, deps?: any[], policy?: ResolvePolicy, data?: any) {\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n } else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1)) throw new Error('new Resolvable(): token argument is required');\n if (!isFunction(resolveFn)) throw new Error('new Resolvable(): resolveFn argument must be a function');\n\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n } else if (isObject(arg1) && arg1.token && (arg1.hasOwnProperty('resolveFn') || arg1.hasOwnProperty('data'))) {\n const literal = <ResolvableLiteral>arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n\n getPolicy(state: StateObject): ResolvePolicy {\n const thisPolicy = this.policy || {};\n const statePolicy = (state && state.resolvePolicy) || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n }\n\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n resolve(resolveContext: ResolveContext, trans?: Transition) {\n const $q = services.$q;\n\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n const getResolvableDependencies = () =>\n $q.all(resolveContext.getDependencies(this).map(resolvable => resolvable.get(resolveContext, trans))) as Promise<\n any[]\n >;\n\n //Line truncated
"/** @publicapi @module resolve */ /** */\nimport { find, tail, uniqR, unnestR, inArray } from '../common/common';\nimport { propEq, not } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services, $InjectorLike } from '../common/coreservices';\nimport { resolvePolicies, PolicyWhen, ResolvePolicy } from './interface';\nimport { PathNode } from '../path/pathNode';\nimport { Resolvable } from './resolvable';\nimport { StateObject } from '../state/stateObject';\nimport { PathUtils } from '../path/pathUtils';\nimport { stringify } from '../common/strings';\nimport { Transition } from '../transition/transition';\nimport { UIInjector } from '../interface';\nimport { isUndefined } from '../common';\n\nconst whens = resolvePolicies.when;\nconst ALL_WHENS = [whens.EAGER, whens.LAZY];\nconst EAGER_WHENS = [whens.EAGER];\n\n// tslint:disable-next-line:no-inferrable-types\nexport const NATIVE_INJECTOR_TOKEN: string = 'Native Injector';\n\n/**\n * Encapsulates Dependency Injection for a path of nodes\n *\n * UI-Router states are organized as a tree.\n * A nested state has a path of ancestors to the root of the tree.\n * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n *\n * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n */\nexport class ResolveContext {\n _injector: UIInjector;\n\n constructor(private _path: PathNode[]) {}\n\n /** Gets all the tokens found in the resolve context, de-duplicated */\n getTokens(): any[] {\n return this._path.reduce((acc, node) => acc.concat(node.resolvables.map(r => r.token)), []).reduce(uniqR, []);\n }\n\n /**\n * Gets the Resolvable that matches the token\n *\n * Gets the last Resolvable that matches the token in this context, or undefined.\n * Throws an error if it doesn't exist in the ResolveContext\n */\n getResolvable(token: any): Resolvable {\n const matching = this._path\n .map(node => node.resolvables)\n .reduce(unnestR, [])\n .filter((r: Resolvable) => r.token === token);\n return tail(matching);\n }\n\n /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */\n getPolicy(resolvable: Resolvable): ResolvePolicy {\n const node = this.findNode(resolvable);\n return resolvable.getPolicy(node.state);\n }\n\n /**\n * Returns a ResolveContext that includes a portion of this one\n *\n * Given a state, this method creates a new ResolveContext from this one.\n * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n *\n * #### Why\n *\n * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n * This method is used to create a narrower context when injecting ancestor nodes.\n *\n * @example\n * `let ABCD = new ResolveContext([A, B, C, D]);`\n *\n * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n * However, `B` should only be able to access resolvables from `A`, `B`.\n *\n * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n * `let AB = ABCD.subcontext(a)`\n */\n subContext(state: StateObject): ResolveContext {\n return new ResolveContext(PathUtils.subPath(this._path, node => node.state === state));\n }\n\n /**\n * Adds Resolvables to the node that matches the state\n *\n * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n * The resolvable is added to the node matching the `state` parameter.\n *\n * These new resolvables are not automatically fetched.\n * The calling code should either fetch them, fetch something that depends on them,\n * or rely on [[resolvePath]] being called when some state is being entered.\n *\n * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n *\n * @param newResolvables the new Resolvables\n * @param state Used to find the node to put the resolvable on\n */\n addResolvables(newResolvables: Resolvable[], state: StateObject) {\n const node = <PathNode>find(this._path, propEq('state', state));\n const keys = newResolvables.map(r => r.token);\n node.resolvables = node.resolvables.filter(r => keys.indexOf(r.token) === -1).concat(newResolvables);\n }\n\n /**\n * Returns a promise for an array of resolved path Element promises\n *\n * @param when\n * @param traLine truncated
"/** @publicapi @module resolve */ /** */\nexport * from './interface';\nexport * from './resolvable';\nexport * from './resolveContext';\n",
"/** @publicapi @module state */ /** */\nimport { applyPairs, extend, identity, inherit, mapObj, noop, Obj, omit, tail, values, copy } from '../common/common';\nimport { isArray, isDefined, isFunction, isString } from '../common/predicates';\nimport { stringify } from '../common/strings';\nimport { is, pattern, pipe, prop, val } from '../common/hof';\nimport { StateDeclaration } from './interface';\n\nimport { StateObject } from './stateObject';\nimport { StateMatcher } from './stateMatcher';\nimport { Param } from '../params/param';\nimport { UrlMatcherFactory } from '../url/urlMatcherFactory';\nimport { UrlMatcher } from '../url/urlMatcher';\nimport { Resolvable } from '../resolve/resolvable';\nimport { services } from '../common/coreservices';\nimport { ResolvePolicy } from '../resolve/interface';\nimport { ParamDeclaration } from '../params';\nimport { ParamFactory } from '../url';\n\nconst parseUrl = (url: string): any => {\n if (!isString(url)) return false;\n const root = url.charAt(0) === '^';\n return { val: root ? url.substring(1) : url, root };\n};\n\nexport type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any;\n\ninterface Builders {\n [key: string]: BuilderFunction[];\n\n name: BuilderFunction[];\n parent: BuilderFunction[];\n data: BuilderFunction[];\n url: BuilderFunction[];\n navigable: BuilderFunction[];\n params: BuilderFunction[];\n views: BuilderFunction[];\n path: BuilderFunction[];\n includes: BuilderFunction[];\n resolvables: BuilderFunction[];\n}\n\nfunction nameBuilder(state: StateObject) {\n return state.name;\n}\n\nfunction selfBuilder(state: StateObject) {\n state.self.$$state = () => state;\n return state.self;\n}\n\nfunction dataBuilder(state: StateObject) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n}\n\nconst getUrlBuilder = ($urlMatcherFactoryProvider: UrlMatcherFactory, root: () => StateObject) =>\n function urlBuilder(stateObject: StateObject) {\n let stateDec: StateDeclaration = stateObject.self;\n\n // For future states, i.e., states whose name ends with `.**`,\n // match anything that starts with the url prefix\n if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\\.\\*\\*$/)) {\n const newStateDec: StateDeclaration = {};\n copy(stateDec, newStateDec);\n newStateDec.url += '{remainder:any}'; // match any path (.*)\n stateDec = newStateDec;\n }\n\n const parent = stateObject.parent;\n const parsed = parseUrl(stateDec.url);\n const url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, { state: stateDec });\n\n if (!url) return null;\n if (!$urlMatcherFactoryProvider.isMatcher(url)) throw new Error(`Invalid url '${url}' in state '${stateObject}'`);\n return parsed && parsed.root ? url : ((parent && parent.navigable) || root()).url.append(<UrlMatcher>url);\n };\n\nconst getNavigableBuilder = (isRoot: (state: StateObject) => boolean) =>\n function navigableBuilder(state: StateObject) {\n return !isRoot(state) && state.url ? state : state.parent ? state.parent.navigable : null;\n };\n\nconst getParamsBuilder = (paramFactory: ParamFactory) =>\n function paramsBuilder(state: StateObject): { [key: string]: Param } {\n const makeConfigParam = (config: ParamDeclaration, id: string) => paramFactory.fromConfig(id, null, state.self);\n const urlParams: Param[] = (state.url && state.url.parameters({ inherit: false })) || [];\n const nonUrlParams: Param[] = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam));\n return urlParams\n .concat(nonUrlParams)\n .map(p => [p.id, p])\n .reduce(applyPairs, {});\n };\n\nfunction pathBuilder(state: StateObject) {\n return state.parent ? state.parent.path.concat(state) : /*root*/ [state];\n}\n\nfunction includesBuilder(state: StateObject) {\n const includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n}\n\n/**\n * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * validates the `resolve` property and converts it to a [[Resolvable]] array.\n *\n * resolve: input value can be:\n *\n * {\n * // analyzed but not injected\n * myFooResolve: function() { return \"myFooData\"; },\n *\n * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n *\n * // Array split; \"DependencyName\" dep as string\n * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n *\n * // Array split; DependencyType dep as token (compared using ===)\n * myQuxResolve: [ DependeLine truncated
@@ -115,7 +115,7 @@
"/** @publicapi @module state */ /** */\nimport { isString } from '../common/predicates';\nimport { StateOrName } from './interface';\nimport { StateObject } from './stateObject';\nimport { values } from '../common/common';\n\nexport class StateMatcher {\n constructor(private _states: { [key: string]: StateObject }) {}\n\n isRelative(stateName: string) {\n stateName = stateName || '';\n return stateName.indexOf('.') === 0 || stateName.indexOf('^') === 0;\n }\n\n find(stateOrName: StateOrName, base?: StateOrName, matchGlob = true): StateObject {\n if (!stateOrName && stateOrName !== '') return undefined;\n const isStr = isString(stateOrName);\n let name: string = isStr ? stateOrName : (<any>stateOrName).name;\n\n if (this.isRelative(name)) name = this.resolvePath(name, base);\n const state = this._states[name];\n\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n } else if (isStr && matchGlob) {\n const _states = values(this._states);\n const matches = _states.filter(\n _state => _state.__stateObjectCache.nameGlob && _state.__stateObjectCache.nameGlob.matches(name)\n );\n\n if (matches.length > 1) {\n // tslint:disable-next-line:no-console\n console.log(\n `stateMatcher.find: Found multiple matches for ${name} using glob: `,\n matches.map(match => match.name)\n );\n }\n return matches[0];\n }\n return undefined;\n }\n\n resolvePath(name: string, base: StateOrName) {\n if (!base) throw new Error(`No reference point given for path '${name}'`);\n\n const baseState: StateObject = this.find(base);\n\n const splitName = name.split('.');\n const pathLength = splitName.length;\n let i = 0,\n current = baseState;\n\n for (; i < pathLength; i++) {\n if (splitName[i] === '' && i === 0) {\n current = baseState;\n continue;\n }\n if (splitName[i] === '^') {\n if (!current.parent) throw new Error(`Path '${name}' not valid for state '${baseState.name}'`);\n current = current.parent;\n continue;\n }\n break;\n }\n const relName = splitName.slice(i).join('.');\n return current.name + (current.name && relName ? '.' : '') + relName;\n }\n}\n",
"/** @publicapi @module state */ /** */\nimport { inArray, isString, prop } from '../common';\nimport { _StateDeclaration } from './interface';\nimport { StateObject } from './stateObject';\nimport { StateBuilder } from './stateBuilder';\nimport { StateRegistryListener } from './stateRegistry';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\n\n/** @internalapi */\nexport class StateQueueManager implements Disposable {\n queue: StateObject[] = [];\n\n constructor(\n private router: UIRouter,\n public states: { [key: string]: StateObject },\n public builder: StateBuilder,\n public listeners: StateRegistryListener[]\n ) {}\n\n /** @internalapi */\n dispose() {\n this.queue = [];\n }\n\n register(stateDecl: _StateDeclaration) {\n const queue = this.queue;\n const state = StateObject.create(stateDecl);\n const name = state.name;\n\n if (!isString(name)) throw new Error('State must have a valid name');\n if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name))\n throw new Error(`State '${name}' is already defined`);\n\n queue.push(state);\n this.flush();\n\n return state;\n }\n\n flush() {\n const { queue, states, builder } = this;\n const registered: StateObject[] = [], // states that got registered\n orphans: StateObject[] = [], // states that don't yet have a parent registered\n previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered\n const getState = name => this.states.hasOwnProperty(name) && this.states[name];\n const notifyListeners = () => {\n if (registered.length) {\n this.listeners.forEach(listener => listener('registered', registered.map(s => s.self)));\n }\n };\n\n while (queue.length > 0) {\n const state: StateObject = queue.shift();\n const name = state.name;\n const result: StateObject = builder.build(state);\n const orphanIdx: number = orphans.indexOf(state);\n\n if (result) {\n const existingState = getState(name);\n if (existingState && existingState.name === name) {\n throw new Error(`State '${name}' is already defined`);\n }\n\n const existingFutureState = getState(name + '.**');\n if (existingFutureState) {\n // Remove future state of the same name\n this.router.stateRegistry.deregister(existingFutureState);\n }\n\n states[name] = state;\n this.attachRoute(state);\n if (orphanIdx >= 0) orphans.splice(orphanIdx, 1);\n registered.push(state);\n continue;\n }\n\n const prev = previousQueueLength[name];\n previousQueueLength[name] = queue.length;\n if (orphanIdx >= 0 && prev === queue.length) {\n // Wait until two consecutive iterations where no additional states were dequeued successfully.\n // throw new Error(`Cannot register orphaned state '${name}'`);\n queue.push(state);\n notifyListeners();\n return states;\n } else if (orphanIdx < 0) {\n orphans.push(state);\n }\n\n queue.push(state);\n }\n\n notifyListeners();\n return states;\n }\n\n attachRoute(state: StateObject) {\n if (state.abstract || !state.url) return;\n const rulesApi = this.router.urlService.rules;\n rulesApi.rule(rulesApi.urlRuleFactory.create(state));\n }\n}\n",
"/** @publicapi @module state */ /** */\n\nimport { StateObject } from './stateObject';\nimport { StateMatcher } from './stateMatcher';\nimport { StateBuilder } from './stateBuilder';\nimport { StateQueueManager } from './stateQueueManager';\nimport { StateDeclaration, _StateDeclaration } from './interface';\nimport { BuilderFunction } from './stateBuilder';\nimport { StateOrName } from './interface';\nimport { removeFrom } from '../common/common';\nimport { UIRouter } from '../router';\nimport { propEq } from '../common/hof';\n\n/**\n * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].\n *\n * This callback receives two parameters:\n *\n * @param event a string; either \"registered\" or \"deregistered\"\n * @param states the list of [[StateDeclaration]]s that were registered (or deregistered).\n */\nexport type StateRegistryListener = (event: 'registered' | 'deregistered', states: StateDeclaration[]) => void;\n\nexport class StateRegistry {\n private _root: StateObject;\n private states: { [key: string]: StateObject } = {};\n\n matcher: StateMatcher;\n private builder: StateBuilder;\n stateQueue: StateQueueManager;\n\n listeners: StateRegistryListener[] = [];\n\n /** @internalapi */\n constructor(private router: UIRouter) {\n this.matcher = new StateMatcher(this.states);\n this.builder = new StateBuilder(this.matcher, router.urlMatcherFactory);\n this.stateQueue = new StateQueueManager(router, this.states, this.builder, this.listeners);\n this._registerRoot();\n }\n\n /** @internalapi */\n private _registerRoot() {\n const rootStateDef: StateDeclaration = {\n name: '',\n url: '^',\n views: null,\n params: {\n '#': { value: null, type: 'hash', dynamic: true },\n },\n abstract: true,\n };\n\n const _root = (this._root = this.stateQueue.register(rootStateDef));\n _root.navigable = null;\n }\n\n /** @internalapi */\n dispose() {\n this.stateQueue.dispose();\n this.listeners = [];\n this.get().forEach(state => this.get(state) && this.deregister(state));\n }\n\n /**\n * Listen for a State Registry events\n *\n * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.\n *\n * #### Example:\n * ```js\n * let allStates = registry.get();\n *\n * // Later, invoke deregisterFn() to remove the listener\n * let deregisterFn = registry.onStatesChanged((event, states) => {\n * switch(event) {\n * case: 'registered':\n * states.forEach(state => allStates.push(state));\n * break;\n * case: 'deregistered':\n * states.forEach(state => {\n * let idx = allStates.indexOf(state);\n * if (idx !== -1) allStates.splice(idx, 1);\n * });\n * break;\n * }\n * });\n * ```\n *\n * @param listener a callback function invoked when the registered states changes.\n * The function receives two parameters, `event` and `state`.\n * See [[StateRegistryListener]]\n * @return a function that deregisters the listener\n */\n onStatesChanged(listener: StateRegistryListener): () => void {\n this.listeners.push(listener);\n return function deregisterListener() {\n removeFrom(this.listeners)(listener);\n }.bind(this);\n }\n\n /**\n * Gets the implicit root state\n *\n * Gets the root of the state tree.\n * The root state is implicitly created by UI-Router.\n * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]\n *\n * @return the root [[StateObject]]\n */\n root() {\n return this._root;\n }\n\n /**\n * Adds a state to the registry\n *\n * Registers a [[StateDeclaration]] or queues it for registration.\n *\n * Note: a state will be queued if the state's parent isn't yet registered.\n *\n * @param stateDefinition the definition of the state to register.\n * @returns the internal [[StateObject]] object.\n * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).\n * If the state was only queued, then the object is not fully built.\n */\n register(stateDefinition: _StateDeclaration): StateObject {\n return this.stateQueue.register(stateDefinition);\n }\n\n /** @hidden */\n private _deregisterTree(state: StateObject) {\n const all = this.get().map(s => s.$$state());\n const getChildren = (states: StateObject[]) => {\n const _children = all.filter(s => states.indexOf(s.parent) !== -1);\n return _children.length === 0 ? _children : _children.concat(getChildren(_children));\n };\n\n const children = getChildren([state]);\n const deregistered: StateObject[] = [state].concat(children).reverse();\n\n deregistered.forEach(_state => {\n const rulesApi = this.router.urlService.rules;\n\n // Remove URL rule\n rulesApi\n .rules()\n .filter(propEq('stateLine truncated
"/** @publicapi @module transition */ /** */\nimport { StateDeclaration } from '../state/interface';\nimport { PredicateBinary } from '../common/common';\n\nimport { Transition } from './transition';\nimport { StateObject } from '../state/stateObject';\nimport { PathNode } from '../path/pathNode';\nimport { TargetState } from '../state/targetState';\nimport { RegisteredHook } from './hookRegistry';\n\n/**\n * The TransitionOptions object can be used to change the behavior of a transition.\n *\n * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]].\n * It can also be used with a `uiSref`.\n */\nexport interface TransitionOptions {\n /**\n * This option changes how the Transition interacts with the browser's location bar (URL).\n *\n * - If `true`, it will update the url in the location bar.\n * - If `false`, it will not update the url in the location bar.\n * - If it is the string `\"replace\"`, it will update the url and also replace the last history record.\n *\n * @default `true`\n */\n location?: boolean | string;\n\n /**\n * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from.\n * @default `$state.current`\n */\n relative?: string | StateDeclaration | StateObject;\n\n /**\n * This option sets whether or not the transition's parameter values should be inherited from\n * the current parameter values.\n *\n * - If `true`, it will inherit parameter values from the current parameter values.\n * - If `false`, only the parameters which are provided to `transitionTo` will be used.\n *\n * @default `false`\n */\n inherit?: boolean;\n\n /**\n * @deprecated\n */\n notify?: boolean;\n\n /**\n * This option may be used to force states which are currently active to reload.\n *\n * During a normal transition, a state is \"retained\" if:\n * - It was previously active\n * - The state's parameter values have not changed\n * - All the parent states' parameter values have not changed\n *\n * Forcing a reload of a state will cause it to be exited and entered, which will:\n * - Refetch that state's resolve data\n * - Exit the state (onExit hook)\n * - Re-enter the state (onEnter hook)\n * - Re-render the views (controllers and templates)\n *\n * - When `true`, the destination state (and all parent states) will be reloaded.\n * - When it is a string and is the name of a state, or when it is a State object,\n * that state and any children states will be reloaded.\n *\n * @default `false`\n */\n reload?: boolean | string | StateDeclaration | StateObject;\n /**\n * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook\n */\n custom?: any;\n /** @internalapi */\n reloadState?: StateObject;\n /** @internalapi\n * If this transition is a redirect, this property should be the original Transition (which was redirected to this one)\n */\n redirectedFrom?: Transition;\n /** @internalapi */\n current?: () => Transition;\n /** @internalapi */\n source?: 'sref' | 'url' | 'redirect' | 'otherwise' | 'unknown';\n}\n\n/** @internalapi */\nexport interface TransitionHookOptions {\n current?: () => Transition; // path?\n transition?: Transition;\n hookType?: string;\n target?: any;\n traceData?: any;\n bind?: any;\n stateHook?: boolean;\n}\n\n/**\n * TreeChanges encapsulates the various Paths that are involved in a Transition.\n *\n * Get a TreeChanges object using [[Transition.treeChanges]]\n *\n * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,\n * this object stores the \"to\" and \"from\" paths, as well as subsets of those: the \"retained\",\n * \"exiting\" and \"entering\" paths.\n *\n * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion\n * of a nested state.\n *\n * For example, if you had a nested state named `foo.bar.baz`, it would have three\n * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]]\n * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`.\n *\n * ---\n *\n * @todo show visual state tree\n */\nexport interface TreeChanges {\n /** @nodoc */\n [key: string]: PathNode[];\n\n /** The path of nodes in the state tree that the transition is coming *from* */\n from: PathNode[];\n\n /** The path of nodes in the state tree that the transition is going *to* */\n to: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining.\n *\n * These nodes are neither exited, nor entered.\n * Before and after the transition is successful, these nodes are active.\n */\n retained: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining with updated \"to params\" applied.\n *\n * These nodes are neither exited, nor enteredLine truncated
"/** @publicapi @module transition */ /** */\nimport { StateDeclaration } from '../state/interface';\nimport { PredicateBinary } from '../common/common';\n\nimport { Transition } from './transition';\nimport { StateObject } from '../state/stateObject';\nimport { PathNode } from '../path/pathNode';\nimport { TargetState } from '../state/targetState';\nimport { RegisteredHook } from './hookRegistry';\n\n/**\n * The TransitionOptions object can be used to change the behavior of a transition.\n *\n * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]].\n * It can also be used with a `uiSref`.\n */\nexport interface TransitionOptions {\n /**\n * This option changes how the Transition interacts with the browser's location bar (URL).\n *\n * - If `true`, it will update the url in the location bar.\n * - If `false`, it will not update the url in the location bar.\n * - If it is the string `\"replace\"`, it will update the url and also replace the last history record.\n *\n * @default `true`\n */\n location?: boolean | string;\n\n /**\n * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from.\n * @default `$state.current`\n */\n relative?: string | StateDeclaration | StateObject;\n\n /**\n * This option sets whether or not the transition's parameter values should be inherited from\n * the current parameter values.\n *\n * - If `true`, it will inherit parameter values from the current parameter values.\n * - If `false`, only the parameters which are provided to `transitionTo` will be used.\n *\n * @default `false`\n */\n inherit?: boolean;\n\n /**\n * @deprecated\n */\n notify?: boolean;\n\n /**\n * This option may be used to force states which are currently active to reload.\n *\n * During a normal transition, a state is \"retained\" if:\n * - It was previously active\n * - The state's parameter values have not changed\n * - All the parent states' parameter values have not changed\n *\n * Forcing a reload of a state will cause it to be exited and entered, which will:\n * - Refetch that state's resolve data\n * - Exit the state (onExit hook)\n * - Re-enter the state (onEnter hook)\n * - Re-render the views (controllers and templates)\n *\n * - When `true`, the destination state (and all parent states) will be reloaded.\n * - When it is a string and is the name of a state, or when it is a State object,\n * that state and any children states will be reloaded.\n *\n * @default `false`\n */\n reload?: boolean | string | StateDeclaration | StateObject;\n /**\n * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook\n */\n custom?: any;\n /** @internalapi */\n reloadState?: StateObject;\n /** @internalapi\n * If this transition is a redirect, this property should be the original Transition (which was redirected to this one)\n */\n redirectedFrom?: Transition;\n /** @internalapi */\n current?: () => Transition;\n /** @internalapi */\n source?: 'sref' | 'url' | 'redirect' | 'otherwise' | 'unknown';\n}\n\n/** @internalapi */\nexport interface TransitionHookOptions {\n current?: () => Transition; // path?\n transition?: Transition;\n hookType?: string;\n target?: any;\n traceData?: any;\n bind?: any;\n stateHook?: boolean;\n}\n\n/**\n * TreeChanges encapsulates the various Paths that are involved in a Transition.\n *\n * Get a TreeChanges object using [[Transition.treeChanges]]\n *\n * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,\n * this object stores the \"to\" and \"from\" paths, as well as subsets of those: the \"retained\",\n * \"exiting\" and \"entering\" paths.\n *\n * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion\n * of a nested state.\n *\n * For example, if you had a nested state named `foo.bar.baz`, it would have three\n * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]]\n * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`.\n *\n * ---\n *\n * @todo show visual state tree\n */\nexport interface TreeChanges {\n /** @nodoc */\n [key: string]: PathNode[] | undefined;\n\n /** The path of nodes in the state tree that the transition is coming *from* */\n from: PathNode[];\n\n /** The path of nodes in the state tree that the transition is going *to* */\n to: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining.\n *\n * These nodes are neither exited, nor entered.\n * Before and after the transition is successful, these nodes are active.\n */\n retained: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining with updated \"to params\" applied.\n *\n * These nodes are neither exited,Line truncated
"/** @publicapi @module transition */ /** */\nimport { TransitionHookOptions, HookResult, TransitionHookPhase } from './interface';\nimport { defaults, noop, silentRejection } from '../common/common';\nimport { fnToString, maxLength } from '../common/strings';\nimport { isPromise } from '../common/predicates';\nimport { is, parse } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { Rejection } from './rejectFactory';\nimport { TargetState } from '../state/targetState';\nimport { Transition } from './transition';\nimport { TransitionEventType } from './transitionEventType';\nimport { RegisteredHook } from './hookRegistry';\nimport { StateDeclaration } from '../state/interface';\n\nconst defaultOptions: TransitionHookOptions = {\n current: noop,\n transition: null,\n traceData: {},\n bind: null,\n};\n\nexport type GetResultHandler = (hook: TransitionHook) => ResultHandler;\nexport type GetErrorHandler = (hook: TransitionHook) => ErrorHandler;\n\nexport type ResultHandler = (result: HookResult) => Promise<HookResult>;\nexport type ErrorHandler = (error: any) => Promise<any>;\n\n/** @hidden */\nexport class TransitionHook {\n type: TransitionEventType;\n\n /**\n * These GetResultHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static HANDLE_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) =>\n hook.handleHookResult(result);\n\n /**\n * If the result is a promise rejection, log it.\n * Otherwise, ignore the result.\n */\n static LOG_REJECTED_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) => {\n isPromise(result) && result.catch(err => hook.logError(Rejection.normalize(err)));\n return undefined;\n };\n\n /**\n * These GetErrorHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => hook.logError(error);\n\n static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => silentRejection(error);\n\n static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => {\n throw error;\n };\n\n /**\n * Chains together an array of TransitionHooks.\n *\n * Given a list of [[TransitionHook]] objects, chains them together.\n * Each hook is invoked after the previous one completes.\n *\n * #### Example:\n * ```js\n * var hooks: TransitionHook[] = getHooks();\n * let promise: Promise<any> = TransitionHook.chain(hooks);\n *\n * promise.then(handleSuccess, handleError);\n * ```\n *\n * @param hooks the list of hooks to chain together\n * @param waitFor if provided, the chain is `.then()`'ed off this promise\n * @returns a `Promise` for sequentially invoking the hooks (in order)\n */\n static chain(hooks: TransitionHook[], waitFor?: Promise<any>): Promise<any> {\n // Chain the next hook off the previous\n const createHookChainR = (prev: Promise<any>, nextHook: TransitionHook) => prev.then(() => nextHook.invokeHook());\n return hooks.reduce(createHookChainR, waitFor || services.$q.when());\n }\n\n /**\n * Invokes all the provided TransitionHooks, in order.\n * Each hook's return value is checked.\n * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.\n * If no hook returns a promise, then all hooks are processed synchronously.\n *\n * @param hooks the list of TransitionHooks to invoke\n * @param doneCallback a callback that is invoked after all the hooks have successfully completed\n *\n * @returns a promise for the async result, or the result of the callback\n */\n static invokeHooks<T>(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise<any> | T {\n for (let idx = 0; idx < hooks.length; idx++) {\n const hookResult = hooks[idx].invokeHook();\n\n if (isPromise(hookResult)) {\n const remainingHooks = hooks.slice(idx + 1);\n\n return TransitionHook.chain(remainingHooks, hookResult).then(doneCallback);\n }\n }\n\n return doneCallback();\n }\n\n /**\n * Run all TransitionHooks, ignoring their return value.\n */\n static runAllHooks(hooks: TransitionHook[]): void {\n hooks.forEach(hook => hook.invokeHook());\n }\n\n constructor(\n private transition: Transition,\n private stateContext: StateDeclaration,\n private registeredHook: RegisteredHook,\n private options: TransitionHookOptions\n ) {\n this.options = defaults(options, defaultOptions);\n this.type = registeredHook.eventType;\n }\n\n private isSuperseded = () => this.type.hookPhase === TransitionHookPhase.RUN && !this.options.transition.isActive();\n\n logError(err): any {\n this.transition.rouLine truncated
"/** @publicapi @module transition */ /** */\nimport { isString, isFunction, Glob, extend, removeFrom, tail, values, identity, mapObj } from '../common';\nimport { PathNode } from '../path/pathNode';\nimport {\n TransitionStateHookFn,\n TransitionHookFn,\n TransitionHookPhase, // has or is using\n TransitionHookScope,\n IHookRegistry,\n PathType,\n} from './interface';\n\nimport {\n HookRegOptions,\n HookMatchCriteria,\n TreeChanges,\n HookMatchCriterion,\n IMatchingNodes,\n HookFn,\n} from './interface';\nimport { Transition } from './transition';\nimport { StateObject } from '../state/stateObject';\nimport { TransitionEventType } from './transitionEventType';\nimport { TransitionService } from './transitionService';\n\n/**\n * Determines if the given state matches the matchCriteria\n *\n * @hidden\n *\n * @param state a State Object to test against\n * @param criterion\n * - If a string, matchState uses the string as a glob-matcher against the state name\n * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n * and returns a positive match if any of the globs match.\n * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n * @returns {boolean}\n */\nexport function matchState(state: StateObject, criterion: HookMatchCriterion, transition: Transition) {\n const toMatch = isString(criterion) ? [criterion] : criterion;\n\n function matchGlobs(_state: StateObject) {\n const globStrings = <string[]>toMatch;\n for (let i = 0; i < globStrings.length; i++) {\n const glob = new Glob(globStrings[i]);\n\n if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n return true;\n }\n }\n return false;\n }\n\n const matchFn = <any>(isFunction(toMatch) ? toMatch : matchGlobs);\n return !!matchFn(state, transition);\n}\n\n/**\n * @internalapi\n * The registration data for a registered transition hook\n */\nexport class RegisteredHook {\n priority: number;\n bind: any;\n invokeCount = 0;\n invokeLimit: number;\n _deregistered = false;\n\n constructor(\n public tranSvc: TransitionService,\n public eventType: TransitionEventType,\n public callback: HookFn,\n public matchCriteria: HookMatchCriteria,\n public removeHookFromRegistry: (hook: RegisteredHook) => void,\n options: HookRegOptions = {} as any\n ) {\n this.priority = options.priority || 0;\n this.bind = options.bind || null;\n this.invokeLimit = options.invokeLimit;\n }\n\n /**\n * Gets the matching [[PathNode]]s\n *\n * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing\n * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.\n *\n * Returning `null` is significant to distinguish between the default\n * \"match-all criterion value\" of `true` compared to a `() => true` function,\n * when the nodes is an empty array.\n *\n * This is useful to allow a transition match criteria of `entering: true`\n * to still match a transition, even when `entering === []`. Contrast that\n * with `entering: (state) => true` which only matches when a state is actually\n * being entered.\n */\n private _matchingNodes(nodes: PathNode[], criterion: HookMatchCriterion, transition: Transition): PathNode[] {\n if (criterion === true) return nodes;\n const matching = nodes.filter(node => matchState(node.state, criterion, transition));\n return matching.length ? matching : null;\n }\n\n /**\n * Gets the default match criteria (all `true`)\n *\n * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:\n *\n * ```js\n * {\n * to: true,\n * from: true,\n * entering: true,\n * exiting: true,\n * retained: true,\n * }\n */\n private _getDefaultMatchCriteria(): HookMatchCriteria {\n return mapObj(this.tranSvc._pluginapi._getPathTypes(), () => true);\n }\n\n /**\n * Gets matching nodes as [[IMatchingNodes]]\n *\n * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:\n *\n * ```js\n * let matches: IMatchingNodes = {\n * to: _matchingNodes([tail(treeChanges.to)], mc.to),\n * from: _matchingNodes([tail(treeChanges.from)], mc.from),\n * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n * retained: _matchingNodes(treeChanges.retained, mc.retained),\n * entering: _matchingNodes(treeChanges.entering, mc.entering),\n * };\n * ```\n */\n private _getMatchingNodes(treeChanges: TreeChanges, transition: Transition): IMatchingNodes {\n const criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria);\n const paths: PathType[] = values(this.tranSvc._pluginapi._getPathTypes());\n\n return paths.reduce(\n (mn: IMatchingNodes, pathtype: PathTypeLine truncated
"/** @publicapi @module transition */ /** */\nimport { extend, tail, assertPredicate, unnestR, identity } from '../common/common';\nimport { isArray } from '../common/predicates';\n\nimport {\n TransitionOptions,\n TransitionHookOptions,\n IHookRegistry,\n TreeChanges,\n IMatchingNodes,\n TransitionHookPhase,\n TransitionHookScope,\n} from './interface';\n\nimport { Transition } from './transition';\nimport { TransitionHook } from './transitionHook';\nimport { StateObject } from '../state/stateObject';\nimport { PathNode } from '../path/pathNode';\nimport { TransitionService } from './transitionService';\nimport { TransitionEventType } from './transitionEventType';\nimport { RegisteredHook } from './hookRegistry';\n\n/**\n * This class returns applicable TransitionHooks for a specific Transition instance.\n *\n * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is\n * determined by the type of hook)\n *\n * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.\n *\n * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n * in the Transition class, so we must also provide the Transition's _treeChanges)\n *\n */\nexport class HookBuilder {\n constructor(private transition: Transition) {}\n\n buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[] {\n const $transitions = this.transition.router.transitionService;\n return $transitions._pluginapi\n ._getEvents(phase)\n .map(type => this.buildHooks(type))\n .reduce(unnestR, [])\n .filter(identity);\n }\n\n /**\n * Returns an array of newly built TransitionHook objects.\n *\n * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n * - For each of the [[PathNode]]s, creates a TransitionHook\n *\n * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.\n */\n buildHooks(hookType: TransitionEventType): TransitionHook[] {\n const transition = this.transition;\n const treeChanges = transition.treeChanges();\n\n // Find all the matching registered hooks for a given hook type\n const matchingHooks = this.getMatchingHooks(hookType, treeChanges, transition);\n if (!matchingHooks) return [];\n\n const baseHookOptions = <TransitionHookOptions>{\n transition: transition,\n current: transition.options().current,\n };\n\n const makeTransitionHooks = (hook: RegisteredHook) => {\n // Fetch the Nodes that caused this hook to match.\n const matches: IMatchingNodes = hook.matches(treeChanges, transition);\n // Select the PathNode[] that will be used as TransitionHook context objects\n const matchingNodes: PathNode[] = matches[hookType.criteriaMatchPath.name];\n\n // Return an array of HookTuples\n return matchingNodes.map(node => {\n const _options = extend(\n {\n bind: hook.bind,\n traceData: { hookType: hookType.name, context: node },\n },\n baseHookOptions\n );\n\n const state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null;\n const transitionHook = new TransitionHook(transition, state, hook, _options);\n return <HookTuple>{ hook, node, transitionHook };\n });\n };\n\n return matchingHooks\n .map(makeTransitionHooks)\n .reduce(unnestR, [])\n .sort(tupleSort(hookType.reverseSort))\n .map(tuple => tuple.transitionHook);\n }\n\n /**\n * Finds all RegisteredHooks from:\n * - The Transition object instance hook registry\n * - The TransitionService ($transitions) global hook registry\n *\n * which matched:\n * - the eventType\n * - the matchCriteria (to, from, exiting, retained, entering)\n *\n * @returns an array of matched [[RegisteredHook]]s\n */\n public getMatchingHooks(\n hookType: TransitionEventType,\n treeChanges: TreeChanges,\n transition: Transition\n ): RegisteredHook[] {\n const isCreate = hookType.hookPhase === TransitionHookPhase.CREATE;\n\n // Instance and Global hook registries\n const $transitions = this.transition.router.transitionService;\n const registries = isCreate ? [$transitions] : [this.transition, $transitions];\n\n return registries\n .map((reg: IHookRegistry) => reg.getHooks(hookType.name)) // Get named hooks from registries\n .filter(assertPredicate(isArray, `broken event named: ${hookType.name}`)) // Sanity check\n .reduce(unnestR, []) // Un-nesLine truncated
@@ -165,32 +165,24 @@
"/** @publicapi @module url */ /** */\nimport {\n UIRouter,\n LocationServices,\n $InjectorLike,\n BaseUrlRule,\n UrlRuleHandlerFn,\n UrlMatcher,\n IInjectable,\n UrlRouter,\n} from '@uirouter/core';\nimport { services, isString, isFunction, isArray, identity } from '@uirouter/core';\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string | void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\nexport class UrlRouterProvider {\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match => services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /** @hidden */\n constructor(/** @hidden */ private router: UIRouter) {}\n\n /** @hidden */\n $get(): UrlRouter {\n const urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred) urlService.listen();\n return this.router.urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () => ruleFn(services.$injector, this.router.locationService);\n\n const rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n }\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n const urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRules.otherwise(() => rule(services.$injector, this.router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n }\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the urlLine truncated
"/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @preferred @publicapi @module ng1\n */ /** */\nimport { ng as angular } from './angular';\nimport {\n IRootScopeService,\n IQService,\n ILocationService,\n ILocationProvider,\n IHttpService,\n ITemplateCacheService,\n} from 'angular';\nimport {\n services,\n applyPairs,\n isString,\n trace,\n extend,\n UIRouter,\n StateService,\n UrlRouter,\n UrlMatcherFactory,\n ResolveContext,\n unnestR,\n TypedMap,\n} from '@uirouter/core';\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from './statebuilders/views';\nimport { TemplateFactory } from './templateFactory';\nimport { StateProvider } from './stateProvider';\nimport { getStateHookBuilder } from './statebuilders/onEnterExitRetain';\nimport { Ng1LocationServices } from './locationServices';\nimport { UrlRouterProvider } from './urlRouterProvider';\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module('ui.router.angular1', []);\nconst mod_init = angular.module('ui.router.init', ['ng']);\nconst mod_util = angular.module('ui.router.util', ['ui.router.init']);\nconst mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nconst mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nconst mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nconst mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n // tslint:disable-line:no-shadowed-variable\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouterProvider.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouterProvider($locationProvider: ILocationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n const ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices(\n $locationProvider\n ));\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get(\n $location: ILocationService,\n $browser: any,\n $window: any,\n $sniffer: any,\n $rootScope: ng.IScope,\n $http: IHttpService,\n $templateCache: ITemplateCacheService\n ) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = serviceName => [\n '$uiRouterProvider',\n $urp => {\n const service = $urp.router[serviceName];\n service['$get'] = () => service;\n return service;\n },\n];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = <any>$q;\n\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!$injector.hasOwnProperty('strictDi')) {\n try {\n $injector.invoke(function(checkStrictDi) {});\n } catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === 'deferred')\n .forEach(resolvable => (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.sLine truncated
"/**\n * # Angular 1 injectable services\n *\n * This is a list of the objects which can be injected using angular's injector.\n *\n * There are three different kind of injectable objects:\n *\n * ## **Provider** objects\n * #### injectable into a `.config()` block during configtime\n *\n * - [[$uiRouterProvider]]: The UI-Router instance\n * - [[$stateProvider]]: State registration\n * - [[$transitionsProvider]]: Transition hooks\n * - [[$urlServiceProvider]]: All URL related public APIs\n *\n * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling\n * - [[$urlRouterProvider]]: (deprecated) Url matching rules\n * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config\n *\n * ## **Service** objects\n * #### injectable globally during runtime\n *\n * - [[$uiRouter]]: The UI-Router instance\n * - [[$trace]]: Enable transition trace/debug\n * - [[$transitions]]: Transition hooks\n * - [[$state]]: Imperative state related APIs\n * - [[$stateRegistry]]: State registration\n * - [[$urlService]]: All URL related public APIs\n * - [[$uiRouterGlobals]]: Global variables\n * - [[$uiViewScroll]]: Scroll an element into view\n *\n * - [[$stateParams]]: (deprecated) Global state param values\n * - [[$urlRouter]]: (deprecated) URL synchronization\n * - [[$urlMatcherFactory]]: (deprecated) URL parsing config\n *\n * ## **Per-Transition** objects\n *\n * - These kind of objects are injectable into:\n * - Resolves ([[Ng1StateDeclaration.resolve]]),\n * - Transition Hooks ([[TransitionService.onStart]], etc),\n * - Routed Controllers ([[Ng1ViewDeclaration.controller]])\n *\n * #### Different instances are injected based on the [[Transition]]\n *\n * - [[$transition$]]: The current Transition object\n * - [[$stateParams]]: State param values for pending Transition (deprecated)\n * - Any resolve data defined using [[Ng1StateDeclaration.resolve]]\n *\n * @preferred @publicapi @module injectables\n */ /** */\n/* tslint:disable:prefer-const */\nimport { StateProvider } from './stateProvider';\nimport {\n StateService,\n TransitionService,\n Transition,\n UrlRouter,\n UrlMatcherFactory,\n StateParams,\n StateRegistry,\n UIRouterGlobals,\n UIRouter,\n Trace,\n UrlService,\n} from '@uirouter/core';\nimport { UIViewScrollProvider } from './viewScroll';\nimport { UrlRouterProvider } from './urlRouterProvider';\n\n/**\n * The current (or pending) State Parameters\n *\n * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition.\n *\n * The values are not updated until *after* a `Transition` successfully completes.\n *\n * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running.\n *\n * ### Deprecation warning:\n *\n * The value injected for `$stateParams` is different depending on where it is injected.\n *\n * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`.\n * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`.\n *\n * Because of these confusing details, this service is deprecated.\n *\n * ### Instead of using the global `$stateParams` service object,\n * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]]\n *\n * ```js\n * MyService.$inject = ['$uiRouterGlobals'];\n * function MyService($uiRouterGlobals) {\n * return {\n * paramValues: function () {\n * return $uiRouterGlobals.params;\n * }\n * }\n * }\n * ```\n *\n * ### Instead of using the per-transition `$stateParams` object,\n * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]]\n *\n * ```js\n * MyController.$inject = ['$transition$'];\n * function MyController($transition$) {\n * var username = $transition$.params().username;\n * // .. do something with username\n * }\n * ```\n *\n * ---\n *\n * This object can be injected into other services.\n *\n * #### Deprecated Example:\n * ```js\n * SomeService.$inject = ['$http', '$stateParams'];\n * function SomeService($http, $stateParams) {\n * return {\n * getUser: function() {\n * return $http.get('/api/users/' + $stateParams.username);\n * }\n * }\n * };\n * angular.service('SomeService', SomeService);\n * ```\n * @deprecated\n */\nlet $stateParams: StateParams;\n\n/**\n * Global UI-Router variables\n *\n * The router global state as a **Service Object** (injectable during runtime).\n *\n * This object contains globals such as the current state and current parameter values.\n */\nlet $uiRouterGlobals: UIRouterGlobals;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime).\n *\n * This object is the UI-Router singleton instance, created by angular depenLine truncated
"/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @preferred @publicapi @module directives\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from 'angular';\n\nimport {\n Obj,\n extend,\n forEach,\n tail,\n isString,\n isObject,\n isArray,\n parse,\n noop,\n unnestR,\n identity,\n uniqR,\n inArray,\n removeFrom,\n RawParams,\n PathNode,\n StateOrName,\n StateService,\n StateDeclaration,\n UIRouter,\n} from '@uirouter/core';\nimport { UIViewData } from './viewDirective';\nimport EventHandler = JQuery.EventHandler;\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {} // tslint:disable-line:class-name\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let parsed;\n const paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n const $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n const path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n const uiState = def.uiState || $state.current.name;\n const uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n const href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n const isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n const isForm = el[0].nodeName === 'FORM';\n\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n}\n\n/** @hidden */\nfunction clickHook(\n el: IAugmentedJQuery,\n $state: StateService,\n $timeout: ITimeoutService,\n type: TypeInfo,\n getDef: () => Def\n) {\n return function(e: JQueryMouseEventObject) {\n const button = e.which || e.button,\n target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n const transition = $timeout(function() {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the <a> directive.\n let ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function() {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventHandler<any>, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n const on = element.on ? 'on' : 'bind';\n for (const event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n const off = element.off ? 'off' : 'unbind';\n for (const event of events) {\n element[off](event, hookFn as any);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative Line truncated
"/** @publicapi @module ng1 */ /** */\n\nimport { ng as angular } from './angular';\nimport { Obj, StateService, StateOrName } from '@uirouter/core';\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'stateName' | isState\">show if state is 'stateName'</div>\n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nexport function $IsStateFilter($state: StateService) {\n const isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'fullOrPartialStateName' | includedByState\">show if state includes 'fullOrPartialStateName'</div>\n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nexport function $IncludedByStateFilter($state: StateService) {\n const includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular\n .module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n",
"/** @publicapi @module directives */ /** */\nimport {\n $QLike,\n ActiveUIView,\n extend,\n filter,\n HookRegOptions,\n isDefined,\n isFunction,\n isString,\n kebobString,\n noop,\n Obj,\n Param,\n parse,\n PathNode,\n ResolveContext,\n StateDeclaration,\n tail,\n trace,\n Transition,\n TransitionService,\n TypedMap,\n unnestR,\n ViewService,\n} from '@uirouter/core';\nimport { IAugmentedJQuery, IInterpolateService, IScope, ITimeoutService, ITranscludeFunction } from 'angular';\nimport { ng as angular } from '../angular';\nimport { Ng1Controller, Ng1StateDeclaration } from '../interface';\nimport { getLocals } from '../services';\nimport { Ng1ViewConfig } from '../statebuilders/views';\nimport { ng1_directive } from './stateDirectives';\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n};\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise<any>;\n $animLeave: Promise<any>;\n $$animLeave: { resolve: () => any }; // \"deferred\"\n};\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * <!-- Unnamed -->\n * <div ui-view></div>\n *\n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n *\n * <!-- Named (different style) -->\n * <ui-view name=\"viewName\"></ui-view>\n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n * <div ui-view></div>\n * $stateProvider.state(\"home\", {\n * template: \"<h1>HELLO!</h1>\"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n * <div ui-view=\"main\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div>\n * <div ui-view=\"data\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * },\n * \"chart\": {\n * template: \"<chart_thing/>\"\n * },\n * \"data\": {\n * template: \"<data_thing/>\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * <!-- If autoscroll present with no expression,\n * then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n * then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '<my-component user=\"$resolve.user\"></my-component>',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective(\n $view: ViewService,\n $animate: any,\n $uiViewScroll: any,\n $interpolate: IInterpolateService,\n $q: $QLike\n ) {\n function getRenLine truncated
"/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @preferred @publicapi @module directives\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from 'angular';\n\nimport {\n Obj,\n extend,\n forEach,\n tail,\n isString,\n isObject,\n isArray,\n parse,\n noop,\n unnestR,\n identity,\n uniqR,\n inArray,\n removeFrom,\n RawParams,\n PathNode,\n StateOrName,\n StateService,\n StateDeclaration,\n UIRouter,\n} from '@uirouter/core';\nimport { UIViewData } from './viewDirective';\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {} // tslint:disable-line:class-name\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let parsed;\n const paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n const $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n const path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n const uiState = def.uiState || $state.current.name;\n const uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n const href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n const isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n const isForm = el[0].nodeName === 'FORM';\n\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n}\n\n/** @hidden */\nfunction clickHook(\n el: IAugmentedJQuery,\n $state: StateService,\n $timeout: ITimeoutService,\n type: TypeInfo,\n getDef: () => Def\n) {\n return function(e: JQueryMouseEventObject) {\n const button = e.which || e.button,\n target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n const transition = $timeout(function() {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the <a> directive.\n let ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function() {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventListener, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n const on = element.on ? 'on' : 'bind';\n for (const event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n const off = element.off ? 'off' : 'unbind';\n for (const event of events) {\n element[off](event, hookFn as any);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This aLine truncated
"/** @publicapi @module ng1 */ /** */\n\nimport { ng as angular } from './angular';\nimport { Obj, StateService, StateOrName } from '@uirouter/core';\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'stateName' | isState\">show if state is 'stateName'</div>\n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state: StateService) {\n const isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'fullOrPartialStateName' | includedByState\">show if state includes 'fullOrPartialStateName'</div>\n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state: StateService) {\n const includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular\n .module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n\nexport { $IsStateFilter, $IncludedByStateFilter };\n",
"/** @publicapi @module directives */ /** */\nimport {\n $QLike,\n ActiveUIView,\n extend,\n filter,\n HookRegOptions,\n isDefined,\n isFunction,\n isString,\n kebobString,\n noop,\n Obj,\n Param,\n parse,\n PathNode,\n ResolveContext,\n StateDeclaration,\n tail,\n trace,\n Transition,\n TransitionService,\n TypedMap,\n unnestR,\n ViewService,\n} from '@uirouter/core';\nimport { IAugmentedJQuery, IInterpolateService, IScope, ITimeoutService, ITranscludeFunction } from 'angular';\nimport { ng as angular } from '../angular';\nimport { Ng1Controller, Ng1StateDeclaration } from '../interface';\nimport { getLocals } from '../services';\nimport { Ng1ViewConfig } from '../statebuilders/views';\nimport { ng1_directive } from './stateDirectives';\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n};\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise<any>;\n $animLeave: Promise<any>;\n $$animLeave: { resolve: () => any }; // \"deferred\"\n};\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * <!-- Unnamed -->\n * <div ui-view></div>\n *\n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n *\n * <!-- Named (different style) -->\n * <ui-view name=\"viewName\"></ui-view>\n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n * <div ui-view></div>\n * $stateProvider.state(\"home\", {\n * template: \"<h1>HELLO!</h1>\"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n * <div ui-view=\"main\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div>\n * <div ui-view=\"data\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * },\n * \"chart\": {\n * template: \"<chart_thing/>\"\n * },\n * \"data\": {\n * template: \"<data_thing/>\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * <!-- If autoscroll present with no expression,\n * then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n * then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '<my-component user=\"$resolve.user\"></my-component>',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective(\n $view: ViewService,\n $animate: any,\n $uiViewScroll: any,\n $interpolate: IInterpolateService,\n $q: $QLike\n ) {\n function getRenLine truncated
"/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from './angular';\nimport { IServiceProviderFactory } from 'angular';\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n let useAnchorScroll = false;\n\n this.useAnchorScroll = function() {\n useAnchorScroll = true;\n };\n\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function($element: JQuery) {\n return $timeout(\n function() {\n $element[0].scrollIntoView();\n },\n 0,\n false\n );\n };\n },\n ];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', <IServiceProviderFactory>$ViewScrollProvider);\n",
"/**\n * Main entry point for angular 1.x build\n * @publicapi @module ng1\n */ /** */\nexport * from './interface';\nexport * from './services';\nexport * from './statebuilders/views';\nexport * from './stateProvider';\nexport * from './urlRouterProvider';\n\nimport './injectables';\nimport './directives/stateDirectives';\nimport './stateFilters';\nimport './directives/viewDirective';\nimport './viewScroll';\n\nexport default 'ui.router';\n\nimport * as core from '@uirouter/core';\nexport { core };\nexport * from '@uirouter/core';\n"
],
"names": [
"ng_from_import.module",
"val",
"this",
"angular",
"RejectType",
"Category",
"DefType",
"inherit",
"values",
"root",
"all",
"TransitionHookPhase",
"TransitionHookScope",
"pattern",
"parseUrl",
"__extends",
"id",
"$q",
"$injector"
"id"
],
"mappings": "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 truncated
"mappings": ";;;;;;;;;;;;;;;;IAAA;AACA,IAEA,eAAe,IAAM,cAAc,GAAG,OAAO,CAAC;IAC9C,eAAe,AAAO,IAAM,EAAE,GAAG,cAAc,IAAIA,qBAAqB,GAAG,cAAc,GAAG,cAAc,CAAC;;ICJ3G;;;;;;;IASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,aAAgB,KAAK,CAAC,EAAY;QAChC,IAAM,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,IAAM,gBAAgB,GAAG,EAAE,CAAC,MAAM,CAAC;QAEnC,SAAS,OAAO,CAAC,IAAW;YAC1B,IAAI,IAAI,CAAC,MAAM,IAAI,gBAAgB;gBAAE,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACjE,OAAO;gBACL,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;aACxD,CAAC;SACH;QACD,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;;AAMA,aAAgB,OAAO;QACrB,IAAM,IAAI,GAAG,SAAS,CAAC;QACvB,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAC9B,OAAO;YACL,IAAI,CAAC,GAAG,KAAK,EACX,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YAC9C,OAAO,CAAC,EAAE;gBAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAChD,OAAO,MAAM,CAAC;SACf,CAAC;IACJ,CAAC;IAED;;;;;;AAMA,aAAgB,IAAI;QAAC,eAAoB;aAApB,UAAoB,EAApB,qBAAoB,EAApB,IAAoB;YAApB,0BAAoB;;QACvC,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;AAMA,QAAa,IAAI,GAAG,UAAC,IAAY,IAAK,OAAA,UAAC,GAAQ,IAAK,OAAA,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAA,GAAA,CAAC;IAErE;;;;;;;AAOA,QAAa,MAAM,GAAG,KAAK,CAAC,UAAC,IAAY,EAAE,IAAS,EAAE,GAAQ,IAAK,OAAA,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,GAAA,CAAC,CAAC;IAE9F;;;;;;;;AAQA,QAAa,KAAK,GAAG,UAAC,IAAY,IAAK,OAAA,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAA,CAAC;IAEnF;;;;AAIA,QAAa,GAAG,GAA2C,UAAC,EAAkB,IAAK,OAAA;QAAC,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QAChG,OAAA,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;IAArB,CAAqB,GAAA,CAAC;IAExB;;;;AAIA,aAAgB,GAAG,CAAC,GAAmB,EAAE,GAAmB;QAC1D,OAAO;YAAC,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAAK,OAAA,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;SAAA,CAAC;IAC5E,CAAC;IAED;;;;AAIA,aAAgB,EAAE,CAAC,GAAmB,EAAE,GAAmB;QACzD,OAAO;YAAC,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAAK,OAAA,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;SAAA,CAAC;IAC5E,CAAC;IAED;;;;;;AAMA,QAAa,GAAG,GAAG,UAAC,GAAmB,IAAK,OAAA,UAAC,GAAU,IAAK,OAAA,GAAG,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAA,EAAE,IAAI,CAAY,GAAA,GAAA,CAAC;IAEjH;AACA,QAAa,GAAG,GAAG,UAAC,GAAmB,IAAK,OAAA,UAAC,GAAU,IAAK,OAAA,GAAG,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAA,EAAE,KAAK,CAAY,GAAA,GAAA,CAAC;IAElH;AACA,QAAa,EAAE,GAAG,UAAI,IAA0B,IAAK,OAAA,UAAC,GAAQ;QAC5D,OAAA,CAAC,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,WAAW,KAAK,IAAI,KAAK,GAAG,YAAY,IAAI;IAAhE,CAAgE,GAAA,CAAC;IAEnE;AACA,QAAa,EAAE,GAAkC,UAAC,KAAU,IAAK,OAAA,UAAC,KAAU,IAAK,OAAA,KAAK,KAAK,KAAK,GAAA,GAAA,CAAC;IAEjG;AACA,QAAa,GAAG,GAAG,UAAI,CAAI,IAAK,OAAA,cAAM,OAAA,CAAC,GAAA,GAAA,CAAC;AAIxC,aAAgB,MAAM,CAAC,MAAc,EAAE,IAAY;QACjD,OAAO,UAAC,GAAQ,IAAK,OAAA,GAAG,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,GAAA,CAAC;IACpD,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,aAAgB,OAAO,CAAC,MAAoB;QAC1C,OAAO,UAAS,CAAM;YACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC7C;SACF,CAAC;IACJ,CAAC;;ICvND;;;;;;;AAOA,IAIA,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;IACxC,IAAM,GAAG,GAAG,UAAC,CAAS,IAAK,OAAA,UAAC,CAAM,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,GAAA,GAAA,CAAC;AACtD,QAAa,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;AAC5C,QAAa,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;AAC1C,QAAa,MAAM,GAAG,UAAC,CAAM,IAAK,OAAA,CAAC,KAAK,IAAI,GAAA,CAAC;AAC7C,QAAa,iBAAiB,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACzD,QAAa,UAAU,GAAmC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC1E,QAAa,QAAQ,GAAiC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpE,QAAa,QAAQ,GAA4B,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC/D,QAAa,QAAQ,GAAG,UAAC,CAAM,IAAK,OAAA,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,GAAA,CAAC;AACxE,QAAa,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AACrC,QAAa,MAAM,IAAgC,UAAC,CAAM,IAAK,OAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,eAAe,GAAA,CAAC,CAAC;AAClG,QAAa,QAAQ,IAAkC,UAAC,CAAM,IAAK,OAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,iBAAiB,GAAA,CAAC,CAAC;IAExG;;;;;;AAMA,aAAgB,YAAY,CAAC,GAAQ;QACnC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE;YAC9B,IAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAC3B,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;SACpF;QACD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED;;;;;AAKA,QAAa,SAAS,GAAkC,GAAG,CACzD,QAAQ,EACR,IAAI,CACF,IAAI,CAAC,MAAM,CAAC,EACZ,UAAU,CACX,CACF;;ICzCD,IAAM,MAAM,GAAG,UAAC,MAAc,IAAK,OAAA;QACjC,MAAM,IAAI,KAAK,CAAC,2BAAyB,MAAM,iEAA8D,CAAC,CAAC;IACjH,CAAC,GAAA,CAAC;AAEF,QAAa,QAAQ,GAAG,UAAI,OAAe,EAAE,OAAoB;QAC/D,OAAA,OAAO,CAAC,MAAM,CALine truncated
}
+2 -2
View File
@@ -4,9 +4,9 @@
* This causes it to be incompatible with plugins that depend on @uirouter/core.
* We recommend switching to the ui-router-core.js and ui-router-angularjs.js bundles instead.
* For more information, see https://ui-router.github.io/blog/uirouter-for-angularjs-umd-bundles
* @version v1.0.22
* @version v1.0.23
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],e):e((t=t||self)["@uirouter/angularjs"]={},t.angular)}(this,function(d,t){"use strict";var e=angular,b=t&&t.module?t:e;function c(r){var t=[].slice.apply(arguments,[1]),n=r.length;return function t(e){return e.length>=n?r.apply(null,e):function(){return t(e.concat([].slice.apply(arguments)))}}(t)}function r(){var r=arguments,n=r.length-1;return function(){for(var t=n,e=r[n].apply(this,arguments);t--;)e=r[t].call(this,e);return e}}function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.apply(null,[].slice.call(arguments).reverse())}var w=function(e){return function(t){return t&&t[e]}},y=c(function(t,e,r){return r&&r[t]===e}),R=function(t){return s.apply(null,t.split(".").map(w))},l=function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return!r.apply(null,t)}};function n(r,n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.apply(null,t)&&n.apply(null,t)}}function i(r,n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.apply(null,t)||n.apply(null,t)}}var f=function(r){return function(t){return t.reduce(function(t,e){return t&&!!r(e)},!0)}},h=function(r){return function(t){return t.reduce(function(t,e){return t||!!r(e)},!1)}},p=function(e){return function(t){return null!=t&&t.constructor===e||t instanceof e}},o=function(e){return function(t){return e===t}},v=function(t){return function(){return t}};function a(e,r){return function(t){return t[e].apply(t,r)}}function m(r){return function(t){for(var e=0;e<r.length;e++)if(r[e][0](t))return r[e][1](t)}}var u=Object.prototype.toString,g=function(e){return function(t){return typeof t===e}},_=g("undefined"),E=l(_),S=function(t){return null===t},$=i(S,_),C=g("function"),T=g("number"),P=g("string"),k=function(t){return null!==t&&"object"==typeof t},O=Array.isArray,x=function(t){return"[object Date]"===u.call(t)},j=function(t){return"[object RegExp]"===u.call(t)};function V(t){if(O(t)&&t.length){var e=t.slice(0,-1),r=t.slice(-1);return!(e.filter(l(P)).length||r.filter(l(C)).length)}return C(t)}var I=n(k,s(w("then"),C)),H=function(n,t){return t.reduce(function(t,e){return t[e]=(r=n+"."+e+"()",function(){throw new Error("No implementation for "+r+". The framework specific code did not implement this method.")}),t;var r},{})},A={$q:void 0,$injector:void 0},D="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||void 0,q=D.angular||{},U=q.fromJson||JSON.parse.bind(JSON),F=q.toJson||JSON.stringify.bind(JSON),N=q.forEach||function(e,r,t){if(O(e))return e.forEach(r,t);Object.keys(e).forEach(function(t){return r(e[t],t)})},L=Object.assign||Pt,M=q.equals||kt;function B(t){return t}function G(){}function W(e,n,r,t,i){void 0===i&&(i=!1);var o=function(t){return e()[t].bind(r())};return(t=t||Object.keys(e())).reduce(function(t,e){var r;return t[e]=i?(r=e,function(){return n[r]=o(r),n[r].apply(null,arguments)}):o(e),t},n)}var z=function(t,e){return L(Object.create(t),e)},J=c(Q);function Q(t,e){return-1!==t.indexOf(e)}var K=c(Y);function Y(t,e){var r=t.indexOf(e);return 0<=r&&t.splice(r,1),t}var Z=c(X);function X(t,e){return t.push(e),e}var tt=function(e){return e.slice().forEach(function(t){"function"==typeof t&&t(),K(e,t)})};function et(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=L.apply(void 0,[{}].concat(e.reverse()));return L(n,it(t||{},Object.keys(n)))}var rt=function(t,e){return L(t,e)};function nt(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function it(t,e){var r={};for(var n in t)-1!==e.indexOf(n)&&(r[n]=t[n]);return r}function ot(r,t){return Object.keys(r).filter(l(J(t))).reduce(function(t,e){return t[e]=r[e],t},{})}function at(t,e){return ft(t,w(e))}function ut(t,r){var e=O(t),n=e?[]:{},i=e?function(t){return n.push(t)}:function(t,e){return n[e]=t};return N(t,function(t,e){r(t,e)&&i(t,e)}),n}function st(t,r){var n;return N(t,function(t,e){n||r(t,e)&&(n=t)}),n}var ct=ft;function ft(t,r,n){return n=n||(O(t)?[]:{}),N(t,function(t,e){return n[e]=r(t,e)}),n}var lt=function(e){return Object.keys(e).map(function(t){return e[t]})},ht=function(t,e){return t&&e},pt=function(t,e){return t||e},vt=function(t,e){return t.concat(e)},dt=function(t,e){return O(e)?t.concat(e.reduce(dt,[])):mt(t,e)};function mt(t,e){return t.push(e),t}var yt=function(t,e){return J(t,e)?t:mt(t,e)},gt=function(t){return t.reduce(vt,[])},wt=function(t){return t.reduce(dt,[])},_t=$t,St=$t;function $t(r,n){return void 0===n&&(n="assert failure"),function(t){var e=r(t);if(!e)throw new Error(C(n)?n(t):n);return e}}var bt=function(e){return Object.keys(e).map(function(t){return[t,e[t]]})};function Rt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return[];for(var r=t.reduce(fuLine truncated
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],e):e((t=t||self)["@uirouter/angularjs"]={},t.angular)}(this,function(d,t){"use strict";var e=angular,b=t&&t.module?t:e;function s(r){var t=[].slice.apply(arguments,[1]),n=r.length;return function t(e){return e.length>=n?r.apply(null,e):function(){return t(e.concat([].slice.apply(arguments)))}}(t)}function r(){var r=arguments,n=r.length-1;return function(){for(var t=n,e=r[n].apply(this,arguments);t--;)e=r[t].call(this,e);return e}}function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.apply(null,[].slice.call(arguments).reverse())}var m=function(e){return function(t){return t&&t[e]}},y=s(function(t,e,r){return r&&r[t]===e}),R=function(t){return c.apply(null,t.split(".").map(m))},l=function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return!r.apply(null,t)}};function n(r,n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.apply(null,t)&&n.apply(null,t)}}function i(r,n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.apply(null,t)||n.apply(null,t)}}function o(e){return function(t){return e===t}}var a=function(r){return function(t){return t.reduce(function(t,e){return t&&!!r(e)},!0)}},u=function(r){return function(t){return t.reduce(function(t,e){return t||!!r(e)},!1)}},f=function(e){return function(t){return null!=t&&t.constructor===e||t instanceof e}},h=function(t){return function(){return t}};function p(e,r){return function(t){return t[e].apply(t,r)}}function v(r){return function(t){for(var e=0;e<r.length;e++)if(r[e][0](t))return r[e][1](t)}}function g(e){return function(t){return typeof t===e}}function w(t){return null===t}var _=Object.prototype.toString,S=g("undefined"),E=l(S),$=i(w,S),C=g("function"),T=g("number"),P=g("string"),k=function(t){return null!==t&&"object"==typeof t},O=Array.isArray,x=function(t){return"[object Date]"===_.call(t)},j=function(t){return"[object RegExp]"===_.call(t)};function V(t){if(O(t)&&t.length){var e=t.slice(0,-1),r=t.slice(-1);return!(e.filter(l(P)).length||r.filter(l(C)).length)}return C(t)}function H(r,t){return t.reduce(function(t,e){return t[e]=function(t){return function(){throw new Error("No implementation for "+t+". The framework specific code did not implement this method.")}}(r+"."+e+"()"),t},{})}var I=n(k,c(m("then"),C)),A={$q:void 0,$injector:void 0},D="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||void 0,q=D.angular||{},U=q.fromJson||JSON.parse.bind(JSON),F=q.toJson||JSON.stringify.bind(JSON),N=q.forEach||function(e,r,t){if(O(e))return e.forEach(r,t);Object.keys(e).forEach(function(t){return r(e[t],t)})},L=Object.assign||Pt,M=q.equals||kt;function B(t){return t}function G(){}function W(e,r,n,t,i){void 0===i&&(i=!1);function o(t){return e()[t].bind(n())}return(t=t||Object.keys(e())).reduce(function(t,e){return t[e]=i?function(t){return function(){return r[t]=o(t),r[t].apply(null,arguments)}}(e):o(e),t},r)}var z=function(t,e){return L(Object.create(t),e)},J=s(Q);function Q(t,e){return-1!==t.indexOf(e)}var K=s(Y);function Y(t,e){var r=t.indexOf(e);return 0<=r&&t.splice(r,1),t}var Z=s(X);function X(t,e){return t.push(e),e}function tt(e){return e.slice().forEach(function(t){"function"==typeof t&&t(),K(e,t)})}function et(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=L.apply(void 0,[{}].concat(e.reverse()));return L(n,it(t||{},Object.keys(n)))}function rt(t,e){return L(t,e)}function nt(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function it(t,e){var r={};for(var n in t)-1!==e.indexOf(n)&&(r[n]=t[n]);return r}function ot(r,t){return Object.keys(r).filter(l(J(t))).reduce(function(t,e){return t[e]=r[e],t},{})}function at(t,e){return ft(t,m(e))}function ut(t,r){var e=O(t),n=e?[]:{},i=e?function(t){return n.push(t)}:function(t,e){return n[e]=t};return N(t,function(t,e){r(t,e)&&i(t,e)}),n}function st(t,r){var n;return N(t,function(t,e){n||r(t,e)&&(n=t)}),n}var ct=ft;function ft(t,r,n){return n=n||(O(t)?[]:{}),N(t,function(t,e){return n[e]=r(t,e)}),n}function lt(e){return Object.keys(e).map(function(t){return e[t]})}function ht(t,e){return t&&e}function pt(t,e){return t||e}var vt=function(t,e){return t.concat(e)},dt=function(t,e){return O(e)?t.concat(e.reduce(dt,[])):mt(t,e)};function mt(t,e){return t.push(e),t}function yt(t,e){return J(t,e)?t:mt(t,e)}function gt(t){return t.reduce(vt,[])}function wt(t){return t.reduce(dt,[])}var _t=$t,St=$t;function $t(r,n){return void 0===n&&(n="assert failure"),function(t){var e=r(t);if(!e)throw new Error(C(n)?n(t):n);return e}}function bt(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function Rt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return[];for(var r=t.reduce(function(tLine truncated
//# sourceMappingURL=angular-ui-router.min.js.map
File diff suppressed because it is too large. Load diff