angular-l10n
Advanced tools
Comparing version 5.1.0 to 5.2.0
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"InjectorRef":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":15,"character":34}]}]},"statics":{"injector":null,"get":{"__symbolic":"function","parameters":["token"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InjectorRef"},"member":"injector"},"member":"get"},"arguments":[{"__symbolic":"reference","name":"token"}]}}}},"StorageStrategy":{"Session":0,"Local":1,"Cookie":2,"Disabled":3},"ProviderType":{"Fallback":0,"Static":1,"WebAPI":2},"ISOCode":{"Language":0,"Country":1,"Script":2},"DateTimeOptions":{"__symbolic":"interface"},"LOCALE_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":8},"arguments":["LOCALE_CONFIG"]},"TRANSLATION_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":8},"arguments":["TRANSLATION_CONFIG"]},"LocaleConfig":{"__symbolic":"interface"},"TranslationConfig":{"__symbolic":"interface"},"L10nConfig":{"__symbolic":"interface"},"Token":{"__symbolic":"interface"},"L10nLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":12,"character":9},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":13,"character":9},"arguments":[{"__symbolic":"reference","name":"TRANSLATION_CONFIG"}]}],null,null],"parameters":[{"__symbolic":"reference","name":"LocaleConfig"},{"__symbolic":"reference","name":"TranslationConfig"},{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","name":"TranslationService"}]}],"load":[{"__symbolic":"method"}]}},"ILocaleService":{"__symbolic":"interface"},"LocaleService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":74,"character":1}}],"members":{"languageCodeChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":76,"character":5}}]}],"defaultLocaleChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":77,"character":5}}]}],"currencyCodeChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":78,"character":5}}]}],"timezoneChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":79,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":88,"character":18},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}],null],"parameters":[{"__symbolic":"reference","name":"LocaleConfig"},{"__symbolic":"reference","name":"LocaleStorage"}]}],"getConfiguration":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"getBrowserLanguage":[{"__symbolic":"method"}],"getAvailableLanguages":[{"__symbolic":"method"}],"getLanguageDirection":[{"__symbolic":"method"}],"getCurrentLanguage":[{"__symbolic":"method"}],"getCurrentCountry":[{"__symbolic":"method"}],"getCurrentScript":[{"__symbolic":"method"}],"getCurrentLocale":[{"__symbolic":"method"}],"getCurrentNumberingSystem":[{"__symbolic":"method"}],"getCurrentCalendar":[{"__symbolic":"method"}],"getDefaultLocale":[{"__symbolic":"method"}],"getCurrentCurrency":[{"__symbolic":"method"}],"getCurrencySymbol":[{"__symbolic":"method"}],"getCurrentTimezone":[{"__symbolic":"method"}],"setCurrentLanguage":[{"__symbolic":"method"}],"setDefaultLocale":[{"__symbolic":"method"}],"setCurrentCurrency":[{"__symbolic":"method"}],"setCurrentTimezone":[{"__symbolic":"method"}],"initStorage":[{"__symbolic":"method"}],"initLanguage":[{"__symbolic":"method"}],"initDefaultLocale":[{"__symbolic":"method"}],"initCurrency":[{"__symbolic":"method"}],"initTimezone":[{"__symbolic":"method"}],"matchLanguage":[{"__symbolic":"method"}],"sendLanguageEvents":[{"__symbolic":"method"}],"sendDefaultLocaleEvents":[{"__symbolic":"method"}],"sendCurrencyEvents":[{"__symbolic":"method"}],"sendTimezoneEvents":[{"__symbolic":"method"}],"sendTranslationEvents":[{"__symbolic":"method"}]}},"LocaleStorage":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1}}],"members":{"read":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}]}},"BrowserStorage":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":26,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":31,"character":18},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"LocaleConfig"}]}],"read":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}],"getLocalStorage":[{"__symbolic":"method"}],"getSessionStorage":[{"__symbolic":"method"}],"getCookie":[{"__symbolic":"method"}],"setLocalStorage":[{"__symbolic":"method"}],"setSessionStorage":[{"__symbolic":"method"}],"setCookie":[{"__symbolic":"method"}]}},"ITranslationService":{"__symbolic":"interface"},"TranslationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":43,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":59,"character":9},"arguments":[{"__symbolic":"reference","name":"TRANSLATION_CONFIG"}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"TranslationConfig"},{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","name":"TranslationProvider"},{"__symbolic":"reference","name":"TranslationHandler"}]}],"getConfiguration":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"translationChanged":[{"__symbolic":"method"}],"translate":[{"__symbolic":"method"}],"translateAsync":[{"__symbolic":"method"}],"translateKey":[{"__symbolic":"method"}],"getValue":[{"__symbolic":"method"}],"translateI18nPlural":[{"__symbolic":"method"}],"translateNumber":[{"__symbolic":"method"}],"loadTranslation":[{"__symbolic":"method"}],"composeLanguage":[{"__symbolic":"method"}],"getTranslation":[{"__symbolic":"method"}],"addData":[{"__symbolic":"method"}],"releaseTranslation":[{"__symbolic":"method"}],"sendEvents":[{"__symbolic":"method"}]}},"TranslationProvider":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1}}],"members":{"getTranslation":[{"__symbolic":"method"}]}},"HttpTranslationProvider":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":26,"character":17},"arguments":[{"__symbolic":"reference","name":"TRANSLATION_CONFIG"}]}],null],"parameters":[{"__symbolic":"reference","name":"TranslationConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":26,"character":100}]}],"getTranslation":[{"__symbolic":"method"}],"caching":[{"__symbolic":"method"}]}},"TranslationHandler":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"parseValue":[{"__symbolic":"method"}]}},"DefaultTranslationHandler":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":24,"character":18},"arguments":[{"__symbolic":"reference","name":"TRANSLATION_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslationConfig"}]}],"parseValue":[{"__symbolic":"method"}],"handleMissingValue":[{"__symbolic":"method"}],"handleArgs":[{"__symbolic":"method"}]}},"Translation":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":18,"character":38}]}],"cancelParamSubscriptions":[{"__symbolic":"method"}]}},"Localization":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"Translation"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":11,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":20,"character":38}]}]}},"ILocaleValidation":{"__symbolic":"interface"},"LocaleValidation":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"}]}],"parseNumber":[{"__symbolic":"method"}],"getRegExp":[{"__symbolic":"method"}],"getDecimalCode":[{"__symbolic":"method"}],"getNumberCodes":[{"__symbolic":"method"}],"toChar":[{"__symbolic":"method"}],"toUnicode":[{"__symbolic":"method"}],"toHex":[{"__symbolic":"method"}]}},"ICollator":{"__symbolic":"interface"},"Collator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":104,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","name":"TranslationService"}]}],"compare":[{"__symbolic":"method"}],"sort":[{"__symbolic":"method"}],"sortAsync":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"searchAsync":[{"__symbolic":"method"}],"addExtension":[{"__symbolic":"method"}],"match":[{"__symbolic":"method"}]}},"IntlAPI":{"__symbolic":"class","members":{},"statics":{"hasDateTimeFormat":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"IntlAPI"},"member":"hasIntl"}},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Intl"},"member":"hasOwnProperty"},"arguments":["DateTimeFormat"]}}},"hasNumberFormat":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"IntlAPI"},"member":"hasIntl"}},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Intl"},"member":"hasOwnProperty"},"arguments":["NumberFormat"]}}},"hasCollator":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"IntlAPI"},"member":"hasIntl"}},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Intl"},"member":"hasOwnProperty"},"arguments":["Collator"]}}}}},"Language":{"__symbolic":"function"},"DefaultLocale":{"__symbolic":"function"},"Currency":{"__symbolic":"function"},"Timezone":{"__symbolic":"function"},"TranslatePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":4,"character":1},"arguments":[{"name":"translate","pure":true}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TranslationService"}]}],"transform":[{"__symbolic":"method"}]}},"L10nDatePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"l10nDate","pure":true}]}],"members":{"transform":[{"__symbolic":"method"}],"isDate":[{"__symbolic":"method"}],"isoStringToDate":[{"__symbolic":"method"}]}},"L10nDecimalPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"l10nDecimal","pure":true}]}],"members":{"transform":[{"__symbolic":"method"}]}},"L10nPercentPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":27,"character":1},"arguments":[{"name":"l10nPercent","pure":true}]}],"members":{"transform":[{"__symbolic":"method"}]}},"L10nCurrencyPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":48,"character":1},"arguments":[{"name":"l10nCurrency","pure":true}]}],"members":{"transform":[{"__symbolic":"method"}]}},"BaseDirective":{"__symbolic":"class","members":{"valueAttribute":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":5},"arguments":["value"]}]}],"innerHTMLProperty":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":5},"arguments":["innerHTML"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":34,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":34,"character":62}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getAttributesData":[{"__symbolic":"method"}],"getAttributesKeys":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}],"setText":[{"__symbolic":"method"}],"setAttributes":[{"__symbolic":"method"}],"addTextListener":[{"__symbolic":"method"}],"removeTextListener":[{"__symbolic":"method"}],"getText":[{"__symbolic":"method"}],"getKey":[{"__symbolic":"method"}],"getAttributes":[{"__symbolic":"method"}],"cancelSubscriptions":[{"__symbolic":"method"}]}},"TranslateDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[l10nTranslate],[translate]"}]}],"members":{"l10nTranslate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":5}}]}],"translate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":5}}]}],"params":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TranslationService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":73},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":105}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nDateDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":7,"character":1},"arguments":[{"selector":"[l10nDate]"}]}],"members":{"l10nDate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":5}}]}],"format":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":22,"character":63},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":22,"character":95}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nDecimalDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[l10nDecimal]"}]}],"members":{"l10nDecimal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":5}}]}],"digits":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":63},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":95}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nPercentDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":57,"character":1},"arguments":[{"selector":"[l10nPercent]"}]}],"members":{"l10nPercent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":5}}]}],"digits":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":63},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":95}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nCurrencyDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":108,"character":1},"arguments":[{"selector":"[l10nCurrency]"}]}],"members":{"l10nCurrency":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":113,"character":5}}]}],"currencyDisplay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":117,"character":5}}]}],"digits":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":119,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":63},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":95}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nNumberValidatorDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":61,"character":1},"arguments":[{"selector":"[l10nValidateNumber][ngModel],[l10nValidateNumber][c]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALIDATORS","line":64,"character":19},"useExisting":{"__symbolic":"reference","name":"L10nNumberValidatorDirective"},"multi":true}]}]}],"members":{"l10nValidateNumber":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":5}}]}],"digits":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":76,"character":5}}]}],"minValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":78,"character":5}}]}],"maxValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":79,"character":5}}]}],"ngOnInit":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}]}},"l10nValidateNumber":{"__symbolic":"function"},"TranslationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"TranslatePipe"},{"__symbolic":"reference","name":"TranslateDirective"}],"exports":[{"__symbolic":"reference","name":"TranslatePipe"},{"__symbolic":"reference","name":"TranslateDirective"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"InjectorRef"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["l10nConfig","token"],"defaults":[null,{}],"value":{"ngModule":{"__symbolic":"reference","name":"TranslationModule"},"providers":[{"__symbolic":"reference","name":"InjectorRef"},{"provide":{"__symbolic":"reference","name":"LOCALE_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"locale"},"right":{}}},{"provide":{"__symbolic":"reference","name":"TRANSLATION_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"translation"},"right":{}}},{"__symbolic":"reference","name":"LocaleService"},{"provide":{"__symbolic":"reference","name":"LocaleStorage"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"localeStorage"},"right":{"__symbolic":"reference","name":"BrowserStorage"}}},{"__symbolic":"reference","name":"TranslationService"},{"provide":{"__symbolic":"reference","name":"TranslationProvider"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"translationProvider"},"right":{"__symbolic":"reference","name":"HttpTranslationProvider"}}},{"provide":{"__symbolic":"reference","name":"TranslationHandler"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"translationHandler"},"right":{"__symbolic":"reference","name":"DefaultTranslationHandler"}}},{"__symbolic":"reference","name":"L10nLoader"}]}},"forChild":{"__symbolic":"function","parameters":["l10nConfig","token"],"defaults":[null,{}],"value":{"ngModule":{"__symbolic":"reference","name":"TranslationModule"},"providers":[{"__symbolic":"reference","name":"InjectorRef"},{"provide":{"__symbolic":"reference","name":"TRANSLATION_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"translation"},"right":{}}},{"__symbolic":"reference","name":"TranslationService"},{"__symbolic":"reference","name":"L10nLoader"}]}}}},"LocalizationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":23,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"L10nDatePipe"},{"__symbolic":"reference","name":"L10nDecimalPipe"},{"__symbolic":"reference","name":"L10nPercentPipe"},{"__symbolic":"reference","name":"L10nCurrencyPipe"},{"__symbolic":"reference","name":"L10nDateDirective"},{"__symbolic":"reference","name":"L10nDecimalDirective"},{"__symbolic":"reference","name":"L10nPercentDirective"},{"__symbolic":"reference","name":"L10nCurrencyDirective"}],"imports":[{"__symbolic":"reference","name":"TranslationModule"}],"exports":[{"__symbolic":"reference","name":"TranslationModule"},{"__symbolic":"reference","name":"L10nDatePipe"},{"__symbolic":"reference","name":"L10nDecimalPipe"},{"__symbolic":"reference","name":"L10nPercentPipe"},{"__symbolic":"reference","name":"L10nCurrencyPipe"},{"__symbolic":"reference","name":"L10nDateDirective"},{"__symbolic":"reference","name":"L10nDecimalDirective"},{"__symbolic":"reference","name":"L10nPercentDirective"},{"__symbolic":"reference","name":"L10nCurrencyDirective"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"InjectorRef"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["l10nConfig","token"],"defaults":[null,{}],"value":{"ngModule":{"__symbolic":"reference","name":"LocalizationModule"},"providers":[{"__symbolic":"reference","name":"InjectorRef"},{"provide":{"__symbolic":"reference","name":"LOCALE_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"locale"},"right":{}}},{"provide":{"__symbolic":"reference","name":"TRANSLATION_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"translation"},"right":{}}},{"__symbolic":"reference","name":"LocaleService"},{"provide":{"__symbolic":"reference","name":"LocaleStorage"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"localeStorage"},"right":{"__symbolic":"reference","name":"BrowserStorage"}}},{"__symbolic":"reference","name":"TranslationService"},{"provide":{"__symbolic":"reference","name":"TranslationProvider"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"translationProvider"},"right":{"__symbolic":"reference","name":"HttpTranslationProvider"}}},{"provide":{"__symbolic":"reference","name":"TranslationHandler"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"translationHandler"},"right":{"__symbolic":"reference","name":"DefaultTranslationHandler"}}},{"__symbolic":"reference","name":"L10nLoader"}]}},"forChild":{"__symbolic":"function","parameters":["l10nConfig","token"],"defaults":[null,{}],"value":{"ngModule":{"__symbolic":"reference","name":"LocalizationModule"},"providers":[{"__symbolic":"reference","name":"InjectorRef"},{"provide":{"__symbolic":"reference","name":"TRANSLATION_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"translation"},"right":{}}},{"__symbolic":"reference","name":"TranslationService"},{"__symbolic":"reference","name":"L10nLoader"}]}}}},"LocaleValidationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"L10nNumberValidatorDirective"}],"exports":[{"__symbolic":"reference","name":"L10nNumberValidatorDirective"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"LocaleValidationModule"},"providers":[{"__symbolic":"reference","name":"LocaleValidation"}]}}}}},"origins":{"InjectorRef":"./src/models/injector-ref","StorageStrategy":"./src/models/types","ProviderType":"./src/models/types","ISOCode":"./src/models/types","DateTimeOptions":"./src/models/types","LOCALE_CONFIG":"./src/models/l10n-config","TRANSLATION_CONFIG":"./src/models/l10n-config","LocaleConfig":"./src/models/l10n-config","TranslationConfig":"./src/models/l10n-config","L10nConfig":"./src/models/l10n-config","Token":"./src/models/l10n-config","L10nLoader":"./src/services/l10n-loader","ILocaleService":"./src/services/locale.service","LocaleService":"./src/services/locale.service","LocaleStorage":"./src/services/locale-storage","BrowserStorage":"./src/services/locale-storage","ITranslationService":"./src/services/translation.service","TranslationService":"./src/services/translation.service","TranslationProvider":"./src/services/translation-provider","HttpTranslationProvider":"./src/services/translation-provider","TranslationHandler":"./src/services/translation-handler","DefaultTranslationHandler":"./src/services/translation-handler","Translation":"./src/services/translation","Localization":"./src/services/localization","ILocaleValidation":"./src/services/locale-validation","LocaleValidation":"./src/services/locale-validation","ICollator":"./src/services/collator","Collator":"./src/services/collator","IntlAPI":"./src/services/intl-api","Language":"./src/decorators/language.decorator","DefaultLocale":"./src/decorators/default-locale.decorator","Currency":"./src/decorators/currency.decorator","Timezone":"./src/decorators/timezone.decorator","TranslatePipe":"./src/pipes/translate.pipe","L10nDatePipe":"./src/pipes/l10n-date.pipe","L10nDecimalPipe":"./src/pipes/l10n-number.pipe","L10nPercentPipe":"./src/pipes/l10n-number.pipe","L10nCurrencyPipe":"./src/pipes/l10n-number.pipe","BaseDirective":"./src/models/base-directive","TranslateDirective":"./src/directives/translate.directive","L10nDateDirective":"./src/directives/l10n-date.directive","L10nDecimalDirective":"./src/directives/l10n-number.directive","L10nPercentDirective":"./src/directives/l10n-number.directive","L10nCurrencyDirective":"./src/directives/l10n-number.directive","L10nNumberValidatorDirective":"./src/directives/l10n-number-validator.directive","l10nValidateNumber":"./src/directives/l10n-number-validator.directive","TranslationModule":"./src/modules/translation.module","LocalizationModule":"./src/modules/localization.module","LocaleValidationModule":"./src/modules/locale-validation.module"},"importAs":"angular-l10n"} | ||
{"__symbolic":"module","version":4,"metadata":{"InjectorRef":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":15,"character":34}]}]},"statics":{"injector":null,"get":{"__symbolic":"function","parameters":["token"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InjectorRef"},"member":"injector"},"member":"get"},"arguments":[{"__symbolic":"reference","name":"token"}]}}}},"StorageStrategy":{"Session":0,"Local":1,"Cookie":2,"Disabled":3},"ProviderType":{"Fallback":0,"Static":1,"WebAPI":2},"ISOCode":{"Language":0,"Country":1,"Script":2},"DateTimeOptions":{"__symbolic":"interface"},"LOCALE_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":8},"arguments":["LOCALE_CONFIG"]},"TRANSLATION_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":8},"arguments":["TRANSLATION_CONFIG"]},"LocaleConfig":{"__symbolic":"interface"},"TranslationConfig":{"__symbolic":"interface"},"L10nConfig":{"__symbolic":"interface"},"Token":{"__symbolic":"interface"},"L10nLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":12,"character":9},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":13,"character":9},"arguments":[{"__symbolic":"reference","name":"TRANSLATION_CONFIG"}]}],null,null],"parameters":[{"__symbolic":"reference","name":"LocaleConfig"},{"__symbolic":"reference","name":"TranslationConfig"},{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","name":"TranslationService"}]}],"load":[{"__symbolic":"method"}]}},"ILocaleService":{"__symbolic":"interface"},"LocaleService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":74,"character":1}}],"members":{"languageCodeChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":76,"character":5}}]}],"defaultLocaleChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":77,"character":5}}]}],"currencyCodeChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":78,"character":5}}]}],"timezoneChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":79,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":88,"character":18},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}],null],"parameters":[{"__symbolic":"reference","name":"LocaleConfig"},{"__symbolic":"reference","name":"LocaleStorage"}]}],"getConfiguration":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"getBrowserLanguage":[{"__symbolic":"method"}],"getAvailableLanguages":[{"__symbolic":"method"}],"getLanguageDirection":[{"__symbolic":"method"}],"getCurrentLanguage":[{"__symbolic":"method"}],"getCurrentCountry":[{"__symbolic":"method"}],"getCurrentScript":[{"__symbolic":"method"}],"getCurrentLocale":[{"__symbolic":"method"}],"getCurrentNumberingSystem":[{"__symbolic":"method"}],"getCurrentCalendar":[{"__symbolic":"method"}],"getDefaultLocale":[{"__symbolic":"method"}],"getCurrentCurrency":[{"__symbolic":"method"}],"getCurrencySymbol":[{"__symbolic":"method"}],"getCurrentTimezone":[{"__symbolic":"method"}],"setCurrentLanguage":[{"__symbolic":"method"}],"setDefaultLocale":[{"__symbolic":"method"}],"setCurrentCurrency":[{"__symbolic":"method"}],"setCurrentTimezone":[{"__symbolic":"method"}],"initStorage":[{"__symbolic":"method"}],"initLanguage":[{"__symbolic":"method"}],"initDefaultLocale":[{"__symbolic":"method"}],"initCurrency":[{"__symbolic":"method"}],"initTimezone":[{"__symbolic":"method"}],"matchLanguage":[{"__symbolic":"method"}],"sendLanguageEvents":[{"__symbolic":"method"}],"sendDefaultLocaleEvents":[{"__symbolic":"method"}],"sendCurrencyEvents":[{"__symbolic":"method"}],"sendTimezoneEvents":[{"__symbolic":"method"}],"sendTranslationEvents":[{"__symbolic":"method"}]}},"LocaleStorage":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1}}],"members":{"read":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}]}},"BrowserStorage":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":26,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":31,"character":18},"arguments":[{"__symbolic":"reference","name":"LOCALE_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"LocaleConfig"}]}],"read":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}],"getLocalStorage":[{"__symbolic":"method"}],"getSessionStorage":[{"__symbolic":"method"}],"getCookie":[{"__symbolic":"method"}],"setLocalStorage":[{"__symbolic":"method"}],"setSessionStorage":[{"__symbolic":"method"}],"setCookie":[{"__symbolic":"method"}]}},"ITranslationService":{"__symbolic":"interface"},"TranslationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":43,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":59,"character":9},"arguments":[{"__symbolic":"reference","name":"TRANSLATION_CONFIG"}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"TranslationConfig"},{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","name":"TranslationProvider"},{"__symbolic":"reference","name":"TranslationHandler"}]}],"getConfiguration":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"translationChanged":[{"__symbolic":"method"}],"translate":[{"__symbolic":"method"}],"translateAsync":[{"__symbolic":"method"}],"translateKey":[{"__symbolic":"method"}],"getValue":[{"__symbolic":"method"}],"translateI18nPlural":[{"__symbolic":"method"}],"translateNumber":[{"__symbolic":"method"}],"loadTranslation":[{"__symbolic":"method"}],"composeLanguage":[{"__symbolic":"method"}],"getTranslation":[{"__symbolic":"method"}],"addData":[{"__symbolic":"method"}],"releaseTranslation":[{"__symbolic":"method"}],"sendEvents":[{"__symbolic":"method"}]}},"TranslationProvider":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":11,"character":1}}],"members":{"getTranslation":[{"__symbolic":"method"}]}},"HttpTranslationProvider":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":23,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":17},"arguments":[{"__symbolic":"reference","name":"TRANSLATION_CONFIG"}]}],null],"parameters":[{"__symbolic":"reference","name":"TranslationConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":27,"character":100}]}],"getTranslation":[{"__symbolic":"method"}],"caching":[{"__symbolic":"method"}]}},"TranslationHandler":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"parseValue":[{"__symbolic":"method"}]}},"DefaultTranslationHandler":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":24,"character":18},"arguments":[{"__symbolic":"reference","name":"TRANSLATION_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"TranslationConfig"}]}],"parseValue":[{"__symbolic":"method"}],"handleMissingValue":[{"__symbolic":"method"}],"handleArgs":[{"__symbolic":"method"}]}},"Translation":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":18,"character":38}]}],"cancelParamSubscriptions":[{"__symbolic":"method"}]}},"Localization":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"Translation"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":11,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":20,"character":38}]}]}},"ILocaleValidation":{"__symbolic":"interface"},"LocaleValidation":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"}]}],"parseNumber":[{"__symbolic":"method"}],"getRegExp":[{"__symbolic":"method"}],"getDecimalCode":[{"__symbolic":"method"}],"getNumberCodes":[{"__symbolic":"method"}],"toChar":[{"__symbolic":"method"}],"toUnicode":[{"__symbolic":"method"}],"toHex":[{"__symbolic":"method"}]}},"ICollator":{"__symbolic":"interface"},"Collator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":104,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","name":"TranslationService"}]}],"compare":[{"__symbolic":"method"}],"sort":[{"__symbolic":"method"}],"sortAsync":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"searchAsync":[{"__symbolic":"method"}],"addExtension":[{"__symbolic":"method"}],"match":[{"__symbolic":"method"}]}},"IntlAPI":{"__symbolic":"class","members":{},"statics":{"hasDateTimeFormat":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"IntlAPI"},"member":"hasIntl"}},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Intl"},"member":"hasOwnProperty"},"arguments":["DateTimeFormat"]}}},"hasNumberFormat":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"IntlAPI"},"member":"hasIntl"}},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Intl"},"member":"hasOwnProperty"},"arguments":["NumberFormat"]}}},"hasCollator":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"IntlAPI"},"member":"hasIntl"}},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Intl"},"member":"hasOwnProperty"},"arguments":["Collator"]}}}}},"Language":{"__symbolic":"function"},"DefaultLocale":{"__symbolic":"function"},"Currency":{"__symbolic":"function"},"Timezone":{"__symbolic":"function"},"TranslatePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":4,"character":1},"arguments":[{"name":"translate","pure":true}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TranslationService"}]}],"transform":[{"__symbolic":"method"}]}},"L10nDatePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"l10nDate","pure":true}]}],"members":{"transform":[{"__symbolic":"method"}],"isDate":[{"__symbolic":"method"}],"isoStringToDate":[{"__symbolic":"method"}]}},"L10nDecimalPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":6,"character":1},"arguments":[{"name":"l10nDecimal","pure":true}]}],"members":{"transform":[{"__symbolic":"method"}]}},"L10nPercentPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":27,"character":1},"arguments":[{"name":"l10nPercent","pure":true}]}],"members":{"transform":[{"__symbolic":"method"}]}},"L10nCurrencyPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":48,"character":1},"arguments":[{"name":"l10nCurrency","pure":true}]}],"members":{"transform":[{"__symbolic":"method"}]}},"BaseDirective":{"__symbolic":"class","members":{"valueAttribute":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":5},"arguments":["value"]}]}],"innerHTMLProperty":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":5},"arguments":["innerHTML"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":34,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":34,"character":62}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getAttributesData":[{"__symbolic":"method"}],"getAttributesKeys":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}],"setText":[{"__symbolic":"method"}],"setAttributes":[{"__symbolic":"method"}],"addTextListener":[{"__symbolic":"method"}],"removeTextListener":[{"__symbolic":"method"}],"getText":[{"__symbolic":"method"}],"getKey":[{"__symbolic":"method"}],"getAttributes":[{"__symbolic":"method"}],"cancelSubscriptions":[{"__symbolic":"method"}]}},"TranslateDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[l10nTranslate],[translate]"}]}],"members":{"l10nTranslate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":5}}]}],"translate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":5}}]}],"params":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TranslationService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":73},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":105}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nDateDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":7,"character":1},"arguments":[{"selector":"[l10nDate]"}]}],"members":{"l10nDate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":5}}]}],"format":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":22,"character":63},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":22,"character":95}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nDecimalDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[l10nDecimal]"}]}],"members":{"l10nDecimal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":5}}]}],"digits":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":63},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":95}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nPercentDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":57,"character":1},"arguments":[{"selector":"[l10nPercent]"}]}],"members":{"l10nPercent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":5}}]}],"digits":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":63},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":95}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nCurrencyDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseDirective"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":108,"character":1},"arguments":[{"selector":"[l10nCurrency]"}]}],"members":{"l10nCurrency":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":113,"character":5}}]}],"currencyDisplay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":117,"character":5}}]}],"digits":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":119,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocaleService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":63},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":19,"character":95}]}],"setup":[{"__symbolic":"method"}],"replace":[{"__symbolic":"method"}],"replaceText":[{"__symbolic":"method"}],"replaceAttributes":[{"__symbolic":"method"}],"getValues":[{"__symbolic":"method"}]}},"L10nNumberValidatorDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":61,"character":1},"arguments":[{"selector":"[l10nValidateNumber][ngModel],[l10nValidateNumber][c]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALIDATORS","line":64,"character":19},"useExisting":{"__symbolic":"reference","name":"L10nNumberValidatorDirective"},"multi":true}]}]}],"members":{"l10nValidateNumber":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":5}}]}],"digits":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":76,"character":5}}]}],"minValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":78,"character":5}}]}],"maxValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":79,"character":5}}]}],"ngOnInit":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}]}},"l10nValidateNumber":{"__symbolic":"function"},"TranslationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"TranslatePipe"},{"__symbolic":"reference","name":"TranslateDirective"}],"exports":[{"__symbolic":"reference","name":"TranslatePipe"},{"__symbolic":"reference","name":"TranslateDirective"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"InjectorRef"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["l10nConfig","token"],"defaults":[null,{}],"value":{"ngModule":{"__symbolic":"reference","name":"TranslationModule"},"providers":[{"__symbolic":"reference","name":"InjectorRef"},{"provide":{"__symbolic":"reference","name":"LOCALE_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"locale"},"right":{}}},{"provide":{"__symbolic":"reference","name":"TRANSLATION_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"translation"},"right":{}}},{"__symbolic":"reference","name":"LocaleService"},{"provide":{"__symbolic":"reference","name":"LocaleStorage"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"localeStorage"},"right":{"__symbolic":"reference","name":"BrowserStorage"}}},{"__symbolic":"reference","name":"TranslationService"},{"provide":{"__symbolic":"reference","name":"TranslationProvider"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"translationProvider"},"right":{"__symbolic":"reference","name":"HttpTranslationProvider"}}},{"provide":{"__symbolic":"reference","name":"TranslationHandler"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"translationHandler"},"right":{"__symbolic":"reference","name":"DefaultTranslationHandler"}}},{"__symbolic":"reference","name":"L10nLoader"}]}},"forChild":{"__symbolic":"function","parameters":["l10nConfig","token"],"defaults":[null,{}],"value":{"ngModule":{"__symbolic":"reference","name":"TranslationModule"},"providers":[{"__symbolic":"reference","name":"InjectorRef"},{"provide":{"__symbolic":"reference","name":"TRANSLATION_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"translation"},"right":{}}},{"__symbolic":"reference","name":"TranslationService"},{"__symbolic":"reference","name":"L10nLoader"}]}}}},"LocalizationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":23,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"L10nDatePipe"},{"__symbolic":"reference","name":"L10nDecimalPipe"},{"__symbolic":"reference","name":"L10nPercentPipe"},{"__symbolic":"reference","name":"L10nCurrencyPipe"},{"__symbolic":"reference","name":"L10nDateDirective"},{"__symbolic":"reference","name":"L10nDecimalDirective"},{"__symbolic":"reference","name":"L10nPercentDirective"},{"__symbolic":"reference","name":"L10nCurrencyDirective"}],"imports":[{"__symbolic":"reference","name":"TranslationModule"}],"exports":[{"__symbolic":"reference","name":"TranslationModule"},{"__symbolic":"reference","name":"L10nDatePipe"},{"__symbolic":"reference","name":"L10nDecimalPipe"},{"__symbolic":"reference","name":"L10nPercentPipe"},{"__symbolic":"reference","name":"L10nCurrencyPipe"},{"__symbolic":"reference","name":"L10nDateDirective"},{"__symbolic":"reference","name":"L10nDecimalDirective"},{"__symbolic":"reference","name":"L10nPercentDirective"},{"__symbolic":"reference","name":"L10nCurrencyDirective"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"InjectorRef"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["l10nConfig","token"],"defaults":[null,{}],"value":{"ngModule":{"__symbolic":"reference","name":"LocalizationModule"},"providers":[{"__symbolic":"reference","name":"InjectorRef"},{"provide":{"__symbolic":"reference","name":"LOCALE_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"locale"},"right":{}}},{"provide":{"__symbolic":"reference","name":"TRANSLATION_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"translation"},"right":{}}},{"__symbolic":"reference","name":"LocaleService"},{"provide":{"__symbolic":"reference","name":"LocaleStorage"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"localeStorage"},"right":{"__symbolic":"reference","name":"BrowserStorage"}}},{"__symbolic":"reference","name":"TranslationService"},{"provide":{"__symbolic":"reference","name":"TranslationProvider"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"translationProvider"},"right":{"__symbolic":"reference","name":"HttpTranslationProvider"}}},{"provide":{"__symbolic":"reference","name":"TranslationHandler"},"useClass":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"token"},"member":"translationHandler"},"right":{"__symbolic":"reference","name":"DefaultTranslationHandler"}}},{"__symbolic":"reference","name":"L10nLoader"}]}},"forChild":{"__symbolic":"function","parameters":["l10nConfig","token"],"defaults":[null,{}],"value":{"ngModule":{"__symbolic":"reference","name":"LocalizationModule"},"providers":[{"__symbolic":"reference","name":"InjectorRef"},{"provide":{"__symbolic":"reference","name":"TRANSLATION_CONFIG"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"l10nConfig"},"member":"translation"},"right":{}}},{"__symbolic":"reference","name":"TranslationService"},{"__symbolic":"reference","name":"L10nLoader"}]}}}},"LocaleValidationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"L10nNumberValidatorDirective"}],"exports":[{"__symbolic":"reference","name":"L10nNumberValidatorDirective"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"LocaleValidationModule"},"providers":[{"__symbolic":"reference","name":"LocaleValidation"}]}}}}},"origins":{"InjectorRef":"./src/models/injector-ref","StorageStrategy":"./src/models/types","ProviderType":"./src/models/types","ISOCode":"./src/models/types","DateTimeOptions":"./src/models/types","LOCALE_CONFIG":"./src/models/l10n-config","TRANSLATION_CONFIG":"./src/models/l10n-config","LocaleConfig":"./src/models/l10n-config","TranslationConfig":"./src/models/l10n-config","L10nConfig":"./src/models/l10n-config","Token":"./src/models/l10n-config","L10nLoader":"./src/services/l10n-loader","ILocaleService":"./src/services/locale.service","LocaleService":"./src/services/locale.service","LocaleStorage":"./src/services/locale-storage","BrowserStorage":"./src/services/locale-storage","ITranslationService":"./src/services/translation.service","TranslationService":"./src/services/translation.service","TranslationProvider":"./src/services/translation-provider","HttpTranslationProvider":"./src/services/translation-provider","TranslationHandler":"./src/services/translation-handler","DefaultTranslationHandler":"./src/services/translation-handler","Translation":"./src/services/translation","Localization":"./src/services/localization","ILocaleValidation":"./src/services/locale-validation","LocaleValidation":"./src/services/locale-validation","ICollator":"./src/services/collator","Collator":"./src/services/collator","IntlAPI":"./src/services/intl-api","Language":"./src/decorators/language.decorator","DefaultLocale":"./src/decorators/default-locale.decorator","Currency":"./src/decorators/currency.decorator","Timezone":"./src/decorators/timezone.decorator","TranslatePipe":"./src/pipes/translate.pipe","L10nDatePipe":"./src/pipes/l10n-date.pipe","L10nDecimalPipe":"./src/pipes/l10n-number.pipe","L10nPercentPipe":"./src/pipes/l10n-number.pipe","L10nCurrencyPipe":"./src/pipes/l10n-number.pipe","BaseDirective":"./src/models/base-directive","TranslateDirective":"./src/directives/translate.directive","L10nDateDirective":"./src/directives/l10n-date.directive","L10nDecimalDirective":"./src/directives/l10n-number.directive","L10nPercentDirective":"./src/directives/l10n-number.directive","L10nCurrencyDirective":"./src/directives/l10n-number.directive","L10nNumberValidatorDirective":"./src/directives/l10n-number-validator.directive","l10nValidateNumber":"./src/directives/l10n-number-validator.directive","TranslationModule":"./src/modules/translation.module","LocalizationModule":"./src/modules/localization.module","LocaleValidationModule":"./src/modules/locale-validation.module"},"importAs":"angular-l10n"} |
@@ -1,2 +0,2 @@ | ||
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("rxjs"),require("@angular/common/http"),require("@angular/forms")):"function"==typeof define&&define.amd?define("angular-l10n",["exports","@angular/core","rxjs","@angular/common/http","@angular/forms"],factory):factory((global.ng=global.ng||{},global.ng.l10n={}),global.ng.core,global.rxjs,global.ng.commmon.http,global.ng.forms)}(this,function(exports,core,rxjs,http,forms){"use strict";var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t};function __awaiter(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):new P(function(resolve){resolve(result.value)}).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})}function __generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=y[2&op[0]?"return":op[0]?"throw":"next"])&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[0,t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=0<(t=_.trys).length&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}([n,v])}}} | ||
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("rxjs"),require("@angular/common/http"),require("rxjs/operators"),require("@angular/forms")):"function"==typeof define&&define.amd?define("angular-l10n",["exports","@angular/core","rxjs","@angular/common/http","rxjs/operators","@angular/forms"],factory):factory((global.ng=global.ng||{},global.ng.l10n={}),global.ng.core,global.rxjs,global.ng.commmon.http,global.rxjs.operators,global.ng.forms)}(this,function(exports,core,rxjs,http,operators,forms){"use strict";var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t};function __awaiter(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):new P(function(resolve){resolve(result.value)}).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})}function __generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=y[2&op[0]?"return":op[0]?"throw":"next"])&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[0,t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=0<(t=_.trys).length&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}([n,v])}}} | ||
/** | ||
@@ -7,2 +7,2 @@ * @license Angular l10n | ||
* https://github.com/robisim74/angular-l10n | ||
*/var InjectorRef=function(){function InjectorRef(injector){this.injector=injector,InjectorRef.injector=this.injector}return InjectorRef.get=function(token){return InjectorRef.injector.get(token)},InjectorRef.injector=null,InjectorRef.decorators=[{type:core.Injectable}],InjectorRef.ctorParameters=function(){return[{type:core.Injector}]},InjectorRef}(),StorageStrategy={Session:0,Local:1,Cookie:2,Disabled:3};StorageStrategy[StorageStrategy.Session]="Session",StorageStrategy[StorageStrategy.Local]="Local",StorageStrategy[StorageStrategy.Cookie]="Cookie",StorageStrategy[StorageStrategy.Disabled]="Disabled";var ProviderType={Fallback:0,Static:1,WebAPI:2};ProviderType[ProviderType.Fallback]="Fallback",ProviderType[ProviderType.Static]="Static",ProviderType[ProviderType.WebAPI]="WebAPI";var ISOCode={Language:0,Country:1,Script:2};ISOCode[ISOCode.Language]="Language",ISOCode[ISOCode.Country]="Country",ISOCode[ISOCode.Script]="Script";var LoadingMode={Direct:0,Async:1};LoadingMode[LoadingMode.Direct]="Direct",LoadingMode[LoadingMode.Async]="Async";var ServiceState={isReady:0,isLoading:1,isWaiting:2};ServiceState[ServiceState.isReady]="isReady",ServiceState[ServiceState.isLoading]="isLoading",ServiceState[ServiceState.isWaiting]="isWaiting";var NumberFormatStyle={Decimal:0,Percent:1,Currency:2};NumberFormatStyle[NumberFormatStyle.Decimal]="Decimal",NumberFormatStyle[NumberFormatStyle.Percent]="Percent",NumberFormatStyle[NumberFormatStyle.Currency]="Currency";var LOCALE_CONFIG=new core.InjectionToken("LOCALE_CONFIG"),TRANSLATION_CONFIG=new core.InjectionToken("TRANSLATION_CONFIG"),IntlAPI=function(){function IntlAPI(){}return IntlAPI.hasIntl=function(){return"object"==typeof Intl&&!!Intl},IntlAPI.hasDateTimeFormat=function(){return IntlAPI.hasIntl()&&Intl.hasOwnProperty("DateTimeFormat")},IntlAPI.hasTimezone=function(){if(IntlAPI.hasIntl()&&IntlAPI.hasDateTimeFormat()){try{new Intl.DateTimeFormat("en-US",{timeZone:"America/Los_Angeles"}).format(new Date)}catch(e){return!1}return!0}return!1},IntlAPI.hasNumberFormat=function(){return IntlAPI.hasIntl()&&Intl.hasOwnProperty("NumberFormat")},IntlAPI.hasCollator=function(){return IntlAPI.hasIntl()&&Intl.hasOwnProperty("Collator")},IntlAPI}(),LocaleStorage=function(){function LocaleStorage(){}return LocaleStorage.decorators=[{type:core.Injectable}],LocaleStorage}(),BrowserStorage=function(){function BrowserStorage(configuration){this.configuration=configuration,this.hasCookie="undefined"!=typeof navigator&&navigator.cookieEnabled,this.hasStorage="undefined"!=typeof Storage}return BrowserStorage.prototype.read=function(name){return __awaiter(this,void 0,void 0,function(){var value;return __generator(this,function(_a){return value=null,this.configuration.storage!=StorageStrategy.Disabled&&(this.configuration.storage==StorageStrategy.Local&&this.hasStorage?value=this.getLocalStorage(name):this.configuration.storage==StorageStrategy.Session&&this.hasStorage?value=this.getSessionStorage(name):this.configuration.storage==StorageStrategy.Cookie&&this.hasCookie&&(value=this.getCookie(name))),[2,value]})})},BrowserStorage.prototype.write=function(name,value){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){return this.configuration.storage!=StorageStrategy.Disabled&&(this.configuration.storage==StorageStrategy.Local&&this.hasStorage?this.setLocalStorage(name,value):this.configuration.storage==StorageStrategy.Session&&this.hasStorage?this.setSessionStorage(name,value):this.configuration.storage==StorageStrategy.Cookie&&this.hasCookie&&this.setCookie(name,value)),[2]})})},BrowserStorage.prototype.getLocalStorage=function(name){return localStorage.getItem(name)},BrowserStorage.prototype.getSessionStorage=function(name){return sessionStorage.getItem(name)},BrowserStorage.prototype.getCookie=function(name){var result=null;return"undefined"!=typeof document&&(result=new RegExp("(?:^|; )"+encodeURIComponent(name)+"=([^;]*)").exec(document.cookie)),result?result[1]:null},BrowserStorage.prototype.setLocalStorage=function(name,value){localStorage.setItem(name,value)},BrowserStorage.prototype.setSessionStorage=function(name,value){sessionStorage.setItem(name,value)},BrowserStorage.prototype.setCookie=function(name,value){var expires="";if(null!=this.configuration.cookieExpiration){var expirationDate=new Date;expirationDate.setTime(expirationDate.getTime()+24*this.configuration.cookieExpiration*60*60*1e3),expires="; expires="+expirationDate.toUTCString()}"undefined"!=typeof document&&(document.cookie=name+"="+value+expires+"; path=/")},BrowserStorage.decorators=[{type:core.Injectable}],BrowserStorage.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[LOCALE_CONFIG]}]}]},BrowserStorage}(),DefaultLocale=function(){function DefaultLocale(){}return Object.defineProperty(DefaultLocale.prototype,"value",{get:function(){return this._value},set:function(defaultLocale){this._value=defaultLocale,this.parseValue()},enumerable:!0,configurable:!0}),DefaultLocale.prototype.build=function(languageCode,countryCode,scriptCode,numberingSystem,calendar){this.languageCode=languageCode,this.scriptCode=scriptCode,this.countryCode=countryCode,this.numberingSystem=numberingSystem,this.calendar=calendar;var value=[];value.push(languageCode),value.push(scriptCode?"-"+scriptCode:""),value.push(countryCode?"-"+countryCode:""),value.push(numberingSystem||calendar?"-u":""),value.push(numberingSystem?"-nu-"+numberingSystem:""),value.push(calendar?"-ca-"+calendar:""),this._value=value.join("")},DefaultLocale.prototype.parseValue=function(){if(this.value){var value=this.value,index=value.search("-u");if(-1!=index){var extensions=value.substring(index+1).split("-");switch(extensions.length){case 3:"nu"==extensions[1]?this.numberingSystem=extensions[2]:"ca"==extensions[1]&&(this.calendar=extensions[2]);break;default:this.numberingSystem=extensions[2],this.calendar=extensions[4]}value=value.substring(0,index)}var codes=value.split("-");switch(codes.length){case 1:this.languageCode=codes[0];break;case 2:this.languageCode=codes[0],this.countryCode=codes[1];break;default:this.languageCode=codes[0],this.scriptCode=codes[1],this.countryCode=codes[2]}}},DefaultLocale}(),LocaleService=function(){function LocaleService(configuration,storage){this.configuration=configuration,this.storage=storage,this.languageCodeChanged=new core.EventEmitter(!0),this.defaultLocaleChanged=new core.EventEmitter(!0),this.currencyCodeChanged=new core.EventEmitter(!0),this.timezoneChanged=new core.EventEmitter(!0),this.loadTranslation=new rxjs.Subject,this.defaultLocale=new DefaultLocale}return LocaleService.prototype.getConfiguration=function(){return this.configuration},LocaleService.prototype.init=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.initStorage()];case 1:return _a.sent(),this.configuration.defaultLocale?this.initDefaultLocale():this.configuration.language&&this.initLanguage(),this.configuration.currency&&this.initCurrency(),this.configuration.timezone&&this.initTimezone(),[2]}})})},LocaleService.prototype.getBrowserLanguage=function(){var browserLanguage=null;if("undefined"!=typeof navigator&&navigator.language&&(browserLanguage=navigator.language),null!=browserLanguage){var index=browserLanguage.indexOf("-");-1!=index&&(browserLanguage=browserLanguage.substring(0,index))}return browserLanguage},LocaleService.prototype.getAvailableLanguages=function(){var languages=[];return this.configuration.languages&&(languages=this.configuration.languages.map(function(language){return language.code})),languages},LocaleService.prototype.getLanguageDirection=function(languageCode){return void 0===languageCode&&(languageCode=this.defaultLocale.languageCode),this.matchLanguage(languageCode)[0].dir},LocaleService.prototype.getCurrentLanguage=function(){return this.defaultLocale.languageCode},LocaleService.prototype.getCurrentCountry=function(){return this.defaultLocale.countryCode?this.defaultLocale.countryCode:""},LocaleService.prototype.getCurrentScript=function(){return this.defaultLocale.scriptCode?this.defaultLocale.scriptCode:""},LocaleService.prototype.getCurrentLocale=function(){return this.defaultLocale.countryCode?this.defaultLocale.languageCode+"-"+this.defaultLocale.countryCode:this.defaultLocale.languageCode},LocaleService.prototype.getCurrentNumberingSystem=function(){return this.defaultLocale.numberingSystem?this.defaultLocale.numberingSystem:""},LocaleService.prototype.getCurrentCalendar=function(){return this.defaultLocale.calendar?this.defaultLocale.calendar:""},LocaleService.prototype.getDefaultLocale=function(){return this.defaultLocale.value},LocaleService.prototype.getCurrentCurrency=function(){return this.currencyCode},LocaleService.prototype.getCurrencySymbol=function(currencyDisplay,defaultLocale,currency){void 0===currencyDisplay&&(currencyDisplay="symbol"),void 0===defaultLocale&&(defaultLocale=this.defaultLocale.value),void 0===currency&&(currency=this.currencyCode);var currencySymbol=this.currencyCode;if(IntlAPI.hasNumberFormat()){var localeZero=new Intl.NumberFormat(defaultLocale).format(0);currencySymbol=(currencySymbol=new Intl.NumberFormat(defaultLocale,{style:"currency",currency:currency,currencyDisplay:currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0}).format(0).replace(localeZero,"")).trim()}return currencySymbol},LocaleService.prototype.getCurrentTimezone=function(){return this.timezone},LocaleService.prototype.setCurrentLanguage=function(languageCode){this.defaultLocale.languageCode!=languageCode&&(this.defaultLocale.build(languageCode),this.storage.write("defaultLocale",this.defaultLocale.value),this.sendLanguageEvents(),this.sendTranslationEvents())},LocaleService.prototype.setDefaultLocale=function(languageCode,countryCode,scriptCode,numberingSystem,calendar){this.defaultLocale.languageCode==languageCode&&this.defaultLocale.countryCode==countryCode&&this.defaultLocale.scriptCode==scriptCode&&this.defaultLocale.numberingSystem==numberingSystem&&this.defaultLocale.calendar==calendar||(this.defaultLocale.build(languageCode,countryCode,scriptCode,numberingSystem,calendar),this.storage.write("defaultLocale",this.defaultLocale.value),this.sendDefaultLocaleEvents(),this.sendTranslationEvents())},LocaleService.prototype.setCurrentCurrency=function(currencyCode){this.currencyCode!=currencyCode&&(this.currencyCode=currencyCode,this.storage.write("currency",this.currencyCode),this.sendCurrencyEvents())},LocaleService.prototype.setCurrentTimezone=function(zoneName){this.timezone!=zoneName&&(this.timezone=zoneName,this.storage.write("timezone",this.timezone),this.sendTimezoneEvents())},LocaleService.prototype.initStorage=function(){return __awaiter(this,void 0,void 0,function(){var defaultLocale,currencyCode,zoneName;return __generator(this,function(_a){switch(_a.label){case 0:return this.defaultLocale.value?[3,2]:[4,this.storage.read("defaultLocale")];case 1:(defaultLocale=_a.sent())&&(this.defaultLocale.value=defaultLocale),_a.label=2;case 2:return null!=this.currencyCode?[3,4]:[4,this.storage.read("currency")];case 3:(currencyCode=_a.sent())&&(this.currencyCode=currencyCode),_a.label=4;case 4:return null!=this.timezone?[3,6]:[4,this.storage.read("timezone")];case 5:(zoneName=_a.sent())&&(this.timezone=zoneName),_a.label=6;case 6:return[2]}})})},LocaleService.prototype.initLanguage=function(){if(!this.defaultLocale.languageCode){var browserLanguage=this.getBrowserLanguage(),matchedLanguages=[];browserLanguage&&(matchedLanguages=this.matchLanguage(browserLanguage)),browserLanguage&&0<matchedLanguages.length?this.defaultLocale.build(browserLanguage):this.configuration.language&&this.defaultLocale.build(this.configuration.language),this.storage.write("defaultLocale",this.defaultLocale.value)}this.sendLanguageEvents()},LocaleService.prototype.initDefaultLocale=function(){this.defaultLocale.value||this.configuration.defaultLocale&&(this.defaultLocale.build(this.configuration.defaultLocale.languageCode,this.configuration.defaultLocale.countryCode,this.configuration.defaultLocale.scriptCode,this.configuration.defaultLocale.numberingSystem,this.configuration.defaultLocale.calendar),this.storage.write("defaultLocale",this.defaultLocale.value)),this.sendDefaultLocaleEvents()},LocaleService.prototype.initCurrency=function(){null==this.currencyCode&&this.configuration.currency&&(this.currencyCode=this.configuration.currency,this.storage.write("currency",this.currencyCode)),this.sendCurrencyEvents()},LocaleService.prototype.initTimezone=function(){null==this.timezone&&this.configuration.timezone&&(this.timezone=this.configuration.timezone,this.storage.write("timezone",this.timezone)),this.sendCurrencyEvents()},LocaleService.prototype.matchLanguage=function(languageCode){var matchedLanguages=[];return this.configuration.languages&&(matchedLanguages=this.configuration.languages.filter(function(language){return language.code==languageCode})),matchedLanguages},LocaleService.prototype.sendLanguageEvents=function(){this.languageCodeChanged.emit(this.defaultLocale.languageCode)},LocaleService.prototype.sendDefaultLocaleEvents=function(){this.defaultLocaleChanged.emit(this.defaultLocale.value)},LocaleService.prototype.sendCurrencyEvents=function(){this.currencyCodeChanged.emit(this.currencyCode)},LocaleService.prototype.sendTimezoneEvents=function(){this.timezoneChanged.emit(this.timezone)},LocaleService.prototype.sendTranslationEvents=function(){this.loadTranslation.next()},LocaleService.decorators=[{type:core.Injectable}],LocaleService.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[LOCALE_CONFIG]}]},{type:LocaleStorage}]},LocaleService.propDecorators={languageCodeChanged:[{type:core.Output}],defaultLocaleChanged:[{type:core.Output}],currencyCodeChanged:[{type:core.Output}],timezoneChanged:[{type:core.Output}]},LocaleService}(),TranslationProvider=function(){function TranslationProvider(){}return TranslationProvider.decorators=[{type:core.Injectable}],TranslationProvider}(),HttpTranslationProvider=function(){function HttpTranslationProvider(configuration,http$$1){this.configuration=configuration,this.http=http$$1,this.cache={}}return HttpTranslationProvider.prototype.getTranslation=function(language,args){var url="";switch(args.type){case ProviderType.WebAPI:url+=args.path+language;break;default:url+=args.prefix+language+".json"}return this.configuration.caching?this.caching(url,this.http.get(url)):this.http.get(url)},HttpTranslationProvider.prototype.caching=function(key,request){if(this.cache[key])return this.cache[key];var buffer=new rxjs.ReplaySubject(1);request.subscribe(function(value){return buffer.next(value)},function(error){return buffer.error(error)},function(){return buffer.complete()});var response=buffer.asObservable();return this.cache[key]=response},HttpTranslationProvider.decorators=[{type:core.Injectable}],HttpTranslationProvider.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[TRANSLATION_CONFIG]}]},{type:http.HttpClient}]},HttpTranslationProvider}(),TranslationHandler=function(){function TranslationHandler(){}return TranslationHandler.decorators=[{type:core.Injectable}],TranslationHandler}(),DefaultTranslationHandler=function(){function DefaultTranslationHandler(configuration){this.configuration=configuration}return DefaultTranslationHandler.prototype.parseValue=function(path,key,value,args,lang){return null==value?this.handleMissingValue(path):args?this.handleArgs(value,args):value},DefaultTranslationHandler.prototype.handleMissingValue=function(path){return this.configuration.missingValue?"function"==typeof this.configuration.missingValue?this.configuration.missingValue(path):this.configuration.missingValue:path},DefaultTranslationHandler.prototype.handleArgs=function(value,args){return value.replace(/{{\s?([^{}\s]*)\s?}}/g,function(substring,parsedKey){var replacer=args[parsedKey];return void 0!==replacer?replacer:substring})},DefaultTranslationHandler.decorators=[{type:core.Injectable}],DefaultTranslationHandler.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[TRANSLATION_CONFIG]}]}]},DefaultTranslationHandler}();function isObject(item){return"object"==typeof item&&!Array.isArray(item)}var TranslationService=function(){function TranslationService(configuration,locale,translationProvider,translationHandler){this.configuration=configuration,this.locale=locale,this.translationProvider=translationProvider,this.translationHandler=translationHandler,this.translationError=new rxjs.Subject,this.translation=new rxjs.BehaviorSubject(""),this.translationData={},this.serviceState=ServiceState.isWaiting}return TranslationService.prototype.getConfiguration=function(){return this.configuration},TranslationService.prototype.init=function(){return __awaiter(this,void 0,void 0,function(){var translations,_i,translations_1,translation,_this=this;return __generator(this,function(_a){switch(_a.label){case 0:if(this.configuration.providers)this.loadingMode=LoadingMode.Async;else if(this.loadingMode=LoadingMode.Direct,this.configuration.translationData)for(translations=this.configuration.translationData,_i=0,translations_1=translations;_i<translations_1.length;_i++)translation=translations_1[_i],this.addData(translation.data,translation.languageCode);return this.locale.loadTranslation.subscribe(function(){_this.loadTranslation()}),[4,this.loadTranslation()];case 1:return _a.sent(),[2]}})})},TranslationService.prototype.translationChanged=function(){return this.translation.asObservable()},TranslationService.prototype.translate=function(keys,args,lang){if(void 0===args&&(args=null),void 0===lang&&(lang=this.translation.getValue()),this.serviceState!=ServiceState.isReady)return keys;if(Array.isArray(keys)){for(var data={},_i=0,keys_1=keys;_i<keys_1.length;_i++){var key=keys_1[_i];data[key]=this.translateKey(key,args,lang)}return data}return this.translateKey(keys,args,lang)},TranslationService.prototype.translateAsync=function(keys,args,lang){var _this=this;return void 0===lang&&(lang=this.translation.getValue()),rxjs.Observable.create(function(observer){var values=_this.translate(keys,args,lang);observer.next(values),observer.complete()})},TranslationService.prototype.translateKey=function(key,args,lang){return null==key||""==key?null:this.configuration.i18nPlural&&/^\d+\b/.exec(key)?this.translateI18nPlural(key,args,lang):this.getValue(key,args,lang)},TranslationService.prototype.getValue=function(key,args,lang){var path=key,value=null,translation=this.translationData[lang];if(translation){if(this.configuration.composedKeySeparator){var sequences=key.split(this.configuration.composedKeySeparator);for(key=sequences.shift();0<sequences.length&&translation[key];)translation=translation[key],key=sequences.shift()}value=translation[key]||translation[this.configuration.missingKey||""]}return this.translationHandler.parseValue(path,key,value,args,lang)},TranslationService.prototype.translateI18nPlural=function(key,args,lang){var keyText=key.replace(/^\d+\b/,"");keyText=keyText.trim();var keyNumber=parseFloat(key);return(key=key.replace(/^\d+/,this.translateNumber(keyNumber))).replace(keyText,this.getValue(keyText,args,lang))},TranslationService.prototype.translateNumber=function(keyNumber){return!isNaN(keyNumber)&&IntlAPI.hasNumberFormat()?new Intl.NumberFormat(this.translation.getValue()).format(keyNumber):keyNumber.toString()},TranslationService.prototype.loadTranslation=function(){return __awaiter(this,void 0,void 0,function(){var language;return __generator(this,function(_a){switch(_a.label){case 0:return null==(language=this.configuration.composedLanguage?this.composeLanguage(this.configuration.composedLanguage):this.locale.getCurrentLanguage())?[3,3]:this.loadingMode!=LoadingMode.Async?[3,2]:[4,this.getTranslation(language).toPromise()];case 1:return _a.sent(),[3,3];case 2:this.releaseTranslation(language),_a.label=3;case 3:return[2]}})})},TranslationService.prototype.composeLanguage=function(composedLanguage){var language="";if(0<composedLanguage.length)for(var i=0;i<=composedLanguage.length-1;i++){switch(composedLanguage[i]){case ISOCode.Script:language+=this.locale.getCurrentScript();break;case ISOCode.Country:language+=this.locale.getCurrentCountry();break;default:language+=this.locale.getCurrentLanguage()}i<composedLanguage.length-1&&(language+="-")}return language},TranslationService.prototype.getTranslation=function(language){var _this=this;return rxjs.Observable.create(function(observer){_this.translationData={},_this.serviceState=ServiceState.isLoading;for(var sequencesOfOrderedTranslationData=[],sequencesOfTranslationData=[],_i=0,_a=_this.configuration.providers;_i<_a.length;_i++){var provider=_a[_i];if(void 0!==provider.type&&provider.type==ProviderType.Fallback){var fallbackLanguage=language;provider.fallbackLanguage&&(fallbackLanguage=_this.composeLanguage(provider.fallbackLanguage)),sequencesOfOrderedTranslationData.push(_this.translationProvider.getTranslation(fallbackLanguage,provider))}else sequencesOfTranslationData.push(_this.translationProvider.getTranslation(language,provider))}var mergedSequencesOfTranslationData=rxjs.merge.apply(void 0,sequencesOfTranslationData);sequencesOfOrderedTranslationData.push(mergedSequencesOfTranslationData),rxjs.concat.apply(void 0,sequencesOfOrderedTranslationData).subscribe(function(data){_this.addData(data,language)},function(error){_this.translationError.next(error),_this.releaseTranslation(language),observer.next(null),observer.complete()},function(){_this.releaseTranslation(language),observer.next(null),observer.complete()})})},TranslationService.prototype.addData=function(data,language){this.translationData[language]=void 0!==this.translationData[language]?function mergeDeep(target,source){var output=Object.assign({},target);return isObject(target)&&isObject(source)&&Object.keys(source).forEach(function(key){var _a,_b;isObject(source[key])?key in target?output[key]=mergeDeep(target[key],source[key]):Object.assign(output,((_a={})[key]=source[key],_a)):Object.assign(output,((_b={})[key]=source[key],_b))}),output}(this.translationData[language],data):data},TranslationService.prototype.releaseTranslation=function(language){this.serviceState=ServiceState.isReady,this.sendEvents(language)},TranslationService.prototype.sendEvents=function(language){this.translation.next(language)},TranslationService.decorators=[{type:core.Injectable}],TranslationService.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[TRANSLATION_CONFIG]}]},{type:LocaleService},{type:TranslationProvider},{type:TranslationHandler}]},TranslationService}(),L10nLoader=function(){function L10nLoader(localeConfig,translationConfig,locale,translation){this.localeConfig=localeConfig,this.translationConfig=translationConfig,this.locale=locale,this.translation=translation}return L10nLoader.prototype.load=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return 0<Object.keys(this.localeConfig).length?[4,this.locale.init()]:[3,2];case 1:_a.sent(),_a.label=2;case 2:return 0<Object.keys(this.translationConfig).length?[4,this.translation.init()]:[3,4];case 3:_a.sent(),_a.label=4;case 4:return[2]}})})},L10nLoader.decorators=[{type:core.Injectable}],L10nLoader.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[LOCALE_CONFIG]}]},{type:void 0,decorators:[{type:core.Inject,args:[TRANSLATION_CONFIG]}]},{type:LocaleService},{type:TranslationService}]},L10nLoader}(),Translation=function(){function Translation(changeDetectorRef){var _this=this;this.changeDetectorRef=changeDetectorRef,this.paramSubscriptions=[],this.translation=InjectorRef.get(TranslationService),this.paramSubscriptions.push(this.translation.translationChanged().subscribe(function(language){_this.lang=language,_this.changeDetectorRef&&_this.changeDetectorRef.markForCheck()}))}return Translation.prototype.cancelParamSubscriptions=function(){this.paramSubscriptions.forEach(function(subscription){void 0!==subscription&&subscription.unsubscribe()})},Translation.decorators=[{type:core.Injectable}],Translation.ctorParameters=function(){return[{type:core.ChangeDetectorRef}]},Translation}(),Localization=function(_super){function Localization(changeDetectorRef){var _this=_super.call(this)||this;return _this.changeDetectorRef=changeDetectorRef,_this.locale=InjectorRef.get(LocaleService),_this.defaultLocale=_this.locale.getDefaultLocale(),_this.paramSubscriptions.push(_this.locale.defaultLocaleChanged.subscribe(function(defaultLocale){_this.defaultLocale=defaultLocale,_this.changeDetectorRef&&_this.changeDetectorRef.markForCheck()})),_this.currency=_this.locale.getCurrentCurrency(),_this.paramSubscriptions.push(_this.locale.currencyCodeChanged.subscribe(function(currency){_this.currency=currency,_this.changeDetectorRef&&_this.changeDetectorRef.markForCheck()})),_this.timezone=_this.locale.getCurrentTimezone(),_this.paramSubscriptions.push(_this.locale.timezoneChanged.subscribe(function(zoneName){_this.timezone=zoneName,_this.changeDetectorRef&&_this.changeDetectorRef.markForCheck()})),_this}return __extends(Localization,_super),Localization.decorators=[{type:core.Injectable}],Localization.ctorParameters=function(){return[{type:core.ChangeDetectorRef}]},Localization}(Translation),LocaleValidation=function(){function LocaleValidation(locale){this.locale=locale}return LocaleValidation.prototype.parseNumber=function(s,defaultLocale){if(void 0===defaultLocale&&(defaultLocale=this.locale.getDefaultLocale()),""==s||null==s)return null;for(var value="",decimalCode=this.getDecimalCode(defaultLocale),numberCodes=this.getNumberCodes(defaultLocale),_i=0,characters_1=s.split("");_i<characters_1.length;_i++){var char=characters_1[_i],charCode=this.toUnicode(char),index=numberCodes.indexOf(charCode);if(-1!=index)value+=index;else if(charCode==decimalCode.minusSign)value+="-";else{if(charCode!=decimalCode.decimalSeparator){if(charCode==decimalCode.thousandSeparator)continue;return NaN}value+="."}}return parseFloat(value)},LocaleValidation.prototype.getRegExp=function(digits,defaultLocale){void 0===defaultLocale&&(defaultLocale=this.locale.getDefaultLocale());var minInt=1,minFraction=0,maxFraction=3;if(digits){var parts=digits.match(/^(\d+)?\.((\d+)(\-(\d+))?)?$/);null!=parts&&(null!=parts[1]&&(minInt=parseInt(parts[1])),null!=parts[3]&&(minFraction=parseInt(parts[3])),null!=parts[5]&&(maxFraction=parseInt(parts[5])))}var decimalCode=this.getDecimalCode(defaultLocale),numberCodes=this.getNumberCodes(defaultLocale),minusSign=decimalCode.minusSign,zero=numberCodes[0],decimalSeparator=decimalCode.decimalSeparator,thousandSeparator=decimalCode.thousandSeparator,d="["+zero+"-"+numberCodes[9]+"]",n="{"+minInt+",}",nm="{"+minFraction+","+maxFraction+"}",pattern="^"+minusSign+"?("+(""+d+n)+"|"+("(?=(?:\\"+thousandSeparator+"*"+d+")"+n+"(\\"+decimalSeparator+"|$))(?!"+zero+"(?!\\"+decimalSeparator+"|"+d+"))"+d+"{1,3}(\\"+thousandSeparator+d+"{3})*")+")";return pattern+=0<minFraction&&0<maxFraction?"\\"+decimalSeparator+d+nm+"$":0==minFraction&&0<maxFraction?"(\\"+decimalSeparator+d+nm+")?$":"$",pattern=this.toChar(pattern),new RegExp(pattern)},LocaleValidation.prototype.getDecimalCode=function(defaultLocale){var decimalCode={minusSign:this.toUnicode("-"),decimalSeparator:this.toUnicode("."),thousandSeparator:this.toUnicode(",")};if(IntlAPI.hasNumberFormat()){for(var localeValue=new Intl.NumberFormat(defaultLocale).format(-1000.9),unicodeChars=[],i=0;i<=7;i++)unicodeChars.push(this.toUnicode(localeValue.charAt(i)));decimalCode="\\u200F"==unicodeChars[0]||"\\u061C"==unicodeChars[0]?{minusSign:unicodeChars[1],decimalSeparator:unicodeChars[7],thousandSeparator:unicodeChars[3]}:unicodeChars[0]==this.toUnicode(new Intl.NumberFormat(defaultLocale).format(1))?{minusSign:unicodeChars[7],decimalSeparator:unicodeChars[5],thousandSeparator:unicodeChars[1]}:"\\u200E"==unicodeChars[0]?{minusSign:unicodeChars[1],decimalSeparator:unicodeChars[7],thousandSeparator:unicodeChars[3]}:{minusSign:unicodeChars[0],decimalSeparator:unicodeChars[6],thousandSeparator:unicodeChars[2]}}return decimalCode},LocaleValidation.prototype.getNumberCodes=function(defaultLocale){for(var numberCodes=[],num=0;num<=9;num++)numberCodes.push(this.toUnicode(num.toString()));if(IntlAPI.hasNumberFormat())for(num=0;num<=9;num++)numberCodes[num]=this.toUnicode(new Intl.NumberFormat(defaultLocale).format(num));return numberCodes},LocaleValidation.prototype.toChar=function(pattern){return pattern.replace(/\\u[\dA-F]{4}/gi,function(match){return String.fromCharCode(parseInt(match.replace(/\\u/g,""),16))})},LocaleValidation.prototype.toUnicode=function(c){return"\\u"+this.toHex(c.charCodeAt(0))},LocaleValidation.prototype.toHex=function(value){var hex=value.toString(16).toUpperCase();return hex="0000".substr(0,4-hex.length)+hex},LocaleValidation.decorators=[{type:core.Injectable}],LocaleValidation.ctorParameters=function(){return[{type:LocaleService}]},LocaleValidation}(),Collator=function(){function Collator(locale,translation){this.locale=locale,this.translation=translation}return Collator.prototype.compare=function(key1,key2,extension,options){if(void 0===options&&(options={usage:"sort",sensitivity:"variant"}),!IntlAPI.hasCollator())return 0;var value1=this.translation.translate(key1),value2=this.translation.translate(key2),locale=this.addExtension(this.locale.getCurrentLocale(),extension);return new Intl.Collator(locale,options).compare(value1,value2)},Collator.prototype.sort=function(list,keyName,order,extension,options){var _this=this;return void 0===order&&(order="asc"),void 0===options&&(options={usage:"sort",sensitivity:"variant"}),list&&keyName&&IntlAPI.hasCollator()&&(list.sort(function(key1,key2){return _this.compare(key1[keyName],key2[keyName],extension,options)}),"desc"==order&&list.reverse()),list},Collator.prototype.sortAsync=function(list,keyName,order,extension,options){var _this=this;return void 0===options&&(options={usage:"sort",sensitivity:"variant"}),rxjs.Observable.create(function(observer){observer.next(_this.sort(list,keyName,order,extension,options)),observer.complete()})},Collator.prototype.search=function(s,list,keyNames,options){var _this=this;if(void 0===options&&(options={usage:"search"}),!list||!keyNames||""==s||null==s||!IntlAPI.hasCollator())return list;var locale=this.locale.getCurrentLocale(),collator=new Intl.Collator(locale,options);return list.filter(function(key){for(var found=!1,i=0;i<keyNames.length;i++)if(_this.match(key[keyNames[i]],s,collator)){found=!0;break}return found})},Collator.prototype.searchAsync=function(s,list,keyNames,options){var _this=this;return void 0===options&&(options={usage:"search"}),rxjs.Observable.create(function(observer){observer.next(_this.search(s,list,keyNames,options)),observer.complete()})},Collator.prototype.addExtension=function(locale,extension){return extension&&(locale=locale+"-u-"+extension),locale},Collator.prototype.match=function(key,s,collator){var value=this.translation.translate(key),valueLength=value.length,sLength=s.length;if(valueLength<sLength)return!1;if(sLength==valueLength)return 0==collator.compare(value,s);for(var found=!1,i=0;i<valueLength-(sLength-1);i++){var str=value.substr(i,sLength);if(0==collator.compare(str,s)){found=!0;break}}return found},Collator.decorators=[{type:core.Injectable}],Collator.ctorParameters=function(){return[{type:LocaleService},{type:TranslationService}]},Collator}();var TranslatePipe=function(){function TranslatePipe(translation){this.translation=translation}return TranslatePipe.prototype.transform=function(key,lang,args){return this.translation.translate(key,args,lang)},TranslatePipe.decorators=[{type:core.Pipe,args:[{name:"translate",pure:!0}]}],TranslatePipe.ctorParameters=function(){return[{type:TranslationService}]},TranslatePipe}();function intlDateTimeFormat(date,defaultLocale,options,timezone){return options.timeZone=IntlAPI.hasTimezone()?timezone:"UTC",new Intl.DateTimeFormat(defaultLocale,options).format(date).replace(/[\u200e\u200f]/g,"")}function datePartFactory(options){return function(date,defaultLocale,timezone){return intlDateTimeFormat(date,defaultLocale,options,timezone)}}function combine(options){return options.reduce(function(merged,opt){return __assign({},merged,opt)},{})}function digitCondition(prop,len){var result={};return result[prop]=2===len?"2-digit":"numeric",result}function nameCondition(prop,len){var result={};return result[prop]=len<4?1<len?"short":"narrow":"long",result}var FORMAT_ALIASES={short:datePartFactory(combine([digitCondition("year",1),digitCondition("month",1),digitCondition("day",1),digitCondition("hour",1),digitCondition("minute",1)])),medium:datePartFactory(combine([digitCondition("year",1),nameCondition("month",3),digitCondition("day",1),digitCondition("hour",1),digitCondition("minute",1),digitCondition("second",1)])),shortDate:datePartFactory(combine([digitCondition("year",1),digitCondition("month",1),digitCondition("day",1)])),mediumDate:datePartFactory(combine([digitCondition("year",1),nameCondition("month",3),digitCondition("day",1)])),longDate:datePartFactory(combine([digitCondition("year",1),nameCondition("month",4),digitCondition("day",1)])),fullDate:datePartFactory(combine([digitCondition("year",1),nameCondition("month",4),nameCondition("weekday",4),digitCondition("day",1)])),shortTime:datePartFactory(combine([digitCondition("hour",1),digitCondition("minute",1)])),mediumTime:datePartFactory(combine([digitCondition("hour",1),digitCondition("second",1),digitCondition("minute",1)]))},IntlFormatter=function(){function IntlFormatter(){}return IntlFormatter.formatNumber=function(num,defaultLocale,style,digits,currency,currencyDisplay){var minInt,minFraction,maxFraction;if(style!==NumberFormatStyle.Currency&&(minInt=1,minFraction=0,maxFraction=3),digits){var parts=digits.match(/^(\d+)?\.((\d+)(\-(\d+))?)?$/);null!=parts&&(null!=parts[1]&&(minInt=parseInt(parts[1])),null!=parts[3]&&(minFraction=parseInt(parts[3])),null!=parts[5]&&(maxFraction=parseInt(parts[5])))}return IntlFormatter.numberFormatter(num,defaultLocale,style,{minimumIntegerDigits:minInt,minimumFractionDigits:minFraction,maximumFractionDigits:maxFraction,currency:currency,currencyDisplay:currencyDisplay})},IntlFormatter.formatDate=function(date,defaultLocale,format,timezone){return IntlFormatter.dateTimeFormatter(date,defaultLocale,format,timezone)},IntlFormatter.numberFormatter=function(num,defaultLocale,style,opts){void 0===opts&&(opts={});var minimumIntegerDigits=opts.minimumIntegerDigits,minimumFractionDigits=opts.minimumFractionDigits,maximumFractionDigits=opts.maximumFractionDigits,currency=opts.currency,currencyDisplay=opts.currencyDisplay,options={minimumIntegerDigits:minimumIntegerDigits,minimumFractionDigits:minimumFractionDigits,maximumFractionDigits:maximumFractionDigits,style:NumberFormatStyle[style].toLowerCase()};return style==NumberFormatStyle.Currency&&(options.currency=currency,options.currencyDisplay=currencyDisplay),new Intl.NumberFormat(defaultLocale,options).format(num)},IntlFormatter.dateTimeFormatter=function(date,defaultLocale,format,timezone){var options={};if("string"==typeof format){var fnFormatAliases=FORMAT_ALIASES[format];if(fnFormatAliases)return fnFormatAliases(date,defaultLocale,timezone)}else options=format;return intlDateTimeFormat(date,defaultLocale,options,timezone)},IntlFormatter}(),L10nDatePipe=function(){function L10nDatePipe(){this.ISO8601_DATE_REGEX=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/}return L10nDatePipe.prototype.transform=function(value,defaultLocale,format,timezone){if(void 0===format&&(format="mediumDate"),null==value||""===value||value!=value)return null;if(void 0===defaultLocale)return null;if(IntlAPI.hasDateTimeFormat()){var date=void 0;if("string"==typeof value&&(value=value.trim()),this.isDate(value))date=value;else if(isNaN(value-parseFloat(value)))if("string"==typeof value&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(value)){var _a=value.split("-").map(function(val){return parseInt(val,10)}),y=_a[0],m=_a[1],d=_a[2];date=new Date(y,m-1,d)}else date=new Date(value);else date=new Date(parseFloat(value));if(!this.isDate(date)){var match=void 0;"string"==typeof value&&(match=value.match(this.ISO8601_DATE_REGEX))&&(date=this.isoStringToDate(match))}return IntlFormatter.formatDate(date,defaultLocale,format,timezone)}return value},L10nDatePipe.prototype.isDate=function(value){return value instanceof Date&&!isNaN(value.valueOf())},L10nDatePipe.prototype.isoStringToDate=function(match){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;match[9]&&(tzHour=+(match[9]+match[10]),tzMin=+(match[9]+match[11])),dateSetter.call(date,+match[1],+match[2]-1,+match[3]);var h=+(match[4]||"0")-tzHour,m=+(match[5]||"0")-tzMin,s=+(match[6]||"0"),ms=Math.round(1e3*parseFloat("0."+(match[7]||0)));return timeSetter.call(date,h,m,s,ms),date},L10nDatePipe.decorators=[{type:core.Pipe,args:[{name:"l10nDate",pure:!0}]}],L10nDatePipe}(),L10nDecimalPipe=function(){function L10nDecimalPipe(){}return L10nDecimalPipe.prototype.transform=function(value,defaultLocale,digits){return null==value?null:void 0===defaultLocale?null:IntlAPI.hasNumberFormat()?(value="string"!=typeof value||isNaN(+value-parseFloat(value))?value:+value,IntlFormatter.formatNumber(value,defaultLocale,NumberFormatStyle.Decimal,digits)):value},L10nDecimalPipe.decorators=[{type:core.Pipe,args:[{name:"l10nDecimal",pure:!0}]}],L10nDecimalPipe}(),L10nPercentPipe=function(){function L10nPercentPipe(){}return L10nPercentPipe.prototype.transform=function(value,defaultLocale,digits){return null==value?null:void 0===defaultLocale?null:IntlAPI.hasNumberFormat()?(value="string"!=typeof value||isNaN(+value-parseFloat(value))?value:+value,IntlFormatter.formatNumber(value,defaultLocale,NumberFormatStyle.Percent,digits)):value},L10nPercentPipe.decorators=[{type:core.Pipe,args:[{name:"l10nPercent",pure:!0}]}],L10nPercentPipe}(),L10nCurrencyPipe=function(){function L10nCurrencyPipe(){}return L10nCurrencyPipe.prototype.transform=function(value,defaultLocale,currency,currencyDisplay,digits){return void 0===currencyDisplay&&(currencyDisplay="symbol"),null==value?null:void 0===defaultLocale||void 0===currency?null:IntlAPI.hasNumberFormat()?(value="string"!=typeof value||isNaN(+value-parseFloat(value))?value:+value,IntlFormatter.formatNumber(value,defaultLocale,NumberFormatStyle.Currency,digits,currency,currencyDisplay)):value+" "+currency},L10nCurrencyPipe.decorators=[{type:core.Pipe,args:[{name:"l10nCurrency",pure:!0}]}],L10nCurrencyPipe}(),BFS=function(){function BFS(){}return BFS.getTargetNode=function(rootNode){return BFS.walk(rootNode)},BFS.walk=function(rootNode){var iNode,queue=[],depth=0,nodeToDepthIncrease=1;for(queue.push(rootNode);0<queue.length&&depth<=this.MAX_DEPTH;){if(iNode=queue.shift(),this.isTargetNode(iNode))return iNode;if(depth<this.MAX_DEPTH&&null!=iNode.childNodes)for(var _i=0,_a=iNode.childNodes;_i<_a.length;_i++){var child=_a[_i];this.isValidNode(child)&&queue.push(child)}0==--nodeToDepthIncrease&&(depth++,nodeToDepthIncrease=queue.length)}return rootNode},BFS.isTargetNode=function(node){return void 0!==node&&3==node.nodeType&&null!=node.nodeValue&&""!=node.nodeValue.trim()},BFS.isValidNode=function(node){if(void 0!==node&&1==node.nodeType&&node.attributes)for(var _i=0,_a=node.attributes;_i<_a.length;_i++){var attr=_a[_i];if(attr&&this.SELECTOR.test(attr.name))return!1}return!0},BFS.SELECTOR=new RegExp("^l10n|translate|locale"),BFS.MAX_DEPTH=10,BFS}(),BaseDirective=function(){function BaseDirective(el,renderer){this.el=el,this.renderer=renderer,this.attributes=[],this.subscriptions=[],this.TEXT_MUTATION_CONFIG={subtree:!0,characterData:!0},this.SELECTOR=/^l10n-/}return BaseDirective.prototype.ngAfterViewInit=function(){this.el&&this.el.nativeElement&&(this.element=this.el.nativeElement,this.renderNode=BFS.getTargetNode(this.element),this.getKey(),this.getAttributes(),this.addTextListener(),this.setup())},BaseDirective.prototype.ngOnChanges=function(changes){this.key&&(null!=this.nodeValue&&""!=this.nodeValue||(this.valueAttribute?this.key=this.valueAttribute:this.innerHTMLProperty&&(this.key=this.innerHTMLProperty)),this.replaceText()),0<this.attributes.length&&this.replaceAttributes()},BaseDirective.prototype.ngOnDestroy=function(){this.removeTextListener(),this.cancelSubscriptions()},BaseDirective.prototype.getAttributesData=function(){for(var data={},_i=0,keys_1=this.getAttributesKeys();_i<keys_1.length;_i++){var key=keys_1[_i];data[key]=this.getValues(key)}return data},BaseDirective.prototype.getAttributesKeys=function(){return this.attributes.map(function(attr){return attr.key})},BaseDirective.prototype.setText=function(value){value&&(this.nodeValue&&this.key?(this.removeTextListener(),this.renderer.setValue(this.renderNode,this.nodeValue.replace(this.key,value)),this.addTextListener()):this.valueAttribute?this.renderer.setAttribute(this.element,"value",value):this.innerHTMLProperty&&this.renderer.setProperty(this.element,"innerHTML",value))},BaseDirective.prototype.setAttributes=function(data){for(var _i=0,_a=this.attributes;_i<_a.length;_i++){var attr=_a[_i];this.renderer.setAttribute(this.element,attr.name,data[attr.key])}},BaseDirective.prototype.addTextListener=function(){var _this=this;"undefined"!=typeof MutationObserver&&(this.textObserver=new MutationObserver(function(mutations){_this.renderNode=BFS.getTargetNode(_this.element),_this.getKey(),_this.replaceText()}),this.textObserver.observe(this.renderNode,this.TEXT_MUTATION_CONFIG))},BaseDirective.prototype.removeTextListener=function(){void 0!==this.textObserver&&this.textObserver.disconnect()},BaseDirective.prototype.getText=function(){return this.nodeValue=null!=this.renderNode?this.renderNode.nodeValue:"",this.nodeValue?this.nodeValue.trim():""},BaseDirective.prototype.getKey=function(){0<this.element.childNodes.length?this.key=this.getText():this.valueAttribute?this.key=this.valueAttribute:this.innerHTMLProperty&&(this.key=this.innerHTMLProperty)},BaseDirective.prototype.getAttributes=function(){if(this.element.attributes)for(var _i=0,_a=this.element.attributes;_i<_a.length;_i++){var attr=_a[_i];if(attr&&this.SELECTOR.test(attr.name))for(var name_1=attr.name.substr(5),_b=0,_c=this.element.attributes;_b<_c.length;_b++){var targetAttr=_c[_b];new RegExp("^"+name_1+"$").test(targetAttr.name)&&this.attributes.push({name:name_1,key:targetAttr.value})}}},BaseDirective.prototype.cancelSubscriptions=function(){this.subscriptions.forEach(function(subscription){void 0!==subscription&&subscription.unsubscribe()})},BaseDirective.propDecorators={valueAttribute:[{type:core.Input,args:["value"]}],innerHTMLProperty:[{type:core.Input,args:["innerHTML"]}]},BaseDirective}(),TranslateDirective=function(_super){function TranslateDirective(translation,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.translation=translation,_this.el=el,_this.renderer=renderer,_this}return __extends(TranslateDirective,_super),Object.defineProperty(TranslateDirective.prototype,"l10nTranslate",{set:function(params){this.params=params},enumerable:!0,configurable:!0}),Object.defineProperty(TranslateDirective.prototype,"translate",{set:function(params){this.params=params},enumerable:!0,configurable:!0}),TranslateDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.translation.translationChanged().subscribe(function(){_this.replace()}))},TranslateDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},TranslateDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},TranslateDirective.prototype.replaceAttributes=function(){if(0<this.attributes.length){var keys=this.getAttributesKeys();this.setAttributes(this.getValues(keys))}},TranslateDirective.prototype.getValues=function(keys){return this.translation.translate(keys,this.params)},TranslateDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nTranslate],[translate]"}]}],TranslateDirective.ctorParameters=function(){return[{type:TranslationService},{type:core.ElementRef},{type:core.Renderer2}]},TranslateDirective.propDecorators={l10nTranslate:[{type:core.Input}],translate:[{type:core.Input}],params:[{type:core.Input}]},TranslateDirective}(BaseDirective),L10nDateDirective=function(_super){function L10nDateDirective(locale,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.locale=locale,_this.el=el,_this.renderer=renderer,_this.defaultFormat="mediumDate",_this.l10nDatePipe=new L10nDatePipe,_this}return __extends(L10nDateDirective,_super),Object.defineProperty(L10nDateDirective.prototype,"l10nDate",{set:function(format){this.format=format},enumerable:!0,configurable:!0}),L10nDateDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.locale.defaultLocaleChanged.subscribe(function(){_this.replace()})),this.subscriptions.push(this.locale.timezoneChanged.subscribe(function(){_this.replace()}))},L10nDateDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},L10nDateDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},L10nDateDirective.prototype.replaceAttributes=function(){0<this.attributes.length&&this.setAttributes(this.getAttributesData())},L10nDateDirective.prototype.getValues=function(keys){return this.l10nDatePipe.transform(keys,this.locale.getDefaultLocale(),this.format||this.defaultFormat,this.locale.getCurrentTimezone())},L10nDateDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nDate]"}]}],L10nDateDirective.ctorParameters=function(){return[{type:LocaleService},{type:core.ElementRef},{type:core.Renderer2}]},L10nDateDirective.propDecorators={l10nDate:[{type:core.Input}],format:[{type:core.Input}]},L10nDateDirective}(BaseDirective),L10nDecimalDirective=function(_super){function L10nDecimalDirective(locale,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.locale=locale,_this.el=el,_this.renderer=renderer,_this.l10nDecimalPipe=new L10nDecimalPipe,_this}return __extends(L10nDecimalDirective,_super),Object.defineProperty(L10nDecimalDirective.prototype,"l10nDecimal",{set:function(digits){this.digits=digits},enumerable:!0,configurable:!0}),L10nDecimalDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.locale.defaultLocaleChanged.subscribe(function(){_this.replace()}))},L10nDecimalDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},L10nDecimalDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},L10nDecimalDirective.prototype.replaceAttributes=function(){0<this.attributes.length&&this.setAttributes(this.getAttributesData())},L10nDecimalDirective.prototype.getValues=function(keys){return this.l10nDecimalPipe.transform(keys,this.locale.getDefaultLocale(),this.digits)},L10nDecimalDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nDecimal]"}]}],L10nDecimalDirective.ctorParameters=function(){return[{type:LocaleService},{type:core.ElementRef},{type:core.Renderer2}]},L10nDecimalDirective.propDecorators={l10nDecimal:[{type:core.Input}],digits:[{type:core.Input}]},L10nDecimalDirective}(BaseDirective),L10nPercentDirective=function(_super){function L10nPercentDirective(locale,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.locale=locale,_this.el=el,_this.renderer=renderer,_this.l10nPercentPipe=new L10nPercentPipe,_this}return __extends(L10nPercentDirective,_super),Object.defineProperty(L10nPercentDirective.prototype,"l10nPercent",{set:function(digits){this.digits=digits},enumerable:!0,configurable:!0}),L10nPercentDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.locale.defaultLocaleChanged.subscribe(function(){_this.replace()}))},L10nPercentDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},L10nPercentDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},L10nPercentDirective.prototype.replaceAttributes=function(){0<this.attributes.length&&this.setAttributes(this.getAttributesData())},L10nPercentDirective.prototype.getValues=function(keys){return this.l10nPercentPipe.transform(keys,this.locale.getDefaultLocale(),this.digits)},L10nPercentDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nPercent]"}]}],L10nPercentDirective.ctorParameters=function(){return[{type:LocaleService},{type:core.ElementRef},{type:core.Renderer2}]},L10nPercentDirective.propDecorators={l10nPercent:[{type:core.Input}],digits:[{type:core.Input}]},L10nPercentDirective}(BaseDirective),L10nCurrencyDirective=function(_super){function L10nCurrencyDirective(locale,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.locale=locale,_this.el=el,_this.renderer=renderer,_this.l10nCurrencyPipe=new L10nCurrencyPipe,_this}return __extends(L10nCurrencyDirective,_super),Object.defineProperty(L10nCurrencyDirective.prototype,"l10nCurrency",{set:function(digits){this.digits=digits},enumerable:!0,configurable:!0}),L10nCurrencyDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.locale.defaultLocaleChanged.subscribe(function(){_this.replace()})),this.subscriptions.push(this.locale.currencyCodeChanged.subscribe(function(){_this.replace()}))},L10nCurrencyDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},L10nCurrencyDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},L10nCurrencyDirective.prototype.replaceAttributes=function(){0<this.attributes.length&&this.setAttributes(this.getAttributesData())},L10nCurrencyDirective.prototype.getValues=function(keys){return this.l10nCurrencyPipe.transform(keys,this.locale.getDefaultLocale(),this.locale.getCurrentCurrency(),this.currencyDisplay,this.digits)},L10nCurrencyDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nCurrency]"}]}],L10nCurrencyDirective.ctorParameters=function(){return[{type:LocaleService},{type:core.ElementRef},{type:core.Renderer2}]},L10nCurrencyDirective.propDecorators={l10nCurrency:[{type:core.Input}],currencyDisplay:[{type:core.Input}],digits:[{type:core.Input}]},L10nCurrencyDirective}(BaseDirective);function l10nValidateNumber(digits,MIN_VALUE,MAX_VALUE){void 0===MIN_VALUE&&(MIN_VALUE=Number.MIN_VALUE),void 0===MAX_VALUE&&(MAX_VALUE=Number.MAX_VALUE);var defaultLocale,NUMBER_REGEXP,locale=InjectorRef.get(LocaleService),localeValidation=InjectorRef.get(LocaleValidation);return function(c){if(null==c.value||""==c.value)return null;if(defaultLocale!=locale.getDefaultLocale()&&(NUMBER_REGEXP=localeValidation.getRegExp(digits),defaultLocale=locale.getDefaultLocale()),NUMBER_REGEXP.test(c.value)){var parsedValue=localeValidation.parseNumber(c.value);return null!=parsedValue&&parsedValue<MIN_VALUE?{minValue:{valid:!1}}:null!=parsedValue&&MAX_VALUE<parsedValue?{maxValue:{valid:!1}}:null}return{format:{valid:!1}}}}var L10nNumberValidatorDirective=function(){function L10nNumberValidatorDirective(){this.MIN_VALUE=Number.MIN_VALUE,this.MAX_VALUE=Number.MAX_VALUE}return Object.defineProperty(L10nNumberValidatorDirective.prototype,"l10nValidateNumber",{set:function(digits){this.digits=digits},enumerable:!0,configurable:!0}),L10nNumberValidatorDirective.prototype.ngOnInit=function(){this.validator=l10nValidateNumber(this.digits,this.minValue||this.MIN_VALUE,this.maxValue||this.MAX_VALUE)},L10nNumberValidatorDirective.prototype.validate=function(c){return this.validator(c)},L10nNumberValidatorDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nValidateNumber][ngModel],[l10nValidateNumber][c]",providers:[{provide:forms.NG_VALIDATORS,useExisting:core.forwardRef(function(){return L10nNumberValidatorDirective}),multi:!0}]}]}],L10nNumberValidatorDirective.propDecorators={l10nValidateNumber:[{type:core.Input}],digits:[{type:core.Input}],minValue:[{type:core.Input}],maxValue:[{type:core.Input}]},L10nNumberValidatorDirective}(),TranslationModule=function(){function TranslationModule(injector){this.injector=injector}return TranslationModule.forRoot=function(l10nConfig,token){return void 0===token&&(token={}),{ngModule:TranslationModule,providers:[InjectorRef,{provide:LOCALE_CONFIG,useValue:l10nConfig.locale||{}},{provide:TRANSLATION_CONFIG,useValue:l10nConfig.translation||{}},LocaleService,{provide:LocaleStorage,useClass:token.localeStorage||BrowserStorage},TranslationService,{provide:TranslationProvider,useClass:token.translationProvider||HttpTranslationProvider},{provide:TranslationHandler,useClass:token.translationHandler||DefaultTranslationHandler},L10nLoader]}},TranslationModule.forChild=function(l10nConfig,token){return void 0===token&&(token={}),{ngModule:TranslationModule,providers:[InjectorRef,{provide:TRANSLATION_CONFIG,useValue:l10nConfig.translation||{}},TranslationService,L10nLoader]}},TranslationModule.decorators=[{type:core.NgModule,args:[{declarations:[TranslatePipe,TranslateDirective],exports:[TranslatePipe,TranslateDirective]}]}],TranslationModule.ctorParameters=function(){return[{type:InjectorRef}]},TranslationModule}(),LocalizationModule=function(){function LocalizationModule(injector){this.injector=injector}return LocalizationModule.forRoot=function(l10nConfig,token){return void 0===token&&(token={}),{ngModule:LocalizationModule,providers:[InjectorRef,{provide:LOCALE_CONFIG,useValue:l10nConfig.locale||{}},{provide:TRANSLATION_CONFIG,useValue:l10nConfig.translation||{}},LocaleService,{provide:LocaleStorage,useClass:token.localeStorage||BrowserStorage},TranslationService,{provide:TranslationProvider,useClass:token.translationProvider||HttpTranslationProvider},{provide:TranslationHandler,useClass:token.translationHandler||DefaultTranslationHandler},L10nLoader]}},LocalizationModule.forChild=function(l10nConfig,token){return void 0===token&&(token={}),{ngModule:LocalizationModule,providers:[InjectorRef,{provide:TRANSLATION_CONFIG,useValue:l10nConfig.translation||{}},TranslationService,L10nLoader]}},LocalizationModule.decorators=[{type:core.NgModule,args:[{declarations:[L10nDatePipe,L10nDecimalPipe,L10nPercentPipe,L10nCurrencyPipe,L10nDateDirective,L10nDecimalDirective,L10nPercentDirective,L10nCurrencyDirective],imports:[TranslationModule],exports:[TranslationModule,L10nDatePipe,L10nDecimalPipe,L10nPercentPipe,L10nCurrencyPipe,L10nDateDirective,L10nDecimalDirective,L10nPercentDirective,L10nCurrencyDirective]}]}],LocalizationModule.ctorParameters=function(){return[{type:InjectorRef}]},LocalizationModule}(),LocaleValidationModule=function(){function LocaleValidationModule(){}return LocaleValidationModule.forRoot=function(){return{ngModule:LocaleValidationModule,providers:[LocaleValidation]}},LocaleValidationModule.decorators=[{type:core.NgModule,args:[{declarations:[L10nNumberValidatorDirective],exports:[L10nNumberValidatorDirective]}]}],LocaleValidationModule}();exports.InjectorRef=InjectorRef,exports.StorageStrategy=StorageStrategy,exports.ProviderType=ProviderType,exports.ISOCode=ISOCode,exports.LOCALE_CONFIG=LOCALE_CONFIG,exports.TRANSLATION_CONFIG=TRANSLATION_CONFIG,exports.L10nLoader=L10nLoader,exports.LocaleService=LocaleService,exports.LocaleStorage=LocaleStorage,exports.BrowserStorage=BrowserStorage,exports.TranslationService=TranslationService,exports.TranslationProvider=TranslationProvider,exports.HttpTranslationProvider=HttpTranslationProvider,exports.TranslationHandler=TranslationHandler,exports.DefaultTranslationHandler=DefaultTranslationHandler,exports.Translation=Translation,exports.Localization=Localization,exports.LocaleValidation=LocaleValidation,exports.Collator=Collator,exports.IntlAPI=IntlAPI,exports.Language=function(){return function(target,propertyKey){var subscription,targetNgOnInit=target.ngOnInit;target.ngOnInit=function(){var _this=this,translation=InjectorRef.get(TranslationService);void 0!==propertyKey&&(subscription=translation.translationChanged().subscribe(function(language){_this[propertyKey]=language})),targetNgOnInit&&targetNgOnInit.apply(this)};var targetNgOnDestroy=target.ngOnDestroy;target.ngOnDestroy=function(){void 0!==subscription&&subscription.unsubscribe(),targetNgOnDestroy&&targetNgOnDestroy.apply(this)},void 0!==propertyKey&&Object.defineProperty(target,propertyKey,{writable:!0,value:void 0})}},exports.DefaultLocale=function(){return function(target,propertyKey){var subscription,targetNgOnInit=target.ngOnInit;target.ngOnInit=function(){var _this=this,locale=InjectorRef.get(LocaleService);void 0!==propertyKey&&(this[propertyKey]=locale.getDefaultLocale(),subscription=locale.defaultLocaleChanged.subscribe(function(defaultLocale){_this[propertyKey]=defaultLocale})),targetNgOnInit&&targetNgOnInit.apply(this)};var targetNgOnDestroy=target.ngOnDestroy;target.ngOnDestroy=function(){void 0!==subscription&&subscription.unsubscribe(),targetNgOnDestroy&&targetNgOnDestroy.apply(this)},void 0!==propertyKey&&Object.defineProperty(target,propertyKey,{writable:!0,value:void 0})}},exports.Currency=function(){return function(target,propertyKey){var subscription,targetNgOnInit=target.ngOnInit;target.ngOnInit=function(){var _this=this,locale=InjectorRef.get(LocaleService);void 0!==propertyKey&&(this[propertyKey]=locale.getCurrentCurrency(),subscription=locale.currencyCodeChanged.subscribe(function(currency){_this[propertyKey]=currency})),targetNgOnInit&&targetNgOnInit.apply(this)};var targetNgOnDestroy=target.ngOnDestroy;target.ngOnDestroy=function(){void 0!==subscription&&subscription.unsubscribe(),targetNgOnDestroy&&targetNgOnDestroy.apply(this)},void 0!==propertyKey&&Object.defineProperty(target,propertyKey,{writable:!0,value:void 0})}},exports.Timezone=function(){return function(target,propertyKey){var subscription,targetNgOnInit=target.ngOnInit;target.ngOnInit=function(){var _this=this,locale=InjectorRef.get(LocaleService);void 0!==propertyKey&&(this[propertyKey]=locale.getCurrentTimezone(),subscription=locale.timezoneChanged.subscribe(function(zoneName){_this[propertyKey]=zoneName})),targetNgOnInit&&targetNgOnInit.apply(this)};var targetNgOnDestroy=target.ngOnDestroy;target.ngOnDestroy=function(){void 0!==subscription&&subscription.unsubscribe(),targetNgOnDestroy&&targetNgOnDestroy.apply(this)},void 0!==propertyKey&&Object.defineProperty(target,propertyKey,{writable:!0,value:void 0})}},exports.TranslatePipe=TranslatePipe,exports.L10nDatePipe=L10nDatePipe,exports.L10nDecimalPipe=L10nDecimalPipe,exports.L10nPercentPipe=L10nPercentPipe,exports.L10nCurrencyPipe=L10nCurrencyPipe,exports.BaseDirective=BaseDirective,exports.TranslateDirective=TranslateDirective,exports.L10nDateDirective=L10nDateDirective,exports.L10nDecimalDirective=L10nDecimalDirective,exports.L10nPercentDirective=L10nPercentDirective,exports.L10nCurrencyDirective=L10nCurrencyDirective,exports.L10nNumberValidatorDirective=L10nNumberValidatorDirective,exports.l10nValidateNumber=l10nValidateNumber,exports.TranslationModule=TranslationModule,exports.LocalizationModule=LocalizationModule,exports.LocaleValidationModule=LocaleValidationModule,Object.defineProperty(exports,"__esModule",{value:!0})}); | ||
*/var InjectorRef=function(){function InjectorRef(injector){this.injector=injector,InjectorRef.injector=this.injector}return InjectorRef.get=function(token){return InjectorRef.injector.get(token)},InjectorRef.injector=null,InjectorRef.decorators=[{type:core.Injectable}],InjectorRef.ctorParameters=function(){return[{type:core.Injector}]},InjectorRef}(),StorageStrategy={Session:0,Local:1,Cookie:2,Disabled:3};StorageStrategy[StorageStrategy.Session]="Session",StorageStrategy[StorageStrategy.Local]="Local",StorageStrategy[StorageStrategy.Cookie]="Cookie",StorageStrategy[StorageStrategy.Disabled]="Disabled";var ProviderType={Fallback:0,Static:1,WebAPI:2};ProviderType[ProviderType.Fallback]="Fallback",ProviderType[ProviderType.Static]="Static",ProviderType[ProviderType.WebAPI]="WebAPI";var ISOCode={Language:0,Country:1,Script:2};ISOCode[ISOCode.Language]="Language",ISOCode[ISOCode.Country]="Country",ISOCode[ISOCode.Script]="Script";var LoadingMode={Direct:0,Async:1};LoadingMode[LoadingMode.Direct]="Direct",LoadingMode[LoadingMode.Async]="Async";var ServiceState={isReady:0,isLoading:1,isWaiting:2};ServiceState[ServiceState.isReady]="isReady",ServiceState[ServiceState.isLoading]="isLoading",ServiceState[ServiceState.isWaiting]="isWaiting";var NumberFormatStyle={Decimal:0,Percent:1,Currency:2};NumberFormatStyle[NumberFormatStyle.Decimal]="Decimal",NumberFormatStyle[NumberFormatStyle.Percent]="Percent",NumberFormatStyle[NumberFormatStyle.Currency]="Currency";var LOCALE_CONFIG=new core.InjectionToken("LOCALE_CONFIG"),TRANSLATION_CONFIG=new core.InjectionToken("TRANSLATION_CONFIG"),IntlAPI=function(){function IntlAPI(){}return IntlAPI.hasIntl=function(){return"object"==typeof Intl&&!!Intl},IntlAPI.hasDateTimeFormat=function(){return IntlAPI.hasIntl()&&Intl.hasOwnProperty("DateTimeFormat")},IntlAPI.hasTimezone=function(){if(IntlAPI.hasIntl()&&IntlAPI.hasDateTimeFormat()){try{new Intl.DateTimeFormat("en-US",{timeZone:"America/Los_Angeles"}).format(new Date)}catch(e){return!1}return!0}return!1},IntlAPI.hasNumberFormat=function(){return IntlAPI.hasIntl()&&Intl.hasOwnProperty("NumberFormat")},IntlAPI.hasCollator=function(){return IntlAPI.hasIntl()&&Intl.hasOwnProperty("Collator")},IntlAPI}(),LocaleStorage=function(){function LocaleStorage(){}return LocaleStorage.decorators=[{type:core.Injectable}],LocaleStorage}(),BrowserStorage=function(){function BrowserStorage(configuration){this.configuration=configuration,this.hasCookie="undefined"!=typeof navigator&&navigator.cookieEnabled,this.hasStorage="undefined"!=typeof Storage}return BrowserStorage.prototype.read=function(name){return __awaiter(this,void 0,void 0,function(){var value;return __generator(this,function(_a){return value=null,this.configuration.storage!=StorageStrategy.Disabled&&(this.configuration.storage==StorageStrategy.Local&&this.hasStorage?value=this.getLocalStorage(name):this.configuration.storage==StorageStrategy.Session&&this.hasStorage?value=this.getSessionStorage(name):this.configuration.storage==StorageStrategy.Cookie&&this.hasCookie&&(value=this.getCookie(name))),[2,value]})})},BrowserStorage.prototype.write=function(name,value){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){return this.configuration.storage!=StorageStrategy.Disabled&&(this.configuration.storage==StorageStrategy.Local&&this.hasStorage?this.setLocalStorage(name,value):this.configuration.storage==StorageStrategy.Session&&this.hasStorage?this.setSessionStorage(name,value):this.configuration.storage==StorageStrategy.Cookie&&this.hasCookie&&this.setCookie(name,value)),[2]})})},BrowserStorage.prototype.getLocalStorage=function(name){return localStorage.getItem(name)},BrowserStorage.prototype.getSessionStorage=function(name){return sessionStorage.getItem(name)},BrowserStorage.prototype.getCookie=function(name){var result=null;return"undefined"!=typeof document&&(result=new RegExp("(?:^|; )"+encodeURIComponent(name)+"=([^;]*)").exec(document.cookie)),result?result[1]:null},BrowserStorage.prototype.setLocalStorage=function(name,value){localStorage.setItem(name,value)},BrowserStorage.prototype.setSessionStorage=function(name,value){sessionStorage.setItem(name,value)},BrowserStorage.prototype.setCookie=function(name,value){var expires="";if(null!=this.configuration.cookieExpiration){var expirationDate=new Date;expirationDate.setTime(expirationDate.getTime()+24*this.configuration.cookieExpiration*60*60*1e3),expires="; expires="+expirationDate.toUTCString()}"undefined"!=typeof document&&(document.cookie=name+"="+value+expires+"; path=/")},BrowserStorage.decorators=[{type:core.Injectable}],BrowserStorage.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[LOCALE_CONFIG]}]}]},BrowserStorage}(),DefaultLocale=function(){function DefaultLocale(){}return Object.defineProperty(DefaultLocale.prototype,"value",{get:function(){return this._value},set:function(defaultLocale){this._value=defaultLocale,this.parseValue()},enumerable:!0,configurable:!0}),DefaultLocale.prototype.build=function(languageCode,countryCode,scriptCode,numberingSystem,calendar){this.languageCode=languageCode,this.scriptCode=scriptCode,this.countryCode=countryCode,this.numberingSystem=numberingSystem,this.calendar=calendar;var value=[];value.push(languageCode),value.push(scriptCode?"-"+scriptCode:""),value.push(countryCode?"-"+countryCode:""),value.push(numberingSystem||calendar?"-u":""),value.push(numberingSystem?"-nu-"+numberingSystem:""),value.push(calendar?"-ca-"+calendar:""),this._value=value.join("")},DefaultLocale.prototype.parseValue=function(){if(this.value){var value=this.value,index=value.search("-u");if(-1!=index){var extensions=value.substring(index+1).split("-");switch(extensions.length){case 3:"nu"==extensions[1]?this.numberingSystem=extensions[2]:"ca"==extensions[1]&&(this.calendar=extensions[2]);break;default:this.numberingSystem=extensions[2],this.calendar=extensions[4]}value=value.substring(0,index)}var codes=value.split("-");switch(codes.length){case 1:this.languageCode=codes[0];break;case 2:this.languageCode=codes[0],this.countryCode=codes[1];break;default:this.languageCode=codes[0],this.scriptCode=codes[1],this.countryCode=codes[2]}}},DefaultLocale}(),LocaleService=function(){function LocaleService(configuration,storage){this.configuration=configuration,this.storage=storage,this.languageCodeChanged=new core.EventEmitter(!0),this.defaultLocaleChanged=new core.EventEmitter(!0),this.currencyCodeChanged=new core.EventEmitter(!0),this.timezoneChanged=new core.EventEmitter(!0),this.loadTranslation=new rxjs.Subject,this.defaultLocale=new DefaultLocale}return LocaleService.prototype.getConfiguration=function(){return this.configuration},LocaleService.prototype.init=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.initStorage()];case 1:return _a.sent(),this.configuration.defaultLocale?this.initDefaultLocale():this.configuration.language&&this.initLanguage(),this.configuration.currency&&this.initCurrency(),this.configuration.timezone&&this.initTimezone(),[2]}})})},LocaleService.prototype.getBrowserLanguage=function(){var browserLanguage=null;if("undefined"!=typeof navigator&&navigator.language&&(browserLanguage=navigator.language),null!=browserLanguage){var index=browserLanguage.indexOf("-");-1!=index&&(browserLanguage=browserLanguage.substring(0,index))}return browserLanguage},LocaleService.prototype.getAvailableLanguages=function(){var languages=[];return this.configuration.languages&&(languages=this.configuration.languages.map(function(language){return language.code})),languages},LocaleService.prototype.getLanguageDirection=function(languageCode){return void 0===languageCode&&(languageCode=this.defaultLocale.languageCode),this.matchLanguage(languageCode)[0].dir},LocaleService.prototype.getCurrentLanguage=function(){return this.defaultLocale.languageCode},LocaleService.prototype.getCurrentCountry=function(){return this.defaultLocale.countryCode?this.defaultLocale.countryCode:""},LocaleService.prototype.getCurrentScript=function(){return this.defaultLocale.scriptCode?this.defaultLocale.scriptCode:""},LocaleService.prototype.getCurrentLocale=function(){return this.defaultLocale.countryCode?this.defaultLocale.languageCode+"-"+this.defaultLocale.countryCode:this.defaultLocale.languageCode},LocaleService.prototype.getCurrentNumberingSystem=function(){return this.defaultLocale.numberingSystem?this.defaultLocale.numberingSystem:""},LocaleService.prototype.getCurrentCalendar=function(){return this.defaultLocale.calendar?this.defaultLocale.calendar:""},LocaleService.prototype.getDefaultLocale=function(){return this.defaultLocale.value},LocaleService.prototype.getCurrentCurrency=function(){return this.currencyCode},LocaleService.prototype.getCurrencySymbol=function(currencyDisplay,defaultLocale,currency){void 0===currencyDisplay&&(currencyDisplay="symbol"),void 0===defaultLocale&&(defaultLocale=this.defaultLocale.value),void 0===currency&&(currency=this.currencyCode);var currencySymbol=this.currencyCode;if(IntlAPI.hasNumberFormat()){var localeZero=new Intl.NumberFormat(defaultLocale).format(0);currencySymbol=(currencySymbol=new Intl.NumberFormat(defaultLocale,{style:"currency",currency:currency,currencyDisplay:currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0}).format(0).replace(localeZero,"")).trim()}return currencySymbol},LocaleService.prototype.getCurrentTimezone=function(){return this.timezone},LocaleService.prototype.setCurrentLanguage=function(languageCode){this.defaultLocale.languageCode!=languageCode&&(this.defaultLocale.build(languageCode),this.storage.write("defaultLocale",this.defaultLocale.value),this.sendLanguageEvents(),this.sendTranslationEvents())},LocaleService.prototype.setDefaultLocale=function(languageCode,countryCode,scriptCode,numberingSystem,calendar){this.defaultLocale.languageCode==languageCode&&this.defaultLocale.countryCode==countryCode&&this.defaultLocale.scriptCode==scriptCode&&this.defaultLocale.numberingSystem==numberingSystem&&this.defaultLocale.calendar==calendar||(this.defaultLocale.build(languageCode,countryCode,scriptCode,numberingSystem,calendar),this.storage.write("defaultLocale",this.defaultLocale.value),this.sendDefaultLocaleEvents(),this.sendTranslationEvents())},LocaleService.prototype.setCurrentCurrency=function(currencyCode){this.currencyCode!=currencyCode&&(this.currencyCode=currencyCode,this.storage.write("currency",this.currencyCode),this.sendCurrencyEvents())},LocaleService.prototype.setCurrentTimezone=function(zoneName){this.timezone!=zoneName&&(this.timezone=zoneName,this.storage.write("timezone",this.timezone),this.sendTimezoneEvents())},LocaleService.prototype.initStorage=function(){return __awaiter(this,void 0,void 0,function(){var defaultLocale,currencyCode,zoneName;return __generator(this,function(_a){switch(_a.label){case 0:return this.defaultLocale.value?[3,2]:[4,this.storage.read("defaultLocale")];case 1:(defaultLocale=_a.sent())&&(this.defaultLocale.value=defaultLocale),_a.label=2;case 2:return null!=this.currencyCode?[3,4]:[4,this.storage.read("currency")];case 3:(currencyCode=_a.sent())&&(this.currencyCode=currencyCode),_a.label=4;case 4:return null!=this.timezone?[3,6]:[4,this.storage.read("timezone")];case 5:(zoneName=_a.sent())&&(this.timezone=zoneName),_a.label=6;case 6:return[2]}})})},LocaleService.prototype.initLanguage=function(){if(!this.defaultLocale.languageCode){var browserLanguage=this.getBrowserLanguage(),matchedLanguages=[];browserLanguage&&(matchedLanguages=this.matchLanguage(browserLanguage)),browserLanguage&&0<matchedLanguages.length?this.defaultLocale.build(browserLanguage):this.configuration.language&&this.defaultLocale.build(this.configuration.language),this.storage.write("defaultLocale",this.defaultLocale.value)}this.sendLanguageEvents()},LocaleService.prototype.initDefaultLocale=function(){this.defaultLocale.value||this.configuration.defaultLocale&&(this.defaultLocale.build(this.configuration.defaultLocale.languageCode,this.configuration.defaultLocale.countryCode,this.configuration.defaultLocale.scriptCode,this.configuration.defaultLocale.numberingSystem,this.configuration.defaultLocale.calendar),this.storage.write("defaultLocale",this.defaultLocale.value)),this.sendDefaultLocaleEvents()},LocaleService.prototype.initCurrency=function(){null==this.currencyCode&&this.configuration.currency&&(this.currencyCode=this.configuration.currency,this.storage.write("currency",this.currencyCode)),this.sendCurrencyEvents()},LocaleService.prototype.initTimezone=function(){null==this.timezone&&this.configuration.timezone&&(this.timezone=this.configuration.timezone,this.storage.write("timezone",this.timezone)),this.sendCurrencyEvents()},LocaleService.prototype.matchLanguage=function(languageCode){var matchedLanguages=[];return this.configuration.languages&&(matchedLanguages=this.configuration.languages.filter(function(language){return language.code==languageCode})),matchedLanguages},LocaleService.prototype.sendLanguageEvents=function(){this.languageCodeChanged.emit(this.defaultLocale.languageCode)},LocaleService.prototype.sendDefaultLocaleEvents=function(){this.defaultLocaleChanged.emit(this.defaultLocale.value)},LocaleService.prototype.sendCurrencyEvents=function(){this.currencyCodeChanged.emit(this.currencyCode)},LocaleService.prototype.sendTimezoneEvents=function(){this.timezoneChanged.emit(this.timezone)},LocaleService.prototype.sendTranslationEvents=function(){this.loadTranslation.next()},LocaleService.decorators=[{type:core.Injectable}],LocaleService.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[LOCALE_CONFIG]}]},{type:LocaleStorage}]},LocaleService.propDecorators={languageCodeChanged:[{type:core.Output}],defaultLocaleChanged:[{type:core.Output}],currencyCodeChanged:[{type:core.Output}],timezoneChanged:[{type:core.Output}]},LocaleService}(),TranslationProvider=function(){function TranslationProvider(){}return TranslationProvider.decorators=[{type:core.Injectable}],TranslationProvider}(),HttpTranslationProvider=function(){function HttpTranslationProvider(configuration,http$$1){this.configuration=configuration,this.http=http$$1,this.cache={}}return HttpTranslationProvider.prototype.getTranslation=function(language,args){var request,options={headers:new http.HttpHeaders({"Content-Type":"application/json"})};this.configuration.version&&(options.params=(new http.HttpParams).set("ver",this.configuration.version));var url="";switch(args.type){case ProviderType.WebAPI:url+=args.path+language;break;default:url+=args.prefix+language+".json"}return request=this.configuration.timeout?this.http.get(url,options).pipe(operators.timeout(this.configuration.timeout)):this.http.get(url,options),this.configuration.caching?this.caching(url,request):request},HttpTranslationProvider.prototype.caching=function(key,request){if(this.cache[key])return this.cache[key];var buffer=new rxjs.ReplaySubject(1);request.subscribe(function(value){return buffer.next(value)},function(error){return buffer.error(error)},function(){return buffer.complete()});var response=buffer.asObservable();return this.cache[key]=response},HttpTranslationProvider.decorators=[{type:core.Injectable}],HttpTranslationProvider.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[TRANSLATION_CONFIG]}]},{type:http.HttpClient}]},HttpTranslationProvider}(),TranslationHandler=function(){function TranslationHandler(){}return TranslationHandler.decorators=[{type:core.Injectable}],TranslationHandler}(),DefaultTranslationHandler=function(){function DefaultTranslationHandler(configuration){this.configuration=configuration}return DefaultTranslationHandler.prototype.parseValue=function(path,key,value,args,lang){return null==value?this.handleMissingValue(path):args?this.handleArgs(value,args):value},DefaultTranslationHandler.prototype.handleMissingValue=function(path){return this.configuration.missingValue?"function"==typeof this.configuration.missingValue?this.configuration.missingValue(path):this.configuration.missingValue:path},DefaultTranslationHandler.prototype.handleArgs=function(value,args){return value.replace(/{{\s?([^{}\s]*)\s?}}/g,function(substring,parsedKey){var replacer=args[parsedKey];return void 0!==replacer?replacer:substring})},DefaultTranslationHandler.decorators=[{type:core.Injectable}],DefaultTranslationHandler.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[TRANSLATION_CONFIG]}]}]},DefaultTranslationHandler}();function isObject(item){return"object"==typeof item&&!Array.isArray(item)}var TranslationService=function(){function TranslationService(configuration,locale,translationProvider,translationHandler){this.configuration=configuration,this.locale=locale,this.translationProvider=translationProvider,this.translationHandler=translationHandler,this.translationError=new rxjs.Subject,this.translation=new rxjs.BehaviorSubject(""),this.translationData={},this.serviceState=ServiceState.isWaiting}return TranslationService.prototype.getConfiguration=function(){return this.configuration},TranslationService.prototype.init=function(){return __awaiter(this,void 0,void 0,function(){var translations,_i,translations_1,translation,_this=this;return __generator(this,function(_a){switch(_a.label){case 0:if(this.configuration.providers)this.loadingMode=LoadingMode.Async;else if(this.loadingMode=LoadingMode.Direct,this.configuration.translationData)for(translations=this.configuration.translationData,_i=0,translations_1=translations;_i<translations_1.length;_i++)translation=translations_1[_i],this.addData(translation.data,translation.languageCode);return this.locale.loadTranslation.subscribe(function(){_this.loadTranslation()}),[4,this.loadTranslation()];case 1:return _a.sent(),[2]}})})},TranslationService.prototype.translationChanged=function(){return this.translation.asObservable()},TranslationService.prototype.translate=function(keys,args,lang){if(void 0===args&&(args=null),void 0===lang&&(lang=this.translation.getValue()),this.serviceState!=ServiceState.isReady)return keys;if(Array.isArray(keys)){for(var data={},_i=0,keys_1=keys;_i<keys_1.length;_i++){var key=keys_1[_i];data[key]=this.translateKey(key,args,lang)}return data}return this.translateKey(keys,args,lang)},TranslationService.prototype.translateAsync=function(keys,args,lang){var _this=this;return void 0===lang&&(lang=this.translation.getValue()),rxjs.Observable.create(function(observer){var values=_this.translate(keys,args,lang);observer.next(values),observer.complete()})},TranslationService.prototype.translateKey=function(key,args,lang){return null==key||""==key?null:this.configuration.i18nPlural&&/^\d+\b/.exec(key)?this.translateI18nPlural(key,args,lang):this.getValue(key,args,lang)},TranslationService.prototype.getValue=function(key,args,lang){var path=key,value=null,translation=this.translationData[lang];if(translation){if(this.configuration.composedKeySeparator){var sequences=key.split(this.configuration.composedKeySeparator);for(key=sequences.shift();0<sequences.length&&translation[key];)translation=translation[key],key=sequences.shift()}value=translation[key]||translation[this.configuration.missingKey||""]}return this.translationHandler.parseValue(path,key,value,args,lang)},TranslationService.prototype.translateI18nPlural=function(key,args,lang){var keyText=key.replace(/^\d+\b/,"");keyText=keyText.trim();var keyNumber=parseFloat(key);return(key=key.replace(/^\d+/,this.translateNumber(keyNumber))).replace(keyText,this.getValue(keyText,args,lang))},TranslationService.prototype.translateNumber=function(keyNumber){return!isNaN(keyNumber)&&IntlAPI.hasNumberFormat()?new Intl.NumberFormat(this.locale.getDefaultLocale()).format(keyNumber):keyNumber.toString()},TranslationService.prototype.loadTranslation=function(){return __awaiter(this,void 0,void 0,function(){var language;return __generator(this,function(_a){switch(_a.label){case 0:return null==(language=this.configuration.composedLanguage?this.composeLanguage(this.configuration.composedLanguage):this.locale.getCurrentLanguage())?[3,3]:this.loadingMode!=LoadingMode.Async?[3,2]:[4,this.getTranslation(language).toPromise()];case 1:return _a.sent(),[3,3];case 2:this.releaseTranslation(language),_a.label=3;case 3:return[2]}})})},TranslationService.prototype.composeLanguage=function(composedLanguage){var language="";if(0<composedLanguage.length)for(var i=0;i<=composedLanguage.length-1;i++){switch(composedLanguage[i]){case ISOCode.Script:language+=this.locale.getCurrentScript();break;case ISOCode.Country:language+=this.locale.getCurrentCountry();break;default:language+=this.locale.getCurrentLanguage()}i<composedLanguage.length-1&&(language+="-")}return language},TranslationService.prototype.getTranslation=function(language){var _this=this;return rxjs.Observable.create(function(observer){_this.translationData={},_this.serviceState=ServiceState.isLoading;for(var sequencesOfOrderedTranslationData=[],sequencesOfTranslationData=[],_i=0,_a=_this.configuration.providers;_i<_a.length;_i++){var provider=_a[_i];if(void 0!==provider.type&&provider.type==ProviderType.Fallback){var fallbackLanguage=language;provider.fallbackLanguage&&(fallbackLanguage=_this.composeLanguage(provider.fallbackLanguage)),sequencesOfOrderedTranslationData.push(_this.translationProvider.getTranslation(fallbackLanguage,provider))}else sequencesOfTranslationData.push(_this.translationProvider.getTranslation(language,provider))}var mergedSequencesOfTranslationData=rxjs.merge.apply(void 0,sequencesOfTranslationData);sequencesOfOrderedTranslationData.push(mergedSequencesOfTranslationData),rxjs.concat.apply(void 0,sequencesOfOrderedTranslationData).subscribe(function(data){_this.addData(data,language)},function(error){_this.translationError.next(error),_this.releaseTranslation(language),observer.next(null),observer.complete()},function(){_this.releaseTranslation(language),observer.next(null),observer.complete()})})},TranslationService.prototype.addData=function(data,language){this.translationData[language]=void 0!==this.translationData[language]?function mergeDeep(target,source){var output=Object.assign({},target);return isObject(target)&&isObject(source)&&Object.keys(source).forEach(function(key){var _a,_b;isObject(source[key])?key in target?output[key]=mergeDeep(target[key],source[key]):Object.assign(output,((_a={})[key]=source[key],_a)):Object.assign(output,((_b={})[key]=source[key],_b))}),output}(this.translationData[language],data):data},TranslationService.prototype.releaseTranslation=function(language){this.serviceState=ServiceState.isReady,this.sendEvents(language)},TranslationService.prototype.sendEvents=function(language){this.translation.next(language)},TranslationService.decorators=[{type:core.Injectable}],TranslationService.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[TRANSLATION_CONFIG]}]},{type:LocaleService},{type:TranslationProvider},{type:TranslationHandler}]},TranslationService}(),L10nLoader=function(){function L10nLoader(localeConfig,translationConfig,locale,translation){this.localeConfig=localeConfig,this.translationConfig=translationConfig,this.locale=locale,this.translation=translation}return L10nLoader.prototype.load=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return 0<Object.keys(this.localeConfig).length?[4,this.locale.init()]:[3,2];case 1:_a.sent(),_a.label=2;case 2:return 0<Object.keys(this.translationConfig).length?[4,this.translation.init()]:[3,4];case 3:_a.sent(),_a.label=4;case 4:return[2]}})})},L10nLoader.decorators=[{type:core.Injectable}],L10nLoader.ctorParameters=function(){return[{type:void 0,decorators:[{type:core.Inject,args:[LOCALE_CONFIG]}]},{type:void 0,decorators:[{type:core.Inject,args:[TRANSLATION_CONFIG]}]},{type:LocaleService},{type:TranslationService}]},L10nLoader}(),Translation=function(){function Translation(changeDetectorRef){var _this=this;this.changeDetectorRef=changeDetectorRef,this.paramSubscriptions=[],this.translation=InjectorRef.get(TranslationService),this.paramSubscriptions.push(this.translation.translationChanged().subscribe(function(language){_this.lang=language,_this.changeDetectorRef&&_this.changeDetectorRef.markForCheck()}))}return Translation.prototype.cancelParamSubscriptions=function(){this.paramSubscriptions.forEach(function(subscription){void 0!==subscription&&subscription.unsubscribe()})},Translation.decorators=[{type:core.Injectable}],Translation.ctorParameters=function(){return[{type:core.ChangeDetectorRef}]},Translation}(),Localization=function(_super){function Localization(changeDetectorRef){var _this=_super.call(this)||this;return _this.changeDetectorRef=changeDetectorRef,_this.locale=InjectorRef.get(LocaleService),_this.defaultLocale=_this.locale.getDefaultLocale(),_this.paramSubscriptions.push(_this.locale.defaultLocaleChanged.subscribe(function(defaultLocale){_this.defaultLocale=defaultLocale,_this.changeDetectorRef&&_this.changeDetectorRef.markForCheck()})),_this.currency=_this.locale.getCurrentCurrency(),_this.paramSubscriptions.push(_this.locale.currencyCodeChanged.subscribe(function(currency){_this.currency=currency,_this.changeDetectorRef&&_this.changeDetectorRef.markForCheck()})),_this.timezone=_this.locale.getCurrentTimezone(),_this.paramSubscriptions.push(_this.locale.timezoneChanged.subscribe(function(zoneName){_this.timezone=zoneName,_this.changeDetectorRef&&_this.changeDetectorRef.markForCheck()})),_this}return __extends(Localization,_super),Localization.decorators=[{type:core.Injectable}],Localization.ctorParameters=function(){return[{type:core.ChangeDetectorRef}]},Localization}(Translation),LocaleValidation=function(){function LocaleValidation(locale){this.locale=locale}return LocaleValidation.prototype.parseNumber=function(s,defaultLocale){if(void 0===defaultLocale&&(defaultLocale=this.locale.getDefaultLocale()),""==s||null==s)return null;for(var value="",decimalCode=this.getDecimalCode(defaultLocale),numberCodes=this.getNumberCodes(defaultLocale),_i=0,characters_1=s.split("");_i<characters_1.length;_i++){var char=characters_1[_i],charCode=this.toUnicode(char),index=numberCodes.indexOf(charCode);if(-1!=index)value+=index;else if(charCode==decimalCode.minusSign)value+="-";else{if(charCode!=decimalCode.decimalSeparator){if(charCode==decimalCode.thousandSeparator)continue;return NaN}value+="."}}return parseFloat(value)},LocaleValidation.prototype.getRegExp=function(digits,defaultLocale){void 0===defaultLocale&&(defaultLocale=this.locale.getDefaultLocale());var minInt=1,minFraction=0,maxFraction=3;if(digits){var parts=digits.match(/^(\d+)?\.((\d+)(\-(\d+))?)?$/);null!=parts&&(null!=parts[1]&&(minInt=parseInt(parts[1])),null!=parts[3]&&(minFraction=parseInt(parts[3])),null!=parts[5]&&(maxFraction=parseInt(parts[5])))}var decimalCode=this.getDecimalCode(defaultLocale),numberCodes=this.getNumberCodes(defaultLocale),minusSign=decimalCode.minusSign,zero=numberCodes[0],decimalSeparator=decimalCode.decimalSeparator,thousandSeparator=decimalCode.thousandSeparator,d="["+zero+"-"+numberCodes[9]+"]",n="{"+minInt+",}",nm="{"+minFraction+","+maxFraction+"}",pattern="^"+minusSign+"?("+(""+d+n)+"|"+("(?=(?:\\"+thousandSeparator+"*"+d+")"+n+"(\\"+decimalSeparator+"|$))(?!"+zero+"(?!\\"+decimalSeparator+"|"+d+"))"+d+"{1,3}(\\"+thousandSeparator+d+"{3})*")+")";return pattern+=0<minFraction&&0<maxFraction?"\\"+decimalSeparator+d+nm+"$":0==minFraction&&0<maxFraction?"(\\"+decimalSeparator+d+nm+")?$":"$",pattern=this.toChar(pattern),new RegExp(pattern)},LocaleValidation.prototype.getDecimalCode=function(defaultLocale){var decimalCode={minusSign:this.toUnicode("-"),decimalSeparator:this.toUnicode("."),thousandSeparator:this.toUnicode(",")};if(IntlAPI.hasNumberFormat()){for(var localeValue=new Intl.NumberFormat(defaultLocale).format(-1000.9),unicodeChars=[],i=0;i<=7;i++)unicodeChars.push(this.toUnicode(localeValue.charAt(i)));decimalCode="\\u200F"==unicodeChars[0]||"\\u061C"==unicodeChars[0]?{minusSign:unicodeChars[1],decimalSeparator:unicodeChars[7],thousandSeparator:unicodeChars[3]}:unicodeChars[0]==this.toUnicode(new Intl.NumberFormat(defaultLocale).format(1))?{minusSign:unicodeChars[7],decimalSeparator:unicodeChars[5],thousandSeparator:unicodeChars[1]}:"\\u200E"==unicodeChars[0]?{minusSign:unicodeChars[1],decimalSeparator:unicodeChars[7],thousandSeparator:unicodeChars[3]}:{minusSign:unicodeChars[0],decimalSeparator:unicodeChars[6],thousandSeparator:unicodeChars[2]}}return decimalCode},LocaleValidation.prototype.getNumberCodes=function(defaultLocale){for(var numberCodes=[],num=0;num<=9;num++)numberCodes.push(this.toUnicode(num.toString()));if(IntlAPI.hasNumberFormat())for(num=0;num<=9;num++)numberCodes[num]=this.toUnicode(new Intl.NumberFormat(defaultLocale).format(num));return numberCodes},LocaleValidation.prototype.toChar=function(pattern){return pattern.replace(/\\u[\dA-F]{4}/gi,function(match){return String.fromCharCode(parseInt(match.replace(/\\u/g,""),16))})},LocaleValidation.prototype.toUnicode=function(c){return"\\u"+this.toHex(c.charCodeAt(0))},LocaleValidation.prototype.toHex=function(value){var hex=value.toString(16).toUpperCase();return hex="0000".substr(0,4-hex.length)+hex},LocaleValidation.decorators=[{type:core.Injectable}],LocaleValidation.ctorParameters=function(){return[{type:LocaleService}]},LocaleValidation}(),Collator=function(){function Collator(locale,translation){this.locale=locale,this.translation=translation}return Collator.prototype.compare=function(key1,key2,extension,options){if(void 0===options&&(options={usage:"sort",sensitivity:"variant"}),!IntlAPI.hasCollator())return 0;var value1=this.translation.translate(key1),value2=this.translation.translate(key2),locale=this.addExtension(this.locale.getCurrentLocale(),extension);return new Intl.Collator(locale,options).compare(value1,value2)},Collator.prototype.sort=function(list,keyName,order,extension,options){var _this=this;return void 0===order&&(order="asc"),void 0===options&&(options={usage:"sort",sensitivity:"variant"}),list&&keyName&&IntlAPI.hasCollator()&&(list.sort(function(key1,key2){return _this.compare(key1[keyName],key2[keyName],extension,options)}),"desc"==order&&list.reverse()),list},Collator.prototype.sortAsync=function(list,keyName,order,extension,options){var _this=this;return void 0===options&&(options={usage:"sort",sensitivity:"variant"}),rxjs.Observable.create(function(observer){observer.next(_this.sort(list,keyName,order,extension,options)),observer.complete()})},Collator.prototype.search=function(s,list,keyNames,options){var _this=this;if(void 0===options&&(options={usage:"search"}),!list||!keyNames||""==s||null==s||!IntlAPI.hasCollator())return list;var locale=this.locale.getCurrentLocale(),collator=new Intl.Collator(locale,options);return list.filter(function(key){for(var found=!1,i=0;i<keyNames.length;i++)if(_this.match(key[keyNames[i]],s,collator)){found=!0;break}return found})},Collator.prototype.searchAsync=function(s,list,keyNames,options){var _this=this;return void 0===options&&(options={usage:"search"}),rxjs.Observable.create(function(observer){observer.next(_this.search(s,list,keyNames,options)),observer.complete()})},Collator.prototype.addExtension=function(locale,extension){return extension&&(locale=locale+"-u-"+extension),locale},Collator.prototype.match=function(key,s,collator){var value=this.translation.translate(key),valueLength=value.length,sLength=s.length;if(valueLength<sLength)return!1;if(sLength==valueLength)return 0==collator.compare(value,s);for(var found=!1,i=0;i<valueLength-(sLength-1);i++){var str=value.substr(i,sLength);if(0==collator.compare(str,s)){found=!0;break}}return found},Collator.decorators=[{type:core.Injectable}],Collator.ctorParameters=function(){return[{type:LocaleService},{type:TranslationService}]},Collator}();var TranslatePipe=function(){function TranslatePipe(translation){this.translation=translation}return TranslatePipe.prototype.transform=function(key,lang,args){return this.translation.translate(key,args,lang)},TranslatePipe.decorators=[{type:core.Pipe,args:[{name:"translate",pure:!0}]}],TranslatePipe.ctorParameters=function(){return[{type:TranslationService}]},TranslatePipe}();function intlDateTimeFormat(date,defaultLocale,options,timezone){return options.timeZone=IntlAPI.hasTimezone()?timezone:"UTC",new Intl.DateTimeFormat(defaultLocale,options).format(date).replace(/[\u200e\u200f]/g,"")}function datePartFactory(options){return function(date,defaultLocale,timezone){return intlDateTimeFormat(date,defaultLocale,options,timezone)}}function combine(options){return options.reduce(function(merged,opt){return __assign({},merged,opt)},{})}function digitCondition(prop,len){var result={};return result[prop]=2===len?"2-digit":"numeric",result}function nameCondition(prop,len){var result={};return result[prop]=len<4?1<len?"short":"narrow":"long",result}var FORMAT_ALIASES={short:datePartFactory(combine([digitCondition("year",1),digitCondition("month",1),digitCondition("day",1),digitCondition("hour",1),digitCondition("minute",1)])),medium:datePartFactory(combine([digitCondition("year",1),nameCondition("month",3),digitCondition("day",1),digitCondition("hour",1),digitCondition("minute",1),digitCondition("second",1)])),shortDate:datePartFactory(combine([digitCondition("year",1),digitCondition("month",1),digitCondition("day",1)])),mediumDate:datePartFactory(combine([digitCondition("year",1),nameCondition("month",3),digitCondition("day",1)])),longDate:datePartFactory(combine([digitCondition("year",1),nameCondition("month",4),digitCondition("day",1)])),fullDate:datePartFactory(combine([digitCondition("year",1),nameCondition("month",4),nameCondition("weekday",4),digitCondition("day",1)])),shortTime:datePartFactory(combine([digitCondition("hour",1),digitCondition("minute",1)])),mediumTime:datePartFactory(combine([digitCondition("hour",1),digitCondition("second",1),digitCondition("minute",1)]))},IntlFormatter=function(){function IntlFormatter(){}return IntlFormatter.formatNumber=function(num,defaultLocale,style,digits,currency,currencyDisplay){var minInt,minFraction,maxFraction;if(style!==NumberFormatStyle.Currency&&(minInt=1,minFraction=0,maxFraction=3),digits){var parts=digits.match(/^(\d+)?\.((\d+)(\-(\d+))?)?$/);null!=parts&&(null!=parts[1]&&(minInt=parseInt(parts[1])),null!=parts[3]&&(minFraction=parseInt(parts[3])),null!=parts[5]&&(maxFraction=parseInt(parts[5])))}return IntlFormatter.numberFormatter(num,defaultLocale,style,{minimumIntegerDigits:minInt,minimumFractionDigits:minFraction,maximumFractionDigits:maxFraction,currency:currency,currencyDisplay:currencyDisplay})},IntlFormatter.formatDate=function(date,defaultLocale,format,timezone){return IntlFormatter.dateTimeFormatter(date,defaultLocale,format,timezone)},IntlFormatter.numberFormatter=function(num,defaultLocale,style,opts){void 0===opts&&(opts={});var minimumIntegerDigits=opts.minimumIntegerDigits,minimumFractionDigits=opts.minimumFractionDigits,maximumFractionDigits=opts.maximumFractionDigits,currency=opts.currency,currencyDisplay=opts.currencyDisplay,options={minimumIntegerDigits:minimumIntegerDigits,minimumFractionDigits:minimumFractionDigits,maximumFractionDigits:maximumFractionDigits,style:NumberFormatStyle[style].toLowerCase()};return style==NumberFormatStyle.Currency&&(options.currency=currency,options.currencyDisplay=currencyDisplay),new Intl.NumberFormat(defaultLocale,options).format(num)},IntlFormatter.dateTimeFormatter=function(date,defaultLocale,format,timezone){var options={};if("string"==typeof format){var fnFormatAliases=FORMAT_ALIASES[format];if(fnFormatAliases)return fnFormatAliases(date,defaultLocale,timezone)}else options=format;return intlDateTimeFormat(date,defaultLocale,options,timezone)},IntlFormatter}(),L10nDatePipe=function(){function L10nDatePipe(){this.ISO8601_DATE_REGEX=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/}return L10nDatePipe.prototype.transform=function(value,defaultLocale,format,timezone){if(void 0===format&&(format="mediumDate"),null==value||""===value||value!=value)return null;if(void 0===defaultLocale)return null;if(IntlAPI.hasDateTimeFormat()){var date=void 0;if("string"==typeof value&&(value=value.trim()),this.isDate(value))date=value;else if(isNaN(value-parseFloat(value)))if("string"==typeof value&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(value)){var _a=value.split("-").map(function(val){return parseInt(val,10)}),y=_a[0],m=_a[1],d=_a[2];date=new Date(y,m-1,d)}else date=new Date(value);else date=new Date(parseFloat(value));if(!this.isDate(date)){var match=void 0;"string"==typeof value&&(match=value.match(this.ISO8601_DATE_REGEX))&&(date=this.isoStringToDate(match))}return IntlFormatter.formatDate(date,defaultLocale,format,timezone)}return value},L10nDatePipe.prototype.isDate=function(value){return value instanceof Date&&!isNaN(value.valueOf())},L10nDatePipe.prototype.isoStringToDate=function(match){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;match[9]&&(tzHour=+(match[9]+match[10]),tzMin=+(match[9]+match[11])),dateSetter.call(date,+match[1],+match[2]-1,+match[3]);var h=+(match[4]||"0")-tzHour,m=+(match[5]||"0")-tzMin,s=+(match[6]||"0"),ms=Math.round(1e3*parseFloat("0."+(match[7]||0)));return timeSetter.call(date,h,m,s,ms),date},L10nDatePipe.decorators=[{type:core.Pipe,args:[{name:"l10nDate",pure:!0}]}],L10nDatePipe}(),L10nDecimalPipe=function(){function L10nDecimalPipe(){}return L10nDecimalPipe.prototype.transform=function(value,defaultLocale,digits){return null==value?null:void 0===defaultLocale?null:IntlAPI.hasNumberFormat()?(value="string"!=typeof value||isNaN(+value-parseFloat(value))?value:+value,IntlFormatter.formatNumber(value,defaultLocale,NumberFormatStyle.Decimal,digits)):value},L10nDecimalPipe.decorators=[{type:core.Pipe,args:[{name:"l10nDecimal",pure:!0}]}],L10nDecimalPipe}(),L10nPercentPipe=function(){function L10nPercentPipe(){}return L10nPercentPipe.prototype.transform=function(value,defaultLocale,digits){return null==value?null:void 0===defaultLocale?null:IntlAPI.hasNumberFormat()?(value="string"!=typeof value||isNaN(+value-parseFloat(value))?value:+value,IntlFormatter.formatNumber(value,defaultLocale,NumberFormatStyle.Percent,digits)):value},L10nPercentPipe.decorators=[{type:core.Pipe,args:[{name:"l10nPercent",pure:!0}]}],L10nPercentPipe}(),L10nCurrencyPipe=function(){function L10nCurrencyPipe(){}return L10nCurrencyPipe.prototype.transform=function(value,defaultLocale,currency,currencyDisplay,digits){return void 0===currencyDisplay&&(currencyDisplay="symbol"),null==value?null:void 0===defaultLocale||void 0===currency?null:IntlAPI.hasNumberFormat()?(value="string"!=typeof value||isNaN(+value-parseFloat(value))?value:+value,IntlFormatter.formatNumber(value,defaultLocale,NumberFormatStyle.Currency,digits,currency,currencyDisplay)):value+" "+currency},L10nCurrencyPipe.decorators=[{type:core.Pipe,args:[{name:"l10nCurrency",pure:!0}]}],L10nCurrencyPipe}(),BFS=function(){function BFS(){}return BFS.getTargetNode=function(rootNode){return BFS.walk(rootNode)},BFS.walk=function(rootNode){var iNode,queue=[],depth=0,nodeToDepthIncrease=1;for(queue.push(rootNode);0<queue.length&&depth<=this.MAX_DEPTH;){if(iNode=queue.shift(),this.isTargetNode(iNode))return iNode;if(depth<this.MAX_DEPTH&&null!=iNode.childNodes)for(var _i=0,_a=iNode.childNodes;_i<_a.length;_i++){var child=_a[_i];this.isValidNode(child)&&queue.push(child)}0==--nodeToDepthIncrease&&(depth++,nodeToDepthIncrease=queue.length)}return rootNode},BFS.isTargetNode=function(node){return void 0!==node&&3==node.nodeType&&null!=node.nodeValue&&""!=node.nodeValue.trim()},BFS.isValidNode=function(node){if(void 0!==node&&1==node.nodeType&&node.attributes)for(var _i=0,_a=node.attributes;_i<_a.length;_i++){var attr=_a[_i];if(attr&&this.SELECTOR.test(attr.name))return!1}return!0},BFS.SELECTOR=new RegExp("^l10n|translate|locale"),BFS.MAX_DEPTH=10,BFS}(),BaseDirective=function(){function BaseDirective(el,renderer){this.el=el,this.renderer=renderer,this.attributes=[],this.subscriptions=[],this.TEXT_MUTATION_CONFIG={subtree:!0,characterData:!0},this.SELECTOR=/^l10n-/}return BaseDirective.prototype.ngAfterViewInit=function(){this.el&&this.el.nativeElement&&(this.element=this.el.nativeElement,this.renderNode=BFS.getTargetNode(this.element),this.getKey(),this.getAttributes(),this.addTextListener(),this.setup())},BaseDirective.prototype.ngOnChanges=function(changes){this.key&&(null!=this.nodeValue&&""!=this.nodeValue||(this.valueAttribute?this.key=this.valueAttribute:this.innerHTMLProperty&&(this.key=this.innerHTMLProperty)),this.replaceText()),0<this.attributes.length&&this.replaceAttributes()},BaseDirective.prototype.ngOnDestroy=function(){this.removeTextListener(),this.cancelSubscriptions()},BaseDirective.prototype.getAttributesData=function(){for(var data={},_i=0,keys_1=this.getAttributesKeys();_i<keys_1.length;_i++){var key=keys_1[_i];data[key]=this.getValues(key)}return data},BaseDirective.prototype.getAttributesKeys=function(){return this.attributes.map(function(attr){return attr.key})},BaseDirective.prototype.setText=function(value){value&&(this.nodeValue&&this.key?(this.removeTextListener(),this.renderer.setValue(this.renderNode,this.nodeValue.replace(this.key,value)),this.addTextListener()):this.valueAttribute?this.renderer.setAttribute(this.element,"value",value):this.innerHTMLProperty&&this.renderer.setProperty(this.element,"innerHTML",value))},BaseDirective.prototype.setAttributes=function(data){for(var _i=0,_a=this.attributes;_i<_a.length;_i++){var attr=_a[_i];this.renderer.setAttribute(this.element,attr.name,data[attr.key])}},BaseDirective.prototype.addTextListener=function(){var _this=this;"undefined"!=typeof MutationObserver&&(this.textObserver=new MutationObserver(function(mutations){_this.renderNode=BFS.getTargetNode(_this.element),_this.getKey(),_this.replaceText()}),this.textObserver.observe(this.renderNode,this.TEXT_MUTATION_CONFIG))},BaseDirective.prototype.removeTextListener=function(){void 0!==this.textObserver&&this.textObserver.disconnect()},BaseDirective.prototype.getText=function(){return this.nodeValue=null!=this.renderNode?this.renderNode.nodeValue:"",this.nodeValue?this.nodeValue.trim():""},BaseDirective.prototype.getKey=function(){0<this.element.childNodes.length?this.key=this.getText():this.valueAttribute?this.key=this.valueAttribute:this.innerHTMLProperty&&(this.key=this.innerHTMLProperty)},BaseDirective.prototype.getAttributes=function(){if(this.element.attributes)for(var _i=0,_a=this.element.attributes;_i<_a.length;_i++){var attr=_a[_i];if(attr&&this.SELECTOR.test(attr.name))for(var name_1=attr.name.substr(5),_b=0,_c=this.element.attributes;_b<_c.length;_b++){var targetAttr=_c[_b];new RegExp("^"+name_1+"$").test(targetAttr.name)&&this.attributes.push({name:name_1,key:targetAttr.value})}}},BaseDirective.prototype.cancelSubscriptions=function(){this.subscriptions.forEach(function(subscription){void 0!==subscription&&subscription.unsubscribe()})},BaseDirective.propDecorators={valueAttribute:[{type:core.Input,args:["value"]}],innerHTMLProperty:[{type:core.Input,args:["innerHTML"]}]},BaseDirective}(),TranslateDirective=function(_super){function TranslateDirective(translation,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.translation=translation,_this.el=el,_this.renderer=renderer,_this}return __extends(TranslateDirective,_super),Object.defineProperty(TranslateDirective.prototype,"l10nTranslate",{set:function(params){this.params=params},enumerable:!0,configurable:!0}),Object.defineProperty(TranslateDirective.prototype,"translate",{set:function(params){this.params=params},enumerable:!0,configurable:!0}),TranslateDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.translation.translationChanged().subscribe(function(){_this.replace()}))},TranslateDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},TranslateDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},TranslateDirective.prototype.replaceAttributes=function(){if(0<this.attributes.length){var keys=this.getAttributesKeys();this.setAttributes(this.getValues(keys))}},TranslateDirective.prototype.getValues=function(keys){return this.translation.translate(keys,this.params)},TranslateDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nTranslate],[translate]"}]}],TranslateDirective.ctorParameters=function(){return[{type:TranslationService},{type:core.ElementRef},{type:core.Renderer2}]},TranslateDirective.propDecorators={l10nTranslate:[{type:core.Input}],translate:[{type:core.Input}],params:[{type:core.Input}]},TranslateDirective}(BaseDirective),L10nDateDirective=function(_super){function L10nDateDirective(locale,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.locale=locale,_this.el=el,_this.renderer=renderer,_this.defaultFormat="mediumDate",_this.l10nDatePipe=new L10nDatePipe,_this}return __extends(L10nDateDirective,_super),Object.defineProperty(L10nDateDirective.prototype,"l10nDate",{set:function(format){this.format=format},enumerable:!0,configurable:!0}),L10nDateDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.locale.defaultLocaleChanged.subscribe(function(){_this.replace()})),this.subscriptions.push(this.locale.timezoneChanged.subscribe(function(){_this.replace()}))},L10nDateDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},L10nDateDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},L10nDateDirective.prototype.replaceAttributes=function(){0<this.attributes.length&&this.setAttributes(this.getAttributesData())},L10nDateDirective.prototype.getValues=function(keys){return this.l10nDatePipe.transform(keys,this.locale.getDefaultLocale(),this.format||this.defaultFormat,this.locale.getCurrentTimezone())},L10nDateDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nDate]"}]}],L10nDateDirective.ctorParameters=function(){return[{type:LocaleService},{type:core.ElementRef},{type:core.Renderer2}]},L10nDateDirective.propDecorators={l10nDate:[{type:core.Input}],format:[{type:core.Input}]},L10nDateDirective}(BaseDirective),L10nDecimalDirective=function(_super){function L10nDecimalDirective(locale,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.locale=locale,_this.el=el,_this.renderer=renderer,_this.l10nDecimalPipe=new L10nDecimalPipe,_this}return __extends(L10nDecimalDirective,_super),Object.defineProperty(L10nDecimalDirective.prototype,"l10nDecimal",{set:function(digits){this.digits=digits},enumerable:!0,configurable:!0}),L10nDecimalDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.locale.defaultLocaleChanged.subscribe(function(){_this.replace()}))},L10nDecimalDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},L10nDecimalDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},L10nDecimalDirective.prototype.replaceAttributes=function(){0<this.attributes.length&&this.setAttributes(this.getAttributesData())},L10nDecimalDirective.prototype.getValues=function(keys){return this.l10nDecimalPipe.transform(keys,this.locale.getDefaultLocale(),this.digits)},L10nDecimalDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nDecimal]"}]}],L10nDecimalDirective.ctorParameters=function(){return[{type:LocaleService},{type:core.ElementRef},{type:core.Renderer2}]},L10nDecimalDirective.propDecorators={l10nDecimal:[{type:core.Input}],digits:[{type:core.Input}]},L10nDecimalDirective}(BaseDirective),L10nPercentDirective=function(_super){function L10nPercentDirective(locale,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.locale=locale,_this.el=el,_this.renderer=renderer,_this.l10nPercentPipe=new L10nPercentPipe,_this}return __extends(L10nPercentDirective,_super),Object.defineProperty(L10nPercentDirective.prototype,"l10nPercent",{set:function(digits){this.digits=digits},enumerable:!0,configurable:!0}),L10nPercentDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.locale.defaultLocaleChanged.subscribe(function(){_this.replace()}))},L10nPercentDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},L10nPercentDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},L10nPercentDirective.prototype.replaceAttributes=function(){0<this.attributes.length&&this.setAttributes(this.getAttributesData())},L10nPercentDirective.prototype.getValues=function(keys){return this.l10nPercentPipe.transform(keys,this.locale.getDefaultLocale(),this.digits)},L10nPercentDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nPercent]"}]}],L10nPercentDirective.ctorParameters=function(){return[{type:LocaleService},{type:core.ElementRef},{type:core.Renderer2}]},L10nPercentDirective.propDecorators={l10nPercent:[{type:core.Input}],digits:[{type:core.Input}]},L10nPercentDirective}(BaseDirective),L10nCurrencyDirective=function(_super){function L10nCurrencyDirective(locale,el,renderer){var _this=_super.call(this,el,renderer)||this;return _this.locale=locale,_this.el=el,_this.renderer=renderer,_this.l10nCurrencyPipe=new L10nCurrencyPipe,_this}return __extends(L10nCurrencyDirective,_super),Object.defineProperty(L10nCurrencyDirective.prototype,"l10nCurrency",{set:function(digits){this.digits=digits},enumerable:!0,configurable:!0}),L10nCurrencyDirective.prototype.setup=function(){var _this=this;this.replace(),this.subscriptions.push(this.locale.defaultLocaleChanged.subscribe(function(){_this.replace()})),this.subscriptions.push(this.locale.currencyCodeChanged.subscribe(function(){_this.replace()}))},L10nCurrencyDirective.prototype.replace=function(){this.replaceText(),this.replaceAttributes()},L10nCurrencyDirective.prototype.replaceText=function(){this.key&&this.setText(this.getValues(this.key))},L10nCurrencyDirective.prototype.replaceAttributes=function(){0<this.attributes.length&&this.setAttributes(this.getAttributesData())},L10nCurrencyDirective.prototype.getValues=function(keys){return this.l10nCurrencyPipe.transform(keys,this.locale.getDefaultLocale(),this.locale.getCurrentCurrency(),this.currencyDisplay,this.digits)},L10nCurrencyDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nCurrency]"}]}],L10nCurrencyDirective.ctorParameters=function(){return[{type:LocaleService},{type:core.ElementRef},{type:core.Renderer2}]},L10nCurrencyDirective.propDecorators={l10nCurrency:[{type:core.Input}],currencyDisplay:[{type:core.Input}],digits:[{type:core.Input}]},L10nCurrencyDirective}(BaseDirective);function l10nValidateNumber(digits,MIN_VALUE,MAX_VALUE){void 0===MIN_VALUE&&(MIN_VALUE=Number.MIN_VALUE),void 0===MAX_VALUE&&(MAX_VALUE=Number.MAX_VALUE);var defaultLocale,NUMBER_REGEXP,locale=InjectorRef.get(LocaleService),localeValidation=InjectorRef.get(LocaleValidation);return function(c){if(null==c.value||""==c.value)return null;if(defaultLocale!=locale.getDefaultLocale()&&(NUMBER_REGEXP=localeValidation.getRegExp(digits),defaultLocale=locale.getDefaultLocale()),NUMBER_REGEXP.test(c.value)){var parsedValue=localeValidation.parseNumber(c.value);return null!=parsedValue&&parsedValue<MIN_VALUE?{minValue:{valid:!1}}:null!=parsedValue&&MAX_VALUE<parsedValue?{maxValue:{valid:!1}}:null}return{format:{valid:!1}}}}var L10nNumberValidatorDirective=function(){function L10nNumberValidatorDirective(){this.MIN_VALUE=Number.MIN_VALUE,this.MAX_VALUE=Number.MAX_VALUE}return Object.defineProperty(L10nNumberValidatorDirective.prototype,"l10nValidateNumber",{set:function(digits){this.digits=digits},enumerable:!0,configurable:!0}),L10nNumberValidatorDirective.prototype.ngOnInit=function(){this.validator=l10nValidateNumber(this.digits,this.minValue||this.MIN_VALUE,this.maxValue||this.MAX_VALUE)},L10nNumberValidatorDirective.prototype.validate=function(c){return this.validator(c)},L10nNumberValidatorDirective.decorators=[{type:core.Directive,args:[{selector:"[l10nValidateNumber][ngModel],[l10nValidateNumber][c]",providers:[{provide:forms.NG_VALIDATORS,useExisting:core.forwardRef(function(){return L10nNumberValidatorDirective}),multi:!0}]}]}],L10nNumberValidatorDirective.propDecorators={l10nValidateNumber:[{type:core.Input}],digits:[{type:core.Input}],minValue:[{type:core.Input}],maxValue:[{type:core.Input}]},L10nNumberValidatorDirective}(),TranslationModule=function(){function TranslationModule(injector){this.injector=injector}return TranslationModule.forRoot=function(l10nConfig,token){return void 0===token&&(token={}),{ngModule:TranslationModule,providers:[InjectorRef,{provide:LOCALE_CONFIG,useValue:l10nConfig.locale||{}},{provide:TRANSLATION_CONFIG,useValue:l10nConfig.translation||{}},LocaleService,{provide:LocaleStorage,useClass:token.localeStorage||BrowserStorage},TranslationService,{provide:TranslationProvider,useClass:token.translationProvider||HttpTranslationProvider},{provide:TranslationHandler,useClass:token.translationHandler||DefaultTranslationHandler},L10nLoader]}},TranslationModule.forChild=function(l10nConfig,token){return void 0===token&&(token={}),{ngModule:TranslationModule,providers:[InjectorRef,{provide:TRANSLATION_CONFIG,useValue:l10nConfig.translation||{}},TranslationService,L10nLoader]}},TranslationModule.decorators=[{type:core.NgModule,args:[{declarations:[TranslatePipe,TranslateDirective],exports:[TranslatePipe,TranslateDirective]}]}],TranslationModule.ctorParameters=function(){return[{type:InjectorRef}]},TranslationModule}(),LocalizationModule=function(){function LocalizationModule(injector){this.injector=injector}return LocalizationModule.forRoot=function(l10nConfig,token){return void 0===token&&(token={}),{ngModule:LocalizationModule,providers:[InjectorRef,{provide:LOCALE_CONFIG,useValue:l10nConfig.locale||{}},{provide:TRANSLATION_CONFIG,useValue:l10nConfig.translation||{}},LocaleService,{provide:LocaleStorage,useClass:token.localeStorage||BrowserStorage},TranslationService,{provide:TranslationProvider,useClass:token.translationProvider||HttpTranslationProvider},{provide:TranslationHandler,useClass:token.translationHandler||DefaultTranslationHandler},L10nLoader]}},LocalizationModule.forChild=function(l10nConfig,token){return void 0===token&&(token={}),{ngModule:LocalizationModule,providers:[InjectorRef,{provide:TRANSLATION_CONFIG,useValue:l10nConfig.translation||{}},TranslationService,L10nLoader]}},LocalizationModule.decorators=[{type:core.NgModule,args:[{declarations:[L10nDatePipe,L10nDecimalPipe,L10nPercentPipe,L10nCurrencyPipe,L10nDateDirective,L10nDecimalDirective,L10nPercentDirective,L10nCurrencyDirective],imports:[TranslationModule],exports:[TranslationModule,L10nDatePipe,L10nDecimalPipe,L10nPercentPipe,L10nCurrencyPipe,L10nDateDirective,L10nDecimalDirective,L10nPercentDirective,L10nCurrencyDirective]}]}],LocalizationModule.ctorParameters=function(){return[{type:InjectorRef}]},LocalizationModule}(),LocaleValidationModule=function(){function LocaleValidationModule(){}return LocaleValidationModule.forRoot=function(){return{ngModule:LocaleValidationModule,providers:[LocaleValidation]}},LocaleValidationModule.decorators=[{type:core.NgModule,args:[{declarations:[L10nNumberValidatorDirective],exports:[L10nNumberValidatorDirective]}]}],LocaleValidationModule}();exports.InjectorRef=InjectorRef,exports.StorageStrategy=StorageStrategy,exports.ProviderType=ProviderType,exports.ISOCode=ISOCode,exports.LOCALE_CONFIG=LOCALE_CONFIG,exports.TRANSLATION_CONFIG=TRANSLATION_CONFIG,exports.L10nLoader=L10nLoader,exports.LocaleService=LocaleService,exports.LocaleStorage=LocaleStorage,exports.BrowserStorage=BrowserStorage,exports.TranslationService=TranslationService,exports.TranslationProvider=TranslationProvider,exports.HttpTranslationProvider=HttpTranslationProvider,exports.TranslationHandler=TranslationHandler,exports.DefaultTranslationHandler=DefaultTranslationHandler,exports.Translation=Translation,exports.Localization=Localization,exports.LocaleValidation=LocaleValidation,exports.Collator=Collator,exports.IntlAPI=IntlAPI,exports.Language=function(){return function(target,propertyKey){var subscription,targetNgOnInit=target.ngOnInit;target.ngOnInit=function(){var _this=this,translation=InjectorRef.get(TranslationService);void 0!==propertyKey&&(subscription=translation.translationChanged().subscribe(function(language){_this[propertyKey]=language})),targetNgOnInit&&targetNgOnInit.apply(this)};var targetNgOnDestroy=target.ngOnDestroy;target.ngOnDestroy=function(){void 0!==subscription&&subscription.unsubscribe(),targetNgOnDestroy&&targetNgOnDestroy.apply(this)},void 0!==propertyKey&&Object.defineProperty(target,propertyKey,{writable:!0,value:void 0})}},exports.DefaultLocale=function(){return function(target,propertyKey){var subscription,targetNgOnInit=target.ngOnInit;target.ngOnInit=function(){var _this=this,locale=InjectorRef.get(LocaleService);void 0!==propertyKey&&(this[propertyKey]=locale.getDefaultLocale(),subscription=locale.defaultLocaleChanged.subscribe(function(defaultLocale){_this[propertyKey]=defaultLocale})),targetNgOnInit&&targetNgOnInit.apply(this)};var targetNgOnDestroy=target.ngOnDestroy;target.ngOnDestroy=function(){void 0!==subscription&&subscription.unsubscribe(),targetNgOnDestroy&&targetNgOnDestroy.apply(this)},void 0!==propertyKey&&Object.defineProperty(target,propertyKey,{writable:!0,value:void 0})}},exports.Currency=function(){return function(target,propertyKey){var subscription,targetNgOnInit=target.ngOnInit;target.ngOnInit=function(){var _this=this,locale=InjectorRef.get(LocaleService);void 0!==propertyKey&&(this[propertyKey]=locale.getCurrentCurrency(),subscription=locale.currencyCodeChanged.subscribe(function(currency){_this[propertyKey]=currency})),targetNgOnInit&&targetNgOnInit.apply(this)};var targetNgOnDestroy=target.ngOnDestroy;target.ngOnDestroy=function(){void 0!==subscription&&subscription.unsubscribe(),targetNgOnDestroy&&targetNgOnDestroy.apply(this)},void 0!==propertyKey&&Object.defineProperty(target,propertyKey,{writable:!0,value:void 0})}},exports.Timezone=function(){return function(target,propertyKey){var subscription,targetNgOnInit=target.ngOnInit;target.ngOnInit=function(){var _this=this,locale=InjectorRef.get(LocaleService);void 0!==propertyKey&&(this[propertyKey]=locale.getCurrentTimezone(),subscription=locale.timezoneChanged.subscribe(function(zoneName){_this[propertyKey]=zoneName})),targetNgOnInit&&targetNgOnInit.apply(this)};var targetNgOnDestroy=target.ngOnDestroy;target.ngOnDestroy=function(){void 0!==subscription&&subscription.unsubscribe(),targetNgOnDestroy&&targetNgOnDestroy.apply(this)},void 0!==propertyKey&&Object.defineProperty(target,propertyKey,{writable:!0,value:void 0})}},exports.TranslatePipe=TranslatePipe,exports.L10nDatePipe=L10nDatePipe,exports.L10nDecimalPipe=L10nDecimalPipe,exports.L10nPercentPipe=L10nPercentPipe,exports.L10nCurrencyPipe=L10nCurrencyPipe,exports.BaseDirective=BaseDirective,exports.TranslateDirective=TranslateDirective,exports.L10nDateDirective=L10nDateDirective,exports.L10nDecimalDirective=L10nDecimalDirective,exports.L10nPercentDirective=L10nPercentDirective,exports.L10nCurrencyDirective=L10nCurrencyDirective,exports.L10nNumberValidatorDirective=L10nNumberValidatorDirective,exports.l10nValidateNumber=l10nValidateNumber,exports.TranslationModule=TranslationModule,exports.LocalizationModule=LocalizationModule,exports.LocaleValidationModule=LocaleValidationModule,Object.defineProperty(exports,"__esModule",{value:!0})}); |
@@ -71,2 +71,12 @@ /** | ||
/** | ||
* Asynchronous loading: adds the query parameter 'ver' to the http requests. | ||
* @type {?|undefined} | ||
*/ | ||
TranslationConfig.prototype.version; | ||
/** | ||
* Asynchronous loading: sets a timeout in milliseconds for the http requests. | ||
* @type {?|undefined} | ||
*/ | ||
TranslationConfig.prototype.timeout; | ||
/** | ||
* Sets a composed language for translations. | ||
@@ -73,0 +83,0 @@ * @type {?|undefined} |
@@ -6,4 +6,5 @@ /** | ||
import { Injectable, Inject } from '@angular/core'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; | ||
import { ReplaySubject } from 'rxjs'; | ||
import { timeout } from 'rxjs/operators'; | ||
import { TRANSLATION_CONFIG } from '../models/l10n-config'; | ||
@@ -53,2 +54,10 @@ import { ProviderType } from '../models/types'; | ||
getTranslation(language, args) { | ||
const /** @type {?} */ headers = new HttpHeaders({ 'Content-Type': 'application/json' }); | ||
const /** @type {?} */ options = { | ||
headers: headers | ||
}; | ||
if (this.configuration.version) { | ||
options.params = new HttpParams().set('ver', this.configuration.version); | ||
} | ||
let /** @type {?} */ request; | ||
let /** @type {?} */ url = ""; | ||
@@ -62,6 +71,12 @@ switch (args.type) { | ||
} | ||
if (this.configuration.timeout) { | ||
request = this.http.get(url, options).pipe(timeout(this.configuration.timeout)); | ||
} | ||
else { | ||
request = this.http.get(url, options); | ||
} | ||
if (this.configuration.caching) { | ||
return this.caching(url, this.http.get(url)); | ||
return this.caching(url, request); | ||
} | ||
return this.http.get(url); | ||
return request; | ||
} | ||
@@ -68,0 +83,0 @@ /** |
@@ -193,3 +193,3 @@ /** | ||
if (!isNaN(keyNumber) && IntlAPI.hasNumberFormat()) { | ||
const /** @type {?} */ localeNumber = new Intl.NumberFormat(this.translation.getValue()).format(keyNumber); | ||
const /** @type {?} */ localeNumber = new Intl.NumberFormat(this.locale.getDefaultLocale()).format(keyNumber); | ||
return localeNumber; | ||
@@ -196,0 +196,0 @@ } |
@@ -71,2 +71,12 @@ /** | ||
/** | ||
* Asynchronous loading: adds the query parameter 'ver' to the http requests. | ||
* @type {?|undefined} | ||
*/ | ||
TranslationConfig.prototype.version; | ||
/** | ||
* Asynchronous loading: sets a timeout in milliseconds for the http requests. | ||
* @type {?|undefined} | ||
*/ | ||
TranslationConfig.prototype.timeout; | ||
/** | ||
* Sets a composed language for translations. | ||
@@ -73,0 +83,0 @@ * @type {?|undefined} |
@@ -6,4 +6,5 @@ /** | ||
import { Injectable, Inject } from '@angular/core'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; | ||
import { ReplaySubject } from 'rxjs'; | ||
import { timeout } from 'rxjs/operators'; | ||
import { TRANSLATION_CONFIG } from '../models/l10n-config'; | ||
@@ -58,2 +59,10 @@ import { ProviderType } from '../models/types'; | ||
function (language, args) { | ||
var /** @type {?} */ headers = new HttpHeaders({ 'Content-Type': 'application/json' }); | ||
var /** @type {?} */ options = { | ||
headers: headers | ||
}; | ||
if (this.configuration.version) { | ||
options.params = new HttpParams().set('ver', this.configuration.version); | ||
} | ||
var /** @type {?} */ request; | ||
var /** @type {?} */ url = ""; | ||
@@ -67,6 +76,12 @@ switch (args.type) { | ||
} | ||
if (this.configuration.timeout) { | ||
request = this.http.get(url, options).pipe(timeout(this.configuration.timeout)); | ||
} | ||
else { | ||
request = this.http.get(url, options); | ||
} | ||
if (this.configuration.caching) { | ||
return this.caching(url, this.http.get(url)); | ||
return this.caching(url, request); | ||
} | ||
return this.http.get(url); | ||
return request; | ||
}; | ||
@@ -73,0 +88,0 @@ /** |
@@ -248,3 +248,3 @@ /** | ||
if (!isNaN(keyNumber) && IntlAPI.hasNumberFormat()) { | ||
var /** @type {?} */ localeNumber = new Intl.NumberFormat(this.translation.getValue()).format(keyNumber); | ||
var /** @type {?} */ localeNumber = new Intl.NumberFormat(this.locale.getDefaultLocale()).format(keyNumber); | ||
return localeNumber; | ||
@@ -251,0 +251,0 @@ } |
{ | ||
"name": "angular-l10n", | ||
"private": false, | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "An Angular library to translate messages, dates and numbers", | ||
@@ -6,0 +6,0 @@ "main": "./bundles/angular-l10n.umd.js", |
@@ -59,2 +59,10 @@ import { InjectionToken } from '@angular/core'; | ||
/** | ||
* Asynchronous loading: adds the query parameter 'ver' to the http requests. | ||
*/ | ||
version?: string; | ||
/** | ||
* Asynchronous loading: sets a timeout in milliseconds for the http requests. | ||
*/ | ||
timeout?: number; | ||
/** | ||
* Sets a composed language for translations. | ||
@@ -61,0 +69,0 @@ */ |
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
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
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
Sorry, the diff of this file is not supported yet
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 too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2069013
22082