Socket
Socket
Sign inDemoInstall

angular-l10n

Package Overview
Dependencies
9
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.1.0 to 10.1.1

2

bundles/angular-l10n.umd.min.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/router"),require("@angular/forms")):"function"==typeof define&&define.amd?define("angular-l10n",["exports","@angular/core","rxjs","rxjs/operators","@angular/common","@angular/router","@angular/forms"],e):e((t=t||self)["angular-l10n"]={},t.ng.core,t.rxjs,t.rxjs.operators,t.ng.common,t.ng.router,t.ng.forms)}(this,(function(t,e,n,r,o,a,i){"use strict";var u=new e.InjectionToken("L10N_CONFIG"),s=new e.InjectionToken("L10N_LOCALE"),l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function c(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function p(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function f(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function u(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,u)}s((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}Object.create;function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,a=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}Object.create;function v(t,e){return"angular-l10n ("+t.name+"): "+e}function m(t){return new RegExp(/^([a-z]{2,3})(\-[A-Z][a-z]{3})?(\-[A-Z]{2})?(-u.+)?$/).test(t)}function b(t,e){if(null==t||""===t)return"";if(!m(t))throw v(b,"Invalid language");var n=g(t.match(/^([a-z]{2,3})(\-[A-Z][a-z]{3})?(\-[A-Z]{2})?/)||[],4),r=n[1],o=void 0===r?"":r,a=n[2],i=void 0===a?"":a,u=n[3],s=void 0===u?"":u;switch(e){case"language":return o;case"language-script":return o+i;case"language-region":return o+s;case"language-script-region":return o+i+s}}function L(t,e,n){return t.find((function(t){return b(t.locale.language,n)===e}))}function I(t,e,n){return e?n?t.split(n).reduce((function(t,e){return t&&t[e]||null}),e):e[t]:null}function j(t,e){return t.replace(/{{\s?([^{}\s]*)\s?}}/g,(function(t,n){var r=e[n];return void 0!==r?r:t}))}function x(t,e){var n=Object.assign({},t);return M(t)&&M(e)&&Object.keys(e).forEach((function(r){var o,a;M(e[r])?r in t?n[r]=x(t[r],e[r]):Object.assign(n,((o={})[r]=e[r],o)):Object.assign(n,((a={})[r]=e[r],a))})),n}function P(){return"object"==typeof Intl&&!!Intl}function T(){return P()&&Intl.hasOwnProperty("DateTimeFormat")}function D(){return P()&&Intl.hasOwnProperty("NumberFormat")}function w(){if(P()&&T()){try{new Intl.DateTimeFormat("en-US",{timeZone:"America/Los_Angeles"}).format(new Date)}catch(t){return!1}return!0}return!1}function N(){return P()&&Intl.hasOwnProperty("RelativeTimeFormat")}function O(){return P()&&Intl.hasOwnProperty("Collator")}function A(){return P()&&Intl.hasOwnProperty("PluralRules")}function V(){return P()&&Intl.hasOwnProperty("ListFormat")}function R(t){return"string"!=typeof t||isNaN(+t-parseFloat(t))?t:+t}function S(t){if(_(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),!isNaN(t-parseFloat(t)))return new Date(parseFloat(t));if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){var e=g(t.split("-").map((function(t){return+t})),3),n=e[0],r=e[1],o=e[2];return new Date(n,r-1,o)}var a=t.match(/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);if(a)return function(t){var e=new Date(0),n=0,r=0,o=t[8]?e.setUTCFullYear:e.setFullYear,a=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),r=Number(t[9]+t[11]));o.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));var i=Number(t[4]||0)-n,u=Number(t[5]||0)-r,s=Number(t[6]||0),l=Math.round(1e3*parseFloat("0."+(t[7]||0)));return a.call(e,i,u,s,l),e}(a)}var i=new Date(t);if(!_(i))throw v(S,"Invalid date");return i}var C={full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},medium:{year:"numeric",month:"short",day:"numeric"},short:{year:"2-digit",month:"numeric",day:"numeric"}},E={full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"long"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},short:{hour:"numeric",minute:"numeric"}};function F(t){var e=t.match(/^(\d+)?\.((\d+)(\-(\d+))?)?$/);if(null==e)throw v(F,"Invalid digits");return{minimumIntegerDigits:e[1]?parseInt(e[1]):void 0,minimumFractionDigits:e[3]?parseInt(e[3]):void 0,maximumFractionDigits:e[5]?parseInt(e[5]):void 0}}function M(t){return"object"==typeof t&&!Array.isArray(t)}function _(t){return t instanceof Date&&!isNaN(t.valueOf())}var k=function(){function t(){this.cache={}}return t.prototype.read=function(t,e){if(this.cache[t])return this.cache[t];var n=e.pipe(r.shareReplay(1));return this.cache[t]=n,n},t}();k.decorators=[{type:e.Injectable}];var z=function(){};z.decorators=[{type:e.Injectable}];var H=function(){function t(){}return t.prototype.read=function(){return f(this,void 0,void 0,(function(){return h(this,(function(t){return[2,Promise.resolve(null)]}))}))},t.prototype.write=function(t){return f(this,void 0,void 0,(function(){return h(this,(function(t){return[2]}))}))},t}();H.decorators=[{type:e.Injectable}];var Z=function(){};Z.decorators=[{type:e.Injectable}];var U=function(){function t(t){this.config=t}return t.prototype.get=function(){return f(this,void 0,void 0,(function(){var t;return h(this,(function(e){if(t=null,"undefined"!=typeof navigator&&navigator.language)switch(this.config.format){case"language":t=navigator.language.split("-")[0];break;case"language-region":t=navigator.language}return[2,Promise.resolve(t)]}))}))},t}();U.decorators=[{type:e.Injectable}],U.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[u]}]}]};var $=function(){};$.decorators=[{type:e.Injectable}];var q=function(){function t(){}return t.prototype.get=function(e,r){return r.asset[e]?n.of(r.asset[e]):n.throwError(v(t,"Asset not found"))},t}();q.decorators=[{type:e.Injectable}];var B=function(){};B.decorators=[{type:e.Injectable}];var G=function(){function t(t,e,n){this.config=t,this.cache=e,this.translationLoader=n}return t.prototype.get=function(t,e){var n,r,o=[],a=t.match(/-?[a-zA-z]+/g)||[],i="";try{for(var u=d(a),s=u.next();!s.done;s=u.next()){i+=s.value,this.config.cache?o.push(this.cache.read(e.name+"-"+i,this.translationLoader.get(i,e))):o.push(this.translationLoader.get(i,e))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return o},t}();G.decorators=[{type:e.Injectable}],G.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[u]}]},{type:k},{type:$}]};var Y=function(){};Y.decorators=[{type:e.Injectable}];var X=function(){function t(){}return t.prototype.parseValue=function(t,e,n){return e?j(n,e):n},t}();X.decorators=[{type:e.Injectable}];var J=function(){};J.decorators=[{type:e.Injectable}];var K=function(){function t(){}return t.prototype.handle=function(t){return t},t}();K.decorators=[{type:e.Injectable}];var Q=function(){};Q.decorators=[{type:e.Injectable}];var W=function(){function t(t,e){this.config=t,this.injector=e}return Object.defineProperty(t.prototype,"location",{get:function(){return this.injector.get(o.Location)},enumerable:!1,configurable:!0}),t.prototype.path=function(){return this.location.path(!0)},t.prototype.parsePath=function(t){if(!t)return null;var e=this.getLocalizedSegment(t);return null!=e?e.replace(/\//g,""):null},t.prototype.getLocalizedSegment=function(t){var e,n;try{for(var r=d(this.config.schema),o=r.next();!o.done;o=r.next()){var a=b(o.value.locale.language,this.config.format),i=new RegExp("(/"+a+"/)|(/"+a+"$)"),u=t.match(i);if(null!=u)return u[0]}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.toLocalizedPath=function(t,e){var n=this.getLocalizedSegment(e);return null!=n&&n.includes(t)?e:o.Location.stripTrailingSlash("/"+t+e)},t}();W.decorators=[{type:e.Injectable}],W.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[u]}]},{type:e.Injector}]};var tt=function(){function t(t,e,r,o,a,i,u,s,l,c){this.config=t,this.locale=e,this.cache=r,this.storage=o,this.userLanguage=a,this.translationFallback=i,this.translationLoader=u,this.translationHandler=s,this.missingTranslationHandler=l,this.location=c,this.data={},this.translation=new n.BehaviorSubject(this.locale),this.error=new n.BehaviorSubject(null)}return t.prototype.getLocale=function(){return this.locale},t.prototype.setLocale=function(t){return f(this,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return[4,this.loadTranslation(this.config.providers,t)];case 1:return e.sent(),[2]}}))}))},t.prototype.onChange=function(){return this.translation.asObservable()},t.prototype.onError=function(){return this.error.asObservable()},t.prototype.translate=function(t,e,n){var r,o;if(void 0===n&&(n=this.locale.language),n=b(n,this.config.format),Array.isArray(t)){var a={};try{for(var i=d(t),u=i.next();!u.done;u=i.next()){var s=u.value;a[s]=this.translate(s,e,n)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}var l=I(t,this.data[n],this.config.keySeparator);return l?this.translationHandler.parseValue(t,e,l):this.missingTranslationHandler.handle(t)},t.prototype.has=function(t,e){return void 0===e&&(e=this.locale.language),e=b(e,this.config.format),null!==I(t,this.data[e],this.config.keySeparator)},t.prototype.getLanguageDirection=function(t){void 0===t&&(t=this.locale.language);var e=L(this.config.schema,t,this.config.format);if(e)return e.dir},t.prototype.getAvailableLanguages=function(){var t=this;return this.config.schema.map((function(e){return b(e.locale.language,t.config.format)}))},t.prototype.init=function(){return f(this,void 0,void 0,(function(){var t,e,n,r,o;return h(this,(function(a){switch(a.label){case 0:return t=null,this.location?(e=this.location.path(),[4,this.location.parsePath(e)]):[3,2];case 1:(n=a.sent())&&(o=L(this.config.schema,n,this.config.format))&&(t=o.locale),a.label=2;case 2:return null!=t?[3,4]:[4,this.storage.read()];case 3:t=a.sent(),a.label=4;case 4:return null!=t?[3,6]:[4,this.userLanguage.get()];case 5:(r=a.sent())&&(o=L(this.config.schema,r,this.config.format))&&(t=o.locale),a.label=6;case 6:return null==t&&(t=this.config.defaultLocale),[4,this.loadTranslation(this.config.providers,t)];case 7:return a.sent(),[2]}}))}))},t.prototype.loadTranslation=function(t,e){return void 0===t&&(t=this.config.providers),void 0===e&&(e=this.locale),f(this,void 0,void 0,(function(){var r,o=this;return h(this,(function(a){return t.forEach((function(t){o.config.providers.find((function(e){return e.name===t.name}))||o.config.providers.push(t)})),r=b(e.language,this.config.format),[2,new Promise((function(a){n.concat.apply(void 0,y(o.getTranslation(t,r))).subscribe({next:function(t){return o.addData(t,r)},error:function(t){o.handleError(t),a()},complete:function(){o.releaseTranslation(e),a()}})}))]}))}))},t.prototype.addData=function(t,e){this.data[e]=void 0!==this.data[e]?x(this.data[e],t):t},t.prototype.getTranslation=function(t,e){var r,o,a=[],i=[];try{for(var u=d(t),s=u.next();!s.done;s=u.next()){var l=s.value;this.config.fallback?i=i.concat(this.translationFallback.get(e,l)):this.config.cache?a.push(this.cache.read(l.name+"-"+e,this.translationLoader.get(e,l))):a.push(this.translationLoader.get(e,l))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return i.push(n.merge.apply(void 0,y(a))),i},t.prototype.handleError=function(t){this.error.next(t)},t.prototype.releaseTranslation=function(t){Object.assign(this.locale,t),this.translation.next(this.locale),this.storage.write(this.locale)},t}();tt.decorators=[{type:e.Injectable}],tt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[u]}]},{type:void 0,decorators:[{type:e.Inject,args:[s]}]},{type:k},{type:z},{type:Z},{type:B},{type:$},{type:Y},{type:J},{type:Q,decorators:[{type:e.Optional}]}]};var et=function(){function t(t,e){var n=this;this.translation=t,this.cdr=e,this.onChanges=this.translation.onChange().subscribe({next:function(){return n.cdr.markForCheck()}})}return t.prototype.ngOnDestroy=function(){this.onChanges&&this.onChanges.unsubscribe()},t}();function nt(t){return function(t){var e,n,r,o=[],a=0,i=1;o.push(t);for(;o.length>0&&a<=10;){if(r=o.splice(0,1)[0],void 0!==(c=r)&&3===c.nodeType&&null!=c.nodeValue&&""!==c.nodeValue.trim())return r;if(a<10&&r.childNodes)try{for(var u=(e=void 0,d(Array.from(r.childNodes))),s=u.next();!s.done;s=u.next()){var l=s.value;rt(l)&&o.push(l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}0==--i&&(a++,i=o.length)}var c;return t}(t)}et.decorators=[{type:e.Injectable}],et.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef}]};function rt(t){var e,n;if(void 0!==t&&1===t.nodeType&&t.attributes)try{for(var r=d(Array.from(t.attributes)),o=r.next();!o.done;o=r.next()){var a=o.value;if(a&&/^l10n|translate/.test(a.name))return!1}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!0}var ot=function(){function t(t,e,r){this.el=t,this.renderer=e,this.translation=r,this.destroy=new n.Subject}return t.prototype.ngAfterViewInit=function(){this.el&&this.el.nativeElement&&(this.element=this.el.nativeElement,this.renderNode=nt(this.element),this.text=this.getText(),this.attributes=this.getAttributes(),this.addTextListener(),this.language?(this.replaceText(),this.replaceAttributes()):this.addTranslationListener())},t.prototype.ngOnChanges=function(){this.text&&(null!=this.nodeValue&&""!==this.nodeValue||(this.value?this.text=this.value:this.innerHTML&&(this.text=this.innerHTML)),this.replaceText()),this.attributes&&this.attributes.length>0&&this.replaceAttributes()},t.prototype.ngOnDestroy=function(){this.destroy.next(!0),this.removeTextListener()},t.prototype.getText=function(){var t="";return this.element.childNodes.length>0?t=this.getNodeValue():this.value?t=this.value:this.innerHTML&&(t=this.innerHTML),t},t.prototype.getNodeValue=function(){return this.nodeValue=null!=this.renderNode&&null!=this.renderNode.nodeValue?this.renderNode.nodeValue:"",this.nodeValue?this.nodeValue.trim():""},t.prototype.getAttributes=function(){var t,e,n=[];if(this.element.attributes){var r=function(t){if(t&&t.name){var e=g(t.name.match(/^l10n-(.+)$/)||[],2)[1],r=void 0===e?"":e;if(r){var a=Array.from(o.element.attributes).find((function(t){return t.name===r}));a&&n.push({name:a.name,value:a.value})}}},o=this;try{for(var a=d(Array.from(this.element.attributes)),i=a.next();!i.done;i=a.next()){r(i.value)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}return n},t.prototype.addTextListener=function(){var t=this;"undefined"!=typeof MutationObserver&&(this.textObserver=new MutationObserver((function(){t.renderNode=nt(t.element),t.text=t.getText(),t.replaceText()})),this.textObserver.observe(this.renderNode,{subtree:!0,characterData:!0}))},t.prototype.removeTextListener=function(){void 0!==this.textObserver&&this.textObserver.disconnect()},t.prototype.addTranslationListener=function(){var t=this;this.translation.onChange().pipe(r.takeUntil(this.destroy)).subscribe({next:function(){t.replaceText(),t.replaceAttributes()}})},t.prototype.replaceText=function(){this.text&&this.setText(this.getValue(this.text))},t.prototype.replaceAttributes=function(){this.attributes.length>0&&this.setAttributes(this.getAttributesValues())},t.prototype.setText=function(t){t&&(this.nodeValue&&this.text?(this.removeTextListener(),this.renderer.setValue(this.renderNode,this.nodeValue.replace(this.text,t)),this.addTextListener()):this.value?this.renderer.setAttribute(this.element,"value",t):this.innerHTML&&this.renderer.setProperty(this.element,"innerHTML",t))},t.prototype.setAttributes=function(t){var e,n;try{for(var r=d(this.attributes),o=r.next();!o.done;o=r.next()){var a=o.value;this.renderer.setAttribute(this.element,a.name,t[a.value])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.getAttributesValues=function(){var t,e,n=this.attributes.map((function(t){return t.value})),r={};try{for(var o=d(n),a=o.next();!a.done;a=o.next()){var i=a.value;r[i]=this.getValue(i)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t}();ot.decorators=[{type:e.Directive}],ot.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt}]},ot.propDecorators={value:[{type:e.Input}],innerHTML:[{type:e.Input}],language:[{type:e.Input}]};var at=function(){function t(t){this.translation=t}return t.prototype.resolve=function(t,e){return f(this,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return[4,this.translation.init()];case 1:return e.sent(),[4,this.translation.loadTranslation(t.data.l10nProviders)];case 2:return e.sent(),[2]}}))}))},t}();at.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new at(e.ɵɵinject(tt))},token:at,providedIn:"root"}),at.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],at.ctorParameters=function(){return[{type:tt}]};var it=function(){function t(t,e,n,r,o,a){this.platformId=t,this.config=e,this.locale=n,this.translation=r,this.l10nLocation=o,this.injector=a}return Object.defineProperty(t.prototype,"router",{get:function(){return this.injector.get(a.Router)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.injector.get(o.Location)},enumerable:!1,configurable:!0}),t.prototype.init=function(){return f(this,void 0,void 0,(function(){var t=this;return h(this,(function(e){return this.router.events.pipe(r.filter((function(t){return t instanceof a.NavigationStart}))).subscribe({next:function(e){t.redirectToPath(e.url,"popstate"===e.navigationTrigger||1===e.id)}}),this.router.events.pipe(r.filter((function(t){return t instanceof a.NavigationEnd}))).subscribe({next:function(e){var n=e.url&&"/"!==e.url&&e.url===e.urlAfterRedirects?e.url:e.urlAfterRedirects;t.replacePath(t.locale,n)}}),o.isPlatformBrowser(this.platformId)&&this.translation.onChange().subscribe({next:function(e){return t.replacePath(e)}}),[2]}))}))},t.prototype.redirectToPath=function(t,e){var n=this.l10nLocation.getLocalizedSegment(t);if(null!=n){var r=t.replace(n,"/");this.router.navigateByUrl(r,{skipLocationChange:e})}},t.prototype.replacePath=function(t,e){if(""!==t.language){var n=b(t.language,this.config.format);if(e)this.isDefaultRouting()||this.location.replaceState(this.l10nLocation.toLocalizedPath(n,e));else{e=this.l10nLocation.path();var r=this.l10nLocation.getLocalizedSegment(e);null!=r&&(e=e.replace(r,"/"),this.isDefaultRouting()&&this.location.replaceState(e)),this.isDefaultRouting()||this.location.replaceState(this.l10nLocation.toLocalizedPath(n,e))}}},t.prototype.isDefaultRouting=function(){return!!this.config.defaultRouting&&b(this.locale.language,this.config.format)===b(this.config.defaultLocale.language,this.config.format)},t}();it.decorators=[{type:e.Injectable}],it.ctorParameters=function(){return[{type:Object,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]},{type:void 0,decorators:[{type:e.Inject,args:[u]}]},{type:void 0,decorators:[{type:e.Inject,args:[s]}]},{type:tt},{type:Q},{type:e.Injector}]};var ut=function(){};ut.decorators=[{type:e.Injectable}];var st=function(){function t(t){this.translation=t}return t.prototype.init=function(){return f(this,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:return[4,this.translation.init()];case 1:return t.sent(),[2]}}))}))},t}();st.decorators=[{type:e.Injectable}],st.ctorParameters=function(){return[{type:tt}]};var lt=function(){function t(t,e){this.routing=t,this.translation=e}return t.prototype.init=function(){return f(this,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:return[4,this.routing.init()];case 1:return t.sent(),[4,this.translation.init()];case 2:return t.sent(),[2]}}))}))},t}();lt.decorators=[{type:e.Injectable}],lt.ctorParameters=function(){return[{type:it},{type:tt}]};var ct=function(){function t(t){this.translation=t}return t.prototype.transform=function(t,e,n){return null==t||""===t?null:this.translation.translate(t,n,e)},t}();ct.decorators=[{type:e.Pipe,args:[{name:"translate",pure:!0}]}],ct.ctorParameters=function(){return[{type:tt}]};var pt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.translation=e,r.cdr=n,r}return c(e,t),e.prototype.transform=function(t,e,n){return null==t||""===t?null:this.translation.translate(t,e,n)},e}(et);pt.decorators=[{type:e.Pipe,args:[{name:"translateAsync",pure:!1}]}],pt.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef}]};var ft=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.el=e,o.renderer=n,o.translation=r,o}return c(e,t),Object.defineProperty(e.prototype,"l10nTranslate",{set:function(t){this.params=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"translate",{set:function(t){this.params=t},enumerable:!1,configurable:!0}),e.prototype.getValue=function(t){return this.translation.translate(t,this.params,this.language)},e}(ot);ft.decorators=[{type:e.Directive,args:[{selector:"[l10nTranslate],[translate]"}]}],ft.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt}]},ft.propDecorators={l10nTranslate:[{type:e.Input}],translate:[{type:e.Input}],params:[{type:e.Input}]};var ht=function(){function t(){}return t.forRoot=function(e,n){return void 0===n&&(n={}),{ngModule:t,providers:[tt,k,{provide:u,useValue:e},{provide:s,useValue:{language:""}},{provide:z,useClass:n.storage||H},{provide:Z,useClass:n.userLanguage||U},{provide:B,useClass:n.translationFallback||G},{provide:$,useClass:n.translationLoader||q},{provide:Y,useClass:n.translationHandler||X},{provide:J,useClass:n.missingTranslationHandler||K},{provide:ut,useClass:st}]}},t}();ht.decorators=[{type:e.NgModule,args:[{declarations:[ct,pt,ft],exports:[ct,pt,ft]}]}];var dt=function(){function t(t,e){this.locale=t,this.translation=e}return t.prototype.formatDate=function(t,e,n,r){if(void 0===n&&(n=this.locale.dateLanguage||this.locale.language),void 0===r&&(r=this.locale.timeZone),!T()||null==n||""===n)return t;t=S(t);var o={};if(e&&e){var a=e.dateStyle,i=e.timeStyle,u=p(e,["dateStyle","timeStyle"]);a&&(o=Object.assign(Object.assign({},o),C[a])),i&&(o=Object.assign(Object.assign({},o),E[i])),o=Object.assign(Object.assign({},o),u)}return w()&&r&&(o.timeZone=r),new Intl.DateTimeFormat(n,o).format(t)},t.prototype.formatNumber=function(t,e,n,r){if(void 0===n&&(n=this.locale.numberLanguage||this.locale.language),void 0===r&&(r=this.locale.currency),!D()&&e&&"currency"===e.style)return t+" "+r;if(!D()||null==n||""===n)return t;t=R(t);var o={};if(e){var a=e.digits,i=p(e,["digits"]);a&&(o=Object.assign(Object.assign({},o),F(a))),o=Object.assign(Object.assign({},o),i)}return r&&(o.currency=r),new Intl.NumberFormat(n,o).format(t)},t.prototype.formatRelativeTime=function(t,e,n,r){return void 0===r&&(r=this.locale.dateLanguage||this.locale.language),N()&&null!=r&&""!==r?(t=R(t),new Intl.RelativeTimeFormat(r,n).format(t,e)):t},t.prototype.getCurrencySymbol=function(t){void 0===t&&(t=this.locale);var e=t.currency;if(D()){var n=this.formatNumber(0,{digits:"1.0-0"},t.numberLanguage||t.language);e=(e=this.formatNumber(0,{digits:"1.0-0",style:"currency",currencyDisplay:"symbol"},t.numberLanguage||t.language,t.currency).replace(n,"")).trim()}return e},t.prototype.compare=function(t,e,n,r){if(void 0===r&&(r=this.locale.language),!O()||null==r||""===r)return 0;var o=this.translation.translate(t),a=this.translation.translate(e);return new Intl.Collator(r,n).compare(o,a)},t.prototype.plural=function(t,e,n){if(void 0===n&&(n=this.locale.language),!A()||null==n||""===n)return t.toString();var r=new Intl.PluralRules(n,e).select(t);return this.translation.has(r)?this.translation.translate(r):r},t.prototype.list=function(t,e,n){var r=this;void 0===n&&(n=this.locale.language);var o=t.map((function(t){return r.translation.translate(t)}));return V()&&null!=n&&""!==n?new Intl.ListFormat(n,e).format(o):o.toString()},t}();dt.decorators=[{type:e.Injectable}],dt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[s]}]},{type:tt}]};var gt=function(){function t(t){this.intl=t}return t.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatDate(t,n,e,r)},t}();gt.decorators=[{type:e.Pipe,args:[{name:"l10nDate",pure:!0}]}],gt.ctorParameters=function(){return[{type:dt}]};var yt=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.translation=e,o.cdr=n,o.intl=r,o}return c(e,t),e.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatDate(t,e,n,r)},e}(et);yt.decorators=[{type:e.Pipe,args:[{name:"l10nDateAsync",pure:!1}]}],yt.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef},{type:dt}]};var vt=function(){function t(t){this.intl=t}return t.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatNumber(t,n,e,r)},t}();vt.decorators=[{type:e.Pipe,args:[{name:"l10nNumber",pure:!0}]}],vt.ctorParameters=function(){return[{type:dt}]};var mt=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.translation=e,o.cdr=n,o.intl=r,o}return c(e,t),e.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatNumber(t,e,n,r)},e}(et);mt.decorators=[{type:e.Pipe,args:[{name:"l10nNumberAsync",pure:!1}]}],mt.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef},{type:dt}]};var bt=function(){function t(t){this.intl=t}return t.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatRelativeTime(t,n,r,e)},t}();bt.decorators=[{type:e.Pipe,args:[{name:"l10nTimeAgo",pure:!0}]}],bt.ctorParameters=function(){return[{type:dt}]};var Lt=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.translation=e,o.cdr=n,o.intl=r,o}return c(e,t),e.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatRelativeTime(t,e,n,r)},e}(et);Lt.decorators=[{type:e.Pipe,args:[{name:"l10nTimeAgoAsync",pure:!1}]}],Lt.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef},{type:dt}]};var It=function(t){function e(e,n,r,o){var a=t.call(this,e,n,r)||this;return a.el=e,a.renderer=n,a.translation=r,a.intl=o,a}return c(e,t),Object.defineProperty(e.prototype,"l10nDate",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),e.prototype.getValue=function(t){return this.intl.formatDate(t,this.options,this.language,this.timezone)},e}(ot);It.decorators=[{type:e.Directive,args:[{selector:"[l10nDate]"}]}],It.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt},{type:dt}]},It.propDecorators={l10nDate:[{type:e.Input}],options:[{type:e.Input}],timezone:[{type:e.Input}]};var jt=function(t){function e(e,n,r,o){var a=t.call(this,e,n,r)||this;return a.el=e,a.renderer=n,a.translation=r,a.intl=o,a}return c(e,t),Object.defineProperty(e.prototype,"l10nNumber",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),e.prototype.getValue=function(t){return this.intl.formatNumber(t,this.options,this.language,this.currency)},e}(ot);jt.decorators=[{type:e.Directive,args:[{selector:"[l10nNumber]"}]}],jt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt},{type:dt}]},jt.propDecorators={l10nNumber:[{type:e.Input}],options:[{type:e.Input}],currency:[{type:e.Input}]};var xt=function(t){function e(e,n,r,o){var a=t.call(this,e,n,r)||this;return a.el=e,a.renderer=n,a.translation=r,a.intl=o,a}return c(e,t),Object.defineProperty(e.prototype,"l10nTimeAgo",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),e.prototype.getValue=function(t){return this.intl.formatRelativeTime(t,this.unit,this.options,this.language)},e}(ot);xt.decorators=[{type:e.Directive,args:[{selector:"[l10nTimeAgo]"}]}],xt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt},{type:dt}]},xt.propDecorators={l10nTimeAgo:[{type:e.Input}],unit:[{type:e.Input}],options:[{type:e.Input}]};var Pt=function(){};Pt.decorators=[{type:e.NgModule,args:[{declarations:[gt,vt,bt,yt,mt,Lt,It,jt,xt],exports:[gt,vt,bt,yt,mt,Lt,It,jt,xt],providers:[dt]}]}];var Tt=function(){};Tt.decorators=[{type:e.Injectable}];var Dt=function(){function t(t){this.locale=t}return t.prototype.parseNumber=function(t,e,n){return void 0===n&&(n=this.locale.numberLanguage||this.locale.language),null},t.prototype.parseDate=function(t,e,n){return void 0===n&&(n=this.locale.dateLanguage||this.locale.language),null},t}();function wt(t,e,n,r,o){void 0===n&&(n=Number.MIN_VALUE),void 0===r&&(r=Number.MAX_VALUE);return function(a){if(""===a.value||null==a.value)return null;var i=t.parseNumber(a.value,e,o);return null!=i?i<n?{minValue:!0}:i>r?{maxValue:!0}:null:{format:!0}}}Dt.decorators=[{type:e.Injectable}],Dt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[s]}]}]};var Nt=function(){function t(t){this.validation=t}return Object.defineProperty(t.prototype,"l10nValidateNumber",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.validator=wt(this.validation,this.options,this.minValue,this.maxValue,this.language)},t.prototype.ngOnChanges=function(){this.validator=wt(this.validation,this.options,this.minValue,this.maxValue,this.language)},t.prototype.validate=function(t){return this.validator(t)},t}();function Ot(t,e,n,r,o){return function(a){if(""===a.value||null==a.value)return null;var i=t.parseDate(a.value,e,o);return null!=i?n&&i<n?{mindate:!0}:r&&i>r?{maxDate:!0}:null:{format:!0}}}Nt.decorators=[{type:e.Directive,args:[{selector:"[l10nValidateNumber][ngModel],[l10nValidateNumber][formControl],[l10nValidateNumber][formControlName]",providers:[{provide:i.NG_VALIDATORS,useExisting:e.forwardRef((function(){return Nt})),multi:!0}]}]}],Nt.ctorParameters=function(){return[{type:Tt}]},Nt.propDecorators={l10nValidateNumber:[{type:e.Input}],options:[{type:e.Input}],minValue:[{type:e.Input}],maxValue:[{type:e.Input}],language:[{type:e.Input}]};var At=function(){function t(t){this.validation=t}return Object.defineProperty(t.prototype,"l10nValidateDate",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.validator=Ot(this.validation,this.options,this.minDate,this.maxDate,this.language)},t.prototype.ngOnChanges=function(){this.validator=Ot(this.validation,this.options,this.minDate,this.maxDate,this.language)},t.prototype.validate=function(t){return this.validator(t)},t}();At.decorators=[{type:e.Directive,args:[{selector:"[l10nValidateDate][ngModel],[l10nValidateDate][formControl],[l10nValidateDate][formControlName]",providers:[{provide:i.NG_VALIDATORS,useExisting:e.forwardRef((function(){return At})),multi:!0}]}]}],At.ctorParameters=function(){return[{type:Tt}]},At.propDecorators={l10nValidateDate:[{type:e.Input}],options:[{type:e.Input}],minDate:[{type:e.Input}],maxDate:[{type:e.Input}],language:[{type:e.Input}]};var Vt=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[{provide:Tt,useClass:e.validation||Dt}]}},t}();Vt.decorators=[{type:e.NgModule,args:[{declarations:[Nt,At],exports:[Nt,At]}]}];var Rt=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[it,{provide:Q,useClass:e.location||W},{provide:ut,useClass:lt}]}},t}();Rt.decorators=[{type:e.NgModule,args:[{}]}],t.L10N_CONFIG=u,t.L10N_LOCALE=s,t.L10nAsyncPipe=et,t.L10nCache=k,t.L10nDateAsyncPipe=yt,t.L10nDateDirective=It,t.L10nDatePipe=gt,t.L10nDirective=ot,t.L10nIntlModule=Pt,t.L10nIntlService=dt,t.L10nLoader=ut,t.L10nLocation=Q,t.L10nMissingTranslationHandler=J,t.L10nNumberAsyncPipe=mt,t.L10nNumberDirective=jt,t.L10nNumberPipe=vt,t.L10nResolver=at,t.L10nRoutingModule=Rt,t.L10nRoutingService=it,t.L10nStorage=z,t.L10nTimeAgoAsyncPipe=Lt,t.L10nTimeAgoDirective=xt,t.L10nTimeAgoPipe=bt,t.L10nTranslateAsyncPipe=pt,t.L10nTranslateDirective=ft,t.L10nTranslatePipe=ct,t.L10nTranslationFallback=B,t.L10nTranslationHandler=Y,t.L10nTranslationLoader=$,t.L10nTranslationModule=ht,t.L10nTranslationService=tt,t.L10nUserLanguage=Z,t.L10nValidateDateDirective=At,t.L10nValidateNumberDirective=Nt,t.L10nValidation=Tt,t.L10nValidationModule=Vt,t.PARSE_DATE_STYLE=C,t.PARSE_TIME_STYLE=E,t.formatLanguage=b,t.getBrowserLanguage=function(){var t=null;return"undefined"!=typeof navigator&&navigator.language&&(t=navigator.language.split("-")[0]),t},t.getSchema=L,t.getValue=I,t.handleParams=j,t.hasCollator=O,t.hasDateTimeFormat=T,t.hasIntl=P,t.hasListFormat=V,t.hasNumberFormat=D,t.hasPluralRules=A,t.hasRelativeTimeFormat=N,t.hasTimeZone=w,t.l10nValidateDate=Ot,t.l10nValidateNumber=wt,t.mergeDeep=x,t.parseDigits=F,t.parseLanguage=function t(e){var n=e.match(/^([a-z]{2,3})(\-([A-Z][a-z]{3}))?(\-([A-Z]{2}))?(-u.+)?$/);if(null==n)throw v(t,"Invalid language");return{language:n[1],script:n[3],region:n[5],extension:n[6]}},t.toDate=S,t.toNumber=R,t.validateLanguage=m,t.ɵa=H,t.ɵb=U,t.ɵc=G,t.ɵd=q,t.ɵe=X,t.ɵf=K,t.ɵg=st,t.ɵh=lt,t.ɵi=Dt,t.ɵj=W,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/router"),require("@angular/forms")):"function"==typeof define&&define.amd?define("angular-l10n",["exports","@angular/core","rxjs","rxjs/operators","@angular/common","@angular/router","@angular/forms"],e):e((t=t||self)["angular-l10n"]={},t.ng.core,t.rxjs,t.rxjs.operators,t.ng.common,t.ng.router,t.ng.forms)}(this,(function(t,e,n,r,o,a,i){"use strict";var u=new e.InjectionToken("L10N_CONFIG"),s=new e.InjectionToken("L10N_LOCALE"),l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function c(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function p(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function f(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function u(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,u)}s((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}Object.create;function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,a=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}Object.create;function v(t,e){return"angular-l10n ("+t.name+"): "+e}function m(t){return new RegExp(/^([a-z]{2,3})(\-[A-Z][a-z]{3})?(\-[A-Z]{2})?(-u.+)?$/).test(t)}function b(t,e){if(null==t||""===t)return"";if(!m(t))throw v(b,"Invalid language");var n=g(t.match(/^([a-z]{2,3})(\-[A-Z][a-z]{3})?(\-[A-Z]{2})?/)||[],4),r=n[1],o=void 0===r?"":r,a=n[2],i=void 0===a?"":a,u=n[3],s=void 0===u?"":u;switch(e){case"language":return o;case"language-script":return o+i;case"language-region":return o+s;case"language-script-region":return o+i+s}}function L(t,e,n){return t.find((function(t){return b(t.locale.language,n)===e}))}function I(t,e,n){return e?n?t.split(n).reduce((function(t,e){return t&&t[e]||null}),e):e[t]:null}function j(t,e){return t.replace(/{{\s?([^{}\s]*)\s?}}/g,(function(t,n){var r=e[n];return void 0!==r?r:t}))}function x(t,e){var n=Object.assign({},t);return M(t)&&M(e)&&Object.keys(e).forEach((function(r){var o,a;M(e[r])?r in t?n[r]=x(t[r],e[r]):Object.assign(n,((o={})[r]=e[r],o)):Object.assign(n,((a={})[r]=e[r],a))})),n}function P(){return"object"==typeof Intl&&!!Intl}function T(){return P()&&Intl.hasOwnProperty("DateTimeFormat")}function D(){return P()&&Intl.hasOwnProperty("NumberFormat")}function w(){if(P()&&T()){try{new Intl.DateTimeFormat("en-US",{timeZone:"America/Los_Angeles"}).format(new Date)}catch(t){return!1}return!0}return!1}function N(){return P()&&Intl.hasOwnProperty("RelativeTimeFormat")}function O(){return P()&&Intl.hasOwnProperty("Collator")}function A(){return P()&&Intl.hasOwnProperty("PluralRules")}function V(){return P()&&Intl.hasOwnProperty("ListFormat")}function R(t){return"string"!=typeof t||isNaN(+t-parseFloat(t))?t:+t}function S(t){if(_(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),!isNaN(t-parseFloat(t)))return new Date(parseFloat(t));if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){var e=g(t.split("-").map((function(t){return+t})),3),n=e[0],r=e[1],o=e[2];return new Date(n,r-1,o)}var a=t.match(/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);if(a)return function(t){var e=new Date(0),n=0,r=0,o=t[8]?e.setUTCFullYear:e.setFullYear,a=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),r=Number(t[9]+t[11]));o.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));var i=Number(t[4]||0)-n,u=Number(t[5]||0)-r,s=Number(t[6]||0),l=Math.round(1e3*parseFloat("0."+(t[7]||0)));return a.call(e,i,u,s,l),e}(a)}var i=new Date(t);if(!_(i))throw v(S,"Invalid date");return i}var C={full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},medium:{year:"numeric",month:"short",day:"numeric"},short:{year:"2-digit",month:"numeric",day:"numeric"}},E={full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"long"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},short:{hour:"numeric",minute:"numeric"}};function F(t){var e=t.match(/^(\d+)?\.((\d+)(\-(\d+))?)?$/);if(null==e)throw v(F,"Invalid digits");return{minimumIntegerDigits:e[1]?parseInt(e[1]):void 0,minimumFractionDigits:e[3]?parseInt(e[3]):void 0,maximumFractionDigits:e[5]?parseInt(e[5]):void 0}}function M(t){return"object"==typeof t&&!Array.isArray(t)}function _(t){return t instanceof Date&&!isNaN(t.valueOf())}var k=function(){function t(){this.cache={}}return t.prototype.read=function(t,e){if(this.cache[t])return this.cache[t];var n=e.pipe(r.shareReplay(1));return this.cache[t]=n,n},t}();k.decorators=[{type:e.Injectable}];var z=function(){};z.decorators=[{type:e.Injectable}];var H=function(){function t(){}return t.prototype.read=function(){return f(this,void 0,void 0,(function(){return h(this,(function(t){return[2,Promise.resolve(null)]}))}))},t.prototype.write=function(t){return f(this,void 0,void 0,(function(){return h(this,(function(t){return[2]}))}))},t}();H.decorators=[{type:e.Injectable}];var Z=function(){};Z.decorators=[{type:e.Injectable}];var U=function(){function t(t){this.config=t}return t.prototype.get=function(){return f(this,void 0,void 0,(function(){var t;return h(this,(function(e){if(t=null,"undefined"!=typeof navigator&&navigator.language)switch(this.config.format){case"language":t=navigator.language.split("-")[0];break;case"language-region":t=navigator.language}return[2,Promise.resolve(t)]}))}))},t}();U.decorators=[{type:e.Injectable}],U.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[u]}]}]};var $=function(){};$.decorators=[{type:e.Injectable}];var q=function(){function t(){}return t.prototype.get=function(e,r){return r.asset[e]?n.of(r.asset[e]):n.throwError(v(t,"Asset not found"))},t}();q.decorators=[{type:e.Injectable}];var B=function(){};B.decorators=[{type:e.Injectable}];var G=function(){function t(t,e,n){this.config=t,this.cache=e,this.translationLoader=n}return t.prototype.get=function(t,e){var n,r,o=[],a=t.match(/-?[a-zA-z]+/g)||[],i="";try{for(var u=d(a),s=u.next();!s.done;s=u.next()){i+=s.value,this.config.cache?o.push(this.cache.read(e.name+"-"+i,this.translationLoader.get(i,e))):o.push(this.translationLoader.get(i,e))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return o},t}();G.decorators=[{type:e.Injectable}],G.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[u]}]},{type:k},{type:$}]};var Y=function(){};Y.decorators=[{type:e.Injectable}];var X=function(){function t(){}return t.prototype.parseValue=function(t,e,n){return e?j(n,e):n},t}();X.decorators=[{type:e.Injectable}];var J=function(){};J.decorators=[{type:e.Injectable}];var K=function(){function t(){}return t.prototype.handle=function(t){return t},t}();K.decorators=[{type:e.Injectable}];var Q=function(){};Q.decorators=[{type:e.Injectable}];var W=function(){function t(t,e){this.config=t,this.injector=e}return Object.defineProperty(t.prototype,"location",{get:function(){return this.injector.get(o.Location)},enumerable:!1,configurable:!0}),t.prototype.path=function(){return this.location.path(!0)},t.prototype.parsePath=function(t){if(!t)return null;var e=this.getLocalizedSegment(t);return null!=e?e.replace(/\//g,""):null},t.prototype.getLocalizedSegment=function(t){var e,n;try{for(var r=d(this.config.schema),o=r.next();!o.done;o=r.next()){var a=b(o.value.locale.language,this.config.format),i=new RegExp("(/"+a+"/)|(/"+a+"$)|(/("+a+")(?=\\?))|(/("+a+")(?=\\#))"),u=t.match(i);if(null!=u)return u[0]}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.toLocalizedPath=function(t,e){var n=this.getLocalizedSegment(e);return null!=n&&n.includes(t)?e:o.Location.stripTrailingSlash("/"+t+e)},t}();W.decorators=[{type:e.Injectable}],W.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[u]}]},{type:e.Injector}]};var tt=function(){function t(t,e,r,o,a,i,u,s,l,c){this.config=t,this.locale=e,this.cache=r,this.storage=o,this.userLanguage=a,this.translationFallback=i,this.translationLoader=u,this.translationHandler=s,this.missingTranslationHandler=l,this.location=c,this.data={},this.translation=new n.BehaviorSubject(this.locale),this.error=new n.BehaviorSubject(null)}return t.prototype.getLocale=function(){return this.locale},t.prototype.setLocale=function(t){return f(this,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return[4,this.loadTranslation(this.config.providers,t)];case 1:return e.sent(),[2]}}))}))},t.prototype.onChange=function(){return this.translation.asObservable()},t.prototype.onError=function(){return this.error.asObservable()},t.prototype.translate=function(t,e,n){var r,o;if(void 0===n&&(n=this.locale.language),n=b(n,this.config.format),Array.isArray(t)){var a={};try{for(var i=d(t),u=i.next();!u.done;u=i.next()){var s=u.value;a[s]=this.translate(s,e,n)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}var l=I(t,this.data[n],this.config.keySeparator);return l?this.translationHandler.parseValue(t,e,l):this.missingTranslationHandler.handle(t)},t.prototype.has=function(t,e){return void 0===e&&(e=this.locale.language),e=b(e,this.config.format),null!==I(t,this.data[e],this.config.keySeparator)},t.prototype.getLanguageDirection=function(t){void 0===t&&(t=this.locale.language);var e=L(this.config.schema,t,this.config.format);if(e)return e.dir},t.prototype.getAvailableLanguages=function(){var t=this;return this.config.schema.map((function(e){return b(e.locale.language,t.config.format)}))},t.prototype.init=function(){return f(this,void 0,void 0,(function(){var t,e,n,r,o;return h(this,(function(a){switch(a.label){case 0:return t=null,this.location?(e=this.location.path(),[4,this.location.parsePath(e)]):[3,2];case 1:(n=a.sent())&&(o=L(this.config.schema,n,this.config.format))&&(t=o.locale),a.label=2;case 2:return null!=t?[3,4]:[4,this.storage.read()];case 3:t=a.sent(),a.label=4;case 4:return null!=t?[3,6]:[4,this.userLanguage.get()];case 5:(r=a.sent())&&(o=L(this.config.schema,r,this.config.format))&&(t=o.locale),a.label=6;case 6:return null==t&&(t=this.config.defaultLocale),[4,this.loadTranslation(this.config.providers,t)];case 7:return a.sent(),[2]}}))}))},t.prototype.loadTranslation=function(t,e){return void 0===t&&(t=this.config.providers),void 0===e&&(e=this.locale),f(this,void 0,void 0,(function(){var r,o=this;return h(this,(function(a){return t.forEach((function(t){o.config.providers.find((function(e){return e.name===t.name}))||o.config.providers.push(t)})),r=b(e.language,this.config.format),[2,new Promise((function(a){n.concat.apply(void 0,y(o.getTranslation(t,r))).subscribe({next:function(t){return o.addData(t,r)},error:function(t){o.handleError(t),a()},complete:function(){o.releaseTranslation(e),a()}})}))]}))}))},t.prototype.addData=function(t,e){this.data[e]=void 0!==this.data[e]?x(this.data[e],t):t},t.prototype.getTranslation=function(t,e){var r,o,a=[],i=[];try{for(var u=d(t),s=u.next();!s.done;s=u.next()){var l=s.value;this.config.fallback?i=i.concat(this.translationFallback.get(e,l)):this.config.cache?a.push(this.cache.read(l.name+"-"+e,this.translationLoader.get(e,l))):a.push(this.translationLoader.get(e,l))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return i.push(n.merge.apply(void 0,y(a))),i},t.prototype.handleError=function(t){this.error.next(t)},t.prototype.releaseTranslation=function(t){Object.assign(this.locale,t),this.translation.next(this.locale),this.storage.write(this.locale)},t}();tt.decorators=[{type:e.Injectable}],tt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[u]}]},{type:void 0,decorators:[{type:e.Inject,args:[s]}]},{type:k},{type:z},{type:Z},{type:B},{type:$},{type:Y},{type:J},{type:Q,decorators:[{type:e.Optional}]}]};var et=function(){function t(t,e){var n=this;this.translation=t,this.cdr=e,this.onChanges=this.translation.onChange().subscribe({next:function(){return n.cdr.markForCheck()}})}return t.prototype.ngOnDestroy=function(){this.onChanges&&this.onChanges.unsubscribe()},t}();function nt(t){return function(t){var e,n,r,o=[],a=0,i=1;o.push(t);for(;o.length>0&&a<=10;){if(r=o.splice(0,1)[0],void 0!==(c=r)&&3===c.nodeType&&null!=c.nodeValue&&""!==c.nodeValue.trim())return r;if(a<10&&r.childNodes)try{for(var u=(e=void 0,d(Array.from(r.childNodes))),s=u.next();!s.done;s=u.next()){var l=s.value;rt(l)&&o.push(l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}0==--i&&(a++,i=o.length)}var c;return t}(t)}et.decorators=[{type:e.Injectable}],et.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef}]};function rt(t){var e,n;if(void 0!==t&&1===t.nodeType&&t.attributes)try{for(var r=d(Array.from(t.attributes)),o=r.next();!o.done;o=r.next()){var a=o.value;if(a&&/^l10n|translate/.test(a.name))return!1}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!0}var ot=function(){function t(t,e,r){this.el=t,this.renderer=e,this.translation=r,this.destroy=new n.Subject}return t.prototype.ngAfterViewInit=function(){this.el&&this.el.nativeElement&&(this.element=this.el.nativeElement,this.renderNode=nt(this.element),this.text=this.getText(),this.attributes=this.getAttributes(),this.addTextListener(),this.language?(this.replaceText(),this.replaceAttributes()):this.addTranslationListener())},t.prototype.ngOnChanges=function(){this.text&&(null!=this.nodeValue&&""!==this.nodeValue||(this.value?this.text=this.value:this.innerHTML&&(this.text=this.innerHTML)),this.replaceText()),this.attributes&&this.attributes.length>0&&this.replaceAttributes()},t.prototype.ngOnDestroy=function(){this.destroy.next(!0),this.removeTextListener()},t.prototype.getText=function(){var t="";return this.element.childNodes.length>0?t=this.getNodeValue():this.value?t=this.value:this.innerHTML&&(t=this.innerHTML),t},t.prototype.getNodeValue=function(){return this.nodeValue=null!=this.renderNode&&null!=this.renderNode.nodeValue?this.renderNode.nodeValue:"",this.nodeValue?this.nodeValue.trim():""},t.prototype.getAttributes=function(){var t,e,n=[];if(this.element.attributes){var r=function(t){if(t&&t.name){var e=g(t.name.match(/^l10n-(.+)$/)||[],2)[1],r=void 0===e?"":e;if(r){var a=Array.from(o.element.attributes).find((function(t){return t.name===r}));a&&n.push({name:a.name,value:a.value})}}},o=this;try{for(var a=d(Array.from(this.element.attributes)),i=a.next();!i.done;i=a.next()){r(i.value)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}return n},t.prototype.addTextListener=function(){var t=this;"undefined"!=typeof MutationObserver&&(this.textObserver=new MutationObserver((function(){t.renderNode=nt(t.element),t.text=t.getText(),t.replaceText()})),this.textObserver.observe(this.renderNode,{subtree:!0,characterData:!0}))},t.prototype.removeTextListener=function(){void 0!==this.textObserver&&this.textObserver.disconnect()},t.prototype.addTranslationListener=function(){var t=this;this.translation.onChange().pipe(r.takeUntil(this.destroy)).subscribe({next:function(){t.replaceText(),t.replaceAttributes()}})},t.prototype.replaceText=function(){this.text&&this.setText(this.getValue(this.text))},t.prototype.replaceAttributes=function(){this.attributes.length>0&&this.setAttributes(this.getAttributesValues())},t.prototype.setText=function(t){t&&(this.nodeValue&&this.text?(this.removeTextListener(),this.renderer.setValue(this.renderNode,this.nodeValue.replace(this.text,t)),this.addTextListener()):this.value?this.renderer.setAttribute(this.element,"value",t):this.innerHTML&&this.renderer.setProperty(this.element,"innerHTML",t))},t.prototype.setAttributes=function(t){var e,n;try{for(var r=d(this.attributes),o=r.next();!o.done;o=r.next()){var a=o.value;this.renderer.setAttribute(this.element,a.name,t[a.value])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.getAttributesValues=function(){var t,e,n=this.attributes.map((function(t){return t.value})),r={};try{for(var o=d(n),a=o.next();!a.done;a=o.next()){var i=a.value;r[i]=this.getValue(i)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t}();ot.decorators=[{type:e.Directive}],ot.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt}]},ot.propDecorators={value:[{type:e.Input}],innerHTML:[{type:e.Input}],language:[{type:e.Input}]};var at=function(){function t(t){this.translation=t}return t.prototype.resolve=function(t,e){return f(this,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return[4,this.translation.init()];case 1:return e.sent(),[4,this.translation.loadTranslation(t.data.l10nProviders)];case 2:return e.sent(),[2]}}))}))},t}();at.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new at(e.ɵɵinject(tt))},token:at,providedIn:"root"}),at.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],at.ctorParameters=function(){return[{type:tt}]};var it=function(){function t(t,e,n,r,o,a){this.platformId=t,this.config=e,this.locale=n,this.translation=r,this.l10nLocation=o,this.injector=a}return Object.defineProperty(t.prototype,"router",{get:function(){return this.injector.get(a.Router)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.injector.get(o.Location)},enumerable:!1,configurable:!0}),t.prototype.init=function(){return f(this,void 0,void 0,(function(){var t=this;return h(this,(function(e){return this.router.events.pipe(r.filter((function(t){return t instanceof a.NavigationStart}))).subscribe({next:function(e){t.redirectToPath(e.url,"popstate"===e.navigationTrigger||1===e.id)}}),this.router.events.pipe(r.filter((function(t){return t instanceof a.NavigationEnd}))).subscribe({next:function(e){var n=e.url&&"/"!==e.url&&e.url===e.urlAfterRedirects?e.url:e.urlAfterRedirects;t.replacePath(t.locale,n)}}),o.isPlatformBrowser(this.platformId)&&this.translation.onChange().subscribe({next:function(e){return t.replacePath(e)}}),[2]}))}))},t.prototype.redirectToPath=function(t,e){var n=this.l10nLocation.getLocalizedSegment(t);if(null!=n){var r=t.replace(n,"/");this.router.navigateByUrl(r,{skipLocationChange:e})}},t.prototype.replacePath=function(t,e){if(""!==t.language){var n=b(t.language,this.config.format);if(e)this.isDefaultRouting()||this.location.replaceState(this.l10nLocation.toLocalizedPath(n,e));else{e=this.l10nLocation.path();var r=this.l10nLocation.getLocalizedSegment(e);null!=r&&(e=e.replace(r,"/"),this.isDefaultRouting()&&this.location.replaceState(e)),this.isDefaultRouting()||this.location.replaceState(this.l10nLocation.toLocalizedPath(n,e))}}},t.prototype.isDefaultRouting=function(){return!!this.config.defaultRouting&&b(this.locale.language,this.config.format)===b(this.config.defaultLocale.language,this.config.format)},t}();it.decorators=[{type:e.Injectable}],it.ctorParameters=function(){return[{type:Object,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]},{type:void 0,decorators:[{type:e.Inject,args:[u]}]},{type:void 0,decorators:[{type:e.Inject,args:[s]}]},{type:tt},{type:Q},{type:e.Injector}]};var ut=function(){};ut.decorators=[{type:e.Injectable}];var st=function(){function t(t){this.translation=t}return t.prototype.init=function(){return f(this,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:return[4,this.translation.init()];case 1:return t.sent(),[2]}}))}))},t}();st.decorators=[{type:e.Injectable}],st.ctorParameters=function(){return[{type:tt}]};var lt=function(){function t(t,e){this.routing=t,this.translation=e}return t.prototype.init=function(){return f(this,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:return[4,this.routing.init()];case 1:return t.sent(),[4,this.translation.init()];case 2:return t.sent(),[2]}}))}))},t}();lt.decorators=[{type:e.Injectable}],lt.ctorParameters=function(){return[{type:it},{type:tt}]};var ct=function(){function t(t){this.translation=t}return t.prototype.transform=function(t,e,n){return null==t||""===t?null:this.translation.translate(t,n,e)},t}();ct.decorators=[{type:e.Pipe,args:[{name:"translate",pure:!0}]}],ct.ctorParameters=function(){return[{type:tt}]};var pt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.translation=e,r.cdr=n,r}return c(e,t),e.prototype.transform=function(t,e,n){return null==t||""===t?null:this.translation.translate(t,e,n)},e}(et);pt.decorators=[{type:e.Pipe,args:[{name:"translateAsync",pure:!1}]}],pt.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef}]};var ft=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.el=e,o.renderer=n,o.translation=r,o}return c(e,t),Object.defineProperty(e.prototype,"l10nTranslate",{set:function(t){this.params=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"translate",{set:function(t){this.params=t},enumerable:!1,configurable:!0}),e.prototype.getValue=function(t){return this.translation.translate(t,this.params,this.language)},e}(ot);ft.decorators=[{type:e.Directive,args:[{selector:"[l10nTranslate],[translate]"}]}],ft.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt}]},ft.propDecorators={l10nTranslate:[{type:e.Input}],translate:[{type:e.Input}],params:[{type:e.Input}]};var ht=function(){function t(){}return t.forRoot=function(e,n){return void 0===n&&(n={}),{ngModule:t,providers:[tt,k,{provide:u,useValue:e},{provide:s,useValue:{language:""}},{provide:z,useClass:n.storage||H},{provide:Z,useClass:n.userLanguage||U},{provide:B,useClass:n.translationFallback||G},{provide:$,useClass:n.translationLoader||q},{provide:Y,useClass:n.translationHandler||X},{provide:J,useClass:n.missingTranslationHandler||K},{provide:ut,useClass:st}]}},t}();ht.decorators=[{type:e.NgModule,args:[{declarations:[ct,pt,ft],exports:[ct,pt,ft]}]}];var dt=function(){function t(t,e){this.locale=t,this.translation=e}return t.prototype.formatDate=function(t,e,n,r){if(void 0===n&&(n=this.locale.dateLanguage||this.locale.language),void 0===r&&(r=this.locale.timeZone),!T()||null==n||""===n)return t;t=S(t);var o={};if(e&&e){var a=e.dateStyle,i=e.timeStyle,u=p(e,["dateStyle","timeStyle"]);a&&(o=Object.assign(Object.assign({},o),C[a])),i&&(o=Object.assign(Object.assign({},o),E[i])),o=Object.assign(Object.assign({},o),u)}return w()&&r&&(o.timeZone=r),new Intl.DateTimeFormat(n,o).format(t)},t.prototype.formatNumber=function(t,e,n,r){if(void 0===n&&(n=this.locale.numberLanguage||this.locale.language),void 0===r&&(r=this.locale.currency),!D()&&e&&"currency"===e.style)return t+" "+r;if(!D()||null==n||""===n)return t;t=R(t);var o={};if(e){var a=e.digits,i=p(e,["digits"]);a&&(o=Object.assign(Object.assign({},o),F(a))),o=Object.assign(Object.assign({},o),i)}return r&&(o.currency=r),new Intl.NumberFormat(n,o).format(t)},t.prototype.formatRelativeTime=function(t,e,n,r){return void 0===r&&(r=this.locale.dateLanguage||this.locale.language),N()&&null!=r&&""!==r?(t=R(t),new Intl.RelativeTimeFormat(r,n).format(t,e)):t},t.prototype.getCurrencySymbol=function(t){void 0===t&&(t=this.locale);var e=t.currency;if(D()){var n=this.formatNumber(0,{digits:"1.0-0"},t.numberLanguage||t.language);e=(e=this.formatNumber(0,{digits:"1.0-0",style:"currency",currencyDisplay:"symbol"},t.numberLanguage||t.language,t.currency).replace(n,"")).trim()}return e},t.prototype.compare=function(t,e,n,r){if(void 0===r&&(r=this.locale.language),!O()||null==r||""===r)return 0;var o=this.translation.translate(t),a=this.translation.translate(e);return new Intl.Collator(r,n).compare(o,a)},t.prototype.plural=function(t,e,n){if(void 0===n&&(n=this.locale.language),!A()||null==n||""===n)return t.toString();var r=new Intl.PluralRules(n,e).select(t);return this.translation.has(r)?this.translation.translate(r):r},t.prototype.list=function(t,e,n){var r=this;void 0===n&&(n=this.locale.language);var o=t.map((function(t){return r.translation.translate(t)}));return V()&&null!=n&&""!==n?new Intl.ListFormat(n,e).format(o):o.toString()},t}();dt.decorators=[{type:e.Injectable}],dt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[s]}]},{type:tt}]};var gt=function(){function t(t){this.intl=t}return t.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatDate(t,n,e,r)},t}();gt.decorators=[{type:e.Pipe,args:[{name:"l10nDate",pure:!0}]}],gt.ctorParameters=function(){return[{type:dt}]};var yt=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.translation=e,o.cdr=n,o.intl=r,o}return c(e,t),e.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatDate(t,e,n,r)},e}(et);yt.decorators=[{type:e.Pipe,args:[{name:"l10nDateAsync",pure:!1}]}],yt.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef},{type:dt}]};var vt=function(){function t(t){this.intl=t}return t.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatNumber(t,n,e,r)},t}();vt.decorators=[{type:e.Pipe,args:[{name:"l10nNumber",pure:!0}]}],vt.ctorParameters=function(){return[{type:dt}]};var mt=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.translation=e,o.cdr=n,o.intl=r,o}return c(e,t),e.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatNumber(t,e,n,r)},e}(et);mt.decorators=[{type:e.Pipe,args:[{name:"l10nNumberAsync",pure:!1}]}],mt.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef},{type:dt}]};var bt=function(){function t(t){this.intl=t}return t.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatRelativeTime(t,n,r,e)},t}();bt.decorators=[{type:e.Pipe,args:[{name:"l10nTimeAgo",pure:!0}]}],bt.ctorParameters=function(){return[{type:dt}]};var Lt=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.translation=e,o.cdr=n,o.intl=r,o}return c(e,t),e.prototype.transform=function(t,e,n,r){return null==t||""===t?null:this.intl.formatRelativeTime(t,e,n,r)},e}(et);Lt.decorators=[{type:e.Pipe,args:[{name:"l10nTimeAgoAsync",pure:!1}]}],Lt.ctorParameters=function(){return[{type:tt},{type:e.ChangeDetectorRef},{type:dt}]};var It=function(t){function e(e,n,r,o){var a=t.call(this,e,n,r)||this;return a.el=e,a.renderer=n,a.translation=r,a.intl=o,a}return c(e,t),Object.defineProperty(e.prototype,"l10nDate",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),e.prototype.getValue=function(t){return this.intl.formatDate(t,this.options,this.language,this.timezone)},e}(ot);It.decorators=[{type:e.Directive,args:[{selector:"[l10nDate]"}]}],It.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt},{type:dt}]},It.propDecorators={l10nDate:[{type:e.Input}],options:[{type:e.Input}],timezone:[{type:e.Input}]};var jt=function(t){function e(e,n,r,o){var a=t.call(this,e,n,r)||this;return a.el=e,a.renderer=n,a.translation=r,a.intl=o,a}return c(e,t),Object.defineProperty(e.prototype,"l10nNumber",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),e.prototype.getValue=function(t){return this.intl.formatNumber(t,this.options,this.language,this.currency)},e}(ot);jt.decorators=[{type:e.Directive,args:[{selector:"[l10nNumber]"}]}],jt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt},{type:dt}]},jt.propDecorators={l10nNumber:[{type:e.Input}],options:[{type:e.Input}],currency:[{type:e.Input}]};var xt=function(t){function e(e,n,r,o){var a=t.call(this,e,n,r)||this;return a.el=e,a.renderer=n,a.translation=r,a.intl=o,a}return c(e,t),Object.defineProperty(e.prototype,"l10nTimeAgo",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),e.prototype.getValue=function(t){return this.intl.formatRelativeTime(t,this.unit,this.options,this.language)},e}(ot);xt.decorators=[{type:e.Directive,args:[{selector:"[l10nTimeAgo]"}]}],xt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:tt},{type:dt}]},xt.propDecorators={l10nTimeAgo:[{type:e.Input}],unit:[{type:e.Input}],options:[{type:e.Input}]};var Pt=function(){};Pt.decorators=[{type:e.NgModule,args:[{declarations:[gt,vt,bt,yt,mt,Lt,It,jt,xt],exports:[gt,vt,bt,yt,mt,Lt,It,jt,xt],providers:[dt]}]}];var Tt=function(){};Tt.decorators=[{type:e.Injectable}];var Dt=function(){function t(t){this.locale=t}return t.prototype.parseNumber=function(t,e,n){return void 0===n&&(n=this.locale.numberLanguage||this.locale.language),null},t.prototype.parseDate=function(t,e,n){return void 0===n&&(n=this.locale.dateLanguage||this.locale.language),null},t}();function wt(t,e,n,r,o){void 0===n&&(n=Number.MIN_VALUE),void 0===r&&(r=Number.MAX_VALUE);return function(a){if(""===a.value||null==a.value)return null;var i=t.parseNumber(a.value,e,o);return null!=i?i<n?{minValue:!0}:i>r?{maxValue:!0}:null:{format:!0}}}Dt.decorators=[{type:e.Injectable}],Dt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[s]}]}]};var Nt=function(){function t(t){this.validation=t}return Object.defineProperty(t.prototype,"l10nValidateNumber",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.validator=wt(this.validation,this.options,this.minValue,this.maxValue,this.language)},t.prototype.ngOnChanges=function(){this.validator=wt(this.validation,this.options,this.minValue,this.maxValue,this.language)},t.prototype.validate=function(t){return this.validator(t)},t}();function Ot(t,e,n,r,o){return function(a){if(""===a.value||null==a.value)return null;var i=t.parseDate(a.value,e,o);return null!=i?n&&i<n?{mindate:!0}:r&&i>r?{maxDate:!0}:null:{format:!0}}}Nt.decorators=[{type:e.Directive,args:[{selector:"[l10nValidateNumber][ngModel],[l10nValidateNumber][formControl],[l10nValidateNumber][formControlName]",providers:[{provide:i.NG_VALIDATORS,useExisting:e.forwardRef((function(){return Nt})),multi:!0}]}]}],Nt.ctorParameters=function(){return[{type:Tt}]},Nt.propDecorators={l10nValidateNumber:[{type:e.Input}],options:[{type:e.Input}],minValue:[{type:e.Input}],maxValue:[{type:e.Input}],language:[{type:e.Input}]};var At=function(){function t(t){this.validation=t}return Object.defineProperty(t.prototype,"l10nValidateDate",{set:function(t){this.options=t},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.validator=Ot(this.validation,this.options,this.minDate,this.maxDate,this.language)},t.prototype.ngOnChanges=function(){this.validator=Ot(this.validation,this.options,this.minDate,this.maxDate,this.language)},t.prototype.validate=function(t){return this.validator(t)},t}();At.decorators=[{type:e.Directive,args:[{selector:"[l10nValidateDate][ngModel],[l10nValidateDate][formControl],[l10nValidateDate][formControlName]",providers:[{provide:i.NG_VALIDATORS,useExisting:e.forwardRef((function(){return At})),multi:!0}]}]}],At.ctorParameters=function(){return[{type:Tt}]},At.propDecorators={l10nValidateDate:[{type:e.Input}],options:[{type:e.Input}],minDate:[{type:e.Input}],maxDate:[{type:e.Input}],language:[{type:e.Input}]};var Vt=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[{provide:Tt,useClass:e.validation||Dt}]}},t}();Vt.decorators=[{type:e.NgModule,args:[{declarations:[Nt,At],exports:[Nt,At]}]}];var Rt=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[it,{provide:Q,useClass:e.location||W},{provide:ut,useClass:lt}]}},t}();Rt.decorators=[{type:e.NgModule,args:[{}]}],t.L10N_CONFIG=u,t.L10N_LOCALE=s,t.L10nAsyncPipe=et,t.L10nCache=k,t.L10nDateAsyncPipe=yt,t.L10nDateDirective=It,t.L10nDatePipe=gt,t.L10nDirective=ot,t.L10nIntlModule=Pt,t.L10nIntlService=dt,t.L10nLoader=ut,t.L10nLocation=Q,t.L10nMissingTranslationHandler=J,t.L10nNumberAsyncPipe=mt,t.L10nNumberDirective=jt,t.L10nNumberPipe=vt,t.L10nResolver=at,t.L10nRoutingModule=Rt,t.L10nRoutingService=it,t.L10nStorage=z,t.L10nTimeAgoAsyncPipe=Lt,t.L10nTimeAgoDirective=xt,t.L10nTimeAgoPipe=bt,t.L10nTranslateAsyncPipe=pt,t.L10nTranslateDirective=ft,t.L10nTranslatePipe=ct,t.L10nTranslationFallback=B,t.L10nTranslationHandler=Y,t.L10nTranslationLoader=$,t.L10nTranslationModule=ht,t.L10nTranslationService=tt,t.L10nUserLanguage=Z,t.L10nValidateDateDirective=At,t.L10nValidateNumberDirective=Nt,t.L10nValidation=Tt,t.L10nValidationModule=Vt,t.PARSE_DATE_STYLE=C,t.PARSE_TIME_STYLE=E,t.formatLanguage=b,t.getBrowserLanguage=function(){var t=null;return"undefined"!=typeof navigator&&navigator.language&&(t=navigator.language.split("-")[0]),t},t.getSchema=L,t.getValue=I,t.handleParams=j,t.hasCollator=O,t.hasDateTimeFormat=T,t.hasIntl=P,t.hasListFormat=V,t.hasNumberFormat=D,t.hasPluralRules=A,t.hasRelativeTimeFormat=N,t.hasTimeZone=w,t.l10nValidateDate=Ot,t.l10nValidateNumber=wt,t.mergeDeep=x,t.parseDigits=F,t.parseLanguage=function t(e){var n=e.match(/^([a-z]{2,3})(\-([A-Z][a-z]{3}))?(\-([A-Z]{2}))?(-u.+)?$/);if(null==n)throw v(t,"Invalid language");return{language:n[1],script:n[3],region:n[5],extension:n[6]}},t.toDate=S,t.toNumber=R,t.validateLanguage=m,t.ɵa=H,t.ɵb=U,t.ɵc=G,t.ɵd=q,t.ɵe=X,t.ɵf=K,t.ɵg=st,t.ɵh=lt,t.ɵi=Dt,t.ɵj=W,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=angular-l10n.umd.min.js.map

@@ -37,3 +37,3 @@ import { Injectable, Injector, Inject } from '@angular/core';

const language = formatLanguage(element.locale.language, this.config.format);
const regex = new RegExp(`(\/${language}\/)|(\/${language}$)`);
const regex = new RegExp(`(\/${language}\/)|(\/${language}$)|(\/(${language})(?=\\?))|(\/(${language})(?=\\#))`);
const segments = path.match(regex);

@@ -60,2 +60,2 @@ if (segments != null) {

];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDEwbi1sb2NhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItbDEwbi9zcmMvbGliL3NlcnZpY2VzL2wxMG4tbG9jYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzdELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUUzQyxPQUFPLEVBQUU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cXC8ke2xhbmd1YWdlfVxcLyl8KFxcLyR7bGFuZ3VhZ2V9JCl8KFxcLygke2xhbmd1YWdlfSkoPz1cXFxcPykpfChcXC8oJHtsYW5ndWFnZX0pKD89XFxcXCMpKWApO1xyXG4gICAgICAgICAgICBjb25zdCBzZWdtZW50cyA9IHBhdGgubWF0Y2gocmVnZXgpO1xyXG4gICAgICAgICAgICBpZiAoc2VnbWVudHMgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNlZ21lbnRzWzBdO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB0b0xvY2FsaXplZFBhdGgobGFuZ3VhZ2U6IHN0cmluZywgcGF0aDogc3RyaW5nKTogc3RyaW5nIHtcclxuICAgICAgICBjb25zdCBzZWdtZW50ID0gdGhpcy5nZXRMb2NhbGl6ZWRTZWdtZW50KHBhdGgpO1xyXG4gICAgICAgIGlmIChzZWdtZW50ICE9IG51bGwgJiYgc2VnbWVudC5pbmNsdWRlcyhsYW5ndWFnZSkpIHJldHVybiBwYXRoO1xyXG5cclxuICAgICAgICByZXR1cm4gTG9jYXRpb24uc3RyaXBUcmFpbGluZ1NsYXNoKCcvJyArIGxhbmd1YWdlICsgcGF0aCk7XHJcbiAgICB9XHJcblxyXG59XHJcbiJdfQ==

@@ -421,3 +421,3 @@ import { InjectionToken, Injectable, Inject, Injector, Optional, ChangeDetectorRef, Directive, ElementRef, Renderer2, Input, ɵɵdefineInjectable, ɵɵinject, PLATFORM_ID, Pipe, NgModule, forwardRef } from '@angular/core';

const language = formatLanguage(element.locale.language, this.config.format);
const regex = new RegExp(`(\/${language}\/)|(\/${language}$)`);
const regex = new RegExp(`(\/${language}\/)|(\/${language}$)|(\/(${language})(?=\\?))|(\/(${language})(?=\\#))`);
const segments = path.match(regex);

@@ -424,0 +424,0 @@ if (segments != null) {

@@ -19,3 +19,3 @@ import { Injector } from '@angular/core';

/**
* This method must contain the logic toget the localized segment in the path.
* This method must contain the logic to get the localized segment in the path.
* @param path The localized path

@@ -22,0 +22,0 @@ */

{
"name": "angular-l10n",
"version": "10.1.0",
"version": "10.1.1",
"author": "Roberto Simonetti",

@@ -5,0 +5,0 @@ "description": "An Angular library to translate texts, dates and numbers",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc