-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-es5.ed819aeb10799b4e2d44.js
1 lines (1 loc) · 18.6 KB
/
main-es5.ed819aeb10799b4e2d44.js
1
!function(){function e(e,n){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=t(e))||n&&e&&"number"==typeof e.length){i&&(e=i);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,u=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw u}}}}function n(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var i,r,o=[],u=!0,a=!1;try{for(t=t.call(e);!(u=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);u=!0);}catch(s){a=!0,r=s}finally{try{u||null==t.return||t.return()}finally{if(a)throw r}}return o}(e,n)||t(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){if(e){if("string"==typeof e)return i(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(e,n):void 0}}function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function o(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function u(e,n,t){return n&&o(e.prototype,n),t&&o(e,t),e}(self.webpackChunk_angular_ru_sdk=self.webpackChunk_angular_ru_sdk||[]).push([[179],{8255:function(e){function n(e){return Promise.resolve().then(function(){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n})}n.keys=function(){return[]},n.resolve=n,n.id=8255,e.exports=n},433:function(e,n,t){"use strict";function i(e){var n=Array.isArray(e)?e:[e];return function(e){return!n.includes(e)}}function r(e){return 0===(null!=e?e:[]).length}t.d(n,{De:function(){return i},NL:function(){return r}}),t(7247),t(416),t(9868)},1321:function(e,n,t){"use strict";t.d(n,{n:function(){return g}});var i=t(4788);function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=Math.pow(10,n),i=+(n?e*t:e).toFixed(8),r=Math.floor(i),o=i-r;return o>.5-1e-8&&o<.5+1e-8?(r%2==0?r:r+1)/t:Math.round(i)/t}var a=t(9868);function s(e){var n,t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ru-RU",r=null==e?void 0:e.toString().replace(/\s/g,""),o=new Intl.NumberFormat(i).formatToParts(12345.6),u=Array.from(new Intl.NumberFormat(i,{useGrouping:!1}).format(9876543210)).reverse(),s=new RegExp("[".concat(null===(n=o.find(function(e){return"group"===e.type}))||void 0===n?void 0:n.value,"]"),"g"),l=new RegExp("[".concat(null===(t=o.find(function(e){return"decimal"===e.type}))||void 0===t?void 0:t.value,"]")),c=new RegExp("[".concat(u.join(""),"]"),"g");return r=null==r?void 0:r.trim().replace(s,"").replace(l,".").replace(c,function(e){var n,t;return null!==(t=null===(n=new Map(u.map(function(e,n){return[e,n]})).get(e))||void 0===n?void 0:n.toString())&&void 0!==t?t:""}),(0,a.ZM)(r)?+r:NaN}var l=t(416),c=t(5850),f=t(5319),h=t(2759),v=t(4e3),d=t(4751),g=function(){var e=function(){function e(n,t,i,o,u){r(this,e),this.el=n,this.ngControl=i,this.ngZone=o,this.cd=u,this.subscriptions=new f.w,this.previousLang=null,this.maximumFractionDigits=3,this.isInsideAngularZone=!0,this.options={},this.markedAsDirty=!0,this.cursorPointer=0,this.setFirstLocalOptionsByGlobal(t)}return u(e,[{key:"isInAngularZone",get:function(){return this.isInsideAngularZone}},{key:"amountFormatOptions",get:function(){return this.options},set:function(e){this.options=Object.assign(Object.assign({},this.options),null!=e?e:{}),this.recalculateWhenChangesOptions()}},{key:"dirty",get:function(){return this.markedAsDirty}},{key:"element",get:function(){return this.el.nativeElement}},{key:"setLang",value:function(e){this.options.lang=e,this.recalculateWhenChangesOptions()}},{key:"getCursorPosition",value:function(){return this.cursorPointer}},{key:"ngOnInit",value:function(){this.setupElementType(),this.subscribeToElementEvents()}},{key:"ngAfterViewInit",value:function(){this.format()}},{key:"ngOnDestroy",value:function(){this.unsubscribeFromElementEvents()}},{key:"subscribeToElementEvents",value:function(){var e,n=this;null===(e=this.ngZone)||void 0===e||e.runOutsideAngular(function(){n.subscriptions.add((0,h.R)(n.element,"input").subscribe(function(){n.isInsideAngularZone=i.R0b.isInAngularZone(),n.format()})),n.subscriptions.add((0,h.R)(n.element,"blur").subscribe(function(){n.isInsideAngularZone=i.R0b.isInAngularZone(),n.formatOnBlur()}))})}},{key:"unsubscribeFromElementEvents",value:function(){this.subscriptions.unsubscribe()}},{key:"formatOnBlur",value:function(){var e;this.isIncorrectPreviewAfterBlur()&&(this.element.value=null!==(e=(0,c.QH)(this.element.value))&&void 0!==e?e:"")}},{key:"format",value:function(){var e,n,t=this.getFractionSeparator();this.cursorPointer=null!==(e=this.element.selectionStart)&&void 0!==e?e:0;var i=this.cursorPointer!==this.element.value.length;if(this.replaceAllInvalidSymbolsBeforeTranslation(),this.viewModelIsOnlyMinus())return this.resetModelValue(),void(this.element.value="-");var r=this.element.value,o=this.getNumberValueWithGaussRounded();this.setModelValueBy(o),this.element.value=r;var u=this.prepareConvertedToLocaleValue(o,t);this.element.value=isNaN(null===(n=this.ngControl)||void 0===n?void 0:n.value)?"":u,this.setSelectionRangeBy(i,u),this.preventExpressionChangedAfter()}},{key:"isIncorrectPreviewAfterBlur",value:function(){return this.lastSymbolIsFraction()||this.viewModelIsOnlyMinus()}},{key:"resetModelValue",value:function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===(e=this.ngControl)||void 0===e||e.reset(n)}},{key:"replaceAllInvalidSymbolsBeforeTranslation",value:function(){var e=this.getFractionSeparator();this.element.value=this.removeNonNumericSymbols(),this.element.value=this.replaceInvalidFractionPosition(e),this.element.value=this.removeDuplicateMinusOrFractionSymbol(e)}},{key:"getMaximumFractionDigits",value:function(){var e,n;return null!==(n=null===(e=this.options.formatOptions)||void 0===e?void 0:e.maximumFractionDigits)&&void 0!==n?n:this.maximumFractionDigits}},{key:"getLastSymbolsAsZeroDot",value:function(e){var n,t,i,r=this.getMaximumFractionDigits(),u=0===r?"":null!==(i=null===(t=null===(n=this.element.value.match(new RegExp("(\\".concat(e,")(.+)?"))))||void 0===n?void 0:n[0])||void 0===t?void 0:t.replace(/,|./,""))&&void 0!==i?i:"";if(u.length>this.maximumFractionDigits){var a=o(s("0".concat(e).concat(u),this.options.lang),r);u=isNaN(a)?"":a.toString().replace(/0\./,"")}return u}},{key:"prepareConvertedToLocaleValue",value:function(e,n){var t=this.lastSymbolIsFraction(),i=this.getConvertedToLocaleString(e);if(t)i="".concat(i).concat(n);else{var r=this.getLastSymbolsAsZeroDot(n);if((0,a.ZM)(r)){var o=i.split(n),u=null==o?void 0:o[0];i=(0,a.ZM)(u)?"".concat(u).concat(n).concat(r):"0".concat(n).concat(r)}}return i.replace(/\s/g," ")}},{key:"setModelValueBy",value:function(e){isNaN(e)?this.resetModelValue():this.resetModelValue(e)}},{key:"getConvertedToLocaleString",value:function(e){return(isNaN(e)?"":e).toLocaleString(this.options.lang,this.options.formatOptions)}},{key:"getNumberValueWithGaussRounded",value:function(){var e=this.getMaximumFractionDigits();return o(s(this.element.value,this.options.lang),e)}},{key:"lastSymbolIsFraction",value:function(){return(0,c.B3)(this.element.value)===this.getFractionSeparator()}},{key:"replaceInvalidFractionPosition",value:function(e){return this.element.value.replace(new RegExp("\\".concat(e,"+$"),"g"),e)}},{key:"removeDuplicateMinusOrFractionSymbol",value:function(e){var n=this.element.value,t=0;return 0!==(n=n.replace(new RegExp("\\".concat(e),"g"),function(){return++t>1?"":e})).indexOf("-")&&(n=n.replace(/-/g,"")),n}},{key:"viewModelIsOnlyMinus",value:function(){return"-"===this.element.value}},{key:"getFractionSeparator",value:function(){var e,n,t;return n=null!==(e=this.options.lang)&&void 0!==e?e:v.J.lang,(t={expectedValue:1000000.65,lastValuePositionBeforeFraction:-3}).expectedValue.toLocaleString(n).slice(t.lastValuePositionBeforeFraction).slice(0,1)}},{key:"removeNonNumericSymbols",value:function(){return this.viewModelIsOnlyMinus()?this.element.value:(0,c.a9)(this.element.value)}},{key:"setSelectionRangeBy",value:function(e,n){try{e||(this.cursorPointer=n.length),this.element.setSelectionRange(this.cursorPointer,this.cursorPointer)}catch(t){}}},{key:"setFirstLocalOptionsByGlobal",value:function(e){this.options=(0,l.I8)(e),this.previousLang=this.options.lang}},{key:"recalculateWhenChangesOptions",value:function(){var e,n=s(this.element.value,null!==(e=this.previousLang)&&void 0!==e?e:this.options.lang);this.element.value=n.toLocaleString(this.options.lang,this.options.formatOptions),this.previousLang=this.options.lang,this.format()}},{key:"preventExpressionChangedAfter",value:function(){this.markedAsDirty&&((0,a.ZK)(this.cd),this.markedAsDirty=!1)}},{key:"setupElementType",value:function(){this.el.nativeElement.setAttribute("type","text")}}]),e}();return e.\u0275fac=function(n){return new(n||e)(i.Y36(i.SBq),i.Y36(v.L),i.Y36(d.a5,8),i.Y36(i.R0b,8),i.Y36(i.sBO,8))},e.\u0275dir=i.lG2({type:e,selectors:[["","amountFormat",""]],inputs:{amountFormatOptions:"amountFormatOptions"}}),e}()},802:function(e,n,t){"use strict";t.d(n,{V:function(){return s}});var i=t(2057),o=t(4e3),a=t(4788),s=function(){var e=function(){function e(){r(this,e)}return u(e,null,[{key:"forRoot",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[{provide:o.L,useValue:Object.assign(Object.assign({},o.J),n)}]}}}]),e}();return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=a.oAB({type:e}),e.\u0275inj=a.cJS({imports:[[i.ez]]}),e}()},4e3:function(e,n,t){"use strict";t.d(n,{L:function(){return i},J:function(){return r}});var i=new(t(4788).OlP)("AMOUNT_FORMAT_OPTIONS"),r={lang:"ru-RU"}},9794:function(e,n,t){"use strict";t.d(n,{B:function(){return s}});var i=t(1453),o=t(5850),a=t(4788),s=function(){var e=function(){function e(n){r(this,e),this.elementRef=n,this.filter=[],this.manualEvent=null}return u(e,[{key:"onInput",value:function(e){var n,t;if(this.manualEvent!==e){var i=this.elementRef.nativeElement.value,r=(0,o.hX)(i,this.filter);r!==i&&(this.manualEvent=new InputEvent("input",Object.assign(Object.assign({},e),{data:r})),this.elementRef.nativeElement.value=null!==(t=null===(n=this.manualEvent)||void 0===n?void 0:n.data)&&void 0!==t?t:"",this.elementRef.nativeElement.dispatchEvent(this.manualEvent))}}}]),e}();return e.\u0275fac=function(n){return new(n||e)(a.Y36(a.SBq))},e.\u0275dir=a.lG2({type:e,selectors:[["","filter",""]],hostBindings:function(e,n){1&e&&a.NdJ("input",function(e){return n.onInput(e)})},inputs:{filter:"filter"},features:[a._Bn([i.N])]}),e}()},2118:function(e,n,t){"use strict";t.d(n,{V6:function(){return i.V},iL:function(){return a}}),t(1321);var i=t(802);t(4e3),t(5850),t(9794);var o=t(2057),u=t(4788),a=function(){var e=function e(){r(this,e)};return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=u.oAB({type:e}),e.\u0275inj=u.cJS({imports:[[o.ez]]}),e}();t(1453),t(9868)},1453:function(t,i,o){"use strict";o.d(i,{N:function(){return g}});var a=o(4751),s=o(433),l=o(7247),c=o(9765),f=o(8002),h=o(6782),v=function(){function e(n){r(this,e),this.accessor=n,this.onViewValueChangedSubject=new c.xQ,this.onModelValueChangedSubject=new c.xQ,this.onViewValueChanged=this.onViewValueChangedSubject.asObservable(),this.onModelValueChanged=this.onModelValueChangedSubject.asObservable(),this.saveOriginalAccessorFunctions(),this.patchAccessorFunctions()}return u(e,[{key:"pushModelValue",value:function(e){var n;null===(n=this.onModelValueChangeFunction)||void 0===n||n.call(this,e)}},{key:"pushViewValue",value:function(e){this.writeViewValueFunction(e)}},{key:"detach",value:function(){this.accessor.registerOnChange=this.registerOnViewValueChangeFunction,this.accessor.registerOnChange(this.onModelValueChangeFunction),this.accessor.writeValue=this.writeViewValueFunction}},{key:"patchAccessorFunctions",value:function(){var e=this;this.accessor.registerOnChange=function(n){e.onModelValueChangeFunction=n,e.registerOnViewValueChangeFunction(function(n){e.onViewValueChangedSubject.next(n)})},this.accessor.writeValue=function(n){e.onModelValueChangedSubject.next(n)}}},{key:"saveOriginalAccessorFunctions",value:function(){this.writeViewValueFunction=this.accessor.writeValue.bind(this.accessor),this.registerOnViewValueChangeFunction=this.accessor.registerOnChange.bind(this.accessor)}}]),e}(),d=o(4788),g=function(){var t=function(){function t(e){r(this,t),this.onDestroy=new c.xQ,this.controlValueOperators=[];var i=n(e,1)[0];i&&(this.interceptor=new v(i)),this.makeSequencesAndPassValues()}return u(t,[{key:"ngOnDestroy",value:function(){var e;null===(e=this.interceptor)||void 0===e||e.detach(),this.onDestroy.next(),this.onDestroy.complete()}},{key:"attach",value:function(e){this.controlValueOperators=this.controlValueOperators.concat(e)}},{key:"detach",value:function(e){this.controlValueOperators=this.controlValueOperators.filter((0,s.De)(e))}},{key:"toModelValue",value:function(n){var t,i=n,r=e(this.controlValueOperators);try{for(r.s();!(t=r.n()).done;){var o=t.value;i=(0,l.qK)(o.toModelValue)?o.toModelValue(i):i}}catch(u){r.e(u)}finally{r.f()}return i}},{key:"toViewValue",value:function(n){var t,i=n,r=e(this.controlValueOperators);try{for(r.s();!(t=r.n()).done;){var o=t.value;i=(0,l.qK)(o.toViewValue)?o.toViewValue(i):i}}catch(u){r.e(u)}finally{r.f()}return i}},{key:"makeSequencesAndPassValues",value:function(){this.listenViewConvertToModelValue(),this.listenModelConvertToViewValue()}},{key:"listenModelConvertToViewValue",value:function(){var e,n=this;null===(e=this.interceptor)||void 0===e||e.onModelValueChanged.pipe((0,f.U)(function(e){return n.toViewValue(e)}),(0,h.R)(this.onDestroy)).subscribe(function(e){var t;return null===(t=n.interceptor)||void 0===t?void 0:t.pushViewValue(e)})}},{key:"listenViewConvertToModelValue",value:function(){var e,n=this;null===(e=this.interceptor)||void 0===e||e.onViewValueChanged.pipe((0,f.U)(function(e){return n.toModelValue(e)}),(0,h.R)(this.onDestroy)).subscribe(function(e){var t;return null===(t=n.interceptor)||void 0===t?void 0:t.pushModelValue(e)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.LFG(a.JU,2))},t.\u0275prov=d.Yz7({token:t,factory:t.\u0275fac}),t}()},7247:function(e,n,t){"use strict";function i(e){return"function"==typeof e}t.d(n,{qK:function(){return i}}),t(9868)},4889:function(e,n,t){"use strict";var i=t(1211),o=t(4788),u=t(9868),a=t(8497),s=t(5363),l=t(3050),c=t(3121),f=t(4141),h=t(2118),v=t(4525),d=t(591),g=function(){var e=function e(){r(this,e)};return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["app-root"]],decls:32,vars:0,consts:[[1,"dashboard"],["mode","side","opened","",1,"dashboard__menu"],[1,"title"],["src","assets/img/angular.svg","alt","angular",1,"logo"],["routerLink","/",1,"logo-title"],[1,"menu"],[1,"menu__item"],["routerLink","samples/guide"],[1,"dashboard__content"]],template:function(e,n){1&e&&(o.TgZ(0,"mat-drawer-container",0),o._uU(1,"\n "),o.TgZ(2,"mat-drawer",1),o._uU(3,"\n "),o.TgZ(4,"mat-toolbar",2),o._uU(5,"\n "),o._UZ(6,"img",3),o._uU(7,"\n "),o.TgZ(8,"a",4),o._uU(9,"@angular-ru/common"),o.qZA(),o._uU(10,"\n "),o.qZA(),o._uU(11,"\n\n "),o.TgZ(12,"mat-list",5),o._uU(13,"\n "),o.TgZ(14,"mat-list-item",6),o._uU(15,"\n "),o.TgZ(16,"a",7),o._uU(17,"- "),o.TgZ(18,"strong"),o._uU(19,"Guide overview"),o.qZA(),o.qZA(),o._uU(20,"\n "),o.qZA(),o._uU(21,"\n "),o._UZ(22,"mat-divider"),o._uU(23,"\n "),o.qZA(),o._uU(24,"\n "),o.qZA(),o._uU(25,"\n\n "),o.TgZ(26,"mat-drawer-content",8),o._uU(27,"\n "),o._UZ(28,"router-outlet"),o._uU(29,"\n "),o.qZA(),o._uU(30,"\n"),o.qZA(),o._uU(31,"\n"))},directives:[l.kh,l.jA,c.Ye,v.yS,s.i$,s.Tg,d.d,l.LW,v.lC],encapsulation:2,changeDetection:0}),e}(),p=function(){var e=function e(){r(this,e)};return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[v.Bz.forRoot([{path:"",pathMatch:"full",redirectTo:"samples"},{path:"samples",children:[{path:"",pathMatch:"full",redirectTo:"guide"},{path:"guide",loadChildren:function(){return t.e(551).then(t.bind(t,6551)).then(function(e){return e.GuideModule})}}]}],{useHash:!0,scrollPositionRestoration:"enabled"})],v.Bz]}),e}();t(802);var m=function(){var e=function e(){r(this,e)};return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=o.oAB({type:e,bootstrap:[g]}),e.\u0275inj=o.cJS({imports:[[i.b2,a.JF,p,f.PW,l.SJ,c.g0,s.ie,h.V6.forRoot()]]}),e}();(0,u.oA)(!0)&&(0,o.G48)(),i.q6().bootstrapModule(m,{ngZoneEventCoalescing:!0}).catch(function(e){return console.error(e)})},416:function(e,n,t){"use strict";t.d(n,{I8:function(){return r}});var i=t(9868);function r(e){return(0,i.kK)(e)?e:JSON.parse(JSON.stringify(e))}},5850:function(e,n,t){"use strict";t.d(n,{hX:function(){return o},B3:function(){return u},QH:function(){return a},a9:function(){return s}});var i=t(433),r=t(7247);function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(n)?function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,i.NL)(n)?e:Array.from(e).filter(function(e){return n.includes(e)}).join("")}(e,n):(0,r.qK)(n)?function(e,n){return Array.from(e).filter(n).join("")}(e,n):n instanceof RegExp?function(e,n){var t;return(null!==(t=e.match(n))&&void 0!==t?t:[]).join("")}(e,n):e}function u(e){return null==e?void 0:e.slice(-1)}function a(e){return null==e?void 0:e.slice(0,-1)}function s(e){var n;return null!==(n=null==e?void 0:e.replace(/[^\d,.-]/g,"").replace(/^\.|^,/,""))&&void 0!==n?n:""}},9868:function(e,n,t){"use strict";function i(e){return!function(e){var n="string"==typeof e?e.trim():e;return[void 0,null,NaN,"",1/0].includes(n)}(e)}function r(e){return null==e}function o(e){return!r(e)}function u(e){r(e)||(Array.isArray(e)?e.forEach(function(e){return a(e)}):o(e)&&a(e))}function a(e){o(e)&&!e.destroyed&&e.detectChanges()}function s(e){return!0===e}t.d(n,{ZM:function(){return i},ZK:function(){return u},kK:function(){return r},DX:function(){return o},oA:function(){return s}})}},function(e){"use strict";e.O(0,[736],function(){return e(e.s=4889)}),e.O()}])}();