@tonysamperi/ts-mapi-core 2.0.0-beta.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -706,6 +706,22 @@ declare class SmpAesCrypt {
706
706
  protected _buildKey(): WordArray;
707
707
  }
708
708
 
709
+ declare class SmpAesCryptV2 {
710
+ protected _password: string;
711
+ protected _salt: string;
712
+ protected _initVector?: string | undefined;
713
+ protected static readonly _KEY_SIZE: number;
714
+ protected static readonly _PBKDF2_ITERATIONS = 100000;
715
+ protected _iv: WordArray | undefined;
716
+ protected _key: WordArray;
717
+ protected _mode: typeof CBC;
718
+ protected _padding: typeof PKCS7;
719
+ constructor(_password: string, _salt: string, _initVector?: string | undefined);
720
+ decryptAES(data: string): string;
721
+ encryptAES(data: string): string;
722
+ protected _buildKey(): WordArray;
723
+ }
724
+
709
725
  declare class SmpCrypto {
710
726
  static base64Decode(str: string): string;
711
727
  static base64Encode(str: string): string;
@@ -921,6 +937,12 @@ declare class SmpCommonUtils {
921
937
  static sleep(timeToDelay: number): Promise<unknown>;
922
938
  static sprintf(str: string, ...argv: (string | number | symbol)[]): string;
923
939
  static stripComments(html: string): string;
940
+ /**
941
+ * Strips all HTML from a string.
942
+ * @param html
943
+ * @param decodeEntities should decode entities? Default TRUE
944
+ */
945
+ static stripHtml(html: string, decodeEntities?: boolean): string;
924
946
  static submitFakeForm<T extends object = object>({ action, method, data, target }: {
925
947
  action: string;
926
948
  method: SmpRestVerbs;
@@ -933,6 +955,7 @@ declare class SmpCommonUtils {
933
955
  static toSnakeCase(s: string): string;
934
956
  static toUpperSnakeCase(s: string): string;
935
957
  static words(string: string, pattern?: RegExp): string[];
958
+ protected static _decodeHtmlEntities(value: string): string;
936
959
  }
937
960
 
938
961
  declare class SmpFilterException extends Error {
@@ -990,6 +1013,6 @@ declare class SmpInMemoryCache extends SmpAbstractTtlCacheStrategy {
990
1013
  */
991
1014
  declare function smpIsSmpCachedValue<T>(value: unknown): value is SmpCachedValue<T>;
992
1015
 
993
- declare const VERSION: "2.0.0-beta.6";
1016
+ declare const VERSION: "2.0.0";
994
1017
 
995
- export { SMP_HEALTHZ, SmpAbstractCacheStrategy, SmpAbstractTtlCacheStrategy, SmpAesCrypt, SmpApiCommonUtils, SmpBaseJwtToken, SmpBaseJwtTokenPlain, SmpBrowserCache, SmpCachedValue, SmpCommonUtils, SmpCrypto, type SmpDynamicFetchReturn, SmpErrorResponse, type SmpErrorResponseCreateOpts, SmpFilterException, type SmpGenericConstructor, SmpGenericResponse, SmpGenericResponseBase, type SmpGenericResponseCreateOpts, SmpGiftcardTransaction, type SmpGiftcardTransactionConfig, SmpGiftcardTransactionHashStrategies, SmpGiftcardTransactionOps, type SmpGiftcardTransactionPlain, SmpHttpSessionStorageCache, SmpHttpStatusCodes, type SmpHttpTwoConfig, SmpHttpTwoService, SmpInMemoryCache, type SmpMarketingCloudValidationResponse, type SmpMarketingCloudValidationResponseKo, type SmpMarketingCloudValidationResponseOk, SmpMarketingCloudValidators, type SmpPrimitive, SmpRegularExpressions, SmpResponseMessage, SmpResponseMessageTypes, SmpRestVerbs, SmpSecureCode, SmpSid, type SmpWithDateTimeAsDate, VERSION, smpApplyMixin, smpIsSmpCachedValue };
1018
+ export { SMP_HEALTHZ, SmpAbstractCacheStrategy, SmpAbstractTtlCacheStrategy, SmpAesCrypt, SmpAesCryptV2, SmpApiCommonUtils, SmpBaseJwtToken, SmpBaseJwtTokenPlain, SmpBrowserCache, SmpCachedValue, SmpCommonUtils, SmpCrypto, type SmpDynamicFetchReturn, SmpErrorResponse, type SmpErrorResponseCreateOpts, SmpFilterException, type SmpGenericConstructor, SmpGenericResponse, SmpGenericResponseBase, type SmpGenericResponseCreateOpts, SmpGiftcardTransaction, type SmpGiftcardTransactionConfig, SmpGiftcardTransactionHashStrategies, SmpGiftcardTransactionOps, type SmpGiftcardTransactionPlain, SmpHttpSessionStorageCache, SmpHttpStatusCodes, type SmpHttpTwoConfig, SmpHttpTwoService, SmpInMemoryCache, type SmpMarketingCloudValidationResponse, type SmpMarketingCloudValidationResponseKo, type SmpMarketingCloudValidationResponseOk, SmpMarketingCloudValidators, type SmpPrimitive, SmpRegularExpressions, SmpResponseMessage, SmpResponseMessageTypes, SmpRestVerbs, SmpSecureCode, SmpSid, type SmpWithDateTimeAsDate, VERSION, smpApplyMixin, smpIsSmpCachedValue };
@@ -706,6 +706,22 @@ declare class SmpAesCrypt {
706
706
  protected _buildKey(): WordArray;
707
707
  }
708
708
 
709
+ declare class SmpAesCryptV2 {
710
+ protected _password: string;
711
+ protected _salt: string;
712
+ protected _initVector?: string | undefined;
713
+ protected static readonly _KEY_SIZE: number;
714
+ protected static readonly _PBKDF2_ITERATIONS = 100000;
715
+ protected _iv: WordArray | undefined;
716
+ protected _key: WordArray;
717
+ protected _mode: typeof CBC;
718
+ protected _padding: typeof PKCS7;
719
+ constructor(_password: string, _salt: string, _initVector?: string | undefined);
720
+ decryptAES(data: string): string;
721
+ encryptAES(data: string): string;
722
+ protected _buildKey(): WordArray;
723
+ }
724
+
709
725
  declare class SmpCrypto {
710
726
  static base64Decode(str: string): string;
711
727
  static base64Encode(str: string): string;
@@ -921,6 +937,12 @@ declare class SmpCommonUtils {
921
937
  static sleep(timeToDelay: number): Promise<unknown>;
922
938
  static sprintf(str: string, ...argv: (string | number | symbol)[]): string;
923
939
  static stripComments(html: string): string;
940
+ /**
941
+ * Strips all HTML from a string.
942
+ * @param html
943
+ * @param decodeEntities should decode entities? Default TRUE
944
+ */
945
+ static stripHtml(html: string, decodeEntities?: boolean): string;
924
946
  static submitFakeForm<T extends object = object>({ action, method, data, target }: {
925
947
  action: string;
926
948
  method: SmpRestVerbs;
@@ -933,6 +955,7 @@ declare class SmpCommonUtils {
933
955
  static toSnakeCase(s: string): string;
934
956
  static toUpperSnakeCase(s: string): string;
935
957
  static words(string: string, pattern?: RegExp): string[];
958
+ protected static _decodeHtmlEntities(value: string): string;
936
959
  }
937
960
 
938
961
  declare class SmpFilterException extends Error {
@@ -990,6 +1013,6 @@ declare class SmpInMemoryCache extends SmpAbstractTtlCacheStrategy {
990
1013
  */
991
1014
  declare function smpIsSmpCachedValue<T>(value: unknown): value is SmpCachedValue<T>;
992
1015
 
993
- declare const VERSION: "2.0.0-beta.6";
1016
+ declare const VERSION: "2.0.0";
994
1017
 
995
- export { SMP_HEALTHZ, SmpAbstractCacheStrategy, SmpAbstractTtlCacheStrategy, SmpAesCrypt, SmpApiCommonUtils, SmpBaseJwtToken, SmpBaseJwtTokenPlain, SmpBrowserCache, SmpCachedValue, SmpCommonUtils, SmpCrypto, type SmpDynamicFetchReturn, SmpErrorResponse, type SmpErrorResponseCreateOpts, SmpFilterException, type SmpGenericConstructor, SmpGenericResponse, SmpGenericResponseBase, type SmpGenericResponseCreateOpts, SmpGiftcardTransaction, type SmpGiftcardTransactionConfig, SmpGiftcardTransactionHashStrategies, SmpGiftcardTransactionOps, type SmpGiftcardTransactionPlain, SmpHttpSessionStorageCache, SmpHttpStatusCodes, type SmpHttpTwoConfig, SmpHttpTwoService, SmpInMemoryCache, type SmpMarketingCloudValidationResponse, type SmpMarketingCloudValidationResponseKo, type SmpMarketingCloudValidationResponseOk, SmpMarketingCloudValidators, type SmpPrimitive, SmpRegularExpressions, SmpResponseMessage, SmpResponseMessageTypes, SmpRestVerbs, SmpSecureCode, SmpSid, type SmpWithDateTimeAsDate, VERSION, smpApplyMixin, smpIsSmpCachedValue };
1018
+ export { SMP_HEALTHZ, SmpAbstractCacheStrategy, SmpAbstractTtlCacheStrategy, SmpAesCrypt, SmpAesCryptV2, SmpApiCommonUtils, SmpBaseJwtToken, SmpBaseJwtTokenPlain, SmpBrowserCache, SmpCachedValue, SmpCommonUtils, SmpCrypto, type SmpDynamicFetchReturn, SmpErrorResponse, type SmpErrorResponseCreateOpts, SmpFilterException, type SmpGenericConstructor, SmpGenericResponse, SmpGenericResponseBase, type SmpGenericResponseCreateOpts, SmpGiftcardTransaction, type SmpGiftcardTransactionConfig, SmpGiftcardTransactionHashStrategies, SmpGiftcardTransactionOps, type SmpGiftcardTransactionPlain, SmpHttpSessionStorageCache, SmpHttpStatusCodes, type SmpHttpTwoConfig, SmpHttpTwoService, SmpInMemoryCache, type SmpMarketingCloudValidationResponse, type SmpMarketingCloudValidationResponseKo, type SmpMarketingCloudValidationResponseOk, SmpMarketingCloudValidators, type SmpPrimitive, SmpRegularExpressions, SmpResponseMessage, SmpResponseMessageTypes, SmpRestVerbs, SmpSecureCode, SmpSid, type SmpWithDateTimeAsDate, VERSION, smpApplyMixin, smpIsSmpCachedValue };
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{a as mc,b as gc,c as _c}from"./chunk-DIVAYUSN.js";import{a as ze,b as Ue}from"./chunk-VBEMFJKM.js";import{a as ct}from"./chunk-F3OJMKBL.js";import{a as n}from"./chunk-EI7MMDWY.js";import{DateTime as ke}from"ts-luxon";var ht=class extends ze{static{n(this,"SmpAbstractTtlCacheStrategy")}flush(){this._flushRaw()}read(t){let e=this._readRaw(t);if(this._isSmpCachedValue(e)){if(e.expiry>=ke.now().ts)return e.value;this._removeRaw(t);return}return e}remove(t){this._removeRaw(t)}write(t,e,o){if(isNaN(+o)||+o<=0){this._writeRaw(t,e,o);return}let s=ke.now().ts+o*1e3,i={value:e,expiry:s};this._writeRaw(t,i,o)}_isSmpCachedValue(t){return Ue(t)}};var jt=class extends ht{static{n(this,"SmpBrowserCache")}_storage;_prefix;constructor(t,e){super(),this._storage=t,this._prefix=e}_flushRaw(){let t=[],e=-1;for(;++e<this._storage.length;){let o=this._storage.key(e);o&&o.startsWith(this._prefix)&&t.push(o)}for(e=-1;++e<t.length;)this._storage.removeItem(t[e])}_readRaw(t){let e=this._storage.getItem(this._prefix+t);try{return e?JSON.parse(e):void 0}catch{console.warn(`${this.constructor.name}: failed to parse cache item for key ${this._prefix+t}`);return}}_removeRaw(t){this._storage.removeItem(this._prefix+t)}_writeRaw(t,e){try{this._storage.setItem(this._prefix+t,JSON.stringify(e))}catch(o){console.warn(`${this.constructor.name}: failed to write cache item for key ${this._prefix+t}`,o)}}};var Mt=class extends jt{static{n(this,"SmpHttpSessionStorageCache")}constructor(){super(sessionStorage,"smp_rest_cache_")}};var $e=(function(r){return r[r.Continue=100]="Continue",r[r.SwitchingProtocols=101]="SwitchingProtocols",r[r.Processing=102]="Processing",r[r.EarlyHints=103]="EarlyHints",r[r.Ok=200]="Ok",r[r.Created=201]="Created",r[r.Accepted=202]="Accepted",r[r.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",r[r.NoContent=204]="NoContent",r[r.ResetContent=205]="ResetContent",r[r.PartialContent=206]="PartialContent",r[r.MultiStatus=207]="MultiStatus",r[r.AlreadyReported=208]="AlreadyReported",r[r.ImUsed=226]="ImUsed",r[r.MultipleChoices=300]="MultipleChoices",r[r.MovedPermanently=301]="MovedPermanently",r[r.Found=302]="Found",r[r.SeeOther=303]="SeeOther",r[r.NotModified=304]="NotModified",r[r.UseProxy=305]="UseProxy",r[r.Unused=306]="Unused",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",r[r.BadRequest=400]="BadRequest",r[r.Unauthorized=401]="Unauthorized",r[r.PaymentRequired=402]="PaymentRequired",r[r.Forbidden=403]="Forbidden",r[r.NotFound=404]="NotFound",r[r.MethodNotAllowed=405]="MethodNotAllowed",r[r.NotAcceptable=406]="NotAcceptable",r[r.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",r[r.RequestTimeout=408]="RequestTimeout",r[r.Conflict=409]="Conflict",r[r.Gone=410]="Gone",r[r.LengthRequired=411]="LengthRequired",r[r.PreconditionFailed=412]="PreconditionFailed",r[r.PayloadTooLarge=413]="PayloadTooLarge",r[r.UriTooLong=414]="UriTooLong",r[r.UnsupportedMediaType=415]="UnsupportedMediaType",r[r.RangeNotSatisfiable=416]="RangeNotSatisfiable",r[r.ExpectationFailed=417]="ExpectationFailed",r[r.ImATeapot=418]="ImATeapot",r[r.MisdirectedRequest=421]="MisdirectedRequest",r[r.UnprocessableEntity=422]="UnprocessableEntity",r[r.Locked=423]="Locked",r[r.FailedDependency=424]="FailedDependency",r[r.TooEarly=425]="TooEarly",r[r.UpgradeRequired=426]="UpgradeRequired",r[r.PreconditionRequired=428]="PreconditionRequired",r[r.TooManyRequests=429]="TooManyRequests",r[r.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",r[r.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",r[r.InternalServerError=500]="InternalServerError",r[r.NotImplemented=501]="NotImplemented",r[r.BadGateway=502]="BadGateway",r[r.ServiceUnavailable=503]="ServiceUnavailable",r[r.GatewayTimeout=504]="GatewayTimeout",r[r.HttpVersionNotSupported=505]="HttpVersionNotSupported",r[r.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",r[r.InsufficientStorage=507]="InsufficientStorage",r[r.LoopDetected=508]="LoopDetected",r[r.NotExtended=510]="NotExtended",r[r.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",r})({});import{Expose as He,plainToInstance as xs}from"class-transformer";import{Expose as gs,instanceToPlain as _s,plainToInstance as ws,Transform as ys}from"class-transformer";import{Expose as We}from"class-transformer";function Ge(r,t,e,o){var s=arguments.length,i=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,o);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(i=(s<3?a(i):s>3?a(t,e,i):a(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i}n(Ge,"_ts_decorate");function Dt(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}n(Dt,"_ts_metadata");var F=class r{static{n(this,"SmpResponseMessage")}_message;_type;get message(){return this._message}get type(){return this._type}constructor(t,e=ct.ERROR){this._message=t,this._type=e}static sanitizeMessages(t){return typeof t=="string"?t.length?[new r(t)]:[]:[t].flat().map(e=>typeof e=="string"?new r(e):e)}};Ge([We(),Dt("design:type",String),Dt("design:paramtypes",[])],F.prototype,"message",null);Ge([We(),Dt("design:type",typeof ct>"u"?Object:ct),Dt("design:paramtypes",[])],F.prototype,"type",null);function ms(r,t,e,o){var s=arguments.length,i=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,o);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(i=(s<3?a(i):s>3?a(t,e,i):a(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i}n(ms,"_ts_decorate");function Ke(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}n(Ke,"_ts_metadata");var Et=class r{static{n(this,"SmpGenericResponse")}_messages;data;set messages(t){this._messages=F.sanitizeMessages(t)}get messages(){return this._messages}constructor(t=[],e){this._messages=t,this.data=e}static create(t){return new r([t.messages||[]].flat().map(e=>e instanceof F?e:new F(e,t.type||ct.SUCCESS)),t.data)}static fromPlain(t){return ws(r,t)}isError(){return!this.isSuccess()}isSuccess(){return typeof this._errorCode=="number"}serialize(){return _s(this,{excludePrefixes:["_"]})}};ms([gs(),ys(({value:r})=>r?.length?r:void 0),Ke("design:type",Object),Ke("design:paramtypes",[])],Et.prototype,"messages",null);function Se(r,t,e,o){var s=arguments.length,i=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,o);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(i=(s<3?a(i):s>3?a(t,e,i):a(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i}n(Se,"_ts_decorate");function Nt(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}n(Nt,"_ts_metadata");var z=class r extends Et{static{n(this,"SmpErrorResponse")}_errorCode;_status;static get DEFAULT_MESSAGES(){return[new F("GENERIC_ERROR")]}set errorCode(t){this._errorCode=t}get errorCode(){return this._errorCode}get status(){return this._status}set timestamp(t){this._timestamp=t}get timestamp(){return this._timestamp}_timestamp=Date.now();constructor(t=r.DEFAULT_MESSAGES,e="GENERIC_ERROR",o=500,s){super(t,s),this._errorCode=e,this._status=o}static create({messages:t=r.DEFAULT_MESSAGES,...e}={}){return new r(F.sanitizeMessages(t),e.errorCode,e.status,e.data)}static fromPlain(t){let e=xs(bs,t,{excludePrefixes:["_"]}),o=new r;return Object.getOwnPropertyNames(e).forEach(s=>{s in o&&(o[s]=e[s])}),o}};Se([He(),Nt("design:type",Object),Nt("design:paramtypes",[])],z.prototype,"errorCode",null);Se([He(),Nt("design:type",Number),Nt("design:paramtypes",[])],z.prototype,"timestamp",null);var bs=class extends z{static{n(this,"SmpErrorResponseMutable")}set errorCode(t){this._errorCode=t}set status(t){this._status=t}set timestamp(t){this._timestamp=t}};var q=class{static{n(this,"Hex")}static parse(t){let e=t.length,o=[];for(let s=0;s<e;s+=2)o[s>>>3]|=parseInt(t.substr(s,2),16)<<24-s%8*4;return new _(o,e/2)}static stringify(t){let e=[];for(let o=0;o<t.sigBytes;o++){let s=t.words[o>>>2]>>>24-o%4*8&255;e.push((s>>>4).toString(16)),e.push((s&15).toString(16))}return e.join("")}};var _=class le{static{n(this,"WordArray")}constructor(t,e){this.words=t||[],e!==void 0?this.sigBytes=e:this.sigBytes=this.words.length*4}static random(t){let e=[],o=n(function(s){let i=987654321,a=4294967295;return function(){i=36969*(i&65535)+(i>>16)&a,s=18e3*(s&65535)+(s>>16)&a;let c=(i<<16)+s&a;return c/=4294967296,c+=.5,c*(Math.random()>.5?1:-1)}},"r");for(let s=0,i;s<t;s+=4){let a=o((i||Math.random())*4294967296);i=a()*987654071,e.push(a()*4294967296|0)}return new le(e,t)}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new le(this.words.slice(0),this.sigBytes)}concat(t){if(this.clamp(),this.sigBytes%4)for(let e=0;e<t.sigBytes;e++){let o=t.words[e>>>2]>>>24-e%4*8&255;this.words[this.sigBytes+e>>>2]|=o<<24-(this.sigBytes+e)%4*8}else for(let e=0;e<t.sigBytes;e+=4)this.words[this.sigBytes+e>>>2]=t.words[e>>>2];return this.sigBytes+=t.sigBytes,this}toString(t){return(t||q).stringify(this)}};var Ft=class{static{n(this,"Latin1")}static parse(t){let e=t.length,o=[];for(let s=0;s<e;s++)o[s>>>2]|=(t.charCodeAt(s)&255)<<24-s%4*8;return new _(o,e)}static stringify(t){let e=[];for(let o=0;o<t.sigBytes;o++){let s=t.words[o>>>2]>>>24-o%4*8&255;e.push(String.fromCharCode(s))}return e.join("")}};var C=class{static{n(this,"Utf8")}static parse(t){return Ft.parse(unescape(encodeURIComponent(t)))}static stringify(t){try{return decodeURIComponent(escape(Ft.stringify(t)))}catch(e){throw console.error("Malformed UTF-8 data",e),new Error("Malformed UTF-8 data")}}};var Lt=class{static{n(this,"BufferedBlockAlgorithm")}constructor(t){this._minBufferSize=0,this.cfg=Object.assign({blockSize:1},t),this._data=new _,this._nDataBytes=0}clone(){let t=this.constructor();for(let e in this)Object.prototype.hasOwnProperty.call(this,e)&&(t[e]=this[e]);return t._data=this._data.clone(),t}reset(){this._data=new _,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=C.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_process(t){if(!this.cfg.blockSize)throw new Error("missing blockSize in config");let e=this.cfg.blockSize*4,o=this._data.sigBytes/e;t?o=Math.ceil(o):o=Math.max((o|0)-this._minBufferSize,0);let s=o*this.cfg.blockSize,i=Math.min(s*4,this._data.sigBytes),a;if(s){for(let c=0;c<s;c+=this.cfg.blockSize)this._doProcessBlock(this._data.words,c);a=this._data.words.splice(0,s),this._data.sigBytes-=i}return new _(a,i)}};var lt=class{static{n(this,"CipherParams")}constructor(t){this.ciphertext=t.ciphertext,this.key=t.key,this.iv=t.iv,this.salt=t.salt,this.algorithm=t.algorithm,this.mode=t.mode,this.padding=t.padding,this.blockSize=t.blockSize,this.formatter=t.formatter}extend(t){return t.ciphertext!==void 0&&(this.ciphertext=t.ciphertext),t.key!==void 0&&(this.key=t.key),t.iv!==void 0&&(this.iv=t.iv),t.salt!==void 0&&(this.salt=t.salt),t.algorithm!==void 0&&(this.algorithm=t.algorithm),t.mode!==void 0&&(this.mode=t.mode),t.padding!==void 0&&(this.padding=t.padding),t.blockSize!==void 0&&(this.blockSize=t.blockSize),t.formatter!==void 0&&(this.formatter=t.formatter),this}toString(t){if(t)return t.stringify(this);if(this.formatter)return this.formatter.stringify(this);throw new Error("cipher needs a formatter to be able to convert the result into a string")}};var U=class{static{n(this,"Base64")}static parse(t){let e=t.length;if(this._reverseMap===void 0){this._reverseMap=[];for(let s=0;s<this._map.length;s++)this._reverseMap[this._map.charCodeAt(s)]=s}let o=this._map.charAt(64);if(o){let s=t.indexOf(o);s!==-1&&(e=s)}return this.parseLoop(t,e,this._reverseMap)}static parseLoop(t,e,o){let s=[],i=0;for(let a=0;a<e;a++)if(a%4){let c=o[t.charCodeAt(a-1)]<<a%4*2,h=o[t.charCodeAt(a)]>>>6-a%4*2;s[i>>>2]|=(c|h)<<24-i%4*8,i++}return new _(s,i)}static stringify(t){t.clamp();let e=[];for(let s=0;s<t.sigBytes;s+=3){let i=t.words[s>>>2]>>>24-s%4*8&255,a=t.words[s+1>>>2]>>>24-(s+1)%4*8&255,c=t.words[s+2>>>2]>>>24-(s+2)%4*8&255,h=i<<16|a<<8|c;for(let f=0;f<4&&s+f*.75<t.sigBytes;f++)e.push(this._map.charAt(h>>>6*(3-f)&63))}let o=this._map.charAt(64);if(o)for(;e.length%4;)e.push(o);return e.join("")}};U._map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";U._reverseMap=void 0;var zt=class{static{n(this,"OpenSSL")}static parse(t){let e=U.parse(t),o;return e.words[0]===1398893684&&e.words[1]===1701076831&&(o=new _(e.words.slice(2,4)),e.words.splice(0,4),e.sigBytes-=16),new lt({ciphertext:e,salt:o})}static stringify(t){if(!t.ciphertext)throw new Error("missing ciphertext in params");let e=t.ciphertext,o=t.salt,s;if(o){if(typeof o=="string")throw new Error("salt is expected to be a WordArray");s=new _([1398893684,1701076831]).concat(o).concat(e)}else s=e;return s.toString(U)}};var Q=class{static{n(this,"SerializableCipher")}static decrypt(t,e,o,s){let i=Object.assign({},this.cfg,s);if(!i.format)throw new Error("could not determine format");if(e=this._parse(e,i.format),!e.ciphertext)throw new Error("could not determine ciphertext");return t.createDecryptor(o,i).finalize(e.ciphertext)}static encrypt(t,e,o,s){let i=Object.assign({},this.cfg,s),a=t.createEncryptor(o,i),c=a.finalize(e);return new lt({ciphertext:c,key:o,iv:a.cfg.iv,algorithm:t,mode:a.cfg.mode,padding:a.cfg.padding,blockSize:a.cfg.blockSize,formatter:i.format})}static _parse(t,e){return typeof t=="string"?e.parse(t):t}};Q.cfg={blockSize:4,iv:new _([]),format:zt};var I=class extends Lt{static{n(this,"Hasher")}constructor(t){super(Object.assign({blockSize:512/32},t)),this.reset()}static _createHelper(t){function e(o,s){return new t(s).finalize(o)}return n(e,"helper"),e}finalize(t){return t&&this._append(t),this._doFinalize()}update(t){return this._append(t),this._process(),this}};var p=[];for(let r=0;r<64;r++)p[r]=Math.abs(Math.sin(r+1))*4294967296|0;var k=class u extends I{static{n(this,"MD5")}get hash(){return this._hash}static FF(t,e,o,s,i,a,c){let h=t+(e&o|~e&s)+i+c;return(h<<a|h>>>32-a)+e}static GG(t,e,o,s,i,a,c){let h=t+(e&s|o&~s)+i+c;return(h<<a|h>>>32-a)+e}static HH(t,e,o,s,i,a,c){let h=t+(e^o^s)+i+c;return(h<<a|h>>>32-a)+e}static II(t,e,o,s,i,a,c){let h=t+(o^(e|~s))+i+c;return(h<<a|h>>>32-a)+e}reset(){super.reset(),this._hash=new _([1732584193,4023233417,2562383102,271733878])}_doFinalize(){let t=this._nDataBytes*8,e=this._data.sigBytes*8;this._data.words[e>>>5]|=128<<24-e%32;let o=Math.floor(t/4294967296),s=t;this._data.words[(e+64>>>9<<4)+15]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,this._data.words[(e+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,this._data.sigBytes=(this._data.words.length+1)*4,this._process();for(let i=0;i<4;i++)this._hash.words[i]=(this._hash.words[i]<<8|this._hash.words[i]>>>24)&16711935|(this._hash.words[i]<<24|this._hash.words[i]>>>8)&4278255360;return this._hash}_doProcessBlock(t,e){for(let h=0;h<16;h++){let f=e+h,g=t[f];t[f]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}let o=Array.from({length:16});for(let h=0;h<16;h++)o[h]=t[e+h];let s=this._hash.words[0],i=this._hash.words[1],a=this._hash.words[2],c=this._hash.words[3];s=u.FF(s,i,a,c,o[0],7,p[0]),c=u.FF(c,s,i,a,o[1],12,p[1]),a=u.FF(a,c,s,i,o[2],17,p[2]),i=u.FF(i,a,c,s,o[3],22,p[3]),s=u.FF(s,i,a,c,o[4],7,p[4]),c=u.FF(c,s,i,a,o[5],12,p[5]),a=u.FF(a,c,s,i,o[6],17,p[6]),i=u.FF(i,a,c,s,o[7],22,p[7]),s=u.FF(s,i,a,c,o[8],7,p[8]),c=u.FF(c,s,i,a,o[9],12,p[9]),a=u.FF(a,c,s,i,o[10],17,p[10]),i=u.FF(i,a,c,s,o[11],22,p[11]),s=u.FF(s,i,a,c,o[12],7,p[12]),c=u.FF(c,s,i,a,o[13],12,p[13]),a=u.FF(a,c,s,i,o[14],17,p[14]),i=u.FF(i,a,c,s,o[15],22,p[15]),s=u.GG(s,i,a,c,o[1],5,p[16]),c=u.GG(c,s,i,a,o[6],9,p[17]),a=u.GG(a,c,s,i,o[11],14,p[18]),i=u.GG(i,a,c,s,o[0],20,p[19]),s=u.GG(s,i,a,c,o[5],5,p[20]),c=u.GG(c,s,i,a,o[10],9,p[21]),a=u.GG(a,c,s,i,o[15],14,p[22]),i=u.GG(i,a,c,s,o[4],20,p[23]),s=u.GG(s,i,a,c,o[9],5,p[24]),c=u.GG(c,s,i,a,o[14],9,p[25]),a=u.GG(a,c,s,i,o[3],14,p[26]),i=u.GG(i,a,c,s,o[8],20,p[27]),s=u.GG(s,i,a,c,o[13],5,p[28]),c=u.GG(c,s,i,a,o[2],9,p[29]),a=u.GG(a,c,s,i,o[7],14,p[30]),i=u.GG(i,a,c,s,o[12],20,p[31]),s=u.HH(s,i,a,c,o[5],4,p[32]),c=u.HH(c,s,i,a,o[8],11,p[33]),a=u.HH(a,c,s,i,o[11],16,p[34]),i=u.HH(i,a,c,s,o[14],23,p[35]),s=u.HH(s,i,a,c,o[1],4,p[36]),c=u.HH(c,s,i,a,o[4],11,p[37]),a=u.HH(a,c,s,i,o[7],16,p[38]),i=u.HH(i,a,c,s,o[10],23,p[39]),s=u.HH(s,i,a,c,o[13],4,p[40]),c=u.HH(c,s,i,a,o[0],11,p[41]),a=u.HH(a,c,s,i,o[3],16,p[42]),i=u.HH(i,a,c,s,o[6],23,p[43]),s=u.HH(s,i,a,c,o[9],4,p[44]),c=u.HH(c,s,i,a,o[12],11,p[45]),a=u.HH(a,c,s,i,o[15],16,p[46]),i=u.HH(i,a,c,s,o[2],23,p[47]),s=u.II(s,i,a,c,o[0],6,p[48]),c=u.II(c,s,i,a,o[7],10,p[49]),a=u.II(a,c,s,i,o[14],15,p[50]),i=u.II(i,a,c,s,o[5],21,p[51]),s=u.II(s,i,a,c,o[12],6,p[52]),c=u.II(c,s,i,a,o[3],10,p[53]),a=u.II(a,c,s,i,o[10],15,p[54]),i=u.II(i,a,c,s,o[1],21,p[55]),s=u.II(s,i,a,c,o[8],6,p[56]),c=u.II(c,s,i,a,o[15],10,p[57]),a=u.II(a,c,s,i,o[6],15,p[58]),i=u.II(i,a,c,s,o[13],21,p[59]),s=u.II(s,i,a,c,o[4],6,p[60]),c=u.II(c,s,i,a,o[11],10,p[61]),a=u.II(a,c,s,i,o[2],15,p[62]),i=u.II(i,a,c,s,o[9],21,p[63]),this._hash.words[0]=this._hash.words[0]+s|0,this._hash.words[1]=this._hash.words[1]+i|0,this._hash.words[2]=this._hash.words[2]+a|0,this._hash.words[3]=this._hash.words[3]+c|0}};var fe=class qe{static{n(this,"EVPKDF")}constructor(t){this.cfg=Object.assign({keySize:128/32,hasher:k,iterations:1},t)}static execute(t,e,o){return new qe(o).compute(t,e)}compute(t,e){let o=new this.cfg.hasher,s=new _,i;for(;s.words.length<this.cfg.keySize;){i&&o.update(i),i=o.update(t).finalize(e),o.reset();for(let a=1;a<this.cfg.iterations;a++)i=o.finalize(i),o.reset();s.concat(i)}return s.sigBytes=this.cfg.keySize*4,s}};var Ve=class{static{n(this,"OpenSSLKdf")}static execute(t,e,o,s){s||(s=_.random(64/8));let i=new fe({keySize:e+o}).compute(t,s),a=new _(i.words.slice(e),o*4);return i.sigBytes=e*4,new lt({key:i,iv:a,salt:s})}};var Ut=class{static{n(this,"PasswordBasedCipher")}static decrypt(t,e,o,s){let i=Object.assign({},this.cfg,s);if(i.format===void 0)throw new Error("missing format in config");if(e=this._parse(e,i.format),i.kdf===void 0)throw new Error("the key derivation function must be set");let a=i.kdf.execute(o,t.keySize,t.ivSize,e.salt);return a.iv!==void 0&&(i.iv=a.iv),Q.decrypt.call(this,t,e,a.key,i)}static encrypt(t,e,o,s){let i=Object.assign({},this.cfg,s);if(i.kdf===void 0)throw new Error("missing kdf in config");let a=i.kdf.execute(o,t.keySize,t.ivSize);return a.iv!==void 0&&(i.iv=a.iv),Q.encrypt.call(this,t,e,a.key,i).extend(a)}static _parse(t,e){return typeof t=="string"?e.parse(t):t}};Ut.cfg={blockSize:4,iv:new _([]),format:zt,kdf:Ve};var Xe=class{static{n(this,"CipherHelper")}constructor(t){this._cipher=t}decrypt(t,e,o){return typeof e=="string"?Ut.decrypt(this._cipher,t,e,o):Q.decrypt(this._cipher,t,e,o)}encrypt(t,e,o){return typeof e=="string"?Ut.encrypt(this._cipher,t,e,o):Q.encrypt(this._cipher,t,e,o)}};var ft=class extends Lt{static{n(this,"Cipher")}constructor(t,e,o){super(Object.assign({blockSize:1},o)),this._xformMode=t,this._key=e,this.reset()}static _createHelper(t){return new Xe(t)}static createDecryptor(t,e){let o=this;return new o(this._DEC_XFORM_MODE,t,e)}static createEncryptor(t,e){return new this(this._ENC_XFORM_MODE,t,e)}finalize(t){return t&&this._append(t),this._doFinalize()}process(t){return this._append(t),this._process()}};ft.ivSize=4;ft.keySize=4;ft._DEC_XFORM_MODE=2;ft._ENC_XFORM_MODE=1;var tt=class{static{n(this,"BlockCipherModeAlgorithm")}constructor(t,e){this.init(t,e)}init(t,e){this._cipher=t,this._iv=e}};var kt=class{static{n(this,"BlockCipherMode")}static createDecryptor(t,e){let o=this.Decryptor;return new o(t,e)}static createEncryptor(t,e){let o=this.Encryptor;return new o(t,e)}};kt.Decryptor=tt;kt.Encryptor=tt;var Ze=class extends tt{static{n(this,"CBCEncryptor")}get prevBlock(){return this._prevBlock}processBlock(t,e){if(this._cipher.cfg.blockSize===void 0)throw new Error("missing blockSize in cipher config");this.xorBlock(t,e,this._cipher.cfg.blockSize),this._cipher.encryptBlock(t,e),this._prevBlock=t.slice(e,e+this._cipher.cfg.blockSize)}xorBlock(t,e,o){let s;this._iv?(s=this._iv,this._iv=void 0):s=this._prevBlock;for(let i=0;i<o;i++)t[e+i]^=s[i]}};var Je=class extends tt{static{n(this,"CBCDecryptor")}get prevBlock(){return this._prevBlock}processBlock(t,e){if(this._cipher.cfg.blockSize===void 0)throw new Error("missing blockSize in cipher config");let o=t.slice(e,e+this._cipher.cfg.blockSize);this._cipher.decryptBlock(t,e),this.xorBlock(t,e,this._cipher.cfg.blockSize),this._prevBlock=o}xorBlock(t,e,o){let s;this._iv?(s=this._iv,this._iv=void 0):s=this._prevBlock;for(let i=0;i<o;i++)t[e+i]^=s[i]}};var V=class extends kt{static{n(this,"CBC")}};V.Decryptor=Je;V.Encryptor=Ze;var pt=class{static{n(this,"PKCS7")}static pad(t,e){let o=e*4,s=o-t.sigBytes%o,i=s<<24|s<<16|s<<8|s,a=[];for(let h=0;h<s;h+=4)a.push(i);let c=new _(a,s);t.concat(c)}static unpad(t){let e=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=e}};var $t=class extends ft{static{n(this,"BlockCipher")}constructor(t,e,o){super(t,e,Object.assign({blockSize:4,mode:V,padding:pt},o))}reset(){if(super.reset(),this.cfg.mode===void 0)throw new Error("missing mode in config");let t;this._xformMode===this.constructor._ENC_XFORM_MODE?t=this.cfg.mode.createEncryptor:(t=this.cfg.mode.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator===t?this._mode.init(this,this.cfg.iv&&this.cfg.iv.words):(this._mode=t.call(this.cfg.mode,this,this.cfg.iv&&this.cfg.iv.words),this._mode.__creator=t)}_doFinalize(){if(this.cfg.padding===void 0)throw new Error("missing padding in config");let t;if(this._xformMode===this.constructor._ENC_XFORM_MODE){if(this.cfg.blockSize===void 0)throw new Error("missing blockSize in config");this.cfg.padding.pad(this._data,this.cfg.blockSize),t=this._process(!0)}else t=this._process(!0),this.cfg.padding.unpad(t);return t}_doProcessBlock(t,e){this._mode.processBlock(t,e)}};var l=class L{static{n(this,"X64Word")}constructor(t,e){this.high=t,this.low=e}add(t){let e=this.low+t.low|0,o=e>>>0<this.low>>>0?1:0,s=this.high+t.high+o|0;return new L(s,e)}and(t){return new L(this.high&t.high,this.low&t.low)}not(){return new L(~this.high,~this.low)}or(t){return new L(this.high|t.high,this.low|t.low)}rotL(t){return this.shiftL(t).or(this.shiftR(64-t))}rotR(t){return this.shiftR(t).or(this.shiftL(64-t))}shiftL(t){return t<32?new L(this.high<<t|this.low>>>32-t,this.low<<t):new L(this.low<<t-32,0)}shiftR(t){return t<32?new L(this.high>>>t,this.low>>>t|this.high<<32-t):new L(0,this.high>>>t-32)}xor(t){return new L(this.high^t.high,this.low^t.low)}};var Ye=class pe{static{n(this,"X64WordArray")}constructor(t=[],e){this.words=t,this.sigBytes=e!==void 0?e:t.length*8}static create(t=[],e){return new pe(t,e)}clone(){let t=this.words.map(e=>new l(e.high,e.low));return new pe(t,this.sigBytes)}toX32(){let t=[];for(let e of this.words)t.push(e.high,e.low);return new _(t,this.sigBytes)}};var P=[],Qe=[],tr=[],er=[],rr=[],or=[],ue=[],de=[],me=[],ge=[];(function(){let r=[];for(let o=0;o<256;o++)o<128?r[o]=o<<1:r[o]=o<<1^283;let t=0,e=0;for(let o=0;o<256;o++){let s=e^e<<1^e<<2^e<<3^e<<4;s=s>>>8^s&255^99,P[t]=s,Qe[s]=t;let i=r[t],a=r[i],c=r[a],h=r[s]*257^s*16843008;tr[t]=h<<24|h>>>8,er[t]=h<<16|h>>>16,rr[t]=h<<8|h>>>24,or[t]=h,h=c*16843009^a*65537^i*257^t*16843008,ue[s]=h<<24|h>>>8,de[s]=h<<16|h>>>16,me[s]=h<<8|h>>>24,ge[s]=h,t?(t=i^r[r[r[c^i]]],e^=r[r[e]]):t=e=1}})();var As=[0,1,2,4,8,16,32,64,128,27,54],Gt=class extends $t{static{n(this,"AES")}constructor(t,e,o){super(t,e,o),super.reset()}decryptBlock(t,e){let o=t[e+1];t[e+1]=t[e+3],t[e+3]=o,this._doCryptBlock(t,e,this._invKeySchedule,ue,de,me,ge,Qe),o=t[e+1],t[e+1]=t[e+3],t[e+3]=o}encryptBlock(t,e){this._doCryptBlock(t,e,this._keySchedule,tr,er,rr,or,P)}reset(){if(super.reset(),this._nRounds&&this._keyPriorReset===this._key)return;let t=this._keyPriorReset=this._key,e=t.words,o=t.sigBytes/4,i=((this._nRounds=o+6)+1)*4,a=this._keySchedule=[];for(let c=0;c<i;c++)if(c<o)a[c]=e[c];else{let h=a[c-1];c%o?o>6&&c%o===4&&(h=P[h>>>24]<<24|P[h>>>16&255]<<16|P[h>>>8&255]<<8|P[h&255]):(h=h<<8|h>>>24,h=P[h>>>24]<<24|P[h>>>16&255]<<16|P[h>>>8&255]<<8|P[h&255],h^=As[c/o|0]<<24),a[c]=a[c-o]^h}this._invKeySchedule=[];for(let c=0;c<i;c++){let h=i-c,f;c%4?f=a[h]:f=a[h-4],c<4||h<=4?this._invKeySchedule[c]=f:this._invKeySchedule[c]=ue[P[f>>>24]]^de[P[f>>>16&255]]^me[P[f>>>8&255]]^ge[P[f&255]]}}_doCryptBlock(t,e,o,s,i,a,c,h){let f=t[e]^o[0],g=t[e+1]^o[1],d=t[e+2]^o[2],m=t[e+3]^o[3],w=4;for(let E=1;E<this._nRounds;E++){let x=s[f>>>24]^i[g>>>16&255]^a[d>>>8&255]^c[m&255]^o[w++],b=s[g>>>24]^i[d>>>16&255]^a[m>>>8&255]^c[f&255]^o[w++],T=s[d>>>24]^i[m>>>16&255]^a[f>>>8&255]^c[g&255]^o[w++],he=s[m>>>24]^i[f>>>16&255]^a[g>>>8&255]^c[d&255]^o[w++];f=x,g=b,d=T,m=he}let y=(h[f>>>24]<<24|h[g>>>16&255]<<16|h[d>>>8&255]<<8|h[m&255])^o[w++],v=(h[g>>>24]<<24|h[d>>>16&255]<<16|h[m>>>8&255]<<8|h[f&255])^o[w++],R=(h[d>>>24]<<24|h[m>>>16&255]<<16|h[f>>>8&255]<<8|h[g&255])^o[w++],O=(h[m>>>24]<<24|h[f>>>16&255]<<16|h[g>>>8&255]<<8|h[d&255])^o[w++];t[e]=y,t[e+1]=v,t[e+2]=R,t[e+3]=O}};Gt.keySize=256/32;var vs=[1732584193,4023233417,2562383102,271733878,3285377520],et=new Array(80),rt=class extends I{static{n(this,"SHA1")}get hash(){return this._hash}reset(){super.reset(),this._hash=new _(vs.slice(0))}_doFinalize(){let t=this._nDataBytes*8,e=this._data.sigBytes*8;return this._data.words[e>>>5]|=128<<24-e%32,this._data.words[(e+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(e+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(t,e){let o=this._hash.words[0],s=this._hash.words[1],i=this._hash.words[2],a=this._hash.words[3],c=this._hash.words[4];for(let h=0;h<80;h++){if(h<16)et[h]=t[e+h]|0;else{let m=et[h-3]^et[h-8]^et[h-14]^et[h-16];et[h]=m<<1|m>>>31}let f,g;h<20?(f=s&i|~s&a,g=1518500249):h<40?(f=s^i^a,g=1859775393):h<60?(f=s&i|s&a|i&a,g=2400959708):(f=s^i^a,g=3395469782);let d=(o<<5|o>>>27)+f+c+g+et[h];c=a,a=i,i=s<<30|s>>>2,s=o,o=d|0}this._hash.words[0]=this._hash.words[0]+o|0,this._hash.words[1]=this._hash.words[1]+s|0,this._hash.words[2]=this._hash.words[2]+i|0,this._hash.words[3]=this._hash.words[3]+a|0,this._hash.words[4]=this._hash.words[4]+c|0}};var sr=[],ir=[];(function(){function r(s){let i=Math.sqrt(s);for(let a=2;a<=i;a++)if(!(s%a))return!1;return!0}n(r,"isPrime");function t(s){return(s-(s|0))*4294967296|0}n(t,"getFractionalBits");let e=2,o=0;for(;o<64;)r(e)&&(o<8&&(sr[o]=t(Math.pow(e,1/2))),ir[o]=t(Math.pow(e,1/3)),o++),e++})();var ot=[],Rt=class extends I{static{n(this,"SHA256")}constructor(){super()}reset(){super.reset(),this._hash=new _(sr.slice(0))}_doFinalize(){let t=this._nDataBytes*8,e=this._data.sigBytes*8;return this._data.words[e>>>5]|=128<<24-e%32,this._data.words[(e+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(e+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(t,e){let o=this._hash.words[0],s=this._hash.words[1],i=this._hash.words[2],a=this._hash.words[3],c=this._hash.words[4],h=this._hash.words[5],f=this._hash.words[6],g=this._hash.words[7];for(let d=0;d<64;d++){if(d<16)ot[d]=t[e+d]|0;else{let E=ot[d-15],x=(E<<25|E>>>7)^(E<<14|E>>>18)^E>>>3,b=ot[d-2],T=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;ot[d]=x+ot[d-7]+T+ot[d-16]}let m=c&h^~c&f,w=o&s^o&i^s&i,y=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),v=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),R=g+v+m+ir[d]+ot[d],O=y+w;g=f,f=h,h=c,c=a+R|0,a=i,i=s,s=o,o=R+O|0}this._hash.words[0]=this._hash.words[0]+o|0,this._hash.words[1]=this._hash.words[1]+s|0,this._hash.words[2]=this._hash.words[2]+i|0,this._hash.words[3]=this._hash.words[3]+a|0,this._hash.words[4]=this._hash.words[4]+c|0,this._hash.words[5]=this._hash.words[5]+h|0,this._hash.words[6]=this._hash.words[6]+f|0,this._hash.words[7]=this._hash.words[7]+g|0}};var _e=[new l(1116352408,3609767458),new l(1899447441,602891725),new l(3049323471,3964484399),new l(3921009573,2173295548),new l(961987163,4081628472),new l(1508970993,3053834265),new l(2453635748,2937671579),new l(2870763221,3664609560),new l(3624381080,2734883394),new l(310598401,1164996542),new l(607225278,1323610764),new l(1426881987,3590304994),new l(1925078388,4068182383),new l(2162078206,991336113),new l(2614888103,633803317),new l(3248222580,3479774868),new l(3835390401,2666613458),new l(4022224774,944711139),new l(264347078,2341262773),new l(604807628,2007800933),new l(770255983,1495990901),new l(1249150122,1856431235),new l(1555081692,3175218132),new l(1996064986,2198950837),new l(2554220882,3999719339),new l(2821834349,766784016),new l(2952996808,2566594879),new l(3210313671,3203337956),new l(3336571891,1034457026),new l(3584528711,2466948901),new l(113926993,3758326383),new l(338241895,168717936),new l(666307205,1188179964),new l(773529912,1546045734),new l(1294757372,1522805485),new l(1396182291,2643833823),new l(1695183700,2343527390),new l(1986661051,1014477480),new l(2177026350,1206759142),new l(2456956037,344077627),new l(2730485921,1290863460),new l(2820302411,3158454273),new l(3259730800,3505952657),new l(3345764771,106217008),new l(3516065817,3606008344),new l(3600352804,1432725776),new l(4094571909,1467031594),new l(275423344,851169720),new l(430227734,3100823752),new l(506948616,1363258195),new l(659060556,3750685593),new l(883997877,3785050280),new l(958139571,3318307427),new l(1322822218,3812723403),new l(1537002063,2003034995),new l(1747873779,3602036899),new l(1955562222,1575990012),new l(2024104815,1125592928),new l(2227730452,2716904306),new l(2361852424,442776044),new l(2428436474,593698344),new l(2756734187,3733110249),new l(3204031479,2999351573),new l(3329325298,3815920427),new l(3391569614,3928383900),new l(3515267271,566280711),new l(3940187606,3454069534),new l(4118630271,4000239992),new l(116418474,1914138554),new l(174292421,2731055270),new l(289380356,3203993006),new l(460393269,320620315),new l(685471733,587496836),new l(852142971,1086792851),new l(1017036298,365543100),new l(1126000580,2618297676),new l(1288033470,3409855158),new l(1501505948,4234509866),new l(1607167915,987167468),new l(1816402316,1246189591)],D=[];(function(){for(let r=0;r<80;r++)D[r]=new l(void 0,void 0)})();var we=class extends I{static{n(this,"SHA512")}constructor(){super({blockSize:1024/32})}reset(){super.reset(),this._hash=new Ye([new l(1779033703,4089235720),new l(3144134277,2227873595),new l(1013904242,4271175723),new l(2773480762,1595750129),new l(1359893119,2917565137),new l(2600822924,725511199),new l(528734635,4215389547),new l(1541459225,327033209)])}_doFinalize(){let t=this._data,e=t.words,o=this._nDataBytes*8,s=t.sigBytes*8;return e[s>>>5]|=128<<24-s%32,e[(s+128>>>10<<5)+30]=Math.floor(o/4294967296),e[(s+128>>>10<<5)+31]=o,t.sigBytes=e.length*4,this._process(),this._hash.toX32()}_doProcessBlock(t,e){let o=this._hash.words[0].high,s=this._hash.words[0].low,i=this._hash.words[1].high,a=this._hash.words[1].low,c=this._hash.words[2].high,h=this._hash.words[2].low,f=this._hash.words[3].high,g=this._hash.words[3].low,d=this._hash.words[4].high,m=this._hash.words[4].low,w=this._hash.words[5].high,y=this._hash.words[5].low,v=this._hash.words[6].high,R=this._hash.words[6].low,O=this._hash.words[7].high,E=this._hash.words[7].low;for(let x=0;x<80;x++){let b,T;if(x<16)T=D[x].high=t[e+x*2]|0,b=D[x].low=t[e+x*2+1]|0;else{let De=D[x-15],nt=De.high,At=De.low,us=(nt>>>1|At<<31)^(nt>>>8|At<<24)^nt>>>7,Ne=(At>>>1|nt<<31)^(At>>>8|nt<<24)^(At>>>7|nt<<25),Fe=D[x-2],at=Fe.high,vt=Fe.low,ds=(at>>>19|vt<<13)^(at<<3|vt>>>29)^at>>>6,Le=(vt>>>19|at<<13)^(vt<<3|at>>>29)^(vt>>>6|at<<26);b=Ne+D[x-7].low,T=us+D[x-7].high+(b>>>0<Ne>>>0?1:0),b=b+Le,T=T+ds+(b>>>0<Le>>>0?1:0),b=b+D[x-16].low,T=T+D[x-16].high+(b>>>0<D[x-16].low>>>0?1:0),D[x].high=T,D[x].low=b}let he=d&w^~d&v,Pe=m&y^~m&R,as=o&i^o&c^i&c,cs=s&a^s&h^a&h,hs=(o>>>28|s<<4)^(o<<30|s>>>2)^(o<<25|s>>>7),je=(s>>>28|o<<4)^(s<<30|o>>>2)^(s<<25|o>>>7),ls=(d>>>14|m<<18)^(d>>>18|m<<14)^(d<<23|m>>>9),fs=(m>>>14|d<<18)^(m>>>18|d<<14)^(m<<23|d>>>9),j=E+fs,H=O+ls+(j>>>0<E>>>0?1:0);j=j+Pe,H=H+he+(j>>>0<Pe>>>0?1:0),j=j+_e[x].low,H=H+_e[x].high+(j>>>0<_e[x].low>>>0?1:0),j=j+b,H=H+T+(j>>>0<b>>>0?1:0);let Me=je+cs,ps=hs+as+(Me>>>0<je>>>0?1:0);O=v,E=R,v=w,R=y,w=d,y=m,m=g+j|0,d=f+H+(m>>>0<g>>>0?1:0)|0,f=c,g=h,c=i,h=a,i=o,a=s,s=j+Me|0,o=H+ps+(s>>>0<j>>>0?1:0)|0}this._hash.words[0].low=this._hash.words[0].low=this._hash.words[0].low+s,this._hash.words[0].high=this._hash.words[0].high+o+(this._hash.words[0].low>>>0<s>>>0?1:0),this._hash.words[1].low=this._hash.words[1].low=this._hash.words[1].low+a,this._hash.words[1].high=this._hash.words[1].high+i+(this._hash.words[1].low>>>0<a>>>0?1:0),this._hash.words[2].low=this._hash.words[2].low=this._hash.words[2].low+h,this._hash.words[2].high=this._hash.words[2].high+c+(this._hash.words[2].low>>>0<h>>>0?1:0),this._hash.words[3].low=this._hash.words[3].low=this._hash.words[3].low+g,this._hash.words[3].high=this._hash.words[3].high+f+(this._hash.words[3].low>>>0<g>>>0?1:0),this._hash.words[4].low=this._hash.words[4].low=this._hash.words[4].low+m,this._hash.words[4].high=this._hash.words[4].high+d+(this._hash.words[4].low>>>0<m>>>0?1:0),this._hash.words[5].low=this._hash.words[5].low=this._hash.words[5].low+y,this._hash.words[5].high=this._hash.words[5].high+w+(this._hash.words[5].low>>>0<y>>>0?1:0),this._hash.words[6].low=this._hash.words[6].low=this._hash.words[6].low+R,this._hash.words[6].high=this._hash.words[6].high+v+(this._hash.words[6].low>>>0<R>>>0?1:0),this._hash.words[7].low=this._hash.words[7].low=this._hash.words[7].low+E,this._hash.words[7].high=this._hash.words[7].high+O+(this._hash.words[7].low>>>0<E>>>0?1:0)}};var nr=class{static{n(this,"HMAC")}constructor(t,e){this._hasher=new t;let o=typeof e=="string"?C.parse(e):e,s=this._hasher.cfg.blockSize,i=s*4;o.sigBytes>i&&(o=this._hasher.finalize(o)),o.clamp();let a=this._oKey=o.clone(),c=this._iKey=o.clone(),h=a.words,f=c.words;for(let g=0;g<s;g++)h[g]^=1549556828,f[g]^=909522486;a.sigBytes=c.sigBytes=i,this.reset()}finalize(t){let e=this._hasher.finalize(t);return this._hasher.reset(),this._hasher.finalize(this._oKey.clone().concat(e))}reset(){this._hasher.reset(),this._hasher.update(this._iKey)}update(t){return this._hasher.update(t),this}};var ye=class ar{static{n(this,"PBKDF2")}constructor(t){this.cfg=Object.assign({keySize:128/32,hasher:Rt,iterations:25e4},t)}static execute(t,e,o){return new ar(o).compute(t,e)}compute(t,e){let o=this.cfg,s=new nr(o.hasher,t),i=new _,a=new _([1]),c=i.words,h=a.words,f=o.keySize,g=o.iterations;for(;c.length<f;){let d=s.update(e).finalize(a);s.reset();let m=d.words,w=m.length,y=d;for(let v=1;v<g;v++){y=s.finalize(y),s.reset();let R=y.words;for(let O=0;O<w;O++)m[O]^=R[O]}i.concat(d),h[0]++}return i.sigBytes=f*4,i}};var Ot=$t._createHelper(Gt);var Wt=n(function(){let r=Date.now().toString(36),t=globalThis.crypto;if(t?.getRandomValues){let e=new Uint8Array(8);t.getRandomValues(e);let o="";for(let s=0;s<e.length;s++){let i=e[s].toString(16);o+=i.length===1?"0"+i:i}return r+"-"+o}return r+"-"+Math.random().toString(36).slice(2,10)},"correlationIdHelper");var ut=I._createHelper(k);var dt=I._createHelper(rt);var Kt=I._createHelper(Rt);var St=I._createHelper(we);var mt=class{static{n(this,"SmpCrypto")}static base64Decode(t){return C.stringify(U.parse(t))}static base64Encode(t){return U.stringify(C.parse(t))}static generateCorrelationId(){return Wt()}static md5(t){return ut(t).toString()}static sha1(t){return dt(t).toString()}static sha256(t){return Kt(t).toString()}static sha512(t){return St(t).toString()}};var Ht=class extends ht{static{n(this,"SmpInMemoryCache")}static _storage=new Map;get _staticSelf(){return this.constructor}_flushRaw(){this._staticSelf._storage.clear()}_readRaw(t){return this._staticSelf._storage.get(t)}_removeRaw(t){this._staticSelf._storage.delete(t)}_writeRaw(t,e){this._staticSelf._storage.set(t,e)}};var cr=class{static{n(this,"SmpHttpTwoService")}static _cacheStrategy=typeof sessionStorage<"u"?new Mt:new Ht;static _errorClass=z;static _mergeParamsFallbackBaseUrl="https://uc-api-nest-common-fe";static _running=new Map;static $http(t){return this._generateAjax(t)}static async _generateAjax(t){let e=this._generateCacheKey(t),o=+(t.ttl||0)>0;if(o){let a=this._cacheStrategy.read(e);if(a)return Promise.resolve(a)}let s=this._running.get(e);if(s)return s;let i=this._generateAjaxBase(t).then(a=>(o&&this._cacheStrategy.write(e,a,t.ttl),a)).finally(()=>{this._running.delete(e)});return this._running.set(e,i),i}static async _generateAjaxBase(t){let e=await this._preprocessRequest(t),o={method:e.method,headers:new Headers({"content-type":"application/json",...e.headers}),body:e.body?JSON.stringify(e.body):null};return e.useCredentials&&(o.credentials="include"),e.url=this.mergeQueryParams(e.url,e.queryParams),fetch(e.url,o).then(s=>this._preprocessResponse(t,s)).then(s=>{if(s.ok){if(s.status===204||s.headers.get("content-length")==="0")return null;switch(e.responseType){case"blob":return s.blob();case"arraybuffer":return s.arrayBuffer();case"text":return s.text();case"json":default:return s.json()}}return s.json().then(i=>{let a=i;try{a=this._errorClass.fromPlain(i)}catch(c){console.debug("http: failed to parse error response into ErrorResponse",c)}return Promise.reject({status:s.status,message:s.statusText,body:a})})})}static cacheFlush(){this._cacheStrategy.flush()}static mergeQueryParams(t,e){if(!e||Object.keys(e).length===0)return t;let o=t.startsWith("http"),s=new URL(t,globalThis?.location?.origin||this._mergeParamsFallbackBaseUrl),a={...Object.fromEntries(new URLSearchParams(s.search).entries()),...e},c=[];for(let[d,m]of Object.entries(a))if(m!=null)if(Array.isArray(m))for(let w of m)c.push(`${encodeURIComponent(d)}=${encodeURIComponent(String(w))}`);else c.push(`${encodeURIComponent(d)}=${encodeURIComponent(String(m))}`);let h=c.length?`?${c.join("&")}`:"",g=s.origin+s.pathname+h;return o?g:g.replace(s.origin,"")}static _generateCacheKey(t){let e=`${t.method}:${t.url}`;return t.queryParams&&Object.keys(t.queryParams).length>0&&(e+=`:${mt.md5(JSON.stringify(t.queryParams))}`),t.body&&Object.keys(t.body).length>0?`${e}:${mt.md5(JSON.stringify(t.body))}`:e}static async _preprocessRequest(t){return t}static async _preprocessResponse(t,e){return e}};import{SmpLoggerMethods as Es}from"@tonysamperi/logger";var hr=class{static{n(this,"SmpApiCommonUtils")}static _javascriptVariablePattern="[a-zA-Z_$][a-zA-Z_$0-9]*";static _logger=new Es;static _pathParamRegex=new RegExp(`\\{(${this._javascriptVariablePattern})\\}`,"g");static credentialsToBasicAuth(t,e){return`Basic ${Buffer.from(`${t}:${e}`).toString("base64")}`}static fromBearer(t=""){return t.split(" ")[1]}static getCountryFromReferer(t){return this.getLocaleFromReferer(t)?.split("-")[0]?.toUpperCase()}static getLanguageFromReferer(t){return this.getLocaleFromReferer(t)?.split("-")[1]}static getLocaleFromReferer(t){return t?.match(/\/([A-Z]{2}-[A-Z]{2})\//i)?.[1]}static interpolateParams(t,e){try{return t.replace(this._pathParamRegex,(o,s)=>{let i=e[s];return i!==void 0?encodeURIComponent(i):o})}catch(o){this._logger.warn(`${this.constructor.name}: couldn't interpolate params`,o)}return t}};var Tp={status:"OK"};var lr=(function(r){return r.GET="GET",r.POST="POST",r.PUT="PUT",r.DELETE="DELETE",r.PATCH="PATCH",r})({});var fr=class{static{n(this,"SmpBaseJwtToken")}_access_token;_exp;_iss;get access_token(){return this._access_token}get exp(){return this._exp}get iss(){return this._iss}constructor(t,e,o){this._access_token=t,this._exp=e,this._iss=o}serialize(){return{access_token:this._access_token,exp:this._exp,iss:this._iss}}};var pr=class{static{n(this,"SmpBaseJwtTokenPlain")}access_token;exp;iss};var Bt=class{static{n(this,"SmpAesCrypt")}_password;_salt;_initVector;_iv;_key;_mode=V;_padding=pt;constructor(t,e,o){this._password=t,this._salt=e,this._initVector=o,this._iv=this._initVector?q.parse(this._initVector):void 0,this._key=this._buildKey()}decryptAES(t){return Ot.decrypt(t,this._key,{iv:this._iv,mode:this._mode,padding:this._padding}).toString(C)}encryptAES(t){return Ot.encrypt(t,this._key,{iv:this._iv,mode:this._mode,padding:this._padding}).toString()}_buildKey(){return ye.execute(this._password,q.parse(this._salt),{keySize:256/32,iterations:1e3,hasher:rt})}};var xe=class{static{n(this,"SmpSecureCode")}_baseCode;get baseCode(){return this._baseCode}get secureCode(){return this._encode()}_crcLength=5;_seed="changeme";constructor(t){this._baseCode=t}static check(t,e){if(new this(t).secureCode!==e)throw z.create({messages:"WRONG_SECURE_CODE",errorCode:"WRONG_SECURE_CODE",status:$e.BadRequest})}_encode(){let t=new k;return t.update(C.parse(this._seed+this._baseCode)),t.finalize().toString(q).substring(0,this._crcLength).toUpperCase()}};import{Expose as Os,instanceToPlain as Bs,plainToInstance as Ts}from"class-transformer";import{DateTime as be}from"ts-luxon";var M=(function(r){return r.ACTIVATE="ACTIVATE",r.BLOCK="BLOCK",r.CHECK="CHECK",r.DIGITAL_ACTIVATE="DIGITAL_ACTIVATE",r.FREEZE="FREEZE",r.PURCHASE="PURCHASE",r.RECHARGE="RECHARGE",r.ROLLBACK="ROLLBACK",r.TRANSACTION="TRANSACTION",r.TRANSACTION_DETAIL="TRANSACTION_DETAIL",r.UNFREEZE="UNFREEZE",r.XREFUND="XREFUND",r})({});var gt=(function(r){return r.MD5="MD5",r.MD5_HMAC="MD5_HMAC",r.SHA1="SHA1",r.SHA1_HMAC="SHA1_HMAC",r})({});function Rs(r,t,e,o){var s=arguments.length,i=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,o);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(i=(s<3?a(i):s>3?a(t,e,i):a(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i}n(Rs,"_ts_decorate");function ur(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}n(ur,"_ts_metadata");var Ae=class r{static{n(this,"SmpGiftcardTransaction")}gc;op;ot;static _AES_ENCODER=new Bt("changeme","5f6eae61d2428b99","d92fbf214e16a79fd36f9a5185ae733f");static _OP_CODES={[M.CHECK]:"",[M.TRANSACTION]:"",[M.TRANSACTION_DETAIL]:"",[M.ACTIVATE]:"A",[M.BLOCK]:"B",[M.DIGITAL_ACTIVATE]:"D",[M.FREEZE]:"F",[M.PURCHASE]:"P",[M.RECHARGE]:"G",[M.ROLLBACK]:"R",[M.UNFREEZE]:"U",[M.XREFUND]:"X"};static _SEP="_";get dto(){return this._dto}get hash(){return this._hashStrategy(this.toString()).toString()}get iso(){return this.dto.toUTC().toISO()}get ts(){return this._dto.ts}_dto;_hashStrategies={[gt.MD5]:t=>ut(t),[gt.MD5_HMAC]:t=>{let e=new k;return e.update(C.parse(t)),e.finalize()},[gt.SHA1]:t=>dt(t),[gt.SHA1_HMAC]:t=>{let e=new rt;return e.update(C.parse(t)),e.finalize()}};_hashStrategy=this._hashStrategies[gt.MD5];constructor(t="ACTIVATION",e,o,s){this.gc=t,this.op=e,this.ot=o,this._dto=typeof s=="number"&&s>=0?be.fromMillis(+`${s}000`.slice(0,13)):be.local()}static build({gc:t,op:e,ot:o,dto:s}){return new this(t,e,o,s?.ts)}static explode(t){let e=this.constructor,o=(t||"").split(e._SEP);if(o.length<4)throw new Error(`${this.constructor.name}::explode: invalid transactionId provided => "${t}"`);return this.build({gc:o[1],op:e.prefixToOperation(o[2]),dto:be.fromSeconds(+o[3])})}static isBase64(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)&&t.length%4===0}static parse(t){console.info(`${this.constructor.name}::parse: trying to parse ${t}`);try{if(this.isBase64(t)){let e=this._AES_ENCODER.decryptAES(t),o=JSON.parse(e);return Ts(r,o)}else return this.explode(t)}catch(e){throw console.error(`${this.constructor.name}::parse: failed to parse ${t}`,e),new Error(`${this.constructor.name}::parse: could not parse transactionId ${t}`)}}static prefixToOperation(t){return Object.entries(this._OP_CODES).find(([,o])=>o===t)[0]}serialize(){return Bs(this,{excludePrefixes:["_"]})}toString(){let t=JSON.stringify(this.serialize());return this.constructor._AES_ENCODER.encryptAES(t)}};Rs([Os(),ur("design:type",Number),ur("design:paramtypes",[])],Ae.prototype,"ts",null);var ou=(function(r){return r.ListDetectiveValidator="ListDetectiveValidator",r.MXValidator="MXValidator",r.SyntaxValidator="SyntaxValidator",r})({});function iu(r,t){t.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(o=>{o!=="constructor"&&(o in r.prototype||Object.defineProperty(r.prototype,o,Object.getOwnPropertyDescriptor(e.prototype,o)))});try{let o=new e;Object.getOwnPropertyNames(o).forEach(s=>{s in r.prototype||Object.defineProperty(r.prototype,s,Object.getOwnPropertyDescriptor(o,s))})}catch{}Object.getOwnPropertyNames(e).forEach(o=>{o!=="prototype"&&o!=="name"&&o!=="length"&&(o in r||Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o)))})})}n(iu,"smpApplyMixin");function Is(){this.__data__=[],this.size=0}n(Is,"listCacheClear");var dr=Is;function Cs(r,t){return r===t||r!==r&&t!==t}n(Cs,"eq");var qt=Cs;function Ps(r,t){for(var e=r.length;e--;)if(qt(r[e][0],t))return e;return-1}n(Ps,"assocIndexOf");var X=Ps;var js=Array.prototype,Ms=js.splice;function Ds(r){var t=this.__data__,e=X(t,r);if(e<0)return!1;var o=t.length-1;return e==o?t.pop():Ms.call(t,e,1),--this.size,!0}n(Ds,"listCacheDelete");var mr=Ds;function Ns(r){var t=this.__data__,e=X(t,r);return e<0?void 0:t[e][1]}n(Ns,"listCacheGet");var gr=Ns;function Fs(r){return X(this.__data__,r)>-1}n(Fs,"listCacheHas");var _r=Fs;function Ls(r,t){var e=this.__data__,o=X(e,r);return o<0?(++this.size,e.push([r,t])):e[o][1]=t,this}n(Ls,"listCacheSet");var wr=Ls;function _t(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}n(_t,"ListCache");_t.prototype.clear=dr;_t.prototype.delete=mr;_t.prototype.get=gr;_t.prototype.has=_r;_t.prototype.set=wr;var Z=_t;function zs(){this.__data__=new Z,this.size=0}n(zs,"stackClear");var yr=zs;function Us(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}n(Us,"stackDelete");var xr=Us;function ks(r){return this.__data__.get(r)}n(ks,"stackGet");var br=ks;function $s(r){return this.__data__.has(r)}n($s,"stackHas");var Ar=$s;var Gs=typeof global=="object"&&global&&global.Object===Object&&global,Vt=Gs;var Ws=typeof self=="object"&&self&&self.Object===Object&&self,Ks=Vt||Ws||Function("return this")(),B=Ks;var Ss=B.Symbol,$=Ss;var vr=Object.prototype,Hs=vr.hasOwnProperty,qs=vr.toString,Tt=$?$.toStringTag:void 0;function Vs(r){var t=Hs.call(r,Tt),e=r[Tt];try{r[Tt]=void 0;var o=!0}catch{}var s=qs.call(r);return o&&(t?r[Tt]=e:delete r[Tt]),s}n(Vs,"getRawTag");var Er=Vs;var Xs=Object.prototype,Zs=Xs.toString;function Js(r){return Zs.call(r)}n(Js,"objectToString");var Rr=Js;var Ys="[object Null]",Qs="[object Undefined]",Or=$?$.toStringTag:void 0;function ti(r){return r==null?r===void 0?Qs:Ys:Or&&Or in Object(r)?Er(r):Rr(r)}n(ti,"baseGetTag");var G=ti;function ei(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}n(ei,"isObject");var Xt=ei;var ri="[object AsyncFunction]",oi="[object Function]",si="[object GeneratorFunction]",ii="[object Proxy]";function ni(r){if(!Xt(r))return!1;var t=G(r);return t==oi||t==si||t==ri||t==ii}n(ni,"isFunction");var Zt=ni;var ai=B["__core-js_shared__"],Jt=ai;var Br=(function(){var r=/[^.]+$/.exec(Jt&&Jt.keys&&Jt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function ci(r){return!!Br&&Br in r}n(ci,"isMasked");var Tr=ci;var hi=Function.prototype,li=hi.toString;function fi(r){if(r!=null){try{return li.call(r)}catch{}try{return r+""}catch{}}return""}n(fi,"toSource");var W=fi;var pi=/[\\^$.*+?()[\]{}|]/g,ui=/^\[object .+?Constructor\]$/,di=Function.prototype,mi=Object.prototype,gi=di.toString,_i=mi.hasOwnProperty,wi=RegExp("^"+gi.call(_i).replace(pi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yi(r){if(!Xt(r)||Tr(r))return!1;var t=Zt(r)?wi:ui;return t.test(W(r))}n(yi,"baseIsNative");var Ir=yi;function xi(r,t){return r?.[t]}n(xi,"getValue");var Cr=xi;function bi(r,t){var e=Cr(r,t);return Ir(e)?e:void 0}n(bi,"getNative");var N=bi;var Ai=N(B,"Map"),J=Ai;var vi=N(Object,"create"),K=vi;function Ei(){this.__data__=K?K(null):{},this.size=0}n(Ei,"hashClear");var Pr=Ei;function Ri(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}n(Ri,"hashDelete");var jr=Ri;var Oi="__lodash_hash_undefined__",Bi=Object.prototype,Ti=Bi.hasOwnProperty;function Ii(r){var t=this.__data__;if(K){var e=t[r];return e===Oi?void 0:e}return Ti.call(t,r)?t[r]:void 0}n(Ii,"hashGet");var Mr=Ii;var Ci=Object.prototype,Pi=Ci.hasOwnProperty;function ji(r){var t=this.__data__;return K?t[r]!==void 0:Pi.call(t,r)}n(ji,"hashHas");var Dr=ji;var Mi="__lodash_hash_undefined__";function Di(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=K&&t===void 0?Mi:t,this}n(Di,"hashSet");var Nr=Di;function wt(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}n(wt,"Hash");wt.prototype.clear=Pr;wt.prototype.delete=jr;wt.prototype.get=Mr;wt.prototype.has=Dr;wt.prototype.set=Nr;var ve=wt;function Ni(){this.size=0,this.__data__={hash:new ve,map:new(J||Z),string:new ve}}n(Ni,"mapCacheClear");var Fr=Ni;function Fi(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}n(Fi,"isKeyable");var Lr=Fi;function Li(r,t){var e=r.__data__;return Lr(t)?e[typeof t=="string"?"string":"hash"]:e.map}n(Li,"getMapData");var Y=Li;function zi(r){var t=Y(this,r).delete(r);return this.size-=t?1:0,t}n(zi,"mapCacheDelete");var zr=zi;function Ui(r){return Y(this,r).get(r)}n(Ui,"mapCacheGet");var Ur=Ui;function ki(r){return Y(this,r).has(r)}n(ki,"mapCacheHas");var kr=ki;function $i(r,t){var e=Y(this,r),o=e.size;return e.set(r,t),this.size+=e.size==o?0:1,this}n($i,"mapCacheSet");var $r=$i;function yt(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}n(yt,"MapCache");yt.prototype.clear=Fr;yt.prototype.delete=zr;yt.prototype.get=Ur;yt.prototype.has=kr;yt.prototype.set=$r;var Yt=yt;var Gi=200;function Wi(r,t){var e=this.__data__;if(e instanceof Z){var o=e.__data__;if(!J||o.length<Gi-1)return o.push([r,t]),this.size=++e.size,this;e=this.__data__=new Yt(o)}return e.set(r,t),this.size=e.size,this}n(Wi,"stackSet");var Gr=Wi;function xt(r){var t=this.__data__=new Z(r);this.size=t.size}n(xt,"Stack");xt.prototype.clear=yr;xt.prototype.delete=xr;xt.prototype.get=br;xt.prototype.has=Ar;xt.prototype.set=Gr;var Qt=xt;var Ki="__lodash_hash_undefined__";function Si(r){return this.__data__.set(r,Ki),this}n(Si,"setCacheAdd");var Wr=Si;function Hi(r){return this.__data__.has(r)}n(Hi,"setCacheHas");var Kr=Hi;function te(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new Yt;++t<e;)this.add(r[t])}n(te,"SetCache");te.prototype.add=te.prototype.push=Wr;te.prototype.has=Kr;var Sr=te;function qi(r,t){for(var e=-1,o=r==null?0:r.length;++e<o;)if(t(r[e],e,r))return!0;return!1}n(qi,"arraySome");var Hr=qi;function Vi(r,t){return r.has(t)}n(Vi,"cacheHas");var qr=Vi;var Xi=1,Zi=2;function Ji(r,t,e,o,s,i){var a=e&Xi,c=r.length,h=t.length;if(c!=h&&!(a&&h>c))return!1;var f=i.get(r),g=i.get(t);if(f&&g)return f==t&&g==r;var d=-1,m=!0,w=e&Zi?new Sr:void 0;for(i.set(r,t),i.set(t,r);++d<c;){var y=r[d],v=t[d];if(o)var R=a?o(v,y,d,t,r,i):o(y,v,d,r,t,i);if(R!==void 0){if(R)continue;m=!1;break}if(w){if(!Hr(t,function(O,E){if(!qr(w,E)&&(y===O||s(y,O,e,o,i)))return w.push(E)})){m=!1;break}}else if(!(y===v||s(y,v,e,o,i))){m=!1;break}}return i.delete(r),i.delete(t),m}n(Ji,"equalArrays");var ee=Ji;var Yi=B.Uint8Array,Ee=Yi;function Qi(r){var t=-1,e=Array(r.size);return r.forEach(function(o,s){e[++t]=[s,o]}),e}n(Qi,"mapToArray");var Vr=Qi;function tn(r){var t=-1,e=Array(r.size);return r.forEach(function(o){e[++t]=o}),e}n(tn,"setToArray");var Xr=tn;var en=1,rn=2,on="[object Boolean]",sn="[object Date]",nn="[object Error]",an="[object Map]",cn="[object Number]",hn="[object RegExp]",ln="[object Set]",fn="[object String]",pn="[object Symbol]",un="[object ArrayBuffer]",dn="[object DataView]",Zr=$?$.prototype:void 0,Re=Zr?Zr.valueOf:void 0;function mn(r,t,e,o,s,i,a){switch(e){case dn:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case un:return!(r.byteLength!=t.byteLength||!i(new Ee(r),new Ee(t)));case on:case sn:case cn:return qt(+r,+t);case nn:return r.name==t.name&&r.message==t.message;case hn:case fn:return r==t+"";case an:var c=Vr;case ln:var h=o&en;if(c||(c=Xr),r.size!=t.size&&!h)return!1;var f=a.get(r);if(f)return f==t;o|=rn,a.set(r,t);var g=ee(c(r),c(t),o,s,i,a);return a.delete(r),g;case pn:if(Re)return Re.call(r)==Re.call(t)}return!1}n(mn,"equalByTag");var Jr=mn;function gn(r,t){for(var e=-1,o=t.length,s=r.length;++e<o;)r[s+e]=t[e];return r}n(gn,"arrayPush");var Yr=gn;var _n=Array.isArray,st=_n;function wn(r,t,e){var o=t(r);return st(r)?o:Yr(o,e(r))}n(wn,"baseGetAllKeys");var Qr=wn;function yn(r,t){for(var e=-1,o=r==null?0:r.length,s=0,i=[];++e<o;){var a=r[e];t(a,e,r)&&(i[s++]=a)}return i}n(yn,"arrayFilter");var to=yn;function xn(){return[]}n(xn,"stubArray");var eo=xn;var bn=Object.prototype,An=bn.propertyIsEnumerable,ro=Object.getOwnPropertySymbols,vn=ro?function(r){return r==null?[]:(r=Object(r),to(ro(r),function(t){return An.call(r,t)}))}:eo,oo=vn;function En(r,t){for(var e=-1,o=Array(r);++e<r;)o[e]=t(e);return o}n(En,"baseTimes");var so=En;function Rn(r){return r!=null&&typeof r=="object"}n(Rn,"isObjectLike");var S=Rn;var On="[object Arguments]";function Bn(r){return S(r)&&G(r)==On}n(Bn,"baseIsArguments");var Oe=Bn;var io=Object.prototype,Tn=io.hasOwnProperty,In=io.propertyIsEnumerable,Cn=Oe((function(){return arguments})())?Oe:function(r){return S(r)&&Tn.call(r,"callee")&&!In.call(r,"callee")},no=Cn;function Pn(){return!1}n(Pn,"stubFalse");var ao=Pn;var lo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,co=lo&&typeof module=="object"&&module&&!module.nodeType&&module,jn=co&&co.exports===lo,ho=jn?B.Buffer:void 0,Mn=ho?ho.isBuffer:void 0,Dn=Mn||ao,It=Dn;var Nn=9007199254740991,Fn=/^(?:0|[1-9]\d*)$/;function Ln(r,t){var e=typeof r;return t=t??Nn,!!t&&(e=="number"||e!="symbol"&&Fn.test(r))&&r>-1&&r%1==0&&r<t}n(Ln,"isIndex");var fo=Ln;var zn=9007199254740991;function Un(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=zn}n(Un,"isLength");var re=Un;var kn="[object Arguments]",$n="[object Array]",Gn="[object Boolean]",Wn="[object Date]",Kn="[object Error]",Sn="[object Function]",Hn="[object Map]",qn="[object Number]",Vn="[object Object]",Xn="[object RegExp]",Zn="[object Set]",Jn="[object String]",Yn="[object WeakMap]",Qn="[object ArrayBuffer]",ta="[object DataView]",ea="[object Float32Array]",ra="[object Float64Array]",oa="[object Int8Array]",sa="[object Int16Array]",ia="[object Int32Array]",na="[object Uint8Array]",aa="[object Uint8ClampedArray]",ca="[object Uint16Array]",ha="[object Uint32Array]",A={};A[ea]=A[ra]=A[oa]=A[sa]=A[ia]=A[na]=A[aa]=A[ca]=A[ha]=!0;A[kn]=A[$n]=A[Qn]=A[Gn]=A[ta]=A[Wn]=A[Kn]=A[Sn]=A[Hn]=A[qn]=A[Vn]=A[Xn]=A[Zn]=A[Jn]=A[Yn]=!1;function la(r){return S(r)&&re(r.length)&&!!A[G(r)]}n(la,"baseIsTypedArray");var po=la;function fa(r){return function(t){return r(t)}}n(fa,"baseUnary");var uo=fa;var mo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ct=mo&&typeof module=="object"&&module&&!module.nodeType&&module,pa=Ct&&Ct.exports===mo,Be=pa&&Vt.process,ua=(function(){try{var r=Ct&&Ct.require&&Ct.require("util").types;return r||Be&&Be.binding&&Be.binding("util")}catch{}})(),Te=ua;var go=Te&&Te.isTypedArray,da=go?uo(go):po,oe=da;var ma=Object.prototype,ga=ma.hasOwnProperty;function _a(r,t){var e=st(r),o=!e&&no(r),s=!e&&!o&&It(r),i=!e&&!o&&!s&&oe(r),a=e||o||s||i,c=a?so(r.length,String):[],h=c.length;for(var f in r)(t||ga.call(r,f))&&!(a&&(f=="length"||s&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||fo(f,h)))&&c.push(f);return c}n(_a,"arrayLikeKeys");var _o=_a;var wa=Object.prototype;function ya(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||wa;return r===e}n(ya,"isPrototype");var wo=ya;function xa(r,t){return function(e){return r(t(e))}}n(xa,"overArg");var yo=xa;var ba=yo(Object.keys,Object),xo=ba;var Aa=Object.prototype,va=Aa.hasOwnProperty;function Ea(r){if(!wo(r))return xo(r);var t=[];for(var e in Object(r))va.call(r,e)&&e!="constructor"&&t.push(e);return t}n(Ea,"baseKeys");var bo=Ea;function Ra(r){return r!=null&&re(r.length)&&!Zt(r)}n(Ra,"isArrayLike");var Ao=Ra;function Oa(r){return Ao(r)?_o(r):bo(r)}n(Oa,"keys");var vo=Oa;function Ba(r){return Qr(r,vo,oo)}n(Ba,"getAllKeys");var Ie=Ba;var Ta=1,Ia=Object.prototype,Ca=Ia.hasOwnProperty;function Pa(r,t,e,o,s,i){var a=e&Ta,c=Ie(r),h=c.length,f=Ie(t),g=f.length;if(h!=g&&!a)return!1;for(var d=h;d--;){var m=c[d];if(!(a?m in t:Ca.call(t,m)))return!1}var w=i.get(r),y=i.get(t);if(w&&y)return w==t&&y==r;var v=!0;i.set(r,t),i.set(t,r);for(var R=a;++d<h;){m=c[d];var O=r[m],E=t[m];if(o)var x=a?o(E,O,m,t,r,i):o(O,E,m,r,t,i);if(!(x===void 0?O===E||s(O,E,e,o,i):x)){v=!1;break}R||(R=m=="constructor")}if(v&&!R){var b=r.constructor,T=t.constructor;b!=T&&"constructor"in r&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof T=="function"&&T instanceof T)&&(v=!1)}return i.delete(r),i.delete(t),v}n(Pa,"equalObjects");var Eo=Pa;var ja=N(B,"DataView"),se=ja;var Ma=N(B,"Promise"),ie=Ma;var Da=N(B,"Set"),ne=Da;var Na=N(B,"WeakMap"),ae=Na;var Ro="[object Map]",Fa="[object Object]",Oo="[object Promise]",Bo="[object Set]",To="[object WeakMap]",Io="[object DataView]",La=W(se),za=W(J),Ua=W(ie),ka=W(ne),$a=W(ae),it=G;(se&&it(new se(new ArrayBuffer(1)))!=Io||J&&it(new J)!=Ro||ie&&it(ie.resolve())!=Oo||ne&&it(new ne)!=Bo||ae&&it(new ae)!=To)&&(it=n(function(r){var t=G(r),e=t==Fa?r.constructor:void 0,o=e?W(e):"";if(o)switch(o){case La:return Io;case za:return Ro;case Ua:return Oo;case ka:return Bo;case $a:return To}return t},"getTag"));var Ce=it;var Ga=1,Co="[object Arguments]",Po="[object Array]",ce="[object Object]",Wa=Object.prototype,jo=Wa.hasOwnProperty;function Ka(r,t,e,o,s,i){var a=st(r),c=st(t),h=a?Po:Ce(r),f=c?Po:Ce(t);h=h==Co?ce:h,f=f==Co?ce:f;var g=h==ce,d=f==ce,m=h==f;if(m&&It(r)){if(!It(t))return!1;a=!0,g=!1}if(m&&!g)return i||(i=new Qt),a||oe(r)?ee(r,t,e,o,s,i):Jr(r,t,h,e,o,s,i);if(!(e&Ga)){var w=g&&jo.call(r,"__wrapped__"),y=d&&jo.call(t,"__wrapped__");if(w||y){var v=w?r.value():r,R=y?t.value():t;return i||(i=new Qt),s(v,R,e,o,i)}}return m?(i||(i=new Qt),Eo(r,t,e,o,s,i)):!1}n(Ka,"baseIsEqualDeep");var Mo=Ka;function Do(r,t,e,o,s){return r===t?!0:r==null||t==null||!S(r)&&!S(t)?r!==r&&t!==t:Mo(r,t,e,o,Do,s)}n(Do,"baseIsEqual");var No=Do;function Sa(r,t){return No(r,t)}n(Sa,"isEqual");var Fo=Sa;var Ha=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Lo(r){return r.match(Ha)}n(Lo,"smpAsciiWords");var Wo="\\ud800-\\udfff",qa="\\u0300-\\u036f",Va="\\ufe20-\\ufe2f",Xa="\\u20d0-\\u20ff",Za="\\u1ab0-\\u1aff",Ja="\\u1dc0-\\u1dff",Ya=qa+Va+Xa+Za+Ja,Ko="\\u2700-\\u27bf",So="a-z\\xdf-\\xf6\\xf8-\\xff",Qa="\\xac\\xb1\\xd7\\xf7",tc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ec="\\u2000-\\u206f",rc=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ho="A-Z\\xc0-\\xd6\\xd8-\\xde",oc="\\ufe0e\\ufe0f",qo=Qa+tc+ec+rc,Vo="['\u2019]",zo=`[${qo}]`,sc=`[${Ya}]`,Xo="\\d",ic=`[${Ko}]`,Zo=`[${So}]`,Jo=`[^${Wo}${qo+Xo+Ko+So+Ho}]`,nc="\\ud83c[\\udffb-\\udfff]",ac=`(?:${sc}|${nc})`,cc=`[^${Wo}]`,Yo="(?:\\ud83c[\\udde6-\\uddff]){2}",Qo="[\\ud800-\\udbff][\\udc00-\\udfff]",bt=`[${Ho}]`,hc="\\u200d",Uo=`(?:${Zo}|${Jo})`,lc=`(?:${bt}|${Jo})`,ko=`(?:${Vo}(?:d|ll|m|re|s|t|ve))?`,$o=`(?:${Vo}(?:D|LL|M|RE|S|T|VE))?`,ts=`${ac}?`,es=`[${oc}]?`,fc=`(?:${hc}(?:${[cc,Yo,Qo].join("|")})${es+ts})*`,pc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",uc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",dc=es+ts+fc,Go=`(?:${[ic,Yo,Qo].join("|")})${dc}`,Pt=class{static{n(this,"SmpUnicodeWords")}static HAS_UNICODE_WORD=RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/);static RE_UNICODE_WORDS=RegExp([`${bt}?${Zo}+${ko}(?=${[zo,bt,"$"].join("|")})`,`${lc}+${$o}(?=${[zo,bt+Uo,"$"].join("|")})`,`${bt}?${Uo}+${ko}`,`${bt}+${$o}`,uc,pc,`${Xo}+`,Go].join("|"),"g");static RS_EMOJI=Go;static unicodeWords(t){return t.match(this.RE_UNICODE_WORDS)}};var rs=class{static{n(this,"SmpCommonUtils")}static arrayRemove(t,e){let o=[],s=t.filter((i,a)=>e(i,a)&&o.push(a));return o.reverse().forEach(i=>t.splice(i,1)),s}static assertIsArray(t,e){if(!Array.isArray(t))throw new Error(e||`${this.constructor.name} => val was not an array`)}static assertIsBoolean(t,e){if(!this.isBoolean(t))throw new Error(e||`${this.constructor.name} => val was not boolean`)}static assertIsFunction(t,e){if(!this.isFunction(t))throw new Error(e||`${this.constructor.name} => entity was not a function`)}static assertIsInstance(t,e,o){if(!(t instanceof e))throw new Error(o||`${this.constructor.name} => val was not instance of class`)}static assertIsNotEmpty(t,e){if(this.isEmpty(t))throw new Error(e||`${this.constructor.name} => entity was empty`)}static assertIsNumber(t,e){if(typeof t!="number")throw new Error(e||`${this.constructor.name} => val was not numeric`)}static assertIsNumeric(t,e){if(!this.isNumeric(t))throw new Error(e||`${this.constructor.name} => val was not numeric`)}static assertIsObject(t,e){if(!this.isObject(t))throw new Error(e||`${this.constructor.name} => val was not an object`)}static assertIsString(t,e){if(!this.isString(t))throw new Error(e||`${this.constructor.name} => val was not a string`)}static assertIsTruthy(t,e){if(!t)throw new Error(e||`${this.constructor.name} => condition wasn't truthy`)}static buildPath(...t){let e=t.filter(o=>!!o).join("/").replace(/(?<!:)\/\/+/g,"/");return e.startsWith("http")&&!e.endsWith("/")?`${e}/`:e}static downloadBlob(t,e){let o=window.URL.createObjectURL(t),s=document.createElement("a");s.href=o,s.setAttribute("download",e),document.body.appendChild(s),s.click()}static fixDecimalPrecision(t,e=2){this.assertIsNumber(t),this.assertIsNumber(e);let s=10**Math.max(0,Math.trunc(e));return Math.round((t+Number.EPSILON)*s)/s}static generateRandomHexString(t=12){let e="0123456789abcdef",o="";for(let s=0;s<t;s++){let i=Math.floor(Math.random()*e.length);o+=e[i]}return o}static generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}static getDecimalPrecision(t){if(this.assertIsNumeric(t),!isFinite(+t))return 0;let e=1,o=0;for(;Math.round(+t*e)/e!==t;)e*=10,o++;return o}static getType(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}static isBoolean(t){return typeof t=="boolean"}static isColor(t){if(!t||!this.isString(t))return!1;let e=new Option().style;return e.color=t,e.color!==""}static isEmpty(t){return!t&&t!==0}static isEqual(t,e){return Fo(t,e)}static isFormField(t){return/^(?:input|select|textarea|button)$/i.test(t.nodeName)}static isFunction(t){return typeof t==typeof isNaN}static isNotEmpty(t){return!this.isEmpty(t)}static isNumber(t){return typeof t=="number"&&this.isNumeric(t)}static isNumeric(t){return!isNaN(t)}static isObject(t){return!!t&&t===Object(t)&&t.constructor===Object}static isPrimitive(t){let e=this.getType(t);return e!=="function"&&(e!=="object"||!t)}static isString(t){return typeof t=="string"}static isWindows(){return navigator.userAgent.toLowerCase().includes("win")}static mapObject(t,e){if(this.assertIsFunction(e,`CommonUtils => expected type of iteratee to be Function, got ${typeof e}`),this.isObject(t))return Object.entries(t).reduce((o,[s,i])=>(o.push(e(i,s)),o),[]);if(Array.isArray(t))return t.map(e);throw new Error(`CommonUtils => invalid object provided. Expected Object or Array, got ${typeof e}`)}static mapObjectKeys(t,e){return this.isObject(t)?Object.entries(t).reduce((o,[s,i])=>{let a=e(s,i);return o[a]=i,o},{}):{}}static mapObjectValues(t,e){return this.isObject(t)?Object.entries(t).reduce((o,[s,i])=>(o[s]=e.call(null,i,s),o),{}):{}}static noop(){}static objectHasValue(t,e){return!!~Object.values(t).filter(o=>this.isEqual(o,e))}static omit(t,e){return Object.keys(t).filter(s=>!e.includes(s)).reduce((s,i)=>(s[i]=t[i],s),{})}static parseBoolean(t){return t?/^true$/i.test(t):!1}static parseJsonSafely(t){try{return JSON.parse(t)}catch(e){console.warn(`${this.constructor.name} => couldn't parse json string`,{str:t,error:e});return}}static pick(t,e){return e.reduce((o,s)=>(s in t&&(o[s]=t[s]),o),{})}static runSafely(t,e=null,o=[]){if(this.isFunction(t))return t.apply(e,o)}static sleep(t){return new Promise(e=>setTimeout(e,t))}static sprintf(t,...e){return this.isString(t)&&e.length?this.sprintf(t.replace("%s",String(e.shift())),...e):t}static stripComments(t){return typeof t=="string"?t.replace(/(<!--.*?-->)|(<!--[\S\s]+?-->)|(<!--[\S\s]*?$)/g,""):t}static submitFakeForm({action:t,method:e=lr.POST,data:o,target:s}){let i=Object.entries(o||{}).map(([c,h])=>`<input name="${c}" type="hidden" value="${h}" />`),a=document.createElement("form");a.method=e,a.action=t,a.innerHTML=`${i}`,a.target=s||"_self",document.body.append(a),a.submit()}static toCamelCase(t){return this.words(t.replace(/['\u2019]/g,"")).reduce((e,o,s)=>(o=o.toLowerCase(),e+(s?o.charAt(0).toUpperCase()+o.slice(1):o)),"")}static toKebabCase(t){return this.words(t.replace(/['\u2019]/g,"")).join("-").toLowerCase()}static toPascalCase(t){return this.toCamelCase(t).replace(/^(.)/,e=>e.toUpperCase())}static toSnakeCase(t){return this.words(t.replace(/['\u2019]/g,"")).join("_").toLowerCase()}static toUpperSnakeCase(t){return this.toSnakeCase(t).toUpperCase()}static words(t,e){return e===void 0?(Pt.HAS_UNICODE_WORD(t)?Pt.unicodeWords(t):Lo(t))||[]:t.match(e)||[]}};var os=class extends Error{static{n(this,"SmpFilterException")}message;data;constructor(t="Filter Exception",e){super(),this.message=t,this.data=e}};import{DateTime as ss}from"ts-luxon";var is=class r{static{n(this,"SmpSid")}value;expiry;get active(){return this.value.endsWith(this._controlSuffix)}get expired(){return ss.now().ts>this.expiry}get valid(){return!this.expired}_controlSuffix="$1";constructor(t=`sid-xxxx-${+ss.now().ts}`,e=0){this.value=t,this.expiry=e}static parse(t){return new r(t.value,t.expiry)}toPlain(){return{value:this.value,expiry:this.expiry}}};import{smpNoop as Z0}from"@tonysamperi/logger";var ns=class{static{n(this,"SmpRegularExpressions")}static get COUNTRY(){return this._country}static get DOMAIN(){return/^(?!www)(\w)([\w.-])*\.[a-z]{2,6}$/}static get EMAIL(){return/^[^\\|!"£$%&/()='?^€*[\]°#§<>,;:\s]+@[a-z0-9.-]+\.[a-z]{2,6}$/}static get LANGUAGE(){return this._language}static get LATIN_CHARS(){return/^[\u0000-\u024F\u1E00-\u1EFF\u2C60-\u2C7F\uA720-\uA7FF]+/}static get LOCALE(){return new RegExp(`${this._country.source}-${this._language.source}`)}static get NO_EMOJI_NO_PUNCTUATION(){return/[^\p{Emoji_Presentation}|\p{P}]/gu}static get PHONE_NUMBER(){return/^(\+\d{1,4}\s)(\d{4,15})$/}static get PHONE_NUMBER_BY_PREFIX(){return{"+971":{dontStartWithZero:/^(\+\d{3}\s)([1-9])/,typeExactlyNineDigits:/^(\+\d{3}\s)([1-9]\d{8}$)/}}}static get TAXCODE_BY_COUNTRY(){return{ES:{DNI:/^\d{8}[A-Z]$/,NIE:/^[A-Z]\d{7}[A-Z]$/,CIF:/^[A-Z]\d{8}$/}}}static _country=/[a-zA-Z]{2}/;static _language=/[a-z]{2}/};var Q0="2.0.0-beta.6";export{Tp as SMP_HEALTHZ,ze as SmpAbstractCacheStrategy,ht as SmpAbstractTtlCacheStrategy,Bt as SmpAesCrypt,hr as SmpApiCommonUtils,fr as SmpBaseJwtToken,pr as SmpBaseJwtTokenPlain,jt as SmpBrowserCache,rs as SmpCommonUtils,mt as SmpCrypto,z as SmpErrorResponse,os as SmpFilterException,_c as SmpFirebaseErrors,Et as SmpGenericResponse,Ae as SmpGiftcardTransaction,gt as SmpGiftcardTransactionHashStrategies,M as SmpGiftcardTransactionOps,Mt as SmpHttpSessionStorageCache,$e as SmpHttpStatusCodes,cr as SmpHttpTwoService,Ht as SmpInMemoryCache,ou as SmpMarketingCloudValidators,ns as SmpRegularExpressions,F as SmpResponseMessage,ct as SmpResponseMessageTypes,lr as SmpRestVerbs,xe as SmpSecureCode,is as SmpSid,mc as SmpSocialSignInKeys,gc as SmpSocialSignInUxModes,Q0 as VERSION,iu as smpApplyMixin,Ue as smpIsSmpCachedValue,Z0 as smpNoop};
1
+ import{a as gc,b as _c,c as wc}from"./chunk-DIVAYUSN.js";import{a as Ue,b as ke}from"./chunk-VBEMFJKM.js";import{a as ft}from"./chunk-F3OJMKBL.js";import{a as n}from"./chunk-EI7MMDWY.js";import{DateTime as $e}from"ts-luxon";var pt=class extends Ue{static{n(this,"SmpAbstractTtlCacheStrategy")}flush(){this._flushRaw()}read(t){let e=this._readRaw(t);if(this._isSmpCachedValue(e)){if(e.expiry>=$e.now().ts)return e.value;this._removeRaw(t);return}return e}remove(t){this._removeRaw(t)}write(t,e,o){if(isNaN(+o)||+o<=0){this._writeRaw(t,e,o);return}let s=$e.now().ts+o*1e3,i={value:e,expiry:s};this._writeRaw(t,i,o)}_isSmpCachedValue(t){return ke(t)}};var Mt=class extends pt{static{n(this,"SmpBrowserCache")}_storage;_prefix;constructor(t,e){super(),this._storage=t,this._prefix=e}_flushRaw(){let t=[],e=-1;for(;++e<this._storage.length;){let o=this._storage.key(e);o&&o.startsWith(this._prefix)&&t.push(o)}for(e=-1;++e<t.length;)this._storage.removeItem(t[e])}_readRaw(t){let e=this._storage.getItem(this._prefix+t);try{return e?JSON.parse(e):void 0}catch{console.warn(`${this.constructor.name}: failed to parse cache item for key ${this._prefix+t}`);return}}_removeRaw(t){this._storage.removeItem(this._prefix+t)}_writeRaw(t,e){try{this._storage.setItem(this._prefix+t,JSON.stringify(e))}catch(o){console.warn(`${this.constructor.name}: failed to write cache item for key ${this._prefix+t}`,o)}}};var Dt=class extends Mt{static{n(this,"SmpHttpSessionStorageCache")}constructor(){super(sessionStorage,"smp_rest_cache_")}};var Ke=(function(r){return r[r.Continue=100]="Continue",r[r.SwitchingProtocols=101]="SwitchingProtocols",r[r.Processing=102]="Processing",r[r.EarlyHints=103]="EarlyHints",r[r.Ok=200]="Ok",r[r.Created=201]="Created",r[r.Accepted=202]="Accepted",r[r.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",r[r.NoContent=204]="NoContent",r[r.ResetContent=205]="ResetContent",r[r.PartialContent=206]="PartialContent",r[r.MultiStatus=207]="MultiStatus",r[r.AlreadyReported=208]="AlreadyReported",r[r.ImUsed=226]="ImUsed",r[r.MultipleChoices=300]="MultipleChoices",r[r.MovedPermanently=301]="MovedPermanently",r[r.Found=302]="Found",r[r.SeeOther=303]="SeeOther",r[r.NotModified=304]="NotModified",r[r.UseProxy=305]="UseProxy",r[r.Unused=306]="Unused",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",r[r.BadRequest=400]="BadRequest",r[r.Unauthorized=401]="Unauthorized",r[r.PaymentRequired=402]="PaymentRequired",r[r.Forbidden=403]="Forbidden",r[r.NotFound=404]="NotFound",r[r.MethodNotAllowed=405]="MethodNotAllowed",r[r.NotAcceptable=406]="NotAcceptable",r[r.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",r[r.RequestTimeout=408]="RequestTimeout",r[r.Conflict=409]="Conflict",r[r.Gone=410]="Gone",r[r.LengthRequired=411]="LengthRequired",r[r.PreconditionFailed=412]="PreconditionFailed",r[r.PayloadTooLarge=413]="PayloadTooLarge",r[r.UriTooLong=414]="UriTooLong",r[r.UnsupportedMediaType=415]="UnsupportedMediaType",r[r.RangeNotSatisfiable=416]="RangeNotSatisfiable",r[r.ExpectationFailed=417]="ExpectationFailed",r[r.ImATeapot=418]="ImATeapot",r[r.MisdirectedRequest=421]="MisdirectedRequest",r[r.UnprocessableEntity=422]="UnprocessableEntity",r[r.Locked=423]="Locked",r[r.FailedDependency=424]="FailedDependency",r[r.TooEarly=425]="TooEarly",r[r.UpgradeRequired=426]="UpgradeRequired",r[r.PreconditionRequired=428]="PreconditionRequired",r[r.TooManyRequests=429]="TooManyRequests",r[r.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",r[r.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",r[r.InternalServerError=500]="InternalServerError",r[r.NotImplemented=501]="NotImplemented",r[r.BadGateway=502]="BadGateway",r[r.ServiceUnavailable=503]="ServiceUnavailable",r[r.GatewayTimeout=504]="GatewayTimeout",r[r.HttpVersionNotSupported=505]="HttpVersionNotSupported",r[r.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",r[r.InsufficientStorage=507]="InsufficientStorage",r[r.LoopDetected=508]="LoopDetected",r[r.NotExtended=510]="NotExtended",r[r.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",r})({});import{Expose as qe,plainToInstance as bs}from"class-transformer";import{Expose as _s,instanceToPlain as ws,plainToInstance as ys,Transform as xs}from"class-transformer";import{Expose as Se}from"class-transformer";function Ge(r,t,e,o){var s=arguments.length,i=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,o);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(i=(s<3?a(i):s>3?a(t,e,i):a(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i}n(Ge,"_ts_decorate");function Nt(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}n(Nt,"_ts_metadata");var F=class r{static{n(this,"SmpResponseMessage")}_message;_type;get message(){return this._message}get type(){return this._type}constructor(t,e=ft.ERROR){this._message=t,this._type=e}static sanitizeMessages(t){return typeof t=="string"?t.length?[new r(t)]:[]:[t].flat().map(e=>typeof e=="string"?new r(e):e)}};Ge([Se(),Nt("design:type",String),Nt("design:paramtypes",[])],F.prototype,"message",null);Ge([Se(),Nt("design:type",typeof ft>"u"?Object:ft),Nt("design:paramtypes",[])],F.prototype,"type",null);function gs(r,t,e,o){var s=arguments.length,i=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,o);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(i=(s<3?a(i):s>3?a(t,e,i):a(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i}n(gs,"_ts_decorate");function We(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}n(We,"_ts_metadata");var Ot=class r{static{n(this,"SmpGenericResponse")}_messages;data;set messages(t){this._messages=F.sanitizeMessages(t)}get messages(){return this._messages}constructor(t=[],e){this._messages=t,this.data=e}static create(t){return new r([t.messages||[]].flat().map(e=>e instanceof F?e:new F(e,t.type||ft.SUCCESS)),t.data)}static fromPlain(t){return ys(r,t)}isError(){return!this.isSuccess()}isSuccess(){return typeof this._errorCode=="number"}serialize(){return ws(this,{excludePrefixes:["_"]})}};gs([_s(),xs(({value:r})=>r?.length?r:void 0),We("design:type",Object),We("design:paramtypes",[])],Ot.prototype,"messages",null);function He(r,t,e,o){var s=arguments.length,i=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,o);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(i=(s<3?a(i):s>3?a(t,e,i):a(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i}n(He,"_ts_decorate");function Ft(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}n(Ft,"_ts_metadata");var k=class r extends Ot{static{n(this,"SmpErrorResponse")}_errorCode;_status;static get DEFAULT_MESSAGES(){return[new F("GENERIC_ERROR")]}set errorCode(t){this._errorCode=t}get errorCode(){return this._errorCode}get status(){return this._status}set timestamp(t){this._timestamp=t}get timestamp(){return this._timestamp}_timestamp=Date.now();constructor(t=r.DEFAULT_MESSAGES,e="GENERIC_ERROR",o=500,s){super(t,s),this._errorCode=e,this._status=o}static create({messages:t=r.DEFAULT_MESSAGES,...e}={}){return new r(F.sanitizeMessages(t),e.errorCode,e.status,e.data)}static fromPlain(t){let e=bs(As,t,{excludePrefixes:["_"]}),o=new r;return Object.getOwnPropertyNames(e).forEach(s=>{s in o&&(o[s]=e[s])}),o}};He([qe(),Ft("design:type",Object),Ft("design:paramtypes",[])],k.prototype,"errorCode",null);He([qe(),Ft("design:type",Number),Ft("design:paramtypes",[])],k.prototype,"timestamp",null);var As=class extends k{static{n(this,"SmpErrorResponseMutable")}set errorCode(t){this._errorCode=t}set status(t){this._status=t}set timestamp(t){this._timestamp=t}};var L=class{static{n(this,"Hex")}static parse(t){let e=t.length,o=[];for(let s=0;s<e;s+=2)o[s>>>3]|=parseInt(t.substr(s,2),16)<<24-s%8*4;return new _(o,e/2)}static stringify(t){let e=[];for(let o=0;o<t.sigBytes;o++){let s=t.words[o>>>2]>>>24-o%4*8&255;e.push((s>>>4).toString(16)),e.push((s&15).toString(16))}return e.join("")}};var _=class fe{static{n(this,"WordArray")}constructor(t,e){this.words=t||[],e!==void 0?this.sigBytes=e:this.sigBytes=this.words.length*4}static random(t){let e=[],o=n(function(s){let i=987654321,a=4294967295;return function(){i=36969*(i&65535)+(i>>16)&a,s=18e3*(s&65535)+(s>>16)&a;let c=(i<<16)+s&a;return c/=4294967296,c+=.5,c*(Math.random()>.5?1:-1)}},"r");for(let s=0,i;s<t;s+=4){let a=o((i||Math.random())*4294967296);i=a()*987654071,e.push(a()*4294967296|0)}return new fe(e,t)}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new fe(this.words.slice(0),this.sigBytes)}concat(t){if(this.clamp(),this.sigBytes%4)for(let e=0;e<t.sigBytes;e++){let o=t.words[e>>>2]>>>24-e%4*8&255;this.words[this.sigBytes+e>>>2]|=o<<24-(this.sigBytes+e)%4*8}else for(let e=0;e<t.sigBytes;e+=4)this.words[this.sigBytes+e>>>2]=t.words[e>>>2];return this.sigBytes+=t.sigBytes,this}toString(t){return(t||L).stringify(this)}};var Lt=class{static{n(this,"Latin1")}static parse(t){let e=t.length,o=[];for(let s=0;s<e;s++)o[s>>>2]|=(t.charCodeAt(s)&255)<<24-s%4*8;return new _(o,e)}static stringify(t){let e=[];for(let o=0;o<t.sigBytes;o++){let s=t.words[o>>>2]>>>24-o%4*8&255;e.push(String.fromCharCode(s))}return e.join("")}};var I=class{static{n(this,"Utf8")}static parse(t){return Lt.parse(unescape(encodeURIComponent(t)))}static stringify(t){try{return decodeURIComponent(escape(Lt.stringify(t)))}catch(e){throw console.error("Malformed UTF-8 data",e),new Error("Malformed UTF-8 data")}}};var zt=class{static{n(this,"BufferedBlockAlgorithm")}constructor(t){this._minBufferSize=0,this.cfg=Object.assign({blockSize:1},t),this._data=new _,this._nDataBytes=0}clone(){let t=this.constructor();for(let e in this)Object.prototype.hasOwnProperty.call(this,e)&&(t[e]=this[e]);return t._data=this._data.clone(),t}reset(){this._data=new _,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=I.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_process(t){if(!this.cfg.blockSize)throw new Error("missing blockSize in config");let e=this.cfg.blockSize*4,o=this._data.sigBytes/e;t?o=Math.ceil(o):o=Math.max((o|0)-this._minBufferSize,0);let s=o*this.cfg.blockSize,i=Math.min(s*4,this._data.sigBytes),a;if(s){for(let c=0;c<s;c+=this.cfg.blockSize)this._doProcessBlock(this._data.words,c);a=this._data.words.splice(0,s),this._data.sigBytes-=i}return new _(a,i)}};var dt=class{static{n(this,"CipherParams")}constructor(t){this.ciphertext=t.ciphertext,this.key=t.key,this.iv=t.iv,this.salt=t.salt,this.algorithm=t.algorithm,this.mode=t.mode,this.padding=t.padding,this.blockSize=t.blockSize,this.formatter=t.formatter}extend(t){return t.ciphertext!==void 0&&(this.ciphertext=t.ciphertext),t.key!==void 0&&(this.key=t.key),t.iv!==void 0&&(this.iv=t.iv),t.salt!==void 0&&(this.salt=t.salt),t.algorithm!==void 0&&(this.algorithm=t.algorithm),t.mode!==void 0&&(this.mode=t.mode),t.padding!==void 0&&(this.padding=t.padding),t.blockSize!==void 0&&(this.blockSize=t.blockSize),t.formatter!==void 0&&(this.formatter=t.formatter),this}toString(t){if(t)return t.stringify(this);if(this.formatter)return this.formatter.stringify(this);throw new Error("cipher needs a formatter to be able to convert the result into a string")}};var $=class{static{n(this,"Base64")}static parse(t){let e=t.length;if(this._reverseMap===void 0){this._reverseMap=[];for(let s=0;s<this._map.length;s++)this._reverseMap[this._map.charCodeAt(s)]=s}let o=this._map.charAt(64);if(o){let s=t.indexOf(o);s!==-1&&(e=s)}return this.parseLoop(t,e,this._reverseMap)}static parseLoop(t,e,o){let s=[],i=0;for(let a=0;a<e;a++)if(a%4){let c=o[t.charCodeAt(a-1)]<<a%4*2,h=o[t.charCodeAt(a)]>>>6-a%4*2;s[i>>>2]|=(c|h)<<24-i%4*8,i++}return new _(s,i)}static stringify(t){t.clamp();let e=[];for(let s=0;s<t.sigBytes;s+=3){let i=t.words[s>>>2]>>>24-s%4*8&255,a=t.words[s+1>>>2]>>>24-(s+1)%4*8&255,c=t.words[s+2>>>2]>>>24-(s+2)%4*8&255,h=i<<16|a<<8|c;for(let f=0;f<4&&s+f*.75<t.sigBytes;f++)e.push(this._map.charAt(h>>>6*(3-f)&63))}let o=this._map.charAt(64);if(o)for(;e.length%4;)e.push(o);return e.join("")}};$._map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";$._reverseMap=void 0;var Ut=class{static{n(this,"OpenSSL")}static parse(t){let e=$.parse(t),o;return e.words[0]===1398893684&&e.words[1]===1701076831&&(o=new _(e.words.slice(2,4)),e.words.splice(0,4),e.sigBytes-=16),new dt({ciphertext:e,salt:o})}static stringify(t){if(!t.ciphertext)throw new Error("missing ciphertext in params");let e=t.ciphertext,o=t.salt,s;if(o){if(typeof o=="string")throw new Error("salt is expected to be a WordArray");s=new _([1398893684,1701076831]).concat(o).concat(e)}else s=e;return s.toString($)}};var et=class{static{n(this,"SerializableCipher")}static decrypt(t,e,o,s){let i=Object.assign({},this.cfg,s);if(!i.format)throw new Error("could not determine format");if(e=this._parse(e,i.format),!e.ciphertext)throw new Error("could not determine ciphertext");return t.createDecryptor(o,i).finalize(e.ciphertext)}static encrypt(t,e,o,s){let i=Object.assign({},this.cfg,s),a=t.createEncryptor(o,i),c=a.finalize(e);return new dt({ciphertext:c,key:o,iv:a.cfg.iv,algorithm:t,mode:a.cfg.mode,padding:a.cfg.padding,blockSize:a.cfg.blockSize,formatter:i.format})}static _parse(t,e){return typeof t=="string"?e.parse(t):t}};et.cfg={blockSize:4,iv:new _([]),format:Ut};var C=class extends zt{static{n(this,"Hasher")}constructor(t){super(Object.assign({blockSize:512/32},t)),this.reset()}static _createHelper(t){function e(o,s){return new t(s).finalize(o)}return n(e,"helper"),e}finalize(t){return t&&this._append(t),this._doFinalize()}update(t){return this._append(t),this._process(),this}};var p=[];for(let r=0;r<64;r++)p[r]=Math.abs(Math.sin(r+1))*4294967296|0;var K=class d extends C{static{n(this,"MD5")}get hash(){return this._hash}static FF(t,e,o,s,i,a,c){let h=t+(e&o|~e&s)+i+c;return(h<<a|h>>>32-a)+e}static GG(t,e,o,s,i,a,c){let h=t+(e&s|o&~s)+i+c;return(h<<a|h>>>32-a)+e}static HH(t,e,o,s,i,a,c){let h=t+(e^o^s)+i+c;return(h<<a|h>>>32-a)+e}static II(t,e,o,s,i,a,c){let h=t+(o^(e|~s))+i+c;return(h<<a|h>>>32-a)+e}reset(){super.reset(),this._hash=new _([1732584193,4023233417,2562383102,271733878])}_doFinalize(){let t=this._nDataBytes*8,e=this._data.sigBytes*8;this._data.words[e>>>5]|=128<<24-e%32;let o=Math.floor(t/4294967296),s=t;this._data.words[(e+64>>>9<<4)+15]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,this._data.words[(e+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,this._data.sigBytes=(this._data.words.length+1)*4,this._process();for(let i=0;i<4;i++)this._hash.words[i]=(this._hash.words[i]<<8|this._hash.words[i]>>>24)&16711935|(this._hash.words[i]<<24|this._hash.words[i]>>>8)&4278255360;return this._hash}_doProcessBlock(t,e){for(let h=0;h<16;h++){let f=e+h,g=t[f];t[f]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}let o=Array.from({length:16});for(let h=0;h<16;h++)o[h]=t[e+h];let s=this._hash.words[0],i=this._hash.words[1],a=this._hash.words[2],c=this._hash.words[3];s=d.FF(s,i,a,c,o[0],7,p[0]),c=d.FF(c,s,i,a,o[1],12,p[1]),a=d.FF(a,c,s,i,o[2],17,p[2]),i=d.FF(i,a,c,s,o[3],22,p[3]),s=d.FF(s,i,a,c,o[4],7,p[4]),c=d.FF(c,s,i,a,o[5],12,p[5]),a=d.FF(a,c,s,i,o[6],17,p[6]),i=d.FF(i,a,c,s,o[7],22,p[7]),s=d.FF(s,i,a,c,o[8],7,p[8]),c=d.FF(c,s,i,a,o[9],12,p[9]),a=d.FF(a,c,s,i,o[10],17,p[10]),i=d.FF(i,a,c,s,o[11],22,p[11]),s=d.FF(s,i,a,c,o[12],7,p[12]),c=d.FF(c,s,i,a,o[13],12,p[13]),a=d.FF(a,c,s,i,o[14],17,p[14]),i=d.FF(i,a,c,s,o[15],22,p[15]),s=d.GG(s,i,a,c,o[1],5,p[16]),c=d.GG(c,s,i,a,o[6],9,p[17]),a=d.GG(a,c,s,i,o[11],14,p[18]),i=d.GG(i,a,c,s,o[0],20,p[19]),s=d.GG(s,i,a,c,o[5],5,p[20]),c=d.GG(c,s,i,a,o[10],9,p[21]),a=d.GG(a,c,s,i,o[15],14,p[22]),i=d.GG(i,a,c,s,o[4],20,p[23]),s=d.GG(s,i,a,c,o[9],5,p[24]),c=d.GG(c,s,i,a,o[14],9,p[25]),a=d.GG(a,c,s,i,o[3],14,p[26]),i=d.GG(i,a,c,s,o[8],20,p[27]),s=d.GG(s,i,a,c,o[13],5,p[28]),c=d.GG(c,s,i,a,o[2],9,p[29]),a=d.GG(a,c,s,i,o[7],14,p[30]),i=d.GG(i,a,c,s,o[12],20,p[31]),s=d.HH(s,i,a,c,o[5],4,p[32]),c=d.HH(c,s,i,a,o[8],11,p[33]),a=d.HH(a,c,s,i,o[11],16,p[34]),i=d.HH(i,a,c,s,o[14],23,p[35]),s=d.HH(s,i,a,c,o[1],4,p[36]),c=d.HH(c,s,i,a,o[4],11,p[37]),a=d.HH(a,c,s,i,o[7],16,p[38]),i=d.HH(i,a,c,s,o[10],23,p[39]),s=d.HH(s,i,a,c,o[13],4,p[40]),c=d.HH(c,s,i,a,o[0],11,p[41]),a=d.HH(a,c,s,i,o[3],16,p[42]),i=d.HH(i,a,c,s,o[6],23,p[43]),s=d.HH(s,i,a,c,o[9],4,p[44]),c=d.HH(c,s,i,a,o[12],11,p[45]),a=d.HH(a,c,s,i,o[15],16,p[46]),i=d.HH(i,a,c,s,o[2],23,p[47]),s=d.II(s,i,a,c,o[0],6,p[48]),c=d.II(c,s,i,a,o[7],10,p[49]),a=d.II(a,c,s,i,o[14],15,p[50]),i=d.II(i,a,c,s,o[5],21,p[51]),s=d.II(s,i,a,c,o[12],6,p[52]),c=d.II(c,s,i,a,o[3],10,p[53]),a=d.II(a,c,s,i,o[10],15,p[54]),i=d.II(i,a,c,s,o[1],21,p[55]),s=d.II(s,i,a,c,o[8],6,p[56]),c=d.II(c,s,i,a,o[15],10,p[57]),a=d.II(a,c,s,i,o[6],15,p[58]),i=d.II(i,a,c,s,o[13],21,p[59]),s=d.II(s,i,a,c,o[4],6,p[60]),c=d.II(c,s,i,a,o[11],10,p[61]),a=d.II(a,c,s,i,o[2],15,p[62]),i=d.II(i,a,c,s,o[9],21,p[63]),this._hash.words[0]=this._hash.words[0]+s|0,this._hash.words[1]=this._hash.words[1]+i|0,this._hash.words[2]=this._hash.words[2]+a|0,this._hash.words[3]=this._hash.words[3]+c|0}};var pe=class Ve{static{n(this,"EVPKDF")}constructor(t){this.cfg=Object.assign({keySize:128/32,hasher:K,iterations:1},t)}static execute(t,e,o){return new Ve(o).compute(t,e)}compute(t,e){let o=new this.cfg.hasher,s=new _,i;for(;s.words.length<this.cfg.keySize;){i&&o.update(i),i=o.update(t).finalize(e),o.reset();for(let a=1;a<this.cfg.iterations;a++)i=o.finalize(i),o.reset();s.concat(i)}return s.sigBytes=this.cfg.keySize*4,s}};var Xe=class{static{n(this,"OpenSSLKdf")}static execute(t,e,o,s){s||(s=_.random(64/8));let i=new pe({keySize:e+o}).compute(t,s),a=new _(i.words.slice(e),o*4);return i.sigBytes=e*4,new dt({key:i,iv:a,salt:s})}};var kt=class{static{n(this,"PasswordBasedCipher")}static decrypt(t,e,o,s){let i=Object.assign({},this.cfg,s);if(i.format===void 0)throw new Error("missing format in config");if(e=this._parse(e,i.format),i.kdf===void 0)throw new Error("the key derivation function must be set");let a=i.kdf.execute(o,t.keySize,t.ivSize,e.salt);return a.iv!==void 0&&(i.iv=a.iv),et.decrypt.call(this,t,e,a.key,i)}static encrypt(t,e,o,s){let i=Object.assign({},this.cfg,s);if(i.kdf===void 0)throw new Error("missing kdf in config");let a=i.kdf.execute(o,t.keySize,t.ivSize);return a.iv!==void 0&&(i.iv=a.iv),et.encrypt.call(this,t,e,a.key,i).extend(a)}static _parse(t,e){return typeof t=="string"?e.parse(t):t}};kt.cfg={blockSize:4,iv:new _([]),format:Ut,kdf:Xe};var Ze=class{static{n(this,"CipherHelper")}constructor(t){this._cipher=t}decrypt(t,e,o){return typeof e=="string"?kt.decrypt(this._cipher,t,e,o):et.decrypt(this._cipher,t,e,o)}encrypt(t,e,o){return typeof e=="string"?kt.encrypt(this._cipher,t,e,o):et.encrypt(this._cipher,t,e,o)}};var ut=class extends zt{static{n(this,"Cipher")}constructor(t,e,o){super(Object.assign({blockSize:1},o)),this._xformMode=t,this._key=e,this.reset()}static _createHelper(t){return new Ze(t)}static createDecryptor(t,e){let o=this;return new o(this._DEC_XFORM_MODE,t,e)}static createEncryptor(t,e){return new this(this._ENC_XFORM_MODE,t,e)}finalize(t){return t&&this._append(t),this._doFinalize()}process(t){return this._append(t),this._process()}};ut.ivSize=4;ut.keySize=4;ut._DEC_XFORM_MODE=2;ut._ENC_XFORM_MODE=1;var rt=class{static{n(this,"BlockCipherModeAlgorithm")}constructor(t,e){this.init(t,e)}init(t,e){this._cipher=t,this._iv=e}};var $t=class{static{n(this,"BlockCipherMode")}static createDecryptor(t,e){let o=this.Decryptor;return new o(t,e)}static createEncryptor(t,e){let o=this.Encryptor;return new o(t,e)}};$t.Decryptor=rt;$t.Encryptor=rt;var Je=class extends rt{static{n(this,"CBCEncryptor")}get prevBlock(){return this._prevBlock}processBlock(t,e){if(this._cipher.cfg.blockSize===void 0)throw new Error("missing blockSize in cipher config");this.xorBlock(t,e,this._cipher.cfg.blockSize),this._cipher.encryptBlock(t,e),this._prevBlock=t.slice(e,e+this._cipher.cfg.blockSize)}xorBlock(t,e,o){let s;this._iv?(s=this._iv,this._iv=void 0):s=this._prevBlock;for(let i=0;i<o;i++)t[e+i]^=s[i]}};var Ye=class extends rt{static{n(this,"CBCDecryptor")}get prevBlock(){return this._prevBlock}processBlock(t,e){if(this._cipher.cfg.blockSize===void 0)throw new Error("missing blockSize in cipher config");let o=t.slice(e,e+this._cipher.cfg.blockSize);this._cipher.decryptBlock(t,e),this.xorBlock(t,e,this._cipher.cfg.blockSize),this._prevBlock=o}xorBlock(t,e,o){let s;this._iv?(s=this._iv,this._iv=void 0):s=this._prevBlock;for(let i=0;i<o;i++)t[e+i]^=s[i]}};var z=class extends $t{static{n(this,"CBC")}};z.Decryptor=Ye;z.Encryptor=Je;var X=class{static{n(this,"PKCS7")}static pad(t,e){let o=e*4,s=o-t.sigBytes%o,i=s<<24|s<<16|s<<8|s,a=[];for(let h=0;h<s;h+=4)a.push(i);let c=new _(a,s);t.concat(c)}static unpad(t){let e=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=e}};var Kt=class extends ut{static{n(this,"BlockCipher")}constructor(t,e,o){super(t,e,Object.assign({blockSize:4,mode:z,padding:X},o))}reset(){if(super.reset(),this.cfg.mode===void 0)throw new Error("missing mode in config");let t;this._xformMode===this.constructor._ENC_XFORM_MODE?t=this.cfg.mode.createEncryptor:(t=this.cfg.mode.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator===t?this._mode.init(this,this.cfg.iv&&this.cfg.iv.words):(this._mode=t.call(this.cfg.mode,this,this.cfg.iv&&this.cfg.iv.words),this._mode.__creator=t)}_doFinalize(){if(this.cfg.padding===void 0)throw new Error("missing padding in config");let t;if(this._xformMode===this.constructor._ENC_XFORM_MODE){if(this.cfg.blockSize===void 0)throw new Error("missing blockSize in config");this.cfg.padding.pad(this._data,this.cfg.blockSize),t=this._process(!0)}else t=this._process(!0),this.cfg.padding.unpad(t);return t}_doProcessBlock(t,e){this._mode.processBlock(t,e)}};var l=class U{static{n(this,"X64Word")}constructor(t,e){this.high=t,this.low=e}add(t){let e=this.low+t.low|0,o=e>>>0<this.low>>>0?1:0,s=this.high+t.high+o|0;return new U(s,e)}and(t){return new U(this.high&t.high,this.low&t.low)}not(){return new U(~this.high,~this.low)}or(t){return new U(this.high|t.high,this.low|t.low)}rotL(t){return this.shiftL(t).or(this.shiftR(64-t))}rotR(t){return this.shiftR(t).or(this.shiftL(64-t))}shiftL(t){return t<32?new U(this.high<<t|this.low>>>32-t,this.low<<t):new U(this.low<<t-32,0)}shiftR(t){return t<32?new U(this.high>>>t,this.low>>>t|this.high<<32-t):new U(0,this.high>>>t-32)}xor(t){return new U(this.high^t.high,this.low^t.low)}};var Qe=class de{static{n(this,"X64WordArray")}constructor(t=[],e){this.words=t,this.sigBytes=e!==void 0?e:t.length*8}static create(t=[],e){return new de(t,e)}clone(){let t=this.words.map(e=>new l(e.high,e.low));return new de(t,this.sigBytes)}toX32(){let t=[];for(let e of this.words)t.push(e.high,e.low);return new _(t,this.sigBytes)}};var P=[],tr=[],er=[],rr=[],or=[],sr=[],ue=[],me=[],ge=[],_e=[];(function(){let r=[];for(let o=0;o<256;o++)o<128?r[o]=o<<1:r[o]=o<<1^283;let t=0,e=0;for(let o=0;o<256;o++){let s=e^e<<1^e<<2^e<<3^e<<4;s=s>>>8^s&255^99,P[t]=s,tr[s]=t;let i=r[t],a=r[i],c=r[a],h=r[s]*257^s*16843008;er[t]=h<<24|h>>>8,rr[t]=h<<16|h>>>16,or[t]=h<<8|h>>>24,sr[t]=h,h=c*16843009^a*65537^i*257^t*16843008,ue[s]=h<<24|h>>>8,me[s]=h<<16|h>>>16,ge[s]=h<<8|h>>>24,_e[s]=h,t?(t=i^r[r[r[c^i]]],e^=r[r[e]]):t=e=1}})();var vs=[0,1,2,4,8,16,32,64,128,27,54],Gt=class extends Kt{static{n(this,"AES")}constructor(t,e,o){super(t,e,o),super.reset()}decryptBlock(t,e){let o=t[e+1];t[e+1]=t[e+3],t[e+3]=o,this._doCryptBlock(t,e,this._invKeySchedule,ue,me,ge,_e,tr),o=t[e+1],t[e+1]=t[e+3],t[e+3]=o}encryptBlock(t,e){this._doCryptBlock(t,e,this._keySchedule,er,rr,or,sr,P)}reset(){if(super.reset(),this._nRounds&&this._keyPriorReset===this._key)return;let t=this._keyPriorReset=this._key,e=t.words,o=t.sigBytes/4,i=((this._nRounds=o+6)+1)*4,a=this._keySchedule=[];for(let c=0;c<i;c++)if(c<o)a[c]=e[c];else{let h=a[c-1];c%o?o>6&&c%o===4&&(h=P[h>>>24]<<24|P[h>>>16&255]<<16|P[h>>>8&255]<<8|P[h&255]):(h=h<<8|h>>>24,h=P[h>>>24]<<24|P[h>>>16&255]<<16|P[h>>>8&255]<<8|P[h&255],h^=vs[c/o|0]<<24),a[c]=a[c-o]^h}this._invKeySchedule=[];for(let c=0;c<i;c++){let h=i-c,f;c%4?f=a[h]:f=a[h-4],c<4||h<=4?this._invKeySchedule[c]=f:this._invKeySchedule[c]=ue[P[f>>>24]]^me[P[f>>>16&255]]^ge[P[f>>>8&255]]^_e[P[f&255]]}}_doCryptBlock(t,e,o,s,i,a,c,h){let f=t[e]^o[0],g=t[e+1]^o[1],u=t[e+2]^o[2],m=t[e+3]^o[3],w=4;for(let E=1;E<this._nRounds;E++){let x=s[f>>>24]^i[g>>>16&255]^a[u>>>8&255]^c[m&255]^o[w++],b=s[g>>>24]^i[u>>>16&255]^a[m>>>8&255]^c[f&255]^o[w++],T=s[u>>>24]^i[m>>>16&255]^a[f>>>8&255]^c[g&255]^o[w++],le=s[m>>>24]^i[f>>>16&255]^a[g>>>8&255]^c[u&255]^o[w++];f=x,g=b,u=T,m=le}let y=(h[f>>>24]<<24|h[g>>>16&255]<<16|h[u>>>8&255]<<8|h[m&255])^o[w++],v=(h[g>>>24]<<24|h[u>>>16&255]<<16|h[m>>>8&255]<<8|h[f&255])^o[w++],R=(h[u>>>24]<<24|h[m>>>16&255]<<16|h[f>>>8&255]<<8|h[g&255])^o[w++],O=(h[m>>>24]<<24|h[f>>>16&255]<<16|h[g>>>8&255]<<8|h[u&255])^o[w++];t[e]=y,t[e+1]=v,t[e+2]=R,t[e+3]=O}};Gt.keySize=256/32;var Es=[1732584193,4023233417,2562383102,271733878,3285377520],ot=new Array(80),st=class extends C{static{n(this,"SHA1")}get hash(){return this._hash}reset(){super.reset(),this._hash=new _(Es.slice(0))}_doFinalize(){let t=this._nDataBytes*8,e=this._data.sigBytes*8;return this._data.words[e>>>5]|=128<<24-e%32,this._data.words[(e+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(e+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(t,e){let o=this._hash.words[0],s=this._hash.words[1],i=this._hash.words[2],a=this._hash.words[3],c=this._hash.words[4];for(let h=0;h<80;h++){if(h<16)ot[h]=t[e+h]|0;else{let m=ot[h-3]^ot[h-8]^ot[h-14]^ot[h-16];ot[h]=m<<1|m>>>31}let f,g;h<20?(f=s&i|~s&a,g=1518500249):h<40?(f=s^i^a,g=1859775393):h<60?(f=s&i|s&a|i&a,g=2400959708):(f=s^i^a,g=3395469782);let u=(o<<5|o>>>27)+f+c+g+ot[h];c=a,a=i,i=s<<30|s>>>2,s=o,o=u|0}this._hash.words[0]=this._hash.words[0]+o|0,this._hash.words[1]=this._hash.words[1]+s|0,this._hash.words[2]=this._hash.words[2]+i|0,this._hash.words[3]=this._hash.words[3]+a|0,this._hash.words[4]=this._hash.words[4]+c|0}};var ir=[],nr=[];(function(){function r(s){let i=Math.sqrt(s);for(let a=2;a<=i;a++)if(!(s%a))return!1;return!0}n(r,"isPrime");function t(s){return(s-(s|0))*4294967296|0}n(t,"getFractionalBits");let e=2,o=0;for(;o<64;)r(e)&&(o<8&&(ir[o]=t(Math.pow(e,1/2))),nr[o]=t(Math.pow(e,1/3)),o++),e++})();var it=[],nt=class extends C{static{n(this,"SHA256")}constructor(){super()}reset(){super.reset(),this._hash=new _(ir.slice(0))}_doFinalize(){let t=this._nDataBytes*8,e=this._data.sigBytes*8;return this._data.words[e>>>5]|=128<<24-e%32,this._data.words[(e+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(e+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(t,e){let o=this._hash.words[0],s=this._hash.words[1],i=this._hash.words[2],a=this._hash.words[3],c=this._hash.words[4],h=this._hash.words[5],f=this._hash.words[6],g=this._hash.words[7];for(let u=0;u<64;u++){if(u<16)it[u]=t[e+u]|0;else{let E=it[u-15],x=(E<<25|E>>>7)^(E<<14|E>>>18)^E>>>3,b=it[u-2],T=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;it[u]=x+it[u-7]+T+it[u-16]}let m=c&h^~c&f,w=o&s^o&i^s&i,y=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),v=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),R=g+v+m+nr[u]+it[u],O=y+w;g=f,f=h,h=c,c=a+R|0,a=i,i=s,s=o,o=R+O|0}this._hash.words[0]=this._hash.words[0]+o|0,this._hash.words[1]=this._hash.words[1]+s|0,this._hash.words[2]=this._hash.words[2]+i|0,this._hash.words[3]=this._hash.words[3]+a|0,this._hash.words[4]=this._hash.words[4]+c|0,this._hash.words[5]=this._hash.words[5]+h|0,this._hash.words[6]=this._hash.words[6]+f|0,this._hash.words[7]=this._hash.words[7]+g|0}};var we=[new l(1116352408,3609767458),new l(1899447441,602891725),new l(3049323471,3964484399),new l(3921009573,2173295548),new l(961987163,4081628472),new l(1508970993,3053834265),new l(2453635748,2937671579),new l(2870763221,3664609560),new l(3624381080,2734883394),new l(310598401,1164996542),new l(607225278,1323610764),new l(1426881987,3590304994),new l(1925078388,4068182383),new l(2162078206,991336113),new l(2614888103,633803317),new l(3248222580,3479774868),new l(3835390401,2666613458),new l(4022224774,944711139),new l(264347078,2341262773),new l(604807628,2007800933),new l(770255983,1495990901),new l(1249150122,1856431235),new l(1555081692,3175218132),new l(1996064986,2198950837),new l(2554220882,3999719339),new l(2821834349,766784016),new l(2952996808,2566594879),new l(3210313671,3203337956),new l(3336571891,1034457026),new l(3584528711,2466948901),new l(113926993,3758326383),new l(338241895,168717936),new l(666307205,1188179964),new l(773529912,1546045734),new l(1294757372,1522805485),new l(1396182291,2643833823),new l(1695183700,2343527390),new l(1986661051,1014477480),new l(2177026350,1206759142),new l(2456956037,344077627),new l(2730485921,1290863460),new l(2820302411,3158454273),new l(3259730800,3505952657),new l(3345764771,106217008),new l(3516065817,3606008344),new l(3600352804,1432725776),new l(4094571909,1467031594),new l(275423344,851169720),new l(430227734,3100823752),new l(506948616,1363258195),new l(659060556,3750685593),new l(883997877,3785050280),new l(958139571,3318307427),new l(1322822218,3812723403),new l(1537002063,2003034995),new l(1747873779,3602036899),new l(1955562222,1575990012),new l(2024104815,1125592928),new l(2227730452,2716904306),new l(2361852424,442776044),new l(2428436474,593698344),new l(2756734187,3733110249),new l(3204031479,2999351573),new l(3329325298,3815920427),new l(3391569614,3928383900),new l(3515267271,566280711),new l(3940187606,3454069534),new l(4118630271,4000239992),new l(116418474,1914138554),new l(174292421,2731055270),new l(289380356,3203993006),new l(460393269,320620315),new l(685471733,587496836),new l(852142971,1086792851),new l(1017036298,365543100),new l(1126000580,2618297676),new l(1288033470,3409855158),new l(1501505948,4234509866),new l(1607167915,987167468),new l(1816402316,1246189591)],D=[];(function(){for(let r=0;r<80;r++)D[r]=new l(void 0,void 0)})();var ye=class extends C{static{n(this,"SHA512")}constructor(){super({blockSize:1024/32})}reset(){super.reset(),this._hash=new Qe([new l(1779033703,4089235720),new l(3144134277,2227873595),new l(1013904242,4271175723),new l(2773480762,1595750129),new l(1359893119,2917565137),new l(2600822924,725511199),new l(528734635,4215389547),new l(1541459225,327033209)])}_doFinalize(){let t=this._data,e=t.words,o=this._nDataBytes*8,s=t.sigBytes*8;return e[s>>>5]|=128<<24-s%32,e[(s+128>>>10<<5)+30]=Math.floor(o/4294967296),e[(s+128>>>10<<5)+31]=o,t.sigBytes=e.length*4,this._process(),this._hash.toX32()}_doProcessBlock(t,e){let o=this._hash.words[0].high,s=this._hash.words[0].low,i=this._hash.words[1].high,a=this._hash.words[1].low,c=this._hash.words[2].high,h=this._hash.words[2].low,f=this._hash.words[3].high,g=this._hash.words[3].low,u=this._hash.words[4].high,m=this._hash.words[4].low,w=this._hash.words[5].high,y=this._hash.words[5].low,v=this._hash.words[6].high,R=this._hash.words[6].low,O=this._hash.words[7].high,E=this._hash.words[7].low;for(let x=0;x<80;x++){let b,T;if(x<16)T=D[x].high=t[e+x*2]|0,b=D[x].low=t[e+x*2+1]|0;else{let Ne=D[x-15],ht=Ne.high,Et=Ne.low,us=(ht>>>1|Et<<31)^(ht>>>8|Et<<24)^ht>>>7,Fe=(Et>>>1|ht<<31)^(Et>>>8|ht<<24)^(Et>>>7|ht<<25),Le=D[x-2],lt=Le.high,Rt=Le.low,ms=(lt>>>19|Rt<<13)^(lt<<3|Rt>>>29)^lt>>>6,ze=(Rt>>>19|lt<<13)^(Rt<<3|lt>>>29)^(Rt>>>6|lt<<26);b=Fe+D[x-7].low,T=us+D[x-7].high+(b>>>0<Fe>>>0?1:0),b=b+ze,T=T+ms+(b>>>0<ze>>>0?1:0),b=b+D[x-16].low,T=T+D[x-16].high+(b>>>0<D[x-16].low>>>0?1:0),D[x].high=T,D[x].low=b}let le=u&w^~u&v,je=m&y^~m&R,cs=o&i^o&c^i&c,hs=s&a^s&h^a&h,ls=(o>>>28|s<<4)^(o<<30|s>>>2)^(o<<25|s>>>7),Me=(s>>>28|o<<4)^(s<<30|o>>>2)^(s<<25|o>>>7),fs=(u>>>14|m<<18)^(u>>>18|m<<14)^(u<<23|m>>>9),ps=(m>>>14|u<<18)^(m>>>18|u<<14)^(m<<23|u>>>9),j=E+ps,V=O+fs+(j>>>0<E>>>0?1:0);j=j+je,V=V+le+(j>>>0<je>>>0?1:0),j=j+we[x].low,V=V+we[x].high+(j>>>0<we[x].low>>>0?1:0),j=j+b,V=V+T+(j>>>0<b>>>0?1:0);let De=Me+hs,ds=ls+cs+(De>>>0<Me>>>0?1:0);O=v,E=R,v=w,R=y,w=u,y=m,m=g+j|0,u=f+V+(m>>>0<g>>>0?1:0)|0,f=c,g=h,c=i,h=a,i=o,a=s,s=j+De|0,o=V+ds+(s>>>0<j>>>0?1:0)|0}this._hash.words[0].low=this._hash.words[0].low=this._hash.words[0].low+s,this._hash.words[0].high=this._hash.words[0].high+o+(this._hash.words[0].low>>>0<s>>>0?1:0),this._hash.words[1].low=this._hash.words[1].low=this._hash.words[1].low+a,this._hash.words[1].high=this._hash.words[1].high+i+(this._hash.words[1].low>>>0<a>>>0?1:0),this._hash.words[2].low=this._hash.words[2].low=this._hash.words[2].low+h,this._hash.words[2].high=this._hash.words[2].high+c+(this._hash.words[2].low>>>0<h>>>0?1:0),this._hash.words[3].low=this._hash.words[3].low=this._hash.words[3].low+g,this._hash.words[3].high=this._hash.words[3].high+f+(this._hash.words[3].low>>>0<g>>>0?1:0),this._hash.words[4].low=this._hash.words[4].low=this._hash.words[4].low+m,this._hash.words[4].high=this._hash.words[4].high+u+(this._hash.words[4].low>>>0<m>>>0?1:0),this._hash.words[5].low=this._hash.words[5].low=this._hash.words[5].low+y,this._hash.words[5].high=this._hash.words[5].high+w+(this._hash.words[5].low>>>0<y>>>0?1:0),this._hash.words[6].low=this._hash.words[6].low=this._hash.words[6].low+R,this._hash.words[6].high=this._hash.words[6].high+v+(this._hash.words[6].low>>>0<R>>>0?1:0),this._hash.words[7].low=this._hash.words[7].low=this._hash.words[7].low+E,this._hash.words[7].high=this._hash.words[7].high+O+(this._hash.words[7].low>>>0<E>>>0?1:0)}};var ar=class{static{n(this,"HMAC")}constructor(t,e){this._hasher=new t;let o=typeof e=="string"?I.parse(e):e,s=this._hasher.cfg.blockSize,i=s*4;o.sigBytes>i&&(o=this._hasher.finalize(o)),o.clamp();let a=this._oKey=o.clone(),c=this._iKey=o.clone(),h=a.words,f=c.words;for(let g=0;g<s;g++)h[g]^=1549556828,f[g]^=909522486;a.sigBytes=c.sigBytes=i,this.reset()}finalize(t){let e=this._hasher.finalize(t);return this._hasher.reset(),this._hasher.finalize(this._oKey.clone().concat(e))}reset(){this._hasher.reset(),this._hasher.update(this._iKey)}update(t){return this._hasher.update(t),this}};var Bt=class cr{static{n(this,"PBKDF2")}constructor(t){this.cfg=Object.assign({keySize:128/32,hasher:nt,iterations:25e4},t)}static execute(t,e,o){return new cr(o).compute(t,e)}compute(t,e){let o=this.cfg,s=new ar(o.hasher,t),i=new _,a=new _([1]),c=i.words,h=a.words,f=o.keySize,g=o.iterations;for(;c.length<f;){let u=s.update(e).finalize(a);s.reset();let m=u.words,w=m.length,y=u;for(let v=1;v<g;v++){y=s.finalize(y),s.reset();let R=y.words;for(let O=0;O<w;O++)m[O]^=R[O]}i.concat(u),h[0]++}return i.sigBytes=f*4,i}};var Z=Kt._createHelper(Gt);var St=n(function(){let r=Date.now().toString(36),t=globalThis.crypto;if(t?.getRandomValues){let e=new Uint8Array(8);t.getRandomValues(e);let o="";for(let s=0;s<e.length;s++){let i=e[s].toString(16);o+=i.length===1?"0"+i:i}return r+"-"+o}return r+"-"+Math.random().toString(36).slice(2,10)},"correlationIdHelper");var mt=C._createHelper(K);var gt=C._createHelper(st);var Wt=C._createHelper(nt);var Ht=C._createHelper(ye);var _t=class{static{n(this,"SmpCrypto")}static base64Decode(t){return I.stringify($.parse(t))}static base64Encode(t){return $.stringify(I.parse(t))}static generateCorrelationId(){return St()}static md5(t){return mt(t).toString()}static sha1(t){return gt(t).toString()}static sha256(t){return Wt(t).toString()}static sha512(t){return Ht(t).toString()}};var qt=class extends pt{static{n(this,"SmpInMemoryCache")}static _storage=new Map;get _staticSelf(){return this.constructor}_flushRaw(){this._staticSelf._storage.clear()}_readRaw(t){return this._staticSelf._storage.get(t)}_removeRaw(t){this._staticSelf._storage.delete(t)}_writeRaw(t,e){this._staticSelf._storage.set(t,e)}};var hr=class{static{n(this,"SmpHttpTwoService")}static _cacheStrategy=typeof sessionStorage<"u"?new Dt:new qt;static _errorClass=k;static _mergeParamsFallbackBaseUrl="https://uc-api-nest-common-fe";static _running=new Map;static $http(t){return this._generateAjax(t)}static async _generateAjax(t){let e=this._generateCacheKey(t),o=+(t.ttl||0)>0;if(o){let a=this._cacheStrategy.read(e);if(a)return Promise.resolve(a)}let s=this._running.get(e);if(s)return s;let i=this._generateAjaxBase(t).then(a=>(o&&this._cacheStrategy.write(e,a,t.ttl),a)).finally(()=>{this._running.delete(e)});return this._running.set(e,i),i}static async _generateAjaxBase(t){let e=await this._preprocessRequest(t),o={method:e.method,headers:new Headers({"content-type":"application/json",...e.headers}),body:e.body?JSON.stringify(e.body):null};return e.useCredentials&&(o.credentials="include"),e.url=this.mergeQueryParams(e.url,e.queryParams),fetch(e.url,o).then(s=>this._preprocessResponse(t,s)).then(s=>{if(s.ok){if(s.status===204||s.headers.get("content-length")==="0")return null;switch(e.responseType){case"blob":return s.blob();case"arraybuffer":return s.arrayBuffer();case"text":return s.text();case"json":default:return s.json()}}return s.json().then(i=>{let a=i;try{a=this._errorClass.fromPlain(i)}catch(c){console.debug("http: failed to parse error response into ErrorResponse",c)}return Promise.reject({status:s.status,message:s.statusText,body:a})})})}static cacheFlush(){this._cacheStrategy.flush()}static mergeQueryParams(t,e){if(!e||Object.keys(e).length===0)return t;let o=t.startsWith("http"),s=new URL(t,globalThis?.location?.origin||this._mergeParamsFallbackBaseUrl),a={...Object.fromEntries(new URLSearchParams(s.search).entries()),...e},c=[];for(let[u,m]of Object.entries(a))if(m!=null)if(Array.isArray(m))for(let w of m)c.push(`${encodeURIComponent(u)}=${encodeURIComponent(String(w))}`);else c.push(`${encodeURIComponent(u)}=${encodeURIComponent(String(m))}`);let h=c.length?`?${c.join("&")}`:"",g=s.origin+s.pathname+h;return o?g:g.replace(s.origin,"")}static _generateCacheKey(t){let e=`${t.method}:${t.url}`;return t.queryParams&&Object.keys(t.queryParams).length>0&&(e+=`:${_t.md5(JSON.stringify(t.queryParams))}`),t.body&&Object.keys(t.body).length>0?`${e}:${_t.md5(JSON.stringify(t.body))}`:e}static async _preprocessRequest(t){return t}static async _preprocessResponse(t,e){return e}};import{SmpLoggerMethods as Rs}from"@tonysamperi/logger";var lr=class{static{n(this,"SmpApiCommonUtils")}static _javascriptVariablePattern="[a-zA-Z_$][a-zA-Z_$0-9]*";static _logger=new Rs;static _pathParamRegex=new RegExp(`\\{(${this._javascriptVariablePattern})\\}`,"g");static credentialsToBasicAuth(t,e){return`Basic ${Buffer.from(`${t}:${e}`).toString("base64")}`}static fromBearer(t=""){return t.split(" ")[1]}static getCountryFromReferer(t){return this.getLocaleFromReferer(t)?.split("-")[0]?.toUpperCase()}static getLanguageFromReferer(t){return this.getLocaleFromReferer(t)?.split("-")[1]}static getLocaleFromReferer(t){return t?.match(/\/([A-Z]{2}-[A-Z]{2})\//i)?.[1]}static interpolateParams(t,e){try{return t.replace(this._pathParamRegex,(o,s)=>{let i=e[s];return i!==void 0?encodeURIComponent(i):o})}catch(o){this._logger.warn(`${this.constructor.name}: couldn't interpolate params`,o)}return t}};var Ip={status:"OK"};var fr=(function(r){return r.GET="GET",r.POST="POST",r.PUT="PUT",r.DELETE="DELETE",r.PATCH="PATCH",r})({});var pr=class{static{n(this,"SmpBaseJwtToken")}_access_token;_exp;_iss;get access_token(){return this._access_token}get exp(){return this._exp}get iss(){return this._iss}constructor(t,e,o){this._access_token=t,this._exp=e,this._iss=o}serialize(){return{access_token:this._access_token,exp:this._exp,iss:this._iss}}};var dr=class{static{n(this,"SmpBaseJwtTokenPlain")}access_token;exp;iss};var Tt=class{static{n(this,"SmpAesCrypt")}_password;_salt;_initVector;_iv;_key;_mode=z;_padding=X;constructor(t,e,o){this._password=t,this._salt=e,this._initVector=o,this._iv=this._initVector?L.parse(this._initVector):void 0,this._key=this._buildKey()}decryptAES(t){return Z.decrypt(t,this._key,{iv:this._iv,mode:this._mode,padding:this._padding}).toString(I)}encryptAES(t){return Z.encrypt(t,this._key,{iv:this._iv,mode:this._mode,padding:this._padding}).toString()}_buildKey(){return Bt.execute(this._password,L.parse(this._salt),{keySize:256/32,iterations:1e3,hasher:st})}};var xe=class r{static{n(this,"SmpAesCryptV2")}_password;_salt;_initVector;static _KEY_SIZE=256/32;static _PBKDF2_ITERATIONS=1e5;_iv;_key;_mode=z;_padding=X;constructor(t,e,o){this._password=t,this._salt=e,this._initVector=o,this._iv=this._initVector?L.parse(this._initVector):void 0,this._key=this._buildKey()}decryptAES(t){return Z.decrypt(t,this._key,{iv:this._iv,mode:this._mode,padding:this._padding}).toString(I)}encryptAES(t){return Z.encrypt(t,this._key,{iv:this._iv,mode:this._mode,padding:this._padding}).toString()}_buildKey(){return Bt.execute(this._password,L.parse(this._salt),{keySize:r._KEY_SIZE,iterations:r._PBKDF2_ITERATIONS,hasher:nt})}};var be=class{static{n(this,"SmpSecureCode")}_baseCode;get baseCode(){return this._baseCode}get secureCode(){return this._encode()}_crcLength=5;_seed="changeme";constructor(t){this._baseCode=t}static check(t,e){if(new this(t).secureCode!==e)throw k.create({messages:"WRONG_SECURE_CODE",errorCode:"WRONG_SECURE_CODE",status:Ke.BadRequest})}_encode(){let t=new K;return t.update(I.parse(this._seed+this._baseCode)),t.finalize().toString(L).substring(0,this._crcLength).toUpperCase()}};import{Expose as Bs,instanceToPlain as Ts,plainToInstance as Is}from"class-transformer";import{DateTime as Ae}from"ts-luxon";var M=(function(r){return r.ACTIVATE="ACTIVATE",r.BLOCK="BLOCK",r.CHECK="CHECK",r.DIGITAL_ACTIVATE="DIGITAL_ACTIVATE",r.FREEZE="FREEZE",r.PURCHASE="PURCHASE",r.RECHARGE="RECHARGE",r.ROLLBACK="ROLLBACK",r.TRANSACTION="TRANSACTION",r.TRANSACTION_DETAIL="TRANSACTION_DETAIL",r.UNFREEZE="UNFREEZE",r.XREFUND="XREFUND",r})({});var wt=(function(r){return r.MD5="MD5",r.MD5_HMAC="MD5_HMAC",r.SHA1="SHA1",r.SHA1_HMAC="SHA1_HMAC",r})({});function Os(r,t,e,o){var s=arguments.length,i=s<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,o);else for(var c=r.length-1;c>=0;c--)(a=r[c])&&(i=(s<3?a(i):s>3?a(t,e,i):a(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i}n(Os,"_ts_decorate");function ur(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}n(ur,"_ts_metadata");var ve=class r{static{n(this,"SmpGiftcardTransaction")}gc;op;ot;static _AES_ENCODER=new Tt("changeme","5f6eae61d2428b99","d92fbf214e16a79fd36f9a5185ae733f");static _OP_CODES={[M.CHECK]:"",[M.TRANSACTION]:"",[M.TRANSACTION_DETAIL]:"",[M.ACTIVATE]:"A",[M.BLOCK]:"B",[M.DIGITAL_ACTIVATE]:"D",[M.FREEZE]:"F",[M.PURCHASE]:"P",[M.RECHARGE]:"G",[M.ROLLBACK]:"R",[M.UNFREEZE]:"U",[M.XREFUND]:"X"};static _SEP="_";get dto(){return this._dto}get hash(){return this._hashStrategy(this.toString()).toString()}get iso(){return this.dto.toUTC().toISO()}get ts(){return this._dto.ts}_dto;_hashStrategies={[wt.MD5]:t=>mt(t),[wt.MD5_HMAC]:t=>{let e=new K;return e.update(I.parse(t)),e.finalize()},[wt.SHA1]:t=>gt(t),[wt.SHA1_HMAC]:t=>{let e=new st;return e.update(I.parse(t)),e.finalize()}};_hashStrategy=this._hashStrategies[wt.MD5];constructor(t="ACTIVATION",e,o,s){this.gc=t,this.op=e,this.ot=o,this._dto=typeof s=="number"&&s>=0?Ae.fromMillis(+`${s}000`.slice(0,13)):Ae.local()}static build({gc:t,op:e,ot:o,dto:s}){return new this(t,e,o,s?.ts)}static explode(t){let e=this.constructor,o=(t||"").split(e._SEP);if(o.length<4)throw new Error(`${this.constructor.name}::explode: invalid transactionId provided => "${t}"`);return this.build({gc:o[1],op:e.prefixToOperation(o[2]),dto:Ae.fromSeconds(+o[3])})}static isBase64(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)&&t.length%4===0}static parse(t){console.info(`${this.constructor.name}::parse: trying to parse ${t}`);try{if(this.isBase64(t)){let e=this._AES_ENCODER.decryptAES(t),o=JSON.parse(e);return Is(r,o)}else return this.explode(t)}catch(e){throw console.error(`${this.constructor.name}::parse: failed to parse ${t}`,e),new Error(`${this.constructor.name}::parse: could not parse transactionId ${t}`)}}static prefixToOperation(t){return Object.entries(this._OP_CODES).find(([,o])=>o===t)[0]}serialize(){return Ts(this,{excludePrefixes:["_"]})}toString(){let t=JSON.stringify(this.serialize());return this.constructor._AES_ENCODER.encryptAES(t)}};Os([Bs(),ur("design:type",Number),ur("design:paramtypes",[])],ve.prototype,"ts",null);var cd=(function(r){return r.ListDetectiveValidator="ListDetectiveValidator",r.MXValidator="MXValidator",r.SyntaxValidator="SyntaxValidator",r})({});function ld(r,t){t.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(o=>{o!=="constructor"&&(o in r.prototype||Object.defineProperty(r.prototype,o,Object.getOwnPropertyDescriptor(e.prototype,o)))});try{let o=new e;Object.getOwnPropertyNames(o).forEach(s=>{s in r.prototype||Object.defineProperty(r.prototype,s,Object.getOwnPropertyDescriptor(o,s))})}catch{}Object.getOwnPropertyNames(e).forEach(o=>{o!=="prototype"&&o!=="name"&&o!=="length"&&(o in r||Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(e,o)))})})}n(ld,"smpApplyMixin");function Cs(){this.__data__=[],this.size=0}n(Cs,"listCacheClear");var mr=Cs;function Ps(r,t){return r===t||r!==r&&t!==t}n(Ps,"eq");var Vt=Ps;function js(r,t){for(var e=r.length;e--;)if(Vt(r[e][0],t))return e;return-1}n(js,"assocIndexOf");var J=js;var Ms=Array.prototype,Ds=Ms.splice;function Ns(r){var t=this.__data__,e=J(t,r);if(e<0)return!1;var o=t.length-1;return e==o?t.pop():Ds.call(t,e,1),--this.size,!0}n(Ns,"listCacheDelete");var gr=Ns;function Fs(r){var t=this.__data__,e=J(t,r);return e<0?void 0:t[e][1]}n(Fs,"listCacheGet");var _r=Fs;function Ls(r){return J(this.__data__,r)>-1}n(Ls,"listCacheHas");var wr=Ls;function zs(r,t){var e=this.__data__,o=J(e,r);return o<0?(++this.size,e.push([r,t])):e[o][1]=t,this}n(zs,"listCacheSet");var yr=zs;function yt(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}n(yt,"ListCache");yt.prototype.clear=mr;yt.prototype.delete=gr;yt.prototype.get=_r;yt.prototype.has=wr;yt.prototype.set=yr;var Y=yt;function Us(){this.__data__=new Y,this.size=0}n(Us,"stackClear");var xr=Us;function ks(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}n(ks,"stackDelete");var br=ks;function $s(r){return this.__data__.get(r)}n($s,"stackGet");var Ar=$s;function Ks(r){return this.__data__.has(r)}n(Ks,"stackHas");var vr=Ks;var Gs=typeof global=="object"&&global&&global.Object===Object&&global,Xt=Gs;var Ss=typeof self=="object"&&self&&self.Object===Object&&self,Ws=Xt||Ss||Function("return this")(),B=Ws;var Hs=B.Symbol,G=Hs;var Er=Object.prototype,qs=Er.hasOwnProperty,Vs=Er.toString,It=G?G.toStringTag:void 0;function Xs(r){var t=qs.call(r,It),e=r[It];try{r[It]=void 0;var o=!0}catch{}var s=Vs.call(r);return o&&(t?r[It]=e:delete r[It]),s}n(Xs,"getRawTag");var Rr=Xs;var Zs=Object.prototype,Js=Zs.toString;function Ys(r){return Js.call(r)}n(Ys,"objectToString");var Or=Ys;var Qs="[object Null]",ti="[object Undefined]",Br=G?G.toStringTag:void 0;function ei(r){return r==null?r===void 0?ti:Qs:Br&&Br in Object(r)?Rr(r):Or(r)}n(ei,"baseGetTag");var S=ei;function ri(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}n(ri,"isObject");var Zt=ri;var oi="[object AsyncFunction]",si="[object Function]",ii="[object GeneratorFunction]",ni="[object Proxy]";function ai(r){if(!Zt(r))return!1;var t=S(r);return t==si||t==ii||t==oi||t==ni}n(ai,"isFunction");var Jt=ai;var ci=B["__core-js_shared__"],Yt=ci;var Tr=(function(){var r=/[^.]+$/.exec(Yt&&Yt.keys&&Yt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function hi(r){return!!Tr&&Tr in r}n(hi,"isMasked");var Ir=hi;var li=Function.prototype,fi=li.toString;function pi(r){if(r!=null){try{return fi.call(r)}catch{}try{return r+""}catch{}}return""}n(pi,"toSource");var W=pi;var di=/[\\^$.*+?()[\]{}|]/g,ui=/^\[object .+?Constructor\]$/,mi=Function.prototype,gi=Object.prototype,_i=mi.toString,wi=gi.hasOwnProperty,yi=RegExp("^"+_i.call(wi).replace(di,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xi(r){if(!Zt(r)||Ir(r))return!1;var t=Jt(r)?yi:ui;return t.test(W(r))}n(xi,"baseIsNative");var Cr=xi;function bi(r,t){return r?.[t]}n(bi,"getValue");var Pr=bi;function Ai(r,t){var e=Pr(r,t);return Cr(e)?e:void 0}n(Ai,"getNative");var N=Ai;var vi=N(B,"Map"),Q=vi;var Ei=N(Object,"create"),H=Ei;function Ri(){this.__data__=H?H(null):{},this.size=0}n(Ri,"hashClear");var jr=Ri;function Oi(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}n(Oi,"hashDelete");var Mr=Oi;var Bi="__lodash_hash_undefined__",Ti=Object.prototype,Ii=Ti.hasOwnProperty;function Ci(r){var t=this.__data__;if(H){var e=t[r];return e===Bi?void 0:e}return Ii.call(t,r)?t[r]:void 0}n(Ci,"hashGet");var Dr=Ci;var Pi=Object.prototype,ji=Pi.hasOwnProperty;function Mi(r){var t=this.__data__;return H?t[r]!==void 0:ji.call(t,r)}n(Mi,"hashHas");var Nr=Mi;var Di="__lodash_hash_undefined__";function Ni(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=H&&t===void 0?Di:t,this}n(Ni,"hashSet");var Fr=Ni;function xt(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}n(xt,"Hash");xt.prototype.clear=jr;xt.prototype.delete=Mr;xt.prototype.get=Dr;xt.prototype.has=Nr;xt.prototype.set=Fr;var Ee=xt;function Fi(){this.size=0,this.__data__={hash:new Ee,map:new(Q||Y),string:new Ee}}n(Fi,"mapCacheClear");var Lr=Fi;function Li(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}n(Li,"isKeyable");var zr=Li;function zi(r,t){var e=r.__data__;return zr(t)?e[typeof t=="string"?"string":"hash"]:e.map}n(zi,"getMapData");var tt=zi;function Ui(r){var t=tt(this,r).delete(r);return this.size-=t?1:0,t}n(Ui,"mapCacheDelete");var Ur=Ui;function ki(r){return tt(this,r).get(r)}n(ki,"mapCacheGet");var kr=ki;function $i(r){return tt(this,r).has(r)}n($i,"mapCacheHas");var $r=$i;function Ki(r,t){var e=tt(this,r),o=e.size;return e.set(r,t),this.size+=e.size==o?0:1,this}n(Ki,"mapCacheSet");var Kr=Ki;function bt(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}n(bt,"MapCache");bt.prototype.clear=Lr;bt.prototype.delete=Ur;bt.prototype.get=kr;bt.prototype.has=$r;bt.prototype.set=Kr;var Qt=bt;var Gi=200;function Si(r,t){var e=this.__data__;if(e instanceof Y){var o=e.__data__;if(!Q||o.length<Gi-1)return o.push([r,t]),this.size=++e.size,this;e=this.__data__=new Qt(o)}return e.set(r,t),this.size=e.size,this}n(Si,"stackSet");var Gr=Si;function At(r){var t=this.__data__=new Y(r);this.size=t.size}n(At,"Stack");At.prototype.clear=xr;At.prototype.delete=br;At.prototype.get=Ar;At.prototype.has=vr;At.prototype.set=Gr;var te=At;var Wi="__lodash_hash_undefined__";function Hi(r){return this.__data__.set(r,Wi),this}n(Hi,"setCacheAdd");var Sr=Hi;function qi(r){return this.__data__.has(r)}n(qi,"setCacheHas");var Wr=qi;function ee(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new Qt;++t<e;)this.add(r[t])}n(ee,"SetCache");ee.prototype.add=ee.prototype.push=Sr;ee.prototype.has=Wr;var Hr=ee;function Vi(r,t){for(var e=-1,o=r==null?0:r.length;++e<o;)if(t(r[e],e,r))return!0;return!1}n(Vi,"arraySome");var qr=Vi;function Xi(r,t){return r.has(t)}n(Xi,"cacheHas");var Vr=Xi;var Zi=1,Ji=2;function Yi(r,t,e,o,s,i){var a=e&Zi,c=r.length,h=t.length;if(c!=h&&!(a&&h>c))return!1;var f=i.get(r),g=i.get(t);if(f&&g)return f==t&&g==r;var u=-1,m=!0,w=e&Ji?new Hr:void 0;for(i.set(r,t),i.set(t,r);++u<c;){var y=r[u],v=t[u];if(o)var R=a?o(v,y,u,t,r,i):o(y,v,u,r,t,i);if(R!==void 0){if(R)continue;m=!1;break}if(w){if(!qr(t,function(O,E){if(!Vr(w,E)&&(y===O||s(y,O,e,o,i)))return w.push(E)})){m=!1;break}}else if(!(y===v||s(y,v,e,o,i))){m=!1;break}}return i.delete(r),i.delete(t),m}n(Yi,"equalArrays");var re=Yi;var Qi=B.Uint8Array,Re=Qi;function tn(r){var t=-1,e=Array(r.size);return r.forEach(function(o,s){e[++t]=[s,o]}),e}n(tn,"mapToArray");var Xr=tn;function en(r){var t=-1,e=Array(r.size);return r.forEach(function(o){e[++t]=o}),e}n(en,"setToArray");var Zr=en;var rn=1,on=2,sn="[object Boolean]",nn="[object Date]",an="[object Error]",cn="[object Map]",hn="[object Number]",ln="[object RegExp]",fn="[object Set]",pn="[object String]",dn="[object Symbol]",un="[object ArrayBuffer]",mn="[object DataView]",Jr=G?G.prototype:void 0,Oe=Jr?Jr.valueOf:void 0;function gn(r,t,e,o,s,i,a){switch(e){case mn:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case un:return!(r.byteLength!=t.byteLength||!i(new Re(r),new Re(t)));case sn:case nn:case hn:return Vt(+r,+t);case an:return r.name==t.name&&r.message==t.message;case ln:case pn:return r==t+"";case cn:var c=Xr;case fn:var h=o&rn;if(c||(c=Zr),r.size!=t.size&&!h)return!1;var f=a.get(r);if(f)return f==t;o|=on,a.set(r,t);var g=re(c(r),c(t),o,s,i,a);return a.delete(r),g;case dn:if(Oe)return Oe.call(r)==Oe.call(t)}return!1}n(gn,"equalByTag");var Yr=gn;function _n(r,t){for(var e=-1,o=t.length,s=r.length;++e<o;)r[s+e]=t[e];return r}n(_n,"arrayPush");var Qr=_n;var wn=Array.isArray,at=wn;function yn(r,t,e){var o=t(r);return at(r)?o:Qr(o,e(r))}n(yn,"baseGetAllKeys");var to=yn;function xn(r,t){for(var e=-1,o=r==null?0:r.length,s=0,i=[];++e<o;){var a=r[e];t(a,e,r)&&(i[s++]=a)}return i}n(xn,"arrayFilter");var eo=xn;function bn(){return[]}n(bn,"stubArray");var ro=bn;var An=Object.prototype,vn=An.propertyIsEnumerable,oo=Object.getOwnPropertySymbols,En=oo?function(r){return r==null?[]:(r=Object(r),eo(oo(r),function(t){return vn.call(r,t)}))}:ro,so=En;function Rn(r,t){for(var e=-1,o=Array(r);++e<r;)o[e]=t(e);return o}n(Rn,"baseTimes");var io=Rn;function On(r){return r!=null&&typeof r=="object"}n(On,"isObjectLike");var q=On;var Bn="[object Arguments]";function Tn(r){return q(r)&&S(r)==Bn}n(Tn,"baseIsArguments");var Be=Tn;var no=Object.prototype,In=no.hasOwnProperty,Cn=no.propertyIsEnumerable,Pn=Be((function(){return arguments})())?Be:function(r){return q(r)&&In.call(r,"callee")&&!Cn.call(r,"callee")},ao=Pn;function jn(){return!1}n(jn,"stubFalse");var co=jn;var fo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ho=fo&&typeof module=="object"&&module&&!module.nodeType&&module,Mn=ho&&ho.exports===fo,lo=Mn?B.Buffer:void 0,Dn=lo?lo.isBuffer:void 0,Nn=Dn||co,Ct=Nn;var Fn=9007199254740991,Ln=/^(?:0|[1-9]\d*)$/;function zn(r,t){var e=typeof r;return t=t??Fn,!!t&&(e=="number"||e!="symbol"&&Ln.test(r))&&r>-1&&r%1==0&&r<t}n(zn,"isIndex");var po=zn;var Un=9007199254740991;function kn(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Un}n(kn,"isLength");var oe=kn;var $n="[object Arguments]",Kn="[object Array]",Gn="[object Boolean]",Sn="[object Date]",Wn="[object Error]",Hn="[object Function]",qn="[object Map]",Vn="[object Number]",Xn="[object Object]",Zn="[object RegExp]",Jn="[object Set]",Yn="[object String]",Qn="[object WeakMap]",ta="[object ArrayBuffer]",ea="[object DataView]",ra="[object Float32Array]",oa="[object Float64Array]",sa="[object Int8Array]",ia="[object Int16Array]",na="[object Int32Array]",aa="[object Uint8Array]",ca="[object Uint8ClampedArray]",ha="[object Uint16Array]",la="[object Uint32Array]",A={};A[ra]=A[oa]=A[sa]=A[ia]=A[na]=A[aa]=A[ca]=A[ha]=A[la]=!0;A[$n]=A[Kn]=A[ta]=A[Gn]=A[ea]=A[Sn]=A[Wn]=A[Hn]=A[qn]=A[Vn]=A[Xn]=A[Zn]=A[Jn]=A[Yn]=A[Qn]=!1;function fa(r){return q(r)&&oe(r.length)&&!!A[S(r)]}n(fa,"baseIsTypedArray");var uo=fa;function pa(r){return function(t){return r(t)}}n(pa,"baseUnary");var mo=pa;var go=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pt=go&&typeof module=="object"&&module&&!module.nodeType&&module,da=Pt&&Pt.exports===go,Te=da&&Xt.process,ua=(function(){try{var r=Pt&&Pt.require&&Pt.require("util").types;return r||Te&&Te.binding&&Te.binding("util")}catch{}})(),Ie=ua;var _o=Ie&&Ie.isTypedArray,ma=_o?mo(_o):uo,se=ma;var ga=Object.prototype,_a=ga.hasOwnProperty;function wa(r,t){var e=at(r),o=!e&&ao(r),s=!e&&!o&&Ct(r),i=!e&&!o&&!s&&se(r),a=e||o||s||i,c=a?io(r.length,String):[],h=c.length;for(var f in r)(t||_a.call(r,f))&&!(a&&(f=="length"||s&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||po(f,h)))&&c.push(f);return c}n(wa,"arrayLikeKeys");var wo=wa;var ya=Object.prototype;function xa(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||ya;return r===e}n(xa,"isPrototype");var yo=xa;function ba(r,t){return function(e){return r(t(e))}}n(ba,"overArg");var xo=ba;var Aa=xo(Object.keys,Object),bo=Aa;var va=Object.prototype,Ea=va.hasOwnProperty;function Ra(r){if(!yo(r))return bo(r);var t=[];for(var e in Object(r))Ea.call(r,e)&&e!="constructor"&&t.push(e);return t}n(Ra,"baseKeys");var Ao=Ra;function Oa(r){return r!=null&&oe(r.length)&&!Jt(r)}n(Oa,"isArrayLike");var vo=Oa;function Ba(r){return vo(r)?wo(r):Ao(r)}n(Ba,"keys");var Eo=Ba;function Ta(r){return to(r,Eo,so)}n(Ta,"getAllKeys");var Ce=Ta;var Ia=1,Ca=Object.prototype,Pa=Ca.hasOwnProperty;function ja(r,t,e,o,s,i){var a=e&Ia,c=Ce(r),h=c.length,f=Ce(t),g=f.length;if(h!=g&&!a)return!1;for(var u=h;u--;){var m=c[u];if(!(a?m in t:Pa.call(t,m)))return!1}var w=i.get(r),y=i.get(t);if(w&&y)return w==t&&y==r;var v=!0;i.set(r,t),i.set(t,r);for(var R=a;++u<h;){m=c[u];var O=r[m],E=t[m];if(o)var x=a?o(E,O,m,t,r,i):o(O,E,m,r,t,i);if(!(x===void 0?O===E||s(O,E,e,o,i):x)){v=!1;break}R||(R=m=="constructor")}if(v&&!R){var b=r.constructor,T=t.constructor;b!=T&&"constructor"in r&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof T=="function"&&T instanceof T)&&(v=!1)}return i.delete(r),i.delete(t),v}n(ja,"equalObjects");var Ro=ja;var Ma=N(B,"DataView"),ie=Ma;var Da=N(B,"Promise"),ne=Da;var Na=N(B,"Set"),ae=Na;var Fa=N(B,"WeakMap"),ce=Fa;var Oo="[object Map]",La="[object Object]",Bo="[object Promise]",To="[object Set]",Io="[object WeakMap]",Co="[object DataView]",za=W(ie),Ua=W(Q),ka=W(ne),$a=W(ae),Ka=W(ce),ct=S;(ie&&ct(new ie(new ArrayBuffer(1)))!=Co||Q&&ct(new Q)!=Oo||ne&&ct(ne.resolve())!=Bo||ae&&ct(new ae)!=To||ce&&ct(new ce)!=Io)&&(ct=n(function(r){var t=S(r),e=t==La?r.constructor:void 0,o=e?W(e):"";if(o)switch(o){case za:return Co;case Ua:return Oo;case ka:return Bo;case $a:return To;case Ka:return Io}return t},"getTag"));var Pe=ct;var Ga=1,Po="[object Arguments]",jo="[object Array]",he="[object Object]",Sa=Object.prototype,Mo=Sa.hasOwnProperty;function Wa(r,t,e,o,s,i){var a=at(r),c=at(t),h=a?jo:Pe(r),f=c?jo:Pe(t);h=h==Po?he:h,f=f==Po?he:f;var g=h==he,u=f==he,m=h==f;if(m&&Ct(r)){if(!Ct(t))return!1;a=!0,g=!1}if(m&&!g)return i||(i=new te),a||se(r)?re(r,t,e,o,s,i):Yr(r,t,h,e,o,s,i);if(!(e&Ga)){var w=g&&Mo.call(r,"__wrapped__"),y=u&&Mo.call(t,"__wrapped__");if(w||y){var v=w?r.value():r,R=y?t.value():t;return i||(i=new te),s(v,R,e,o,i)}}return m?(i||(i=new te),Ro(r,t,e,o,s,i)):!1}n(Wa,"baseIsEqualDeep");var Do=Wa;function No(r,t,e,o,s){return r===t?!0:r==null||t==null||!q(r)&&!q(t)?r!==r&&t!==t:Do(r,t,e,o,No,s)}n(No,"baseIsEqual");var Fo=No;function Ha(r,t){return Fo(r,t)}n(Ha,"isEqual");var Lo=Ha;var qa=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function zo(r){return r.match(qa)}n(zo,"smpAsciiWords");var So="\\ud800-\\udfff",Va="\\u0300-\\u036f",Xa="\\ufe20-\\ufe2f",Za="\\u20d0-\\u20ff",Ja="\\u1ab0-\\u1aff",Ya="\\u1dc0-\\u1dff",Qa=Va+Xa+Za+Ja+Ya,Wo="\\u2700-\\u27bf",Ho="a-z\\xdf-\\xf6\\xf8-\\xff",tc="\\xac\\xb1\\xd7\\xf7",ec="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rc="\\u2000-\\u206f",oc=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qo="A-Z\\xc0-\\xd6\\xd8-\\xde",sc="\\ufe0e\\ufe0f",Vo=tc+ec+rc+oc,Xo="['\u2019]",Uo=`[${Vo}]`,ic=`[${Qa}]`,Zo="\\d",nc=`[${Wo}]`,Jo=`[${Ho}]`,Yo=`[^${So}${Vo+Zo+Wo+Ho+qo}]`,ac="\\ud83c[\\udffb-\\udfff]",cc=`(?:${ic}|${ac})`,hc=`[^${So}]`,Qo="(?:\\ud83c[\\udde6-\\uddff]){2}",ts="[\\ud800-\\udbff][\\udc00-\\udfff]",vt=`[${qo}]`,lc="\\u200d",ko=`(?:${Jo}|${Yo})`,fc=`(?:${vt}|${Yo})`,$o=`(?:${Xo}(?:d|ll|m|re|s|t|ve))?`,Ko=`(?:${Xo}(?:D|LL|M|RE|S|T|VE))?`,es=`${cc}?`,rs=`[${sc}]?`,pc=`(?:${lc}(?:${[hc,Qo,ts].join("|")})${rs+es})*`,dc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",uc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",mc=rs+es+pc,Go=`(?:${[nc,Qo,ts].join("|")})${mc}`,jt=class{static{n(this,"SmpUnicodeWords")}static HAS_UNICODE_WORD=RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/);static RE_UNICODE_WORDS=RegExp([`${vt}?${Jo}+${$o}(?=${[Uo,vt,"$"].join("|")})`,`${fc}+${Ko}(?=${[Uo,vt+ko,"$"].join("|")})`,`${vt}?${ko}+${$o}`,`${vt}+${Ko}`,uc,dc,`${Zo}+`,Go].join("|"),"g");static RS_EMOJI=Go;static unicodeWords(t){return t.match(this.RE_UNICODE_WORDS)}};var os=class{static{n(this,"SmpCommonUtils")}static arrayRemove(t,e){let o=[],s=t.filter((i,a)=>e(i,a)&&o.push(a));return o.reverse().forEach(i=>t.splice(i,1)),s}static assertIsArray(t,e){if(!Array.isArray(t))throw new Error(e||`${this.constructor.name} => val was not an array`)}static assertIsBoolean(t,e){if(!this.isBoolean(t))throw new Error(e||`${this.constructor.name} => val was not boolean`)}static assertIsFunction(t,e){if(!this.isFunction(t))throw new Error(e||`${this.constructor.name} => entity was not a function`)}static assertIsInstance(t,e,o){if(!(t instanceof e))throw new Error(o||`${this.constructor.name} => val was not instance of class`)}static assertIsNotEmpty(t,e){if(this.isEmpty(t))throw new Error(e||`${this.constructor.name} => entity was empty`)}static assertIsNumber(t,e){if(typeof t!="number")throw new Error(e||`${this.constructor.name} => val was not numeric`)}static assertIsNumeric(t,e){if(!this.isNumeric(t))throw new Error(e||`${this.constructor.name} => val was not numeric`)}static assertIsObject(t,e){if(!this.isObject(t))throw new Error(e||`${this.constructor.name} => val was not an object`)}static assertIsString(t,e){if(!this.isString(t))throw new Error(e||`${this.constructor.name} => val was not a string`)}static assertIsTruthy(t,e){if(!t)throw new Error(e||`${this.constructor.name} => condition wasn't truthy`)}static buildPath(...t){let e=t.filter(o=>!!o).join("/").replace(/(?<!:)\/\/+/g,"/");return e.startsWith("http")&&!e.endsWith("/")?`${e}/`:e}static downloadBlob(t,e){let o=window.URL.createObjectURL(t),s=document.createElement("a");s.href=o,s.setAttribute("download",e),document.body.appendChild(s),s.click()}static fixDecimalPrecision(t,e=2){this.assertIsNumber(t),this.assertIsNumber(e);let s=10**Math.max(0,Math.trunc(e));return Math.round((t+Number.EPSILON)*s)/s}static generateRandomHexString(t=12){let e="0123456789abcdef",o="";for(let s=0;s<t;s++){let i=Math.floor(Math.random()*e.length);o+=e[i]}return o}static generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}static getDecimalPrecision(t){if(this.assertIsNumeric(t),!isFinite(+t))return 0;let e=1,o=0;for(;Math.round(+t*e)/e!==t;)e*=10,o++;return o}static getType(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}static isBoolean(t){return typeof t=="boolean"}static isColor(t){if(!t||!this.isString(t))return!1;let e=new Option().style;return e.color=t,e.color!==""}static isEmpty(t){return!t&&t!==0}static isEqual(t,e){return Lo(t,e)}static isFormField(t){return/^(?:input|select|textarea|button)$/i.test(t.nodeName)}static isFunction(t){return typeof t==typeof isNaN}static isNotEmpty(t){return!this.isEmpty(t)}static isNumber(t){return typeof t=="number"&&this.isNumeric(t)}static isNumeric(t){return!isNaN(t)}static isObject(t){return!!t&&t===Object(t)&&t.constructor===Object}static isPrimitive(t){let e=this.getType(t);return e!=="function"&&(e!=="object"||!t)}static isString(t){return typeof t=="string"}static isWindows(){return navigator.userAgent.toLowerCase().includes("win")}static mapObject(t,e){if(this.assertIsFunction(e,`CommonUtils => expected type of iteratee to be Function, got ${typeof e}`),this.isObject(t))return Object.entries(t).reduce((o,[s,i])=>(o.push(e(i,s)),o),[]);if(Array.isArray(t))return t.map(e);throw new Error(`CommonUtils => invalid object provided. Expected Object or Array, got ${typeof e}`)}static mapObjectKeys(t,e){return this.isObject(t)?Object.entries(t).reduce((o,[s,i])=>{let a=e(s,i);return o[a]=i,o},{}):{}}static mapObjectValues(t,e){return this.isObject(t)?Object.entries(t).reduce((o,[s,i])=>(o[s]=e.call(null,i,s),o),{}):{}}static noop(){}static objectHasValue(t,e){return!!~Object.values(t).filter(o=>this.isEqual(o,e))}static omit(t,e){return Object.keys(t).filter(s=>!e.includes(s)).reduce((s,i)=>(s[i]=t[i],s),{})}static parseBoolean(t){return t?/^true$/i.test(t):!1}static parseJsonSafely(t){try{return JSON.parse(t)}catch(e){console.warn(`${this.constructor.name} => couldn't parse json string`,{str:t,error:e});return}}static pick(t,e){return e.reduce((o,s)=>(s in t&&(o[s]=t[s]),o),{})}static runSafely(t,e=null,o=[]){if(this.isFunction(t))return t.apply(e,o)}static sleep(t){return new Promise(e=>setTimeout(e,t))}static sprintf(t,...e){return this.isString(t)&&e.length?this.sprintf(t.replace("%s",String(e.shift())),...e):t}static stripComments(t){return typeof t=="string"?t.replace(/(<!--.*?-->)|(<!--[\S\s]+?-->)|(<!--[\S\s]*?$)/g,""):t}static stripHtml(t,e=!0){this.assertIsString(t);let o=t.replace(/<[^>]*>?/g,"");return(e?this._decodeHtmlEntities(o):o).replace(/\s+/g," ").trim()}static submitFakeForm({action:t,method:e=fr.POST,data:o,target:s}){let i=Object.entries(o||{}).map(([c,h])=>`<input name="${c}" type="hidden" value="${h}" />`),a=document.createElement("form");a.method=e,a.action=t,a.innerHTML=`${i}`,a.target=s||"_self",document.body.append(a),a.submit()}static toCamelCase(t){return this.words(t.replace(/['\u2019]/g,"")).reduce((e,o,s)=>(o=o.toLowerCase(),e+(s?o.charAt(0).toUpperCase()+o.slice(1):o)),"")}static toKebabCase(t){return this.words(t.replace(/['\u2019]/g,"")).join("-").toLowerCase()}static toPascalCase(t){return this.toCamelCase(t).replace(/^(.)/,e=>e.toUpperCase())}static toSnakeCase(t){return this.words(t.replace(/['\u2019]/g,"")).join("_").toLowerCase()}static toUpperSnakeCase(t){return this.toSnakeCase(t).toUpperCase()}static words(t,e){return e===void 0?(jt.HAS_UNICODE_WORD(t)?jt.unicodeWords(t):zo(t))||[]:t.match(e)||[]}static _decodeHtmlEntities(t){let e={amp:"&",apos:"'",euro:"\u20AC",gt:">",lt:"<",nbsp:" ",quot:'"'};return t.replace(/&(#x?[0-9a-f]+|[a-z]+);/gi,(o,s)=>{let i=s.toLowerCase();if(i.startsWith("#x")){let a=Number.parseInt(i.slice(2),16);return Number.isNaN(a)?o:String.fromCodePoint(a)}if(i.startsWith("#")){let a=Number.parseInt(i.slice(1),10);return Number.isNaN(a)?o:String.fromCodePoint(a)}return e[i]||o})}};var ss=class extends Error{static{n(this,"SmpFilterException")}message;data;constructor(t="Filter Exception",e){super(),this.message=t,this.data=e}};import{DateTime as is}from"ts-luxon";var ns=class r{static{n(this,"SmpSid")}value;expiry;get active(){return this.value.endsWith(this._controlSuffix)}get expired(){return is.now().ts>this.expiry}get valid(){return!this.expired}_controlSuffix="$1";constructor(t=`sid-xxxx-${+is.now().ts}`,e=0){this.value=t,this.expiry=e}static parse(t){return new r(t.value,t.expiry)}toPlain(){return{value:this.value,expiry:this.expiry}}};import{smpNoop as e1}from"@tonysamperi/logger";var as=class{static{n(this,"SmpRegularExpressions")}static get COUNTRY(){return this._country}static get DOMAIN(){return/^(?!www)(\w)([\w.-])*\.[a-z]{2,6}$/}static get EMAIL(){return/^[^\\|!"£$%&/()='?^€*[\]°#§<>,;:\s]+@[a-z0-9.-]+\.[a-z]{2,6}$/}static get LANGUAGE(){return this._language}static get LATIN_CHARS(){return/^[\u0000-\u024F\u1E00-\u1EFF\u2C60-\u2C7F\uA720-\uA7FF]+/}static get LOCALE(){return new RegExp(`${this._country.source}-${this._language.source}`)}static get NO_EMOJI_NO_PUNCTUATION(){return/[^\p{Emoji_Presentation}|\p{P}]/gu}static get PHONE_NUMBER(){return/^(\+\d{1,4}\s)(\d{4,15})$/}static get PHONE_NUMBER_BY_PREFIX(){return{"+971":{dontStartWithZero:/^(\+\d{3}\s)([1-9])/,typeExactlyNineDigits:/^(\+\d{3}\s)([1-9]\d{8}$)/}}}static get TAXCODE_BY_COUNTRY(){return{ES:{DNI:/^\d{8}[A-Z]$/,NIE:/^[A-Z]\d{7}[A-Z]$/,CIF:/^[A-Z]\d{8}$/}}}static _country=/[a-zA-Z]{2}/;static _language=/[a-z]{2}/};var s1="2.0.0";export{Ip as SMP_HEALTHZ,Ue as SmpAbstractCacheStrategy,pt as SmpAbstractTtlCacheStrategy,Tt as SmpAesCrypt,xe as SmpAesCryptV2,lr as SmpApiCommonUtils,pr as SmpBaseJwtToken,dr as SmpBaseJwtTokenPlain,Mt as SmpBrowserCache,os as SmpCommonUtils,_t as SmpCrypto,k as SmpErrorResponse,ss as SmpFilterException,wc as SmpFirebaseErrors,Ot as SmpGenericResponse,ve as SmpGiftcardTransaction,wt as SmpGiftcardTransactionHashStrategies,M as SmpGiftcardTransactionOps,Dt as SmpHttpSessionStorageCache,Ke as SmpHttpStatusCodes,hr as SmpHttpTwoService,qt as SmpInMemoryCache,cd as SmpMarketingCloudValidators,as as SmpRegularExpressions,F as SmpResponseMessage,ft as SmpResponseMessageTypes,fr as SmpRestVerbs,be as SmpSecureCode,ns as SmpSid,gc as SmpSocialSignInKeys,_c as SmpSocialSignInUxModes,s1 as VERSION,ld as smpApplyMixin,ke as smpIsSmpCachedValue,e1 as smpNoop};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonysamperi/ts-mapi-core",
3
- "version": "2.0.0-beta.6",
3
+ "version": "2.0.0",
4
4
  "description": "A set of shared utils to be used at BE or FE",
5
5
  "type": "module",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -94,12 +94,16 @@
94
94
  "check-exports": "node scripts/check-exports.js",
95
95
  "lint": "eslint && tsc --noEmit",
96
96
  "prepublishOnly": "npm run build && npm run check-exports",
97
- "release": "npm publish",
98
- "release:beta": "npm publish --tag beta",
99
- "release:next": "npm publish --tag next",
97
+ "release": "npm publish --access public --provenance",
98
+ "release:beta": "npm publish --access public --tag beta --provenance",
99
+ "release:next": "npm publish --access public --tag next --provenance",
100
100
  "test": "jest"
101
101
  },
102
102
  "author": "Tony Samperi",
103
+ "repository": {
104
+ "type": "git",
105
+ "url": "https://github.com/tonysamperi/ts-mapi-core"
106
+ },
103
107
  "license": "ISC",
104
108
  "peerDependencies": {
105
109
  "@aws-sdk/client-dynamodb": "^3.758.0",