@incodetech/welcome 1.85.0-20251218222520.0 → 1.85.0-20251219175515.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.
- package/dist/onBoarding.mjs +14 -7
- package/dist/onBoarding.umd.js +7 -7
- package/package.json +1 -1
package/dist/onBoarding.umd.js
CHANGED
|
@@ -63,7 +63,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[St]+=1);const breakpoints$3={
|
|
|
63
63
|
justify-content: center;
|
|
64
64
|
align-items: center;
|
|
65
65
|
flex-direction: column;
|
|
66
|
-
`;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>{let Be,Le;return{promise:new Promise((tt,nt)=>{Be=tt,Le=nt}),resolve:Be,reject:Le}});class InterruptionHandler{constructor(){this.boundVisibilityChange=this.handleVisibilityChange.bind(this),this.boundOnline=this.handleOnline.bind(this),this.boundOffline=this.handleOffline.bind(this),this.boundUnhandledRejection=this.handleUnhandledRejection.bind(this),this.boundError=this.handleError.bind(this),this.initialized=!1}registerEventListeners(){this.initialized||(document.addEventListener("visibilitychange",this.boundVisibilityChange),window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline),window.addEventListener("unhandledrejection",this.boundUnhandledRejection),window.addEventListener("error",this.boundError),this.initialized=!0)}removeEventListeners(){this.initialized&&(this.initialized=!1,document.removeEventListener("visibilitychange",this.boundVisibilityChange),window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),window.removeEventListener("unhandledrejection",this.boundUnhandledRejection),window.removeEventListener("error",this.boundError))}handleVisibilityChange(){document.hidden?this.onAppHidden():this.onAppVisible()}onAppHidden(){}onAppVisible(){}handleOnline(){}handleOffline(){}handleUnhandledRejection(Le){}handleError(Le){}}const regex$1={CURP_PATTERN:/^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/,EMAIL_PATTERN:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,SSN_PATTERN:/^\d{3}-?\d{2}-?\d{4}$/};function webgl(){let Be,Le,Ye=256,tt=128;Be=document.body.appendChild(document.createElement("canvas")),Be.width=Ye,Be.height=tt;try{Le=Be.getContext("webgl2")||Be.getContext("experimental-webgl2")||Be.getContext("webgl")||Be.getContext("experimental-webgl")||Be.getContext("moz-webgl");const nt="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",ft="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",ht=Le.createBuffer();Le.bindBuffer(Le.ARRAY_BUFFER,ht);const gt=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0]);Le.bufferData(Le.ARRAY_BUFFER,gt,Le.STATIC_DRAW),ht.itemSize=3,ht.numItems=3;const At=Le.createProgram(),xt=Le.createShader(Le.VERTEX_SHADER);Le.shaderSource(xt,nt),Le.compileShader(xt);const Et=Le.createShader(Le.FRAGMENT_SHADER);Le.shaderSource(Et,ft),Le.compileShader(Et),Le.attachShader(At,xt),Le.attachShader(At,Et),Le.linkProgram(At),Le.useProgram(At),At.vertexPosAttrib=Le.getAttribLocation(At,"attrVertex"),At.offsetUniform=Le.getUniformLocation(At,"uniformOffset"),Le.enableVertexAttribArray(At.vertexPosAttrib),Le.vertexAttribPointer(At.vertexPosAttrib,ht.itemSize,Le.FLOAT,!1,0,0),Le.uniform2f(At.offsetUniform,1,1),Le.drawArrays(Le.TRIANGLE_STRIP,0,ht.numItems);let yt="";const Ct=new Uint8Array(Ye*tt*4);return Le.readPixels(0,0,Ye,tt,Le.RGBA,Le.UNSIGNED_BYTE,Ct),yt=JSON.stringify(Ct).replace(/,?"[0-9]+":/g,""),document.body.removeChild(Be),sha256(yt)}catch{return""}}const sha256=(()=>{let Be=1,Le,Ye=[],tt=[];for(;++Be<18;)for(Le=Be*Be;Le<312;Le+=Be)Ye[Le]=1;function nt(gt,At){return Math.pow(gt,1/At)%1*4294967296|0}for(Be=1,Le=0;Be<313;)Ye[++Be]||(tt[Le]=nt(Be,2),Ye[Le++]=nt(Be,3));function ft(gt,At){return gt>>>At|gt<<32-At}function ht(gt){let At=tt.slice(Be=0),xt=unescape(encodeURI(gt)),Et=[],yt=xt.length,Ct=[],kt,vt,bt;for(;Be<yt;)Ct[Be>>2]|=(xt.charCodeAt(Be)&255)<<8*(3-Be++%4);for(yt*=8,Ct[yt>>5]|=128<<24-yt%32,Ct[bt=yt+64>>5|15]=yt,Be=0;Be<bt;Be+=16){for(kt=At.slice(Le=0,8);Le<64;kt[4]+=vt)Le<16?Et[Le]=Ct[Le+Be]:Et[Le]=(ft(vt=Et[Le-2],17)^ft(vt,19)^vt>>>10)+(Et[Le-7]|0)+(ft(vt=Et[Le-15],7)^ft(vt,18)^vt>>>3)+(Et[Le-16]|0),kt.unshift((vt=(kt.pop()+(ft(gt=kt[4],6)^ft(gt,11)^ft(gt,25))+((gt&kt[5]^~gt&kt[6])+Ye[Le])|0)+(Et[Le++]|0))+(ft(yt=kt[0],2)^ft(yt,13)^ft(yt,22))+(yt&kt[1]^kt[1]&kt[2]^kt[2]&yt));for(Le=8;Le--;)At[Le]=kt[Le]+At[Le]}for(xt="";Le<63;)xt+=(At[++Le>>3]>>4*(7-Le%8)&15).toString(16);return xt}return ht})();var store;function getGlobalConfig$1(Be){return{lang:store==null?void 0:store.lang,message:Be==null?void 0:Be.message,abortEarly:store==null?void 0:store.abortEarly,abortPipeEarly:store==null?void 0:store.abortPipeEarly}}var store2;function getGlobalMessage$1(Be){return store2==null?void 0:store2.get(Be)}var store3;function getSchemaMessage$1(Be){return store3==null?void 0:store3.get(Be)}var store4;function getSpecificMessage$1(Be,Le){var Ye;return(Ye=store4==null?void 0:store4.get(Be))==null?void 0:Ye.get(Le)}function _stringify$4(Be){var Ye,tt;const Le=typeof Be;return Le==="string"?`"${Be}"`:Le==="number"||Le==="bigint"||Le==="boolean"?`${Be}`:Le==="object"||Le==="function"?(Be&&((tt=(Ye=Object.getPrototypeOf(Be))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Le}function _addIssue$1(Be,Le,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Be.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$4(ft),At={kind:Be.kind,type:Be.type,input:ft,expected:ht,received:gt,message:`Invalid ${Le}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Be.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Be.kind==="schema",Et=(nt==null?void 0:nt.message)??Be.message??getSpecificMessage$1(Be.reference,At.lang)??(xt?getSchemaMessage$1(At.lang):null)??tt.message??getGlobalMessage$1(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps$1(Be){return{version:1,vendor:"valibot",validate(Le){return Be["~run"]({value:Le},getGlobalConfig$1())}}}function _joinExpects(Be,Le){const Ye=[...new Set(Be)];return Ye.length>1?`(${Ye.join(` ${Le} `)})`:Ye[0]??"never"}function isValiError(Be){return Be instanceof ValiError}var ValiError=class extends Error{constructor(Be){super(Be[0].message),this.name="ValiError",this.issues=Be}};function getFallback$1(Be,Le,Ye){return typeof Be.fallback=="function"?Be.fallback(Le,Ye):Be.fallback}function getDefault$1(Be,Le,Ye){return typeof Be.default=="function"?Be.default(Le,Ye):Be.default}function boolean$2(Be){return{kind:"schema",type:"boolean",reference:boolean$2,expects:"boolean",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="boolean"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function custom(Be,Le){return{kind:"schema",type:"custom",reference:custom,expects:"unknown",async:!1,check:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return this.check(Ye.value)?Ye.typed=!0:_addIssue$1(this,"type",Ye,tt),Ye}}}function function_(Be){return{kind:"schema",type:"function",reference:function_,expects:"Function",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="function"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function literal(Be,Le){return{kind:"schema",type:"literal",reference:literal,expects:_stringify$4(Be),async:!1,literal:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return Ye.value===this.literal?Ye.typed=!0:_addIssue$1(this,"type",Ye,tt),Ye}}}function null_(Be){return{kind:"schema",type:"null",reference:null_,expects:"null",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return Le.value===null?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function number$3(Be){return{kind:"schema",type:"number",reference:number$3,expects:"number",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="number"&&!isNaN(Le.value)?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function object$1(Be,Le){return{kind:"schema",type:"object",reference:object$1,expects:"Object",async:!1,entries:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault$1(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const yt of xt.issues)yt.path?yt.path.unshift(Et):yt.path=[Et],(ft=Ye.issues)==null||ft.push(yt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback$1(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue$1(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue$1(this,"type",Ye,tt);return Ye}}}function optional$1(Be,Le){return{kind:"schema",type:"optional",reference:optional$1,expects:`(${Be.expects} | undefined)`,async:!1,wrapped:Be,default:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault$1(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function string$3(Be){return{kind:"schema",type:"string",reference:string$3,expects:"string",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="string"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function _subIssues(Be){let Le;if(Be)for(const Ye of Be)Le?Le.push(...Ye.issues):Le=Ye.issues;return Le}function union(Be,Le){return{kind:"schema",type:"union",reference:union,expects:_joinExpects(Be.map(Ye=>Ye.expects),"|"),async:!1,options:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){let nt,ft,ht;for(const gt of this.options){const At=gt["~run"]({value:Ye.value},tt);if(At.typed)if(At.issues)ft?ft.push(At):ft=[At];else{nt=At;break}else ht?ht.push(At):ht=[At]}if(nt)return nt;if(ft){if(ft.length===1)return ft[0];_addIssue$1(this,"type",Ye,tt,{issues:_subIssues(ft)}),Ye.typed=!0}else{if((ht==null?void 0:ht.length)===1)return ht[0];_addIssue$1(this,"type",Ye,tt,{issues:_subIssues(ht)})}return Ye}}}function parse$8(Be,Le,Ye){const tt=Be["~run"]({value:Le},getGlobalConfig$1(Ye));if(tt.issues)throw new ValiError(tt.issues);return tt.value}function validate$2(...Be){try{Be.forEach(({schema:Le,value:Ye})=>parse$8(Le,Ye))}catch(Le){if(isValiError(Le)){const Ye=Le.issues.map(tt=>{var ft;return`${((ft=tt.path)==null?void 0:ft.map(ht=>ht.key).join("."))||"root"}: ${tt.message}`}).join(", ");throw new Error(`Validation failed: ${Ye}`)}throw Le}}exports.api=void 0;function setApi(Be){exports.api=Be}function setToken(Be){exports.api.defaults.headers["X-Incode-Hardware-Id"]=Be}const eventsQueue=[];function addEvent(Be){const{token:Le,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Be;if(!Le){eventsQueue.push(Be);return}return exports.api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Le}}).catch(()=>{})}function emptyQueue(Be){eventsQueue.forEach(Le=>{addEvent({...Le,token:Be})})}const state={token:null};var PipelineProfileName=(Be=>(Be[Be.IdCapture_2_01=0]="IdCapture_2_01",Be[Be.IdCapture_2_02=1]="IdCapture_2_02",Be[Be.IdCapture_3_02=2]="IdCapture_3_02",Be[Be.IdVideoSelfie_2_01=3]="IdVideoSelfie_2_01",Be[Be.SelfieWithAggregationMetrics=4]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=5]="SelfieWithQualityMetrics",Be[Be.SelfieVideoSelfie=6]="SelfieVideoSelfie",Be))(PipelineProfileName||{});class PipelineProfile{constructor(Le,Ye,tt,nt,ft,ht=null,gt=""){this.pipelineType=Le,this.name=Ye,this.detectionType=tt,this.modelNames=nt,this.parameters=ft,this.paramsConfigurator=ht,this.description=gt}reconfigureParams(Le,Ye){if(this.paramsConfigurator==null)throw new Error("PipelineProfile does not have a paramsConfigurator");this.paramsConfigurator(this.parameters,this.pipelineType,Le,Ye)}}var DetectionType=(Be=>(Be[Be.IDCapture=0]="IDCapture",Be[Be.Selfie=1]="Selfie",Be[Be.SelfieVideoSelfie=2]="SelfieVideoSelfie",Be[Be.IdVideoSelfie=3]="IdVideoSelfie",Be))(DetectionType||{}),WasmPipelineType=(Be=>(Be[Be.IdBlurGlarePipeline=0]="IdBlurGlarePipeline",Be[Be.IdBarcodeAndTextQualityPipeline=1]="IdBarcodeAndTextQualityPipeline",Be[Be.IdVideoSelfiePipeline=2]="IdVideoSelfiePipeline",Be[Be.SelfieWithAggregationMetrics=3]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=4]="SelfieWithQualityMetrics",Be[Be.IdFaceDetectionPipeline=5]="IdFaceDetectionPipeline",Be))(WasmPipelineType||{}),IdCaptureModelType=(Be=>(Be[Be.IdCaptureV1x=0]="IdCaptureV1x",Be[Be.IdCaptureV2x=1]="IdCaptureV2x",Be[Be.IdCaptureV3x=2]="IdCaptureV3x",Be))(IdCaptureModelType||{}),src$2={},src$1={},$_StatsigGlobal={},Log={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Log=Be.LogLevel=void 0;const Le=" DEBUG ",Ye=" INFO ",tt=" WARN ",nt=" ERROR ";function ft(gt){return gt.unshift("[Statsig]"),gt}Be.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class ht{static info(...At){ht.level>=Be.LogLevel.Info&&console.info(Ye,...ft(At))}static debug(...At){ht.level>=Be.LogLevel.Debug&&console.debug(Le,...ft(At))}static warn(...At){ht.level>=Be.LogLevel.Warn&&console.warn(tt,...ft(At))}static error(...At){ht.level>=Be.LogLevel.Error&&console.error(nt,...ft(At))}}Be.Log=ht,ht.level=Be.LogLevel.Warn})(Log),function(Be){var Le,Ye,tt;Object.defineProperty(Be,"__esModule",{value:!0}),Be._getInstance=Be._getStatsigGlobalFlag=Be._getStatsigGlobal=void 0;const nt=Log,ft=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:Ct}catch{return Ct}};Be._getStatsigGlobal=ft;const ht=kt=>(0,Be._getStatsigGlobal)()[kt];Be._getStatsigGlobalFlag=ht;const gt=kt=>{const vt=(0,Be._getStatsigGlobal)();return kt?vt.instances&&vt.instances[kt]:(vt.instances&&Object.keys(vt.instances).length>1&&nt.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),vt.firstInstance)};Be._getInstance=gt;const At="__STATSIG__",xt=typeof window<"u"?window:{},Et=typeof commonjsGlobal<"u"?commonjsGlobal:{},yt=typeof globalThis<"u"?globalThis:{},Ct=(tt=(Ye=(Le=xt[At])!==null&&Le!==void 0?Le:Et[At])!==null&&Ye!==void 0?Ye:yt[At])!==null&&tt!==void 0?tt:{instance:Be._getInstance};xt[At]=Ct,Et[At]=Ct,yt[At]=Ct}($_StatsigGlobal);var Diagnostics={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Diagnostics=void 0;const Le=new Map,Ye="start",tt="end",nt="statsig::diagnostics";Be.Diagnostics={_getMarkers:xt=>Le.get(xt),_markInitOverallStart:xt=>{gt(xt,ft({},Ye,"overall"))},_markInitOverallEnd:(xt,Et,yt)=>{gt(xt,ft({success:Et,error:Et?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:yt},tt,"overall"))},_markInitNetworkReqStart:(xt,Et)=>{gt(xt,ft(Et,Ye,"initialize","network_request"))},_markInitNetworkReqEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","network_request"))},_markInitProcessStart:xt=>{gt(xt,ft({},Ye,"initialize","process"))},_markInitProcessEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","process"))},_clearMarkers:xt=>{Le.delete(xt)},_formatError(xt){if(xt&&typeof xt=="object")return{code:At(xt,"code"),name:At(xt,"name"),message:At(xt,"message")}},_getDiagnosticsData(xt,Et,yt,Ct){var kt;return{success:(xt==null?void 0:xt.ok)===!0,statusCode:xt==null?void 0:xt.status,sdkRegion:(kt=xt==null?void 0:xt.headers)===null||kt===void 0?void 0:kt.get("x-statsig-region"),isDelta:yt.includes('"is_delta":true')===!0?!0:void 0,attempt:Et,error:Be.Diagnostics._formatError(Ct)}},_enqueueDiagnosticsEvent(xt,Et,yt,Ct){const kt=Be.Diagnostics._getMarkers(yt);if(kt==null||kt.length<=0)return-1;const vt=kt[kt.length-1].timestamp-kt[0].timestamp;Be.Diagnostics._clearMarkers(yt);const bt=ht(xt,{context:"initialize",markers:kt.slice(),statsigOptions:Ct});return Et.enqueue(bt),vt}};function ft(xt,Et,yt,Ct){return Object.assign({key:yt,action:Et,step:Ct,timestamp:Date.now()},xt)}function ht(xt,Et){return{eventName:nt,user:xt,value:null,metadata:Et,time:Date.now()}}function gt(xt,Et){var yt;const Ct=(yt=Le.get(xt))!==null&&yt!==void 0?yt:[];Ct.push(Et),Le.set(xt,Ct)}function At(xt,Et){if(Et in xt)return xt[Et]}})(Diagnostics);var EventLogger$1={},CacheKey={},Hashing={},TypingUtils={};Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0;function _typeOf(Be){return Array.isArray(Be)?"array":typeof Be}TypingUtils._typeOf=_typeOf;function _isTypeMatch(Be,Le){const Ye=tt=>Array.isArray(tt)?"array":tt===null?"null":typeof tt;return Ye(Be)===Ye(Le)}TypingUtils._isTypeMatch=_isTypeMatch,function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getSortedObject=Be._DJB2Object=Be._DJB2=void 0;const Le=TypingUtils,Ye=ft=>{let ht=0;for(let gt=0;gt<ft.length;gt++){const At=ft.charCodeAt(gt);ht=(ht<<5)-ht+At,ht=ht&ht}return String(ht>>>0)};Be._DJB2=Ye;const tt=(ft,ht)=>(0,Be._DJB2)(JSON.stringify((0,Be._getSortedObject)(ft,ht)));Be._DJB2Object=tt;const nt=(ft,ht)=>{if(ft==null)return null;const gt=Object.keys(ft).sort(),At={};return gt.forEach(xt=>{const Et=ft[xt];if(ht===0||(0,Le._typeOf)(Et)!=="object"){At[xt]=Et;return}At[xt]=(0,Be._getSortedObject)(Et,ht!=null?ht-1:ht)}),At};Be._getSortedObject=nt}(Hashing),Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const Hashing_1$4=Hashing;function _getUserStorageKey(Be,Le,Ye){var tt;if(Ye)return Ye(Be,Le);const nt=Le&&Le.customIDs?Le.customIDs:{},ft=[`uid:${(tt=Le==null?void 0:Le.userID)!==null&&tt!==void 0?tt:""}`,`cids:${Object.keys(nt).sort((ht,gt)=>ht.localeCompare(gt)).map(ht=>`${ht}-${nt[ht]}`).join(",")}`,`k:${Be}`];return(0,Hashing_1$4._DJB2)(ft.join("|"))}CacheKey._getUserStorageKey=_getUserStorageKey;function _getStorageKey(Be,Le,Ye){return Le?_getUserStorageKey(Be,Le,Ye):(0,Hashing_1$4._DJB2)(`k:${Be}`)}CacheKey._getStorageKey=_getStorageKey;var NetworkConfig={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.NetworkParam=Be.NetworkDefault=Be.Endpoint=void 0,Be.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},Be.NetworkDefault={[Be.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[Be.Endpoint._initialize]:"https://featureassets.org/v1",[Be.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},Be.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(NetworkConfig);var SafeJs={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getUnloadEvent=Be._getCurrentPageUrlSafe=Be._addDocumentEventListenerSafe=Be._addWindowEventListenerSafe=Be._isServerEnv=Be._getDocumentSafe=Be._getWindowSafe=void 0;const Le=()=>typeof window<"u"?window:null;Be._getWindowSafe=Le;const Ye=()=>{var At;const xt=(0,Be._getWindowSafe)();return(At=xt==null?void 0:xt.document)!==null&&At!==void 0?At:null};Be._getDocumentSafe=Ye;const tt=()=>{if((0,Be._getDocumentSafe)()!==null)return!1;const At=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||At};Be._isServerEnv=tt;const nt=(At,xt)=>{const Et=(0,Be._getWindowSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addWindowEventListenerSafe=nt;const ft=(At,xt)=>{const Et=(0,Be._getDocumentSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addDocumentEventListenerSafe=ft;const ht=()=>{var At;try{return(At=(0,Be._getWindowSafe)())===null||At===void 0?void 0:At.location.href.split(/[?#]/)[0]}catch{return}};Be._getCurrentPageUrlSafe=ht;const gt=()=>{const At=(0,Be._getWindowSafe)();return At&&"onpagehide"in At?"pagehide":"beforeunload"};Be._getUnloadEvent=gt})(SafeJs);var StatsigEvent={};Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const CONFIG_EXPOSURE_NAME="statsig::config_exposure",GATE_EXPOSURE_NAME="statsig::gate_exposure",LAYER_EXPOSURE_NAME="statsig::layer_exposure",_createExposure=(Be,Le,Ye,tt,nt)=>(Ye.bootstrapMetadata&&(tt.bootstrapMetadata=Ye.bootstrapMetadata),{eventName:Be,user:Le,value:null,metadata:_addEvaluationDetailsToMetadata(Ye,tt),secondaryExposures:nt,time:Date.now()}),_isExposureEvent=({eventName:Be})=>Be===GATE_EXPOSURE_NAME||Be===CONFIG_EXPOSURE_NAME||Be===LAYER_EXPOSURE_NAME;StatsigEvent._isExposureEvent=_isExposureEvent;const _createGateExposure=(Be,Le,Ye)=>{var tt,nt,ft;const ht={gate:Le.name,gateValue:String(Le.value),ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(ht.configVersion=Le.__evaluation.version),_createExposure(GATE_EXPOSURE_NAME,Be,Le.details,ht,_mapExposures((ft=(nt=Le.__evaluation)===null||nt===void 0?void 0:nt.secondary_exposures)!==null&&ft!==void 0?ft:[],Ye))};StatsigEvent._createGateExposure=_createGateExposure;function _mapExposures(Be,Le){return Be.map(Ye=>typeof Ye=="string"?(Le??{})[Ye]:Ye).filter(Ye=>Ye!=null)}StatsigEvent._mapExposures=_mapExposures;const _createConfigExposure=(Be,Le,Ye)=>{var tt,nt,ft,ht;const gt={config:Le.name,ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(gt.configVersion=Le.__evaluation.version),((nt=Le.__evaluation)===null||nt===void 0?void 0:nt.passed)!=null&&(gt.rulePassed=String(Le.__evaluation.passed)),_createExposure(CONFIG_EXPOSURE_NAME,Be,Le.details,gt,_mapExposures((ht=(ft=Le.__evaluation)===null||ft===void 0?void 0:ft.secondary_exposures)!==null&&ht!==void 0?ht:[],Ye))};StatsigEvent._createConfigExposure=_createConfigExposure;const _createLayerParameterExposure=(Be,Le,Ye,tt)=>{var nt,ft,ht,gt,At,xt,Et;const yt=Le.__evaluation,Ct=((nt=yt==null?void 0:yt.explicit_parameters)===null||nt===void 0?void 0:nt.includes(Ye))===!0;let kt="",vt=(ft=yt==null?void 0:yt.undelegated_secondary_exposures)!==null&&ft!==void 0?ft:[];Ct&&(kt=(ht=yt.allocated_experiment_name)!==null&&ht!==void 0?ht:"",vt=(gt=yt.secondary_exposures)!==null&>!==void 0?gt:[]);const bt=(At=Le.__evaluation)===null||At===void 0?void 0:At.parameter_rule_ids,It={config:Le.name,parameterName:Ye,ruleID:(xt=bt==null?void 0:bt[Ye])!==null&&xt!==void 0?xt:Le.ruleID,allocatedExperiment:kt,isExplicitParameter:String(Ct)};return((Et=Le.__evaluation)===null||Et===void 0?void 0:Et.version)!=null&&(It.configVersion=Le.__evaluation.version),_createExposure(LAYER_EXPOSURE_NAME,Be,Le.details,It,_mapExposures(vt,tt))};StatsigEvent._createLayerParameterExposure=_createLayerParameterExposure;const _addEvaluationDetailsToMetadata=(Be,Le)=>(Le.reason=Be.reason,Be.lcut&&(Le.lcut=String(Be.lcut)),Be.receivedAt&&(Le.receivedAt=String(Be.receivedAt)),Le);var StatsigOptionsCommon={};Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var StorageProvider={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._setObjectInStorage=Be._getObjectFromStorage=Be.Storage=void 0;const Le=Log,Ye=SafeJs,tt={},nt={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:yt=>tt[yt]?tt[yt]:null,setItem:(yt,Ct)=>{tt[yt]=Ct},removeItem:yt=>{delete tt[yt]},getAllKeys:()=>Object.keys(tt)};let ft=null;try{const yt=(0,Ye._getWindowSafe)();yt&&yt.localStorage&&typeof yt.localStorage.getItem=="function"&&(ft={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:Ct=>yt.localStorage.getItem(Ct),setItem:(Ct,kt)=>yt.localStorage.setItem(Ct,kt),removeItem:Ct=>yt.localStorage.removeItem(Ct),getAllKeys:()=>Object.keys(yt.localStorage)})}catch{Le.Log.warn("Failed to setup localStorageProvider.")}let ht=ft??nt,gt=ht;function At(yt){try{return yt()}catch(Ct){if(Ct instanceof Error&&Ct.name==="SecurityError")return Be.Storage._setProvider(nt),null;throw Ct}}Be.Storage={isReady:()=>gt.isReady(),isReadyResolver:()=>gt.isReadyResolver(),getProviderName:()=>gt.getProviderName(),getItem:yt=>At(()=>gt.getItem(yt)),setItem:(yt,Ct)=>At(()=>gt.setItem(yt,Ct)),removeItem:yt=>gt.removeItem(yt),getAllKeys:()=>gt.getAllKeys(),_setProvider:yt=>{ht=yt,gt=yt},_setDisabled:yt=>{yt?gt=nt:gt=ht}};function xt(yt){const Ct=Be.Storage.getItem(yt);return JSON.parse(Ct??"null")}Be._getObjectFromStorage=xt;function Et(yt,Ct){Be.Storage.setItem(yt,JSON.stringify(Ct))}Be._setObjectInStorage=Et})(StorageProvider);var UrlConfiguration$1={};Object.defineProperty(UrlConfiguration$1,"__esModule",{value:!0}),UrlConfiguration$1.UrlConfiguration=void 0;const Hashing_1$3=Hashing,NetworkConfig_1$2=NetworkConfig,ENDPOINT_DNS_KEY_MAP={[NetworkConfig_1$2.Endpoint._initialize]:"i",[NetworkConfig_1$2.Endpoint._rgstr]:"e",[NetworkConfig_1$2.Endpoint._download_config_specs]:"d"};class UrlConfiguration{constructor(Le,Ye,tt,nt){this.customUrl=null,this.fallbackUrls=null,this.endpoint=Le,this.endpointDnsKey=ENDPOINT_DNS_KEY_MAP[Le],Ye&&(this.customUrl=Ye),!Ye&&tt&&(this.customUrl=tt.endsWith("/")?`${tt}${Le}`:`${tt}/${Le}`),nt&&(this.fallbackUrls=nt);const ft=NetworkConfig_1$2.NetworkDefault[Le];this.defaultUrl=`${ft}/${Le}`}getUrl(){var Le;return(Le=this.customUrl)!==null&&Le!==void 0?Le:this.defaultUrl}getChecksum(){var Le;const Ye=((Le=this.fallbackUrls)!==null&&Le!==void 0?Le:[]).sort().join(",");return(0,Hashing_1$3._DJB2)(this.customUrl+Ye)}}UrlConfiguration$1.UrlConfiguration=UrlConfiguration;var VisibilityObserving={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._notifyVisibilityChanged=Be._subscribeToVisiblityChanged=Be._isUnloading=Be._isCurrentlyVisible=void 0;const Le=SafeJs,Ye="foreground",tt="background",nt=[];let ft=Ye,ht=!1;const gt=()=>ft===Ye;Be._isCurrentlyVisible=gt;const At=()=>ht;Be._isUnloading=At;const xt=yt=>{nt.unshift(yt)};Be._subscribeToVisiblityChanged=xt;const Et=yt=>{yt!==ft&&(ft=yt,nt.forEach(Ct=>Ct(yt)))};Be._notifyVisibilityChanged=Et,(0,Le._addWindowEventListenerSafe)("focus",()=>{ht=!1,(0,Be._notifyVisibilityChanged)(Ye)}),(0,Le._addWindowEventListenerSafe)("blur",()=>(0,Be._notifyVisibilityChanged)(tt)),(0,Le._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,Be._notifyVisibilityChanged)(document.visibilityState==="visible"?Ye:tt)}),(0,Le._addWindowEventListenerSafe)((0,Le._getUnloadEvent)(),()=>{ht=!0,(0,Be._notifyVisibilityChanged)(tt)})})(VisibilityObserving);var __awaiter$f=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(EventLogger$1,"__esModule",{value:!0}),EventLogger$1.EventLogger=void 0;const CacheKey_1$1=CacheKey,Hashing_1$2=Hashing,Log_1$8=Log,NetworkConfig_1$1=NetworkConfig,SafeJs_1$3=SafeJs,StatsigEvent_1=StatsigEvent,StatsigOptionsCommon_1$2=StatsigOptionsCommon,StorageProvider_1$4=StorageProvider,UrlConfiguration_1=UrlConfiguration$1,VisibilityObserving_1$1=VisibilityObserving,DEFAULT_QUEUE_SIZE=100,DEFAULT_FLUSH_INTERVAL_MS=1e4,MAX_DEDUPER_KEYS=1e3,DEDUPER_WINDOW_DURATION_MS=6e5,MAX_FAILED_LOGS=500,QUICK_FLUSH_WINDOW_MS=200,EVENT_LOGGER_MAP={},RetryFailedLogsTrigger={Startup:"startup",GainedFocus:"gained_focus"};class EventLogger{static _safeFlushAndForget(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye.flush().catch(()=>{})}static _safeRetryFailedLogs(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus)}constructor(Le,Ye,tt,nt){var ft,ht;this._sdkKey=Le,this._emitter=Ye,this._network=tt,this._options=nt,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(ft=nt==null?void 0:nt.loggingEnabled)!==null&&ft!==void 0?ft:(nt==null?void 0:nt.disableLogging)===!0?StatsigOptionsCommon_1$2.LoggingEnabledOption.disabled:StatsigOptionsCommon_1$2.LoggingEnabledOption.browserOnly,nt!=null&&nt.loggingEnabled&&nt.disableLogging!==void 0&&Log_1$8.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(ht=nt==null?void 0:nt.loggingBufferMaxSize)!==null&&ht!==void 0?ht:DEFAULT_QUEUE_SIZE;const gt=nt==null?void 0:nt.networkConfig;this._logEventUrlConfig=new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1$1.Endpoint._rgstr,gt==null?void 0:gt.logEventUrl,gt==null?void 0:gt.api,gt==null?void 0:gt.logEventFallbackUrls)}setLogEventCompressionMode(Le){this._network.setLogEventCompressionMode(Le)}setLoggingEnabled(Le){if(this._loggingEnabled==="disabled"&&Le!=="disabled"){const Ye=this._getStorageKey(),tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);tt&&this._queue.push(...tt),StorageProvider_1$4.Storage.removeItem(Ye)}this._loggingEnabled=Le}enqueue(Le){this._shouldLogEvent(Le)&&(this._normalizeAndAppendEvent(Le),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&EventLogger._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(Le){var Ye;const tt=(Ye=this._nonExposedChecks[Le])!==null&&Ye!==void 0?Ye:0;this._nonExposedChecks[Le]=tt+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var Le;const Ye=(0,SafeJs_1$3._isServerEnv)();Ye&&((Le=this._options)===null||Le===void 0?void 0:Le.loggingEnabled)!=="always"||(EVENT_LOGGER_MAP[this._sdkKey]=this,Ye||(0,VisibilityObserving_1$1._subscribeToVisiblityChanged)(tt=>{tt==="background"?EventLogger._safeFlushAndForget(this._sdkKey):tt==="foreground"&&EventLogger._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(RetryFailedLogsTrigger.Startup),this._startBackgroundFlushInterval())}stop(){return __awaiter$f(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete EVENT_LOGGER_MAP[this._sdkKey],yield this.flush()})}flush(){return __awaiter$f(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const Le=this._queue;this._queue=[],yield this._sendEvents(Le)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>QUICK_FLUSH_WINDOW_MS)&&setTimeout(()=>EventLogger._safeFlushAndForget(this._sdkKey),QUICK_FLUSH_WINDOW_MS))}_shouldLogEvent(Le){var Ye;if(((Ye=this._options)===null||Ye===void 0?void 0:Ye.loggingEnabled)!=="always"&&(0,SafeJs_1$3._isServerEnv)())return!1;if(!(0,StatsigEvent_1._isExposureEvent)(Le))return!0;const tt=Le.user?Le.user:{statsigEnvironment:void 0},nt=(0,CacheKey_1$1._getUserStorageKey)(this._sdkKey,tt),ft=Le.metadata?Le.metadata:{},ht=[Le.eventName,nt,ft.gate,ft.config,ft.ruleID,ft.allocatedExperiment,ft.parameterName,String(ft.isExplicitParameter),ft.reason].join("|"),gt=this._lastExposureTimeMap[ht],At=Date.now();return gt&&At-gt<DEDUPER_WINDOW_DURATION_MS?!1:(Object.keys(this._lastExposureTimeMap).length>MAX_DEDUPER_KEYS&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[ht]=At,!0)}_sendEvents(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye,tt;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(Le),!1;try{const ft=(0,VisibilityObserving_1$1._isUnloading)()&&this._network.isBeaconSupported()&&((tt=(Ye=this._options)===null||Ye===void 0?void 0:Ye.networkConfig)===null||tt===void 0?void 0:tt.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:Le}),(ft?this._sendEventsViaBeacon(Le):yield this._sendEventsViaPost(Le)).success?(this._emitter({name:"logs_flushed",events:Le}),!0):(Log_1$8.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(Le),!1)}catch{return Log_1$8.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye;const tt=yield this._network.post(this._getRequestData(Le)),nt=(Ye=tt==null?void 0:tt.code)!==null&&Ye!==void 0?Ye:-1;return{success:nt>=200&&nt<300}})}_sendEventsViaBeacon(Le){return{success:this._network.beacon(this._getRequestData(Le))}}_getRequestData(Le){return{sdkKey:this._sdkKey,data:{events:Le},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[NetworkConfig_1$1.NetworkParam.EventCount]:String(Le.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(Le){for(;Le.length>MAX_FAILED_LOGS;)Le.shift();const Ye=this._getStorageKey();try{const tt=this._getFailedLogsFromStorage(Ye);(0,StorageProvider_1$4._setObjectInStorage)(Ye,[...tt,...Le])}catch{Log_1$8.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(Le){let Ye=[];try{const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Le);return Array.isArray(tt)&&(Ye=tt),Ye}catch{return[]}}_retryFailedLogs(Le){const Ye=this._getStorageKey();__awaiter$f(this,void 0,void 0,function*(){StorageProvider_1$4.Storage.isReady()||(yield StorageProvider_1$4.Storage.isReadyResolver());const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);if(!tt)return;Le===RetryFailedLogsTrigger.Startup&&StorageProvider_1$4.Storage.removeItem(Ye),(yield this._sendEvents(tt))&&Le===RetryFailedLogsTrigger.GainedFocus&&StorageProvider_1$4.Storage.removeItem(Ye)}).catch(()=>{Log_1$8.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,Hashing_1$2._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(Le){Le.user&&(Le.user=Object.assign({},Le.user),delete Le.user.privateAttributes);const Ye={},tt=this._getCurrentPageUrl();tt&&(Ye.statsigMetadata={currentPage:tt});const nt=Object.assign(Object.assign({},Le),Ye);Log_1$8.Log.debug("Enqueued Event:",nt),this._queue.push(nt)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var Le;if(((Le=this._options)===null||Le===void 0?void 0:Le.includeCurrentPageUrlWithEvents)!==!1)return(0,SafeJs_1$3._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var Le,Ye;const tt=(Ye=(Le=this._options)===null||Le===void 0?void 0:Le.loggingIntervalMs)!==null&&Ye!==void 0?Ye:DEFAULT_FLUSH_INTERVAL_MS,nt=setInterval(()=>{const ft=EVENT_LOGGER_MAP[this._sdkKey];!ft||ft._flushIntervalId!==nt?clearInterval(nt):EventLogger._safeFlushAndForget(this._sdkKey)},tt);this._flushIntervalId=nt}}EventLogger$1.EventLogger=EventLogger;var StatsigMetadata={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigMetadataProvider=Be.SDK_VERSION=void 0,Be.SDK_VERSION="3.28.1";let Le={sdkVersion:Be.SDK_VERSION,sdkType:"js-mono"};Be.StatsigMetadataProvider={get:()=>Le,add:Ye=>{Le=Object.assign(Object.assign({},Le),Ye)}}})(StatsigMetadata);var ClientInterfaces={};Object.defineProperty(ClientInterfaces,"__esModule",{value:!0});var DataAdapterCore$1={},StableID={},UUID={};Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0;function getUUID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let Be=new Date().getTime(),Le=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,tt=>{let nt=Math.random()*16;return Be>0?(nt=(Be+nt)%16|0,Be=Math.floor(Be/16)):(nt=(Le+nt)%16|0,Le=Math.floor(Le/16)),(tt==="x"?nt:nt&7|8).toString(16)})}UUID.getUUID=getUUID,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const CacheKey_1=CacheKey,Log_1$7=Log,SafeJs_1$2=SafeJs,StorageProvider_1$3=StorageProvider,UUID_1=UUID,PROMISE_MAP={},COOKIE_ENABLED_MAP={},DISABLED_MAP={};StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:Be=>{if(DISABLED_MAP[Be])return null;if(PROMISE_MAP[Be]!=null)return PROMISE_MAP[Be];let Le=null;return Le=_loadFromCookie(Be),Le!=null?(PROMISE_MAP[Be]=Le,_persistToStorage(Le,Be),Le):(Le=_loadFromStorage(Be),Le==null&&(Le=(0,UUID_1.getUUID)()),_persistToStorage(Le,Be),_persistToCookie(Le,Be),PROMISE_MAP[Be]=Le,Le)},setOverride:(Be,Le)=>{PROMISE_MAP[Le]=Be,_persistToStorage(Be,Le),_persistToCookie(Be,Le)},_setCookiesEnabled:(Be,Le)=>{COOKIE_ENABLED_MAP[Be]=Le},_setDisabled:(Be,Le)=>{DISABLED_MAP[Be]=Le}};function _getStableIDStorageKey(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}function _persistToStorage(Be,Le){const Ye=_getStableIDStorageKey(Le);try{(0,StorageProvider_1$3._setObjectInStorage)(Ye,Be)}catch{Log_1$7.Log.warn("Failed to save StableID to storage")}}function _loadFromStorage(Be){const Le=_getStableIDStorageKey(Be);return(0,StorageProvider_1$3._getObjectFromStorage)(Le)}function _loadFromCookie(Be){if(!COOKIE_ENABLED_MAP[Be]||(0,SafeJs_1$2._getDocumentSafe)()==null)return null;const Le=document.cookie.split(";");for(const Ye of Le){const[tt,nt]=Ye.trim().split("=");if(tt===getCookieName(Be))return decodeURIComponent(nt)}return null}function _persistToCookie(Be,Le){if(!COOKIE_ENABLED_MAP[Le]||(0,SafeJs_1$2._getDocumentSafe)()==null)return;const Ye=new Date;Ye.setFullYear(Ye.getFullYear()+1),document.cookie=`${getCookieName(Le)}=${encodeURIComponent(Be)}; expires=${Ye.toUTCString()}; path=/`}function getCookieName(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}StableID.getCookieName=getCookieName;var StatsigUser={};Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const Hashing_1$1=Hashing,Log_1$6=Log;function _normalizeUser(Be,Le,Ye){try{const tt=JSON.parse(JSON.stringify(Be));return Le!=null&&Le.environment!=null?tt.statsigEnvironment=Le.environment:Ye!=null&&(tt.statsigEnvironment={tier:Ye}),tt}catch{return Log_1$6.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}StatsigUser._normalizeUser=_normalizeUser;function _getFullUserHash(Be){return Be?(0,Hashing_1$1._DJB2Object)(Be):null}StatsigUser._getFullUserHash=_getFullUserHash;var TypedJsonParse={};Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const Log_1$5=Log;function _typedJsonParse(Be,Le,Ye){try{const tt=JSON.parse(Be);if(tt&&typeof tt=="object"&&Le in tt)return tt}catch{}return Log_1$5.Log.error(`Failed to parse ${Ye}`),null}TypedJsonParse._typedJsonParse=_typedJsonParse;var __awaiter$e=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DataAdapterCore$1,"__esModule",{value:!0}),DataAdapterCore$1._makeDataAdapterResult=DataAdapterCore$1.DataAdapterCore=void 0;const Log_1$4=Log,StableID_1$2=StableID,StatsigUser_1=StatsigUser,StorageProvider_1$2=StorageProvider,TypedJsonParse_1=TypedJsonParse,CACHE_LIMIT=10,MAX_CACHE_WRITE_ATTEMPTS=8;class DataAdapterCore{constructor(Le,Ye){this._adapterName=Le,this._cacheSuffix=Ye,this._options=null,this._sdkKey=null,this._cacheLimit=CACHE_LIMIT,this._lastModifiedStoreKey=`statsig.last_modified_time.${Ye}`,this._inMemoryCache=new InMemoryCache}attach(Le,Ye,tt){this._sdkKey=Le,this._options=Ye}getDataSync(Le){const Ye=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),tt=this._getCacheKey(Ye),nt=this._inMemoryCache.get(tt,Ye);if(nt&&this._getIsCacheValueValid(nt))return nt;const ft=this._loadFromCache(tt);return ft&&this._getIsCacheValueValid(ft)?(this._inMemoryCache.add(tt,ft,this._cacheLimit),this._inMemoryCache.get(tt,Ye)):null}setData(Le,Ye){const tt=Ye&&(0,StatsigUser_1._normalizeUser)(Ye,this._options),nt=this._getCacheKey(tt);this._inMemoryCache.add(nt,_makeDataAdapterResult("Bootstrap",Le,null,tt),this._cacheLimit)}_getIsCacheValueValid(Le){return Le.stableID==null||Le.stableID===StableID_1$2.StableID.get(this._getSdkKey())}_getDataAsyncImpl(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){StorageProvider_1$2.Storage.isReady()||(yield StorageProvider_1$2.Storage.isReadyResolver());const nt=Le??this.getDataSync(Ye),ft=[this._fetchAndPrepFromNetwork(nt,Ye,tt)];return tt!=null&&tt.timeoutMs&&ft.push(new Promise(ht=>setTimeout(ht,tt.timeoutMs)).then(()=>(Log_1$4.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(ft)})}_prefetchDataImpl(Le,Ye){return __awaiter$e(this,void 0,void 0,function*(){const tt=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),nt=this._getCacheKey(tt),ft=yield this._getDataAsyncImpl(null,tt,Ye);ft&&this._inMemoryCache.add(nt,Object.assign(Object.assign({},ft),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){var nt;const ft=(nt=Le==null?void 0:Le.data)!==null&&nt!==void 0?nt:null,ht=Le!=null&&this._isCachedResultValidFor204(Le,Ye),gt=yield this._fetchFromNetwork(ft,Ye,tt,ht);if(!gt)return Log_1$4.Log.debug("No response returned for latest value"),null;const At=(0,TypedJsonParse_1._typedJsonParse)(gt,"has_updates","Response"),xt=this._getSdkKey(),Et=StableID_1$2.StableID.get(xt);let yt=null;if((At==null?void 0:At.has_updates)===!0)yt=_makeDataAdapterResult("Network",gt,Et,Ye);else if(ft&&(At==null?void 0:At.has_updates)===!1)yt=_makeDataAdapterResult("NetworkNotModified",ft,Et,Ye);else return null;const Ct=this._getCacheKey(Ye);return this._inMemoryCache.add(Ct,yt,this._cacheLimit),this._writeToCache(Ct,yt),yt})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Log_1$4.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(Le){var Ye;const tt=(Ye=StorageProvider_1$2.Storage.getItem)===null||Ye===void 0?void 0:Ye.call(StorageProvider_1$2.Storage,Le);if(tt==null)return null;const nt=(0,TypedJsonParse_1._typedJsonParse)(tt,"source","Cached Result");return nt?Object.assign(Object.assign({},nt),{source:"Cache"}):null}_writeToCache(Le,Ye){const tt=JSON.stringify(Ye);for(let nt=0;nt<MAX_CACHE_WRITE_ATTEMPTS;nt++)try{StorageProvider_1$2.Storage.setItem(Le,tt);break}catch(ft){if(!(ft instanceof Error)||!(ft.toString().includes("QuotaExceededError")||ft.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw ft;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(Le,this._cacheLimit-1)}this._runLocalStorageCacheEviction(Le)}_runLocalStorageCacheEviction(Le,Ye=this._cacheLimit){var tt;const nt=(tt=(0,StorageProvider_1$2._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&tt!==void 0?tt:{};nt[Le]=Date.now();const ft=_getEvictableKeys(nt,Ye);for(const ht of ft)delete nt[ht],StorageProvider_1$2.Storage.removeItem(ht);(0,StorageProvider_1$2._setObjectInStorage)(this._lastModifiedStoreKey,nt)}}DataAdapterCore$1.DataAdapterCore=DataAdapterCore;function _makeDataAdapterResult(Be,Le,Ye,tt){return{source:Be,data:Le,receivedAt:Date.now(),stableID:Ye,fullUserHash:(0,StatsigUser_1._getFullUserHash)(tt)}}DataAdapterCore$1._makeDataAdapterResult=_makeDataAdapterResult;class InMemoryCache{constructor(){this._data={}}get(Le,Ye){var tt;const nt=this._data[Le],ft=nt==null?void 0:nt.stableID,ht=(tt=Ye==null?void 0:Ye.customIDs)===null||tt===void 0?void 0:tt.stableID;return ht&&ft&&ht!==ft?(Log_1$4.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):nt}add(Le,Ye,tt){const nt=_getEvictableKeys(this._data,tt-1);for(const ft of nt)delete this._data[ft];this._data[Le]=Ye}merge(Le){this._data=Object.assign(Object.assign({},this._data),Le)}}function _getEvictableKeys(Be,Le){const Ye=Object.keys(Be);return Ye.length<=Le?[]:Le===0?Ye:Ye.sort((tt,nt)=>{const ft=Be[tt],ht=Be[nt];return typeof ft=="object"&&typeof ht=="object"?ft.receivedAt-ht.receivedAt:ft-ht}).slice(0,Ye.length-Le)}var DownloadConfigSpecsResponse={};Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0});var ErrorBoundary={},SDKType={};Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const SDK_CLIENT={};let suffix;SDKType.SDKType={_get:Be=>{var Le;return((Le=SDK_CLIENT[Be])!==null&&Le!==void 0?Le:"js-mono")+(suffix??"")},_setClientType(Be,Le){SDK_CLIENT[Be]=Le},_setBindingType(Be){(!suffix||suffix==="-react")&&(suffix="-"+Be)}},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__awaiter||function(yt,Ct,kt,vt){function bt(It){return It instanceof kt?It:new kt(function(wt){wt(It)})}return new(kt||(kt=Promise))(function(It,wt){function Rt(Dt){try{Bt(vt.next(Dt))}catch(Pt){wt(Pt)}}function Tt(Dt){try{Bt(vt.throw(Dt))}catch(Pt){wt(Pt)}}function Bt(Dt){Dt.done?It(Dt.value):bt(Dt.value).then(Rt,Tt)}Bt((vt=vt.apply(yt,Ct||[])).next())})};Object.defineProperty(Be,"__esModule",{value:!0}),Be.ErrorBoundary=Be.EXCEPTION_ENDPOINT=void 0;const Ye=Log,tt=SDKType,nt=StatsigMetadata;Be.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const ft="[Statsig] UnknownError";class ht{constructor(Ct,kt,vt,bt){this._sdkKey=Ct,this._options=kt,this._emitter=vt,this._lastSeenError=bt,this._seen=new Set}wrap(Ct,kt){try{const vt=Ct;xt(vt).forEach(bt=>{const It=vt[bt];"$EB"in It||(vt[bt]=(...wt)=>this._capture(kt?`${kt}:${bt}`:bt,()=>It.apply(Ct,wt)),vt[bt].$EB=!0)})}catch(vt){this._onError("eb:wrap",vt)}}logError(Ct,kt){this._onError(Ct,kt)}getLastSeenErrorAndReset(){const Ct=this._lastSeenError;return this._lastSeenError=void 0,Ct??null}attachErrorIfNoneExists(Ct){this._lastSeenError||(this._lastSeenError=gt(Ct))}_capture(Ct,kt){try{const vt=kt();return vt&&vt instanceof Promise?vt.catch(bt=>this._onError(Ct,bt)):vt}catch(vt){return this._onError(Ct,vt),null}}_onError(Ct,kt){try{Ye.Log.warn(`Caught error in ${Ct}`,{error:kt}),Le(this,void 0,void 0,function*(){var bt,It,wt,Rt,Tt,Bt,Dt;const Pt=kt||Error(ft),Nt=Pt instanceof Error,Lt=Nt?Pt.name:"No Name",Wt=gt(Pt);if(this._lastSeenError=Wt,this._seen.has(Lt))return;if(this._seen.add(Lt),!((It=(bt=this._options)===null||bt===void 0?void 0:bt.networkConfig)===null||It===void 0)&&It.preventAllNetworkTraffic){(wt=this._emitter)===null||wt===void 0||wt.call(this,{name:"error",error:kt,tag:Ct});return}const $t=tt.SDKType._get(this._sdkKey),Kt=nt.StatsigMetadataProvider.get(),Vt=Nt?Pt.stack:At(Pt),Ut=Object.assign({tag:Ct,exception:Lt,info:Vt,statsigOptions:Et(this._options)},Object.assign(Object.assign({},Kt),{sdkType:$t}));yield((Bt=(Tt=(Rt=this._options)===null||Rt===void 0?void 0:Rt.networkConfig)===null||Tt===void 0?void 0:Tt.networkOverrideFunc)!==null&&Bt!==void 0?Bt:fetch)(Be.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String($t),"STATSIG-SDK-VERSION":String(Kt.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(Ut)}),(Dt=this._emitter)===null||Dt===void 0||Dt.call(this,{name:"error",error:kt,tag:Ct})}).then(()=>{}).catch(()=>{})}catch{}}}Be.ErrorBoundary=ht;function gt(yt){return yt instanceof Error?yt:typeof yt=="string"?new Error(yt):new Error("An unknown error occurred.")}function At(yt){try{return JSON.stringify(yt)}catch{return ft}}function xt(yt){const Ct=new Set;let kt=Object.getPrototypeOf(yt);for(;kt&&kt!==Object.prototype;)Object.getOwnPropertyNames(kt).filter(vt=>typeof(kt==null?void 0:kt[vt])=="function").forEach(vt=>Ct.add(vt)),kt=Object.getPrototypeOf(kt);return Array.from(Ct)}function Et(yt){if(!yt)return{};const Ct={};return Object.keys(yt).forEach(kt=>{const vt=kt,bt=yt[vt];switch(typeof bt){case"number":case"bigint":case"boolean":Ct[String(vt)]=bt;break;case"string":bt.length<50?Ct[String(vt)]=bt:Ct[String(vt)]="set";break;case"object":vt==="environment"?Ct.environment=bt:vt==="networkConfig"?Ct.networkConfig=bt:Ct[String(vt)]=bt!=null?"set":"unset";break}}),Ct}}(ErrorBoundary);var EvaluationOptions={};Object.defineProperty(EvaluationOptions,"__esModule",{value:!0});var EvaluationTypes={};Object.defineProperty(EvaluationTypes,"__esModule",{value:!0});var InitializeResponse={};Object.defineProperty(InitializeResponse,"__esModule",{value:!0});var MemoKey={};Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const EXIST_KEYS=new Set([]),DO_NOT_MEMO_KEYS=new Set(["userPersistedValues"]);function createMemoKey(Be,Le,Ye){let tt=`${Be}|${Le}`;if(!Ye)return tt;for(const nt of Object.keys(Ye)){if(DO_NOT_MEMO_KEYS.has(nt))return;EXIST_KEYS.has(nt)?tt+=`|${nt}=true`:tt+=`|${nt}=${Ye[nt]}`}return tt}MemoKey.createMemoKey=createMemoKey;var NetworkCore$1={},NetworkFallbackResolver$1={},DnsTxtQuery={},__awaiter$d=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const FEATURE_ASSETS_DNS_QUERY=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),DNS_QUERY_ENDPOINT="https://cloudflare-dns.com/dns-query",DOMAIN_CHARS=["i","e","d"],MAX_START_LOOKUP=200;function _fetchTxtRecords(Be){return __awaiter$d(this,void 0,void 0,function*(){const Le=yield Be(DNS_QUERY_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:FEATURE_ASSETS_DNS_QUERY});if(!Le.ok){const nt=new Error("Failed to fetch TXT records from DNS");throw nt.name="DnsTxtFetchError",nt}const Ye=yield Le.arrayBuffer(),tt=new Uint8Array(Ye);return _parseDnsResponse(tt)})}DnsTxtQuery._fetchTxtRecords=_fetchTxtRecords;function _parseDnsResponse(Be){const Le=Be.findIndex((tt,nt)=>nt<MAX_START_LOOKUP&&String.fromCharCode(tt)==="="&&DOMAIN_CHARS.includes(String.fromCharCode(Be[nt-1])));if(Le===-1){const tt=new Error("Failed to parse TXT records from DNS");throw tt.name="DnsTxtParseError",tt}let Ye="";for(let tt=Le-1;tt<Be.length;tt++)Ye+=String.fromCharCode(Be[tt]);return Ye.split(",")}var __awaiter$c=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkFallbackResolver$1,"__esModule",{value:!0}),NetworkFallbackResolver$1._isDomainFailure=NetworkFallbackResolver$1.NetworkFallbackResolver=void 0;const DnsTxtQuery_1=DnsTxtQuery,Hashing_1=Hashing,Log_1$3=Log,StorageProvider_1$1=StorageProvider,DEFAULT_TTL_MS=7*24*60*60*1e3,COOLDOWN_TIME_MS=4*60*60*1e3;class NetworkFallbackResolver{constructor(Le){var Ye;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(Ye=Le.networkConfig)===null||Ye===void 0?void 0:Ye.networkOverrideFunc}setErrorBoundary(Le){this._errorBoundary=Le}tryBumpExpiryTime(Le,Ye){var tt;const nt=(tt=this._fallbackInfo)===null||tt===void 0?void 0:tt[Ye.endpoint];nt&&(nt.expiryTime=Date.now()+DEFAULT_TTL_MS,_tryWriteFallbackInfoToCache(Le,Object.assign(Object.assign({},this._fallbackInfo),{[Ye.endpoint]:nt})))}getActiveFallbackUrl(Le,Ye){var tt,nt;if(Ye.customUrl!=null&&Ye.fallbackUrls!=null)return null;let ft=this._fallbackInfo;ft==null&&(ft=(tt=_readFallbackInfoFromCache(Le))!==null&&tt!==void 0?tt:{},this._fallbackInfo=ft);const ht=ft[Ye.endpoint];return!ht||Date.now()>((nt=ht.expiryTime)!==null&&nt!==void 0?nt:0)||Ye.getChecksum()!==ht.urlConfigChecksum?(delete ft[Ye.endpoint],this._fallbackInfo=ft,_tryWriteFallbackInfoToCache(Le,this._fallbackInfo),null):ht.url?ht.url:null}tryFetchUpdatedFallbackInfo(Le,Ye,tt,nt){return __awaiter$c(this,void 0,void 0,function*(){var ft,ht;try{if(!_isDomainFailure(tt,nt))return!1;const At=Ye.customUrl==null&&Ye.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(Ye):Ye.fallbackUrls,xt=this._pickNewFallbackUrl((ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[Ye.endpoint],At);return xt?(this._updateFallbackInfoWithNewUrl(Le,Ye,xt),!0):!1}catch(gt){return(ht=this._errorBoundary)===null||ht===void 0||ht.logError("tryFetchUpdatedFallbackInfo",gt),!1}})}_updateFallbackInfoWithNewUrl(Le,Ye,tt){var nt,ft,ht;const gt={urlConfigChecksum:Ye.getChecksum(),url:tt,expiryTime:Date.now()+DEFAULT_TTL_MS,previous:[]},At=Ye.endpoint,xt=(nt=this._fallbackInfo)===null||nt===void 0?void 0:nt[At];xt&>.previous.push(...xt.previous),gt.previous.length>10&&(gt.previous=[]);const Et=(ht=(ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[At])===null||ht===void 0?void 0:ht.url;Et!=null&>.previous.push(Et),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[At]:gt}),_tryWriteFallbackInfoToCache(Le,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(Le){return __awaiter$c(this,void 0,void 0,function*(){var Ye;const tt=this._dnsQueryCooldowns[Le.endpoint];if(tt&&Date.now()<tt)return null;this._dnsQueryCooldowns[Le.endpoint]=Date.now()+COOLDOWN_TIME_MS;const nt=[],ft=yield(0,DnsTxtQuery_1._fetchTxtRecords)((Ye=this._networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch),ht=_extractPathFromUrl(Le.defaultUrl);for(const gt of ft){if(!gt.startsWith(Le.endpointDnsKey+"="))continue;const At=gt.split("=");if(At.length>1){let xt=At[1];xt.endsWith("/")&&(xt=xt.slice(0,-1)),nt.push(`https://${xt}${ht}`)}}return nt})}_pickNewFallbackUrl(Le,Ye){var tt;if(Ye==null)return null;const nt=new Set((tt=Le==null?void 0:Le.previous)!==null&&tt!==void 0?tt:[]),ft=Le==null?void 0:Le.url;let ht=null;for(const gt of Ye){const At=gt.endsWith("/")?gt.slice(0,-1):gt;if(!nt.has(gt)&&At!==ft){ht=At;break}}return ht}}NetworkFallbackResolver$1.NetworkFallbackResolver=NetworkFallbackResolver;function _isDomainFailure(Be,Le){var Ye;const tt=(Ye=Be==null?void 0:Be.toLowerCase())!==null&&Ye!==void 0?Ye:"";return Le||tt.includes("uncaught exception")||tt.includes("failed to fetch")||tt.includes("networkerror when attempting to fetch resource")}NetworkFallbackResolver$1._isDomainFailure=_isDomainFailure;function _getFallbackInfoStorageKey(Be){return`statsig.network_fallback.${(0,Hashing_1._DJB2)(Be)}`}function _tryWriteFallbackInfoToCache(Be,Le){const Ye=_getFallbackInfoStorageKey(Be);if(!Le||Object.keys(Le).length===0){StorageProvider_1$1.Storage.removeItem(Ye);return}StorageProvider_1$1.Storage.setItem(Ye,JSON.stringify(Le))}function _readFallbackInfoFromCache(Be){const Le=_getFallbackInfoStorageKey(Be),Ye=StorageProvider_1$1.Storage.getItem(Le);if(!Ye)return null;try{return JSON.parse(Ye)}catch{return Log_1$3.Log.error("Failed to parse FallbackInfo"),null}}function _extractPathFromUrl(Be){try{return new URL(Be).pathname}catch{return null}}var SDKFlags={};Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const FLAGMAP={};SDKFlags.SDKFlags={setFlags:(Be,Le)=>{FLAGMAP[Be]=Le},get:(Be,Le)=>{var Ye,tt;return(tt=(Ye=FLAGMAP[Be])===null||Ye===void 0?void 0:Ye[Le])!==null&&tt!==void 0?tt:!1}};var SessionID={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigSession=Be.SessionID=void 0;const Le=$_StatsigGlobal,Ye=CacheKey,tt=Log,nt=StorageProvider,ft=UUID,ht=30*60*1e3,gt=4*60*60*1e3,At={};Be.SessionID={get:Rt=>Be.StatsigSession.get(Rt).data.sessionID},Be.StatsigSession={get:Rt=>{At[Rt]==null&&(At[Rt]=xt(Rt));const Tt=At[Rt];return yt(Tt)},overrideInitialSessionID:(Rt,Tt)=>{At[Tt]=Et(Rt,Tt)}};function xt(Rt){let Tt=wt(Rt);const Bt=Date.now();return Tt||(Tt={sessionID:(0,ft.getUUID)(),startTime:Bt,lastUpdate:Bt}),{data:Tt,sdkKey:Rt}}function Et(Rt,Tt){const Bt=Date.now();return{data:{sessionID:Rt,startTime:Bt,lastUpdate:Bt},sdkKey:Tt}}function yt(Rt){const Tt=Date.now(),Bt=Rt.data,Dt=Rt.sdkKey;if(kt(Bt)||vt(Bt)){Bt.sessionID=(0,ft.getUUID)(),Bt.startTime=Tt;const Nt=__STATSIG__==null?void 0:__STATSIG__.instance(Dt);Nt&&Nt.$emt({name:"session_expired"})}Bt.lastUpdate=Tt,It(Bt,Rt.sdkKey),clearTimeout(Rt.idleTimeoutID),clearTimeout(Rt.ageTimeoutID);const Pt=Tt-Bt.startTime;return Rt.idleTimeoutID=Ct(Dt,ht),Rt.ageTimeoutID=Ct(Dt,gt-Pt),Rt}function Ct(Rt,Tt){return setTimeout(()=>{var Bt;const Dt=(Bt=(0,Le._getStatsigGlobal)())===null||Bt===void 0?void 0:Bt.instance(Rt);Dt&&Dt.$emt({name:"session_expired"})},Tt)}function kt({lastUpdate:Rt}){return Date.now()-Rt>ht}function vt({startTime:Rt}){return Date.now()-Rt>gt}function bt(Rt){return`statsig.session_id.${(0,Ye._getStorageKey)(Rt)}`}function It(Rt,Tt){const Bt=bt(Tt);try{(0,nt._setObjectInStorage)(Bt,Rt)}catch{tt.Log.warn("Failed to save SessionID")}}function wt(Rt){const Tt=bt(Rt);return(0,nt._getObjectFromStorage)(Tt)}})(SessionID);var StatsigClientEventEmitter={};Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"};var __awaiter$b=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkCore$1,"__esModule",{value:!0}),NetworkCore$1.NetworkCore=void 0;const __StatsigGlobal_1$1=$_StatsigGlobal,Diagnostics_1=Diagnostics,Log_1$2=Log,NetworkConfig_1=NetworkConfig,NetworkFallbackResolver_1=NetworkFallbackResolver$1,SDKFlags_1=SDKFlags,SDKType_1=SDKType,SafeJs_1$1=SafeJs,SessionID_1$1=SessionID,StableID_1$1=StableID,StatsigClientEventEmitter_1=StatsigClientEventEmitter,StatsigMetadata_1=StatsigMetadata,StatsigOptionsCommon_1$1=StatsigOptionsCommon,VisibilityObserving_1=VisibilityObserving,DEFAULT_TIMEOUT_MS=1e4,BACKOFF_BASE_MS=500,BACKOFF_MAX_MS=3e4,RATE_LIMIT_WINDOW_MS=1e3,RATE_LIMIT_MAX_REQ_COUNT=50,LEAK_RATE=RATE_LIMIT_MAX_REQ_COUNT/RATE_LIMIT_WINDOW_MS,RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);class NetworkCore{constructor(Le,Ye){this._emitter=Ye,this._errorBoundary=null,this._timeout=DEFAULT_TIMEOUT_MS,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,Le&&(this._options=Le),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(Le))}setLogEventCompressionMode(Le){this._options.logEventCompressionMode=Le}setErrorBoundary(Le){this._errorBoundary=Le,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(Le)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const Le=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,Le}beacon(Le){if(!_ensureValidSdkKey(Le))return!1;const Ye=this._getInternalRequestArgs("POST",Le),tt=this._getPopulatedURL(Ye),nt=navigator;return nt.sendBeacon.bind(nt)(tt,Ye.body)}post(Le){return __awaiter$b(this,void 0,void 0,function*(){const Ye=this._getInternalRequestArgs("POST",Le);return this._tryEncodeBody(Ye),yield this._tryToCompressBody(Ye),this._sendRequest(Ye)})}get(Le){const Ye=this._getInternalRequestArgs("GET",Le);return this._sendRequest(Ye)}_sendRequest(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye,tt,nt,ft;if(!_ensureValidSdkKey(Le)||this._netConfig.preventAllNetworkTraffic)return null;const{method:ht,body:gt,retries:At,attempt:xt}=Le,Et=Le.urlConfig.endpoint;if(this._isRateLimited(Et))return Log_1$2.Log.warn(`Request to ${Et} was blocked because you are making requests too frequently.`),null;const yt=xt??1;let Ct=!1;const kt=this._getPopulatedURL(Le);let vt=null;const bt=(0,VisibilityObserving_1._isUnloading)();try{const It={method:ht,body:gt,headers:Object.assign({},Le.headers),priority:Le.priority,keepalive:bt};_tryMarkInitStart(Le,yt);const wt=this._leakyBucket[Et];wt&&(wt.lastRequestTime=Date.now(),this._leakyBucket[Et]=wt);const Rt=(Ye=this._netConfig.networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch;let Tt;if(vt=yield Promise.race([Rt(kt,It).finally(()=>clearTimeout(Tt)),new Promise((Dt,Pt)=>{Tt=setTimeout(()=>{Ct=!0,Pt(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!vt.ok){const Dt=yield vt.text().catch(()=>"No Text"),Pt=new Error(`NetworkError: ${kt} ${Dt}`);throw Pt.name="NetworkError",Pt}const Bt=yield vt.text();return _tryMarkInitEnd(Le,vt,yt,Bt),this._fallbackResolver.tryBumpExpiryTime(Le.sdkKey,Le.urlConfig),{body:Bt,code:vt.status}}catch(It){const wt=_getErrorMessage(It),Rt=_didTimeout(wt??"",Ct);if(_tryMarkInitEnd(Le,vt,yt,"",It),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(Le.sdkKey,Le.urlConfig,wt,Rt))&&(Le.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(Le.sdkKey,Le.urlConfig)),!At||yt>At||!RETRYABLE_CODES.has((tt=vt==null?void 0:vt.status)!==null&&tt!==void 0?tt:500)){(nt=this._emitter)===null||nt===void 0||nt.call(this,{name:"error",error:It,tag:StatsigClientEventEmitter_1.ErrorTag.NetworkError,requestArgs:Le});const Bt=`A networking error occurred during ${ht} request to ${kt}.`;return Log_1$2.Log.error(Bt,wt,It),(ft=this._errorBoundary)===null||ft===void 0||ft.attachErrorIfNoneExists(Bt),null}return yield _exponentialBackoff(yt),this._sendRequest(Object.assign(Object.assign({},Le),{retries:At,attempt:yt+1}))}})}_getLogEventCompressionMode(Le){let Ye=Le==null?void 0:Le.logEventCompressionMode;return!Ye&&(Le==null?void 0:Le.disableCompression)===!0&&(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled),Ye||(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled),Ye}_isRateLimited(Le){var Ye;const tt=Date.now(),nt=(Ye=this._leakyBucket[Le])!==null&&Ye!==void 0?Ye:{count:0,lastRequestTime:tt},ft=tt-nt.lastRequestTime,ht=Math.floor(ft*LEAK_RATE);return nt.count=Math.max(0,nt.count-ht),nt.count>=RATE_LIMIT_MAX_REQ_COUNT?!0:(nt.count+=1,nt.lastRequestTime=tt,this._leakyBucket[Le]=nt,!1)}_getPopulatedURL(Le){var Ye;const tt=(Ye=Le.fallbackUrl)!==null&&Ye!==void 0?Ye:Le.urlConfig.getUrl();(Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize||Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=tt);const nt=Object.assign({[NetworkConfig_1.NetworkParam.SdkKey]:Le.sdkKey,[NetworkConfig_1.NetworkParam.SdkType]:SDKType_1.SDKType._get(Le.sdkKey),[NetworkConfig_1.NetworkParam.SdkVersion]:StatsigMetadata_1.SDK_VERSION,[NetworkConfig_1.NetworkParam.Time]:String(Date.now()),[NetworkConfig_1.NetworkParam.SessionID]:SessionID_1$1.SessionID.get(Le.sdkKey)},Le.params),ft=Object.keys(nt).map(ht=>`${encodeURIComponent(ht)}=${encodeURIComponent(nt[ht])}`).join("&");return`${tt}${ft?`?${ft}`:""}`}_tryEncodeBody(Le){var Ye;const tt=(0,SafeJs_1$1._getWindowSafe)(),nt=Le.body;if(!(!Le.isStatsigEncodable||this._options.disableStatsigEncoding||typeof nt!="string"||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-encode")!=null||!(tt!=null&&tt.btoa)))try{Le.body=tt.btoa(nt).split("").reverse().join(""),Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.StatsigEncoded]:"1"})}catch(ft){Log_1$2.Log.warn(`Request encoding failed for ${Le.urlConfig.getUrl()}`,ft)}}_tryToCompressBody(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye;const tt=Le.body;if(!(typeof tt!="string"||!_allowCompression(Le,this._options)))try{const nt=new TextEncoder().encode(tt),ft=new CompressionStream("gzip"),ht=ft.writable.getWriter();ht.write(nt).catch(Log_1$2.Log.error),ht.close().catch(Log_1$2.Log.error);const gt=ft.readable.getReader(),At=[];let xt;for(;!(xt=yield gt.read()).done;)At.push(xt.value);const Et=At.reduce((kt,vt)=>kt+vt.length,0),yt=new Uint8Array(Et);let Ct=0;for(const kt of At)yt.set(kt,Ct),Ct+=kt.length;Le.body=yt,Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.IsGzipped]:"1"})}catch(nt){Log_1$2.Log.warn(`Request compression failed for ${Le.urlConfig.getUrl()}`,nt)}})}_getInternalRequestArgs(Le,Ye){const tt=this._fallbackResolver.getActiveFallbackUrl(Ye.sdkKey,Ye.urlConfig),nt=Object.assign(Object.assign({},Ye),{method:Le,fallbackUrl:tt});return"data"in Ye&&_populateRequestBody(nt,Ye.data),nt}}NetworkCore$1.NetworkCore=NetworkCore;const _ensureValidSdkKey=Be=>Be.sdkKey?!0:(Log_1$2.Log.warn("Unable to make request without an SDK key"),!1),_populateRequestBody=(Be,Le)=>{const{sdkKey:Ye,fallbackUrl:tt}=Be,nt=StableID_1$1.StableID.get(Ye),ft=SessionID_1$1.SessionID.get(Ye),ht=SDKType_1.SDKType._get(Ye);Be.body=JSON.stringify(Object.assign(Object.assign({},Le),{statsigMetadata:Object.assign(Object.assign({},StatsigMetadata_1.StatsigMetadataProvider.get()),{stableID:nt,sessionID:ft,sdkType:ht,fallbackUrl:tt})}))};function _allowCompression(Be,Le){if(!Be.isCompressable||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const Ye=Be.urlConfig.customUrl!=null||Be.urlConfig.fallbackUrls!=null,tt=SDKFlags_1.SDKFlags.get(Be.sdkKey,"enable_log_event_compression")===!0;switch(Le.logEventCompressionMode){case StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled:return!1;case StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled:return!(Ye&&!tt);case StatsigOptionsCommon_1$1.LogEventCompressionMode.Forced:return!0;default:return!1}}function _getErrorMessage(Be){return typeof Be=="string"?Be:Be instanceof Error?`${Be.name}: ${Be.message}`:"Unknown Error"}function _didTimeout(Be,Le){return Be.includes("Timeout")||Le}function _tryMarkInitStart(Be,Le){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqStart(Be.sdkKey,{attempt:Le})}function _tryMarkInitEnd(Be,Le,Ye,tt,nt){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqEnd(Be.sdkKey,Diagnostics_1.Diagnostics._getDiagnosticsData(Le,Ye,tt,nt))}function _exponentialBackoff(Be){return __awaiter$b(this,void 0,void 0,function*(){yield new Promise(Le=>setTimeout(Le,Math.min(BACKOFF_BASE_MS*(Be*Be),BACKOFF_MAX_MS)))})}var OverrideAdapter={};Object.defineProperty(OverrideAdapter,"__esModule",{value:!0});var ParamStoreTypes={};Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0});var SizeOf={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._fastApproxSizeOf=void 0;const Le=2,Ye=1,tt=(nt,ft)=>{let ht=0;const gt=Object.keys(nt);for(let At=0;At<gt.length;At++){const xt=gt[At],Et=nt[xt];if(ht+=xt.length,typeof Et=="object"&&Et!==null?ht+=(0,Be._fastApproxSizeOf)(Et,ft)+Le:ht+=String(Et).length+Ye,ht>=ft)return ht}return ht};Be._fastApproxSizeOf=tt})(SizeOf);var StatsigClientBase$1={},__awaiter$a=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClientBase$1,"__esModule",{value:!0}),StatsigClientBase$1.StatsigClientBase=void 0;const __StatsigGlobal_1=$_StatsigGlobal,ErrorBoundary_1=ErrorBoundary,EventLogger_1=EventLogger$1,Log_1$1=Log,MemoKey_1=MemoKey,SafeJs_1=SafeJs,SessionID_1=SessionID,StableID_1=StableID,StatsigOptionsCommon_1=StatsigOptionsCommon,StorageProvider_1=StorageProvider,MAX_MEMO_CACHE_SIZE=3e3;class StatsigClientBase{constructor(Le,Ye,tt,nt){var ft,ht,gt,At;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const xt=this.$emt.bind(this);(nt==null?void 0:nt.logLevel)!=null&&(Log_1$1.Log.level=nt.logLevel),nt!=null&&nt.disableStorage&&StorageProvider_1.Storage._setDisabled(!0),nt!=null&&nt.initialSessionID&&SessionID_1.StatsigSession.overrideInitialSessionID(nt.initialSessionID,Le),nt!=null&&nt.storageProvider&&StorageProvider_1.Storage._setProvider(nt.storageProvider),nt!=null&&nt.enableCookies&&StableID_1.StableID._setCookiesEnabled(Le,nt.enableCookies),nt!=null&&nt.disableStableID&&StableID_1.StableID._setDisabled(Le,!0),this._sdkKey=Le,this._options=nt??{},this._memoCache={},this.overrideAdapter=(ft=nt==null?void 0:nt.overrideAdapter)!==null&&ft!==void 0?ft:null,this._logger=new EventLogger_1.EventLogger(Le,xt,tt,nt),this._errorBoundary=new ErrorBoundary_1.ErrorBoundary(Le,nt,xt),this._errorBoundary.wrap(this),this._errorBoundary.wrap(Ye),this._errorBoundary.wrap(this._logger),tt.setErrorBoundary(this._errorBoundary),this.dataAdapter=Ye,this.dataAdapter.attach(Le,nt,tt),this.storageProvider=StorageProvider_1.Storage,(At=(gt=(ht=this.overrideAdapter)===null||ht===void 0?void 0:ht.loadFromStorage)===null||gt===void 0?void 0:gt.call(ht))===null||At===void 0||At.catch(Et=>this._errorBoundary.logError("OA::loadFromStorage",Et)),this._primeReadyRipcord(),_assignGlobalInstance(Le,this)}updateRuntimeOptions(Le){Le.loggingEnabled?(this._options.loggingEnabled=Le.loggingEnabled,this._logger.setLoggingEnabled(Le.loggingEnabled)):Le.disableLogging!=null&&(this._options.disableLogging=Le.disableLogging,this._logger.setLoggingEnabled(Le.disableLogging?"disabled":"browser-only")),Le.disableStorage!=null&&(this._options.disableStorage=Le.disableStorage,StorageProvider_1.Storage._setDisabled(Le.disableStorage)),Le.enableCookies!=null&&(this._options.enableCookies=Le.enableCookies,StableID_1.StableID._setCookiesEnabled(this._sdkKey,Le.enableCookies)),Le.logEventCompressionMode?this._logger.setLogEventCompressionMode(Le.logEventCompressionMode):Le.disableCompression&&this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return __awaiter$a(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(Le,Ye){this._listeners[Le]||(this._listeners[Le]=[]),this._listeners[Le].push(Ye)}off(Le,Ye){if(this._listeners[Le]){const tt=this._listeners[Le].indexOf(Ye);tt!==-1&&this._listeners[Le].splice(tt,1)}}$on(Le,Ye){Ye.__isInternal=!0,this.on(Le,Ye)}$emt(Le){var Ye;const tt=nt=>{try{nt(Le)}catch(ft){if(nt.__isInternal===!0){this._errorBoundary.logError(`__emit:${Le.name}`,ft);return}Log_1$1.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",Le)}};this._listeners[Le.name]&&this._listeners[Le.name].forEach(nt=>tt(nt)),(Ye=this._listeners["*"])===null||Ye===void 0||Ye.forEach(tt)}_setStatus(Le,Ye){this.loadingStatus=Le,this._memoCache={},this.$emt({name:"values_updated",status:Le,values:Ye})}_enqueueExposure(Le,Ye,tt){if((tt==null?void 0:tt.disableExposureLog)===!0){this._logger.incrementNonExposureCount(Le);return}this._logger.enqueue(Ye)}_memoize(Le,Ye){return(tt,nt)=>{if(this._options.disableEvaluationMemoization)return Ye(tt,nt);const ft=(0,MemoKey_1.createMemoKey)(Le,tt,nt);return ft?(ft in this._memoCache||(Object.keys(this._memoCache).length>=MAX_MEMO_CACHE_SIZE&&(this._memoCache={}),this._memoCache[ft]=Ye(tt,nt)),this._memoCache[ft]):Ye(tt,nt)}}}StatsigClientBase$1.StatsigClientBase=StatsigClientBase;function _assignGlobalInstance(Be,Le){var Ye;if((0,SafeJs_1._isServerEnv)())return;const tt=(0,__StatsigGlobal_1._getStatsigGlobal)(),nt=(Ye=tt.instances)!==null&&Ye!==void 0?Ye:{},ft=Le;nt[Be]!=null&&Log_1$1.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),nt[Be]=ft,tt.firstInstance||(tt.firstInstance=ft),tt.instances=nt,__STATSIG__=tt}var StatsigDataAdapter={};Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached";var StatsigPlugin={};Object.defineProperty(StatsigPlugin,"__esModule",{value:!0});var StatsigTypeFactories={};Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const Log_1=Log,TypingUtils_1=TypingUtils;function _makeEvaluation(Be,Le,Ye,tt){var nt;return{name:Be,details:Le,ruleID:(nt=Ye==null?void 0:Ye.rule_id)!==null&&nt!==void 0?nt:"",__evaluation:Ye,value:tt}}function _makeFeatureGate(Be,Le,Ye){var tt;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,(Ye==null?void 0:Ye.value)===!0)),{idType:(tt=Ye==null?void 0:Ye.id_type)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeFeatureGate=_makeFeatureGate;function _makeDynamicConfig(Be,Le,Ye){var tt,nt;const ft=(tt=Ye==null?void 0:Ye.value)!==null&&tt!==void 0?tt:{};return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,ft)),{idType:(nt=Ye==null?void 0:Ye.id_type)!==null&&nt!==void 0?nt:null,get:_makeTypedGet(Be,Ye==null?void 0:Ye.value)})}StatsigTypeFactories._makeDynamicConfig=_makeDynamicConfig;function _makeExperiment(Be,Le,Ye){var tt;const nt=_makeDynamicConfig(Be,Le,Ye);return Object.assign(Object.assign({},nt),{groupName:(tt=Ye==null?void 0:Ye.group_name)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeExperiment=_makeExperiment;function _makeLayer(Be,Le,Ye,tt){var nt,ft;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,void 0)),{get:_makeTypedGet(Be,Ye==null?void 0:Ye.value,tt),groupName:(nt=Ye==null?void 0:Ye.group_name)!==null&&nt!==void 0?nt:null,__value:(ft=Ye==null?void 0:Ye.value)!==null&&ft!==void 0?ft:{}})}StatsigTypeFactories._makeLayer=_makeLayer;function _mergeOverride(Be,Le,Ye,tt){return Object.assign(Object.assign(Object.assign({},Be),Le),{get:_makeTypedGet(Be.name,Ye,tt)})}StatsigTypeFactories._mergeOverride=_mergeOverride;function _makeTypedGet(Be,Le,Ye){return(tt,nt)=>{var ft;const ht=(ft=Le==null?void 0:Le[tt])!==null&&ft!==void 0?ft:null;return ht==null?nt??null:nt!=null&&!(0,TypingUtils_1._isTypeMatch)(ht,nt)?(Log_1.Log.warn(`Parameter type mismatch. '${Be}.${tt}' was found to be type '${typeof ht}' but fallback/return type is '${typeof nt}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),nt??null):(Ye==null||Ye(tt),ht)}}StatsigTypeFactories._makeTypedGet=_makeTypedGet;var StatsigTypes={};Object.defineProperty(StatsigTypes,"__esModule",{value:!0});var StatsigUpdateDetails={};Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;const createUpdateDetails=(Be,Le,Ye,tt,nt,ft)=>({duration:Ye,source:Le,success:Be,error:tt,sourceUrl:nt,warnings:ft});StatsigUpdateDetails.createUpdateDetails=createUpdateDetails,StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt);var kt=Object.getOwnPropertyDescriptor(Et,yt);(!kt||("get"in kt?!Et.__esModule:kt.writable||kt.configurable))&&(kt={enumerable:!0,get:function(){return Et[yt]}}),Object.defineProperty(xt,Ct,kt)}:function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt),xt[Ct]=Et[yt]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Et){for(var yt in xt)yt!=="default"&&!Object.prototype.hasOwnProperty.call(Et,yt)&&Le(Et,xt,yt)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.Storage=Be.Log=Be.EventLogger=Be.Diagnostics=void 0;const tt=$_StatsigGlobal,nt=Diagnostics;Object.defineProperty(Be,"Diagnostics",{enumerable:!0,get:function(){return nt.Diagnostics}});const ft=EventLogger$1;Object.defineProperty(Be,"EventLogger",{enumerable:!0,get:function(){return ft.EventLogger}});const ht=Log;Object.defineProperty(Be,"Log",{enumerable:!0,get:function(){return ht.Log}});const gt=StatsigMetadata,At=StorageProvider;Object.defineProperty(Be,"Storage",{enumerable:!0,get:function(){return At.Storage}}),Ye($_StatsigGlobal,Be),Ye(CacheKey,Be),Ye(ClientInterfaces,Be),Ye(DataAdapterCore$1,Be),Ye(Diagnostics,Be),Ye(DownloadConfigSpecsResponse,Be),Ye(ErrorBoundary,Be),Ye(EvaluationOptions,Be),Ye(EvaluationTypes,Be),Ye(Hashing,Be),Ye(InitializeResponse,Be),Ye(Log,Be),Ye(MemoKey,Be),Ye(NetworkConfig,Be),Ye(NetworkCore$1,Be),Ye(OverrideAdapter,Be),Ye(ParamStoreTypes,Be),Ye(SafeJs,Be),Ye(SDKType,Be),Ye(SessionID,Be),Ye(SizeOf,Be),Ye(StableID,Be),Ye(StatsigClientBase$1,Be),Ye(StatsigClientEventEmitter,Be),Ye(StatsigDataAdapter,Be),Ye(StatsigEvent,Be),Ye(StatsigMetadata,Be),Ye(StatsigOptionsCommon,Be),Ye(StatsigPlugin,Be),Ye(StatsigTypeFactories,Be),Ye(StatsigTypes,Be),Ye(StatsigUser,Be),Ye(StorageProvider,Be),Ye(TypedJsonParse,Be),Ye(TypingUtils,Be),Ye(UrlConfiguration$1,Be),Ye(UUID,Be),Ye(VisibilityObserving,Be),Ye(StatsigUpdateDetails,Be),Ye(SDKFlags,Be),Object.assign((0,tt._getStatsigGlobal)(),{Log:ht.Log,SDK_VERSION:gt.SDK_VERSION})}(src$1);var StatsigClient$1={},EvaluationStore$1={},V1InitializeContainer$1={};Object.defineProperty(V1InitializeContainer$1,"__esModule",{value:!0}),V1InitializeContainer$1.V1InitializeContainer=void 0;const client_core_1$7=src$1;class V1InitializeContainer{constructor(Le){this._values=Le}getGate(Le){return this._getResultFromLookup(this._values.feature_gates,Le)}getConfig(Le){return this._getResultFromLookup(this._values.dynamic_configs,Le)}getLayer(Le){return this._getResultFromLookup(this._values.layer_configs,Le)}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$7._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V1InitializeContainer$1.V1InitializeContainer=V1InitializeContainer;var V2InitializeContainer$1={};Object.defineProperty(V2InitializeContainer$1,"__esModule",{value:!0}),V2InitializeContainer$1.V2InitializeContainer=void 0;const client_core_1$6=src$1;class V2InitializeContainer{constructor(Le){this._values=Le}getGate(Le){var Ye,tt,nt;const ft=this._getResultFromLookup(this._values.feature_gates,Le);return ft?{name:Le,value:ft.v===!0,rule_id:(Ye=ft.r)!==null&&Ye!==void 0?Ye:"default",secondary_exposures:(tt=ft.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ft.i)!==null&&nt!==void 0?nt:""}:null}getConfig(Le){var Ye,tt,nt,ft;const ht=this._getResultFromLookup(this._values.dynamic_configs,Le);return ht?{name:Le,value:(Ye=this._values.values[ht.v])!==null&&Ye!==void 0?Ye:{},rule_id:ht.r,secondary_exposures:(tt=ht.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ht.i)!==null&&nt!==void 0?nt:"",is_user_in_experiment:ht.ue===!0,passed:ht.p===!0,group_name:(ft=ht.gn)!==null&&ft!==void 0?ft:void 0,is_experiment_active:ht.ea===!0,group:ht.r,is_device_based:ht.i==="stableID"}:null}getLayer(Le){var Ye,tt,nt,ft,ht,gt;const At=this._getResultFromLookup(this._values.layer_configs,Le);return At?{name:Le,value:(Ye=this._values.values[At.v])!==null&&Ye!==void 0?Ye:{},rule_id:At.r,secondary_exposures:(tt=At.s)!==null&&tt!==void 0?tt:[],is_user_in_experiment:At.ue===!0,group_name:(nt=At.gn)!==null&&nt!==void 0?nt:void 0,is_experiment_active:At.ea===!0,group:At.r,is_device_based:At.i==="stableID",allocated_experiment_name:(ft=At.ae)!==null&&ft!==void 0?ft:"",explicit_parameters:(ht=At.ep)!==null&&ht!==void 0?ht:[],undelegated_secondary_exposures:(gt=At.us)!==null&>!==void 0?gt:[],parameter_rule_ids:At.pr}:null}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$6._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V2InitializeContainer$1.V2InitializeContainer=V2InitializeContainer,Object.defineProperty(EvaluationStore$1,"__esModule",{value:!0});const client_core_1$5=src$1,V1InitializeContainer_1=V1InitializeContainer$1,V2InitializeContainer_1=V2InitializeContainer$1;class EvaluationStore{constructor(Le){this._sdkKey=Le,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,client_core_1$5._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(Le,Ye){var tt,nt;if(!Le)return!1;const ft=(0,client_core_1$5._typedJsonParse)(Le.data,"has_updates","EvaluationResponse");return ft==null?!1:(this._source=Le.source,(ft==null?void 0:ft.has_updates)!==!0||((tt=ft.time)!==null&&tt!==void 0?tt:0)<this._lcut||(this._rawValues=Le.data,this._lcut=ft.time,this._receivedAt=Le.receivedAt,ft.response_format==="init-v2"?this._values=new V2InitializeContainer_1.V2InitializeContainer(ft):this._values=new V1InitializeContainer_1.V1InitializeContainer(ft),this._bootstrapMetadata=this._extractBootstrapMetadata(Le.source,ft),Le.source&&ft.user&&this._setWarningState(Ye,ft),client_core_1$5.SDKFlags.setFlags(this._sdkKey,(nt=ft.sdk_flags)!==null&&nt!==void 0?nt:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(Le){const Ye=this._values?this._values.getGate(Le):null;return this._getDetailedStoreResult(Ye)}getConfig(Le){const Ye=this._values?this._values.getConfig(Le):null;return this._getDetailedStoreResult(Ye)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(Le){const Ye=this._values?this._values.getLayer(Le):null;return this._getDetailedStoreResult(Ye)}getParamStore(Le){const Ye=this._values?this._values.getParamStore(Le):null;return this._getDetailedStoreResult(Ye)}getSource(){return this._source}getExposureMapping(){var Le;return(Le=this._values)===null||Le===void 0?void 0:Le.getExposureMapping()}_extractBootstrapMetadata(Le,Ye){if(Le!=="Bootstrap")return null;const tt={};return Ye.user&&(tt.user=Ye.user),Ye.sdkInfo&&(tt.generatorSDKInfo=Ye.sdkInfo),tt.lcut=Ye.time,tt}_getDetailedStoreResult(Le){return{result:Le,details:this._getDetails(Le==null)}}_setWarningState(Le,Ye){var tt,nt;const ft=client_core_1$5.StableID.get(this._sdkKey);if(((tt=Le.customIDs)===null||tt===void 0?void 0:tt.stableID)!==ft&&(!((nt=Le.customIDs)===null||nt===void 0)&&nt.stableID||ft)){this._warnings.add("StableIDMismatch");return}if("user"in Ye){const ht=Ye.user,gt=Object.assign(Object.assign({},Le),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,client_core_1$5._getFullUserHash)(gt)!==(0,client_core_1$5._getFullUserHash)(ht)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const Le={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(Le.warnings=Array.from(this._warnings)),Le}_getDetails(Le){var Ye,tt;const nt=this.getCurrentSourceDetails();let ft=nt.reason;const ht=(Ye=nt.warnings)!==null&&Ye!==void 0?Ye:[];this._source==="Bootstrap"&&ht.length>0&&(ft=ft+ht[0]),ft!=="Uninitialized"&&ft!=="NoValues"&&(ft=`${ft}:${Le?"Unrecognized":"Recognized"}`);const gt=this._source==="Bootstrap"&&(tt=this._bootstrapMetadata)!==null&&tt!==void 0?tt:void 0;return gt&&(nt.bootstrapMetadata=gt),Object.assign(Object.assign({},nt),{reason:ft})}}EvaluationStore$1.default=EvaluationStore;var Network={},EvaluationResponseDeltas={};Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const client_core_1$4=src$1,MAX_DELTAS_SORT_DEPTH=2;function _resolveDeltasResponse(Be,Le){const Ye=(0,client_core_1$4._typedJsonParse)(Le,"checksum","DeltasEvaluationResponse");if(!Ye)return{hadBadDeltaChecksum:!0};const tt=_mergeDeltasIntoCache(Be,Ye),nt=_handleDeletedEntries(tt),ft=(0,client_core_1$4._DJB2Object)({feature_gates:nt.feature_gates,dynamic_configs:nt.dynamic_configs,layer_configs:nt.layer_configs},MAX_DELTAS_SORT_DEPTH);return ft===Ye.checksumV2?JSON.stringify(nt):{hadBadDeltaChecksum:!0,badChecksum:ft,badMergedConfigs:nt,badFullResponse:Ye.deltas_full_response}}EvaluationResponseDeltas._resolveDeltasResponse=_resolveDeltasResponse;function _mergeDeltasIntoCache(Be,Le){return Object.assign(Object.assign(Object.assign({},Be),Le),{feature_gates:Object.assign(Object.assign({},Be.feature_gates),Le.feature_gates),layer_configs:Object.assign(Object.assign({},Be.layer_configs),Le.layer_configs),dynamic_configs:Object.assign(Object.assign({},Be.dynamic_configs),Le.dynamic_configs)})}function _handleDeletedEntries(Be){const Le=Be;return _deleteEntriesInRecord(Be.deleted_gates,Le.feature_gates),delete Le.deleted_gates,_deleteEntriesInRecord(Be.deleted_configs,Le.dynamic_configs),delete Le.deleted_configs,_deleteEntriesInRecord(Be.deleted_layers,Le.layer_configs),delete Le.deleted_layers,Le}function _deleteEntriesInRecord(Be,Le){Be==null||Be.forEach(Ye=>{delete Le[Ye]})}var __awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const client_core_1$3=src$1,EvaluationResponseDeltas_1=EvaluationResponseDeltas;class StatsigNetwork extends client_core_1$3.NetworkCore{constructor(Le,Ye){super(Le,Ye);const tt=Le==null?void 0:Le.networkConfig;this._option=Le,this._initializeUrlConfig=new client_core_1$3.UrlConfiguration(client_core_1$3.Endpoint._initialize,tt==null?void 0:tt.initializeUrl,tt==null?void 0:tt.api,tt==null?void 0:tt.initializeFallbackUrls)}fetchEvaluations(Le,Ye,tt,nt,ft){return __awaiter$9(this,void 0,void 0,function*(){var ht,gt,At,xt,Et,yt;const Ct=Ye?(0,client_core_1$3._typedJsonParse)(Ye,"has_updates","InitializeResponse"):null;let kt={user:nt,hash:(At=(gt=(ht=this._option)===null||ht===void 0?void 0:ht.networkConfig)===null||gt===void 0?void 0:gt.initializeHashAlgorithm)!==null&&At!==void 0?At:"djb2",deltasResponseRequested:!1,full_checksum:null};if(Ct!=null&&Ct.has_updates){const vt=(Ct==null?void 0:Ct.hash_used)!==((yt=(Et=(xt=this._option)===null||xt===void 0?void 0:xt.networkConfig)===null||Et===void 0?void 0:Et.initializeHashAlgorithm)!==null&&yt!==void 0?yt:"djb2");kt=Object.assign(Object.assign({},kt),{sinceTime:ft&&!vt?Ct.time:0,previousDerivedFields:"derived_fields"in Ct&&ft?Ct.derived_fields:{},deltasResponseRequested:!0,full_checksum:Ct.full_checksum,partialUserMatchSinceTime:vt?0:Ct.time})}return this._fetchEvaluations(Le,Ct,kt,tt)})}_fetchEvaluations(Le,Ye,tt,nt){return __awaiter$9(this,void 0,void 0,function*(){var ft,ht;const gt=yield this.post({sdkKey:Le,urlConfig:this._initializeUrlConfig,data:tt,retries:2,isStatsigEncodable:!0,priority:nt});if((gt==null?void 0:gt.code)===204)return'{"has_updates": false}';if((gt==null?void 0:gt.code)!==200)return(ft=gt==null?void 0:gt.body)!==null&&ft!==void 0?ft:null;if((Ye==null?void 0:Ye.has_updates)!==!0||((ht=gt.body)===null||ht===void 0?void 0:ht.includes('"is_delta":true'))!==!0||tt.deltasResponseRequested!==!0)return gt.body;const At=(0,EvaluationResponseDeltas_1._resolveDeltasResponse)(Ye,gt.body);return typeof At=="string"?At:this._fetchEvaluations(Le,Ye,Object.assign(Object.assign(Object.assign({},tt),At),{deltasResponseRequested:!1}),nt)})}}Network.default=StatsigNetwork;var ParamStoreGetterFactory={};Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const client_core_1$2=src$1,NO_EXPOSURE_OPT={disableExposureLog:!0};function _shouldLogExposure(Be){return Be==null||Be.disableExposureLog===!1}function _shouldReturnFallback(Be,Le){return Le!=null&&!(0,client_core_1$2._isTypeMatch)(Be,Le)}function _getMappedStaticValue(Be,Le){return Be.value}function _getMappedGateValue(Be,Le,Ye){return Be.getFeatureGate(Le.gate_name,_shouldLogExposure(Ye)?void 0:NO_EXPOSURE_OPT).value?Le.pass_value:Le.fail_value}function _getMappedDynamicConfigValue(Be,Le,Ye,tt){const ft=Be.getDynamicConfig(Le.config_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedExperimentValue(Be,Le,Ye,tt){const ft=Be.getExperiment(Le.experiment_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedLayerValue(Be,Le,Ye,tt){const ft=Be.getLayer(Le.layer_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _makeParamStoreGetter(Be,Le,Ye){return(tt,nt)=>{if(Le==null)return nt;const ft=Le[tt];if(ft==null||nt!=null&&(0,client_core_1$2._typeOf)(nt)!==ft.param_type)return nt;switch(ft.ref_type){case"static":return _getMappedStaticValue(ft);case"gate":return _getMappedGateValue(Be,ft,Ye);case"dynamic_config":return _getMappedDynamicConfigValue(Be,ft,nt,Ye);case"experiment":return _getMappedExperimentValue(Be,ft,nt,Ye);case"layer":return _getMappedLayerValue(Be,ft,nt,Ye);default:return nt}}}ParamStoreGetterFactory._makeParamStoreGetter=_makeParamStoreGetter;var StatsigEvaluationsDataAdapter$1={},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter$1,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=void 0;const client_core_1$1=src$1,Network_1$1=Network;class StatsigEvaluationsDataAdapter extends client_core_1$1.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(Le,Ye,tt){super.attach(Le,Ye,tt),tt!==null&&tt instanceof Network_1$1.default?this._network=tt:this._network=new Network_1$1.default(Ye??{})}getDataAsync(Le,Ye,tt){return this._getDataAsyncImpl(Le,(0,client_core_1$1._normalizeUser)(Ye,this._options),tt)}prefetchData(Le,Ye){return this._prefetchDataImpl(Le,Ye)}setData(Le){const Ye=(0,client_core_1$1._typedJsonParse)(Le,"has_updates","data");Ye&&"user"in Ye?super.setData(Le,Ye.user):client_core_1$1.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(Le,Ye){super.setData(Le,Ye)}_fetchFromNetwork(Le,Ye,tt,nt){return __awaiter$8(this,void 0,void 0,function*(){var ft;const ht=yield(ft=this._network)===null||ft===void 0?void 0:ft.fetchEvaluations(this._getSdkKey(),Le,tt==null?void 0:tt.priority,Ye,nt);return ht??null})}_getCacheKey(Le){var Ye;const tt=(0,client_core_1$1._getStorageKey)(this._getSdkKey(),Le,(Ye=this._options)===null||Ye===void 0?void 0:Ye.customUserCacheKeyFunc);return`${client_core_1$1.DataAdapterCachePrefix}.${this._cacheSuffix}.${tt}`}_isCachedResultValidFor204(Le,Ye){return Le.fullUserHash!=null&&Le.fullUserHash===(0,client_core_1$1._getFullUserHash)(Ye)}}StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=StatsigEvaluationsDataAdapter;var __awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClient$1,"__esModule",{value:!0});const client_core_1=src$1,EvaluationStore_1=EvaluationStore$1,Network_1=Network,ParamStoreGetterFactory_1=ParamStoreGetterFactory,StatsigEvaluationsDataAdapter_1=StatsigEvaluationsDataAdapter$1;class StatsigClient extends client_core_1.StatsigClientBase{static instance(Le){const Ye=(0,client_core_1._getStatsigGlobal)().instance(Le);return Ye instanceof StatsigClient?Ye:(client_core_1.Log.warn((0,client_core_1._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new StatsigClient(Le??"",{}))}constructor(Le,Ye,tt=null){var nt,ft;client_core_1.SDKType._setClientType(Le,"javascript-client");const ht=new Network_1.default(tt,At=>{this.$emt(At)});super(Le,(nt=tt==null?void 0:tt.dataAdapter)!==null&&nt!==void 0?nt:new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter,ht,tt),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(client_core_1.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(client_core_1.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(client_core_1.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(client_core_1.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(client_core_1.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(client_core_1.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new EvaluationStore_1.default(Le),this._network=ht,this._user=this._configureUser(Ye,tt),this._sdkInstanceID=(0,client_core_1.getUUID)();const gt=(ft=tt==null?void 0:tt.plugins)!==null&&ft!==void 0?ft:[];for(const At of gt)At.bind(this)}initializeSync(Le){var Ye;return this.loadingStatus!=="Uninitialized"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(Ye=this._store.getWarnings())!==null&&Ye!==void 0?Ye:[]]):(this._logger.start(),this.updateUserSync(this._user,Le))}initializeAsync(Le){return __awaiter$7(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(Le),this._initializePromise)})}updateUserSync(Le,Ye){const tt=performance.now();try{return this._updateUserSyncImpl(Le,Ye,tt)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}}_updateUserSyncImpl(Le,Ye,tt){var nt;const ft=[...(nt=this._store.getWarnings())!==null&&nt!==void 0?nt:[]];this._resetForUser(Le);const ht=this.dataAdapter.getDataSync(this._user);ht==null&&ft.push("NoCachedValues"),this._store.setValues(ht,this._user),this._finalizeUpdate(ht);const gt=Ye==null?void 0:Ye.disableBackgroundCacheRefresh;return gt===!0||gt==null&&(ht==null?void 0:ht.source)==="Bootstrap"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft):(this._runPostUpdate(ht??null,this._user),(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft))}updateUserAsync(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){const tt=performance.now();try{return yield this._updateUserAsyncImpl(Le,Ye)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}})}_updateUserAsyncImpl(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){this._resetForUser(Le);const tt=this._user;client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);let nt=this.dataAdapter.getDataSync(tt);if(this._store.setValues(nt,this._user),this._setStatus("Loading",nt),nt=yield this.dataAdapter.getDataAsync(nt,tt,Ye),tt!==this._user)return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let ft=!1;nt!=null&&(client_core_1.Diagnostics._markInitProcessStart(this._sdkKey),ft=this._store.setValues(nt,this._user),client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey,{success:ft})),this._finalizeUpdate(nt),ft||(this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey,ft,this._store.getCurrentSourceDetails());const ht=client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,client_core_1.createUpdateDetails)(ft,this._store.getSource(),ht,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:client_core_1.StatsigSession.get(this._sdkKey),stableID:client_core_1.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(Le,Ye){return this.getFeatureGate(Le,Ye).value}logEvent(Le,Ye,tt){const nt=typeof Le=="string"?{eventName:Le,value:Ye,metadata:tt}:Le;this.$emt({name:"log_event_called",event:nt}),this._logger.enqueue(Object.assign(Object.assign({},nt),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(Le){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:Le}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(Le){return __awaiter$7(this,void 0,void 0,function*(){return client_core_1.Storage.isReady()||(yield client_core_1.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,Le)})}_createErrorUpdateDetails(Le,Ye){var tt;return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),performance.now()-Ye,Le,null,[...(tt=this._store.getWarnings())!==null&&tt!==void 0?tt:[]])}_finalizeUpdate(Le){this._store.finalize(),this._setStatus("Ready",Le)}_runPostUpdate(Le,Ye){this.dataAdapter.getDataAsync(Le,Ye,{priority:"low"}).catch(tt=>{client_core_1.Log.error("An error occurred after update.",tt)})}_resetForUser(Le){this._logger.reset(),this._store.reset(),this._user=this._configureUser(Le,this._options)}_configureUser(Le,Ye){var tt,nt,ft;const ht=(0,client_core_1._normalizeUser)(Le,Ye),gt=(tt=ht.customIDs)===null||tt===void 0?void 0:tt.stableID;if(gt){const At=(ft=(nt=this.storageProvider).isReadyResolver)===null||ft===void 0?void 0:ft.call(nt);At?At.then(()=>client_core_1.StableID.setOverride(gt,this._sdkKey),()=>client_core_1.StableID.setOverride(gt,this._sdkKey)):client_core_1.StableID.setOverride(gt,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(ht.analyticsOnlyMetadata=Object.assign(Object.assign({},ht.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),ht}_getFeatureGateImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getGate(Le),gt=(0,client_core_1._makeFeatureGate)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getGateOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createGateExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"gate_evaluation",gate:xt}),xt}_getDynamicConfigImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getConfig(Le),gt=(0,client_core_1._makeDynamicConfig)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getDynamicConfigOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:xt}),xt}_getExperimentImpl(Le,Ye){var tt,nt,ft,ht;const{result:gt,details:At}=this._store.getConfig(Le),xt=(0,client_core_1._makeExperiment)(Le,At,gt);xt.__evaluation!=null&&(xt.__evaluation.secondary_exposures=(0,client_core_1._mapExposures)((nt=(tt=xt.__evaluation)===null||tt===void 0?void 0:tt.secondary_exposures)!==null&&nt!==void 0?nt:[],this._store.getExposureMapping()));const Et=(ht=(ft=this.overrideAdapter)===null||ft===void 0?void 0:ft.getExperimentOverride)===null||ht===void 0?void 0:ht.call(ft,xt,this._user,Ye),yt=Et??xt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,yt,this._store.getExposureMapping()),Ye),this.$emt({name:"experiment_evaluation",experiment:yt}),yt}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(Le,Ye){var tt,nt,ft;const{result:ht,details:gt}=this._store.getLayer(Le),At=(0,client_core_1._makeLayer)(Le,gt,ht),xt=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getLayerOverride)===null||nt===void 0?void 0:nt.call(tt,At,this._user,Ye);Ye!=null&&Ye.disableExposureLog&&this._logger.incrementNonExposureCount(Le);const Et=(0,client_core_1._mergeOverride)(At,xt,(ft=xt==null?void 0:xt.__value)!==null&&ft!==void 0?ft:At.__value,yt=>{Ye!=null&&Ye.disableExposureLog||this._enqueueExposure(Le,(0,client_core_1._createLayerParameterExposure)(this._user,Et,yt,this._store.getExposureMapping()),Ye)});return this.$emt({name:"layer_evaluation",layer:Et}),Et}_getParameterStoreImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getParamStore(Le);this._logger.incrementNonExposureCount(Le);const gt={name:Le,details:ht,__configuration:ft,get:(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,ft,Ye)},At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getParamStoreOverride)===null||nt===void 0?void 0:nt.call(tt,gt,Ye);return At!=null&&(gt.__configuration=At.config,gt.details=At.details,gt.get=(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,At.config,Ye)),gt}}StatsigClient$1.default=StatsigClient,function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,gt,At,xt){xt===void 0&&(xt=At);var Et=Object.getOwnPropertyDescriptor(gt,At);(!Et||("get"in Et?!gt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return gt[At]}}),Object.defineProperty(ht,xt,Et)}:function(ht,gt,At,xt){xt===void 0&&(xt=At),ht[xt]=gt[At]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,gt){for(var At in ht)At!=="default"&&!Object.prototype.hasOwnProperty.call(gt,At)&&Le(gt,ht,At)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigClient=void 0;const tt=src$1,nt=StatsigClient$1;Be.StatsigClient=nt.default,Ye(src$1,Be);const ft=Object.assign((0,tt._getStatsigGlobal)(),{StatsigClient:nt.default});Be.default=ft}(src$2);const FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","new_id_capture_ux_least_risky_clients","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id","darwinium_profiling"],GLOBAL_FLAGS=["new_fingerprint"],ID_MODULE_FLAGS=["id_face_readability","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web"];function getStatsigEnvironment(Be){return isStageK8sEnv(Be)?{tier:"development"}:isStageEnv(Be)||isDemoEnv(Be)?{tier:"staging"}:isSaasEnv(Be)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,new_id_capture_ux_least_risky_clients:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1,darwinium_profiling:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(initPromise)return initPromise;initPromise=(async()=>{var gt;const ft={customIDs:{client_api_key:Le,hashed_onboarding_id:Ye,flow_id:Be},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise},getFeatureFlag=Be=>featureFlagsValues[Be]??!1,getModuleFeatureFlags=async Be=>{const Le={};GLOBAL_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]});const Ye=Be.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}),Le};function IdCaptureParamsConfigurator(Be,Le,Ye,tt){Object.assign(Be,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:tt?3e3:2e3,minFaceIdQualityScore:.62})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:!1,faceOcclusionThreshold:.3}}const getProfiles=()=>[new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new PipelineProfile(WasmPipelineType.IdBarcodeAndTextQualityPipeline,PipelineProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new PipelineProfile(WasmPipelineType.IdVideoSelfiePipeline,PipelineProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new PipelineProfile(WasmPipelineType.SelfieWithQualityMetrics,PipelineProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile")];function getProfile(Be){const Le=getProfiles().find(Ye=>Ye.name===Be);if(!Le)throw new Error(`Profile not found for type: ${Be}`);return Le}const wasmVersion="v2.12.47";function generateBundle(){const Be=getFeatureFlag("id_text_barcode_readability")?PipelineProfileName.IdCapture_3_02:getFeatureFlag("id_model_hebrew_back_id")?PipelineProfileName.IdCapture_2_02:PipelineProfileName.IdCapture_2_01,Le=PipelineProfileName.SelfieWithQualityMetrics,Ye=PipelineProfileName.SelfieVideoSelfie,tt=PipelineProfileName.IdVideoSelfie_2_01;return[Be,tt,Le,Ye]}function getInitializationParams(){const Le=generateBundle(),Ye="https://d3vv997wtl2myz.cloudfront.net/webcamera/onnx-backend-wasm",tt=`${Ye}/${wasmVersion}/webLib.wasm`,nt=`${Ye}/${wasmVersion}/webLibSimd.wasm`,ft=`${Ye}/${wasmVersion}/webLib.js`,ht=`${Ye}/${wasmVersion}/versions.json`;let gt=new Map,At=new Map;for(const xt of Le){const Et=getProfile(xt);if(!Et)throw new Error(`Profile not found: ${xt}`);const yt=Et.modelNames;let Ct=[];for(const kt of yt)Ct.push(`${Ye}/${wasmVersion}/models/${kt}`);gt.set(Et.pipelineType,Ct),At.set(Et.detectionType,Et)}return{wasmModulePath:tt,wasmSimdModulePath:nt,glueCodePath:ft,versionsFilePath:ht,pipelineModels:gt,enableSIMD:!0,profiles:At,wasmVersion}}window.wasmArrayBuffer=null;class MlWasmJSApi{constructor(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.wasmModule=null,this.pipelineApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceDetectionWasmApi=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallMutex=new Mutex,this.Module=null,this.loadModule=async Le=>{this.Module=(await import(Le)).Module}}async initialize(Le,Ye,tt,nt,ft,ht){await this.freeResources(),this.pipelines_=ht,this.versionsFile=ft,await this.loadModule(tt);const gt=await this.loadWasm(nt,Le,Ye);return this.pipelineApiUtilities=new this.wasmModule.PipelineApiUtilities,this.utilityApi=new this.wasmModule.UtilityApi,this.idCaptureWasmApi=new this.wasmModule.IdCaptureApi,this.faceDetectionWasmApi=new this.wasmModule.FaceDetectionApi,this.isInitialized_=!0,gt}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}isInitialized(){return this.pipelineApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceDetectionWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Le,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Le&&Ye&&Le==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Le*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Le,this.imageHeight_=Ye,this.inputImageBuffer=this.pipelineApiUtilities.allocateInputImageBuffer(Le,Ye,4))}async handleDetectionCallAndUpdateState(Le){this.checkWasmInitialization("Unable to update pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(Le))}ens(Le){return this.checkWasmInitialization("Unable to ens, cpp API hasn't been initialized"),this.utilityApi.ens(Le)}ckvcks(Le){this.checkWasmInitialization("Unable to ckvcks, cpp API hasn't been initialized"),this.utilityApi.ckvcks(Le)}isVirtualCamera(Le){if(this.checkWasmInitialization("Unable to check if the camera is virtual, cpp API hasn't been initialized"),Le)return this.utilityApi.isVirtualCamera(Le)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Le){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Le.width,Le.height),this.inputImageBuffer.set(Le.data),this.utilityApi.analyzeFrame()}async freeResources(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,window.wasmArrayBuffer=null,this.pipelineApiUtilities&&typeof this.pipelineApiUtilities.delete=="function"&&(this.pipelineApiUtilities.delete(),this.pipelineApiUtilities=null),this.utilityApi&&typeof this.utilityApi.delete=="function"&&(this.utilityApi.delete(),this.utilityApi=null),this.idCaptureWasmApi&&typeof this.idCaptureWasmApi.delete=="function"&&(this.idCaptureWasmApi.delete(),this.idCaptureWasmApi=null),this.faceDetectionWasmApi&&typeof this.faceDetectionWasmApi.delete=="function"&&(this.faceDetectionWasmApi.delete(),this.faceDetectionWasmApi=null),this.wasmModule=null,this.isInitialized_=!1}resetPipeline(Le){this.checkWasmInitialization("Unable to reset pipeline, cpp API hasn't been initialized"),this.pipelineApiUtilities.resetPipeline(this.pipelineTypeToWasmEnum(Le))}resetAllPipelines(){this.checkWasmInitialization("Unable to reset pipelines, cpp API hasn't been initialized");for(const[Le,Ye]of this.pipelines_)this.resetPipeline(Le)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllPipelines(),this.resetOther()}async process(Le,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");switch(this.inputImageBuffer.set(Le.data),Ye){case WasmPipelineType.IdBlurGlarePipeline:case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.idCaptureWasmApi.runIdCapturePipeline(this.pipelineTypeToWasmEnum(Ye));case WasmPipelineType.IdFaceDetectionPipeline:return this.faceDetectionWasmApi.runIdFaceDetectionPipeline();case WasmPipelineType.IdVideoSelfiePipeline:return this.idCaptureWasmApi.runIdVideoSelfiePipeline();case WasmPipelineType.SelfieWithAggregationMetrics:case WasmPipelineType.SelfieWithQualityMetrics:return this.faceDetectionWasmApi.runSelfieFaceDetectionPipeline(this.pipelineTypeToWasmEnum(Ye));default:throw new Error("Unknown pipeline type")}}async runIdCapture(Le){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Le){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.faceDetectionWasmApi.runSelfieCapture()}async setFacePositionConstraints(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFacePositionConstraints(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceDetectionThresholds(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set face detection thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}async setFaceAttributesThresholds(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceAttributesThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceChecksEnabled(Le,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceChecksEnabled(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht)}async setFaceDetectionMode(Le,Ye){this.checkWasmInitialization("Unable to set face detection mode, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionMode(this.pipelineTypeToWasmEnum(Le),Ye)}async setFaceDetectionCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt){this.checkWasmInitialization("Unable to set face detection callbacks, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt)}async setIdCaptureThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt)}async setIdCaptureCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt)}async setIdCaptureGeometryParams(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt)}async setIdCaptureConfigParams(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}setIdCaptureModelType(Le,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.pipelineTypeToWasmEnum(Le),this.IdCaptureModelTypeToWasmEnum(Ye))}IdPerspectiveTransform(Le,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Le,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadWasm(Le,Ye,tt){const nt=Le?tt:Ye;try{window.wasmArrayBuffer=await fetch(nt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),this.wasmModule=await this.Module()}catch(ft){if(console.log(ft,Le,"useSmd"),Le)return await this.loadWasm(!1,Ye,tt);throw ft}return Le}async loadModels(){var nt;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Le=new this.wasmModule.PipelineTypeToIntMap,Ye=new Map,tt=new Map;for(let[ft,ht]of this.pipelines_){let gt=this.pipelineTypeToWasmEnum(ft),At=[],xt=new this.wasmModule.VectorInt;for(let Et of ht){if(!tt.has(Et)){let Ct=await fetch(Et).then(kt=>kt.arrayBuffer()).then(kt=>new Uint8Array(kt));tt.set(Et,Ct)}let yt=tt.get(Et);xt.push_back(yt.byteLength),At.push(yt)}Le.set(gt,xt),Ye.set(gt,At)}this.modelsBuffers=this.pipelineApiUtilities.allocateModelsBuffers(Le);for(let[ft,ht]of Ye){let gt=(nt=this.modelsBuffers)==null?void 0:nt.get(ft);for(let At=0;At<gt.size();At++){let xt=gt==null?void 0:gt.get(At);if(xt)xt.set(ht[At]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializePipelines(){this.checkWasmInitialization("Unable to initialize pipelines, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.pipelineApiUtilities.initializePipelines()}async setProductionMode(Le){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Le)}getPipelineState(){return this.checkWasmInitialization("Unable to get pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.getPipelineState()}getCurrentPipeline(){return this.checkWasmInitialization("Unable to get current pipeline, cpp API hasn't been initialized"),this.pipelineTypeFromWasmEnum(this.pipelineApiUtilities.getCurrentPipeline())}setSdkVersion(Le){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Le)}setSdkPlatform(Le){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Le)}setDeviceInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Le,Ye)}setBrowserInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Le,Ye)}setCameraInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Le,Ye)}setZc(Le){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Le)}setMotionStatus(Le){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Le)}setMetadataField(Le,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Le,Ye)}setInspectorOpened(Le){this.inspectorOpened_=Le}setBackgroundMode(Le){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Le)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(){return this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.prc.bind(this.utilityApi),[])}async poc(Le){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.poc.bind(this.utilityApi),[Le])}pipelineTypeToWasmEnum(Le){switch(Le){case WasmPipelineType.IdBlurGlarePipeline:return this.wasmModule.PipelineType.IdBlurGlarePipeline;case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.wasmModule.PipelineType.IdBarcodeAndTextQualityPipeline;case WasmPipelineType.IdFaceDetectionPipeline:return this.wasmModule.PipelineType.IdFaceDetectionPipeline;case WasmPipelineType.IdVideoSelfiePipeline:return this.wasmModule.PipelineType.IdVideoSelfiePipeline;case WasmPipelineType.SelfieWithAggregationMetrics:return this.wasmModule.PipelineType.SelfieWithAggregationMetrics;case WasmPipelineType.SelfieWithQualityMetrics:return this.wasmModule.PipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}pipelineTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.PipelineType.IdBlurGlarePipeline:return WasmPipelineType.IdBlurGlarePipeline;case this.wasmModule.IdBarcodeAndTextQualityPipeline:return WasmPipelineType.IdBarcodeAndTextQualityPipeline;case this.wasmModule.PipelineType.IdFaceDetectionPipeline:return WasmPipelineType.IdFaceDetectionPipeline;case this.wasmModule.PipelineType.IdVideoSelfiePipeline:return WasmPipelineType.IdVideoSelfiePipeline;case this.wasmModule.PipelineType.SelfieWithAggregationMetrics:return WasmPipelineType.SelfieWithAggregationMetrics;case this.wasmModule.PipelineType.SelfieWithQualityMetrics:return WasmPipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}IdCaptureModelTypeToWasmEnum(Le){switch(Le){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Le){if(!this.isInitialized())throw new Error(Le)}async wasmCallWrapper(Le,Ye=[]){return await this.wasmCallMutex.withLock(async(...tt)=>{let nt=!1;try{for(;;){if(nt=Le(...tt),nt)return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){console.log("Error in wasmCallWrapper:",ft)}},...Ye)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),version$4="1.85.0-20251218222520.0";function e$2(Be,Le){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Be,Le)?Be[Le]:void 0}function t$2(Be,Le,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Be,location.href),{blockedURI:yt}=xt;yt!==Et.href&&yt!==Et.protocol.slice(0,-1)&&yt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Le).then(xt=>(At(),xt),xt=>new Promise(Et=>{const yt=new MessageChannel;yt.port1.onmessage=()=>Et(),yt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Be){let Le="";for(let Ye=0;Ye<Be.length;++Ye)if(Ye>0){const tt=Be[Ye].toLowerCase();tt!==Be[Ye]?Le+=` ${tt}`:Le+=Be[Ye]}else Le+=Be[Ye].toUpperCase();return Le}const r$4={default:"endpoint"},o$1={default:"tlsEndpoint"},i$5="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$e=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$d="API key required",m$2="API key not found",A$1="API key expired",w$e="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$d,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Be,Le){const Ye=[],[tt,nt]=function(gt){const At=function(yt){const Ct=[...yt];return{current:()=>Ct[0],postpone(){const kt=Ct.shift();kt!==void 0&&Ct.push(kt)},exclude(){Ct.shift()}}}(gt),xt=function(yt,Ct){let kt=0;return()=>Math.random()*Math.min(Ct,yt*Math.pow(2,kt++))}(100,3e3),Et=new Set;return[At.current(),(yt,Ct)=>{let kt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),kt=0;else if(vt===K)At.exclude();else if(vt===M$1){const It=Date.now()-yt.getTime()<50,wt=At.current();wt&&It&&!Et.has(wt)&&(Et.add(wt),kt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,kt??yt.getTime()+xt()-Date.now()]}]}(Be);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=yt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:yt}),Et=Le(gt);return Et.then(()=>xt(),xt),Et.catch(yt=>{if(ft!=null||(ft=yt),Ye.length>=5)throw ft;const Ct=nt(At,yt);if(!Ct)throw ft;const[kt,vt]=Ct;return(bt=vt,new Promise(It=>setTimeout(It,bt))).then(()=>ht(kt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Be){var Le,Ye;const{picked:tt,rest:nt}=function(Et,yt){const Ct={},kt={};for(const[vt,bt]of Object.entries(Et))yt.includes(vt)?Ct[vt]=bt:kt[vt]=bt;return{picked:Ct,rest:kt}}(Be,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Le=tt.apiKey)!==null&&Le!==void 0?Le:ft,gt=(Ye=e$2(Be,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],yt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(kt,vt,bt,It){return kt.addEventListener(vt,bt,It),()=>kt.removeEventListener(vt,bt,It)}(document,"visibilitychange",yt);return yt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$d);const Et=function(yt,Ct){return(Array.isArray(yt)?yt:[yt]).map(kt=>function(vt,bt){const It=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?It(bt):wt==="<loaderVersion>"?It(b$2):wt)}(String(kt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(yt){return yt instanceof Error&&yt.message===K?new Error(M$1):yt}(Et)}).then(([Et,yt])=>(xt(),Et.load({...nt,ldi:{attempts:yt,visibilityStates:At}})))}function F$1(Be){return t$2(Be,()=>function(Le){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Le))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Le,ht.appendChild(nt)})}(Be),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Be=window,Le="__fpjs_p_l_b",Ye=Be[Le];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Be,Le),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$d,ERROR_BAD_REQUEST_FORMAT:w$e,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$5,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$e,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$4,defaultTlsEndpoint:o$1};function e$1(Be,Le,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(yt){yt(Et)})).then(ht,gt)}At((tt=tt.apply(Be,[])).next())})}function n$1(Be,Le){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Le.call(Be,ht)}catch(yt){Et=[6,yt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$3={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$4=function(Be,Le){typeof window<"u"&&(o[Be]=Le)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Be){var Le,Ye=Be[0];return!(!((Le=r$3==null?void 0:r$3.exclude)===null||Le===void 0)&&Le.includes(Ye))}).filter(function(Be){var Le,Ye,tt,nt,ft=Be[0];return!((Le=r$3==null?void 0:r$3.include)===null||Le===void 0)&&Le.some(function(ht){return ht.includes(".")})?(Ye=r$3==null?void 0:r$3.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$3==null?void 0:r$3.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$3==null?void 0:r$3.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Be){return[Be[0],(0,Be[1])()]}))};function c$2(Be){return Be^=Be>>>16,Be=Math.imul(Be,2246822507),Be^=Be>>>13,Be=Math.imul(Be,3266489909),(Be^=Be>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Be,Le){return Be<<Le|Be>>>32-Le}function d(Be,Le){var Ye;if(Le===void 0&&(Le=0),Le=Le?0|Le:0,typeof Be=="string"&&(Ye=Be,Be=new TextEncoder().encode(Ye).buffer),!(Be instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Le,Le,Le,Le]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Be,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Be,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Be,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Be,Le){return new Promise(function(Ye){setTimeout(function(){return Ye(Le)},Be)})}function m$1(Be,Le,Ye){return Promise.all(Be.map(function(tt){return Promise.race([tt,f$1(Le,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Be,Le,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Be=u(),Le=Object.keys(Be),[4,m$1(Object.values(Be),(r$3==null?void 0:r$3.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Le[gt]]=ht}),[2,p(nt,r$3.exclude||[],r$3.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Be,Le,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var yt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Le.some(function(bt){return yt.startsWith(bt)}),kt=Ye.some(function(bt){return yt.startsWith(bt)});Ct&&!kt||(nt[xt]=Et)}else{var vt=p(Et,Le,Ye,yt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Be);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$d(Be){return e$1(this,void 0,void 0,function(){var Le,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Le=tt.sent(),Ye=d(JSON.stringify(Le)),Math.random()<1e-5&&r$3.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Le),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Be=navigator.userAgent,Le={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Be.match(nt);if(ft&&ft.groups)return{name:Le[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Be){for(var Le=0,Ye=0;Ye<Be.length;++Ye)Le+=Math.abs(Be[Ye]);return Le}var M=b$1();function E(Be,Le,Ye){for(var tt=[],nt=0;nt<Be[0].data.length;nt++){for(var ft=[],ht=0;ht<Be.length;ht++)ft.push(Be[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Le,Ye)}function P(Be){if(Be.length===0)return 0;for(var Le={},Ye=0,tt=Be;Ye<tt.length;Ye++)Le[ft=tt[Ye]]=(Le[ft]||0)+1;var nt=Be[0];for(var ft in Le)Le[ft]>Le[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$4("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Be){return[2,new Promise(function(Le,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Le({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$4("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Be){var Le=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Be({commonImageDataHash:d(E(Le,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Be,Le){if(!Be)throw new Error("Canvas context not supported");return Be.font,Be.font="72px ".concat(Le),Be.measureText("WwMmLli0Oo").width}function _$1(){var Be,Le=document.createElement("canvas"),Ye=(Be=Le.getContext("webgl"))!==null&&Be!==void 0?Be:Le.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Be=new Float32Array(1),Le=new Uint8Array(Be.buffer);return Be[0]=1/0,Be[0]=Be[0]-Be[0],Le[3]}function B(Be,Le){var Ye={};return Le.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Be.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Be=[],Le={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Le).forEach(function(Ye){Le[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Be.push("".concat(Ye,": ").concat(tt))})}),Be}b$1().name!="Firefox"&&i$4("fonts",function(){var Be=this;return new Promise(function(Le,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(yt){return setTimeout(yt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Be,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var yt=L(ht,Et);gt.includes(yt)||(At[Et]=yt)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$4("hardware",function(){return new Promise(function(Be,Le){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Be({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$4("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$4("permissions",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){return k=(r$3==null?void 0:r$3.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Be=Array.from({length:(r$3==null?void 0:r$3.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Be).then(function(Ye){return B(Ye,k)})]})})}),i$4("plugins",function(){var Be=[];if(navigator.plugins)for(var Le=0;Le<navigator.plugins.length;Le++){var Ye=navigator.plugins[Le];Be.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Be})})}),i$4("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$4("system",function(){return new Promise(function(Be){var Le=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Le.name,version:Le.version}};Le.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Be(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$4("webgl",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Be=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
66
|
+
`;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>{let Be,Le;return{promise:new Promise((tt,nt)=>{Be=tt,Le=nt}),resolve:Be,reject:Le}});class InterruptionHandler{constructor(){this.boundVisibilityChange=this.handleVisibilityChange.bind(this),this.boundOnline=this.handleOnline.bind(this),this.boundOffline=this.handleOffline.bind(this),this.boundUnhandledRejection=this.handleUnhandledRejection.bind(this),this.boundError=this.handleError.bind(this),this.initialized=!1}registerEventListeners(){this.initialized||(document.addEventListener("visibilitychange",this.boundVisibilityChange),window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline),window.addEventListener("unhandledrejection",this.boundUnhandledRejection),window.addEventListener("error",this.boundError),this.initialized=!0)}removeEventListeners(){this.initialized&&(this.initialized=!1,document.removeEventListener("visibilitychange",this.boundVisibilityChange),window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),window.removeEventListener("unhandledrejection",this.boundUnhandledRejection),window.removeEventListener("error",this.boundError))}handleVisibilityChange(){document.hidden?this.onAppHidden():this.onAppVisible()}onAppHidden(){}onAppVisible(){}handleOnline(){}handleOffline(){}handleUnhandledRejection(Le){}handleError(Le){}}const regex$1={CURP_PATTERN:/^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/,EMAIL_PATTERN:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,SSN_PATTERN:/^\d{3}-?\d{2}-?\d{4}$/};function webgl(){let Be,Le,Ye=256,tt=128;Be=document.body.appendChild(document.createElement("canvas")),Be.width=Ye,Be.height=tt;try{Le=Be.getContext("webgl2")||Be.getContext("experimental-webgl2")||Be.getContext("webgl")||Be.getContext("experimental-webgl")||Be.getContext("moz-webgl");const nt="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",ft="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",ht=Le.createBuffer();Le.bindBuffer(Le.ARRAY_BUFFER,ht);const gt=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0]);Le.bufferData(Le.ARRAY_BUFFER,gt,Le.STATIC_DRAW),ht.itemSize=3,ht.numItems=3;const At=Le.createProgram(),xt=Le.createShader(Le.VERTEX_SHADER);Le.shaderSource(xt,nt),Le.compileShader(xt);const Et=Le.createShader(Le.FRAGMENT_SHADER);Le.shaderSource(Et,ft),Le.compileShader(Et),Le.attachShader(At,xt),Le.attachShader(At,Et),Le.linkProgram(At),Le.useProgram(At),At.vertexPosAttrib=Le.getAttribLocation(At,"attrVertex"),At.offsetUniform=Le.getUniformLocation(At,"uniformOffset"),Le.enableVertexAttribArray(At.vertexPosAttrib),Le.vertexAttribPointer(At.vertexPosAttrib,ht.itemSize,Le.FLOAT,!1,0,0),Le.uniform2f(At.offsetUniform,1,1),Le.drawArrays(Le.TRIANGLE_STRIP,0,ht.numItems);let yt="";const Ct=new Uint8Array(Ye*tt*4);return Le.readPixels(0,0,Ye,tt,Le.RGBA,Le.UNSIGNED_BYTE,Ct),yt=JSON.stringify(Ct).replace(/,?"[0-9]+":/g,""),document.body.removeChild(Be),sha256(yt)}catch{return""}}const sha256=(()=>{let Be=1,Le,Ye=[],tt=[];for(;++Be<18;)for(Le=Be*Be;Le<312;Le+=Be)Ye[Le]=1;function nt(gt,At){return Math.pow(gt,1/At)%1*4294967296|0}for(Be=1,Le=0;Be<313;)Ye[++Be]||(tt[Le]=nt(Be,2),Ye[Le++]=nt(Be,3));function ft(gt,At){return gt>>>At|gt<<32-At}function ht(gt){let At=tt.slice(Be=0),xt=unescape(encodeURI(gt)),Et=[],yt=xt.length,Ct=[],kt,vt,bt;for(;Be<yt;)Ct[Be>>2]|=(xt.charCodeAt(Be)&255)<<8*(3-Be++%4);for(yt*=8,Ct[yt>>5]|=128<<24-yt%32,Ct[bt=yt+64>>5|15]=yt,Be=0;Be<bt;Be+=16){for(kt=At.slice(Le=0,8);Le<64;kt[4]+=vt)Le<16?Et[Le]=Ct[Le+Be]:Et[Le]=(ft(vt=Et[Le-2],17)^ft(vt,19)^vt>>>10)+(Et[Le-7]|0)+(ft(vt=Et[Le-15],7)^ft(vt,18)^vt>>>3)+(Et[Le-16]|0),kt.unshift((vt=(kt.pop()+(ft(gt=kt[4],6)^ft(gt,11)^ft(gt,25))+((gt&kt[5]^~gt&kt[6])+Ye[Le])|0)+(Et[Le++]|0))+(ft(yt=kt[0],2)^ft(yt,13)^ft(yt,22))+(yt&kt[1]^kt[1]&kt[2]^kt[2]&yt));for(Le=8;Le--;)At[Le]=kt[Le]+At[Le]}for(xt="";Le<63;)xt+=(At[++Le>>3]>>4*(7-Le%8)&15).toString(16);return xt}return ht})();var store;function getGlobalConfig$1(Be){return{lang:store==null?void 0:store.lang,message:Be==null?void 0:Be.message,abortEarly:store==null?void 0:store.abortEarly,abortPipeEarly:store==null?void 0:store.abortPipeEarly}}var store2;function getGlobalMessage$1(Be){return store2==null?void 0:store2.get(Be)}var store3;function getSchemaMessage$1(Be){return store3==null?void 0:store3.get(Be)}var store4;function getSpecificMessage$1(Be,Le){var Ye;return(Ye=store4==null?void 0:store4.get(Be))==null?void 0:Ye.get(Le)}function _stringify$4(Be){var Ye,tt;const Le=typeof Be;return Le==="string"?`"${Be}"`:Le==="number"||Le==="bigint"||Le==="boolean"?`${Be}`:Le==="object"||Le==="function"?(Be&&((tt=(Ye=Object.getPrototypeOf(Be))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Le}function _addIssue$1(Be,Le,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Be.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$4(ft),At={kind:Be.kind,type:Be.type,input:ft,expected:ht,received:gt,message:`Invalid ${Le}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Be.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Be.kind==="schema",Et=(nt==null?void 0:nt.message)??Be.message??getSpecificMessage$1(Be.reference,At.lang)??(xt?getSchemaMessage$1(At.lang):null)??tt.message??getGlobalMessage$1(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps$1(Be){return{version:1,vendor:"valibot",validate(Le){return Be["~run"]({value:Le},getGlobalConfig$1())}}}function _joinExpects(Be,Le){const Ye=[...new Set(Be)];return Ye.length>1?`(${Ye.join(` ${Le} `)})`:Ye[0]??"never"}function isValiError(Be){return Be instanceof ValiError}var ValiError=class extends Error{constructor(Be){super(Be[0].message),this.name="ValiError",this.issues=Be}};function getFallback$1(Be,Le,Ye){return typeof Be.fallback=="function"?Be.fallback(Le,Ye):Be.fallback}function getDefault$1(Be,Le,Ye){return typeof Be.default=="function"?Be.default(Le,Ye):Be.default}function boolean$2(Be){return{kind:"schema",type:"boolean",reference:boolean$2,expects:"boolean",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="boolean"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function custom(Be,Le){return{kind:"schema",type:"custom",reference:custom,expects:"unknown",async:!1,check:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return this.check(Ye.value)?Ye.typed=!0:_addIssue$1(this,"type",Ye,tt),Ye}}}function function_(Be){return{kind:"schema",type:"function",reference:function_,expects:"Function",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="function"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function literal(Be,Le){return{kind:"schema",type:"literal",reference:literal,expects:_stringify$4(Be),async:!1,literal:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return Ye.value===this.literal?Ye.typed=!0:_addIssue$1(this,"type",Ye,tt),Ye}}}function null_(Be){return{kind:"schema",type:"null",reference:null_,expects:"null",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return Le.value===null?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function number$3(Be){return{kind:"schema",type:"number",reference:number$3,expects:"number",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="number"&&!isNaN(Le.value)?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function object$1(Be,Le){return{kind:"schema",type:"object",reference:object$1,expects:"Object",async:!1,entries:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault$1(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const yt of xt.issues)yt.path?yt.path.unshift(Et):yt.path=[Et],(ft=Ye.issues)==null||ft.push(yt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback$1(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue$1(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue$1(this,"type",Ye,tt);return Ye}}}function optional$1(Be,Le){return{kind:"schema",type:"optional",reference:optional$1,expects:`(${Be.expects} | undefined)`,async:!1,wrapped:Be,default:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault$1(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function string$3(Be){return{kind:"schema",type:"string",reference:string$3,expects:"string",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="string"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function _subIssues(Be){let Le;if(Be)for(const Ye of Be)Le?Le.push(...Ye.issues):Le=Ye.issues;return Le}function union(Be,Le){return{kind:"schema",type:"union",reference:union,expects:_joinExpects(Be.map(Ye=>Ye.expects),"|"),async:!1,options:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){let nt,ft,ht;for(const gt of this.options){const At=gt["~run"]({value:Ye.value},tt);if(At.typed)if(At.issues)ft?ft.push(At):ft=[At];else{nt=At;break}else ht?ht.push(At):ht=[At]}if(nt)return nt;if(ft){if(ft.length===1)return ft[0];_addIssue$1(this,"type",Ye,tt,{issues:_subIssues(ft)}),Ye.typed=!0}else{if((ht==null?void 0:ht.length)===1)return ht[0];_addIssue$1(this,"type",Ye,tt,{issues:_subIssues(ht)})}return Ye}}}function parse$8(Be,Le,Ye){const tt=Be["~run"]({value:Le},getGlobalConfig$1(Ye));if(tt.issues)throw new ValiError(tt.issues);return tt.value}function validate$2(...Be){try{Be.forEach(({schema:Le,value:Ye})=>parse$8(Le,Ye))}catch(Le){if(isValiError(Le)){const Ye=Le.issues.map(tt=>{var ft;return`${((ft=tt.path)==null?void 0:ft.map(ht=>ht.key).join("."))||"root"}: ${tt.message}`}).join(", ");throw new Error(`Validation failed: ${Ye}`)}throw Le}}exports.api=void 0;function setApi(Be){exports.api=Be}function setToken(Be){exports.api.defaults.headers["X-Incode-Hardware-Id"]=Be}const eventsQueue=[];function addEvent(Be){const{token:Le,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Be;if(!Le){eventsQueue.push(Be);return}return exports.api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Le}}).catch(()=>{})}function emptyQueue(Be){eventsQueue.forEach(Le=>{addEvent({...Le,token:Be})})}const state={token:null};var PipelineProfileName=(Be=>(Be[Be.IdCapture_2_01=0]="IdCapture_2_01",Be[Be.IdCapture_2_02=1]="IdCapture_2_02",Be[Be.IdCapture_3_02=2]="IdCapture_3_02",Be[Be.IdVideoSelfie_2_01=3]="IdVideoSelfie_2_01",Be[Be.SelfieWithAggregationMetrics=4]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=5]="SelfieWithQualityMetrics",Be[Be.SelfieVideoSelfie=6]="SelfieVideoSelfie",Be))(PipelineProfileName||{});class PipelineProfile{constructor(Le,Ye,tt,nt,ft,ht=null,gt=""){this.pipelineType=Le,this.name=Ye,this.detectionType=tt,this.modelNames=nt,this.parameters=ft,this.paramsConfigurator=ht,this.description=gt}reconfigureParams(Le,Ye){if(this.paramsConfigurator==null)throw new Error("PipelineProfile does not have a paramsConfigurator");this.paramsConfigurator(this.parameters,this.pipelineType,Le,Ye)}}var DetectionType=(Be=>(Be[Be.IDCapture=0]="IDCapture",Be[Be.Selfie=1]="Selfie",Be[Be.SelfieVideoSelfie=2]="SelfieVideoSelfie",Be[Be.IdVideoSelfie=3]="IdVideoSelfie",Be))(DetectionType||{}),WasmPipelineType=(Be=>(Be[Be.IdBlurGlarePipeline=0]="IdBlurGlarePipeline",Be[Be.IdBarcodeAndTextQualityPipeline=1]="IdBarcodeAndTextQualityPipeline",Be[Be.IdVideoSelfiePipeline=2]="IdVideoSelfiePipeline",Be[Be.SelfieWithAggregationMetrics=3]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=4]="SelfieWithQualityMetrics",Be[Be.IdFaceDetectionPipeline=5]="IdFaceDetectionPipeline",Be))(WasmPipelineType||{}),IdCaptureModelType=(Be=>(Be[Be.IdCaptureV1x=0]="IdCaptureV1x",Be[Be.IdCaptureV2x=1]="IdCaptureV2x",Be[Be.IdCaptureV3x=2]="IdCaptureV3x",Be))(IdCaptureModelType||{}),src$2={},src$1={},$_StatsigGlobal={},Log={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Log=Be.LogLevel=void 0;const Le=" DEBUG ",Ye=" INFO ",tt=" WARN ",nt=" ERROR ";function ft(gt){return gt.unshift("[Statsig]"),gt}Be.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class ht{static info(...At){ht.level>=Be.LogLevel.Info&&console.info(Ye,...ft(At))}static debug(...At){ht.level>=Be.LogLevel.Debug&&console.debug(Le,...ft(At))}static warn(...At){ht.level>=Be.LogLevel.Warn&&console.warn(tt,...ft(At))}static error(...At){ht.level>=Be.LogLevel.Error&&console.error(nt,...ft(At))}}Be.Log=ht,ht.level=Be.LogLevel.Warn})(Log),function(Be){var Le,Ye,tt;Object.defineProperty(Be,"__esModule",{value:!0}),Be._getInstance=Be._getStatsigGlobalFlag=Be._getStatsigGlobal=void 0;const nt=Log,ft=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:Ct}catch{return Ct}};Be._getStatsigGlobal=ft;const ht=kt=>(0,Be._getStatsigGlobal)()[kt];Be._getStatsigGlobalFlag=ht;const gt=kt=>{const vt=(0,Be._getStatsigGlobal)();return kt?vt.instances&&vt.instances[kt]:(vt.instances&&Object.keys(vt.instances).length>1&&nt.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),vt.firstInstance)};Be._getInstance=gt;const At="__STATSIG__",xt=typeof window<"u"?window:{},Et=typeof commonjsGlobal<"u"?commonjsGlobal:{},yt=typeof globalThis<"u"?globalThis:{},Ct=(tt=(Ye=(Le=xt[At])!==null&&Le!==void 0?Le:Et[At])!==null&&Ye!==void 0?Ye:yt[At])!==null&&tt!==void 0?tt:{instance:Be._getInstance};xt[At]=Ct,Et[At]=Ct,yt[At]=Ct}($_StatsigGlobal);var Diagnostics={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Diagnostics=void 0;const Le=new Map,Ye="start",tt="end",nt="statsig::diagnostics";Be.Diagnostics={_getMarkers:xt=>Le.get(xt),_markInitOverallStart:xt=>{gt(xt,ft({},Ye,"overall"))},_markInitOverallEnd:(xt,Et,yt)=>{gt(xt,ft({success:Et,error:Et?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:yt},tt,"overall"))},_markInitNetworkReqStart:(xt,Et)=>{gt(xt,ft(Et,Ye,"initialize","network_request"))},_markInitNetworkReqEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","network_request"))},_markInitProcessStart:xt=>{gt(xt,ft({},Ye,"initialize","process"))},_markInitProcessEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","process"))},_clearMarkers:xt=>{Le.delete(xt)},_formatError(xt){if(xt&&typeof xt=="object")return{code:At(xt,"code"),name:At(xt,"name"),message:At(xt,"message")}},_getDiagnosticsData(xt,Et,yt,Ct){var kt;return{success:(xt==null?void 0:xt.ok)===!0,statusCode:xt==null?void 0:xt.status,sdkRegion:(kt=xt==null?void 0:xt.headers)===null||kt===void 0?void 0:kt.get("x-statsig-region"),isDelta:yt.includes('"is_delta":true')===!0?!0:void 0,attempt:Et,error:Be.Diagnostics._formatError(Ct)}},_enqueueDiagnosticsEvent(xt,Et,yt,Ct){const kt=Be.Diagnostics._getMarkers(yt);if(kt==null||kt.length<=0)return-1;const vt=kt[kt.length-1].timestamp-kt[0].timestamp;Be.Diagnostics._clearMarkers(yt);const bt=ht(xt,{context:"initialize",markers:kt.slice(),statsigOptions:Ct});return Et.enqueue(bt),vt}};function ft(xt,Et,yt,Ct){return Object.assign({key:yt,action:Et,step:Ct,timestamp:Date.now()},xt)}function ht(xt,Et){return{eventName:nt,user:xt,value:null,metadata:Et,time:Date.now()}}function gt(xt,Et){var yt;const Ct=(yt=Le.get(xt))!==null&&yt!==void 0?yt:[];Ct.push(Et),Le.set(xt,Ct)}function At(xt,Et){if(Et in xt)return xt[Et]}})(Diagnostics);var EventLogger$1={},CacheKey={},Hashing={},TypingUtils={};Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0;function _typeOf(Be){return Array.isArray(Be)?"array":typeof Be}TypingUtils._typeOf=_typeOf;function _isTypeMatch(Be,Le){const Ye=tt=>Array.isArray(tt)?"array":tt===null?"null":typeof tt;return Ye(Be)===Ye(Le)}TypingUtils._isTypeMatch=_isTypeMatch,function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getSortedObject=Be._DJB2Object=Be._DJB2=void 0;const Le=TypingUtils,Ye=ft=>{let ht=0;for(let gt=0;gt<ft.length;gt++){const At=ft.charCodeAt(gt);ht=(ht<<5)-ht+At,ht=ht&ht}return String(ht>>>0)};Be._DJB2=Ye;const tt=(ft,ht)=>(0,Be._DJB2)(JSON.stringify((0,Be._getSortedObject)(ft,ht)));Be._DJB2Object=tt;const nt=(ft,ht)=>{if(ft==null)return null;const gt=Object.keys(ft).sort(),At={};return gt.forEach(xt=>{const Et=ft[xt];if(ht===0||(0,Le._typeOf)(Et)!=="object"){At[xt]=Et;return}At[xt]=(0,Be._getSortedObject)(Et,ht!=null?ht-1:ht)}),At};Be._getSortedObject=nt}(Hashing),Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const Hashing_1$4=Hashing;function _getUserStorageKey(Be,Le,Ye){var tt;if(Ye)return Ye(Be,Le);const nt=Le&&Le.customIDs?Le.customIDs:{},ft=[`uid:${(tt=Le==null?void 0:Le.userID)!==null&&tt!==void 0?tt:""}`,`cids:${Object.keys(nt).sort((ht,gt)=>ht.localeCompare(gt)).map(ht=>`${ht}-${nt[ht]}`).join(",")}`,`k:${Be}`];return(0,Hashing_1$4._DJB2)(ft.join("|"))}CacheKey._getUserStorageKey=_getUserStorageKey;function _getStorageKey(Be,Le,Ye){return Le?_getUserStorageKey(Be,Le,Ye):(0,Hashing_1$4._DJB2)(`k:${Be}`)}CacheKey._getStorageKey=_getStorageKey;var NetworkConfig={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.NetworkParam=Be.NetworkDefault=Be.Endpoint=void 0,Be.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},Be.NetworkDefault={[Be.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[Be.Endpoint._initialize]:"https://featureassets.org/v1",[Be.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},Be.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(NetworkConfig);var SafeJs={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getUnloadEvent=Be._getCurrentPageUrlSafe=Be._addDocumentEventListenerSafe=Be._addWindowEventListenerSafe=Be._isServerEnv=Be._getDocumentSafe=Be._getWindowSafe=void 0;const Le=()=>typeof window<"u"?window:null;Be._getWindowSafe=Le;const Ye=()=>{var At;const xt=(0,Be._getWindowSafe)();return(At=xt==null?void 0:xt.document)!==null&&At!==void 0?At:null};Be._getDocumentSafe=Ye;const tt=()=>{if((0,Be._getDocumentSafe)()!==null)return!1;const At=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||At};Be._isServerEnv=tt;const nt=(At,xt)=>{const Et=(0,Be._getWindowSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addWindowEventListenerSafe=nt;const ft=(At,xt)=>{const Et=(0,Be._getDocumentSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addDocumentEventListenerSafe=ft;const ht=()=>{var At;try{return(At=(0,Be._getWindowSafe)())===null||At===void 0?void 0:At.location.href.split(/[?#]/)[0]}catch{return}};Be._getCurrentPageUrlSafe=ht;const gt=()=>{const At=(0,Be._getWindowSafe)();return At&&"onpagehide"in At?"pagehide":"beforeunload"};Be._getUnloadEvent=gt})(SafeJs);var StatsigEvent={};Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const CONFIG_EXPOSURE_NAME="statsig::config_exposure",GATE_EXPOSURE_NAME="statsig::gate_exposure",LAYER_EXPOSURE_NAME="statsig::layer_exposure",_createExposure=(Be,Le,Ye,tt,nt)=>(Ye.bootstrapMetadata&&(tt.bootstrapMetadata=Ye.bootstrapMetadata),{eventName:Be,user:Le,value:null,metadata:_addEvaluationDetailsToMetadata(Ye,tt),secondaryExposures:nt,time:Date.now()}),_isExposureEvent=({eventName:Be})=>Be===GATE_EXPOSURE_NAME||Be===CONFIG_EXPOSURE_NAME||Be===LAYER_EXPOSURE_NAME;StatsigEvent._isExposureEvent=_isExposureEvent;const _createGateExposure=(Be,Le,Ye)=>{var tt,nt,ft;const ht={gate:Le.name,gateValue:String(Le.value),ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(ht.configVersion=Le.__evaluation.version),_createExposure(GATE_EXPOSURE_NAME,Be,Le.details,ht,_mapExposures((ft=(nt=Le.__evaluation)===null||nt===void 0?void 0:nt.secondary_exposures)!==null&&ft!==void 0?ft:[],Ye))};StatsigEvent._createGateExposure=_createGateExposure;function _mapExposures(Be,Le){return Be.map(Ye=>typeof Ye=="string"?(Le??{})[Ye]:Ye).filter(Ye=>Ye!=null)}StatsigEvent._mapExposures=_mapExposures;const _createConfigExposure=(Be,Le,Ye)=>{var tt,nt,ft,ht;const gt={config:Le.name,ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(gt.configVersion=Le.__evaluation.version),((nt=Le.__evaluation)===null||nt===void 0?void 0:nt.passed)!=null&&(gt.rulePassed=String(Le.__evaluation.passed)),_createExposure(CONFIG_EXPOSURE_NAME,Be,Le.details,gt,_mapExposures((ht=(ft=Le.__evaluation)===null||ft===void 0?void 0:ft.secondary_exposures)!==null&&ht!==void 0?ht:[],Ye))};StatsigEvent._createConfigExposure=_createConfigExposure;const _createLayerParameterExposure=(Be,Le,Ye,tt)=>{var nt,ft,ht,gt,At,xt,Et;const yt=Le.__evaluation,Ct=((nt=yt==null?void 0:yt.explicit_parameters)===null||nt===void 0?void 0:nt.includes(Ye))===!0;let kt="",vt=(ft=yt==null?void 0:yt.undelegated_secondary_exposures)!==null&&ft!==void 0?ft:[];Ct&&(kt=(ht=yt.allocated_experiment_name)!==null&&ht!==void 0?ht:"",vt=(gt=yt.secondary_exposures)!==null&>!==void 0?gt:[]);const bt=(At=Le.__evaluation)===null||At===void 0?void 0:At.parameter_rule_ids,It={config:Le.name,parameterName:Ye,ruleID:(xt=bt==null?void 0:bt[Ye])!==null&&xt!==void 0?xt:Le.ruleID,allocatedExperiment:kt,isExplicitParameter:String(Ct)};return((Et=Le.__evaluation)===null||Et===void 0?void 0:Et.version)!=null&&(It.configVersion=Le.__evaluation.version),_createExposure(LAYER_EXPOSURE_NAME,Be,Le.details,It,_mapExposures(vt,tt))};StatsigEvent._createLayerParameterExposure=_createLayerParameterExposure;const _addEvaluationDetailsToMetadata=(Be,Le)=>(Le.reason=Be.reason,Be.lcut&&(Le.lcut=String(Be.lcut)),Be.receivedAt&&(Le.receivedAt=String(Be.receivedAt)),Le);var StatsigOptionsCommon={};Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var StorageProvider={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._setObjectInStorage=Be._getObjectFromStorage=Be.Storage=void 0;const Le=Log,Ye=SafeJs,tt={},nt={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:yt=>tt[yt]?tt[yt]:null,setItem:(yt,Ct)=>{tt[yt]=Ct},removeItem:yt=>{delete tt[yt]},getAllKeys:()=>Object.keys(tt)};let ft=null;try{const yt=(0,Ye._getWindowSafe)();yt&&yt.localStorage&&typeof yt.localStorage.getItem=="function"&&(ft={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:Ct=>yt.localStorage.getItem(Ct),setItem:(Ct,kt)=>yt.localStorage.setItem(Ct,kt),removeItem:Ct=>yt.localStorage.removeItem(Ct),getAllKeys:()=>Object.keys(yt.localStorage)})}catch{Le.Log.warn("Failed to setup localStorageProvider.")}let ht=ft??nt,gt=ht;function At(yt){try{return yt()}catch(Ct){if(Ct instanceof Error&&Ct.name==="SecurityError")return Be.Storage._setProvider(nt),null;throw Ct}}Be.Storage={isReady:()=>gt.isReady(),isReadyResolver:()=>gt.isReadyResolver(),getProviderName:()=>gt.getProviderName(),getItem:yt=>At(()=>gt.getItem(yt)),setItem:(yt,Ct)=>At(()=>gt.setItem(yt,Ct)),removeItem:yt=>gt.removeItem(yt),getAllKeys:()=>gt.getAllKeys(),_setProvider:yt=>{ht=yt,gt=yt},_setDisabled:yt=>{yt?gt=nt:gt=ht}};function xt(yt){const Ct=Be.Storage.getItem(yt);return JSON.parse(Ct??"null")}Be._getObjectFromStorage=xt;function Et(yt,Ct){Be.Storage.setItem(yt,JSON.stringify(Ct))}Be._setObjectInStorage=Et})(StorageProvider);var UrlConfiguration$1={};Object.defineProperty(UrlConfiguration$1,"__esModule",{value:!0}),UrlConfiguration$1.UrlConfiguration=void 0;const Hashing_1$3=Hashing,NetworkConfig_1$2=NetworkConfig,ENDPOINT_DNS_KEY_MAP={[NetworkConfig_1$2.Endpoint._initialize]:"i",[NetworkConfig_1$2.Endpoint._rgstr]:"e",[NetworkConfig_1$2.Endpoint._download_config_specs]:"d"};class UrlConfiguration{constructor(Le,Ye,tt,nt){this.customUrl=null,this.fallbackUrls=null,this.endpoint=Le,this.endpointDnsKey=ENDPOINT_DNS_KEY_MAP[Le],Ye&&(this.customUrl=Ye),!Ye&&tt&&(this.customUrl=tt.endsWith("/")?`${tt}${Le}`:`${tt}/${Le}`),nt&&(this.fallbackUrls=nt);const ft=NetworkConfig_1$2.NetworkDefault[Le];this.defaultUrl=`${ft}/${Le}`}getUrl(){var Le;return(Le=this.customUrl)!==null&&Le!==void 0?Le:this.defaultUrl}getChecksum(){var Le;const Ye=((Le=this.fallbackUrls)!==null&&Le!==void 0?Le:[]).sort().join(",");return(0,Hashing_1$3._DJB2)(this.customUrl+Ye)}}UrlConfiguration$1.UrlConfiguration=UrlConfiguration;var VisibilityObserving={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._notifyVisibilityChanged=Be._subscribeToVisiblityChanged=Be._isUnloading=Be._isCurrentlyVisible=void 0;const Le=SafeJs,Ye="foreground",tt="background",nt=[];let ft=Ye,ht=!1;const gt=()=>ft===Ye;Be._isCurrentlyVisible=gt;const At=()=>ht;Be._isUnloading=At;const xt=yt=>{nt.unshift(yt)};Be._subscribeToVisiblityChanged=xt;const Et=yt=>{yt!==ft&&(ft=yt,nt.forEach(Ct=>Ct(yt)))};Be._notifyVisibilityChanged=Et,(0,Le._addWindowEventListenerSafe)("focus",()=>{ht=!1,(0,Be._notifyVisibilityChanged)(Ye)}),(0,Le._addWindowEventListenerSafe)("blur",()=>(0,Be._notifyVisibilityChanged)(tt)),(0,Le._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,Be._notifyVisibilityChanged)(document.visibilityState==="visible"?Ye:tt)}),(0,Le._addWindowEventListenerSafe)((0,Le._getUnloadEvent)(),()=>{ht=!0,(0,Be._notifyVisibilityChanged)(tt)})})(VisibilityObserving);var __awaiter$f=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(EventLogger$1,"__esModule",{value:!0}),EventLogger$1.EventLogger=void 0;const CacheKey_1$1=CacheKey,Hashing_1$2=Hashing,Log_1$8=Log,NetworkConfig_1$1=NetworkConfig,SafeJs_1$3=SafeJs,StatsigEvent_1=StatsigEvent,StatsigOptionsCommon_1$2=StatsigOptionsCommon,StorageProvider_1$4=StorageProvider,UrlConfiguration_1=UrlConfiguration$1,VisibilityObserving_1$1=VisibilityObserving,DEFAULT_QUEUE_SIZE=100,DEFAULT_FLUSH_INTERVAL_MS=1e4,MAX_DEDUPER_KEYS=1e3,DEDUPER_WINDOW_DURATION_MS=6e5,MAX_FAILED_LOGS=500,QUICK_FLUSH_WINDOW_MS=200,EVENT_LOGGER_MAP={},RetryFailedLogsTrigger={Startup:"startup",GainedFocus:"gained_focus"};class EventLogger{static _safeFlushAndForget(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye.flush().catch(()=>{})}static _safeRetryFailedLogs(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus)}constructor(Le,Ye,tt,nt){var ft,ht;this._sdkKey=Le,this._emitter=Ye,this._network=tt,this._options=nt,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(ft=nt==null?void 0:nt.loggingEnabled)!==null&&ft!==void 0?ft:(nt==null?void 0:nt.disableLogging)===!0?StatsigOptionsCommon_1$2.LoggingEnabledOption.disabled:StatsigOptionsCommon_1$2.LoggingEnabledOption.browserOnly,nt!=null&&nt.loggingEnabled&&nt.disableLogging!==void 0&&Log_1$8.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(ht=nt==null?void 0:nt.loggingBufferMaxSize)!==null&&ht!==void 0?ht:DEFAULT_QUEUE_SIZE;const gt=nt==null?void 0:nt.networkConfig;this._logEventUrlConfig=new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1$1.Endpoint._rgstr,gt==null?void 0:gt.logEventUrl,gt==null?void 0:gt.api,gt==null?void 0:gt.logEventFallbackUrls)}setLogEventCompressionMode(Le){this._network.setLogEventCompressionMode(Le)}setLoggingEnabled(Le){if(this._loggingEnabled==="disabled"&&Le!=="disabled"){const Ye=this._getStorageKey(),tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);tt&&this._queue.push(...tt),StorageProvider_1$4.Storage.removeItem(Ye)}this._loggingEnabled=Le}enqueue(Le){this._shouldLogEvent(Le)&&(this._normalizeAndAppendEvent(Le),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&EventLogger._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(Le){var Ye;const tt=(Ye=this._nonExposedChecks[Le])!==null&&Ye!==void 0?Ye:0;this._nonExposedChecks[Le]=tt+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var Le;const Ye=(0,SafeJs_1$3._isServerEnv)();Ye&&((Le=this._options)===null||Le===void 0?void 0:Le.loggingEnabled)!=="always"||(EVENT_LOGGER_MAP[this._sdkKey]=this,Ye||(0,VisibilityObserving_1$1._subscribeToVisiblityChanged)(tt=>{tt==="background"?EventLogger._safeFlushAndForget(this._sdkKey):tt==="foreground"&&EventLogger._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(RetryFailedLogsTrigger.Startup),this._startBackgroundFlushInterval())}stop(){return __awaiter$f(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete EVENT_LOGGER_MAP[this._sdkKey],yield this.flush()})}flush(){return __awaiter$f(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const Le=this._queue;this._queue=[],yield this._sendEvents(Le)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>QUICK_FLUSH_WINDOW_MS)&&setTimeout(()=>EventLogger._safeFlushAndForget(this._sdkKey),QUICK_FLUSH_WINDOW_MS))}_shouldLogEvent(Le){var Ye;if(((Ye=this._options)===null||Ye===void 0?void 0:Ye.loggingEnabled)!=="always"&&(0,SafeJs_1$3._isServerEnv)())return!1;if(!(0,StatsigEvent_1._isExposureEvent)(Le))return!0;const tt=Le.user?Le.user:{statsigEnvironment:void 0},nt=(0,CacheKey_1$1._getUserStorageKey)(this._sdkKey,tt),ft=Le.metadata?Le.metadata:{},ht=[Le.eventName,nt,ft.gate,ft.config,ft.ruleID,ft.allocatedExperiment,ft.parameterName,String(ft.isExplicitParameter),ft.reason].join("|"),gt=this._lastExposureTimeMap[ht],At=Date.now();return gt&&At-gt<DEDUPER_WINDOW_DURATION_MS?!1:(Object.keys(this._lastExposureTimeMap).length>MAX_DEDUPER_KEYS&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[ht]=At,!0)}_sendEvents(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye,tt;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(Le),!1;try{const ft=(0,VisibilityObserving_1$1._isUnloading)()&&this._network.isBeaconSupported()&&((tt=(Ye=this._options)===null||Ye===void 0?void 0:Ye.networkConfig)===null||tt===void 0?void 0:tt.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:Le}),(ft?this._sendEventsViaBeacon(Le):yield this._sendEventsViaPost(Le)).success?(this._emitter({name:"logs_flushed",events:Le}),!0):(Log_1$8.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(Le),!1)}catch{return Log_1$8.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye;const tt=yield this._network.post(this._getRequestData(Le)),nt=(Ye=tt==null?void 0:tt.code)!==null&&Ye!==void 0?Ye:-1;return{success:nt>=200&&nt<300}})}_sendEventsViaBeacon(Le){return{success:this._network.beacon(this._getRequestData(Le))}}_getRequestData(Le){return{sdkKey:this._sdkKey,data:{events:Le},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[NetworkConfig_1$1.NetworkParam.EventCount]:String(Le.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(Le){for(;Le.length>MAX_FAILED_LOGS;)Le.shift();const Ye=this._getStorageKey();try{const tt=this._getFailedLogsFromStorage(Ye);(0,StorageProvider_1$4._setObjectInStorage)(Ye,[...tt,...Le])}catch{Log_1$8.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(Le){let Ye=[];try{const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Le);return Array.isArray(tt)&&(Ye=tt),Ye}catch{return[]}}_retryFailedLogs(Le){const Ye=this._getStorageKey();__awaiter$f(this,void 0,void 0,function*(){StorageProvider_1$4.Storage.isReady()||(yield StorageProvider_1$4.Storage.isReadyResolver());const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);if(!tt)return;Le===RetryFailedLogsTrigger.Startup&&StorageProvider_1$4.Storage.removeItem(Ye),(yield this._sendEvents(tt))&&Le===RetryFailedLogsTrigger.GainedFocus&&StorageProvider_1$4.Storage.removeItem(Ye)}).catch(()=>{Log_1$8.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,Hashing_1$2._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(Le){Le.user&&(Le.user=Object.assign({},Le.user),delete Le.user.privateAttributes);const Ye={},tt=this._getCurrentPageUrl();tt&&(Ye.statsigMetadata={currentPage:tt});const nt=Object.assign(Object.assign({},Le),Ye);Log_1$8.Log.debug("Enqueued Event:",nt),this._queue.push(nt)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var Le;if(((Le=this._options)===null||Le===void 0?void 0:Le.includeCurrentPageUrlWithEvents)!==!1)return(0,SafeJs_1$3._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var Le,Ye;const tt=(Ye=(Le=this._options)===null||Le===void 0?void 0:Le.loggingIntervalMs)!==null&&Ye!==void 0?Ye:DEFAULT_FLUSH_INTERVAL_MS,nt=setInterval(()=>{const ft=EVENT_LOGGER_MAP[this._sdkKey];!ft||ft._flushIntervalId!==nt?clearInterval(nt):EventLogger._safeFlushAndForget(this._sdkKey)},tt);this._flushIntervalId=nt}}EventLogger$1.EventLogger=EventLogger;var StatsigMetadata={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigMetadataProvider=Be.SDK_VERSION=void 0,Be.SDK_VERSION="3.28.1";let Le={sdkVersion:Be.SDK_VERSION,sdkType:"js-mono"};Be.StatsigMetadataProvider={get:()=>Le,add:Ye=>{Le=Object.assign(Object.assign({},Le),Ye)}}})(StatsigMetadata);var ClientInterfaces={};Object.defineProperty(ClientInterfaces,"__esModule",{value:!0});var DataAdapterCore$1={},StableID={},UUID={};Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0;function getUUID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let Be=new Date().getTime(),Le=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,tt=>{let nt=Math.random()*16;return Be>0?(nt=(Be+nt)%16|0,Be=Math.floor(Be/16)):(nt=(Le+nt)%16|0,Le=Math.floor(Le/16)),(tt==="x"?nt:nt&7|8).toString(16)})}UUID.getUUID=getUUID,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const CacheKey_1=CacheKey,Log_1$7=Log,SafeJs_1$2=SafeJs,StorageProvider_1$3=StorageProvider,UUID_1=UUID,PROMISE_MAP={},COOKIE_ENABLED_MAP={},DISABLED_MAP={};StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:Be=>{if(DISABLED_MAP[Be])return null;if(PROMISE_MAP[Be]!=null)return PROMISE_MAP[Be];let Le=null;return Le=_loadFromCookie(Be),Le!=null?(PROMISE_MAP[Be]=Le,_persistToStorage(Le,Be),Le):(Le=_loadFromStorage(Be),Le==null&&(Le=(0,UUID_1.getUUID)()),_persistToStorage(Le,Be),_persistToCookie(Le,Be),PROMISE_MAP[Be]=Le,Le)},setOverride:(Be,Le)=>{PROMISE_MAP[Le]=Be,_persistToStorage(Be,Le),_persistToCookie(Be,Le)},_setCookiesEnabled:(Be,Le)=>{COOKIE_ENABLED_MAP[Be]=Le},_setDisabled:(Be,Le)=>{DISABLED_MAP[Be]=Le}};function _getStableIDStorageKey(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}function _persistToStorage(Be,Le){const Ye=_getStableIDStorageKey(Le);try{(0,StorageProvider_1$3._setObjectInStorage)(Ye,Be)}catch{Log_1$7.Log.warn("Failed to save StableID to storage")}}function _loadFromStorage(Be){const Le=_getStableIDStorageKey(Be);return(0,StorageProvider_1$3._getObjectFromStorage)(Le)}function _loadFromCookie(Be){if(!COOKIE_ENABLED_MAP[Be]||(0,SafeJs_1$2._getDocumentSafe)()==null)return null;const Le=document.cookie.split(";");for(const Ye of Le){const[tt,nt]=Ye.trim().split("=");if(tt===getCookieName(Be))return decodeURIComponent(nt)}return null}function _persistToCookie(Be,Le){if(!COOKIE_ENABLED_MAP[Le]||(0,SafeJs_1$2._getDocumentSafe)()==null)return;const Ye=new Date;Ye.setFullYear(Ye.getFullYear()+1),document.cookie=`${getCookieName(Le)}=${encodeURIComponent(Be)}; expires=${Ye.toUTCString()}; path=/`}function getCookieName(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}StableID.getCookieName=getCookieName;var StatsigUser={};Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const Hashing_1$1=Hashing,Log_1$6=Log;function _normalizeUser(Be,Le,Ye){try{const tt=JSON.parse(JSON.stringify(Be));return Le!=null&&Le.environment!=null?tt.statsigEnvironment=Le.environment:Ye!=null&&(tt.statsigEnvironment={tier:Ye}),tt}catch{return Log_1$6.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}StatsigUser._normalizeUser=_normalizeUser;function _getFullUserHash(Be){return Be?(0,Hashing_1$1._DJB2Object)(Be):null}StatsigUser._getFullUserHash=_getFullUserHash;var TypedJsonParse={};Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const Log_1$5=Log;function _typedJsonParse(Be,Le,Ye){try{const tt=JSON.parse(Be);if(tt&&typeof tt=="object"&&Le in tt)return tt}catch{}return Log_1$5.Log.error(`Failed to parse ${Ye}`),null}TypedJsonParse._typedJsonParse=_typedJsonParse;var __awaiter$e=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DataAdapterCore$1,"__esModule",{value:!0}),DataAdapterCore$1._makeDataAdapterResult=DataAdapterCore$1.DataAdapterCore=void 0;const Log_1$4=Log,StableID_1$2=StableID,StatsigUser_1=StatsigUser,StorageProvider_1$2=StorageProvider,TypedJsonParse_1=TypedJsonParse,CACHE_LIMIT=10,MAX_CACHE_WRITE_ATTEMPTS=8;class DataAdapterCore{constructor(Le,Ye){this._adapterName=Le,this._cacheSuffix=Ye,this._options=null,this._sdkKey=null,this._cacheLimit=CACHE_LIMIT,this._lastModifiedStoreKey=`statsig.last_modified_time.${Ye}`,this._inMemoryCache=new InMemoryCache}attach(Le,Ye,tt){this._sdkKey=Le,this._options=Ye}getDataSync(Le){const Ye=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),tt=this._getCacheKey(Ye),nt=this._inMemoryCache.get(tt,Ye);if(nt&&this._getIsCacheValueValid(nt))return nt;const ft=this._loadFromCache(tt);return ft&&this._getIsCacheValueValid(ft)?(this._inMemoryCache.add(tt,ft,this._cacheLimit),this._inMemoryCache.get(tt,Ye)):null}setData(Le,Ye){const tt=Ye&&(0,StatsigUser_1._normalizeUser)(Ye,this._options),nt=this._getCacheKey(tt);this._inMemoryCache.add(nt,_makeDataAdapterResult("Bootstrap",Le,null,tt),this._cacheLimit)}_getIsCacheValueValid(Le){return Le.stableID==null||Le.stableID===StableID_1$2.StableID.get(this._getSdkKey())}_getDataAsyncImpl(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){StorageProvider_1$2.Storage.isReady()||(yield StorageProvider_1$2.Storage.isReadyResolver());const nt=Le??this.getDataSync(Ye),ft=[this._fetchAndPrepFromNetwork(nt,Ye,tt)];return tt!=null&&tt.timeoutMs&&ft.push(new Promise(ht=>setTimeout(ht,tt.timeoutMs)).then(()=>(Log_1$4.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(ft)})}_prefetchDataImpl(Le,Ye){return __awaiter$e(this,void 0,void 0,function*(){const tt=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),nt=this._getCacheKey(tt),ft=yield this._getDataAsyncImpl(null,tt,Ye);ft&&this._inMemoryCache.add(nt,Object.assign(Object.assign({},ft),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){var nt;const ft=(nt=Le==null?void 0:Le.data)!==null&&nt!==void 0?nt:null,ht=Le!=null&&this._isCachedResultValidFor204(Le,Ye),gt=yield this._fetchFromNetwork(ft,Ye,tt,ht);if(!gt)return Log_1$4.Log.debug("No response returned for latest value"),null;const At=(0,TypedJsonParse_1._typedJsonParse)(gt,"has_updates","Response"),xt=this._getSdkKey(),Et=StableID_1$2.StableID.get(xt);let yt=null;if((At==null?void 0:At.has_updates)===!0)yt=_makeDataAdapterResult("Network",gt,Et,Ye);else if(ft&&(At==null?void 0:At.has_updates)===!1)yt=_makeDataAdapterResult("NetworkNotModified",ft,Et,Ye);else return null;const Ct=this._getCacheKey(Ye);return this._inMemoryCache.add(Ct,yt,this._cacheLimit),this._writeToCache(Ct,yt),yt})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Log_1$4.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(Le){var Ye;const tt=(Ye=StorageProvider_1$2.Storage.getItem)===null||Ye===void 0?void 0:Ye.call(StorageProvider_1$2.Storage,Le);if(tt==null)return null;const nt=(0,TypedJsonParse_1._typedJsonParse)(tt,"source","Cached Result");return nt?Object.assign(Object.assign({},nt),{source:"Cache"}):null}_writeToCache(Le,Ye){const tt=JSON.stringify(Ye);for(let nt=0;nt<MAX_CACHE_WRITE_ATTEMPTS;nt++)try{StorageProvider_1$2.Storage.setItem(Le,tt);break}catch(ft){if(!(ft instanceof Error)||!(ft.toString().includes("QuotaExceededError")||ft.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw ft;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(Le,this._cacheLimit-1)}this._runLocalStorageCacheEviction(Le)}_runLocalStorageCacheEviction(Le,Ye=this._cacheLimit){var tt;const nt=(tt=(0,StorageProvider_1$2._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&tt!==void 0?tt:{};nt[Le]=Date.now();const ft=_getEvictableKeys(nt,Ye);for(const ht of ft)delete nt[ht],StorageProvider_1$2.Storage.removeItem(ht);(0,StorageProvider_1$2._setObjectInStorage)(this._lastModifiedStoreKey,nt)}}DataAdapterCore$1.DataAdapterCore=DataAdapterCore;function _makeDataAdapterResult(Be,Le,Ye,tt){return{source:Be,data:Le,receivedAt:Date.now(),stableID:Ye,fullUserHash:(0,StatsigUser_1._getFullUserHash)(tt)}}DataAdapterCore$1._makeDataAdapterResult=_makeDataAdapterResult;class InMemoryCache{constructor(){this._data={}}get(Le,Ye){var tt;const nt=this._data[Le],ft=nt==null?void 0:nt.stableID,ht=(tt=Ye==null?void 0:Ye.customIDs)===null||tt===void 0?void 0:tt.stableID;return ht&&ft&&ht!==ft?(Log_1$4.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):nt}add(Le,Ye,tt){const nt=_getEvictableKeys(this._data,tt-1);for(const ft of nt)delete this._data[ft];this._data[Le]=Ye}merge(Le){this._data=Object.assign(Object.assign({},this._data),Le)}}function _getEvictableKeys(Be,Le){const Ye=Object.keys(Be);return Ye.length<=Le?[]:Le===0?Ye:Ye.sort((tt,nt)=>{const ft=Be[tt],ht=Be[nt];return typeof ft=="object"&&typeof ht=="object"?ft.receivedAt-ht.receivedAt:ft-ht}).slice(0,Ye.length-Le)}var DownloadConfigSpecsResponse={};Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0});var ErrorBoundary={},SDKType={};Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const SDK_CLIENT={};let suffix;SDKType.SDKType={_get:Be=>{var Le;return((Le=SDK_CLIENT[Be])!==null&&Le!==void 0?Le:"js-mono")+(suffix??"")},_setClientType(Be,Le){SDK_CLIENT[Be]=Le},_setBindingType(Be){(!suffix||suffix==="-react")&&(suffix="-"+Be)}},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__awaiter||function(yt,Ct,kt,vt){function bt(It){return It instanceof kt?It:new kt(function(wt){wt(It)})}return new(kt||(kt=Promise))(function(It,wt){function Rt(Dt){try{Bt(vt.next(Dt))}catch(Pt){wt(Pt)}}function Tt(Dt){try{Bt(vt.throw(Dt))}catch(Pt){wt(Pt)}}function Bt(Dt){Dt.done?It(Dt.value):bt(Dt.value).then(Rt,Tt)}Bt((vt=vt.apply(yt,Ct||[])).next())})};Object.defineProperty(Be,"__esModule",{value:!0}),Be.ErrorBoundary=Be.EXCEPTION_ENDPOINT=void 0;const Ye=Log,tt=SDKType,nt=StatsigMetadata;Be.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const ft="[Statsig] UnknownError";class ht{constructor(Ct,kt,vt,bt){this._sdkKey=Ct,this._options=kt,this._emitter=vt,this._lastSeenError=bt,this._seen=new Set}wrap(Ct,kt){try{const vt=Ct;xt(vt).forEach(bt=>{const It=vt[bt];"$EB"in It||(vt[bt]=(...wt)=>this._capture(kt?`${kt}:${bt}`:bt,()=>It.apply(Ct,wt)),vt[bt].$EB=!0)})}catch(vt){this._onError("eb:wrap",vt)}}logError(Ct,kt){this._onError(Ct,kt)}getLastSeenErrorAndReset(){const Ct=this._lastSeenError;return this._lastSeenError=void 0,Ct??null}attachErrorIfNoneExists(Ct){this._lastSeenError||(this._lastSeenError=gt(Ct))}_capture(Ct,kt){try{const vt=kt();return vt&&vt instanceof Promise?vt.catch(bt=>this._onError(Ct,bt)):vt}catch(vt){return this._onError(Ct,vt),null}}_onError(Ct,kt){try{Ye.Log.warn(`Caught error in ${Ct}`,{error:kt}),Le(this,void 0,void 0,function*(){var bt,It,wt,Rt,Tt,Bt,Dt;const Pt=kt||Error(ft),Nt=Pt instanceof Error,Lt=Nt?Pt.name:"No Name",Wt=gt(Pt);if(this._lastSeenError=Wt,this._seen.has(Lt))return;if(this._seen.add(Lt),!((It=(bt=this._options)===null||bt===void 0?void 0:bt.networkConfig)===null||It===void 0)&&It.preventAllNetworkTraffic){(wt=this._emitter)===null||wt===void 0||wt.call(this,{name:"error",error:kt,tag:Ct});return}const $t=tt.SDKType._get(this._sdkKey),Kt=nt.StatsigMetadataProvider.get(),Vt=Nt?Pt.stack:At(Pt),Ut=Object.assign({tag:Ct,exception:Lt,info:Vt,statsigOptions:Et(this._options)},Object.assign(Object.assign({},Kt),{sdkType:$t}));yield((Bt=(Tt=(Rt=this._options)===null||Rt===void 0?void 0:Rt.networkConfig)===null||Tt===void 0?void 0:Tt.networkOverrideFunc)!==null&&Bt!==void 0?Bt:fetch)(Be.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String($t),"STATSIG-SDK-VERSION":String(Kt.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(Ut)}),(Dt=this._emitter)===null||Dt===void 0||Dt.call(this,{name:"error",error:kt,tag:Ct})}).then(()=>{}).catch(()=>{})}catch{}}}Be.ErrorBoundary=ht;function gt(yt){return yt instanceof Error?yt:typeof yt=="string"?new Error(yt):new Error("An unknown error occurred.")}function At(yt){try{return JSON.stringify(yt)}catch{return ft}}function xt(yt){const Ct=new Set;let kt=Object.getPrototypeOf(yt);for(;kt&&kt!==Object.prototype;)Object.getOwnPropertyNames(kt).filter(vt=>typeof(kt==null?void 0:kt[vt])=="function").forEach(vt=>Ct.add(vt)),kt=Object.getPrototypeOf(kt);return Array.from(Ct)}function Et(yt){if(!yt)return{};const Ct={};return Object.keys(yt).forEach(kt=>{const vt=kt,bt=yt[vt];switch(typeof bt){case"number":case"bigint":case"boolean":Ct[String(vt)]=bt;break;case"string":bt.length<50?Ct[String(vt)]=bt:Ct[String(vt)]="set";break;case"object":vt==="environment"?Ct.environment=bt:vt==="networkConfig"?Ct.networkConfig=bt:Ct[String(vt)]=bt!=null?"set":"unset";break}}),Ct}}(ErrorBoundary);var EvaluationOptions={};Object.defineProperty(EvaluationOptions,"__esModule",{value:!0});var EvaluationTypes={};Object.defineProperty(EvaluationTypes,"__esModule",{value:!0});var InitializeResponse={};Object.defineProperty(InitializeResponse,"__esModule",{value:!0});var MemoKey={};Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const EXIST_KEYS=new Set([]),DO_NOT_MEMO_KEYS=new Set(["userPersistedValues"]);function createMemoKey(Be,Le,Ye){let tt=`${Be}|${Le}`;if(!Ye)return tt;for(const nt of Object.keys(Ye)){if(DO_NOT_MEMO_KEYS.has(nt))return;EXIST_KEYS.has(nt)?tt+=`|${nt}=true`:tt+=`|${nt}=${Ye[nt]}`}return tt}MemoKey.createMemoKey=createMemoKey;var NetworkCore$1={},NetworkFallbackResolver$1={},DnsTxtQuery={},__awaiter$d=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const FEATURE_ASSETS_DNS_QUERY=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),DNS_QUERY_ENDPOINT="https://cloudflare-dns.com/dns-query",DOMAIN_CHARS=["i","e","d"],MAX_START_LOOKUP=200;function _fetchTxtRecords(Be){return __awaiter$d(this,void 0,void 0,function*(){const Le=yield Be(DNS_QUERY_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:FEATURE_ASSETS_DNS_QUERY});if(!Le.ok){const nt=new Error("Failed to fetch TXT records from DNS");throw nt.name="DnsTxtFetchError",nt}const Ye=yield Le.arrayBuffer(),tt=new Uint8Array(Ye);return _parseDnsResponse(tt)})}DnsTxtQuery._fetchTxtRecords=_fetchTxtRecords;function _parseDnsResponse(Be){const Le=Be.findIndex((tt,nt)=>nt<MAX_START_LOOKUP&&String.fromCharCode(tt)==="="&&DOMAIN_CHARS.includes(String.fromCharCode(Be[nt-1])));if(Le===-1){const tt=new Error("Failed to parse TXT records from DNS");throw tt.name="DnsTxtParseError",tt}let Ye="";for(let tt=Le-1;tt<Be.length;tt++)Ye+=String.fromCharCode(Be[tt]);return Ye.split(",")}var __awaiter$c=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkFallbackResolver$1,"__esModule",{value:!0}),NetworkFallbackResolver$1._isDomainFailure=NetworkFallbackResolver$1.NetworkFallbackResolver=void 0;const DnsTxtQuery_1=DnsTxtQuery,Hashing_1=Hashing,Log_1$3=Log,StorageProvider_1$1=StorageProvider,DEFAULT_TTL_MS=7*24*60*60*1e3,COOLDOWN_TIME_MS=4*60*60*1e3;class NetworkFallbackResolver{constructor(Le){var Ye;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(Ye=Le.networkConfig)===null||Ye===void 0?void 0:Ye.networkOverrideFunc}setErrorBoundary(Le){this._errorBoundary=Le}tryBumpExpiryTime(Le,Ye){var tt;const nt=(tt=this._fallbackInfo)===null||tt===void 0?void 0:tt[Ye.endpoint];nt&&(nt.expiryTime=Date.now()+DEFAULT_TTL_MS,_tryWriteFallbackInfoToCache(Le,Object.assign(Object.assign({},this._fallbackInfo),{[Ye.endpoint]:nt})))}getActiveFallbackUrl(Le,Ye){var tt,nt;if(Ye.customUrl!=null&&Ye.fallbackUrls!=null)return null;let ft=this._fallbackInfo;ft==null&&(ft=(tt=_readFallbackInfoFromCache(Le))!==null&&tt!==void 0?tt:{},this._fallbackInfo=ft);const ht=ft[Ye.endpoint];return!ht||Date.now()>((nt=ht.expiryTime)!==null&&nt!==void 0?nt:0)||Ye.getChecksum()!==ht.urlConfigChecksum?(delete ft[Ye.endpoint],this._fallbackInfo=ft,_tryWriteFallbackInfoToCache(Le,this._fallbackInfo),null):ht.url?ht.url:null}tryFetchUpdatedFallbackInfo(Le,Ye,tt,nt){return __awaiter$c(this,void 0,void 0,function*(){var ft,ht;try{if(!_isDomainFailure(tt,nt))return!1;const At=Ye.customUrl==null&&Ye.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(Ye):Ye.fallbackUrls,xt=this._pickNewFallbackUrl((ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[Ye.endpoint],At);return xt?(this._updateFallbackInfoWithNewUrl(Le,Ye,xt),!0):!1}catch(gt){return(ht=this._errorBoundary)===null||ht===void 0||ht.logError("tryFetchUpdatedFallbackInfo",gt),!1}})}_updateFallbackInfoWithNewUrl(Le,Ye,tt){var nt,ft,ht;const gt={urlConfigChecksum:Ye.getChecksum(),url:tt,expiryTime:Date.now()+DEFAULT_TTL_MS,previous:[]},At=Ye.endpoint,xt=(nt=this._fallbackInfo)===null||nt===void 0?void 0:nt[At];xt&>.previous.push(...xt.previous),gt.previous.length>10&&(gt.previous=[]);const Et=(ht=(ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[At])===null||ht===void 0?void 0:ht.url;Et!=null&>.previous.push(Et),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[At]:gt}),_tryWriteFallbackInfoToCache(Le,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(Le){return __awaiter$c(this,void 0,void 0,function*(){var Ye;const tt=this._dnsQueryCooldowns[Le.endpoint];if(tt&&Date.now()<tt)return null;this._dnsQueryCooldowns[Le.endpoint]=Date.now()+COOLDOWN_TIME_MS;const nt=[],ft=yield(0,DnsTxtQuery_1._fetchTxtRecords)((Ye=this._networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch),ht=_extractPathFromUrl(Le.defaultUrl);for(const gt of ft){if(!gt.startsWith(Le.endpointDnsKey+"="))continue;const At=gt.split("=");if(At.length>1){let xt=At[1];xt.endsWith("/")&&(xt=xt.slice(0,-1)),nt.push(`https://${xt}${ht}`)}}return nt})}_pickNewFallbackUrl(Le,Ye){var tt;if(Ye==null)return null;const nt=new Set((tt=Le==null?void 0:Le.previous)!==null&&tt!==void 0?tt:[]),ft=Le==null?void 0:Le.url;let ht=null;for(const gt of Ye){const At=gt.endsWith("/")?gt.slice(0,-1):gt;if(!nt.has(gt)&&At!==ft){ht=At;break}}return ht}}NetworkFallbackResolver$1.NetworkFallbackResolver=NetworkFallbackResolver;function _isDomainFailure(Be,Le){var Ye;const tt=(Ye=Be==null?void 0:Be.toLowerCase())!==null&&Ye!==void 0?Ye:"";return Le||tt.includes("uncaught exception")||tt.includes("failed to fetch")||tt.includes("networkerror when attempting to fetch resource")}NetworkFallbackResolver$1._isDomainFailure=_isDomainFailure;function _getFallbackInfoStorageKey(Be){return`statsig.network_fallback.${(0,Hashing_1._DJB2)(Be)}`}function _tryWriteFallbackInfoToCache(Be,Le){const Ye=_getFallbackInfoStorageKey(Be);if(!Le||Object.keys(Le).length===0){StorageProvider_1$1.Storage.removeItem(Ye);return}StorageProvider_1$1.Storage.setItem(Ye,JSON.stringify(Le))}function _readFallbackInfoFromCache(Be){const Le=_getFallbackInfoStorageKey(Be),Ye=StorageProvider_1$1.Storage.getItem(Le);if(!Ye)return null;try{return JSON.parse(Ye)}catch{return Log_1$3.Log.error("Failed to parse FallbackInfo"),null}}function _extractPathFromUrl(Be){try{return new URL(Be).pathname}catch{return null}}var SDKFlags={};Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const FLAGMAP={};SDKFlags.SDKFlags={setFlags:(Be,Le)=>{FLAGMAP[Be]=Le},get:(Be,Le)=>{var Ye,tt;return(tt=(Ye=FLAGMAP[Be])===null||Ye===void 0?void 0:Ye[Le])!==null&&tt!==void 0?tt:!1}};var SessionID={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigSession=Be.SessionID=void 0;const Le=$_StatsigGlobal,Ye=CacheKey,tt=Log,nt=StorageProvider,ft=UUID,ht=30*60*1e3,gt=4*60*60*1e3,At={};Be.SessionID={get:Rt=>Be.StatsigSession.get(Rt).data.sessionID},Be.StatsigSession={get:Rt=>{At[Rt]==null&&(At[Rt]=xt(Rt));const Tt=At[Rt];return yt(Tt)},overrideInitialSessionID:(Rt,Tt)=>{At[Tt]=Et(Rt,Tt)}};function xt(Rt){let Tt=wt(Rt);const Bt=Date.now();return Tt||(Tt={sessionID:(0,ft.getUUID)(),startTime:Bt,lastUpdate:Bt}),{data:Tt,sdkKey:Rt}}function Et(Rt,Tt){const Bt=Date.now();return{data:{sessionID:Rt,startTime:Bt,lastUpdate:Bt},sdkKey:Tt}}function yt(Rt){const Tt=Date.now(),Bt=Rt.data,Dt=Rt.sdkKey;if(kt(Bt)||vt(Bt)){Bt.sessionID=(0,ft.getUUID)(),Bt.startTime=Tt;const Nt=__STATSIG__==null?void 0:__STATSIG__.instance(Dt);Nt&&Nt.$emt({name:"session_expired"})}Bt.lastUpdate=Tt,It(Bt,Rt.sdkKey),clearTimeout(Rt.idleTimeoutID),clearTimeout(Rt.ageTimeoutID);const Pt=Tt-Bt.startTime;return Rt.idleTimeoutID=Ct(Dt,ht),Rt.ageTimeoutID=Ct(Dt,gt-Pt),Rt}function Ct(Rt,Tt){return setTimeout(()=>{var Bt;const Dt=(Bt=(0,Le._getStatsigGlobal)())===null||Bt===void 0?void 0:Bt.instance(Rt);Dt&&Dt.$emt({name:"session_expired"})},Tt)}function kt({lastUpdate:Rt}){return Date.now()-Rt>ht}function vt({startTime:Rt}){return Date.now()-Rt>gt}function bt(Rt){return`statsig.session_id.${(0,Ye._getStorageKey)(Rt)}`}function It(Rt,Tt){const Bt=bt(Tt);try{(0,nt._setObjectInStorage)(Bt,Rt)}catch{tt.Log.warn("Failed to save SessionID")}}function wt(Rt){const Tt=bt(Rt);return(0,nt._getObjectFromStorage)(Tt)}})(SessionID);var StatsigClientEventEmitter={};Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"};var __awaiter$b=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkCore$1,"__esModule",{value:!0}),NetworkCore$1.NetworkCore=void 0;const __StatsigGlobal_1$1=$_StatsigGlobal,Diagnostics_1=Diagnostics,Log_1$2=Log,NetworkConfig_1=NetworkConfig,NetworkFallbackResolver_1=NetworkFallbackResolver$1,SDKFlags_1=SDKFlags,SDKType_1=SDKType,SafeJs_1$1=SafeJs,SessionID_1$1=SessionID,StableID_1$1=StableID,StatsigClientEventEmitter_1=StatsigClientEventEmitter,StatsigMetadata_1=StatsigMetadata,StatsigOptionsCommon_1$1=StatsigOptionsCommon,VisibilityObserving_1=VisibilityObserving,DEFAULT_TIMEOUT_MS=1e4,BACKOFF_BASE_MS=500,BACKOFF_MAX_MS=3e4,RATE_LIMIT_WINDOW_MS=1e3,RATE_LIMIT_MAX_REQ_COUNT=50,LEAK_RATE=RATE_LIMIT_MAX_REQ_COUNT/RATE_LIMIT_WINDOW_MS,RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);class NetworkCore{constructor(Le,Ye){this._emitter=Ye,this._errorBoundary=null,this._timeout=DEFAULT_TIMEOUT_MS,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,Le&&(this._options=Le),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(Le))}setLogEventCompressionMode(Le){this._options.logEventCompressionMode=Le}setErrorBoundary(Le){this._errorBoundary=Le,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(Le)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const Le=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,Le}beacon(Le){if(!_ensureValidSdkKey(Le))return!1;const Ye=this._getInternalRequestArgs("POST",Le),tt=this._getPopulatedURL(Ye),nt=navigator;return nt.sendBeacon.bind(nt)(tt,Ye.body)}post(Le){return __awaiter$b(this,void 0,void 0,function*(){const Ye=this._getInternalRequestArgs("POST",Le);return this._tryEncodeBody(Ye),yield this._tryToCompressBody(Ye),this._sendRequest(Ye)})}get(Le){const Ye=this._getInternalRequestArgs("GET",Le);return this._sendRequest(Ye)}_sendRequest(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye,tt,nt,ft;if(!_ensureValidSdkKey(Le)||this._netConfig.preventAllNetworkTraffic)return null;const{method:ht,body:gt,retries:At,attempt:xt}=Le,Et=Le.urlConfig.endpoint;if(this._isRateLimited(Et))return Log_1$2.Log.warn(`Request to ${Et} was blocked because you are making requests too frequently.`),null;const yt=xt??1;let Ct=!1;const kt=this._getPopulatedURL(Le);let vt=null;const bt=(0,VisibilityObserving_1._isUnloading)();try{const It={method:ht,body:gt,headers:Object.assign({},Le.headers),priority:Le.priority,keepalive:bt};_tryMarkInitStart(Le,yt);const wt=this._leakyBucket[Et];wt&&(wt.lastRequestTime=Date.now(),this._leakyBucket[Et]=wt);const Rt=(Ye=this._netConfig.networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch;let Tt;if(vt=yield Promise.race([Rt(kt,It).finally(()=>clearTimeout(Tt)),new Promise((Dt,Pt)=>{Tt=setTimeout(()=>{Ct=!0,Pt(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!vt.ok){const Dt=yield vt.text().catch(()=>"No Text"),Pt=new Error(`NetworkError: ${kt} ${Dt}`);throw Pt.name="NetworkError",Pt}const Bt=yield vt.text();return _tryMarkInitEnd(Le,vt,yt,Bt),this._fallbackResolver.tryBumpExpiryTime(Le.sdkKey,Le.urlConfig),{body:Bt,code:vt.status}}catch(It){const wt=_getErrorMessage(It),Rt=_didTimeout(wt??"",Ct);if(_tryMarkInitEnd(Le,vt,yt,"",It),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(Le.sdkKey,Le.urlConfig,wt,Rt))&&(Le.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(Le.sdkKey,Le.urlConfig)),!At||yt>At||!RETRYABLE_CODES.has((tt=vt==null?void 0:vt.status)!==null&&tt!==void 0?tt:500)){(nt=this._emitter)===null||nt===void 0||nt.call(this,{name:"error",error:It,tag:StatsigClientEventEmitter_1.ErrorTag.NetworkError,requestArgs:Le});const Bt=`A networking error occurred during ${ht} request to ${kt}.`;return Log_1$2.Log.error(Bt,wt,It),(ft=this._errorBoundary)===null||ft===void 0||ft.attachErrorIfNoneExists(Bt),null}return yield _exponentialBackoff(yt),this._sendRequest(Object.assign(Object.assign({},Le),{retries:At,attempt:yt+1}))}})}_getLogEventCompressionMode(Le){let Ye=Le==null?void 0:Le.logEventCompressionMode;return!Ye&&(Le==null?void 0:Le.disableCompression)===!0&&(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled),Ye||(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled),Ye}_isRateLimited(Le){var Ye;const tt=Date.now(),nt=(Ye=this._leakyBucket[Le])!==null&&Ye!==void 0?Ye:{count:0,lastRequestTime:tt},ft=tt-nt.lastRequestTime,ht=Math.floor(ft*LEAK_RATE);return nt.count=Math.max(0,nt.count-ht),nt.count>=RATE_LIMIT_MAX_REQ_COUNT?!0:(nt.count+=1,nt.lastRequestTime=tt,this._leakyBucket[Le]=nt,!1)}_getPopulatedURL(Le){var Ye;const tt=(Ye=Le.fallbackUrl)!==null&&Ye!==void 0?Ye:Le.urlConfig.getUrl();(Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize||Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=tt);const nt=Object.assign({[NetworkConfig_1.NetworkParam.SdkKey]:Le.sdkKey,[NetworkConfig_1.NetworkParam.SdkType]:SDKType_1.SDKType._get(Le.sdkKey),[NetworkConfig_1.NetworkParam.SdkVersion]:StatsigMetadata_1.SDK_VERSION,[NetworkConfig_1.NetworkParam.Time]:String(Date.now()),[NetworkConfig_1.NetworkParam.SessionID]:SessionID_1$1.SessionID.get(Le.sdkKey)},Le.params),ft=Object.keys(nt).map(ht=>`${encodeURIComponent(ht)}=${encodeURIComponent(nt[ht])}`).join("&");return`${tt}${ft?`?${ft}`:""}`}_tryEncodeBody(Le){var Ye;const tt=(0,SafeJs_1$1._getWindowSafe)(),nt=Le.body;if(!(!Le.isStatsigEncodable||this._options.disableStatsigEncoding||typeof nt!="string"||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-encode")!=null||!(tt!=null&&tt.btoa)))try{Le.body=tt.btoa(nt).split("").reverse().join(""),Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.StatsigEncoded]:"1"})}catch(ft){Log_1$2.Log.warn(`Request encoding failed for ${Le.urlConfig.getUrl()}`,ft)}}_tryToCompressBody(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye;const tt=Le.body;if(!(typeof tt!="string"||!_allowCompression(Le,this._options)))try{const nt=new TextEncoder().encode(tt),ft=new CompressionStream("gzip"),ht=ft.writable.getWriter();ht.write(nt).catch(Log_1$2.Log.error),ht.close().catch(Log_1$2.Log.error);const gt=ft.readable.getReader(),At=[];let xt;for(;!(xt=yield gt.read()).done;)At.push(xt.value);const Et=At.reduce((kt,vt)=>kt+vt.length,0),yt=new Uint8Array(Et);let Ct=0;for(const kt of At)yt.set(kt,Ct),Ct+=kt.length;Le.body=yt,Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.IsGzipped]:"1"})}catch(nt){Log_1$2.Log.warn(`Request compression failed for ${Le.urlConfig.getUrl()}`,nt)}})}_getInternalRequestArgs(Le,Ye){const tt=this._fallbackResolver.getActiveFallbackUrl(Ye.sdkKey,Ye.urlConfig),nt=Object.assign(Object.assign({},Ye),{method:Le,fallbackUrl:tt});return"data"in Ye&&_populateRequestBody(nt,Ye.data),nt}}NetworkCore$1.NetworkCore=NetworkCore;const _ensureValidSdkKey=Be=>Be.sdkKey?!0:(Log_1$2.Log.warn("Unable to make request without an SDK key"),!1),_populateRequestBody=(Be,Le)=>{const{sdkKey:Ye,fallbackUrl:tt}=Be,nt=StableID_1$1.StableID.get(Ye),ft=SessionID_1$1.SessionID.get(Ye),ht=SDKType_1.SDKType._get(Ye);Be.body=JSON.stringify(Object.assign(Object.assign({},Le),{statsigMetadata:Object.assign(Object.assign({},StatsigMetadata_1.StatsigMetadataProvider.get()),{stableID:nt,sessionID:ft,sdkType:ht,fallbackUrl:tt})}))};function _allowCompression(Be,Le){if(!Be.isCompressable||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const Ye=Be.urlConfig.customUrl!=null||Be.urlConfig.fallbackUrls!=null,tt=SDKFlags_1.SDKFlags.get(Be.sdkKey,"enable_log_event_compression")===!0;switch(Le.logEventCompressionMode){case StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled:return!1;case StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled:return!(Ye&&!tt);case StatsigOptionsCommon_1$1.LogEventCompressionMode.Forced:return!0;default:return!1}}function _getErrorMessage(Be){return typeof Be=="string"?Be:Be instanceof Error?`${Be.name}: ${Be.message}`:"Unknown Error"}function _didTimeout(Be,Le){return Be.includes("Timeout")||Le}function _tryMarkInitStart(Be,Le){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqStart(Be.sdkKey,{attempt:Le})}function _tryMarkInitEnd(Be,Le,Ye,tt,nt){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqEnd(Be.sdkKey,Diagnostics_1.Diagnostics._getDiagnosticsData(Le,Ye,tt,nt))}function _exponentialBackoff(Be){return __awaiter$b(this,void 0,void 0,function*(){yield new Promise(Le=>setTimeout(Le,Math.min(BACKOFF_BASE_MS*(Be*Be),BACKOFF_MAX_MS)))})}var OverrideAdapter={};Object.defineProperty(OverrideAdapter,"__esModule",{value:!0});var ParamStoreTypes={};Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0});var SizeOf={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._fastApproxSizeOf=void 0;const Le=2,Ye=1,tt=(nt,ft)=>{let ht=0;const gt=Object.keys(nt);for(let At=0;At<gt.length;At++){const xt=gt[At],Et=nt[xt];if(ht+=xt.length,typeof Et=="object"&&Et!==null?ht+=(0,Be._fastApproxSizeOf)(Et,ft)+Le:ht+=String(Et).length+Ye,ht>=ft)return ht}return ht};Be._fastApproxSizeOf=tt})(SizeOf);var StatsigClientBase$1={},__awaiter$a=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClientBase$1,"__esModule",{value:!0}),StatsigClientBase$1.StatsigClientBase=void 0;const __StatsigGlobal_1=$_StatsigGlobal,ErrorBoundary_1=ErrorBoundary,EventLogger_1=EventLogger$1,Log_1$1=Log,MemoKey_1=MemoKey,SafeJs_1=SafeJs,SessionID_1=SessionID,StableID_1=StableID,StatsigOptionsCommon_1=StatsigOptionsCommon,StorageProvider_1=StorageProvider,MAX_MEMO_CACHE_SIZE=3e3;class StatsigClientBase{constructor(Le,Ye,tt,nt){var ft,ht,gt,At;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const xt=this.$emt.bind(this);(nt==null?void 0:nt.logLevel)!=null&&(Log_1$1.Log.level=nt.logLevel),nt!=null&&nt.disableStorage&&StorageProvider_1.Storage._setDisabled(!0),nt!=null&&nt.initialSessionID&&SessionID_1.StatsigSession.overrideInitialSessionID(nt.initialSessionID,Le),nt!=null&&nt.storageProvider&&StorageProvider_1.Storage._setProvider(nt.storageProvider),nt!=null&&nt.enableCookies&&StableID_1.StableID._setCookiesEnabled(Le,nt.enableCookies),nt!=null&&nt.disableStableID&&StableID_1.StableID._setDisabled(Le,!0),this._sdkKey=Le,this._options=nt??{},this._memoCache={},this.overrideAdapter=(ft=nt==null?void 0:nt.overrideAdapter)!==null&&ft!==void 0?ft:null,this._logger=new EventLogger_1.EventLogger(Le,xt,tt,nt),this._errorBoundary=new ErrorBoundary_1.ErrorBoundary(Le,nt,xt),this._errorBoundary.wrap(this),this._errorBoundary.wrap(Ye),this._errorBoundary.wrap(this._logger),tt.setErrorBoundary(this._errorBoundary),this.dataAdapter=Ye,this.dataAdapter.attach(Le,nt,tt),this.storageProvider=StorageProvider_1.Storage,(At=(gt=(ht=this.overrideAdapter)===null||ht===void 0?void 0:ht.loadFromStorage)===null||gt===void 0?void 0:gt.call(ht))===null||At===void 0||At.catch(Et=>this._errorBoundary.logError("OA::loadFromStorage",Et)),this._primeReadyRipcord(),_assignGlobalInstance(Le,this)}updateRuntimeOptions(Le){Le.loggingEnabled?(this._options.loggingEnabled=Le.loggingEnabled,this._logger.setLoggingEnabled(Le.loggingEnabled)):Le.disableLogging!=null&&(this._options.disableLogging=Le.disableLogging,this._logger.setLoggingEnabled(Le.disableLogging?"disabled":"browser-only")),Le.disableStorage!=null&&(this._options.disableStorage=Le.disableStorage,StorageProvider_1.Storage._setDisabled(Le.disableStorage)),Le.enableCookies!=null&&(this._options.enableCookies=Le.enableCookies,StableID_1.StableID._setCookiesEnabled(this._sdkKey,Le.enableCookies)),Le.logEventCompressionMode?this._logger.setLogEventCompressionMode(Le.logEventCompressionMode):Le.disableCompression&&this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return __awaiter$a(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(Le,Ye){this._listeners[Le]||(this._listeners[Le]=[]),this._listeners[Le].push(Ye)}off(Le,Ye){if(this._listeners[Le]){const tt=this._listeners[Le].indexOf(Ye);tt!==-1&&this._listeners[Le].splice(tt,1)}}$on(Le,Ye){Ye.__isInternal=!0,this.on(Le,Ye)}$emt(Le){var Ye;const tt=nt=>{try{nt(Le)}catch(ft){if(nt.__isInternal===!0){this._errorBoundary.logError(`__emit:${Le.name}`,ft);return}Log_1$1.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",Le)}};this._listeners[Le.name]&&this._listeners[Le.name].forEach(nt=>tt(nt)),(Ye=this._listeners["*"])===null||Ye===void 0||Ye.forEach(tt)}_setStatus(Le,Ye){this.loadingStatus=Le,this._memoCache={},this.$emt({name:"values_updated",status:Le,values:Ye})}_enqueueExposure(Le,Ye,tt){if((tt==null?void 0:tt.disableExposureLog)===!0){this._logger.incrementNonExposureCount(Le);return}this._logger.enqueue(Ye)}_memoize(Le,Ye){return(tt,nt)=>{if(this._options.disableEvaluationMemoization)return Ye(tt,nt);const ft=(0,MemoKey_1.createMemoKey)(Le,tt,nt);return ft?(ft in this._memoCache||(Object.keys(this._memoCache).length>=MAX_MEMO_CACHE_SIZE&&(this._memoCache={}),this._memoCache[ft]=Ye(tt,nt)),this._memoCache[ft]):Ye(tt,nt)}}}StatsigClientBase$1.StatsigClientBase=StatsigClientBase;function _assignGlobalInstance(Be,Le){var Ye;if((0,SafeJs_1._isServerEnv)())return;const tt=(0,__StatsigGlobal_1._getStatsigGlobal)(),nt=(Ye=tt.instances)!==null&&Ye!==void 0?Ye:{},ft=Le;nt[Be]!=null&&Log_1$1.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),nt[Be]=ft,tt.firstInstance||(tt.firstInstance=ft),tt.instances=nt,__STATSIG__=tt}var StatsigDataAdapter={};Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached";var StatsigPlugin={};Object.defineProperty(StatsigPlugin,"__esModule",{value:!0});var StatsigTypeFactories={};Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const Log_1=Log,TypingUtils_1=TypingUtils;function _makeEvaluation(Be,Le,Ye,tt){var nt;return{name:Be,details:Le,ruleID:(nt=Ye==null?void 0:Ye.rule_id)!==null&&nt!==void 0?nt:"",__evaluation:Ye,value:tt}}function _makeFeatureGate(Be,Le,Ye){var tt;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,(Ye==null?void 0:Ye.value)===!0)),{idType:(tt=Ye==null?void 0:Ye.id_type)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeFeatureGate=_makeFeatureGate;function _makeDynamicConfig(Be,Le,Ye){var tt,nt;const ft=(tt=Ye==null?void 0:Ye.value)!==null&&tt!==void 0?tt:{};return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,ft)),{idType:(nt=Ye==null?void 0:Ye.id_type)!==null&&nt!==void 0?nt:null,get:_makeTypedGet(Be,Ye==null?void 0:Ye.value)})}StatsigTypeFactories._makeDynamicConfig=_makeDynamicConfig;function _makeExperiment(Be,Le,Ye){var tt;const nt=_makeDynamicConfig(Be,Le,Ye);return Object.assign(Object.assign({},nt),{groupName:(tt=Ye==null?void 0:Ye.group_name)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeExperiment=_makeExperiment;function _makeLayer(Be,Le,Ye,tt){var nt,ft;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,void 0)),{get:_makeTypedGet(Be,Ye==null?void 0:Ye.value,tt),groupName:(nt=Ye==null?void 0:Ye.group_name)!==null&&nt!==void 0?nt:null,__value:(ft=Ye==null?void 0:Ye.value)!==null&&ft!==void 0?ft:{}})}StatsigTypeFactories._makeLayer=_makeLayer;function _mergeOverride(Be,Le,Ye,tt){return Object.assign(Object.assign(Object.assign({},Be),Le),{get:_makeTypedGet(Be.name,Ye,tt)})}StatsigTypeFactories._mergeOverride=_mergeOverride;function _makeTypedGet(Be,Le,Ye){return(tt,nt)=>{var ft;const ht=(ft=Le==null?void 0:Le[tt])!==null&&ft!==void 0?ft:null;return ht==null?nt??null:nt!=null&&!(0,TypingUtils_1._isTypeMatch)(ht,nt)?(Log_1.Log.warn(`Parameter type mismatch. '${Be}.${tt}' was found to be type '${typeof ht}' but fallback/return type is '${typeof nt}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),nt??null):(Ye==null||Ye(tt),ht)}}StatsigTypeFactories._makeTypedGet=_makeTypedGet;var StatsigTypes={};Object.defineProperty(StatsigTypes,"__esModule",{value:!0});var StatsigUpdateDetails={};Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;const createUpdateDetails=(Be,Le,Ye,tt,nt,ft)=>({duration:Ye,source:Le,success:Be,error:tt,sourceUrl:nt,warnings:ft});StatsigUpdateDetails.createUpdateDetails=createUpdateDetails,StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt);var kt=Object.getOwnPropertyDescriptor(Et,yt);(!kt||("get"in kt?!Et.__esModule:kt.writable||kt.configurable))&&(kt={enumerable:!0,get:function(){return Et[yt]}}),Object.defineProperty(xt,Ct,kt)}:function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt),xt[Ct]=Et[yt]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Et){for(var yt in xt)yt!=="default"&&!Object.prototype.hasOwnProperty.call(Et,yt)&&Le(Et,xt,yt)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.Storage=Be.Log=Be.EventLogger=Be.Diagnostics=void 0;const tt=$_StatsigGlobal,nt=Diagnostics;Object.defineProperty(Be,"Diagnostics",{enumerable:!0,get:function(){return nt.Diagnostics}});const ft=EventLogger$1;Object.defineProperty(Be,"EventLogger",{enumerable:!0,get:function(){return ft.EventLogger}});const ht=Log;Object.defineProperty(Be,"Log",{enumerable:!0,get:function(){return ht.Log}});const gt=StatsigMetadata,At=StorageProvider;Object.defineProperty(Be,"Storage",{enumerable:!0,get:function(){return At.Storage}}),Ye($_StatsigGlobal,Be),Ye(CacheKey,Be),Ye(ClientInterfaces,Be),Ye(DataAdapterCore$1,Be),Ye(Diagnostics,Be),Ye(DownloadConfigSpecsResponse,Be),Ye(ErrorBoundary,Be),Ye(EvaluationOptions,Be),Ye(EvaluationTypes,Be),Ye(Hashing,Be),Ye(InitializeResponse,Be),Ye(Log,Be),Ye(MemoKey,Be),Ye(NetworkConfig,Be),Ye(NetworkCore$1,Be),Ye(OverrideAdapter,Be),Ye(ParamStoreTypes,Be),Ye(SafeJs,Be),Ye(SDKType,Be),Ye(SessionID,Be),Ye(SizeOf,Be),Ye(StableID,Be),Ye(StatsigClientBase$1,Be),Ye(StatsigClientEventEmitter,Be),Ye(StatsigDataAdapter,Be),Ye(StatsigEvent,Be),Ye(StatsigMetadata,Be),Ye(StatsigOptionsCommon,Be),Ye(StatsigPlugin,Be),Ye(StatsigTypeFactories,Be),Ye(StatsigTypes,Be),Ye(StatsigUser,Be),Ye(StorageProvider,Be),Ye(TypedJsonParse,Be),Ye(TypingUtils,Be),Ye(UrlConfiguration$1,Be),Ye(UUID,Be),Ye(VisibilityObserving,Be),Ye(StatsigUpdateDetails,Be),Ye(SDKFlags,Be),Object.assign((0,tt._getStatsigGlobal)(),{Log:ht.Log,SDK_VERSION:gt.SDK_VERSION})}(src$1);var StatsigClient$1={},EvaluationStore$1={},V1InitializeContainer$1={};Object.defineProperty(V1InitializeContainer$1,"__esModule",{value:!0}),V1InitializeContainer$1.V1InitializeContainer=void 0;const client_core_1$7=src$1;class V1InitializeContainer{constructor(Le){this._values=Le}getGate(Le){return this._getResultFromLookup(this._values.feature_gates,Le)}getConfig(Le){return this._getResultFromLookup(this._values.dynamic_configs,Le)}getLayer(Le){return this._getResultFromLookup(this._values.layer_configs,Le)}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$7._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V1InitializeContainer$1.V1InitializeContainer=V1InitializeContainer;var V2InitializeContainer$1={};Object.defineProperty(V2InitializeContainer$1,"__esModule",{value:!0}),V2InitializeContainer$1.V2InitializeContainer=void 0;const client_core_1$6=src$1;class V2InitializeContainer{constructor(Le){this._values=Le}getGate(Le){var Ye,tt,nt;const ft=this._getResultFromLookup(this._values.feature_gates,Le);return ft?{name:Le,value:ft.v===!0,rule_id:(Ye=ft.r)!==null&&Ye!==void 0?Ye:"default",secondary_exposures:(tt=ft.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ft.i)!==null&&nt!==void 0?nt:""}:null}getConfig(Le){var Ye,tt,nt,ft;const ht=this._getResultFromLookup(this._values.dynamic_configs,Le);return ht?{name:Le,value:(Ye=this._values.values[ht.v])!==null&&Ye!==void 0?Ye:{},rule_id:ht.r,secondary_exposures:(tt=ht.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ht.i)!==null&&nt!==void 0?nt:"",is_user_in_experiment:ht.ue===!0,passed:ht.p===!0,group_name:(ft=ht.gn)!==null&&ft!==void 0?ft:void 0,is_experiment_active:ht.ea===!0,group:ht.r,is_device_based:ht.i==="stableID"}:null}getLayer(Le){var Ye,tt,nt,ft,ht,gt;const At=this._getResultFromLookup(this._values.layer_configs,Le);return At?{name:Le,value:(Ye=this._values.values[At.v])!==null&&Ye!==void 0?Ye:{},rule_id:At.r,secondary_exposures:(tt=At.s)!==null&&tt!==void 0?tt:[],is_user_in_experiment:At.ue===!0,group_name:(nt=At.gn)!==null&&nt!==void 0?nt:void 0,is_experiment_active:At.ea===!0,group:At.r,is_device_based:At.i==="stableID",allocated_experiment_name:(ft=At.ae)!==null&&ft!==void 0?ft:"",explicit_parameters:(ht=At.ep)!==null&&ht!==void 0?ht:[],undelegated_secondary_exposures:(gt=At.us)!==null&>!==void 0?gt:[],parameter_rule_ids:At.pr}:null}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$6._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V2InitializeContainer$1.V2InitializeContainer=V2InitializeContainer,Object.defineProperty(EvaluationStore$1,"__esModule",{value:!0});const client_core_1$5=src$1,V1InitializeContainer_1=V1InitializeContainer$1,V2InitializeContainer_1=V2InitializeContainer$1;class EvaluationStore{constructor(Le){this._sdkKey=Le,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,client_core_1$5._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(Le,Ye){var tt,nt;if(!Le)return!1;const ft=(0,client_core_1$5._typedJsonParse)(Le.data,"has_updates","EvaluationResponse");return ft==null?!1:(this._source=Le.source,(ft==null?void 0:ft.has_updates)!==!0||((tt=ft.time)!==null&&tt!==void 0?tt:0)<this._lcut||(this._rawValues=Le.data,this._lcut=ft.time,this._receivedAt=Le.receivedAt,ft.response_format==="init-v2"?this._values=new V2InitializeContainer_1.V2InitializeContainer(ft):this._values=new V1InitializeContainer_1.V1InitializeContainer(ft),this._bootstrapMetadata=this._extractBootstrapMetadata(Le.source,ft),Le.source&&ft.user&&this._setWarningState(Ye,ft),client_core_1$5.SDKFlags.setFlags(this._sdkKey,(nt=ft.sdk_flags)!==null&&nt!==void 0?nt:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(Le){const Ye=this._values?this._values.getGate(Le):null;return this._getDetailedStoreResult(Ye)}getConfig(Le){const Ye=this._values?this._values.getConfig(Le):null;return this._getDetailedStoreResult(Ye)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(Le){const Ye=this._values?this._values.getLayer(Le):null;return this._getDetailedStoreResult(Ye)}getParamStore(Le){const Ye=this._values?this._values.getParamStore(Le):null;return this._getDetailedStoreResult(Ye)}getSource(){return this._source}getExposureMapping(){var Le;return(Le=this._values)===null||Le===void 0?void 0:Le.getExposureMapping()}_extractBootstrapMetadata(Le,Ye){if(Le!=="Bootstrap")return null;const tt={};return Ye.user&&(tt.user=Ye.user),Ye.sdkInfo&&(tt.generatorSDKInfo=Ye.sdkInfo),tt.lcut=Ye.time,tt}_getDetailedStoreResult(Le){return{result:Le,details:this._getDetails(Le==null)}}_setWarningState(Le,Ye){var tt,nt;const ft=client_core_1$5.StableID.get(this._sdkKey);if(((tt=Le.customIDs)===null||tt===void 0?void 0:tt.stableID)!==ft&&(!((nt=Le.customIDs)===null||nt===void 0)&&nt.stableID||ft)){this._warnings.add("StableIDMismatch");return}if("user"in Ye){const ht=Ye.user,gt=Object.assign(Object.assign({},Le),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,client_core_1$5._getFullUserHash)(gt)!==(0,client_core_1$5._getFullUserHash)(ht)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const Le={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(Le.warnings=Array.from(this._warnings)),Le}_getDetails(Le){var Ye,tt;const nt=this.getCurrentSourceDetails();let ft=nt.reason;const ht=(Ye=nt.warnings)!==null&&Ye!==void 0?Ye:[];this._source==="Bootstrap"&&ht.length>0&&(ft=ft+ht[0]),ft!=="Uninitialized"&&ft!=="NoValues"&&(ft=`${ft}:${Le?"Unrecognized":"Recognized"}`);const gt=this._source==="Bootstrap"&&(tt=this._bootstrapMetadata)!==null&&tt!==void 0?tt:void 0;return gt&&(nt.bootstrapMetadata=gt),Object.assign(Object.assign({},nt),{reason:ft})}}EvaluationStore$1.default=EvaluationStore;var Network={},EvaluationResponseDeltas={};Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const client_core_1$4=src$1,MAX_DELTAS_SORT_DEPTH=2;function _resolveDeltasResponse(Be,Le){const Ye=(0,client_core_1$4._typedJsonParse)(Le,"checksum","DeltasEvaluationResponse");if(!Ye)return{hadBadDeltaChecksum:!0};const tt=_mergeDeltasIntoCache(Be,Ye),nt=_handleDeletedEntries(tt),ft=(0,client_core_1$4._DJB2Object)({feature_gates:nt.feature_gates,dynamic_configs:nt.dynamic_configs,layer_configs:nt.layer_configs},MAX_DELTAS_SORT_DEPTH);return ft===Ye.checksumV2?JSON.stringify(nt):{hadBadDeltaChecksum:!0,badChecksum:ft,badMergedConfigs:nt,badFullResponse:Ye.deltas_full_response}}EvaluationResponseDeltas._resolveDeltasResponse=_resolveDeltasResponse;function _mergeDeltasIntoCache(Be,Le){return Object.assign(Object.assign(Object.assign({},Be),Le),{feature_gates:Object.assign(Object.assign({},Be.feature_gates),Le.feature_gates),layer_configs:Object.assign(Object.assign({},Be.layer_configs),Le.layer_configs),dynamic_configs:Object.assign(Object.assign({},Be.dynamic_configs),Le.dynamic_configs)})}function _handleDeletedEntries(Be){const Le=Be;return _deleteEntriesInRecord(Be.deleted_gates,Le.feature_gates),delete Le.deleted_gates,_deleteEntriesInRecord(Be.deleted_configs,Le.dynamic_configs),delete Le.deleted_configs,_deleteEntriesInRecord(Be.deleted_layers,Le.layer_configs),delete Le.deleted_layers,Le}function _deleteEntriesInRecord(Be,Le){Be==null||Be.forEach(Ye=>{delete Le[Ye]})}var __awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const client_core_1$3=src$1,EvaluationResponseDeltas_1=EvaluationResponseDeltas;class StatsigNetwork extends client_core_1$3.NetworkCore{constructor(Le,Ye){super(Le,Ye);const tt=Le==null?void 0:Le.networkConfig;this._option=Le,this._initializeUrlConfig=new client_core_1$3.UrlConfiguration(client_core_1$3.Endpoint._initialize,tt==null?void 0:tt.initializeUrl,tt==null?void 0:tt.api,tt==null?void 0:tt.initializeFallbackUrls)}fetchEvaluations(Le,Ye,tt,nt,ft){return __awaiter$9(this,void 0,void 0,function*(){var ht,gt,At,xt,Et,yt;const Ct=Ye?(0,client_core_1$3._typedJsonParse)(Ye,"has_updates","InitializeResponse"):null;let kt={user:nt,hash:(At=(gt=(ht=this._option)===null||ht===void 0?void 0:ht.networkConfig)===null||gt===void 0?void 0:gt.initializeHashAlgorithm)!==null&&At!==void 0?At:"djb2",deltasResponseRequested:!1,full_checksum:null};if(Ct!=null&&Ct.has_updates){const vt=(Ct==null?void 0:Ct.hash_used)!==((yt=(Et=(xt=this._option)===null||xt===void 0?void 0:xt.networkConfig)===null||Et===void 0?void 0:Et.initializeHashAlgorithm)!==null&&yt!==void 0?yt:"djb2");kt=Object.assign(Object.assign({},kt),{sinceTime:ft&&!vt?Ct.time:0,previousDerivedFields:"derived_fields"in Ct&&ft?Ct.derived_fields:{},deltasResponseRequested:!0,full_checksum:Ct.full_checksum,partialUserMatchSinceTime:vt?0:Ct.time})}return this._fetchEvaluations(Le,Ct,kt,tt)})}_fetchEvaluations(Le,Ye,tt,nt){return __awaiter$9(this,void 0,void 0,function*(){var ft,ht;const gt=yield this.post({sdkKey:Le,urlConfig:this._initializeUrlConfig,data:tt,retries:2,isStatsigEncodable:!0,priority:nt});if((gt==null?void 0:gt.code)===204)return'{"has_updates": false}';if((gt==null?void 0:gt.code)!==200)return(ft=gt==null?void 0:gt.body)!==null&&ft!==void 0?ft:null;if((Ye==null?void 0:Ye.has_updates)!==!0||((ht=gt.body)===null||ht===void 0?void 0:ht.includes('"is_delta":true'))!==!0||tt.deltasResponseRequested!==!0)return gt.body;const At=(0,EvaluationResponseDeltas_1._resolveDeltasResponse)(Ye,gt.body);return typeof At=="string"?At:this._fetchEvaluations(Le,Ye,Object.assign(Object.assign(Object.assign({},tt),At),{deltasResponseRequested:!1}),nt)})}}Network.default=StatsigNetwork;var ParamStoreGetterFactory={};Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const client_core_1$2=src$1,NO_EXPOSURE_OPT={disableExposureLog:!0};function _shouldLogExposure(Be){return Be==null||Be.disableExposureLog===!1}function _shouldReturnFallback(Be,Le){return Le!=null&&!(0,client_core_1$2._isTypeMatch)(Be,Le)}function _getMappedStaticValue(Be,Le){return Be.value}function _getMappedGateValue(Be,Le,Ye){return Be.getFeatureGate(Le.gate_name,_shouldLogExposure(Ye)?void 0:NO_EXPOSURE_OPT).value?Le.pass_value:Le.fail_value}function _getMappedDynamicConfigValue(Be,Le,Ye,tt){const ft=Be.getDynamicConfig(Le.config_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedExperimentValue(Be,Le,Ye,tt){const ft=Be.getExperiment(Le.experiment_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedLayerValue(Be,Le,Ye,tt){const ft=Be.getLayer(Le.layer_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _makeParamStoreGetter(Be,Le,Ye){return(tt,nt)=>{if(Le==null)return nt;const ft=Le[tt];if(ft==null||nt!=null&&(0,client_core_1$2._typeOf)(nt)!==ft.param_type)return nt;switch(ft.ref_type){case"static":return _getMappedStaticValue(ft);case"gate":return _getMappedGateValue(Be,ft,Ye);case"dynamic_config":return _getMappedDynamicConfigValue(Be,ft,nt,Ye);case"experiment":return _getMappedExperimentValue(Be,ft,nt,Ye);case"layer":return _getMappedLayerValue(Be,ft,nt,Ye);default:return nt}}}ParamStoreGetterFactory._makeParamStoreGetter=_makeParamStoreGetter;var StatsigEvaluationsDataAdapter$1={},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter$1,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=void 0;const client_core_1$1=src$1,Network_1$1=Network;class StatsigEvaluationsDataAdapter extends client_core_1$1.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(Le,Ye,tt){super.attach(Le,Ye,tt),tt!==null&&tt instanceof Network_1$1.default?this._network=tt:this._network=new Network_1$1.default(Ye??{})}getDataAsync(Le,Ye,tt){return this._getDataAsyncImpl(Le,(0,client_core_1$1._normalizeUser)(Ye,this._options),tt)}prefetchData(Le,Ye){return this._prefetchDataImpl(Le,Ye)}setData(Le){const Ye=(0,client_core_1$1._typedJsonParse)(Le,"has_updates","data");Ye&&"user"in Ye?super.setData(Le,Ye.user):client_core_1$1.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(Le,Ye){super.setData(Le,Ye)}_fetchFromNetwork(Le,Ye,tt,nt){return __awaiter$8(this,void 0,void 0,function*(){var ft;const ht=yield(ft=this._network)===null||ft===void 0?void 0:ft.fetchEvaluations(this._getSdkKey(),Le,tt==null?void 0:tt.priority,Ye,nt);return ht??null})}_getCacheKey(Le){var Ye;const tt=(0,client_core_1$1._getStorageKey)(this._getSdkKey(),Le,(Ye=this._options)===null||Ye===void 0?void 0:Ye.customUserCacheKeyFunc);return`${client_core_1$1.DataAdapterCachePrefix}.${this._cacheSuffix}.${tt}`}_isCachedResultValidFor204(Le,Ye){return Le.fullUserHash!=null&&Le.fullUserHash===(0,client_core_1$1._getFullUserHash)(Ye)}}StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=StatsigEvaluationsDataAdapter;var __awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClient$1,"__esModule",{value:!0});const client_core_1=src$1,EvaluationStore_1=EvaluationStore$1,Network_1=Network,ParamStoreGetterFactory_1=ParamStoreGetterFactory,StatsigEvaluationsDataAdapter_1=StatsigEvaluationsDataAdapter$1;class StatsigClient extends client_core_1.StatsigClientBase{static instance(Le){const Ye=(0,client_core_1._getStatsigGlobal)().instance(Le);return Ye instanceof StatsigClient?Ye:(client_core_1.Log.warn((0,client_core_1._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new StatsigClient(Le??"",{}))}constructor(Le,Ye,tt=null){var nt,ft;client_core_1.SDKType._setClientType(Le,"javascript-client");const ht=new Network_1.default(tt,At=>{this.$emt(At)});super(Le,(nt=tt==null?void 0:tt.dataAdapter)!==null&&nt!==void 0?nt:new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter,ht,tt),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(client_core_1.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(client_core_1.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(client_core_1.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(client_core_1.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(client_core_1.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(client_core_1.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new EvaluationStore_1.default(Le),this._network=ht,this._user=this._configureUser(Ye,tt),this._sdkInstanceID=(0,client_core_1.getUUID)();const gt=(ft=tt==null?void 0:tt.plugins)!==null&&ft!==void 0?ft:[];for(const At of gt)At.bind(this)}initializeSync(Le){var Ye;return this.loadingStatus!=="Uninitialized"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(Ye=this._store.getWarnings())!==null&&Ye!==void 0?Ye:[]]):(this._logger.start(),this.updateUserSync(this._user,Le))}initializeAsync(Le){return __awaiter$7(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(Le),this._initializePromise)})}updateUserSync(Le,Ye){const tt=performance.now();try{return this._updateUserSyncImpl(Le,Ye,tt)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}}_updateUserSyncImpl(Le,Ye,tt){var nt;const ft=[...(nt=this._store.getWarnings())!==null&&nt!==void 0?nt:[]];this._resetForUser(Le);const ht=this.dataAdapter.getDataSync(this._user);ht==null&&ft.push("NoCachedValues"),this._store.setValues(ht,this._user),this._finalizeUpdate(ht);const gt=Ye==null?void 0:Ye.disableBackgroundCacheRefresh;return gt===!0||gt==null&&(ht==null?void 0:ht.source)==="Bootstrap"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft):(this._runPostUpdate(ht??null,this._user),(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft))}updateUserAsync(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){const tt=performance.now();try{return yield this._updateUserAsyncImpl(Le,Ye)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}})}_updateUserAsyncImpl(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){this._resetForUser(Le);const tt=this._user;client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);let nt=this.dataAdapter.getDataSync(tt);if(this._store.setValues(nt,this._user),this._setStatus("Loading",nt),nt=yield this.dataAdapter.getDataAsync(nt,tt,Ye),tt!==this._user)return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let ft=!1;nt!=null&&(client_core_1.Diagnostics._markInitProcessStart(this._sdkKey),ft=this._store.setValues(nt,this._user),client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey,{success:ft})),this._finalizeUpdate(nt),ft||(this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey,ft,this._store.getCurrentSourceDetails());const ht=client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,client_core_1.createUpdateDetails)(ft,this._store.getSource(),ht,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:client_core_1.StatsigSession.get(this._sdkKey),stableID:client_core_1.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(Le,Ye){return this.getFeatureGate(Le,Ye).value}logEvent(Le,Ye,tt){const nt=typeof Le=="string"?{eventName:Le,value:Ye,metadata:tt}:Le;this.$emt({name:"log_event_called",event:nt}),this._logger.enqueue(Object.assign(Object.assign({},nt),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(Le){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:Le}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(Le){return __awaiter$7(this,void 0,void 0,function*(){return client_core_1.Storage.isReady()||(yield client_core_1.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,Le)})}_createErrorUpdateDetails(Le,Ye){var tt;return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),performance.now()-Ye,Le,null,[...(tt=this._store.getWarnings())!==null&&tt!==void 0?tt:[]])}_finalizeUpdate(Le){this._store.finalize(),this._setStatus("Ready",Le)}_runPostUpdate(Le,Ye){this.dataAdapter.getDataAsync(Le,Ye,{priority:"low"}).catch(tt=>{client_core_1.Log.error("An error occurred after update.",tt)})}_resetForUser(Le){this._logger.reset(),this._store.reset(),this._user=this._configureUser(Le,this._options)}_configureUser(Le,Ye){var tt,nt,ft;const ht=(0,client_core_1._normalizeUser)(Le,Ye),gt=(tt=ht.customIDs)===null||tt===void 0?void 0:tt.stableID;if(gt){const At=(ft=(nt=this.storageProvider).isReadyResolver)===null||ft===void 0?void 0:ft.call(nt);At?At.then(()=>client_core_1.StableID.setOverride(gt,this._sdkKey),()=>client_core_1.StableID.setOverride(gt,this._sdkKey)):client_core_1.StableID.setOverride(gt,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(ht.analyticsOnlyMetadata=Object.assign(Object.assign({},ht.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),ht}_getFeatureGateImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getGate(Le),gt=(0,client_core_1._makeFeatureGate)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getGateOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createGateExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"gate_evaluation",gate:xt}),xt}_getDynamicConfigImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getConfig(Le),gt=(0,client_core_1._makeDynamicConfig)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getDynamicConfigOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:xt}),xt}_getExperimentImpl(Le,Ye){var tt,nt,ft,ht;const{result:gt,details:At}=this._store.getConfig(Le),xt=(0,client_core_1._makeExperiment)(Le,At,gt);xt.__evaluation!=null&&(xt.__evaluation.secondary_exposures=(0,client_core_1._mapExposures)((nt=(tt=xt.__evaluation)===null||tt===void 0?void 0:tt.secondary_exposures)!==null&&nt!==void 0?nt:[],this._store.getExposureMapping()));const Et=(ht=(ft=this.overrideAdapter)===null||ft===void 0?void 0:ft.getExperimentOverride)===null||ht===void 0?void 0:ht.call(ft,xt,this._user,Ye),yt=Et??xt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,yt,this._store.getExposureMapping()),Ye),this.$emt({name:"experiment_evaluation",experiment:yt}),yt}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(Le,Ye){var tt,nt,ft;const{result:ht,details:gt}=this._store.getLayer(Le),At=(0,client_core_1._makeLayer)(Le,gt,ht),xt=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getLayerOverride)===null||nt===void 0?void 0:nt.call(tt,At,this._user,Ye);Ye!=null&&Ye.disableExposureLog&&this._logger.incrementNonExposureCount(Le);const Et=(0,client_core_1._mergeOverride)(At,xt,(ft=xt==null?void 0:xt.__value)!==null&&ft!==void 0?ft:At.__value,yt=>{Ye!=null&&Ye.disableExposureLog||this._enqueueExposure(Le,(0,client_core_1._createLayerParameterExposure)(this._user,Et,yt,this._store.getExposureMapping()),Ye)});return this.$emt({name:"layer_evaluation",layer:Et}),Et}_getParameterStoreImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getParamStore(Le);this._logger.incrementNonExposureCount(Le);const gt={name:Le,details:ht,__configuration:ft,get:(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,ft,Ye)},At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getParamStoreOverride)===null||nt===void 0?void 0:nt.call(tt,gt,Ye);return At!=null&&(gt.__configuration=At.config,gt.details=At.details,gt.get=(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,At.config,Ye)),gt}}StatsigClient$1.default=StatsigClient,function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,gt,At,xt){xt===void 0&&(xt=At);var Et=Object.getOwnPropertyDescriptor(gt,At);(!Et||("get"in Et?!gt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return gt[At]}}),Object.defineProperty(ht,xt,Et)}:function(ht,gt,At,xt){xt===void 0&&(xt=At),ht[xt]=gt[At]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,gt){for(var At in ht)At!=="default"&&!Object.prototype.hasOwnProperty.call(gt,At)&&Le(gt,ht,At)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigClient=void 0;const tt=src$1,nt=StatsigClient$1;Be.StatsigClient=nt.default,Ye(src$1,Be);const ft=Object.assign((0,tt._getStatsigGlobal)(),{StatsigClient:nt.default});Be.default=ft}(src$2);const FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","new_id_capture_ux_least_risky_clients","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id","darwinium_profiling"],GLOBAL_FLAGS=["new_fingerprint"],ID_MODULE_FLAGS=["id_face_readability","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web"];function getStatsigEnvironment(Be){return isStageK8sEnv(Be)?{tier:"development"}:isStageEnv(Be)||isDemoEnv(Be)?{tier:"staging"}:isSaasEnv(Be)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,new_id_capture_ux_least_risky_clients:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1,darwinium_profiling:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(initPromise)return initPromise;initPromise=(async()=>{var gt;const ft={customIDs:{client_api_key:Le,hashed_onboarding_id:Ye,flow_id:Be},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise},getFeatureFlag=Be=>featureFlagsValues[Be]??!1,getModuleFeatureFlags=async Be=>{const Le={};GLOBAL_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]});const Ye=Be.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}),Le};function IdCaptureParamsConfigurator(Be,Le,Ye,tt){Object.assign(Be,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:tt?3e3:2e3,minFaceIdQualityScore:.62})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:!1,faceOcclusionThreshold:.3}}const getProfiles=()=>[new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new PipelineProfile(WasmPipelineType.IdBarcodeAndTextQualityPipeline,PipelineProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new PipelineProfile(WasmPipelineType.IdVideoSelfiePipeline,PipelineProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new PipelineProfile(WasmPipelineType.SelfieWithQualityMetrics,PipelineProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile")];function getProfile(Be){const Le=getProfiles().find(Ye=>Ye.name===Be);if(!Le)throw new Error(`Profile not found for type: ${Be}`);return Le}const wasmVersion="v2.12.47";function generateBundle(){const Be=getFeatureFlag("id_text_barcode_readability")?PipelineProfileName.IdCapture_3_02:getFeatureFlag("id_model_hebrew_back_id")?PipelineProfileName.IdCapture_2_02:PipelineProfileName.IdCapture_2_01,Le=PipelineProfileName.SelfieWithQualityMetrics,Ye=PipelineProfileName.SelfieVideoSelfie,tt=PipelineProfileName.IdVideoSelfie_2_01;return[Be,tt,Le,Ye]}function getInitializationParams(){const Le=generateBundle(),Ye="https://d3vv997wtl2myz.cloudfront.net/webcamera/onnx-backend-wasm",tt=`${Ye}/${wasmVersion}/webLib.wasm`,nt=`${Ye}/${wasmVersion}/webLibSimd.wasm`,ft=`${Ye}/${wasmVersion}/webLib.js`,ht=`${Ye}/${wasmVersion}/versions.json`;let gt=new Map,At=new Map;for(const xt of Le){const Et=getProfile(xt);if(!Et)throw new Error(`Profile not found: ${xt}`);const yt=Et.modelNames;let Ct=[];for(const kt of yt)Ct.push(`${Ye}/${wasmVersion}/models/${kt}`);gt.set(Et.pipelineType,Ct),At.set(Et.detectionType,Et)}return{wasmModulePath:tt,wasmSimdModulePath:nt,glueCodePath:ft,versionsFilePath:ht,pipelineModels:gt,enableSIMD:!0,profiles:At,wasmVersion}}window.wasmArrayBuffer=null;class MlWasmJSApi{constructor(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.wasmModule=null,this.pipelineApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceDetectionWasmApi=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallMutex=new Mutex,this.Module=null,this.loadModule=async Le=>{this.Module=(await import(Le)).Module}}async initialize(Le,Ye,tt,nt,ft,ht){await this.freeResources(),this.pipelines_=ht,this.versionsFile=ft,await this.loadModule(tt);const gt=await this.loadWasm(nt,Le,Ye);return this.pipelineApiUtilities=new this.wasmModule.PipelineApiUtilities,this.utilityApi=new this.wasmModule.UtilityApi,this.idCaptureWasmApi=new this.wasmModule.IdCaptureApi,this.faceDetectionWasmApi=new this.wasmModule.FaceDetectionApi,this.isInitialized_=!0,gt}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}isInitialized(){return this.pipelineApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceDetectionWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Le,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Le&&Ye&&Le==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Le*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Le,this.imageHeight_=Ye,this.inputImageBuffer=this.pipelineApiUtilities.allocateInputImageBuffer(Le,Ye,4))}async handleDetectionCallAndUpdateState(Le){this.checkWasmInitialization("Unable to update pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(Le))}ens(Le){return this.checkWasmInitialization("Unable to ens, cpp API hasn't been initialized"),this.utilityApi.ens(Le)}ckvcks(Le){this.checkWasmInitialization("Unable to ckvcks, cpp API hasn't been initialized"),this.utilityApi.ckvcks(Le)}isVirtualCamera(Le){if(this.checkWasmInitialization("Unable to check if the camera is virtual, cpp API hasn't been initialized"),Le)return this.utilityApi.isVirtualCamera(Le)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Le){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Le.width,Le.height),this.inputImageBuffer.set(Le.data),this.utilityApi.analyzeFrame()}async freeResources(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,window.wasmArrayBuffer=null,this.pipelineApiUtilities&&typeof this.pipelineApiUtilities.delete=="function"&&(this.pipelineApiUtilities.delete(),this.pipelineApiUtilities=null),this.utilityApi&&typeof this.utilityApi.delete=="function"&&(this.utilityApi.delete(),this.utilityApi=null),this.idCaptureWasmApi&&typeof this.idCaptureWasmApi.delete=="function"&&(this.idCaptureWasmApi.delete(),this.idCaptureWasmApi=null),this.faceDetectionWasmApi&&typeof this.faceDetectionWasmApi.delete=="function"&&(this.faceDetectionWasmApi.delete(),this.faceDetectionWasmApi=null),this.wasmModule=null,this.isInitialized_=!1}resetPipeline(Le){this.checkWasmInitialization("Unable to reset pipeline, cpp API hasn't been initialized"),this.pipelineApiUtilities.resetPipeline(this.pipelineTypeToWasmEnum(Le))}resetAllPipelines(){this.checkWasmInitialization("Unable to reset pipelines, cpp API hasn't been initialized");for(const[Le,Ye]of this.pipelines_)this.resetPipeline(Le)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllPipelines(),this.resetOther()}async process(Le,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");switch(this.inputImageBuffer.set(Le.data),Ye){case WasmPipelineType.IdBlurGlarePipeline:case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.idCaptureWasmApi.runIdCapturePipeline(this.pipelineTypeToWasmEnum(Ye));case WasmPipelineType.IdFaceDetectionPipeline:return this.faceDetectionWasmApi.runIdFaceDetectionPipeline();case WasmPipelineType.IdVideoSelfiePipeline:return this.idCaptureWasmApi.runIdVideoSelfiePipeline();case WasmPipelineType.SelfieWithAggregationMetrics:case WasmPipelineType.SelfieWithQualityMetrics:return this.faceDetectionWasmApi.runSelfieFaceDetectionPipeline(this.pipelineTypeToWasmEnum(Ye));default:throw new Error("Unknown pipeline type")}}async runIdCapture(Le){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Le){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.faceDetectionWasmApi.runSelfieCapture()}async setFacePositionConstraints(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFacePositionConstraints(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceDetectionThresholds(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set face detection thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}async setFaceAttributesThresholds(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceAttributesThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceChecksEnabled(Le,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceChecksEnabled(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht)}async setFaceDetectionMode(Le,Ye){this.checkWasmInitialization("Unable to set face detection mode, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionMode(this.pipelineTypeToWasmEnum(Le),Ye)}async setFaceDetectionCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt){this.checkWasmInitialization("Unable to set face detection callbacks, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt)}async setIdCaptureThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt)}async setIdCaptureCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt)}async setIdCaptureGeometryParams(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt)}async setIdCaptureConfigParams(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}setIdCaptureModelType(Le,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.pipelineTypeToWasmEnum(Le),this.IdCaptureModelTypeToWasmEnum(Ye))}IdPerspectiveTransform(Le,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Le,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadWasm(Le,Ye,tt){const nt=Le?tt:Ye;try{window.wasmArrayBuffer=await fetch(nt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),this.wasmModule=await this.Module()}catch(ft){if(console.log(ft,Le,"useSmd"),Le)return await this.loadWasm(!1,Ye,tt);throw ft}return Le}async loadModels(){var nt;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Le=new this.wasmModule.PipelineTypeToIntMap,Ye=new Map,tt=new Map;for(let[ft,ht]of this.pipelines_){let gt=this.pipelineTypeToWasmEnum(ft),At=[],xt=new this.wasmModule.VectorInt;for(let Et of ht){if(!tt.has(Et)){let Ct=await fetch(Et).then(kt=>kt.arrayBuffer()).then(kt=>new Uint8Array(kt));tt.set(Et,Ct)}let yt=tt.get(Et);xt.push_back(yt.byteLength),At.push(yt)}Le.set(gt,xt),Ye.set(gt,At)}this.modelsBuffers=this.pipelineApiUtilities.allocateModelsBuffers(Le);for(let[ft,ht]of Ye){let gt=(nt=this.modelsBuffers)==null?void 0:nt.get(ft);for(let At=0;At<gt.size();At++){let xt=gt==null?void 0:gt.get(At);if(xt)xt.set(ht[At]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializePipelines(){this.checkWasmInitialization("Unable to initialize pipelines, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.pipelineApiUtilities.initializePipelines()}async setProductionMode(Le){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Le)}getPipelineState(){return this.checkWasmInitialization("Unable to get pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.getPipelineState()}getCurrentPipeline(){return this.checkWasmInitialization("Unable to get current pipeline, cpp API hasn't been initialized"),this.pipelineTypeFromWasmEnum(this.pipelineApiUtilities.getCurrentPipeline())}setSdkVersion(Le){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Le)}setSdkPlatform(Le){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Le)}setDeviceInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Le,Ye)}setBrowserInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Le,Ye)}setCameraInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Le,Ye)}setZc(Le){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Le)}setMotionStatus(Le){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Le)}setMetadataField(Le,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Le,Ye)}setInspectorOpened(Le){this.inspectorOpened_=Le}setBackgroundMode(Le){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Le)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(){return this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.prc.bind(this.utilityApi),[])}async poc(Le){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.poc.bind(this.utilityApi),[Le])}pipelineTypeToWasmEnum(Le){switch(Le){case WasmPipelineType.IdBlurGlarePipeline:return this.wasmModule.PipelineType.IdBlurGlarePipeline;case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.wasmModule.PipelineType.IdBarcodeAndTextQualityPipeline;case WasmPipelineType.IdFaceDetectionPipeline:return this.wasmModule.PipelineType.IdFaceDetectionPipeline;case WasmPipelineType.IdVideoSelfiePipeline:return this.wasmModule.PipelineType.IdVideoSelfiePipeline;case WasmPipelineType.SelfieWithAggregationMetrics:return this.wasmModule.PipelineType.SelfieWithAggregationMetrics;case WasmPipelineType.SelfieWithQualityMetrics:return this.wasmModule.PipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}pipelineTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.PipelineType.IdBlurGlarePipeline:return WasmPipelineType.IdBlurGlarePipeline;case this.wasmModule.IdBarcodeAndTextQualityPipeline:return WasmPipelineType.IdBarcodeAndTextQualityPipeline;case this.wasmModule.PipelineType.IdFaceDetectionPipeline:return WasmPipelineType.IdFaceDetectionPipeline;case this.wasmModule.PipelineType.IdVideoSelfiePipeline:return WasmPipelineType.IdVideoSelfiePipeline;case this.wasmModule.PipelineType.SelfieWithAggregationMetrics:return WasmPipelineType.SelfieWithAggregationMetrics;case this.wasmModule.PipelineType.SelfieWithQualityMetrics:return WasmPipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}IdCaptureModelTypeToWasmEnum(Le){switch(Le){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Le){if(!this.isInitialized())throw new Error(Le)}async wasmCallWrapper(Le,Ye=[]){return await this.wasmCallMutex.withLock(async(...tt)=>{let nt=!1;try{for(;;){if(nt=Le(...tt),nt)return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){console.log("Error in wasmCallWrapper:",ft)}},...Ye)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),version$4="1.85.0-20251219175515.0";function e$2(Be,Le){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Be,Le)?Be[Le]:void 0}function t$2(Be,Le,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Be,location.href),{blockedURI:yt}=xt;yt!==Et.href&&yt!==Et.protocol.slice(0,-1)&&yt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Le).then(xt=>(At(),xt),xt=>new Promise(Et=>{const yt=new MessageChannel;yt.port1.onmessage=()=>Et(),yt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Be){let Le="";for(let Ye=0;Ye<Be.length;++Ye)if(Ye>0){const tt=Be[Ye].toLowerCase();tt!==Be[Ye]?Le+=` ${tt}`:Le+=Be[Ye]}else Le+=Be[Ye].toUpperCase();return Le}const r$4={default:"endpoint"},o$1={default:"tlsEndpoint"},i$5="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$e=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$d="API key required",m$2="API key not found",A$1="API key expired",w$e="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$d,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Be,Le){const Ye=[],[tt,nt]=function(gt){const At=function(yt){const Ct=[...yt];return{current:()=>Ct[0],postpone(){const kt=Ct.shift();kt!==void 0&&Ct.push(kt)},exclude(){Ct.shift()}}}(gt),xt=function(yt,Ct){let kt=0;return()=>Math.random()*Math.min(Ct,yt*Math.pow(2,kt++))}(100,3e3),Et=new Set;return[At.current(),(yt,Ct)=>{let kt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),kt=0;else if(vt===K)At.exclude();else if(vt===M$1){const It=Date.now()-yt.getTime()<50,wt=At.current();wt&&It&&!Et.has(wt)&&(Et.add(wt),kt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,kt??yt.getTime()+xt()-Date.now()]}]}(Be);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=yt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:yt}),Et=Le(gt);return Et.then(()=>xt(),xt),Et.catch(yt=>{if(ft!=null||(ft=yt),Ye.length>=5)throw ft;const Ct=nt(At,yt);if(!Ct)throw ft;const[kt,vt]=Ct;return(bt=vt,new Promise(It=>setTimeout(It,bt))).then(()=>ht(kt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Be){var Le,Ye;const{picked:tt,rest:nt}=function(Et,yt){const Ct={},kt={};for(const[vt,bt]of Object.entries(Et))yt.includes(vt)?Ct[vt]=bt:kt[vt]=bt;return{picked:Ct,rest:kt}}(Be,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Le=tt.apiKey)!==null&&Le!==void 0?Le:ft,gt=(Ye=e$2(Be,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],yt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(kt,vt,bt,It){return kt.addEventListener(vt,bt,It),()=>kt.removeEventListener(vt,bt,It)}(document,"visibilitychange",yt);return yt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$d);const Et=function(yt,Ct){return(Array.isArray(yt)?yt:[yt]).map(kt=>function(vt,bt){const It=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?It(bt):wt==="<loaderVersion>"?It(b$2):wt)}(String(kt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(yt){return yt instanceof Error&&yt.message===K?new Error(M$1):yt}(Et)}).then(([Et,yt])=>(xt(),Et.load({...nt,ldi:{attempts:yt,visibilityStates:At}})))}function F$1(Be){return t$2(Be,()=>function(Le){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Le))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Le,ht.appendChild(nt)})}(Be),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Be=window,Le="__fpjs_p_l_b",Ye=Be[Le];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Be,Le),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$d,ERROR_BAD_REQUEST_FORMAT:w$e,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$5,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$e,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$4,defaultTlsEndpoint:o$1};function e$1(Be,Le,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(yt){yt(Et)})).then(ht,gt)}At((tt=tt.apply(Be,[])).next())})}function n$1(Be,Le){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Le.call(Be,ht)}catch(yt){Et=[6,yt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$3={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$4=function(Be,Le){typeof window<"u"&&(o[Be]=Le)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Be){var Le,Ye=Be[0];return!(!((Le=r$3==null?void 0:r$3.exclude)===null||Le===void 0)&&Le.includes(Ye))}).filter(function(Be){var Le,Ye,tt,nt,ft=Be[0];return!((Le=r$3==null?void 0:r$3.include)===null||Le===void 0)&&Le.some(function(ht){return ht.includes(".")})?(Ye=r$3==null?void 0:r$3.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$3==null?void 0:r$3.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$3==null?void 0:r$3.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Be){return[Be[0],(0,Be[1])()]}))};function c$2(Be){return Be^=Be>>>16,Be=Math.imul(Be,2246822507),Be^=Be>>>13,Be=Math.imul(Be,3266489909),(Be^=Be>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Be,Le){return Be<<Le|Be>>>32-Le}function d(Be,Le){var Ye;if(Le===void 0&&(Le=0),Le=Le?0|Le:0,typeof Be=="string"&&(Ye=Be,Be=new TextEncoder().encode(Ye).buffer),!(Be instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Le,Le,Le,Le]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Be,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Be,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Be,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Be,Le){return new Promise(function(Ye){setTimeout(function(){return Ye(Le)},Be)})}function m$1(Be,Le,Ye){return Promise.all(Be.map(function(tt){return Promise.race([tt,f$1(Le,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Be,Le,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Be=u(),Le=Object.keys(Be),[4,m$1(Object.values(Be),(r$3==null?void 0:r$3.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Le[gt]]=ht}),[2,p(nt,r$3.exclude||[],r$3.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Be,Le,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var yt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Le.some(function(bt){return yt.startsWith(bt)}),kt=Ye.some(function(bt){return yt.startsWith(bt)});Ct&&!kt||(nt[xt]=Et)}else{var vt=p(Et,Le,Ye,yt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Be);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$d(Be){return e$1(this,void 0,void 0,function(){var Le,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Le=tt.sent(),Ye=d(JSON.stringify(Le)),Math.random()<1e-5&&r$3.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Le),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Be=navigator.userAgent,Le={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Be.match(nt);if(ft&&ft.groups)return{name:Le[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Be){for(var Le=0,Ye=0;Ye<Be.length;++Ye)Le+=Math.abs(Be[Ye]);return Le}var M=b$1();function E(Be,Le,Ye){for(var tt=[],nt=0;nt<Be[0].data.length;nt++){for(var ft=[],ht=0;ht<Be.length;ht++)ft.push(Be[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Le,Ye)}function P(Be){if(Be.length===0)return 0;for(var Le={},Ye=0,tt=Be;Ye<tt.length;Ye++)Le[ft=tt[Ye]]=(Le[ft]||0)+1;var nt=Be[0];for(var ft in Le)Le[ft]>Le[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$4("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Be){return[2,new Promise(function(Le,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Le({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$4("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Be){var Le=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Be({commonImageDataHash:d(E(Le,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Be,Le){if(!Be)throw new Error("Canvas context not supported");return Be.font,Be.font="72px ".concat(Le),Be.measureText("WwMmLli0Oo").width}function _$1(){var Be,Le=document.createElement("canvas"),Ye=(Be=Le.getContext("webgl"))!==null&&Be!==void 0?Be:Le.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Be=new Float32Array(1),Le=new Uint8Array(Be.buffer);return Be[0]=1/0,Be[0]=Be[0]-Be[0],Le[3]}function B(Be,Le){var Ye={};return Le.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Be.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Be=[],Le={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Le).forEach(function(Ye){Le[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Be.push("".concat(Ye,": ").concat(tt))})}),Be}b$1().name!="Firefox"&&i$4("fonts",function(){var Be=this;return new Promise(function(Le,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(yt){return setTimeout(yt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Be,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var yt=L(ht,Et);gt.includes(yt)||(At[Et]=yt)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$4("hardware",function(){return new Promise(function(Be,Le){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Be({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$4("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$4("permissions",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){return k=(r$3==null?void 0:r$3.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Be=Array.from({length:(r$3==null?void 0:r$3.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Be).then(function(Ye){return B(Ye,k)})]})})}),i$4("plugins",function(){var Be=[];if(navigator.plugins)for(var Le=0;Le<navigator.plugins.length;Le++){var Ye=navigator.plugins[Le];Be.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Be})})}),i$4("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$4("system",function(){return new Promise(function(Be){var Le=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Le.name,version:Le.version}};Le.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Be(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$4("webgl",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Be=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
67
67
|
attribute vec2 position;
|
|
68
68
|
void main() {
|
|
69
69
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
@@ -2923,7 +2923,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof Be.getDerivedSta
|
|
|
2923
2923
|
overflow: hidden;
|
|
2924
2924
|
margin: auto;
|
|
2925
2925
|
}
|
|
2926
|
-
`,isAndroid=!!mobile.Android(),isDesktop=mobile.isDesktop(),parser=new UAParser,{browser:browser$1}=parser.getResult(),onFrameEmitter=new EventEmitter$5,whitePoster="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAAAKSURBVHicY2QAAAAEAAIhZK1qAAAAAElFTkSuQmCC",Webcam=React.forwardRef(({className:Be,onPlay:Le,videoSource:Ye,isSelfie:tt=!1,type:nt,permissionMessage:ft,onLog:ht=emptyFunc,stream:gt,onError:At=emptyFunc,token:xt,onStreamReady:Et=async()=>{},showCustomCameraPermissionScreen:yt,assistedOnboarding:Ct,deviceId:kt,onRestartOnboarding:vt=reload,showDoublePermissionsRequest:bt=!1,publishAudio:It=!1,fullHeight:wt=!1,isRecordingEnabled:Rt=!1,isKiosk:Tt=!1,flipVerticallyImage:Bt=!1,isIdv2:Dt=!1,isVideoSelfie:Pt=!1,documentType:Nt=null,zoomLevel:Lt=1,isDeepsightEnabled:Wt,showLoading:$t=!0,poster:Kt=whitePoster,isV2:Vt=!1},Ut)=>{const[_t,Xt]=React.useState(!1),[Qt,jt]=React.useState(gt),[Gt,qt]=React.useState(!0),[zt,e0]=React.useState($t),[s0,t0]=React.useState(Wt),l0=React.useRef(!1),d0=React.useRef({promise:Promise.resolve(),resolve:()=>{},pending:!1}),n0=React.useRef(null),g0=React.useRef(),A0=React.useRef(0),o0=React.useRef(0),r0=React.useRef(0),{t:Yt}=useTranslation$1(),[Mt,Jt]=usePermissions(),a0=React.useRef(),i0=React.useRef(!1),f0=React.useRef(!0),u0=React.useRef(!1),x0=React.useRef(CameraCleanupManager.getInstance());a0.current=Mt;const[p0,D0]=React.useState(!bt);ft=ft||Yt("permissionMessage"),React.useEffect(()=>{a0.current&&!isDesktop&&!Tt&&D0(a0.current)},[Mt]),React.useEffect(()=>{const tn=sessionStorage.getItem("cameraPermissionsGranted")==="true";!isDesktop&&tn&&!Tt&&D0(!0)},[Mt]),React.useEffect(()=>{const tn=document.querySelectorAll(".IncodeDefaultComponentContainer");if(!tn)return;const cn=[];return tn.forEach(yn=>{const Bn=window.getComputedStyle(yn);cn.push({el:yn,overflow:Bn.overflow}),yn.style.overflow="hidden"}),()=>{cn.forEach(({el:yn,overflow:Bn})=>{yn.style.overflow=Bn})}},[]),React.useEffect(()=>()=>{Qt&&x0.current.unregisterStream(Qt)},[Qt]);const P0=()=>{if(!l0.current)return;if(!n0.current){l0.current=!1;return}if(n0.current.paused){l0.current=!1;return}const tn=n0.current.currentTime;tn!==A0.current&&(onFrameEmitter.emit("newFrame"),A0.current=tn,!Rt&&zt&&e0(!1)),requestAnimationFrame(P0)},z0=async tn=>{if(Lt>1){const cn=tn.getVideoTracks()[0];cn&&await zoomCamera(cn,Lt)}await Et(tn)};useEventListener("visibilitychange",async()=>{var tn,cn;if(document.hidden)return d0.current.pending||(tn=n0.current)==null?void 0:tn.pause();if(!d0.current.pending)return await((cn=n0.current)==null?void 0:cn.play())},document);const Y0=async tn=>{const cn=tn.getVideoTracks()[0],yn=await getDeviceCapabilities(),Bn=getChosenCameraInfo(cn,r0.current,Ye),{width:er,height:Qn}=cn.getSettings(),{focusMode:Un=!1}=navigator.mediaDevices.getSupportedConstraints();addEvent({code:"cameraType",payload:{type:"webRTC",resolution:`${er}x${Qn}`,autofocus:Un,label:cn.label},token:xt}),addEvent({code:"cameraDebugInfo",payload:{type:"webRTC",availableCameras:yn,chosenCamera:Bn},token:xt}),tt&&addEvent({code:"cameraSelfie",token:xt})};useOnCameraPermissionChange(tn=>{tn==="denied"&&Xt(!0)});const X0=async tn=>{if(e0(!1),(tn==null?void 0:tn.name)==="NotReadableError"){tn.type="cameraInUse",await x0.current.waitForCameraAvailability(),setTimeout(()=>{r0.current=Math.min(r0.current+1,4),Q0(!0)},300);return}if(tn.constructor.name==="DOMException"){const cn=tn.name;switch(cn){case"NotAllowedError":addEvent({code:"permissionDenied",payload:{message:"User denied to use camera.",errorType:cn},token:xt}),ht(getLogObject("permissionDenied",{message:"User denied to use camera.",errorType:cn})),tn.type="permissionDenied",yt?Xt(!0):At(tn);break;case"NotFoundError":tn.type="cameraNotFound",At(tn);break;case"OverconstrainedError":tn.type="cameraConstraintsError",At(tn);break;case"SecurityError":tn.type="cameraSecurityError",At(tn);break;case"AbortError":await x0.current.waitForCameraAvailability(),setTimeout(()=>Q0(!0),300);return;default:tn.type="cameraUnknownError",At(tn);break}}else tn.constructor.name==="OverconstrainedError"?(ht(getLogObject("OSVersionNotSupported",{message:"OS version is not supported."})),qt(!1)):(ht(getLogObject("browserNotSupported",{message:"Browser is not supported."})),qt(!1))},T0=async tn=>{if(Jt(!0),x0.current.registerStream(tn),Pt){const cn=async()=>{n0.current.srcObject=tn,await z0(tn),jt(tn),await n0.current.play()},yn=tn.getVideoTracks()[0];onboardingAnalytics.updateCameraInfo(yn);const Bn=await onboardingAnalytics.checkForVirtualCameraByLabel(yn);Bn!=null&&Bn.isDetected&&(Bn.hasPriorDetection||await addDeviceStats(xt,{cameraLabelInspectionStatus:"FAIL"}),At(new Error("Virtual camera is detected"))),mobile.iOS()?yn.applyConstraints({advanced:[{focusDistance:1}]}).finally(()=>{cn()}):cn()}else{const cn=async er=>{u0.current?(n0.current.srcObject=er,jt(er),await z0(er),e0(!1),d0.current.resolve()):(n0.current.autoplay=!1,n0.current.srcObject=er,await MlWasmJSApi$1.prc(),killStream(er),u0.current=!0,await Q0())},yn=tn.getVideoTracks()[0];onboardingAnalytics.updateCameraInfo(yn);const Bn=await onboardingAnalytics.checkForVirtualCameraByLabel(yn);Bn!=null&&Bn.isDetected&&(Bn.hasPriorDetection||await addDeviceStats(xt,{cameraLabelInspectionStatus:"FAIL"}),At(new Error("Virtual camera is detected"))),mobile.iOS()?yn.applyConstraints({advanced:[{focusDistance:1}]}).finally(()=>{cn(tn)}):cn(tn)}},L0=tn=>{if(d0.current.pending)return;let cn;const yn=new Promise(Bn=>{cn=()=>{Bn(),d0.current.pending=!1}});d0.current={promise:yn,resolve:cn,pending:!0},tn&&yn.then(()=>{n0.current.play()})},j0=async(tn=!1)=>{if(d0.current.pending)return;const cn=n0.current,yn=cn.srcObject;yn&&(cn.pause(),killStream(yn),cn.srcObject=null),u0.current=!1,l0.current=!1,e0($t),L0(tn),await Q0(!0),await d0.current.promise},Q0=async tn=>{if(s0){await S0();return}isAndroid&&Ye==="environment"&&Rt&&await x0.current.waitForCameraAvailability(),isAndroid&&Ye==="environment"&&await new Promise(Bn=>setTimeout(Bn,100));const cn=Bn=>{if(Bn.getVideoTracks()[0].readyState==="ended"){const Qn={message:"Camera track ended",errorType:"mediaStreamTrackError",errorDescription:"A MediaStreamTrack ended due to a capture failure"};addEvent({token:xt,code:"error",payload:Qn}),At({...Qn,type:Qn.errorType})}};(async()=>{function Bn(Un){const $n={resizeMode:"none",facingMode:"environment"};switch(Un){case 0:return{...$n,height:{ideal:localStorage.getItem("isIPhone14OrHigher")==="true"?1080:720}};case 1:return{...$n,width:{min:3200,ideal:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 2:return{...$n,width:{min:1400,ideal:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 3:return{...$n,width:{min:640,ideal:640,max:800},height:{min:480,ideal:480,max:600}};case 4:return{...$n,width:{min:640,ideal:800,max:960},height:{min:480,ideal:480,max:480}};default:return{}}}const er=async Un=>{const $n={video:Ye==="environment"?Bn(Un.current):localStorage.getItem("isIPhone14OrHigher")==="true"?{height:{ideal:1080}}:{facingMode:Ye,height:{ideal:480},width:{ideal:640}},audio:It},gn=isSafari()||It,qn={audio:gn,video:{facingMode:"user",deviceId:kt?{exact:kt}:void 0}};if(mobile.isIpad()&&Ye==="user")try{const An=await getNonUltraWideFrontCameraStream();T0(An),await Y0(An)}catch(An){At({...An,type:"permissionDenied"})}else isAndroid&&Ye==="environment"?navigator.mediaDevices.getUserMedia($n).then(async An=>{const dn=An.getVideoTracks()[0],Pn=await getCameras(),nr=adjustCamerasFromCameraStream(dn,Pn);An.getTracks().forEach(B0=>B0.stop());let jn=1280,hr=720;if(Un.current>1){const{width:B0,height:Z0}=Bn(Un.current);jn=B0==null?void 0:B0.ideal,hr=Z0==null?void 0:Z0.ideal}const gr={video:{deviceId:{exact:nr.deviceId},width:{ideal:jn},height:{ideal:hr}},audio:gn};navigator.mediaDevices.getUserMedia(gr).then(async B0=>{await Y0(B0),T0(B0)})}).catch(async An=>{Un.current=Un.current+1,Un.current>4?await X0(An):er(Un)}):navigator.mediaDevices.getUserMedia(mobile.any()?$n:qn).then(async An=>{await Y0(An),cn(An),T0(An)}).catch(async An=>{await X0(An)})};if(!tn&&mobile.iOS()&&i0.current&&!u0.current)return;if(p0===!0||isDesktop||Tt||bt===!1){if(i0.current=!0,gt){T0(gt);return}e0($t),er(r0),addEvent({token:xt,code:"cameraFeedbackDisplayed",payload:{feedback:"Loading..."},module:"ID Capture",screen:`${nt} Camera Capture`})}const Qn=document.createElement("canvas");g0.current=Qn})()};React.useEffect(()=>(L0(!0),Q0(),()=>{p0&&(i0.current=!1,gt==null||gt.getTracks().forEach(tn=>tn.stop()))}),[p0,Ye,gt,s0]),React.useImperativeHandle(Ut,()=>({getCanvas:en,video:n0.current,stream:Qt,setIsLoadingCamera:e0,resetWebcam:j0,streamUnlocked:f0}));const q0=({width:tn=0,height:cn=0,useOriginalDimensions:yn=!0})=>{if(!n0.current||!n0.current.videoHeight||!n0.current.videoWidth||!g0.current||!l0.current)return!1;const Bn=n0.current.currentTime;if(o0.current===Bn)return!1;if(o0.current=Bn,yn)g0.current.width=n0.current.videoWidth,g0.current.height=n0.current.videoHeight;else{if(tn===0||cn===0)return!1;g0.current.width=tn,g0.current.height=cn}const er=g0.current.getContext("2d");return er.clearRect(0,0,g0.current.width,g0.current.height),Bt&&rotateCanvasVertically(g0.current),er.drawImage(n0.current,0,0),!0},en=({width:tn=0,height:cn=0,useOriginalDimensions:yn=!0}={})=>q0({width:tn,height:cn,useOriginalDimensions:yn})?new IncodeCanvas(g0.current):null,w0=()=>n0.current?n0.current.videoWidth>n0.current.videoHeight:!1,k0=async()=>{(Wt||mobile.Android())&&await S0(),D0(!0),sessionStorage.setItem("cameraPermissionsGranted",String(!0)),addEvent({token:xt,code:"permissionsAllowedCustom"}),addEvent({token:xt,code:"cameraPermissionSubmitted",payload:{requestor:"browser",requestorDetails:browser$1.name,permission:"allowed"},module:"ID capture",screen:`${nt} Camera Capture`})},S0=async()=>{const tn=await onboardingAnalytics.startOnboardingCheck();addEvent({token:xt,code:tn==="granted"?"motionPermissionsGranted":"motionPermissionsRejected"}),tn==="granted"&&await onboardingAnalytics.startMotionSensors(),t0(!1)},H0=()=>{addEvent({token:xt,code:"permissionsQuitFlow"}),setTimeout(()=>{window.location.reload()},0)},_0=()=>{addEvent({token:xt,code:"permissionsDeniedCustom"}),addEvent({token:xt,code:"cameraPermissionSubmitted",payload:{requestor:"browser",requestorDetails:browser$1.name,permission:"denied"},module:"ID capture",screen:`${nt} Camera Capture`})},G0=sessionStorage.getItem("cameraPermissionsGranted")==="true",K0=bt&&(typeof Mt<"u"&&!Mt&&!p0||typeof p0<"u"&&!p0)&&!isDesktop&&!Tt&&!G0,un=()=>{l0.current||(Le&&typeof Le=="function"&&(Le(),e0(!1)),l0.current=!0,requestAnimationFrame(P0))};return jsxRuntimeExports.jsxs(React.Fragment,{children:[!s0&&_t&&jsxRuntimeExports.jsx(AllowCameraUse,{handleAllowCamera:vt}),K0&&jsxRuntimeExports.jsx(FakePermissionsRequest,{handleDenyPermission:_0,handleCameraPermission:k0,handleQuitOnboarding:H0,type:nt,token:xt}),!Gt&&jsxRuntimeExports.jsx(BrowserNotSupported,{}),zt&&!K0&&jsxRuntimeExports.jsx(Loader$1,{isV2:Vt}),jsxRuntimeExports.jsx(Video$1,{"aria-hidden":"true",autoPlay:!1,poster:Kt,className:cx(Be,{selfie:tt,horizontal:w0(),desktop:!mobile.any(),assistedOnboarding:Ct,"full-height":wt,idv2:Dt}),playsInline:!0,onPlay:un,ref:n0,muted:!0}),multiPageDocumentTypes.includes(Nt)&&jsxRuntimeExports.jsx(V5COverlay,{children:jsxRuntimeExports.jsx("img",{src:documentCaptureSVG,alt:"V5C Logbook"})})]})}),captureButton="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='65'%20height='65'%20viewBox='0%200%2065%2065'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%3e%3cg%3e%3cg%20transform='translate(-155%20-646)%20translate(155%20646)'%3e%3ccircle%20cx='32.319'%20cy='32.319'%20r='32.319'%20fill='%2320263D'/%3e%3ccircle%20cx='32.319'%20cy='32.319'%20r='25.137'%20fill='%23FFF'%20fill-opacity='.093'%20stroke='%23FFF'%20stroke-width='2.052'/%3e%3c/g%3e%3cg%20fill='%23FFF'%20fill-rule='nonzero'%3e%3cpath%20d='M17.193%2012.24c0%202.294-1.88%204.16-4.193%204.16-2.312%200-4.192-1.866-4.192-4.16%200-2.293%201.88-4.16%204.192-4.16%202.312%200%204.193%201.867%204.193%204.16zM26%206.334v11.814C26%2019.723%2024.713%2021%2023.125%2021H2.875C1.287%2021%200%2019.723%200%2018.148V6.334C0%204.76%201.287%203.482%202.875%203.482h3.536v-.987C6.411%201.117%207.537%200%208.927%200h8.146c1.39%200%202.516%201.117%202.516%202.495v.986h3.536C24.713%203.482%2026%204.76%2026%206.334zm-6.65%205.906c0-3.473-2.849-6.298-6.35-6.298-3.5%200-6.349%202.825-6.349%206.298S9.5%2018.54%2013%2018.54c3.501%200%206.35-2.826%206.35-6.299z'%20transform='translate(-155%20-646)%20translate(155%20646)%20translate(19%2021)'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",faceFrame$1="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='336'%20height='518'%20viewBox='0%200%20336%20518'%3e%3cpath%20fill='none'%20fill-rule='evenodd'%20stroke='%23FFF'%20stroke-dasharray='7.139999675750732,19.03999967575073'%20stroke-width='9.044'%20d='M168%20513.392c76.83%200%20162.893-113.92%20162.893-254.447S280.236%204.498%20168%204.498%205.107%20118.418%205.107%20258.945%2091.17%20513.392%20168%20513.392z'/%3e%3c/svg%3e";class FaceDetection{constructor(){this.pipelineProfile=null,this.bestCanvas=null,this.bestLandmarks=null,this.bestTopLeft=null,this.bestSize=null,this.currCanvas=null}formatLandmarks(Le,Ye,tt){const[nt,ft,ht,gt,At,xt,Et,yt,Ct,kt]=Le;return{rightEyeX:nt,rightEyeY:ft,leftEyeX:ht,leftEyeY:gt,noseTipX:At,noseTipY:xt,rightMouthX:Et,rightMouthY:yt,mouthX:Ct,mouthY:kt,x:Ye[0],y:Ye[1],width:tt[0],height:tt[1]}}async initialize(Le){const{onNoFace:Ye,onGetReady:tt,onGetReadyFinished:nt,onCapture:ft,onTooManyFaces:ht,onTooClose:gt,onCenterFace:At,onFarAway:xt,onFaceAngle:Et,onDark:yt,onBlur:Ct,onHeadWear:kt,onLenses:vt,onEyesClosed:bt,onFaceMask:It,onSwitchToManualCapture:wt,onFaceOccluded:Rt,isLensesCheckEnabled:Tt,isMaskCheckEnabled:Bt,isClosedEyesCheckEnabled:Dt,isHeadWearCheckEnabled:Pt,isVideoSelfie:Nt,pipelineProfile:Lt,autocaptureTimeout:Wt}=Le;this.pipelineProfile=Lt;const $t=this.pipelineProfile.pipelineType;await MlWasmJSApi$1.setFacePositionConstraints($t,Lt.parameters.frameMinX,Lt.parameters.frameMinY,Lt.parameters.frameMaxX,Lt.parameters.frameMaxY),await MlWasmJSApi$1.setFaceDetectionThresholds($t,Lt.parameters.brightnessThreshold,Lt.parameters.blurrinessThreshold,Lt.parameters.tiltRotationAngleThreshold,Lt.parameters.minMagicCropSize,Wt,Lt.parameters.minFaceQualityScore,Lt.parameters.faceOcclusionThreshold),await MlWasmJSApi$1.setFaceChecksEnabled($t,Tt,Bt,Dt,Pt,Lt.parameters.isOcclusionCheckEnabled),await MlWasmJSApi$1.setFaceAttributesThresholds($t,Lt.parameters.headwearThreshold,Lt.parameters.lensesThreshold,Lt.parameters.closedEyesThreshold,Lt.parameters.maskThreshold),await MlWasmJSApi$1.setFaceDetectionMode($t,Nt);const Kt=()=>{this.bestCanvas.updateBase64Image(),this.bestCanvas.updateBlob(),ft(this.bestCanvas,this.formatLandmarks(this.bestLandmarks,this.bestTopLeft,this.bestSize))},Vt=Ut=>{this.bestCanvas=this.currCanvas.clone();const _t=Ut.rect;this.bestTopLeft=[_t.x,_t.y];const Xt=[_t.x+_t.width,_t.y+_t.height],Qt=this.bestTopLeft,jt=Xt;this.bestSize=[jt[0]-Qt[0],jt[1]-Qt[1]],this.bestLandmarks=[Ut.rightEye.x,Ut.rightEye.y,Ut.leftEye.x,Ut.leftEye.y,Ut.noseTip.x,Ut.noseTip.y,Ut.rightMouthCorner.x,Ut.rightMouthCorner.y,Ut.leftMouthCorner.x,Ut.leftMouthCorner.y]};await MlWasmJSApi$1.setFaceDetectionCallbacks($t,xt,gt,ht,Ye,Kt,tt,nt,At,yt,Ct,Et,Vt,vt,It,bt,kt,wt,Rt)}async detect(Le){try{this.currCanvas=Le,await MlWasmJSApi$1.allocateImageBuffers(Le==null?void 0:Le.width(),Le==null?void 0:Le.height()),await MlWasmJSApi$1.process(Le.getImageData(),this.pipelineProfile.pipelineType),this.currCanvas.release()}catch(Ye){console.error(`Exception: ${Ye}`)}}}function useSelfie({timeout:Be=4e4,onLog:Le=emptyFunc,handleCapture:Ye,numberOfTries:tt=3,handleNoAttemptsLeft:nt=emptyFunc,webcam:ft,isDetecting:ht,onSwitchManualCapture:gt=emptyFunc,onManualCaptureSelfie:At=emptyFunc,assistedOnboarding:xt=!1,notificationTimeout:Et=2e3,hatCheckEnabled:yt=!1,lensesCheckEnabled:Ct=!1,maskCheckEnabled:kt=!1,eyesClosedCheckEnabled:vt=!1,handleStopRecordingLocally:bt=emptyFunc}){var k0;const It=React.useRef(0),wt=React.useRef(!1),Rt=React.useRef(!1),[Tt,Bt]=React.useState(null),[Dt,Pt]=React.useState(""),[Nt,Lt]=React.useState("idle"),[Wt,$t]=React.useState(!1),[Kt,Vt]=React.useState(!1),[Ut,_t]=React.useState(null),Xt=React.useRef(),Qt=React.useRef(gt),jt=React.useRef(null),Gt=React.useRef(!1),qt=React.useRef(),{t:zt}=useTranslation$1();((k0=ft.current)==null?void 0:k0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=ht.current);const e0=React.useCallback(S0=>{qt.current&&clearTimeout(qt.current),Bt(S0),S0&&(qt.current=setTimeout(()=>{Bt(null)},Et))},[Et]),s0=async(S0,H0)=>{var _0;Rt.current||(ht.current=!1,((_0=ft.current)==null?void 0:_0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!1),await sleep(300),Rt.current=!0,Lt("uploading"),await bt(),await Ye(S0,H0))},t0=()=>{var H0,_0;ht.current=!1,((H0=ft.current)==null?void 0:H0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!1);const S0=getLogObject("timeout",{message:"No face found"});Bt(null),(_0=Qt.current)==null||_0.call(Qt),Le(S0),Vt(!0)},l0=()=>{wt.current||(Le(getLogObject("tooFar",{message:zt("notifications.moveCloser")})),e0(zt("notifications.moveCloser")))},d0=()=>{wt.current||(Le(getLogObject("tooManyFaces",{message:zt("notifications.tooManyFaces")})),e0(zt("notifications.tooManyFaces")))},n0=()=>{wt.current||(Le(getLogObject("centerFace",{message:zt("notifications.centerFace")})),e0(zt("notifications.centerFace")))},g0=()=>{Rt.current||wt.current||(Lt("capturing"),Le(getLogObject("dontMove",{message:zt("notifications.dontMove")})),Bt(zt("notifications.getReady")),wt.current=!0)},A0=()=>{Bt(""),Lt("idle"),wt.current=!1,Rt.current=!1},o0=()=>{wt.current||Rt.current||e0(zt("notifications.moveAway"))},r0=()=>{wt.current||Rt.current||e0(zt("notifications.onDark"))},Yt=()=>{wt.current||Rt.current||e0(zt("notifications.onBlur"))},Mt=()=>{wt.current||Rt.current||e0(zt("notifications.onFaceAngle"))},Jt=()=>{wt.current||Rt.current||(Le(getLogObject("headWear",{message:zt("notifications.removeHeadwear")})),Bt(zt("notifications.removeHeadwear")))},a0=()=>{wt.current||Rt.current||(Le(getLogObject("lenses",{message:zt("notifications.removeLenses")})),Bt(zt(getSelfieTranslation("removeLenses",xt))))},i0=()=>{wt.current||Rt.current||(Le(getLogObject("eyesClosed",{message:zt("notifications.eyesClosed")})),Bt(zt(getSelfieTranslation("openEyes",xt))))},f0=()=>{wt.current||Rt.current||(Le(getLogObject("mask",{message:zt("notifications.mask")})),Bt(zt(getSelfieTranslation("removeMask",xt))))},u0=()=>{Le(getLogObject("faceOccluded",{message:zt("notifications.faceOccluded")})),Bt(zt("notifications.faceOccluded"))},x0=async()=>{jt.current=new FaceDetection,await jt.current.initialize({onNoFace:emptyFunc,onCaptureFace:emptyFunc,onTooManyFaces:d0,onTooClose:o0,onCenterFace:n0,onFarAway:l0,onGetReady:g0,onGetReadyFinished:A0,onBlur:Yt,onDark:r0,onFaceAngle:Mt,onHeadWear:Jt,onLenses:a0,onEyesClosed:i0,onFaceMask:f0,onSwitchToManualCapture:t0,onCapture:s0,onFaceOccluded:u0,isLensesCheckEnabled:Ct,isMaskCheckEnabled:kt,isClosedEyesCheckEnabled:vt,isHeadWearCheckEnabled:yt,isVideoSelfie:!1,pipelineProfile:detectionSetup.getProfile(DetectionType.Selfie),autocaptureTimeout:Be})};React.useEffect(()=>{Qt.current=gt},[gt]),React.useEffect(()=>{Vt(!1),J0()},[]);const p0=async({response:S0,livenessPassed:H0,imageBase64:_0})=>{if(It.current=It.current+1,tt!==-1&&It.current>=tt)return nt({response:S0,livenessPassed:H0,imageBase64:_0});Bt(null),Lt("idle"),wt.current=!1,Rt.current=!1},D0=S0=>{const H0=S0.errorMessage||S0.message||S0.reason,{status:_0}=S0;if(_t(_0),_0===3004){Bt(zt("notifications.faceNotFound")),Pt(zt("notifications.faceNotFoundDescription")),Le(getLogObject("unableToCrop",{message:`${zt("notifications.unableToCrop")}`}));return}switch(H0){case"Face not found.":Bt(zt("notifications.faceNotFound")),Pt(zt("notifications.faceNotFoundDescription")),Le(getLogObject("faceNotDetected",{message:`${zt("notifications.faceNotFound")}`}));break;case"No faces found on the image":Bt(zt("notifications.face")),Le(getLogObject("faceNotDetected",{message:`${zt("notifications.face")}`}));break;case"BadRequestException: More than one face detected.":Bt(zt("notifications.multiple")),Le(getLogObject("multipleFacesDetected",{message:`${zt("notifications.multiple")}`}));break;case"Cropping area goes off the image.":Bt(zt("notifications.crop")),Le(getLogObject("cropTooSmall",{message:`${zt("notifications.crop")}`}));break;case"Image in portrait orientation is expected.":Bt(zt("notifications.portrait")),Le(getLogObject("imageNotPortrait",{message:`${zt("notifications.portrait")}`}));break;case"Selfie image has low quality":Bt(zt("notifications.lowQualityImage")),Pt(zt("notifications.lowQualityImageDescription")),Le(getLogObject("lowQualityImage",{message:`${zt("notifications.lowQualityImage")}`}));break;default:Le(getLogObject("InternalServerError",{message:`${zt("notifications.error")}`})),Bt(zt("notifications.error"));break}},P0=async()=>{if(!(!ht.current||Gt.current)){Gt.current=!0,jt.current||await x0();try{await MlWasmJSApi$1.handleDetectionCallAndUpdateState(detectionSetup.getProfile(DetectionType.Selfie).pipelineType);const S0=ft.current.getCanvas();await jt.current.detect(S0)}catch(S0){console.error(S0)}finally{Gt.current=!1}}};React.useEffect(()=>(onFrameEmitter.on("newFrame",P0),()=>{onFrameEmitter.off("newFrame",P0)}),[P0]);const z0=React.useCallback(()=>{var S0;ht.current||(ht.current=!0,((S0=ft.current)==null?void 0:S0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!0))},[Le,x0]),J0=React.useCallback(async()=>{$t(!0),z0()},[z0]);function Y0(){At();let S0=null,H0=0;const _0=5;(async()=>{for(;H0<_0&&(S0=ft.current.getCanvas(),!S0);)await sleep(500),H0++;if(!S0)throw D0({errorMessage:"Failed to get canvas after multiple attempts"}),new Error("Failed to get canvas after multiple attempts");S0.updateBase64Image(),S0.updateBlob(),s0(S0,null)})()}const X0=Nt==="capturing",T0=Nt==="uploading",L0=Nt==="success",j0=Nt==="error",Q0=X0||T0,q0=T0||L0||j0;return{notificationMessage:Tt,notificationDescription:Dt,mode:Nt,capturing:wt,cameraReady:Wt,showManualCapture:Kt,handleFaceAutoCapture:s0,setMode:Lt,resetLoading:p0,setNotificationMessage:Bt,setNotificationDescription:Pt,handleError:D0,autoDetectFace:z0,startAutoDetect:J0,handleManualCapture:Y0,isCapturing:X0,isUploading:T0,isSuccess:L0,isError:j0,isLoading:Q0,hideCamera:q0,showBorders:Wt&&(Nt==="idle"||j0),shouldShowManualCapture:Kt&&!q0,selfieTimeoutRef:Xt,errorStatus:Ut}}function createSession$6({apiKey:Be,sessionId:Le,token:Ye,onStreamsUpdated:tt,onConnect:nt,onError:ft,options:ht}={}){if(!Be)throw new Error("Missing apiKey");if(!Le)throw new Error("Missing sessionId");if(!Ye)throw new Error("Missing token");let gt=[],At=Ct=>{gt.findIndex(vt=>vt.id===Ct.stream.id)<0&&(gt.push(Ct.stream),tt(gt))},xt=Ct=>{const kt=gt.findIndex(vt=>vt.id===Ct.stream.id);kt>=0&&(gt.splice(kt,1),tt(gt))},Et={streamCreated:At,streamDestroyed:xt},yt=OT.initSession(Be,Le,ht);return yt.on(Et),yt.connect(Ye,Ct=>{yt&&(Ct&&typeof ft=="function"?ft(Ct):!Ct&&typeof nt=="function"&&nt())}),{session:yt,streams:gt,disconnect(){yt&&(yt.off(Et),yt.disconnect()),gt=null,At=null,xt=null,Et=null,yt=null,this.session=null,this.streams=null}}}let OTSession$4=class extends React.Component{constructor(Le){super(Le),this.state={streams:[]}}getChildContext(){return{session:this.sessionHelper.session,streams:this.state.streams}}componentWillMount(){this.createSession()}componentDidUpdate(Le){(Le.apiKey!==this.props.apiKey||Le.sessionId!==this.props.sessionId||Le.token!==this.props.token)&&this.createSession()}componentWillUnmount(){this.destroySession()}createSession(){this.destroySession(),this.sessionHelper=createSession$6({apiKey:this.props.apiKey,sessionId:this.props.sessionId,token:this.props.token,onStreamsUpdated:Ye=>{this.setState({streams:Ye})},onConnect:this.props.onConnect,onError:this.props.onError,options:this.props.options}),this.props.eventHandlers&&typeof this.props.eventHandlers=="object"&&this.sessionHelper.session.on(this.props.eventHandlers);const{streams:Le}=this.sessionHelper;this.setState({streams:Le})}destroySession(){this.sessionHelper&&(this.props.eventHandlers&&typeof this.props.eventHandlers=="object"&&this.sessionHelper.session.off(this.props.eventHandlers),this.sessionHelper.disconnect())}render(){const Le=typeof this.props.children=="function";return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Le?this.props.children(this.sessionHelper):this.props.children})}};OTSession$4.propTypes={children:PropTypes.oneOfType([PropTypes.element,PropTypes.arrayOf(PropTypes.element),PropTypes.func]).isRequired,apiKey:PropTypes.string.isRequired,sessionId:PropTypes.string.isRequired,token:PropTypes.string.isRequired,eventHandlers:PropTypes.objectOf(PropTypes.func),onConnect:PropTypes.func,onError:PropTypes.func,options:PropTypes.object},OTSession$4.defaultProps={eventHandlers:null,onConnect:null,onError:null,options:{}},OTSession$4.childContextTypes={streams:PropTypes.arrayOf(PropTypes.object),session:PropTypes.shape({subscribe:PropTypes.func,unsubscribe:PropTypes.func})};var reWhitespace=/\s/;function trimmedEndIndex$1(Be){for(var Le=Be.length;Le--&&reWhitespace.test(Be.charAt(Le)););return Le}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(Be){return Be&&Be.slice(0,trimmedEndIndex(Be)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1;function isObject$6(Be){var Le=typeof Be;return Be!=null&&(Le=="object"||Le=="function")}var isObject_1=isObject$6,freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$5=freeGlobal||freeSelf||Function("return this")(),_root=root$5,root$4=_root,Symbol$3=root$4.Symbol,_Symbol=Symbol$3,Symbol$2=_Symbol,objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty,nativeObjectToString$1=objectProto$1.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag$1(Be){var Le=hasOwnProperty$2.call(Be,symToStringTag$1),Ye=Be[symToStringTag$1];try{Be[symToStringTag$1]=void 0;var tt=!0}catch{}var nt=nativeObjectToString$1.call(Be);return tt&&(Le?Be[symToStringTag$1]=Ye:delete Be[symToStringTag$1]),nt}var _getRawTag=getRawTag$1,objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString$2(Be){return nativeObjectToString.call(Be)}var _objectToString=objectToString$2,Symbol$1=_Symbol,getRawTag=_getRawTag,objectToString$1=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag$1(Be){return Be==null?Be===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(Be)?getRawTag(Be):objectToString$1(Be)}var _baseGetTag=baseGetTag$1;function isObjectLike$1(Be){return Be!=null&&typeof Be=="object"}var isObjectLike_1=isObjectLike$1,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$1(Be){return typeof Be=="symbol"||isObjectLike(Be)&&baseGetTag(Be)==symbolTag}var isSymbol_1=isSymbol$1,baseTrim=_baseTrim,isObject$5=isObject_1,isSymbol=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(Be){if(typeof Be=="number")return Be;if(isSymbol(Be))return NAN;if(isObject$5(Be)){var Le=typeof Be.valueOf=="function"?Be.valueOf():Be;Be=isObject$5(Le)?Le+"":Le}if(typeof Be!="string")return Be===0?Be:+Be;Be=baseTrim(Be);var Ye=reIsBinary.test(Be);return Ye||reIsOctal.test(Be)?freeParseInt(Be.slice(2),Ye?2:8):reIsBadHex.test(Be)?NAN:+Be}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$1(Be){if(!Be)return Be===0?Be:0;if(Be=toNumber(Be),Be===INFINITY||Be===-INFINITY){var Le=Be<0?-1:1;return Le*MAX_INTEGER}return Be===Be?Be:0}var toFinite_1=toFinite$1,toFinite=toFinite_1;function toInteger$1(Be){var Le=toFinite(Be),Ye=Le%1;return Le===Le?Ye?Le-Ye:Le:0}var toInteger_1=toInteger$1,toInteger=toInteger_1,FUNC_ERROR_TEXT="Expected a function";function before$1(Be,Le){var Ye;if(typeof Le!="function")throw new TypeError(FUNC_ERROR_TEXT);return Be=toInteger(Be),function(){return--Be>0&&(Ye=Le.apply(this,arguments)),Be<=1&&(Le=void 0),Ye}}var before_1=before$1,before=before_1;function once$1(Be){return before(2,Be)}var once_1=once$1;const once$2=getDefaultExportFromCjs(once_1);var lodash_min={exports:{}};/**
|
|
2926
|
+
`,isAndroid=!!mobile.Android(),isDesktop=mobile.isDesktop(),parser=new UAParser,{browser:browser$1}=parser.getResult(),onFrameEmitter=new EventEmitter$5,whitePoster="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAAAKSURBVHicY2QAAAAEAAIhZK1qAAAAAElFTkSuQmCC",Webcam=React.forwardRef(({className:Be,onPlay:Le,videoSource:Ye,isSelfie:tt=!1,type:nt,permissionMessage:ft,onLog:ht=emptyFunc,stream:gt,onError:At=emptyFunc,token:xt,onStreamReady:Et=async()=>{},showCustomCameraPermissionScreen:yt,assistedOnboarding:Ct,deviceId:kt,onRestartOnboarding:vt=reload,showDoublePermissionsRequest:bt=!1,publishAudio:It=!1,fullHeight:wt=!1,isRecordingEnabled:Rt=!1,isKiosk:Tt=!1,flipVerticallyImage:Bt=!1,isIdv2:Dt=!1,isVideoSelfie:Pt=!1,documentType:Nt=null,zoomLevel:Lt=1,isDeepsightEnabled:Wt,showLoading:$t=!0,poster:Kt=whitePoster,isV2:Vt=!1},Ut)=>{const[_t,Xt]=React.useState(!1),[Qt,jt]=React.useState(gt),[Gt,qt]=React.useState(!0),[zt,e0]=React.useState($t),[s0,t0]=React.useState(Wt),l0=React.useRef(!1),d0=React.useRef({promise:Promise.resolve(),resolve:()=>{},pending:!1}),n0=React.useRef(null),g0=React.useRef(),A0=React.useRef(0),o0=React.useRef(0),r0=React.useRef(0),{t:Yt}=useTranslation$1(),[Mt,Jt]=usePermissions(),a0=React.useRef(),i0=React.useRef(!1),f0=React.useRef(!0),u0=React.useRef(!1),x0=React.useRef(CameraCleanupManager.getInstance());a0.current=Mt;const[p0,D0]=React.useState(!bt);ft=ft||Yt("permissionMessage"),React.useEffect(()=>{a0.current&&!isDesktop&&!Tt&&D0(a0.current)},[Mt]),React.useEffect(()=>{const tn=sessionStorage.getItem("cameraPermissionsGranted")==="true";!isDesktop&&tn&&!Tt&&D0(!0)},[Mt]),React.useEffect(()=>{const tn=document.querySelectorAll(".IncodeDefaultComponentContainer");if(!tn)return;const cn=[];return tn.forEach(yn=>{const Bn=window.getComputedStyle(yn);cn.push({el:yn,overflow:Bn.overflow}),yn.style.overflow="hidden"}),()=>{cn.forEach(({el:yn,overflow:Bn})=>{yn.style.overflow=Bn})}},[]),React.useEffect(()=>()=>{Qt&&x0.current.unregisterStream(Qt)},[Qt]);const P0=()=>{if(!l0.current)return;if(!n0.current){l0.current=!1;return}if(n0.current.paused){l0.current=!1;return}const tn=n0.current.currentTime;tn!==A0.current&&(onFrameEmitter.emit("newFrame"),A0.current=tn,!Rt&&zt&&e0(!1)),requestAnimationFrame(P0)},z0=async tn=>{if(Lt>1){const cn=tn.getVideoTracks()[0];cn&&await zoomCamera(cn,Lt)}await Et(tn)};useEventListener("visibilitychange",async()=>{var tn,cn;if(document.hidden)return d0.current.pending||(tn=n0.current)==null?void 0:tn.pause();if(!d0.current.pending)return await((cn=n0.current)==null?void 0:cn.play())},document);const Y0=async tn=>{const cn=tn.getVideoTracks()[0],yn=await getDeviceCapabilities(),Bn=getChosenCameraInfo(cn,r0.current,Ye),{width:er,height:Qn}=cn.getSettings(),{focusMode:Un=!1}=navigator.mediaDevices.getSupportedConstraints();addEvent({code:"cameraType",payload:{type:"webRTC",resolution:`${er}x${Qn}`,autofocus:Un,label:cn.label},token:xt}),addEvent({code:"cameraDebugInfo",payload:{type:"webRTC",availableCameras:yn,chosenCamera:Bn},token:xt}),tt&&addEvent({code:"cameraSelfie",token:xt})};useOnCameraPermissionChange(tn=>{tn==="denied"&&Xt(!0)});const X0=async tn=>{if(e0(!1),(tn==null?void 0:tn.name)==="NotReadableError"){tn.type="cameraInUse",await x0.current.waitForCameraAvailability(),setTimeout(()=>{r0.current=Math.min(r0.current+1,4),Q0(!0)},300);return}if(tn.constructor.name==="DOMException"){const cn=tn.name;switch(cn){case"NotAllowedError":addEvent({code:"permissionDenied",payload:{message:"User denied to use camera.",errorType:cn},token:xt}),ht(getLogObject("permissionDenied",{message:"User denied to use camera.",errorType:cn})),tn.type="permissionDenied",yt?Xt(!0):At(tn);break;case"NotFoundError":tn.type="cameraNotFound",At(tn);break;case"OverconstrainedError":tn.type="cameraConstraintsError",At(tn);break;case"SecurityError":tn.type="cameraSecurityError",At(tn);break;case"AbortError":await x0.current.waitForCameraAvailability(),setTimeout(()=>Q0(!0),300);return;default:tn.type="cameraUnknownError",At(tn);break}}else tn.constructor.name==="OverconstrainedError"?(ht(getLogObject("OSVersionNotSupported",{message:"OS version is not supported."})),qt(!1)):(ht(getLogObject("browserNotSupported",{message:"Browser is not supported."})),qt(!1))},T0=async tn=>{if(Jt(!0),x0.current.registerStream(tn),Pt){const cn=async()=>{n0.current.srcObject=tn,await z0(tn),jt(tn),await n0.current.play()},yn=tn.getVideoTracks()[0];onboardingAnalytics.updateCameraInfo(yn);const Bn=await onboardingAnalytics.checkForVirtualCameraByLabel(yn);Bn!=null&&Bn.isDetected&&(Bn.hasPriorDetection||await addDeviceStats(xt,{cameraLabelInspectionStatus:"FAIL"}),At(new Error("Virtual camera is detected"))),mobile.iOS()?yn.applyConstraints({advanced:[{focusDistance:1}]}).finally(()=>{cn()}):cn()}else{const cn=async er=>{u0.current?(n0.current.srcObject=er,jt(er),await z0(er),e0(!1),d0.current.resolve()):(n0.current.autoplay=!1,n0.current.srcObject=er,await MlWasmJSApi$1.prc(),killStream(er),u0.current=!0,await Q0())},yn=tn.getVideoTracks()[0];onboardingAnalytics.updateCameraInfo(yn);const Bn=await onboardingAnalytics.checkForVirtualCameraByLabel(yn);Bn!=null&&Bn.isDetected&&(Bn.hasPriorDetection||await addDeviceStats(xt,{cameraLabelInspectionStatus:"FAIL"}),At(new Error("Virtual camera is detected"))),mobile.iOS()?yn.applyConstraints({advanced:[{focusDistance:1}]}).finally(()=>{cn(tn)}):cn(tn)}},L0=tn=>{if(d0.current.pending)return;let cn;const yn=new Promise(Bn=>{cn=()=>{Bn(),d0.current.pending=!1}});d0.current={promise:yn,resolve:cn,pending:!0},tn&&yn.then(()=>{n0.current.play()})},j0=async(tn=!1)=>{if(d0.current.pending)return;const cn=n0.current,yn=cn.srcObject;yn&&(cn.pause(),killStream(yn),cn.srcObject=null),u0.current=!1,l0.current=!1,e0($t),L0(tn),await Q0(!0),await d0.current.promise},Q0=async tn=>{if(s0){await S0();return}isAndroid&&Ye==="environment"&&Rt&&await x0.current.waitForCameraAvailability(),isAndroid&&Ye==="environment"&&await new Promise(Bn=>setTimeout(Bn,100));const cn=Bn=>{if(Bn.getVideoTracks()[0].readyState==="ended"){const Qn={message:"Camera track ended",errorType:"mediaStreamTrackError",errorDescription:"A MediaStreamTrack ended due to a capture failure"};addEvent({token:xt,code:"error",payload:Qn}),At({...Qn,type:Qn.errorType})}};(async()=>{function Bn(Un){const $n={resizeMode:"none",facingMode:"environment"};switch(Un){case 0:return{...$n,height:{ideal:localStorage.getItem("isIPhone14OrHigher")==="true"?1080:720}};case 1:return{...$n,width:{min:3200,ideal:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 2:return{...$n,width:{min:1400,ideal:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 3:return{...$n,width:{min:640,ideal:640,max:800},height:{min:480,ideal:480,max:600}};case 4:return{...$n,width:{min:640,ideal:800,max:960},height:{min:480,ideal:480,max:480}};default:return{}}}const er=async Un=>{const $n={video:Ye==="environment"?Bn(Un.current):localStorage.getItem("isIPhone14OrHigher")==="true"?{height:{ideal:1080}}:{facingMode:Ye,height:{ideal:480},width:{ideal:640}},audio:It},gn=isSafari()||It,qn={audio:gn,video:{facingMode:"user",deviceId:kt?{exact:kt}:void 0}};if(mobile.isIpad()&&Ye==="user")try{const An=await getNonUltraWideFrontCameraStream();T0(An),await Y0(An)}catch(An){At({...An,type:"permissionDenied"})}else isAndroid&&Ye==="environment"?navigator.mediaDevices.getUserMedia($n).then(async An=>{const dn=An.getVideoTracks()[0],Pn=await getCameras(),nr=adjustCamerasFromCameraStream(dn,Pn);An.getTracks().forEach(B0=>B0.stop());let jn=1280,hr=720;if(Un.current>1){const{width:B0,height:Z0}=Bn(Un.current);jn=B0==null?void 0:B0.ideal,hr=Z0==null?void 0:Z0.ideal}const gr={video:{deviceId:{exact:nr.deviceId},width:{ideal:jn},height:{ideal:hr}},audio:gn};navigator.mediaDevices.getUserMedia(gr).then(async B0=>{await Y0(B0),T0(B0)})}).catch(async An=>{Un.current=Un.current+1,Un.current>4?await X0(An):er(Un)}):navigator.mediaDevices.getUserMedia(mobile.any()?$n:qn).then(async An=>{await Y0(An),cn(An),T0(An)}).catch(async An=>{await X0(An)})};if(!tn&&mobile.iOS()&&i0.current&&!u0.current)return;if(p0===!0||isDesktop||Tt||bt===!1){if(i0.current=!0,gt){T0(gt);return}e0($t),er(r0),addEvent({token:xt,code:"cameraFeedbackDisplayed",payload:{feedback:"Loading..."},module:"ID Capture",screen:`${nt} Camera Capture`})}const Qn=document.createElement("canvas");g0.current=Qn})()};React.useEffect(()=>(L0(!0),Q0(),()=>{p0&&(i0.current=!1,gt==null||gt.getTracks().forEach(tn=>tn.stop()))}),[p0,Ye,gt,s0]),React.useImperativeHandle(Ut,()=>({getCanvas:en,video:n0.current,stream:Qt,setIsLoadingCamera:e0,resetWebcam:j0,streamUnlocked:f0}));const q0=({width:tn=0,height:cn=0,useOriginalDimensions:yn=!0})=>{if(!n0.current||!n0.current.videoHeight||!n0.current.videoWidth||!g0.current||!l0.current)return!1;const Bn=n0.current.currentTime;if(o0.current===Bn)return!1;if(o0.current=Bn,yn)g0.current.width=n0.current.videoWidth,g0.current.height=n0.current.videoHeight;else{if(tn===0||cn===0)return!1;g0.current.width=tn,g0.current.height=cn}const er=g0.current.getContext("2d");return er.clearRect(0,0,g0.current.width,g0.current.height),Bt&&rotateCanvasVertically(g0.current),er.drawImage(n0.current,0,0),!0},en=({width:tn=0,height:cn=0,useOriginalDimensions:yn=!0}={})=>q0({width:tn,height:cn,useOriginalDimensions:yn})?new IncodeCanvas(g0.current):null,w0=()=>n0.current?n0.current.videoWidth>n0.current.videoHeight:!1,k0=async()=>{(Wt||mobile.Android())&&await S0(),D0(!0),sessionStorage.setItem("cameraPermissionsGranted",String(!0)),addEvent({token:xt,code:"permissionsAllowedCustom"}),addEvent({token:xt,code:"cameraPermissionSubmitted",payload:{requestor:"browser",requestorDetails:browser$1.name,permission:"allowed"},module:"ID capture",screen:`${nt} Camera Capture`})},S0=async()=>{const tn=await onboardingAnalytics.startOnboardingCheck();addEvent({token:xt,code:tn==="granted"?"motionPermissionsGranted":"motionPermissionsRejected"}),tn==="granted"&&await onboardingAnalytics.startMotionSensors(),t0(!1)},H0=()=>{addEvent({token:xt,code:"permissionsQuitFlow"}),setTimeout(()=>{window.location.reload()},0)},_0=()=>{addEvent({token:xt,code:"permissionsDeniedCustom"}),addEvent({token:xt,code:"cameraPermissionSubmitted",payload:{requestor:"browser",requestorDetails:browser$1.name,permission:"denied"},module:"ID capture",screen:`${nt} Camera Capture`})},G0=sessionStorage.getItem("cameraPermissionsGranted")==="true",K0=bt&&(typeof Mt<"u"&&!Mt&&!p0||typeof p0<"u"&&!p0)&&!isDesktop&&!Tt&&!G0,un=()=>{l0.current||(Le&&typeof Le=="function"&&(Le(),e0(!1)),l0.current=!0,requestAnimationFrame(P0))};return jsxRuntimeExports.jsxs(React.Fragment,{children:[!s0&&_t&&jsxRuntimeExports.jsx(AllowCameraUse,{handleAllowCamera:vt}),K0&&jsxRuntimeExports.jsx(FakePermissionsRequest,{handleDenyPermission:_0,handleCameraPermission:k0,handleQuitOnboarding:H0,type:nt,token:xt}),!Gt&&jsxRuntimeExports.jsx(BrowserNotSupported,{}),zt&&!K0&&jsxRuntimeExports.jsx(Loader$1,{isV2:Vt}),jsxRuntimeExports.jsx(Video$1,{"aria-hidden":"true",autoPlay:!1,poster:Kt,className:cx(Be,{selfie:tt,horizontal:w0(),desktop:!mobile.any(),assistedOnboarding:Ct,"full-height":wt,idv2:Dt}),playsInline:!0,onPlay:un,ref:n0,muted:!0}),multiPageDocumentTypes.includes(Nt)&&jsxRuntimeExports.jsx(V5COverlay,{children:jsxRuntimeExports.jsx("img",{src:documentCaptureSVG,alt:"V5C Logbook"})})]})}),captureButton="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='65'%20height='65'%20viewBox='0%200%2065%2065'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%3e%3cg%3e%3cg%20transform='translate(-155%20-646)%20translate(155%20646)'%3e%3ccircle%20cx='32.319'%20cy='32.319'%20r='32.319'%20fill='%2320263D'/%3e%3ccircle%20cx='32.319'%20cy='32.319'%20r='25.137'%20fill='%23FFF'%20fill-opacity='.093'%20stroke='%23FFF'%20stroke-width='2.052'/%3e%3c/g%3e%3cg%20fill='%23FFF'%20fill-rule='nonzero'%3e%3cpath%20d='M17.193%2012.24c0%202.294-1.88%204.16-4.193%204.16-2.312%200-4.192-1.866-4.192-4.16%200-2.293%201.88-4.16%204.192-4.16%202.312%200%204.193%201.867%204.193%204.16zM26%206.334v11.814C26%2019.723%2024.713%2021%2023.125%2021H2.875C1.287%2021%200%2019.723%200%2018.148V6.334C0%204.76%201.287%203.482%202.875%203.482h3.536v-.987C6.411%201.117%207.537%200%208.927%200h8.146c1.39%200%202.516%201.117%202.516%202.495v.986h3.536C24.713%203.482%2026%204.76%2026%206.334zm-6.65%205.906c0-3.473-2.849-6.298-6.35-6.298-3.5%200-6.349%202.825-6.349%206.298S9.5%2018.54%2013%2018.54c3.501%200%206.35-2.826%206.35-6.299z'%20transform='translate(-155%20-646)%20translate(155%20646)%20translate(19%2021)'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",faceFrame$1="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='336'%20height='518'%20viewBox='0%200%20336%20518'%3e%3cpath%20fill='none'%20fill-rule='evenodd'%20stroke='%23FFF'%20stroke-dasharray='7.139999675750732,19.03999967575073'%20stroke-width='9.044'%20d='M168%20513.392c76.83%200%20162.893-113.92%20162.893-254.447S280.236%204.498%20168%204.498%205.107%20118.418%205.107%20258.945%2091.17%20513.392%20168%20513.392z'/%3e%3c/svg%3e";class FaceDetection{constructor(){this.pipelineProfile=null,this.bestCanvas=null,this.bestLandmarks=null,this.bestTopLeft=null,this.bestSize=null,this.currCanvas=null}formatLandmarks(Le,Ye,tt){const[nt,ft,ht,gt,At,xt,Et,yt,Ct,kt]=Le;return{rightEyeX:nt,rightEyeY:ft,leftEyeX:ht,leftEyeY:gt,noseTipX:At,noseTipY:xt,rightMouthX:Et,rightMouthY:yt,mouthX:Ct,mouthY:kt,x:Ye[0],y:Ye[1],width:tt[0],height:tt[1]}}async initialize(Le){const{onNoFace:Ye,onGetReady:tt,onGetReadyFinished:nt,onCapture:ft,onTooManyFaces:ht,onTooClose:gt,onCenterFace:At,onFarAway:xt,onFaceAngle:Et,onDark:yt,onBlur:Ct,onHeadWear:kt,onLenses:vt,onEyesClosed:bt,onFaceMask:It,onSwitchToManualCapture:wt,onFaceOccluded:Rt,isLensesCheckEnabled:Tt,isMaskCheckEnabled:Bt,isClosedEyesCheckEnabled:Dt,isHeadWearCheckEnabled:Pt,isVideoSelfie:Nt,pipelineProfile:Lt,autocaptureTimeout:Wt}=Le;this.pipelineProfile=Lt;const $t=this.pipelineProfile.pipelineType;await MlWasmJSApi$1.setFacePositionConstraints($t,Lt.parameters.frameMinX,Lt.parameters.frameMinY,Lt.parameters.frameMaxX,Lt.parameters.frameMaxY),await MlWasmJSApi$1.setFaceDetectionThresholds($t,Lt.parameters.brightnessThreshold,Lt.parameters.blurrinessThreshold,Lt.parameters.tiltRotationAngleThreshold,Lt.parameters.minMagicCropSize,Wt,Lt.parameters.minFaceQualityScore,Lt.parameters.faceOcclusionThreshold),await MlWasmJSApi$1.setFaceChecksEnabled($t,Tt,Bt,Dt,Pt,Lt.parameters.isOcclusionCheckEnabled),await MlWasmJSApi$1.setFaceAttributesThresholds($t,Lt.parameters.headwearThreshold,Lt.parameters.lensesThreshold,Lt.parameters.closedEyesThreshold,Lt.parameters.maskThreshold),await MlWasmJSApi$1.setFaceDetectionMode($t,Nt);const Kt=()=>{this.bestCanvas.updateBase64Image(),this.bestCanvas.updateBlob(),ft(this.bestCanvas,this.formatLandmarks(this.bestLandmarks,this.bestTopLeft,this.bestSize))},Vt=Ut=>{this.bestCanvas=this.currCanvas.clone();const _t=Ut.rect;this.bestTopLeft=[_t.x,_t.y];const Xt=[_t.x+_t.width,_t.y+_t.height],Qt=this.bestTopLeft,jt=Xt;this.bestSize=[jt[0]-Qt[0],jt[1]-Qt[1]],this.bestLandmarks=[Ut.rightEye.x,Ut.rightEye.y,Ut.leftEye.x,Ut.leftEye.y,Ut.noseTip.x,Ut.noseTip.y,Ut.rightMouthCorner.x,Ut.rightMouthCorner.y,Ut.leftMouthCorner.x,Ut.leftMouthCorner.y]};await MlWasmJSApi$1.setFaceDetectionCallbacks($t,xt,gt,ht,Ye,Kt,tt,nt,At,yt,Ct,Et,Vt,vt,It,bt,kt,wt,Rt)}async detect(Le){try{this.currCanvas=Le,await MlWasmJSApi$1.allocateImageBuffers(Le==null?void 0:Le.width(),Le==null?void 0:Le.height()),await MlWasmJSApi$1.process(Le.getImageData(),this.pipelineProfile.pipelineType),this.currCanvas.release()}catch(Ye){console.error(`Exception: ${Ye}`)}}}function useSelfie({timeout:Be=4e4,onLog:Le=emptyFunc,handleCapture:Ye,numberOfTries:tt=3,handleNoAttemptsLeft:nt=emptyFunc,webcam:ft,isDetecting:ht,onSwitchManualCapture:gt=emptyFunc,onManualCaptureSelfie:At=emptyFunc,assistedOnboarding:xt=!1,notificationTimeout:Et=2e3,hatCheckEnabled:yt=!1,lensesCheckEnabled:Ct=!1,maskCheckEnabled:kt=!1,eyesClosedCheckEnabled:vt=!1,handleStopRecordingLocally:bt=emptyFunc}){var k0;const It=React.useRef(0),wt=React.useRef(!1),Rt=React.useRef(!1),[Tt,Bt]=React.useState(null),[Dt,Pt]=React.useState(""),[Nt,Lt]=React.useState("idle"),[Wt,$t]=React.useState(!1),[Kt,Vt]=React.useState(!1),[Ut,_t]=React.useState(null),Xt=React.useRef(),Qt=React.useRef(gt),jt=React.useRef(null),Gt=React.useRef(!1),qt=React.useRef(),{t:zt}=useTranslation$1();((k0=ft.current)==null?void 0:k0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=ht.current);const e0=React.useCallback(S0=>{qt.current&&clearTimeout(qt.current),Bt(S0),S0&&(qt.current=setTimeout(()=>{Bt(null)},Et))},[Et]),s0=async(S0,H0)=>{var _0;Rt.current||(ht.current=!1,((_0=ft.current)==null?void 0:_0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!1),await sleep(300),Rt.current=!0,Lt("uploading"),await bt(),await Ye(S0,H0))},t0=()=>{var H0,_0;ht.current=!1,((H0=ft.current)==null?void 0:H0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!1);const S0=getLogObject("timeout",{message:"No face found"});Bt(null),(_0=Qt.current)==null||_0.call(Qt),Le(S0),Vt(!0)},l0=()=>{wt.current||(Le(getLogObject("tooFar",{message:zt("notifications.moveCloser")})),e0(zt("notifications.moveCloser")))},d0=()=>{wt.current||(Le(getLogObject("tooManyFaces",{message:zt("notifications.tooManyFaces")})),e0(zt("notifications.tooManyFaces")))},n0=()=>{wt.current||(Le(getLogObject("centerFace",{message:zt("notifications.centerFace")})),e0(zt("notifications.centerFace")))},g0=()=>{Rt.current||wt.current||(Lt("capturing"),Le(getLogObject("dontMove",{message:zt("notifications.dontMove")})),Bt(zt("notifications.getReady")),wt.current=!0)},A0=()=>{Bt(""),Lt("idle"),wt.current=!1,Rt.current=!1},o0=()=>{wt.current||Rt.current||e0(zt("notifications.moveAway"))},r0=()=>{wt.current||Rt.current||e0(zt("notifications.onDark"))},Yt=()=>{wt.current||Rt.current||e0(zt("notifications.onBlur"))},Mt=()=>{wt.current||Rt.current||e0(zt("notifications.onFaceAngle"))},Jt=()=>{wt.current||Rt.current||(Le(getLogObject("headWear",{message:zt("notifications.removeHeadwear")})),Bt(zt("notifications.removeHeadwear")))},a0=()=>{wt.current||Rt.current||(Le(getLogObject("lenses",{message:zt("notifications.removeLenses")})),Bt(zt(getSelfieTranslation("removeLenses",xt))))},i0=()=>{wt.current||Rt.current||(Le(getLogObject("eyesClosed",{message:zt("notifications.eyesClosed")})),Bt(zt(getSelfieTranslation("openEyes",xt))))},f0=()=>{wt.current||Rt.current||(Le(getLogObject("mask",{message:zt("notifications.mask")})),Bt(zt(getSelfieTranslation("removeMask",xt))))},u0=()=>{Le(getLogObject("faceOccluded",{message:zt("notifications.faceOccluded")})),Bt(zt("notifications.faceOccluded"))},x0=async()=>{jt.current=new FaceDetection,await jt.current.initialize({onNoFace:emptyFunc,onCaptureFace:emptyFunc,onTooManyFaces:d0,onTooClose:o0,onCenterFace:n0,onFarAway:l0,onGetReady:g0,onGetReadyFinished:A0,onBlur:Yt,onDark:r0,onFaceAngle:Mt,onHeadWear:Jt,onLenses:a0,onEyesClosed:i0,onFaceMask:f0,onSwitchToManualCapture:t0,onCapture:s0,onFaceOccluded:u0,isLensesCheckEnabled:Ct,isMaskCheckEnabled:kt,isClosedEyesCheckEnabled:vt,isHeadWearCheckEnabled:yt,isVideoSelfie:!1,pipelineProfile:detectionSetup.getProfile(DetectionType.Selfie),autocaptureTimeout:Be})};React.useEffect(()=>{Qt.current=gt},[gt]),React.useEffect(()=>{Vt(!1),J0()},[]);const p0=async({response:S0,livenessPassed:H0,imageBase64:_0})=>{if(It.current=It.current+1,tt!==-1&&It.current>=tt)return nt({response:S0,livenessPassed:H0,imageBase64:_0});Bt(null),Lt("idle"),wt.current=!1,Rt.current=!1},D0=S0=>{const H0=S0.errorMessage||S0.message||S0.reason,{status:_0}=S0;if(_t(_0),_0===3004){Bt(zt("notifications.faceNotFound")),Pt(zt("notifications.faceNotFoundDescription")),Le(getLogObject("unableToCrop",{message:`${zt("notifications.unableToCrop")}`}));return}switch(H0){case"Selfie face is occluded or partially covered":Bt(zt("notifications.faceOccluded")),Pt(zt("notifications.faceOccludedDescription")),Le(getLogObject("faceOccluded",{message:`${zt("notifications.faceOccluded")}`}));break;case"Face not found.":Bt(zt("notifications.faceNotFound")),Pt(zt("notifications.faceNotFoundDescription")),Le(getLogObject("faceNotDetected",{message:`${zt("notifications.faceNotFound")}`}));break;case"No faces found on the image":Bt(zt("notifications.face")),Le(getLogObject("faceNotDetected",{message:`${zt("notifications.face")}`}));break;case"BadRequestException: More than one face detected.":Bt(zt("notifications.multiple")),Le(getLogObject("multipleFacesDetected",{message:`${zt("notifications.multiple")}`}));break;case"Cropping area goes off the image.":Bt(zt("notifications.crop")),Le(getLogObject("cropTooSmall",{message:`${zt("notifications.crop")}`}));break;case"Image in portrait orientation is expected.":Bt(zt("notifications.portrait")),Le(getLogObject("imageNotPortrait",{message:`${zt("notifications.portrait")}`}));break;case"Selfie image has low quality":Bt(zt("notifications.lowQualityImage")),Pt(zt("notifications.lowQualityImageDescription")),Le(getLogObject("lowQualityImage",{message:`${zt("notifications.lowQualityImage")}`}));break;default:Le(getLogObject("InternalServerError",{message:`${zt("notifications.error")}`})),Bt(zt("notifications.error"));break}},P0=async()=>{if(!(!ht.current||Gt.current)){Gt.current=!0,jt.current||await x0();try{await MlWasmJSApi$1.handleDetectionCallAndUpdateState(detectionSetup.getProfile(DetectionType.Selfie).pipelineType);const S0=ft.current.getCanvas();await jt.current.detect(S0)}catch(S0){console.error(S0)}finally{Gt.current=!1}}};React.useEffect(()=>(onFrameEmitter.on("newFrame",P0),()=>{onFrameEmitter.off("newFrame",P0)}),[P0]);const z0=React.useCallback(()=>{var S0;ht.current||(ht.current=!0,((S0=ft.current)==null?void 0:S0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!0))},[Le,x0]),J0=React.useCallback(async()=>{$t(!0),z0()},[z0]);function Y0(){At();let S0=null,H0=0;const _0=5;(async()=>{for(;H0<_0&&(S0=ft.current.getCanvas(),!S0);)await sleep(500),H0++;if(!S0)throw D0({errorMessage:"Failed to get canvas after multiple attempts"}),new Error("Failed to get canvas after multiple attempts");S0.updateBase64Image(),S0.updateBlob(),s0(S0,null)})()}const X0=Nt==="capturing",T0=Nt==="uploading",L0=Nt==="success",j0=Nt==="error",Q0=X0||T0,q0=T0||L0||j0;return{notificationMessage:Tt,notificationDescription:Dt,mode:Nt,capturing:wt,cameraReady:Wt,showManualCapture:Kt,handleFaceAutoCapture:s0,setMode:Lt,resetLoading:p0,setNotificationMessage:Bt,setNotificationDescription:Pt,handleError:D0,autoDetectFace:z0,startAutoDetect:J0,handleManualCapture:Y0,isCapturing:X0,isUploading:T0,isSuccess:L0,isError:j0,isLoading:Q0,hideCamera:q0,showBorders:Wt&&(Nt==="idle"||j0),shouldShowManualCapture:Kt&&!q0,selfieTimeoutRef:Xt,errorStatus:Ut}}function createSession$6({apiKey:Be,sessionId:Le,token:Ye,onStreamsUpdated:tt,onConnect:nt,onError:ft,options:ht}={}){if(!Be)throw new Error("Missing apiKey");if(!Le)throw new Error("Missing sessionId");if(!Ye)throw new Error("Missing token");let gt=[],At=Ct=>{gt.findIndex(vt=>vt.id===Ct.stream.id)<0&&(gt.push(Ct.stream),tt(gt))},xt=Ct=>{const kt=gt.findIndex(vt=>vt.id===Ct.stream.id);kt>=0&&(gt.splice(kt,1),tt(gt))},Et={streamCreated:At,streamDestroyed:xt},yt=OT.initSession(Be,Le,ht);return yt.on(Et),yt.connect(Ye,Ct=>{yt&&(Ct&&typeof ft=="function"?ft(Ct):!Ct&&typeof nt=="function"&&nt())}),{session:yt,streams:gt,disconnect(){yt&&(yt.off(Et),yt.disconnect()),gt=null,At=null,xt=null,Et=null,yt=null,this.session=null,this.streams=null}}}let OTSession$4=class extends React.Component{constructor(Le){super(Le),this.state={streams:[]}}getChildContext(){return{session:this.sessionHelper.session,streams:this.state.streams}}componentWillMount(){this.createSession()}componentDidUpdate(Le){(Le.apiKey!==this.props.apiKey||Le.sessionId!==this.props.sessionId||Le.token!==this.props.token)&&this.createSession()}componentWillUnmount(){this.destroySession()}createSession(){this.destroySession(),this.sessionHelper=createSession$6({apiKey:this.props.apiKey,sessionId:this.props.sessionId,token:this.props.token,onStreamsUpdated:Ye=>{this.setState({streams:Ye})},onConnect:this.props.onConnect,onError:this.props.onError,options:this.props.options}),this.props.eventHandlers&&typeof this.props.eventHandlers=="object"&&this.sessionHelper.session.on(this.props.eventHandlers);const{streams:Le}=this.sessionHelper;this.setState({streams:Le})}destroySession(){this.sessionHelper&&(this.props.eventHandlers&&typeof this.props.eventHandlers=="object"&&this.sessionHelper.session.off(this.props.eventHandlers),this.sessionHelper.disconnect())}render(){const Le=typeof this.props.children=="function";return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Le?this.props.children(this.sessionHelper):this.props.children})}};OTSession$4.propTypes={children:PropTypes.oneOfType([PropTypes.element,PropTypes.arrayOf(PropTypes.element),PropTypes.func]).isRequired,apiKey:PropTypes.string.isRequired,sessionId:PropTypes.string.isRequired,token:PropTypes.string.isRequired,eventHandlers:PropTypes.objectOf(PropTypes.func),onConnect:PropTypes.func,onError:PropTypes.func,options:PropTypes.object},OTSession$4.defaultProps={eventHandlers:null,onConnect:null,onError:null,options:{}},OTSession$4.childContextTypes={streams:PropTypes.arrayOf(PropTypes.object),session:PropTypes.shape({subscribe:PropTypes.func,unsubscribe:PropTypes.func})};var reWhitespace=/\s/;function trimmedEndIndex$1(Be){for(var Le=Be.length;Le--&&reWhitespace.test(Be.charAt(Le)););return Le}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(Be){return Be&&Be.slice(0,trimmedEndIndex(Be)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1;function isObject$6(Be){var Le=typeof Be;return Be!=null&&(Le=="object"||Le=="function")}var isObject_1=isObject$6,freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$5=freeGlobal||freeSelf||Function("return this")(),_root=root$5,root$4=_root,Symbol$3=root$4.Symbol,_Symbol=Symbol$3,Symbol$2=_Symbol,objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty,nativeObjectToString$1=objectProto$1.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag$1(Be){var Le=hasOwnProperty$2.call(Be,symToStringTag$1),Ye=Be[symToStringTag$1];try{Be[symToStringTag$1]=void 0;var tt=!0}catch{}var nt=nativeObjectToString$1.call(Be);return tt&&(Le?Be[symToStringTag$1]=Ye:delete Be[symToStringTag$1]),nt}var _getRawTag=getRawTag$1,objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString$2(Be){return nativeObjectToString.call(Be)}var _objectToString=objectToString$2,Symbol$1=_Symbol,getRawTag=_getRawTag,objectToString$1=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag$1(Be){return Be==null?Be===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(Be)?getRawTag(Be):objectToString$1(Be)}var _baseGetTag=baseGetTag$1;function isObjectLike$1(Be){return Be!=null&&typeof Be=="object"}var isObjectLike_1=isObjectLike$1,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$1(Be){return typeof Be=="symbol"||isObjectLike(Be)&&baseGetTag(Be)==symbolTag}var isSymbol_1=isSymbol$1,baseTrim=_baseTrim,isObject$5=isObject_1,isSymbol=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(Be){if(typeof Be=="number")return Be;if(isSymbol(Be))return NAN;if(isObject$5(Be)){var Le=typeof Be.valueOf=="function"?Be.valueOf():Be;Be=isObject$5(Le)?Le+"":Le}if(typeof Be!="string")return Be===0?Be:+Be;Be=baseTrim(Be);var Ye=reIsBinary.test(Be);return Ye||reIsOctal.test(Be)?freeParseInt(Be.slice(2),Ye?2:8):reIsBadHex.test(Be)?NAN:+Be}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$1(Be){if(!Be)return Be===0?Be:0;if(Be=toNumber(Be),Be===INFINITY||Be===-INFINITY){var Le=Be<0?-1:1;return Le*MAX_INTEGER}return Be===Be?Be:0}var toFinite_1=toFinite$1,toFinite=toFinite_1;function toInteger$1(Be){var Le=toFinite(Be),Ye=Le%1;return Le===Le?Ye?Le-Ye:Le:0}var toInteger_1=toInteger$1,toInteger=toInteger_1,FUNC_ERROR_TEXT="Expected a function";function before$1(Be,Le){var Ye;if(typeof Le!="function")throw new TypeError(FUNC_ERROR_TEXT);return Be=toInteger(Be),function(){return--Be>0&&(Ye=Le.apply(this,arguments)),Be<=1&&(Le=void 0),Ye}}var before_1=before$1,before=before_1;function once$1(Be){return before(2,Be)}var once_1=once$1;const once$2=getDefaultExportFromCjs(once_1);var lodash_min={exports:{}};/**
|
|
2927
2927
|
* @license
|
|
2928
2928
|
* Lodash <https://lodash.com/>
|
|
2929
2929
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -2977,7 +2977,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
2977
2977
|
padding-top: 100px;
|
|
2978
2978
|
`,DivWithMargin=dt.div`
|
|
2979
2979
|
margin-bottom: 90px;
|
|
2980
|
-
`,SecondFactor=({transactionId:Be,onSuccess:Le})=>{const[Ye,tt]=React.useState(""),[nt,ft]=React.useState(""),[ht,gt]=React.useState(!1),{t:At}=useTranslation$1();async function xt(){try{gt(!0);const Et=await sendMfa({transactionId:Be,verificationCode:Ye});Le(Et)}catch{gt(!1),ft("incorrect")}}return jsxRuntimeExports.jsxs(SecondFactorContainer,{className:"IncodeSecondFactorContainer",children:[jsxRuntimeExports.jsxs(DivWithMargin,{className:"IncodeSecondFactorDivWithMargin",children:[jsxRuntimeExports.jsx("h1",{children:At("secondFactor.title")}),jsxRuntimeExports.jsx("p",{children:At("secondFactor.instruction")})]}),jsxRuntimeExports.jsxs(DivWithMargin,{children:[jsxRuntimeExports.jsx(StyledInput$1,{className:"IncodeSecondFactorInput",type:"tel",autoComplete:"off",value:Ye,onChange:Et=>{tt(Et.target.value),ft("")}}),nt&&jsxRuntimeExports.jsx(ErrorMessage$5,{error:nt})]}),jsxRuntimeExports.jsx(Button$c,{disabled:ht,onClick:xt,className:"IncodeSecondFactorButton",children:At("common.continue")})]})};async function identify({base64Image:Be,faceCoordinates:Le,authReference:Ye,videoRecordingId:tt,videoRecordingToken:nt}){return exports.api.post("/omni/oneToN/identify?returnIPDeviceLocation=true",{authReference:Ye,selfie:{base64Image:await MlWasmJSApi$1.ens(Be),faceCoordinates:Le,clientInfo:{deviceClass:getDeviceClass()}},videoRecordingId:tt,videoRecordingToken:nt}).then(ft=>ft.data).catch(ft=>{var ht;return Promise.reject((ht=ft==null?void 0:ft.response)==null?void 0:ht.data)})}async function identifyInstantVerify({token:Be,base64Image:Le,faceCoordinates:Ye}){return exports.api.post("/omni/instant/verify/face",{base64Image:await MlWasmJSApi$1.ens(Le),faceCoordinates:Ye,clientInfo:{deviceClass:getDeviceClass()}},{headers:{"X-Incode-Hardware-Id":Be}}).then(tt=>tt.data).catch(tt=>{var nt;return Promise.reject((nt=tt==null?void 0:tt.response)==null?void 0:nt.data)})}async function oneToOneIdentify({base64Image:Be,phone:Le,email:Ye,authReference:tt,uuid:nt,nationalNumber:ft,videoRecordingId:ht,videoRecordingToken:gt}){return exports.api.post("omni/1to1/identify?returnIPDeviceLocation=true",{phone:Le,email:Ye,authReference:tt,uuid:nt,nationalNumber:ft,videoRecordingId:ht,videoRecordingToken:gt,selfie:{base64Image:await MlWasmJSApi$1.ens(Be),clientInfo:{deviceClass:getDeviceClass()}}}).then(At=>At.data).catch(At=>{var xt;return Promise.reject((xt=At==null?void 0:At.response)==null?void 0:xt.data)})}const getCircleText$2=(Be,Le)=>({uploading:Be("notifications.uploading"),success:Be("notifications.done"),error:Le});function Login({onError:Be,onSuccess:Le,onCapture:Ye,timeout:tt=4e4,stopAtError:nt=!1,stopAtAccessDenied:ft=!1,isOneToOne:ht=!1,oneToOneProps:gt,accessDeniedNotificationText:At,token:xt,isInstantVerify:Et=!1,showCustomCameraPermissionScreen:yt=!1,isKiosk:Ct=!1,recordingsToken:kt,hatCheckEnabled:vt,lensesCheckEnabled:bt,maskCheckEnabled:It,eyesClosedCheckEnabled:wt}){const[Rt,Tt]=React.useState("selfie"),[Bt,Dt]=React.useState(""),[Pt,Nt]=React.useState(""),Lt=React.useRef(null),Wt=React.useRef(!1),$t=React.useRef(null),Kt=React.useCallback(x0=>{$t.current=x0},[]),{startRecording:Vt,stopRecording:Ut}=useAuthenticationRecorder({token:kt,type:"selfie",setVideoRecordingId:Kt}),_t=async x0=>{var p0;if(nt){Be(x0);return}a0(x0||e0("notifications.serverError")),i0("error"),await sleep(3e3),f0({response:(p0=x0==null?void 0:x0.response)==null?void 0:p0.data,livenessPassed:null,imageBase64:Pt}),d0()},Xt=async x0=>{const p0=x0.spoofAttempt===!1,D0=!!x0.customerId&&!x0.error,P0=x0.secondFactor,z0=bt?x0.hasLenses:!1,J0=It?x0.hasFaceMask:!1;if(console.log({response:x0}),P0){Tt("secondFactor"),Dt(x0.transactionId),Nt(Pt);return}if(!p0||!D0||J0||z0){if(nt){const X0={status:x0==null?void 0:x0.error.status,message:x0==null?void 0:x0.error.error};Be(X0??"error");return}if(i0("error"),u0((()=>{switch(!0){case J0:return e0("notifications.faceMask");case z0:return e0("notifications.lenses");case!p0:return e0("notifications.spoof");case!D0:return At??e0("selfie.accessDenied");default:return""}})()),await sleep(3e3),p0&&!D0&&ft){const X0=new Error("AccessDenied");Be(X0);return}f0({response:x0,livenessPassed:p0,imageBase64:Pt}),d0();return}zt(x0,Pt)},Qt=async(x0,p0)=>{await identifyInstantVerify({token:xt,base64Image:x0,faceCoordinates:p0}).then(Xt).catch(_t)},jt=async(x0,p0)=>{await identify({base64Image:x0,faceCoordinates:p0,authReference:gt==null?void 0:gt.authReference,videoRecordingId:$t.current,videoRecordingToken:kt}).then(Xt).catch(_t)},Gt=async(x0,p0)=>{await oneToOneIdentify({base64Image:x0,phone:gt==null?void 0:gt.phone,email:gt==null?void 0:gt.email,authReference:gt==null?void 0:gt.authReference,uuid:gt==null?void 0:gt.identityId,nationalNumber:gt==null?void 0:gt.nationalNumber,videoRecordingId:$t.current,videoRecordingToken:kt}).then(Xt).catch(_t)},qt=throttle$2(async(x0,p0)=>{MlWasmJSApi$1.reset();const D0=x0.getBase64Image();Ye&&typeof Ye=="function"?Ye(await MlWasmJSApi$1.encryptImage(D0),p0):Et?Qt(D0,p0):ht?Gt(D0):jt(D0,p0)},300);async function zt(x0,p0){Le({...x0,token:x0.token,base64Image:p0||Pt})}const{t:e0}=useTranslation$1(),{showManualCapture:s0,mode:t0,notificationMessage:l0,startAutoDetect:d0,cameraReady:n0,handleManualCapture:g0,isSuccess:A0,isError:o0,isLoading:r0,hideCamera:Yt,showBorders:Mt,shouldShowManualCapture:Jt,handleError:a0,setMode:i0,resetLoading:f0,setNotificationMessage:u0}=useSelfie({timeout:tt,isDetecting:Wt,handleCapture:qt,numberOfTries:-1,webcam:Lt,lensesCheckEnabled:bt,hatCheckEnabled:vt,maskCheckEnabled:It,eyesClosedCheckEnabled:wt});return React.useEffect(()=>()=>{kt&&Ut()},[]),Rt==="secondFactor"?jsxRuntimeExports.jsx(SecondFactor,{transactionId:Bt,onSuccess:zt}):jsxRuntimeExports.jsxs(Container$n,{className:cx("IncodeLoginContainer",{kiosk:Ct}),children:[Jt&&jsxRuntimeExports.jsxs(CaptureButtonContainer$1,{className:cx("IncodeLoginCaptureButtonContainer",{kiosk:Ct}),initial:{scale:0},animate:{scale:1},children:[jsxRuntimeExports.jsx("p",{children:e0("common.takePhoto")}),jsxRuntimeExports.jsx("button",{onClick:g0,type:"button",children:jsxRuntimeExports.jsx("img",{src:captureButton,alt:"capture button"})})]}),jsxRuntimeExports.jsxs(WebcamContainer$1,{className:cx("IncodeLoginWebcamContainer",{kiosk:Ct}),children:[(r0||A0)&&jsxRuntimeExports.jsx(BordersContainer,{className:cx("IncodeLoginBordersContainer",{kiosk:Ct}),children:jsxRuntimeExports.jsx(LoadingBorders,{className:"IncodeLoginLoadingBorders",mode:t0})}),jsxRuntimeExports.jsx(Hidder,{className:"IncodeLoginHidder",initial:{width:50,height:50},animate:{width:n0?300:50,height:n0?300:50},children:jsxRuntimeExports.jsx(CameraOvalOuter,{className:cx("IncodeLoginCameraOvalOuter",{"no-borders":r0||A0,"has-error":o0,kiosk:Ct}),initial:{borderWidth:"0px"},transition:{delay:0,ease:"linear"},animate:{borderWidth:Mt?"6px":"0px",borderColor:o0?"#ff5c6f":"#21273b"},children:jsxRuntimeExports.jsxs(CameraOvalInner,{className:cx("IncodeLoginCameraOvalInner",{isUploading:Yt}),children:[jsxRuntimeExports.jsx(FaceFrame$1,{src:faceFrame$1,alt:"face frame",className:cx("IncodeLoginFaceFrame",{hidden:Yt})}),jsxRuntimeExports.jsx(Webcam,{ref:Lt,videoSource:"user",onPlay:()=>{},isSelfie:!0,type:"login",className:cx("video__selfie IncodeLoginWebcam",{hidden:Yt,kiosk:Ct}),onError:Be,showCustomCameraPermissionScreen:yt,isKiosk:Ct,onStreamReady:async x0=>{kt?await Vt(x0):emptyFunc()}}),Yt&&jsxRuntimeExports.jsx(CameraOvalInnerText,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeLoginCameraOvalInnerText",{isError:o0}),children:getCircleText$2(e0,l0)[t0]})]})})})]}),!Yt&&jsxRuntimeExports.jsx(NotificationInline,{"aria-live":"assertive",initial:{scale:0},animate:{scale:n0?1:0},className:cx("IncodeLoginNotificationInline",{hasManualCapture:s0}),children:l0||jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[e0("notifications.selfie.one")," ",jsxRuntimeExports.jsx("br",{}),e0("notifications.selfie.two")]})}),jsxRuntimeExports.jsx("canvas",{id:"canvasFrame",hidden:!0})]})}var dist$1={},OTSession$3={},createSession$5={};Object.defineProperty(createSession$5,"__esModule",{value:!0}),createSession$5.default=createSession$4;function createSession$4(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Le=Be.apiKey,Ye=Be.sessionId,tt=Be.token,nt=Be.onStreamsUpdated,ft=Be.onConnect,ht=Be.onError,gt=Be.options;if(!Le)throw new Error("Missing apiKey");if(!Ye)throw new Error("Missing sessionId");if(!tt)throw new Error("Missing token");var At=[],xt=function(vt){var bt=At.findIndex(function(It){return It.id===vt.stream.id});bt<0&&(At.push(vt.stream),nt(At))},Et=function(vt){var bt=At.findIndex(function(It){return It.id===vt.stream.id});bt>=0&&(At.splice(bt,1),nt(At))},yt={streamCreated:xt,streamDestroyed:Et},Ct=OT.initSession(Le,Ye,gt);return Ct.on(yt),Ct.connect(tt,function(kt){Ct&&(kt&&typeof ht=="function"?ht(kt):!kt&&typeof ft=="function"&&ft())}),{session:Ct,streams:At,disconnect:function(){Ct&&(Ct.off(yt),Ct.disconnect()),At=null,xt=null,Et=null,yt=null,Ct=null,this.session=null,this.streams=null}}}Object.defineProperty(OTSession$3,"__esModule",{value:!0});var _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Be){return typeof Be}:function(Be){return Be&&typeof Symbol=="function"&&Be.constructor===Symbol&&Be!==Symbol.prototype?"symbol":typeof Be},_createClass$9=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}(),_react$d=React,_react2$d=_interopRequireDefault$f(_react$d),_propTypes$d=propTypesExports,_propTypes2$d=_interopRequireDefault$f(_propTypes$d),_createSession2$3=createSession$5,_createSession3$1=_interopRequireDefault$f(_createSession2$3);function _interopRequireDefault$f(Be){return Be&&Be.__esModule?Be:{default:Be}}function _classCallCheck$9(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$9(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$9(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var OTSession$2=function(Be){_inherits$9(Le,Be);function Le(Ye){_classCallCheck$9(this,Le);var tt=_possibleConstructorReturn$9(this,(Le.__proto__||Object.getPrototypeOf(Le)).call(this,Ye));return tt.state={streams:[]},tt}return _createClass$9(Le,[{key:"getChildContext",value:function(){return{session:this.sessionHelper.session,streams:this.state.streams}}},{key:"componentWillMount",value:function(){this.createSession()}},{key:"componentDidUpdate",value:function(tt){(tt.apiKey!==this.props.apiKey||tt.sessionId!==this.props.sessionId||tt.token!==this.props.token)&&this.createSession()}},{key:"componentWillUnmount",value:function(){this.destroySession()}},{key:"createSession",value:function(){var tt=this;this.destroySession(),this.sessionHelper=(0,_createSession3$1.default)({apiKey:this.props.apiKey,sessionId:this.props.sessionId,token:this.props.token,onStreamsUpdated:function(ht){tt.setState({streams:ht})},onConnect:this.props.onConnect,onError:this.props.onError,options:this.props.options}),this.props.eventHandlers&&_typeof$5(this.props.eventHandlers)==="object"&&this.sessionHelper.session.on(this.props.eventHandlers);var nt=this.sessionHelper.streams;this.setState({streams:nt})}},{key:"destroySession",value:function(){this.sessionHelper&&(this.props.eventHandlers&&_typeof$5(this.props.eventHandlers)==="object"&&this.sessionHelper.session.off(this.props.eventHandlers),this.sessionHelper.disconnect())}},{key:"render",value:function(){var tt=this.props.children,nt=typeof tt=="function";return _react2$d.default.createElement(_react$d.Fragment,null,nt?tt(this.sessionHelper):this.props.children)}}]),Le}(_react$d.Component);OTSession$3.default=OTSession$2,OTSession$2.propTypes={children:_propTypes2$d.default.oneOfType([_propTypes2$d.default.element,_propTypes2$d.default.arrayOf(_propTypes2$d.default.element),_propTypes2$d.default.func]).isRequired,apiKey:_propTypes2$d.default.string.isRequired,sessionId:_propTypes2$d.default.string.isRequired,token:_propTypes2$d.default.string.isRequired,eventHandlers:_propTypes2$d.default.objectOf(_propTypes2$d.default.func),onConnect:_propTypes2$d.default.func,onError:_propTypes2$d.default.func,options:_propTypes2$d.default.object},OTSession$2.defaultProps={eventHandlers:null,onConnect:null,onError:null,options:{}},OTSession$2.childContextTypes={streams:_propTypes2$d.default.arrayOf(_propTypes2$d.default.object),session:_propTypes2$d.default.shape({subscribe:_propTypes2$d.default.func,unsubscribe:_propTypes2$d.default.func})};var OTPublisher$3={};Object.defineProperty(OTPublisher$3,"__esModule",{value:!0});var _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Be){return typeof Be}:function(Be){return Be&&typeof Symbol=="function"&&Be.constructor===Symbol&&Be!==Symbol.prototype?"symbol":typeof Be},_createClass$8=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}(),_react$c=React,_react2$c=_interopRequireDefault$e(_react$c),_propTypes$c=propTypesExports,_propTypes2$c=_interopRequireDefault$e(_propTypes$c),_once$1=once_1,_once2$1=_interopRequireDefault$e(_once$1),_fp$1=fp,_uuid$3=uuid_1$2,_uuid2$3=_interopRequireDefault$e(_uuid$3);function _interopRequireDefault$e(Be){return Be&&Be.__esModule?Be:{default:Be}}function _classCallCheck$8(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$8(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$8(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var OTPublisher$2=function(Be){_inherits$8(Le,Be);function Le(Ye,tt){_classCallCheck$8(this,Le);var nt=_possibleConstructorReturn$8(this,(Le.__proto__||Object.getPrototypeOf(Le)).call(this,Ye));return nt.sessionConnectedHandler=function(){nt.publishToSession(nt.state.publisher)},nt.streamCreatedHandler=function(ft){nt.setState({lastStreamId:ft.stream.id})},nt.state={publisher:null,lastStreamId:"",session:Ye.session||tt.session||null},nt}return _createClass$8(Le,[{key:"componentDidMount",value:function(){this.createPublisher()}},{key:"componentDidUpdate",value:function(tt,nt){var ft=this,ht=function(Et,yt){return Et===void 0?yt:Et},gt=function(Et,yt){var Ct=ht(tt.properties[Et],yt),kt=ht(ft.props.properties[Et],yt);return Ct!==kt},At=function(Et,yt){if(gt(Et,yt)){var Ct=ht(ft.props.properties[Et],yt);ft.state.publisher[Et](Ct)}};if(gt("videoSource",void 0)){this.destroyPublisher(),this.createPublisher();return}At("publishAudio",!0),At("publishVideo",!0),this.state.session!==nt.session&&(this.destroyPublisher(nt.session),this.createPublisher())}},{key:"componentWillUnmount",value:function(){this.state.session&&this.state.session.off("sessionConnected",this.sessionConnectedHandler),this.destroyPublisher()}},{key:"getPublisher",value:function(){return this.state.publisher}},{key:"destroyPublisher",value:function(){var tt=this,nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.state.session;delete this.publisherId,this.state.publisher&&(this.state.publisher.off("streamCreated",this.streamCreatedHandler),this.props.eventHandlers&&_typeof$4(this.props.eventHandlers)==="object"&&this.state.publisher.once("destroyed",function(){tt.state.publisher.off(tt.props.eventHandlers)}),nt&&nt.unpublish(this.state.publisher),this.state.publisher.destroy())}},{key:"publishToSession",value:function(tt){var nt=this,ft=this.publisherId;this.state.session.publish(tt,function(ht){ft===nt.publisherId&&(ht?nt.errorHandler(ht):typeof nt.props.onPublish=="function"&&nt.props.onPublish())})}},{key:"createPublisher",value:function(){var tt=this;if(!this.state.session){this.setState({publisher:null,lastStreamId:""});return}var nt=this.props.properties||{},ft=void 0;nt.insertDefaultUI!==!1&&(ft=document.createElement("div"),ft.setAttribute("class","OTPublisherContainer"),this.node.appendChild(ft)),this.publisherId=(0,_uuid2$3.default)();var ht=this.publisherId;this.errorHandler=(0,_once2$1.default)(function(xt){ht===tt.publisherId&&typeof tt.props.onError=="function"&&tt.props.onError(xt)});var gt=OT.initPublisher(ft,nt,function(xt){ht===tt.publisherId&&(xt?tt.errorHandler(xt):typeof tt.props.onInit=="function"&&tt.props.onInit())});if(gt.on("streamCreated",this.streamCreatedHandler),this.props.eventHandlers&&_typeof$4(this.props.eventHandlers)==="object"){var At=(0,_fp$1.omitBy)(_fp$1.isNil)(this.props.eventHandlers);gt.on(At)}this.state.session.connection?this.publishToSession(gt):this.state.session.once("sessionConnected",this.sessionConnectedHandler),this.setState({publisher:gt,lastStreamId:""})}},{key:"render",value:function(){var tt=this,nt=this.props,ft=nt.className,ht=nt.style;return _react2$c.default.createElement("div",{className:ft,style:ht,ref:function(At){tt.node=At}})}}]),Le}(_react$c.Component);OTPublisher$3.default=OTPublisher$2,OTPublisher$2.propTypes={session:_propTypes2$c.default.shape({connection:_propTypes2$c.default.shape({connectionId:_propTypes2$c.default.string}),once:_propTypes2$c.default.func,off:_propTypes2$c.default.func,publish:_propTypes2$c.default.func,unpublish:_propTypes2$c.default.func}),className:_propTypes2$c.default.string,style:_propTypes2$c.default.object,properties:_propTypes2$c.default.object,eventHandlers:_propTypes2$c.default.objectOf(_propTypes2$c.default.func),onInit:_propTypes2$c.default.func,onPublish:_propTypes2$c.default.func,onError:_propTypes2$c.default.func},OTPublisher$2.defaultProps={session:null,className:"",style:{},properties:{},eventHandlers:null,onInit:null,onPublish:null,onError:null},OTPublisher$2.contextTypes={session:_propTypes2$c.default.shape({connection:_propTypes2$c.default.shape({connectionId:_propTypes2$c.default.string}),once:_propTypes2$c.default.func,off:_propTypes2$c.default.func,publish:_propTypes2$c.default.func,unpublish:_propTypes2$c.default.func})};var OTStreams$3={},OTSubscriberContext$3={};Object.defineProperty(OTSubscriberContext$3,"__esModule",{value:!0});var _createClass$7=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}(),_react$b=React,_react2$b=_interopRequireDefault$d(_react$b),_propTypes$b=propTypesExports,_propTypes2$b=_interopRequireDefault$d(_propTypes$b);function _interopRequireDefault$d(Be){return Be&&Be.__esModule?Be:{default:Be}}function _classCallCheck$7(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$7(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$7(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var OTSubscriberContext$2=function(Be){_inherits$7(Le,Be);function Le(){return _classCallCheck$7(this,Le),_possibleConstructorReturn$7(this,(Le.__proto__||Object.getPrototypeOf(Le)).apply(this,arguments))}return _createClass$7(Le,[{key:"getChildContext",value:function(){return{stream:this.props.stream}}},{key:"render",value:function(){return _react2$b.default.createElement(_react$b.Fragment,null,this.props.children)}}]),Le}(_react$b.Component);OTSubscriberContext$3.default=OTSubscriberContext$2,OTSubscriberContext$2.propTypes={children:_propTypes2$b.default.element.isRequired,stream:_propTypes2$b.default.shape({streamId:_propTypes2$b.default.string}).isRequired},OTSubscriberContext$2.childContextTypes={stream:_propTypes2$b.default.shape({streamId:_propTypes2$b.default.string})},Object.defineProperty(OTStreams$3,"__esModule",{value:!0}),OTStreams$3.default=OTStreams$2;var _react$a=React,_react2$a=_interopRequireDefault$c(_react$a),_propTypes$a=propTypesExports,_propTypes2$a=_interopRequireDefault$c(_propTypes$a),_OTSubscriberContext$1=OTSubscriberContext$3,_OTSubscriberContext2$1=_interopRequireDefault$c(_OTSubscriberContext$1);function _interopRequireDefault$c(Be){return Be&&Be.__esModule?Be:{default:Be}}function OTStreams$2(Be,Le){var Ye=Be.session||Le.session||null,tt=Be.streams||Le.streams||null;if(!Ye)return null;var nt=_react$a.Children.only(Be.children);console.log(Be.loading,"uwu");var ft=Array.isArray(tt)&&tt.length>0?tt.map(function(ht){return _react2$a.default.createElement(_OTSubscriberContext2$1.default,{stream:ht,key:ht.id},(0,_react$a.cloneElement)(nt))}):Be.loading;return _react2$a.default.createElement(_react$a.Fragment,null,ft)}OTStreams$2.propTypes={children:_propTypes2$a.default.element.isRequired,session:_propTypes2$a.default.shape({publish:_propTypes2$a.default.func,subscribe:_propTypes2$a.default.func}),streams:_propTypes2$a.default.arrayOf(_propTypes2$a.default.object)},OTStreams$2.defaultProps={session:null,streams:null,loading:null},OTStreams$2.contextTypes={session:_propTypes2$a.default.shape({publish:_propTypes2$a.default.func,subscribe:_propTypes2$a.default.func}),streams:_propTypes2$a.default.arrayOf(_propTypes2$a.default.object),loading:_propTypes2$a.default.element};var OTSubscriber$3={};Object.defineProperty(OTSubscriber$3,"__esModule",{value:!0});var _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Be){return typeof Be}:function(Be){return Be&&typeof Symbol=="function"&&Be.constructor===Symbol&&Be!==Symbol.prototype?"symbol":typeof Be},_createClass$6=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}(),_react$9=React,_react2$9=_interopRequireDefault$b(_react$9),_propTypes$9=propTypesExports,_propTypes2$9=_interopRequireDefault$b(_propTypes$9),_uuid$2=uuid_1$2,_uuid2$2=_interopRequireDefault$b(_uuid$2);function _interopRequireDefault$b(Be){return Be&&Be.__esModule?Be:{default:Be}}function _classCallCheck$6(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$6(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$6(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var OTSubscriber$2=function(Be){_inherits$6(Le,Be);function Le(Ye,tt){_classCallCheck$6(this,Le);var nt=_possibleConstructorReturn$6(this,(Le.__proto__||Object.getPrototypeOf(Le)).call(this,Ye));return nt.state={subscriber:null,stream:Ye.stream||tt.stream||null,session:Ye.session||tt.session||null,currentRetryAttempt:0},nt.maxRetryAttempts=Ye.maxRetryAttempts||5,nt.retryAttemptTimeout=Ye.retryAttemptTimeout||1e3,nt}return _createClass$6(Le,[{key:"componentDidMount",value:function(){this.createSubscriber()}},{key:"componentDidUpdate",value:function(tt,nt){var ft=this,ht=function(xt,Et,yt){return xt===void 0?yt:Et(xt)},gt=function(xt){var Et=ht(tt.properties[xt],Boolean,!0),yt=ht(ft.props.properties[xt],Boolean,!0);Et!==yt&&ft.state.subscriber[xt](yt)};gt("subscribeToAudio"),gt("subscribeToVideo"),(nt.session!==this.state.session||nt.stream!==this.state.stream)&&(this.destroySubscriber(nt.session),this.createSubscriber())}},{key:"componentWillUnmount",value:function(){this.destroySubscriber()}},{key:"getSubscriber",value:function(){return this.state.subscriber}},{key:"createSubscriber",value:function(){var tt=this;if(!this.state.session||!this.state.stream){this.setState({subscriber:null});return}var nt=this.props.properties||{},ft=void 0;nt.insertDefaultUI!==!1&&(ft=document.createElement("div"),ft.setAttribute("class","OTSubscriberContainer"),this.node.appendChild(ft)),this.subscriberId=(0,_uuid2$2.default)();var ht=this.subscriberId,gt=this.state.session.subscribe(this.state.stream,ft,this.props.properties,function(At){ht===tt.subscriberId&&(At&&tt.props.retry&&tt.state.currentRetryAttempt<tt.maxRetryAttempts-1&&tt.handleRetrySubscriber(),At&&typeof tt.props.onError=="function"?tt.props.onError(At):!At&&typeof tt.props.onSubscribe=="function"&&tt.props.onSubscribe())});this.props.eventHandlers&&_typeof$3(this.props.eventHandlers)==="object"&>.on(this.props.eventHandlers),this.setState({subscriber:gt})}},{key:"handleRetrySubscriber",value:function(){var tt=this;setTimeout(function(){tt.setState(function(nt){return{currentRetryAttempt:nt.currentRetryAttempt+1,subscriber:null}}),tt.createSubscriber()},this.retryAttemptTimeout)}},{key:"destroySubscriber",value:function(){var tt=this,nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.session;delete this.subscriberId,this.state.subscriber&&(this.props.eventHandlers&&_typeof$3(this.props.eventHandlers)==="object"&&this.state.subscriber.once("destroyed",function(){tt.state.subscriber.off(tt.props.eventHandlers)}),nt&&nt.unsubscribe(this.state.subscriber))}},{key:"render",value:function(){var tt=this,nt=this.props,ft=nt.className,ht=nt.style;return _react2$9.default.createElement("div",{className:ft,style:ht,ref:function(At){tt.node=At}})}}]),Le}(_react$9.Component);OTSubscriber$3.default=OTSubscriber$2,OTSubscriber$2.propTypes={stream:_propTypes2$9.default.shape({streamId:_propTypes2$9.default.string}),session:_propTypes2$9.default.shape({subscribe:_propTypes2$9.default.func,unsubscribe:_propTypes2$9.default.func}),className:_propTypes2$9.default.string,style:_propTypes2$9.default.object,properties:_propTypes2$9.default.object,retry:_propTypes2$9.default.bool,maxRetryAttempts:_propTypes2$9.default.number,retryAttemptTimeout:_propTypes2$9.default.number,eventHandlers:_propTypes2$9.default.objectOf(_propTypes2$9.default.func),onSubscribe:_propTypes2$9.default.func,onError:_propTypes2$9.default.func},OTSubscriber$2.defaultProps={stream:null,session:null,className:"",style:{},properties:{},retry:!1,maxRetryAttempts:5,retryAttemptTimeout:1e3,eventHandlers:null,onSubscribe:null,onError:null},OTSubscriber$2.contextTypes={stream:_propTypes2$9.default.shape({streamId:_propTypes2$9.default.string}),session:_propTypes2$9.default.shape({subscribe:_propTypes2$9.default.func,unsubscribe:_propTypes2$9.default.func})};var preloadScript$5={};Object.defineProperty(preloadScript$5,"__esModule",{value:!0});var _createClass$5=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}();preloadScript$5.default=preloadScript$4;var _react$8=React,_react2$8=_interopRequireDefault$a(_react$8),_propTypes$8=propTypesExports,_propTypes2$8=_interopRequireDefault$a(_propTypes$8),_reactDisplayName$1=getDisplayName$1,_reactDisplayName2$1=_interopRequireDefault$a(_reactDisplayName$1),_scriptjs$1=scriptExports,_scriptjs2$1=_interopRequireDefault$a(_scriptjs$1);function _interopRequireDefault$a(Be){return Be&&Be.__esModule?Be:{default:Be}}function _objectWithoutProperties$3(Be,Le){var Ye={};for(var tt in Be)Le.indexOf(tt)>=0||Object.prototype.hasOwnProperty.call(Be,tt)&&(Ye[tt]=Be[tt]);return Ye}function _classCallCheck$5(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$5(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$5(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var DEFAULT_SCRIPT_URL$1="https://static.opentok.com/v2/js/opentok.min.js";function preloadScript$4(Be){var Le=function(Ye){_inherits$5(tt,Ye);function tt(nt){_classCallCheck$5(this,tt);var ft=_possibleConstructorReturn$5(this,(tt.__proto__||Object.getPrototypeOf(tt)).call(this,nt));return ft.onScriptLoad=function(){ft.isPresent&&ft.setState({scriptLoaded:!0})},ft.state={scriptLoaded:typeof OT<"u"},ft.isPresent=!1,ft}return _createClass$5(tt,[{key:"componentDidMount",value:function(){if(this.isPresent=!0,!(this.scriptLoading||this.state.scriptLoaded)){this.scriptLoading=!0;var ft=this.props.opentokClientUrl;(0,_scriptjs2$1.default)(ft,this.onScriptLoad)}}},{key:"componentWillUnmount",value:function(){this.isPresent=!1}},{key:"render",value:function(){var ft=this.props;ft.opentokClientUrl;var ht=ft.loadingDelegate,gt=_objectWithoutProperties$3(ft,["opentokClientUrl","loadingDelegate"]);return this.state.scriptLoaded?_react2$8.default.createElement(Be,gt):ht}}]),tt}(_react$8.Component);return Le.displayName="preloadScript("+(0,_reactDisplayName2$1.default)(Be)+")",Le.propTypes={opentokClientUrl:_propTypes2$8.default.string,loadingDelegate:_propTypes2$8.default.node},Le.defaultProps={opentokClientUrl:DEFAULT_SCRIPT_URL$1,loadingDelegate:_react2$8.default.createElement("div",null)},Le}Object.defineProperty(dist$1,"__esModule",{value:!0});var preloadScript$3=dist$1.preloadScript=dist$1.createSession=dist$1.OTSubscriber=dist$1.OTStreams=dist$1.OTPublisher=dist$1.OTSession=void 0,_OTSession$1=OTSession$3,_OTSession2$1=_interopRequireDefault$9(_OTSession$1),_OTPublisher$1=OTPublisher$3,_OTPublisher2$1=_interopRequireDefault$9(_OTPublisher$1),_OTStreams$1=OTStreams$3,_OTStreams2$1=_interopRequireDefault$9(_OTStreams$1),_OTSubscriber$1=OTSubscriber$3,_OTSubscriber2$1=_interopRequireDefault$9(_OTSubscriber$1),_createSession$1=createSession$5,_createSession2$2=_interopRequireDefault$9(_createSession$1),_preloadScript$1=preloadScript$5,_preloadScript2$1=_interopRequireDefault$9(_preloadScript$1);function _interopRequireDefault$9(Be){return Be&&Be.__esModule?Be:{default:Be}}dist$1.default={OTSession:_OTSession2$1.default,OTPublisher:_OTPublisher2$1.default,OTStreams:_OTStreams2$1.default,OTSubscriber:_OTSubscriber2$1.default,createSession:_createSession2$2.default,preloadScript:_preloadScript2$1.default},dist$1.OTSession=_OTSession2$1.default,dist$1.OTPublisher=_OTPublisher2$1.default,dist$1.OTStreams=_OTStreams2$1.default,dist$1.OTSubscriber=_OTSubscriber2$1.default,dist$1.createSession=_createSession2$2.default,preloadScript$3=dist$1.preloadScript=_preloadScript2$1.default;const isFeatureConfigEnabled=(Be,Le)=>{var Ye;return(Ye=Le==null?void 0:Le.find(tt=>tt.feature===Be))==null?void 0:Ye.enabled},getFeatureConfig=async({token:Be})=>(await exports.api.get("/omni/feature-config",{headers:{"X-Incode-Hardware-Id":Be}})).data,frontType="front",backType="back",selfieType="selfie",authFaceType="authFace",webMdlType="webMdl",frontIdUrl="/omni/add/front-id",secondFrontIdUrl="/omni/add/front-second-id",backIdUrl="/omni/add/back-id",secondBackIdUrl="/omni/add/back-second-id",frontIdBase64Url="/omni/add/front-id/v2",backIdBase64Url="/omni/add/back-id/v2",frontSecondIdBase64Url="/omni/add/front-second-id/v2",backSecondIdBase64Url="/omni/add/back-second-id/v2",selfieUrl="/omni/add/face",authFaceUrl="/omni/onboarding-authentications/authenticate",webMdlUrl="/omni/webmdl/decrypt",getRealQualityValue=Be=>(1-Be)*100;function uploadFrontId({token:Be,image:Le,onProgress:Ye=emptyFunc,sendBase64:tt,onlyFront:nt,isRetry:ft=!1,isSecondId:ht=!1,glare:gt,sharpness:At,captureType:xt=null,shouldAddGlare:Et=!1,metadata:yt}){const Ct=tt?ht?frontSecondIdBase64Url:frontIdBase64Url:ht?secondFrontIdUrl:frontIdUrl,kt=nt?`${Ct}?onlyFront=${nt}`:Ct,vt=tt?{base64Image:Le,metadata:yt}:Le,bt=tt?"application/json":"image/jpeg";return exports.api.post(kt,vt,{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":bt},onUploadProgress:({loaded:It,total:wt})=>Ye(It/wt*100),params:{...ft?{retry:!0}:void 0,...Et&>?{glare:getRealQualityValue(gt)}:void 0,...At?{sharpness:getRealQualityValue(At)}:void 0,captureType:xt}}).then(It=>It.data)}function uploadBackId({token:Be,image:Le,onProgress:Ye=emptyFunc,sendBase64:tt,isRetry:nt=!1,isSecondId:ft=!1,glare:ht,sharpness:gt,shouldSkipGlareBack:At=!1,captureType:xt=null,shouldAddGlare:Et=!1,metadata:yt}){const Ct=tt?ft?backSecondIdBase64Url:backIdBase64Url:ft?secondBackIdUrl:backIdUrl,kt=tt?{base64Image:Le,metadata:yt}:Le,vt=tt?"application/json":"image/jpeg";return exports.api.post(Ct,kt,{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":vt},onUploadProgress:({loaded:bt,total:It})=>Ye(bt/It*100),params:{...nt?{retry:!0}:void 0,...At?{glare:0}:Et&&ht?{glare:getRealQualityValue(ht)}:void 0,...gt?{sharpness:getRealQualityValue(gt)}:void 0,captureType:xt}}).then(bt=>bt.data)}function uploadSelfie({token:Be,image:Le,onProgress:Ye=emptyFunc,encrypted:tt,imageType:nt="selfie",faceCoordinates:ft=null,recordingId:ht,metadata:gt}){return exports.api.post(selfieUrl,{base64Image:Le,encrypted:tt,faceCoordinates:ft,clientInfo:{deviceClass:getDeviceClass()},metadata:gt},{headers:{"X-Incode-Hardware-Id":Be},onUploadProgress:({loaded:At,total:xt})=>Ye(At/xt*100),params:{recordingId:ht,imageType:nt}}).then(At=>At.data)}function uploadAuthSelfie({token:Be,image:Le,authHint:Ye,onProgress:tt=emptyFunc,faceCoordinates:nt=null,recordingId:ft,metadata:ht}){return exports.api.post(authFaceUrl,{base64Image:Le,faceCoordinates:nt,clientInfo:{deviceClass:getDeviceClass()},metadata:ht,hint:Ye,recordingId:ft},{headers:{"X-Incode-Hardware-Id":Be},onUploadProgress:({loaded:gt,total:At})=>tt(gt/At*100)}).then(gt=>gt.data)}function uploadMobileWalletId({token:Be,mdlData:Le,onProgress:Ye=emptyFunc}){var tt;return exports.api.post(webMdlUrl,{deviceResponse:(tt=Le.data)==null?void 0:tt.response},{headers:{"X-Incode-Hardware-Id":Be},onUploadProgress:({loaded:nt,total:ft})=>Ye(nt/ft*100)}).then(nt=>nt.data)}async function capture({type:Be,...Le}){var nt;const tt=((nt=(await getFeatureConfig({token:Le.token})).features)==null?void 0:nt.some(ft=>ft.feature==="USE_CLIENT_GLARE"&&ft.enabled))||!1;if(Be===frontType)return uploadFrontId({...Le,shouldAddGlare:tt});if(Be===backType)return uploadBackId({...Le,shouldAddGlare:tt});if(Be===selfieType)return uploadSelfie({...Le});if(Be===authFaceType)return uploadAuthSelfie({...Le,authHint:Le.authHint});if(Be===webMdlType)return uploadMobileWalletId({...Le});throw new Error(`type not supported, please use one of this: [${frontType}, ${backType}, ${selfieType}, ${authFaceType}, ${webMdlType}]`)}const useOnlineStatus=({onOffline:Be,onOnline:Le}={})=>{const[Ye,tt]=React.useState(!0);return React.useEffect(()=>{const nt=()=>{tt(!1),Be==null||Be()},ft=()=>{tt(!0),Le==null||Le()};return window.addEventListener("offline",nt),window.addEventListener("online",ft),()=>{window.removeEventListener("offline",nt),window.removeEventListener("online",ft)}},[Be,Le]),{isOnline:Ye}};function processFace({token:Be,imageType:Le="selfie"}){return exports.api.post("/omni/process/face",{},{headers:{"X-Incode-Hardware-Id":Be},params:{imageType:Le}}).then(Ye=>Ye.data).catch(Ye=>Promise.reject(Ye.response.data))}function processFaceSecondId({token:Be,imageType:Le="selfie"}){return exports.api.post(`/omni/process/face-vs-second-id?imageType=${Le}`,{},{headers:{"X-Incode-Hardware-Id":Be}}).then(Ye=>Ye.data).catch(Ye=>Promise.reject(Ye.response.data))}const NoInternetIcon=({className:Be})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",className:Be,"aria-label":"No internet connection icon",children:[jsxRuntimeExports.jsx("title",{children:"No internet icon"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.4777 24.1401C14.9444 24.6481 14.9231 25.4921 15.4311 26.0254C15.9391 26.5588 16.7831 26.5801 17.3164 26.0721C17.9391 25.4801 19.0071 25.4801 19.6297 26.0721C19.8884 26.3174 20.2191 26.4401 20.5497 26.4401C20.9004 26.4401 21.2537 26.3014 21.5151 26.0254C22.0231 25.4921 22.0031 24.6481 21.4684 24.1401C19.8484 22.6014 17.0977 22.6014 15.4777 24.1401Z",fill:"#E71111"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.4756 17.186C15.8983 17.186 13.4476 18.158 11.5689 19.9207C11.0329 20.426 11.0049 21.27 11.5103 21.806C12.0143 22.3434 12.8609 22.3687 13.3943 21.8647C14.7769 20.5674 16.5796 19.8527 18.4756 19.8527C20.3809 19.8527 22.1903 20.5674 23.5703 21.8647C23.8276 22.106 24.1556 22.226 24.4836 22.226C24.8369 22.226 25.1916 22.086 25.4543 21.806C25.9583 21.27 25.9329 20.426 25.3956 19.922C23.5209 18.158 21.0623 17.186 18.4756 17.186Z",fill:"#E71111"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.8131 12.6529C19.8131 11.9169 19.2171 11.3196 18.4798 11.3196C14.3958 11.3196 10.5211 12.8502 7.57046 15.6288C7.03446 16.1342 7.00913 16.9782 7.51446 17.5142C7.77713 17.7915 8.13046 17.9328 8.48513 17.9328C8.81313 17.9328 9.14113 17.8128 9.39846 17.5702C11.8518 15.2595 15.0771 13.9862 18.4798 13.9862C19.2171 13.9862 19.8131 13.3888 19.8131 12.6529Z",fill:"#E71111"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.8116 6.89315C19.8116 6.15715 19.2156 5.55981 18.4783 5.55981C12.9595 5.55981 7.6942 7.62781 3.6502 11.3825C3.11153 11.8838 3.07953 12.7265 3.58087 13.2665C3.8422 13.5491 4.19953 13.6931 4.5582 13.6931C4.88353 13.6931 5.20887 13.5745 5.46487 13.3371C9.01287 10.0411 13.6342 8.22648 18.4783 8.22648C19.2156 8.22648 19.8116 7.62915 19.8116 6.89315Z",fill:"#E71111"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27.8117 11.3463L29.4983 9.66364C30.0197 9.14364 30.0197 8.29964 29.4997 7.77831C28.9797 7.25564 28.1357 7.25697 27.6143 7.77564L25.9237 9.46231L24.233 7.77564C23.713 7.25697 22.869 7.25697 22.3477 7.77831C21.829 8.29964 21.829 9.14364 22.3503 9.66364L24.037 11.3463L22.3503 13.029C21.829 13.549 21.829 14.393 22.3477 14.9143C22.609 15.1757 22.9503 15.3063 23.2917 15.3063C23.633 15.3063 23.973 15.177 24.233 14.917L25.9237 13.229L27.6143 14.917C27.8757 15.177 28.2157 15.3063 28.5557 15.3063C28.897 15.3063 29.2397 15.1757 29.4997 14.9143C30.0197 14.393 30.0197 13.549 29.4983 13.029L27.8117 11.3463Z",fill:"#E71111"})]}),StyledErrorOverlay=dt.div`
|
|
2980
|
+
`,SecondFactor=({transactionId:Be,onSuccess:Le})=>{const[Ye,tt]=React.useState(""),[nt,ft]=React.useState(""),[ht,gt]=React.useState(!1),{t:At}=useTranslation$1();async function xt(){try{gt(!0);const Et=await sendMfa({transactionId:Be,verificationCode:Ye});Le(Et)}catch{gt(!1),ft("incorrect")}}return jsxRuntimeExports.jsxs(SecondFactorContainer,{className:"IncodeSecondFactorContainer",children:[jsxRuntimeExports.jsxs(DivWithMargin,{className:"IncodeSecondFactorDivWithMargin",children:[jsxRuntimeExports.jsx("h1",{children:At("secondFactor.title")}),jsxRuntimeExports.jsx("p",{children:At("secondFactor.instruction")})]}),jsxRuntimeExports.jsxs(DivWithMargin,{children:[jsxRuntimeExports.jsx(StyledInput$1,{className:"IncodeSecondFactorInput",type:"tel",autoComplete:"off",value:Ye,onChange:Et=>{tt(Et.target.value),ft("")}}),nt&&jsxRuntimeExports.jsx(ErrorMessage$5,{error:nt})]}),jsxRuntimeExports.jsx(Button$c,{disabled:ht,onClick:xt,className:"IncodeSecondFactorButton",children:At("common.continue")})]})};async function identify({base64Image:Be,faceCoordinates:Le,authReference:Ye,videoRecordingId:tt,videoRecordingToken:nt}){return exports.api.post("/omni/oneToN/identify?returnIPDeviceLocation=true",{authReference:Ye,selfie:{base64Image:await MlWasmJSApi$1.ens(Be),faceCoordinates:Le,clientInfo:{deviceClass:getDeviceClass()}},videoRecordingId:tt,videoRecordingToken:nt}).then(ft=>ft.data).catch(ft=>{var ht;return Promise.reject((ht=ft==null?void 0:ft.response)==null?void 0:ht.data)})}async function identifyInstantVerify({token:Be,base64Image:Le,faceCoordinates:Ye}){return exports.api.post("/omni/instant/verify/face",{base64Image:await MlWasmJSApi$1.ens(Le),faceCoordinates:Ye,clientInfo:{deviceClass:getDeviceClass()}},{headers:{"X-Incode-Hardware-Id":Be}}).then(tt=>tt.data).catch(tt=>{var nt;return Promise.reject((nt=tt==null?void 0:tt.response)==null?void 0:nt.data)})}async function oneToOneIdentify({base64Image:Be,phone:Le,email:Ye,authReference:tt,uuid:nt,nationalNumber:ft,videoRecordingId:ht,videoRecordingToken:gt}){return exports.api.post("omni/1to1/identify?returnIPDeviceLocation=true",{phone:Le,email:Ye,authReference:tt,uuid:nt,nationalNumber:ft,videoRecordingId:ht,videoRecordingToken:gt,selfie:{base64Image:await MlWasmJSApi$1.ens(Be),clientInfo:{deviceClass:getDeviceClass()}}}).then(At=>At.data).catch(At=>{var xt;return Promise.reject((xt=At==null?void 0:At.response)==null?void 0:xt.data)})}const getCircleText$2=(Be,Le)=>({uploading:Be("notifications.uploading"),success:Be("notifications.done"),error:Le});function Login({onError:Be,onSuccess:Le,onCapture:Ye,timeout:tt=4e4,stopAtError:nt=!1,stopAtAccessDenied:ft=!1,isOneToOne:ht=!1,oneToOneProps:gt,accessDeniedNotificationText:At,token:xt,isInstantVerify:Et=!1,showCustomCameraPermissionScreen:yt=!1,isKiosk:Ct=!1,recordingsToken:kt,hatCheckEnabled:vt,lensesCheckEnabled:bt,maskCheckEnabled:It,eyesClosedCheckEnabled:wt}){const[Rt,Tt]=React.useState("selfie"),[Bt,Dt]=React.useState(""),[Pt,Nt]=React.useState(""),Lt=React.useRef(null),Wt=React.useRef(!1),$t=React.useRef(null),Kt=React.useCallback(x0=>{$t.current=x0},[]),{startRecording:Vt,stopRecording:Ut}=useAuthenticationRecorder({token:kt,type:"selfie",setVideoRecordingId:Kt}),_t=async x0=>{var p0;if(nt){Be(x0);return}a0(x0||e0("notifications.serverError")),i0("error"),await sleep(3e3),f0({response:(p0=x0==null?void 0:x0.response)==null?void 0:p0.data,livenessPassed:null,imageBase64:Pt}),d0()},Xt=async x0=>{const p0=x0.spoofAttempt===!1,D0=!!x0.customerId&&!x0.error,P0=x0.secondFactor,z0=bt?x0.hasLenses:!1,J0=It?x0.hasFaceMask:!1;if(console.log({response:x0}),P0){Tt("secondFactor"),Dt(x0.transactionId),Nt(Pt);return}if(!p0||!D0||J0||z0){if(nt){const X0={status:x0==null?void 0:x0.error.status,message:x0==null?void 0:x0.error.error};Be(X0??"error");return}if(i0("error"),u0((()=>{switch(!0){case J0:return e0("notifications.faceMask");case z0:return e0("notifications.lenses");case!p0:return e0("notifications.spoof");case!D0:return At??e0("selfie.accessDenied");default:return""}})()),await sleep(3e3),p0&&!D0&&ft){const X0=new Error("AccessDenied");Be(X0);return}f0({response:x0,livenessPassed:p0,imageBase64:Pt}),d0();return}zt(x0,Pt)},Qt=async(x0,p0)=>{await identifyInstantVerify({token:xt,base64Image:x0,faceCoordinates:p0}).then(Xt).catch(_t)},jt=async(x0,p0)=>{await identify({base64Image:x0,faceCoordinates:p0,authReference:gt==null?void 0:gt.authReference,videoRecordingId:$t.current,videoRecordingToken:kt}).then(Xt).catch(_t)},Gt=async(x0,p0)=>{await oneToOneIdentify({base64Image:x0,phone:gt==null?void 0:gt.phone,email:gt==null?void 0:gt.email,authReference:gt==null?void 0:gt.authReference,uuid:gt==null?void 0:gt.identityId,nationalNumber:gt==null?void 0:gt.nationalNumber,videoRecordingId:$t.current,videoRecordingToken:kt}).then(Xt).catch(_t)},qt=throttle$2(async(x0,p0)=>{MlWasmJSApi$1.reset();const D0=x0.getBase64Image();Ye&&typeof Ye=="function"?Ye(await MlWasmJSApi$1.ens(D0),p0):Et?Qt(D0,p0):ht?Gt(D0):jt(D0,p0)},300);async function zt(x0,p0){Le({...x0,token:x0.token,base64Image:p0||Pt})}const{t:e0}=useTranslation$1(),{showManualCapture:s0,mode:t0,notificationMessage:l0,startAutoDetect:d0,cameraReady:n0,handleManualCapture:g0,isSuccess:A0,isError:o0,isLoading:r0,hideCamera:Yt,showBorders:Mt,shouldShowManualCapture:Jt,handleError:a0,setMode:i0,resetLoading:f0,setNotificationMessage:u0}=useSelfie({timeout:tt,isDetecting:Wt,handleCapture:qt,numberOfTries:-1,webcam:Lt,lensesCheckEnabled:bt,hatCheckEnabled:vt,maskCheckEnabled:It,eyesClosedCheckEnabled:wt});return React.useEffect(()=>()=>{kt&&Ut()},[]),Rt==="secondFactor"?jsxRuntimeExports.jsx(SecondFactor,{transactionId:Bt,onSuccess:zt}):jsxRuntimeExports.jsxs(Container$n,{className:cx("IncodeLoginContainer",{kiosk:Ct}),children:[Jt&&jsxRuntimeExports.jsxs(CaptureButtonContainer$1,{className:cx("IncodeLoginCaptureButtonContainer",{kiosk:Ct}),initial:{scale:0},animate:{scale:1},children:[jsxRuntimeExports.jsx("p",{children:e0("common.takePhoto")}),jsxRuntimeExports.jsx("button",{onClick:g0,type:"button",children:jsxRuntimeExports.jsx("img",{src:captureButton,alt:"capture button"})})]}),jsxRuntimeExports.jsxs(WebcamContainer$1,{className:cx("IncodeLoginWebcamContainer",{kiosk:Ct}),children:[(r0||A0)&&jsxRuntimeExports.jsx(BordersContainer,{className:cx("IncodeLoginBordersContainer",{kiosk:Ct}),children:jsxRuntimeExports.jsx(LoadingBorders,{className:"IncodeLoginLoadingBorders",mode:t0})}),jsxRuntimeExports.jsx(Hidder,{className:"IncodeLoginHidder",initial:{width:50,height:50},animate:{width:n0?300:50,height:n0?300:50},children:jsxRuntimeExports.jsx(CameraOvalOuter,{className:cx("IncodeLoginCameraOvalOuter",{"no-borders":r0||A0,"has-error":o0,kiosk:Ct}),initial:{borderWidth:"0px"},transition:{delay:0,ease:"linear"},animate:{borderWidth:Mt?"6px":"0px",borderColor:o0?"#ff5c6f":"#21273b"},children:jsxRuntimeExports.jsxs(CameraOvalInner,{className:cx("IncodeLoginCameraOvalInner",{isUploading:Yt}),children:[jsxRuntimeExports.jsx(FaceFrame$1,{src:faceFrame$1,alt:"face frame",className:cx("IncodeLoginFaceFrame",{hidden:Yt})}),jsxRuntimeExports.jsx(Webcam,{ref:Lt,videoSource:"user",onPlay:()=>{},isSelfie:!0,type:"login",className:cx("video__selfie IncodeLoginWebcam",{hidden:Yt,kiosk:Ct}),onError:Be,showCustomCameraPermissionScreen:yt,isKiosk:Ct,onStreamReady:async x0=>{kt?await Vt(x0):emptyFunc()}}),Yt&&jsxRuntimeExports.jsx(CameraOvalInnerText,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeLoginCameraOvalInnerText",{isError:o0}),children:getCircleText$2(e0,l0)[t0]})]})})})]}),!Yt&&jsxRuntimeExports.jsx(NotificationInline,{"aria-live":"assertive",initial:{scale:0},animate:{scale:n0?1:0},className:cx("IncodeLoginNotificationInline",{hasManualCapture:s0}),children:l0||jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[e0("notifications.selfie.one")," ",jsxRuntimeExports.jsx("br",{}),e0("notifications.selfie.two")]})}),jsxRuntimeExports.jsx("canvas",{id:"canvasFrame",hidden:!0})]})}var dist$1={},OTSession$3={},createSession$5={};Object.defineProperty(createSession$5,"__esModule",{value:!0}),createSession$5.default=createSession$4;function createSession$4(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Le=Be.apiKey,Ye=Be.sessionId,tt=Be.token,nt=Be.onStreamsUpdated,ft=Be.onConnect,ht=Be.onError,gt=Be.options;if(!Le)throw new Error("Missing apiKey");if(!Ye)throw new Error("Missing sessionId");if(!tt)throw new Error("Missing token");var At=[],xt=function(vt){var bt=At.findIndex(function(It){return It.id===vt.stream.id});bt<0&&(At.push(vt.stream),nt(At))},Et=function(vt){var bt=At.findIndex(function(It){return It.id===vt.stream.id});bt>=0&&(At.splice(bt,1),nt(At))},yt={streamCreated:xt,streamDestroyed:Et},Ct=OT.initSession(Le,Ye,gt);return Ct.on(yt),Ct.connect(tt,function(kt){Ct&&(kt&&typeof ht=="function"?ht(kt):!kt&&typeof ft=="function"&&ft())}),{session:Ct,streams:At,disconnect:function(){Ct&&(Ct.off(yt),Ct.disconnect()),At=null,xt=null,Et=null,yt=null,Ct=null,this.session=null,this.streams=null}}}Object.defineProperty(OTSession$3,"__esModule",{value:!0});var _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Be){return typeof Be}:function(Be){return Be&&typeof Symbol=="function"&&Be.constructor===Symbol&&Be!==Symbol.prototype?"symbol":typeof Be},_createClass$9=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}(),_react$d=React,_react2$d=_interopRequireDefault$f(_react$d),_propTypes$d=propTypesExports,_propTypes2$d=_interopRequireDefault$f(_propTypes$d),_createSession2$3=createSession$5,_createSession3$1=_interopRequireDefault$f(_createSession2$3);function _interopRequireDefault$f(Be){return Be&&Be.__esModule?Be:{default:Be}}function _classCallCheck$9(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$9(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$9(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var OTSession$2=function(Be){_inherits$9(Le,Be);function Le(Ye){_classCallCheck$9(this,Le);var tt=_possibleConstructorReturn$9(this,(Le.__proto__||Object.getPrototypeOf(Le)).call(this,Ye));return tt.state={streams:[]},tt}return _createClass$9(Le,[{key:"getChildContext",value:function(){return{session:this.sessionHelper.session,streams:this.state.streams}}},{key:"componentWillMount",value:function(){this.createSession()}},{key:"componentDidUpdate",value:function(tt){(tt.apiKey!==this.props.apiKey||tt.sessionId!==this.props.sessionId||tt.token!==this.props.token)&&this.createSession()}},{key:"componentWillUnmount",value:function(){this.destroySession()}},{key:"createSession",value:function(){var tt=this;this.destroySession(),this.sessionHelper=(0,_createSession3$1.default)({apiKey:this.props.apiKey,sessionId:this.props.sessionId,token:this.props.token,onStreamsUpdated:function(ht){tt.setState({streams:ht})},onConnect:this.props.onConnect,onError:this.props.onError,options:this.props.options}),this.props.eventHandlers&&_typeof$5(this.props.eventHandlers)==="object"&&this.sessionHelper.session.on(this.props.eventHandlers);var nt=this.sessionHelper.streams;this.setState({streams:nt})}},{key:"destroySession",value:function(){this.sessionHelper&&(this.props.eventHandlers&&_typeof$5(this.props.eventHandlers)==="object"&&this.sessionHelper.session.off(this.props.eventHandlers),this.sessionHelper.disconnect())}},{key:"render",value:function(){var tt=this.props.children,nt=typeof tt=="function";return _react2$d.default.createElement(_react$d.Fragment,null,nt?tt(this.sessionHelper):this.props.children)}}]),Le}(_react$d.Component);OTSession$3.default=OTSession$2,OTSession$2.propTypes={children:_propTypes2$d.default.oneOfType([_propTypes2$d.default.element,_propTypes2$d.default.arrayOf(_propTypes2$d.default.element),_propTypes2$d.default.func]).isRequired,apiKey:_propTypes2$d.default.string.isRequired,sessionId:_propTypes2$d.default.string.isRequired,token:_propTypes2$d.default.string.isRequired,eventHandlers:_propTypes2$d.default.objectOf(_propTypes2$d.default.func),onConnect:_propTypes2$d.default.func,onError:_propTypes2$d.default.func,options:_propTypes2$d.default.object},OTSession$2.defaultProps={eventHandlers:null,onConnect:null,onError:null,options:{}},OTSession$2.childContextTypes={streams:_propTypes2$d.default.arrayOf(_propTypes2$d.default.object),session:_propTypes2$d.default.shape({subscribe:_propTypes2$d.default.func,unsubscribe:_propTypes2$d.default.func})};var OTPublisher$3={};Object.defineProperty(OTPublisher$3,"__esModule",{value:!0});var _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Be){return typeof Be}:function(Be){return Be&&typeof Symbol=="function"&&Be.constructor===Symbol&&Be!==Symbol.prototype?"symbol":typeof Be},_createClass$8=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}(),_react$c=React,_react2$c=_interopRequireDefault$e(_react$c),_propTypes$c=propTypesExports,_propTypes2$c=_interopRequireDefault$e(_propTypes$c),_once$1=once_1,_once2$1=_interopRequireDefault$e(_once$1),_fp$1=fp,_uuid$3=uuid_1$2,_uuid2$3=_interopRequireDefault$e(_uuid$3);function _interopRequireDefault$e(Be){return Be&&Be.__esModule?Be:{default:Be}}function _classCallCheck$8(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$8(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$8(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var OTPublisher$2=function(Be){_inherits$8(Le,Be);function Le(Ye,tt){_classCallCheck$8(this,Le);var nt=_possibleConstructorReturn$8(this,(Le.__proto__||Object.getPrototypeOf(Le)).call(this,Ye));return nt.sessionConnectedHandler=function(){nt.publishToSession(nt.state.publisher)},nt.streamCreatedHandler=function(ft){nt.setState({lastStreamId:ft.stream.id})},nt.state={publisher:null,lastStreamId:"",session:Ye.session||tt.session||null},nt}return _createClass$8(Le,[{key:"componentDidMount",value:function(){this.createPublisher()}},{key:"componentDidUpdate",value:function(tt,nt){var ft=this,ht=function(Et,yt){return Et===void 0?yt:Et},gt=function(Et,yt){var Ct=ht(tt.properties[Et],yt),kt=ht(ft.props.properties[Et],yt);return Ct!==kt},At=function(Et,yt){if(gt(Et,yt)){var Ct=ht(ft.props.properties[Et],yt);ft.state.publisher[Et](Ct)}};if(gt("videoSource",void 0)){this.destroyPublisher(),this.createPublisher();return}At("publishAudio",!0),At("publishVideo",!0),this.state.session!==nt.session&&(this.destroyPublisher(nt.session),this.createPublisher())}},{key:"componentWillUnmount",value:function(){this.state.session&&this.state.session.off("sessionConnected",this.sessionConnectedHandler),this.destroyPublisher()}},{key:"getPublisher",value:function(){return this.state.publisher}},{key:"destroyPublisher",value:function(){var tt=this,nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.state.session;delete this.publisherId,this.state.publisher&&(this.state.publisher.off("streamCreated",this.streamCreatedHandler),this.props.eventHandlers&&_typeof$4(this.props.eventHandlers)==="object"&&this.state.publisher.once("destroyed",function(){tt.state.publisher.off(tt.props.eventHandlers)}),nt&&nt.unpublish(this.state.publisher),this.state.publisher.destroy())}},{key:"publishToSession",value:function(tt){var nt=this,ft=this.publisherId;this.state.session.publish(tt,function(ht){ft===nt.publisherId&&(ht?nt.errorHandler(ht):typeof nt.props.onPublish=="function"&&nt.props.onPublish())})}},{key:"createPublisher",value:function(){var tt=this;if(!this.state.session){this.setState({publisher:null,lastStreamId:""});return}var nt=this.props.properties||{},ft=void 0;nt.insertDefaultUI!==!1&&(ft=document.createElement("div"),ft.setAttribute("class","OTPublisherContainer"),this.node.appendChild(ft)),this.publisherId=(0,_uuid2$3.default)();var ht=this.publisherId;this.errorHandler=(0,_once2$1.default)(function(xt){ht===tt.publisherId&&typeof tt.props.onError=="function"&&tt.props.onError(xt)});var gt=OT.initPublisher(ft,nt,function(xt){ht===tt.publisherId&&(xt?tt.errorHandler(xt):typeof tt.props.onInit=="function"&&tt.props.onInit())});if(gt.on("streamCreated",this.streamCreatedHandler),this.props.eventHandlers&&_typeof$4(this.props.eventHandlers)==="object"){var At=(0,_fp$1.omitBy)(_fp$1.isNil)(this.props.eventHandlers);gt.on(At)}this.state.session.connection?this.publishToSession(gt):this.state.session.once("sessionConnected",this.sessionConnectedHandler),this.setState({publisher:gt,lastStreamId:""})}},{key:"render",value:function(){var tt=this,nt=this.props,ft=nt.className,ht=nt.style;return _react2$c.default.createElement("div",{className:ft,style:ht,ref:function(At){tt.node=At}})}}]),Le}(_react$c.Component);OTPublisher$3.default=OTPublisher$2,OTPublisher$2.propTypes={session:_propTypes2$c.default.shape({connection:_propTypes2$c.default.shape({connectionId:_propTypes2$c.default.string}),once:_propTypes2$c.default.func,off:_propTypes2$c.default.func,publish:_propTypes2$c.default.func,unpublish:_propTypes2$c.default.func}),className:_propTypes2$c.default.string,style:_propTypes2$c.default.object,properties:_propTypes2$c.default.object,eventHandlers:_propTypes2$c.default.objectOf(_propTypes2$c.default.func),onInit:_propTypes2$c.default.func,onPublish:_propTypes2$c.default.func,onError:_propTypes2$c.default.func},OTPublisher$2.defaultProps={session:null,className:"",style:{},properties:{},eventHandlers:null,onInit:null,onPublish:null,onError:null},OTPublisher$2.contextTypes={session:_propTypes2$c.default.shape({connection:_propTypes2$c.default.shape({connectionId:_propTypes2$c.default.string}),once:_propTypes2$c.default.func,off:_propTypes2$c.default.func,publish:_propTypes2$c.default.func,unpublish:_propTypes2$c.default.func})};var OTStreams$3={},OTSubscriberContext$3={};Object.defineProperty(OTSubscriberContext$3,"__esModule",{value:!0});var _createClass$7=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}(),_react$b=React,_react2$b=_interopRequireDefault$d(_react$b),_propTypes$b=propTypesExports,_propTypes2$b=_interopRequireDefault$d(_propTypes$b);function _interopRequireDefault$d(Be){return Be&&Be.__esModule?Be:{default:Be}}function _classCallCheck$7(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$7(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$7(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var OTSubscriberContext$2=function(Be){_inherits$7(Le,Be);function Le(){return _classCallCheck$7(this,Le),_possibleConstructorReturn$7(this,(Le.__proto__||Object.getPrototypeOf(Le)).apply(this,arguments))}return _createClass$7(Le,[{key:"getChildContext",value:function(){return{stream:this.props.stream}}},{key:"render",value:function(){return _react2$b.default.createElement(_react$b.Fragment,null,this.props.children)}}]),Le}(_react$b.Component);OTSubscriberContext$3.default=OTSubscriberContext$2,OTSubscriberContext$2.propTypes={children:_propTypes2$b.default.element.isRequired,stream:_propTypes2$b.default.shape({streamId:_propTypes2$b.default.string}).isRequired},OTSubscriberContext$2.childContextTypes={stream:_propTypes2$b.default.shape({streamId:_propTypes2$b.default.string})},Object.defineProperty(OTStreams$3,"__esModule",{value:!0}),OTStreams$3.default=OTStreams$2;var _react$a=React,_react2$a=_interopRequireDefault$c(_react$a),_propTypes$a=propTypesExports,_propTypes2$a=_interopRequireDefault$c(_propTypes$a),_OTSubscriberContext$1=OTSubscriberContext$3,_OTSubscriberContext2$1=_interopRequireDefault$c(_OTSubscriberContext$1);function _interopRequireDefault$c(Be){return Be&&Be.__esModule?Be:{default:Be}}function OTStreams$2(Be,Le){var Ye=Be.session||Le.session||null,tt=Be.streams||Le.streams||null;if(!Ye)return null;var nt=_react$a.Children.only(Be.children);console.log(Be.loading,"uwu");var ft=Array.isArray(tt)&&tt.length>0?tt.map(function(ht){return _react2$a.default.createElement(_OTSubscriberContext2$1.default,{stream:ht,key:ht.id},(0,_react$a.cloneElement)(nt))}):Be.loading;return _react2$a.default.createElement(_react$a.Fragment,null,ft)}OTStreams$2.propTypes={children:_propTypes2$a.default.element.isRequired,session:_propTypes2$a.default.shape({publish:_propTypes2$a.default.func,subscribe:_propTypes2$a.default.func}),streams:_propTypes2$a.default.arrayOf(_propTypes2$a.default.object)},OTStreams$2.defaultProps={session:null,streams:null,loading:null},OTStreams$2.contextTypes={session:_propTypes2$a.default.shape({publish:_propTypes2$a.default.func,subscribe:_propTypes2$a.default.func}),streams:_propTypes2$a.default.arrayOf(_propTypes2$a.default.object),loading:_propTypes2$a.default.element};var OTSubscriber$3={};Object.defineProperty(OTSubscriber$3,"__esModule",{value:!0});var _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Be){return typeof Be}:function(Be){return Be&&typeof Symbol=="function"&&Be.constructor===Symbol&&Be!==Symbol.prototype?"symbol":typeof Be},_createClass$6=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}(),_react$9=React,_react2$9=_interopRequireDefault$b(_react$9),_propTypes$9=propTypesExports,_propTypes2$9=_interopRequireDefault$b(_propTypes$9),_uuid$2=uuid_1$2,_uuid2$2=_interopRequireDefault$b(_uuid$2);function _interopRequireDefault$b(Be){return Be&&Be.__esModule?Be:{default:Be}}function _classCallCheck$6(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$6(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$6(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var OTSubscriber$2=function(Be){_inherits$6(Le,Be);function Le(Ye,tt){_classCallCheck$6(this,Le);var nt=_possibleConstructorReturn$6(this,(Le.__proto__||Object.getPrototypeOf(Le)).call(this,Ye));return nt.state={subscriber:null,stream:Ye.stream||tt.stream||null,session:Ye.session||tt.session||null,currentRetryAttempt:0},nt.maxRetryAttempts=Ye.maxRetryAttempts||5,nt.retryAttemptTimeout=Ye.retryAttemptTimeout||1e3,nt}return _createClass$6(Le,[{key:"componentDidMount",value:function(){this.createSubscriber()}},{key:"componentDidUpdate",value:function(tt,nt){var ft=this,ht=function(xt,Et,yt){return xt===void 0?yt:Et(xt)},gt=function(xt){var Et=ht(tt.properties[xt],Boolean,!0),yt=ht(ft.props.properties[xt],Boolean,!0);Et!==yt&&ft.state.subscriber[xt](yt)};gt("subscribeToAudio"),gt("subscribeToVideo"),(nt.session!==this.state.session||nt.stream!==this.state.stream)&&(this.destroySubscriber(nt.session),this.createSubscriber())}},{key:"componentWillUnmount",value:function(){this.destroySubscriber()}},{key:"getSubscriber",value:function(){return this.state.subscriber}},{key:"createSubscriber",value:function(){var tt=this;if(!this.state.session||!this.state.stream){this.setState({subscriber:null});return}var nt=this.props.properties||{},ft=void 0;nt.insertDefaultUI!==!1&&(ft=document.createElement("div"),ft.setAttribute("class","OTSubscriberContainer"),this.node.appendChild(ft)),this.subscriberId=(0,_uuid2$2.default)();var ht=this.subscriberId,gt=this.state.session.subscribe(this.state.stream,ft,this.props.properties,function(At){ht===tt.subscriberId&&(At&&tt.props.retry&&tt.state.currentRetryAttempt<tt.maxRetryAttempts-1&&tt.handleRetrySubscriber(),At&&typeof tt.props.onError=="function"?tt.props.onError(At):!At&&typeof tt.props.onSubscribe=="function"&&tt.props.onSubscribe())});this.props.eventHandlers&&_typeof$3(this.props.eventHandlers)==="object"&>.on(this.props.eventHandlers),this.setState({subscriber:gt})}},{key:"handleRetrySubscriber",value:function(){var tt=this;setTimeout(function(){tt.setState(function(nt){return{currentRetryAttempt:nt.currentRetryAttempt+1,subscriber:null}}),tt.createSubscriber()},this.retryAttemptTimeout)}},{key:"destroySubscriber",value:function(){var tt=this,nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.session;delete this.subscriberId,this.state.subscriber&&(this.props.eventHandlers&&_typeof$3(this.props.eventHandlers)==="object"&&this.state.subscriber.once("destroyed",function(){tt.state.subscriber.off(tt.props.eventHandlers)}),nt&&nt.unsubscribe(this.state.subscriber))}},{key:"render",value:function(){var tt=this,nt=this.props,ft=nt.className,ht=nt.style;return _react2$9.default.createElement("div",{className:ft,style:ht,ref:function(At){tt.node=At}})}}]),Le}(_react$9.Component);OTSubscriber$3.default=OTSubscriber$2,OTSubscriber$2.propTypes={stream:_propTypes2$9.default.shape({streamId:_propTypes2$9.default.string}),session:_propTypes2$9.default.shape({subscribe:_propTypes2$9.default.func,unsubscribe:_propTypes2$9.default.func}),className:_propTypes2$9.default.string,style:_propTypes2$9.default.object,properties:_propTypes2$9.default.object,retry:_propTypes2$9.default.bool,maxRetryAttempts:_propTypes2$9.default.number,retryAttemptTimeout:_propTypes2$9.default.number,eventHandlers:_propTypes2$9.default.objectOf(_propTypes2$9.default.func),onSubscribe:_propTypes2$9.default.func,onError:_propTypes2$9.default.func},OTSubscriber$2.defaultProps={stream:null,session:null,className:"",style:{},properties:{},retry:!1,maxRetryAttempts:5,retryAttemptTimeout:1e3,eventHandlers:null,onSubscribe:null,onError:null},OTSubscriber$2.contextTypes={stream:_propTypes2$9.default.shape({streamId:_propTypes2$9.default.string}),session:_propTypes2$9.default.shape({subscribe:_propTypes2$9.default.func,unsubscribe:_propTypes2$9.default.func})};var preloadScript$5={};Object.defineProperty(preloadScript$5,"__esModule",{value:!0});var _createClass$5=function(){function Be(Le,Ye){for(var tt=0;tt<Ye.length;tt++){var nt=Ye[tt];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(Le,nt.key,nt)}}return function(Le,Ye,tt){return Ye&&Be(Le.prototype,Ye),tt&&Be(Le,tt),Le}}();preloadScript$5.default=preloadScript$4;var _react$8=React,_react2$8=_interopRequireDefault$a(_react$8),_propTypes$8=propTypesExports,_propTypes2$8=_interopRequireDefault$a(_propTypes$8),_reactDisplayName$1=getDisplayName$1,_reactDisplayName2$1=_interopRequireDefault$a(_reactDisplayName$1),_scriptjs$1=scriptExports,_scriptjs2$1=_interopRequireDefault$a(_scriptjs$1);function _interopRequireDefault$a(Be){return Be&&Be.__esModule?Be:{default:Be}}function _objectWithoutProperties$3(Be,Le){var Ye={};for(var tt in Be)Le.indexOf(tt)>=0||Object.prototype.hasOwnProperty.call(Be,tt)&&(Ye[tt]=Be[tt]);return Ye}function _classCallCheck$5(Be,Le){if(!(Be instanceof Le))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$5(Be,Le){if(!Be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Be}function _inherits$5(Be,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Be.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Be,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Be,Le):Be.__proto__=Le)}var DEFAULT_SCRIPT_URL$1="https://static.opentok.com/v2/js/opentok.min.js";function preloadScript$4(Be){var Le=function(Ye){_inherits$5(tt,Ye);function tt(nt){_classCallCheck$5(this,tt);var ft=_possibleConstructorReturn$5(this,(tt.__proto__||Object.getPrototypeOf(tt)).call(this,nt));return ft.onScriptLoad=function(){ft.isPresent&&ft.setState({scriptLoaded:!0})},ft.state={scriptLoaded:typeof OT<"u"},ft.isPresent=!1,ft}return _createClass$5(tt,[{key:"componentDidMount",value:function(){if(this.isPresent=!0,!(this.scriptLoading||this.state.scriptLoaded)){this.scriptLoading=!0;var ft=this.props.opentokClientUrl;(0,_scriptjs2$1.default)(ft,this.onScriptLoad)}}},{key:"componentWillUnmount",value:function(){this.isPresent=!1}},{key:"render",value:function(){var ft=this.props;ft.opentokClientUrl;var ht=ft.loadingDelegate,gt=_objectWithoutProperties$3(ft,["opentokClientUrl","loadingDelegate"]);return this.state.scriptLoaded?_react2$8.default.createElement(Be,gt):ht}}]),tt}(_react$8.Component);return Le.displayName="preloadScript("+(0,_reactDisplayName2$1.default)(Be)+")",Le.propTypes={opentokClientUrl:_propTypes2$8.default.string,loadingDelegate:_propTypes2$8.default.node},Le.defaultProps={opentokClientUrl:DEFAULT_SCRIPT_URL$1,loadingDelegate:_react2$8.default.createElement("div",null)},Le}Object.defineProperty(dist$1,"__esModule",{value:!0});var preloadScript$3=dist$1.preloadScript=dist$1.createSession=dist$1.OTSubscriber=dist$1.OTStreams=dist$1.OTPublisher=dist$1.OTSession=void 0,_OTSession$1=OTSession$3,_OTSession2$1=_interopRequireDefault$9(_OTSession$1),_OTPublisher$1=OTPublisher$3,_OTPublisher2$1=_interopRequireDefault$9(_OTPublisher$1),_OTStreams$1=OTStreams$3,_OTStreams2$1=_interopRequireDefault$9(_OTStreams$1),_OTSubscriber$1=OTSubscriber$3,_OTSubscriber2$1=_interopRequireDefault$9(_OTSubscriber$1),_createSession$1=createSession$5,_createSession2$2=_interopRequireDefault$9(_createSession$1),_preloadScript$1=preloadScript$5,_preloadScript2$1=_interopRequireDefault$9(_preloadScript$1);function _interopRequireDefault$9(Be){return Be&&Be.__esModule?Be:{default:Be}}dist$1.default={OTSession:_OTSession2$1.default,OTPublisher:_OTPublisher2$1.default,OTStreams:_OTStreams2$1.default,OTSubscriber:_OTSubscriber2$1.default,createSession:_createSession2$2.default,preloadScript:_preloadScript2$1.default},dist$1.OTSession=_OTSession2$1.default,dist$1.OTPublisher=_OTPublisher2$1.default,dist$1.OTStreams=_OTStreams2$1.default,dist$1.OTSubscriber=_OTSubscriber2$1.default,dist$1.createSession=_createSession2$2.default,preloadScript$3=dist$1.preloadScript=_preloadScript2$1.default;const isFeatureConfigEnabled=(Be,Le)=>{var Ye;return(Ye=Le==null?void 0:Le.find(tt=>tt.feature===Be))==null?void 0:Ye.enabled},getFeatureConfig=async({token:Be})=>(await exports.api.get("/omni/feature-config",{headers:{"X-Incode-Hardware-Id":Be}})).data,frontType="front",backType="back",selfieType="selfie",authFaceType="authFace",webMdlType="webMdl",frontIdUrl="/omni/add/front-id",secondFrontIdUrl="/omni/add/front-second-id",backIdUrl="/omni/add/back-id",secondBackIdUrl="/omni/add/back-second-id",frontIdBase64Url="/omni/add/front-id/v2",backIdBase64Url="/omni/add/back-id/v2",frontSecondIdBase64Url="/omni/add/front-second-id/v2",backSecondIdBase64Url="/omni/add/back-second-id/v2",selfieUrl="/omni/add/face",authFaceUrl="/omni/onboarding-authentications/authenticate",webMdlUrl="/omni/webmdl/decrypt",getRealQualityValue=Be=>(1-Be)*100;function uploadFrontId({token:Be,image:Le,onProgress:Ye=emptyFunc,sendBase64:tt,onlyFront:nt,isRetry:ft=!1,isSecondId:ht=!1,glare:gt,sharpness:At,captureType:xt=null,shouldAddGlare:Et=!1,metadata:yt}){const Ct=tt?ht?frontSecondIdBase64Url:frontIdBase64Url:ht?secondFrontIdUrl:frontIdUrl,kt=nt?`${Ct}?onlyFront=${nt}`:Ct,vt=tt?{base64Image:Le,metadata:yt}:Le,bt=tt?"application/json":"image/jpeg";return exports.api.post(kt,vt,{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":bt},onUploadProgress:({loaded:It,total:wt})=>Ye(It/wt*100),params:{...ft?{retry:!0}:void 0,...Et&>?{glare:getRealQualityValue(gt)}:void 0,...At?{sharpness:getRealQualityValue(At)}:void 0,captureType:xt}}).then(It=>It.data)}function uploadBackId({token:Be,image:Le,onProgress:Ye=emptyFunc,sendBase64:tt,isRetry:nt=!1,isSecondId:ft=!1,glare:ht,sharpness:gt,shouldSkipGlareBack:At=!1,captureType:xt=null,shouldAddGlare:Et=!1,metadata:yt}){const Ct=tt?ft?backSecondIdBase64Url:backIdBase64Url:ft?secondBackIdUrl:backIdUrl,kt=tt?{base64Image:Le,metadata:yt}:Le,vt=tt?"application/json":"image/jpeg";return exports.api.post(Ct,kt,{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":vt},onUploadProgress:({loaded:bt,total:It})=>Ye(bt/It*100),params:{...nt?{retry:!0}:void 0,...At?{glare:0}:Et&&ht?{glare:getRealQualityValue(ht)}:void 0,...gt?{sharpness:getRealQualityValue(gt)}:void 0,captureType:xt}}).then(bt=>bt.data)}function uploadSelfie({token:Be,image:Le,onProgress:Ye=emptyFunc,encrypted:tt,imageType:nt="selfie",faceCoordinates:ft=null,recordingId:ht,metadata:gt}){return exports.api.post(selfieUrl,{base64Image:Le,encrypted:tt,faceCoordinates:ft,clientInfo:{deviceClass:getDeviceClass()},metadata:gt},{headers:{"X-Incode-Hardware-Id":Be},onUploadProgress:({loaded:At,total:xt})=>Ye(At/xt*100),params:{recordingId:ht,imageType:nt}}).then(At=>At.data)}function uploadAuthSelfie({token:Be,image:Le,authHint:Ye,onProgress:tt=emptyFunc,faceCoordinates:nt=null,recordingId:ft,metadata:ht}){return exports.api.post(authFaceUrl,{base64Image:Le,faceCoordinates:nt,clientInfo:{deviceClass:getDeviceClass()},metadata:ht,hint:Ye,recordingId:ft},{headers:{"X-Incode-Hardware-Id":Be},onUploadProgress:({loaded:gt,total:At})=>tt(gt/At*100)}).then(gt=>gt.data)}function uploadMobileWalletId({token:Be,mdlData:Le,onProgress:Ye=emptyFunc}){var tt;return exports.api.post(webMdlUrl,{deviceResponse:(tt=Le.data)==null?void 0:tt.response},{headers:{"X-Incode-Hardware-Id":Be},onUploadProgress:({loaded:nt,total:ft})=>Ye(nt/ft*100)}).then(nt=>nt.data)}async function capture({type:Be,...Le}){var nt;const tt=((nt=(await getFeatureConfig({token:Le.token})).features)==null?void 0:nt.some(ft=>ft.feature==="USE_CLIENT_GLARE"&&ft.enabled))||!1;if(Be===frontType)return uploadFrontId({...Le,shouldAddGlare:tt});if(Be===backType)return uploadBackId({...Le,shouldAddGlare:tt});if(Be===selfieType)return uploadSelfie({...Le});if(Be===authFaceType)return uploadAuthSelfie({...Le,authHint:Le.authHint});if(Be===webMdlType)return uploadMobileWalletId({...Le});throw new Error(`type not supported, please use one of this: [${frontType}, ${backType}, ${selfieType}, ${authFaceType}, ${webMdlType}]`)}const useOnlineStatus=({onOffline:Be,onOnline:Le}={})=>{const[Ye,tt]=React.useState(!0);return React.useEffect(()=>{const nt=()=>{tt(!1),Be==null||Be()},ft=()=>{tt(!0),Le==null||Le()};return window.addEventListener("offline",nt),window.addEventListener("online",ft),()=>{window.removeEventListener("offline",nt),window.removeEventListener("online",ft)}},[Be,Le]),{isOnline:Ye}};function processFace({token:Be,imageType:Le="selfie"}){return exports.api.post("/omni/process/face",{},{headers:{"X-Incode-Hardware-Id":Be},params:{imageType:Le}}).then(Ye=>Ye.data).catch(Ye=>Promise.reject(Ye.response.data))}function processFaceSecondId({token:Be,imageType:Le="selfie"}){return exports.api.post(`/omni/process/face-vs-second-id?imageType=${Le}`,{},{headers:{"X-Incode-Hardware-Id":Be}}).then(Ye=>Ye.data).catch(Ye=>Promise.reject(Ye.response.data))}const NoInternetIcon=({className:Be})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",className:Be,"aria-label":"No internet connection icon",children:[jsxRuntimeExports.jsx("title",{children:"No internet icon"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.4777 24.1401C14.9444 24.6481 14.9231 25.4921 15.4311 26.0254C15.9391 26.5588 16.7831 26.5801 17.3164 26.0721C17.9391 25.4801 19.0071 25.4801 19.6297 26.0721C19.8884 26.3174 20.2191 26.4401 20.5497 26.4401C20.9004 26.4401 21.2537 26.3014 21.5151 26.0254C22.0231 25.4921 22.0031 24.6481 21.4684 24.1401C19.8484 22.6014 17.0977 22.6014 15.4777 24.1401Z",fill:"#E71111"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.4756 17.186C15.8983 17.186 13.4476 18.158 11.5689 19.9207C11.0329 20.426 11.0049 21.27 11.5103 21.806C12.0143 22.3434 12.8609 22.3687 13.3943 21.8647C14.7769 20.5674 16.5796 19.8527 18.4756 19.8527C20.3809 19.8527 22.1903 20.5674 23.5703 21.8647C23.8276 22.106 24.1556 22.226 24.4836 22.226C24.8369 22.226 25.1916 22.086 25.4543 21.806C25.9583 21.27 25.9329 20.426 25.3956 19.922C23.5209 18.158 21.0623 17.186 18.4756 17.186Z",fill:"#E71111"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.8131 12.6529C19.8131 11.9169 19.2171 11.3196 18.4798 11.3196C14.3958 11.3196 10.5211 12.8502 7.57046 15.6288C7.03446 16.1342 7.00913 16.9782 7.51446 17.5142C7.77713 17.7915 8.13046 17.9328 8.48513 17.9328C8.81313 17.9328 9.14113 17.8128 9.39846 17.5702C11.8518 15.2595 15.0771 13.9862 18.4798 13.9862C19.2171 13.9862 19.8131 13.3888 19.8131 12.6529Z",fill:"#E71111"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.8116 6.89315C19.8116 6.15715 19.2156 5.55981 18.4783 5.55981C12.9595 5.55981 7.6942 7.62781 3.6502 11.3825C3.11153 11.8838 3.07953 12.7265 3.58087 13.2665C3.8422 13.5491 4.19953 13.6931 4.5582 13.6931C4.88353 13.6931 5.20887 13.5745 5.46487 13.3371C9.01287 10.0411 13.6342 8.22648 18.4783 8.22648C19.2156 8.22648 19.8116 7.62915 19.8116 6.89315Z",fill:"#E71111"}),jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27.8117 11.3463L29.4983 9.66364C30.0197 9.14364 30.0197 8.29964 29.4997 7.77831C28.9797 7.25564 28.1357 7.25697 27.6143 7.77564L25.9237 9.46231L24.233 7.77564C23.713 7.25697 22.869 7.25697 22.3477 7.77831C21.829 8.29964 21.829 9.14364 22.3503 9.66364L24.037 11.3463L22.3503 13.029C21.829 13.549 21.829 14.393 22.3477 14.9143C22.609 15.1757 22.9503 15.3063 23.2917 15.3063C23.633 15.3063 23.973 15.177 24.233 14.917L25.9237 13.229L27.6143 14.917C27.8757 15.177 28.2157 15.3063 28.5557 15.3063C28.897 15.3063 29.2397 15.1757 29.4997 14.9143C30.0197 14.393 30.0197 13.549 29.4983 13.029L27.8117 11.3463Z",fill:"#E71111"})]}),StyledErrorOverlay=dt.div`
|
|
2981
2981
|
height: 100%;
|
|
2982
2982
|
width: 100%;
|
|
2983
2983
|
position: ${({$isV2:Be})=>Be?"relative":"fixed"};
|
|
@@ -3045,7 +3045,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3045
3045
|
user-select: none;
|
|
3046
3046
|
pointer-events: none;
|
|
3047
3047
|
}
|
|
3048
|
-
`;let isManualCaptureMode$1=!1;const getCircleText$1=(Be,Le,Ye)=>({uploading:Be(`notifications.${Ye?"verifying":"uploading"}`),success:Be("notifications.done"),error:Le});function CaptureSelfie({onError:Be,onSuccess:Le,permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,token:gt,timeout:At,numberOfTries:xt,showPreview:Et,stream:yt,onlyCapture:Ct,showCustomCameraPermissionScreen:kt,isSecondId:vt,assistedOnboarding:bt,isRecordingEnabled:It=!1,showDoublePermissionsRequest:wt,onRestartOnboarding:Rt,skipProcessFace:Tt=!1,isKiosk:Bt=!1,ageAssurance:Dt=!1,publishAudio:Pt=!1,isDeepsightEnabled:Nt=!1,disableZoomCheck:Lt=!1,hatCheckEnabled:Wt=!1,lensesCheckEnabled:$t=!1,maskCheckEnabled:Kt=!1,eyesClosedCheckEnabled:Vt=!1}){var An;const Ut=gt?gt==null?void 0:gt.token:(An=state.token)==null?void 0:An.token,_t=React.useRef(null),Xt=React.useRef(null),Qt=React.useRef(null),jt=React.useRef(null),Gt=React.useRef(!1),[qt,zt]=React.useState(null),[e0,s0]=React.useState({}),[t0,l0]=React.useState(1),[d0,n0]=React.useState(!1),[g0,A0]=React.useState(!1),o0=React.useRef({}),{isRotated:r0}=useOrientation();React.useEffect(()=>{Gt.current=!r0},[r0]);const{isOnline:Yt}=useOnlineStatus({onOnline:()=>{var dn;isManualCaptureMode$1=!1,(dn=_t.current)==null||dn.setIsLoadingCamera(!1),H0(),Gt.current=!0,o0.current.canvas&&p0(o0.current.canvas,o0.current.faceCoordinates,!0)},onOffline:()=>{}}),{startRecording:Mt,stopRecording:Jt,recordingStarted:a0,updateMediaStream:i0}=useMediaRecorder({token:Ut,type:"selfie"}),{startRecording:f0,stopRecording:u0}=useMediaRecorderLocally();jt.current=u0,React.useEffect(()=>(isManualCaptureMode$1=!1,()=>{!Nt&&Jt()}),[]),React.useEffect(()=>{_t.current.streamUnlocked=Gt},[]);const x0=async()=>{if(Lt||Ct)return;const dn={canvas:null,itr:null};if(await MlWasmJSApi$1.poc(dn),(dn==null?void 0:dn.skipped)===!1){if(dn!=null&&dn.canvas){const nr=new IncodeCanvas(dn.canvas).getBase64Image();logFrame({token:typeof gt=="string"?gt:gt.token,base64Image:nr,source:sources.selfie})}(dn==null?void 0:dn.itr)===!0?(addDeviceStats(gt,{virtualCameraDetected:!0}),MlWasmJSApi$1.setZc("FAIL")):(dn==null?void 0:dn.itr)===!1&&MlWasmJSApi$1.setZc("PASS")}},p0=throttle$2(async(dn,Pn,nr=!1)=>{var hr,gr,B0;await x0(),o0.current.canvas=dn,o0.current.faceCoordinates=Pn;const jn=dn.getBase64Image();try{if(L0!=="idle"&&!nr)return;addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),clearTimeout(er.current),zt(jn),addEvent({code:"selfieCapture",token:Ut}),await onboardingAnalytics.analyzeFrame(jn),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const Z0=await MlWasmJSApi$1.encryptImage(jn),{blob:ln,url:xn}=dn.getBlobData();if(Ct)return onboardingAnalytics.stopMotionSensors(),Le({imageBase64:jn,blob:ln,encryptedImage:Z0,url:xn});addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),addEvent({token:Ut,code:"captureAttemptFinished",module:"SELFIE",payload:{logs:onboardingAnalytics.getPipelineLogs()}}),addDeviceStats(Ut,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const Dn=await capture({token:Ut,image:Z0,type:selfieType,encrypted:!0,faceCoordinates:Pn,recordingId:Qt.current,metadata:onboardingAnalytics.getMetadata()}),Yn=selfieChecks(Dn,{hatCheckEnabled:Wt,lensesCheckEnabled:$t,maskCheckEnabled:Kt,eyesClosedCheckEnabled:Vt});if(Yn.hasErrors){addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),j0("error"),logSelfieChecks(Dn,Yn,ht,en,P0,k0,bt),zt(null),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),s0({response:Dn,livenessPassed:Yn.livenessPassed,imageBase64:jn}),Bn&&(Gt.current=!1,isManualCaptureMode$1=!0);return}const{faceMatch:Xn,existingUser:zn,...Br}=await Y0();return addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),j0("success"),ht(getLogObject("successCapture",{response:Dn,message:"Selfie uploaded successfully"})),en(P0("notifications.success")),zt(null),await sleep(3500),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),onboardingAnalytics.stopMotionSensors(),Le({...Dn,...Br,faceMatch:Xn,existingUser:zn,liveness:Yn.livenessPassed,imageBase64:jn})}catch(Z0){((gr=(hr=Z0==null?void 0:Z0.response)==null?void 0:hr.data)==null?void 0:gr.error)==="Maximum capture attempts reached"&&l0(xt),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),zt(null),S0(Z0.response?Z0.response.data:P0("notifications.serverError")),j0("error"),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),s0({response:(B0=Z0==null?void 0:Z0.response)==null?void 0:B0.data,livenessPassed:null,imageBase64:jn}),Bn&&(Gt.current=!1,isManualCaptureMode$1=!0)}},300),D0=async()=>{if(!Nt)return;const dn=await jt.current(Ut);Qt.current=dn},{t:P0}=useTranslation$1(),z0=async(dn,Pn,nr,jn)=>{await updateSession$1({token:Ut,key:"manualSelfieCheckNeeded",value:!0});const hr=getLogObject("skip",{existingUser:dn,liveness:Pn,imageBase64:nr,faceMatch:jn});ht(hr),Be(hr)};async function J0({response:dn,livenessPassed:Pn,imageBase64:nr}){addEvent({code:"noAttempts",token:Ut}),ht(getLogObject("noAttemps",{response:dn,message:"No attempt left"}));const{faceMatch:jn,existingUser:hr}=await Y0();return z0(hr,Pn,nr,jn)}async function Y0(){if(Tt)return{faceMatch:!1,existingUser:!1};const dn=await processFace({token:Ut});vt&&await processFaceSecondId({token:Ut});const Pn=dn.confidence===1,nr=dn.existingUser;return{faceMatch:Pn,existingUser:nr,...dn}}async function X0(dn){var Pn;if(!g0){if(t0>=xt){A0(!0),await J0(dn);return}Nt&&await((Pn=_t.current)==null?void 0:Pn.resetWebcam(!0)),l0(t0+1),await Q0(dn),isManualCaptureMode$1||await H0()}}const{showManualCapture:T0,mode:L0,setMode:j0,resetLoading:Q0,notificationMessage:q0,setNotificationMessage:en,notificationDescription:w0,setNotificationDescription:k0,handleError:S0,startAutoDetect:H0,cameraReady:_0,handleManualCapture:G0,isSuccess:K0,isError:un,isLoading:tn,hideCamera:cn,showBorders:yn,shouldShowManualCapture:Bn,selfieTimeoutRef:er,errorStatus:Qn}=useSelfie({timeout:At,onLog:ht,handleCapture:p0,handleNoAttemptsLeft:J0,numberOfTries:xt,webcam:_t,isDetecting:Gt,assistedOnboarding:bt,hatCheckEnabled:Wt,lensesCheckEnabled:$t,maskCheckEnabled:Kt,eyesClosedCheckEnabled:Vt,handleStopRecordingLocally:D0,onSwitchManualCapture:()=>{addEvent({code:"switchToManualCaptureSelfie",token:Ut})},onManualCaptureSelfie:()=>{addEvent({code:"manualCaptureSelfie",token:Ut})}}),Un=()=>{var dn;if(Bn){Gt.current=!1;return}It&&!Nt&&!a0||It&&!Nt&&((dn=_t.current)==null||dn.setIsLoadingCamera(!1))},$n=async dn=>{Xt.current=dn,n0(!0),Nt?f0(dn):It&&(a0?await i0(dn):await Mt(dn))},gn=()=>q0||(Dt?P0(getSelfieTranslation("ageAssurance",bt)):jsxRuntimeExports.jsx("div",{children:P0("notifications.onFaceAngle")}));if(React.useEffect(()=>{Un()},[a0]),!Yt)return jsxRuntimeExports.jsx(NoInternetError,{});const qn=xt-t0;return r0&&!mobile.isIpad()?null:jsxRuntimeExports.jsxs(Container$n,{className:cx("IncodeCaptureSelfieContainer",{kiosk:Bt,isError:un}),children:[Bn?jsxRuntimeExports.jsxs(CaptureButtonContainer$1,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeCaptureSelfieButtonContainer",{kiosk:Bt}),initial:{scale:0},animate:{scale:1},children:[jsxRuntimeExports.jsx("p",{children:P0("common.takePhoto")}),jsxRuntimeExports.jsx(FakeButton$3,{id:"manual-capture-button",onClick:G0,"aria-label":P0("notifications.selfie.manualCaptureButtonLabel"),children:jsxRuntimeExports.jsx("img",{src:captureButton,alt:P0("notifications.selfie.manualCaptureButtonLabel")})})]}):null,jsxRuntimeExports.jsx(HideIfError,{isError:un,children:jsxRuntimeExports.jsxs(WebcamContainer$1,{className:cx("IncodeCaptureSelfieWebcamContainer",{kiosk:Bt}),children:[(tn||K0)&&jsxRuntimeExports.jsx(BordersContainer,{className:cx("IncodeCaptureSelfieBordersContainer",{kiosk:Bt}),children:jsxRuntimeExports.jsx(LoadingBorders,{className:"IncodeCaptureSelfieLoadingBordersContainer",mode:L0})}),jsxRuntimeExports.jsx(Hidder,{className:"IncodeCaptureSelfieHidder",initial:{width:0,height:0},animate:{width:_0?"auto":10,height:_0?"auto":10},children:jsxRuntimeExports.jsx(CameraOvalOuter,{className:cx("IncodeCaptureSelfieCameraOvalOuter",{"no-borders":tn||K0,"has-error":un,kiosk:Bt}),initial:{borderWidth:"0px"},transition:{delay:0,ease:"linear"},animate:{borderWidth:yn?"6px":"0px",borderColor:un?"#ff5c6f":"#21273b"},children:jsxRuntimeExports.jsxs(CameraOvalInner,{className:cx("IncodeCaptureSelfieCameraOvalInner",{isUploading:cn}),children:[jsxRuntimeExports.jsx(FaceFrame$1,{src:faceFrame$1,"aria-hidden":!0,className:cx({hidden:cn})}),Et&&qt&&jsxRuntimeExports.jsx(PreviewImage$1,{className:"IncodeCaptureSelfiePreviewImage",src:`data:image/jpeg;base64,${qt}`}),jsxRuntimeExports.jsx(Webcam,{ref:_t,onPlay:Un,videoSource:bt?"environment":"user",isSelfie:!0,type:"selfie",className:cx("video__selfie IncodeCaptureSelfieWebcam",{hidden:cn,kiosk:Bt}),permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,stream:yt,onError:Be,token:Ut,interviewId:gt==null?void 0:gt.interviewId,onStreamReady:$n,isRecordingEnabled:It&&!Nt,showCustomCameraPermissionScreen:kt,assistedOnboarding:bt,showDoublePermissionsRequest:wt,onRestartOnboarding:Rt,isKiosk:Bt,publishAudio:Pt,isDeepsightEnabled:Nt}),cn&&jsxRuntimeExports.jsx(CameraOvalInnerText,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeCaptureSelfieCameraOvalInnerText",{isError:un}),children:getCircleText$1(P0,q0,Dt)[L0]})]})})})]})}),!cn&&d0&&jsxRuntimeExports.jsx(NotificationInline,{"aria-live":"assertive","aria-atomic":"true",initial:{scale:0},animate:{scale:_0?1:0},className:cx("IncodeCaptureSelfieNotificationInline",{hasManualCapture:T0}),children:gn()}),jsxRuntimeExports.jsx(BlockingErrorMessage,{isMobile:isMobile$1,isError:un,attemptsRemaining:qn,notificationMessage:q0,notificationDescription:w0,resetAttempt:async()=>{await X0(e0)},errorStatus:Qn}),jsxRuntimeExports.jsx("canvas",{id:"canvasFrame",hidden:!0})]})}const CaptureSelfie$1=preloadScript$3(CaptureSelfie),conferenceStatus={approve:"approve",badInternet:"no-internet",close:"close",deny:"deny",executiveDisconnected:"executive-disconnected",genericError:"generic-error",noBrowser:"no-browser",noDevice:"no-device",noPermission:"no-permissions",OTPError:"OTPError",noConnection:"no-connection"};function addConsent({title:Be,content:Le,status:Ye,session:{token:tt}}){return exports.api.post("/omni/add/user-consent",{title:Be,content:Le,status:Ye},{headers:{"X-Incode-Hardware-Id":tt}}).catch(nt=>Promise.reject(nt.response.data))}const getPrivacyConsentData=({session:{token:Be},type:Le="PRIVACY",regulationType:Ye="Worldwide"})=>{const tt=getLanguageCodeWithCountry(i18n.language);return exports.api.get("/omni/consents",{headers:{"X-Incode-Hardware-Id":Be},params:{type:Le,language:tt,regulationType:Ye}}).then(nt=>nt.data)};var createRoot,m=ReactDOM;if(process.env.NODE_ENV==="production")createRoot=m.createRoot,m.hydrateRoot;else{var i$1=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;createRoot=function(Be,Le){i$1.usingClientEntryPoint=!0;try{return m.createRoot(Be,Le)}finally{i$1.usingClientEntryPoint=!1}}}let shouldShowCache=!mobile.isBrowserSupported();function useBrowserNotSupported(){const[Be,Le]=React.useState(shouldShowCache);function Ye(){Le(!1),shouldShowCache=!1}return{shouldShow:Be,onContinue:Ye}}const isSurface$1=isSurfaceTablet(),NotificationContainer=dt.div`
|
|
3048
|
+
`;let isManualCaptureMode$1=!1;const getCircleText$1=(Be,Le,Ye)=>({uploading:Be(`notifications.${Ye?"verifying":"uploading"}`),success:Be("notifications.done"),error:Le});function CaptureSelfie({onError:Be,onSuccess:Le,permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,token:gt,timeout:At,numberOfTries:xt,showPreview:Et,stream:yt,onlyCapture:Ct,showCustomCameraPermissionScreen:kt,isSecondId:vt,assistedOnboarding:bt,isRecordingEnabled:It=!1,showDoublePermissionsRequest:wt,onRestartOnboarding:Rt,skipProcessFace:Tt=!1,isKiosk:Bt=!1,ageAssurance:Dt=!1,publishAudio:Pt=!1,isDeepsightEnabled:Nt=!1,disableZoomCheck:Lt=!1,hatCheckEnabled:Wt=!1,lensesCheckEnabled:$t=!1,maskCheckEnabled:Kt=!1,eyesClosedCheckEnabled:Vt=!1}){var An;const Ut=gt?gt==null?void 0:gt.token:(An=state.token)==null?void 0:An.token,_t=React.useRef(null),Xt=React.useRef(null),Qt=React.useRef(null),jt=React.useRef(null),Gt=React.useRef(!1),[qt,zt]=React.useState(null),[e0,s0]=React.useState({}),[t0,l0]=React.useState(1),[d0,n0]=React.useState(!1),[g0,A0]=React.useState(!1),o0=React.useRef({}),{isRotated:r0}=useOrientation();React.useEffect(()=>{Gt.current=!r0},[r0]);const{isOnline:Yt}=useOnlineStatus({onOnline:()=>{var dn;isManualCaptureMode$1=!1,(dn=_t.current)==null||dn.setIsLoadingCamera(!1),H0(),Gt.current=!0,o0.current.canvas&&p0(o0.current.canvas,o0.current.faceCoordinates,!0)},onOffline:()=>{}}),{startRecording:Mt,stopRecording:Jt,recordingStarted:a0,updateMediaStream:i0}=useMediaRecorder({token:Ut,type:"selfie"}),{startRecording:f0,stopRecording:u0}=useMediaRecorderLocally();jt.current=u0,React.useEffect(()=>(isManualCaptureMode$1=!1,()=>{!Nt&&Jt()}),[]),React.useEffect(()=>{_t.current.streamUnlocked=Gt},[]);const x0=async()=>{if(Lt||Ct)return;const dn={canvas:null,itr:null};if(await MlWasmJSApi$1.poc(dn),(dn==null?void 0:dn.skipped)===!1){if(dn!=null&&dn.canvas){const nr=new IncodeCanvas(dn.canvas).getBase64Image();logFrame({token:typeof gt=="string"?gt:gt.token,base64Image:nr,source:sources.selfie})}(dn==null?void 0:dn.itr)===!0?(addDeviceStats(gt,{virtualCameraDetected:!0}),MlWasmJSApi$1.setZc("FAIL")):(dn==null?void 0:dn.itr)===!1&&MlWasmJSApi$1.setZc("PASS")}},p0=throttle$2(async(dn,Pn,nr=!1)=>{var hr,gr,B0;await x0(),o0.current.canvas=dn,o0.current.faceCoordinates=Pn;const jn=dn.getBase64Image();try{if(L0!=="idle"&&!nr)return;addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),clearTimeout(er.current),zt(jn),addEvent({code:"selfieCapture",token:Ut}),await onboardingAnalytics.analyzeFrame(jn),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const Z0=await MlWasmJSApi$1.ens(jn),{blob:ln,url:xn}=dn.getBlobData();if(Ct)return onboardingAnalytics.stopMotionSensors(),Le({imageBase64:jn,blob:ln,encryptedImage:Z0,url:xn});addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),addEvent({token:Ut,code:"captureAttemptFinished",module:"SELFIE",payload:{logs:onboardingAnalytics.getPipelineLogs()}}),addDeviceStats(Ut,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const Dn=await capture({token:Ut,image:Z0,type:selfieType,encrypted:!0,faceCoordinates:Pn,recordingId:Qt.current,metadata:onboardingAnalytics.getMetadata()}),Yn=selfieChecks(Dn,{hatCheckEnabled:Wt,lensesCheckEnabled:$t,maskCheckEnabled:Kt,eyesClosedCheckEnabled:Vt});if(Yn.hasErrors){addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),j0("error"),logSelfieChecks(Dn,Yn,ht,en,P0,k0,bt),zt(null),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),s0({response:Dn,livenessPassed:Yn.livenessPassed,imageBase64:jn}),Bn&&(Gt.current=!1,isManualCaptureMode$1=!0);return}const{faceMatch:Xn,existingUser:zn,...Br}=await Y0();return addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),j0("success"),ht(getLogObject("successCapture",{response:Dn,message:"Selfie uploaded successfully"})),en(P0("notifications.success")),zt(null),await sleep(3500),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),onboardingAnalytics.stopMotionSensors(),Le({...Dn,...Br,faceMatch:Xn,existingUser:zn,liveness:Yn.livenessPassed,imageBase64:jn})}catch(Z0){((gr=(hr=Z0==null?void 0:Z0.response)==null?void 0:hr.data)==null?void 0:gr.error)==="Maximum capture attempts reached"&&l0(xt),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Ut,shouldOpen:!0,payload:{moduleVersion:"1"}}),zt(null),S0(Z0.response?Z0.response.data:P0("notifications.serverError")),j0("error"),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Ut,shouldOpen:!1,payload:{moduleVersion:"1"}}),s0({response:(B0=Z0==null?void 0:Z0.response)==null?void 0:B0.data,livenessPassed:null,imageBase64:jn}),Bn&&(Gt.current=!1,isManualCaptureMode$1=!0)}},300),D0=async()=>{if(!Nt)return;const dn=await jt.current(Ut);Qt.current=dn},{t:P0}=useTranslation$1(),z0=async(dn,Pn,nr,jn)=>{await updateSession$1({token:Ut,key:"manualSelfieCheckNeeded",value:!0});const hr=getLogObject("skip",{existingUser:dn,liveness:Pn,imageBase64:nr,faceMatch:jn});ht(hr),Be(hr)};async function J0({response:dn,livenessPassed:Pn,imageBase64:nr}){addEvent({code:"noAttempts",token:Ut}),ht(getLogObject("noAttemps",{response:dn,message:"No attempt left"}));const{faceMatch:jn,existingUser:hr}=await Y0();return z0(hr,Pn,nr,jn)}async function Y0(){if(Tt)return{faceMatch:!1,existingUser:!1};const dn=await processFace({token:Ut});vt&&await processFaceSecondId({token:Ut});const Pn=dn.confidence===1,nr=dn.existingUser;return{faceMatch:Pn,existingUser:nr,...dn}}async function X0(dn){var Pn;if(!g0){if(t0>=xt){A0(!0),await J0(dn);return}Nt&&await((Pn=_t.current)==null?void 0:Pn.resetWebcam(!0)),l0(t0+1),await Q0(dn),isManualCaptureMode$1||await H0()}}const{showManualCapture:T0,mode:L0,setMode:j0,resetLoading:Q0,notificationMessage:q0,setNotificationMessage:en,notificationDescription:w0,setNotificationDescription:k0,handleError:S0,startAutoDetect:H0,cameraReady:_0,handleManualCapture:G0,isSuccess:K0,isError:un,isLoading:tn,hideCamera:cn,showBorders:yn,shouldShowManualCapture:Bn,selfieTimeoutRef:er,errorStatus:Qn}=useSelfie({timeout:At,onLog:ht,handleCapture:p0,handleNoAttemptsLeft:J0,numberOfTries:xt,webcam:_t,isDetecting:Gt,assistedOnboarding:bt,hatCheckEnabled:Wt,lensesCheckEnabled:$t,maskCheckEnabled:Kt,eyesClosedCheckEnabled:Vt,handleStopRecordingLocally:D0,onSwitchManualCapture:()=>{addEvent({code:"switchToManualCaptureSelfie",token:Ut})},onManualCaptureSelfie:()=>{addEvent({code:"manualCaptureSelfie",token:Ut})}}),Un=()=>{var dn;if(Bn){Gt.current=!1;return}It&&!Nt&&!a0||It&&!Nt&&((dn=_t.current)==null||dn.setIsLoadingCamera(!1))},$n=async dn=>{Xt.current=dn,n0(!0),Nt?f0(dn):It&&(a0?await i0(dn):await Mt(dn))},gn=()=>q0||(Dt?P0(getSelfieTranslation("ageAssurance",bt)):jsxRuntimeExports.jsx("div",{children:P0("notifications.onFaceAngle")}));if(React.useEffect(()=>{Un()},[a0]),!Yt)return jsxRuntimeExports.jsx(NoInternetError,{});const qn=xt-t0;return r0&&!mobile.isIpad()?null:jsxRuntimeExports.jsxs(Container$n,{className:cx("IncodeCaptureSelfieContainer",{kiosk:Bt,isError:un}),children:[Bn?jsxRuntimeExports.jsxs(CaptureButtonContainer$1,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeCaptureSelfieButtonContainer",{kiosk:Bt}),initial:{scale:0},animate:{scale:1},children:[jsxRuntimeExports.jsx("p",{children:P0("common.takePhoto")}),jsxRuntimeExports.jsx(FakeButton$3,{id:"manual-capture-button",onClick:G0,"aria-label":P0("notifications.selfie.manualCaptureButtonLabel"),children:jsxRuntimeExports.jsx("img",{src:captureButton,alt:P0("notifications.selfie.manualCaptureButtonLabel")})})]}):null,jsxRuntimeExports.jsx(HideIfError,{isError:un,children:jsxRuntimeExports.jsxs(WebcamContainer$1,{className:cx("IncodeCaptureSelfieWebcamContainer",{kiosk:Bt}),children:[(tn||K0)&&jsxRuntimeExports.jsx(BordersContainer,{className:cx("IncodeCaptureSelfieBordersContainer",{kiosk:Bt}),children:jsxRuntimeExports.jsx(LoadingBorders,{className:"IncodeCaptureSelfieLoadingBordersContainer",mode:L0})}),jsxRuntimeExports.jsx(Hidder,{className:"IncodeCaptureSelfieHidder",initial:{width:0,height:0},animate:{width:_0?"auto":10,height:_0?"auto":10},children:jsxRuntimeExports.jsx(CameraOvalOuter,{className:cx("IncodeCaptureSelfieCameraOvalOuter",{"no-borders":tn||K0,"has-error":un,kiosk:Bt}),initial:{borderWidth:"0px"},transition:{delay:0,ease:"linear"},animate:{borderWidth:yn?"6px":"0px",borderColor:un?"#ff5c6f":"#21273b"},children:jsxRuntimeExports.jsxs(CameraOvalInner,{className:cx("IncodeCaptureSelfieCameraOvalInner",{isUploading:cn}),children:[jsxRuntimeExports.jsx(FaceFrame$1,{src:faceFrame$1,"aria-hidden":!0,className:cx({hidden:cn})}),Et&&qt&&jsxRuntimeExports.jsx(PreviewImage$1,{className:"IncodeCaptureSelfiePreviewImage",src:`data:image/jpeg;base64,${qt}`}),jsxRuntimeExports.jsx(Webcam,{ref:_t,onPlay:Un,videoSource:bt?"environment":"user",isSelfie:!0,type:"selfie",className:cx("video__selfie IncodeCaptureSelfieWebcam",{hidden:cn,kiosk:Bt}),permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,stream:yt,onError:Be,token:Ut,interviewId:gt==null?void 0:gt.interviewId,onStreamReady:$n,isRecordingEnabled:It&&!Nt,showCustomCameraPermissionScreen:kt,assistedOnboarding:bt,showDoublePermissionsRequest:wt,onRestartOnboarding:Rt,isKiosk:Bt,publishAudio:Pt,isDeepsightEnabled:Nt}),cn&&jsxRuntimeExports.jsx(CameraOvalInnerText,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeCaptureSelfieCameraOvalInnerText",{isError:un}),children:getCircleText$1(P0,q0,Dt)[L0]})]})})})]})}),!cn&&d0&&jsxRuntimeExports.jsx(NotificationInline,{"aria-live":"assertive","aria-atomic":"true",initial:{scale:0},animate:{scale:_0?1:0},className:cx("IncodeCaptureSelfieNotificationInline",{hasManualCapture:T0}),children:gn()}),jsxRuntimeExports.jsx(BlockingErrorMessage,{isMobile:isMobile$1,isError:un,attemptsRemaining:qn,notificationMessage:q0,notificationDescription:w0,resetAttempt:async()=>{await X0(e0)},errorStatus:Qn}),jsxRuntimeExports.jsx("canvas",{id:"canvasFrame",hidden:!0})]})}const CaptureSelfie$1=preloadScript$3(CaptureSelfie),conferenceStatus={approve:"approve",badInternet:"no-internet",close:"close",deny:"deny",executiveDisconnected:"executive-disconnected",genericError:"generic-error",noBrowser:"no-browser",noDevice:"no-device",noPermission:"no-permissions",OTPError:"OTPError",noConnection:"no-connection"};function addConsent({title:Be,content:Le,status:Ye,session:{token:tt}}){return exports.api.post("/omni/add/user-consent",{title:Be,content:Le,status:Ye},{headers:{"X-Incode-Hardware-Id":tt}}).catch(nt=>Promise.reject(nt.response.data))}const getPrivacyConsentData=({session:{token:Be},type:Le="PRIVACY",regulationType:Ye="Worldwide"})=>{const tt=getLanguageCodeWithCountry(i18n.language);return exports.api.get("/omni/consents",{headers:{"X-Incode-Hardware-Id":Be},params:{type:Le,language:tt,regulationType:Ye}}).then(nt=>nt.data)};var createRoot,m=ReactDOM;if(process.env.NODE_ENV==="production")createRoot=m.createRoot,m.hydrateRoot;else{var i$1=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;createRoot=function(Be,Le){i$1.usingClientEntryPoint=!0;try{return m.createRoot(Be,Le)}finally{i$1.usingClientEntryPoint=!1}}}let shouldShowCache=!mobile.isBrowserSupported();function useBrowserNotSupported(){const[Be,Le]=React.useState(shouldShowCache);function Ye(){Le(!1),shouldShowCache=!1}return{shouldShow:Be,onContinue:Ye}}const isSurface$1=isSurfaceTablet(),NotificationContainer=dt.div`
|
|
3049
3049
|
border-radius: 20px;
|
|
3050
3050
|
background-color: rgba(0, 0, 0, 0.8);
|
|
3051
3051
|
color: white;
|
|
@@ -3724,7 +3724,7 @@ linearGradient:first-of-type {
|
|
|
3724
3724
|
stop-color: ${({$color:Be})=>Be};
|
|
3725
3725
|
}
|
|
3726
3726
|
}
|
|
3727
|
-
`,BaseTutorial=({title:Be,subtitle:Le,animationData:Ye,onContinue:tt,buttonText:nt,uiConfig:ft,disclaimerText:ht,onClose:gt,isLoading:At=!1})=>{var yt,Ct,kt,vt,bt,It,wt,Rt,Tt,Bt,Dt,Pt,Nt;const{t:xt}=useTranslation$1(),Et=useTokens();return jsxRuntimeExports.jsx(Page$1,{title:Be,subtitle:Le,closeButton:{show:(yt=ft==null?void 0:ft.closeButton)==null?void 0:yt.show,position:(Ct=ft==null?void 0:ft.closeButton)==null?void 0:Ct.position,offset:(kt=ft==null?void 0:ft.closeButton)==null?void 0:kt.offset,onClose:gt},hideHeaderBranding:(vt=ft==null?void 0:ft.branding)==null?void 0:vt.hideHeaderBranding,...(It=(bt=ft==null?void 0:ft.branding)==null?void 0:bt.logo)!=null&&It.src||(Rt=(wt=ft==null?void 0:ft.branding)==null?void 0:wt.logo)!=null&&Rt.height?{logo:{src:(Bt=(Tt=ft==null?void 0:ft.branding)==null?void 0:Tt.logo)==null?void 0:Bt.src,height:(Pt=(Dt=ft==null?void 0:ft.branding)==null?void 0:Dt.logo)==null?void 0:Pt.height}}:{},hideFooterBranding:(Nt=ft==null?void 0:ft.branding)==null?void 0:Nt.hideFooterBranding,"data-testid":"base-tutorial-container",children:jsxRuntimeExports.jsxs(Flex,{direction:"column",justify:"space-between",flex:1,children:[jsxRuntimeExports.jsx(LottieContainer,{hFull:!0,xsH:"250px",$color:Et.color.surface.primary[500],px:6,xsPx:0,maxW:"400px",m:"auto",children:jsxRuntimeExports.jsx(Lottie,{animationData:replaceLottieColor(Ye,Et.color.surface.primary[500]),loop:!0,autoplay:!0,style:{height:"100%"}})}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Text$7,{fontSize:Et.typography.fontSize.lg,textAlign:"center",color:Et.color.text.body.secondary,lineHeight:"114%",fontWeight:500,letterSpacing:"-0.5px",py:3,children:ht||xt("idv2.tutorial.autoCapture")}),jsxRuntimeExports.jsx(Box,{px:2,py:4,children:jsxRuntimeExports.jsx(Button$b,{onClick:tt,"data-testid":"tutorial-continue-button",isLoading:At,children:nt||xt("idv2.tutorial.startScan")})})]})]})})},fr$7=60,v$7="5.9.6",ip$7=0,op$7=239,w$7=296,h$8=296,nm$7="selfietuto",ddd$7=0,markers$7=[],assets$7=[{nm:"faceloop",fr:60,id:"m256ex281vb8hdk2ys3",layers:[{ty:3,ddd:0,ind:4,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:5,hd:!1,nm:"faceloop - Null",sr:1,parent:4,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:6,hd:!1,nm:"faceloop - Shape Mask",sr:1,parent:5,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[.01,0],[295.99,0],[296,.01],[296,295.99],[295.99,296],[.01,296],[0,295.99],[0,.01],[.01,0],[.01,0]],i:[[0,0],[0,0],[0,-.0055],[0,0],[.0055,0],[0,0],[0,.0055],[0,0],[-.0055,0],[0,0]],o:[[0,0],[.005519999999989977,0],[0,0],[0,.005519999999989977],[0,0],[-.00552,0],[0,0],[0,-.00552],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:[0,1,0,1]},nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]}]},{nm:"selfiescan2",fr:60,id:"m256ews56opa1de42ut",layers:[{ty:3,ddd:0,ind:7,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:8,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:7,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:9,hd:!1,nm:"selfietuto - Shape Mask",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[.01,0],[295.99,0],[296,.01],[296,295.99],[295.99,296],[.01,296],[0,295.99],[0,.01],[.01,0],[.01,0]],i:[[0,0],[0,0],[0,-.0055],[0,0],[.0055,0],[0,0],[0,.0055],[0,0],[-.0055,0],[0,0]],o:[[0,0],[.005519999999989977,0],[0,0],[0,.005519999999989977],[0,0],[-.00552,0],[0,0],[0,-.00552],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:[0,1,0,1]},nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]}]},{nm:"Group 39567",fr:60,id:"m256ewscxedd0m9wt7o",layers:[{ty:3,ddd:0,ind:10,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:11,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:10,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:12,hd:!1,nm:"Group 39567 - Null",sr:1,parent:11,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ddd:0,ind:13,ty:0,nm:"selfiescan2",td:1,refId:"m256ews56opa1de42ut",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0},{ty:4,ddd:0,ind:14,hd:!1,nm:"selfietuto - Shape Mask",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[.01,0],[295.99,0],[296,.01],[296,295.99],[295.99,296],[.01,296],[0,295.99],[0,.01],[.01,0],[.01,0]],i:[[0,0],[0,0],[0,-.0055],[0,0],[.0055,0],[0,0],[0,.0055],[0,0],[-.0055,0],[0,0]],o:[[0,0],[.005519999999989977,0],[0,0],[0,.005519999999989977],[0,0],[-.00552,0],[0,0],[0,-.00552],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:[0,1,0,1]},nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}],tt:1}]},{nm:"User 07a",fr:60,id:"m256ewtth2xv0t9qlhe",layers:[{ty:3,ddd:0,ind:15,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:16,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:15,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:17,hd:!1,nm:"Group 39567 - Null",sr:1,parent:16,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:18,hd:!1,nm:"User 07a - Null",sr:1,parent:17,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ddd:0,ind:19,ty:0,nm:"Group 39567",td:1,refId:"m256ewscxedd0m9wt7o",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0},{ty:4,ddd:0,ind:20,hd:!1,nm:"User 07a - Shape Mask",sr:1,parent:18,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[.01,0],[324.5782,0],[324.5882,.01],[324.5882,324.5782],[324.5782,324.5882],[.01,324.5882],[0,324.5782],[0,.01],[.01,0],[.01,0]],i:[[0,0],[0,0],[0,-.0055],[0,0],[.0055,0],[0,0],[0,.0055],[0,0],[-.0055,0],[0,0]],o:[[0,0],[.005519999999989977,0],[0,0],[0,.005519999999989977],[0,0],[-.00552,0],[0,0],[0,-.00552],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:[0,1,0,1]},nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}],tt:1}]},{nm:"faceloop",fr:60,id:"m6p6j2c0qs37vm69",layers:[{ty:3,ddd:0,ind:61,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:62,hd:!1,nm:"faceloop - Null",sr:1,parent:61,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:23,hd:!1,nm:"Ellipse 191 (Stroke) - Null",sr:1,parent:62,ks:{a:{a:0,k:[148,148]},o:{a:0,k:100},p:{a:0,k:[148,148]},r:{a:1,k:[{t:0,s:[0],o:{x:[0],y:[0]},i:{x:[1],y:[1]}},{t:120,s:[360],o:{x:[0],y:[0]},i:{x:[1],y:[1]}},{t:240,s:[720]}]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:24,hd:!1,nm:"Ellipse 191 (Stroke)",sr:1,parent:23,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:4,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[148,287],[287,148],[148,9],[9,148],[148,287],[148,287]],i:[[0,0],[0,76.7676],[76.7676,0],[0,-76.7676],[-76.7676,0],[0,0]],o:[[76.76758000000001,0],[0,-76.76758],[-76.76758,0],[0,76.76758000000001],[0,0],[0,0]]}}},{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[148,296],[296,148],[148,0],[0,148],[148,296],[148,296]],i:[[0,0],[0,81.7381],[81.7381,0],[0,-81.7381],[-81.7381,0],[0,0]],o:[[81.73813999999999,0],[0,-81.73814],[-81.73814,0],[0,81.73813999999999],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:2,k:{a:0,k:[0,0,.47843137254901963,1,1,0,.47843137254901963,1,0,1,1,0]}},s:{a:0,k:[24.51807347262285,30.75903457240274]},e:{a:0,k:[217.54216853549255,256.7710909118675]},t:1,nm:"Fill",hd:!1,r:2},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]}]},{nm:"User 07a",fr:60,id:"m6p6j2c85ejf13b5",layers:[{ty:3,ddd:0,ind:52,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:53,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:52,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:54,hd:!1,nm:"Group 39567 - Null",sr:1,parent:53,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:55,hd:!1,nm:"User 07a - Null",sr:1,parent:54,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:29,hd:!1,nm:"Ellipse 148 - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[108.8158,52.1611]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:30,hd:!1,nm:"Ellipse 148",sr:1,parent:29,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[107.2565,76.6782],[53.6282,152.0111],[-1e-4,76.6782],[53.6282,0],[107.2565,76.6782],[107.2565,76.6782]],i:[[0,0],[23.5084,0],[0,41.6052],[-50.6702,0],[0,-37.926],[0,0]],o:[[0,41.60524000000001],[-25.71208,0],[0,-37.06891],[50.67023,0],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:2,k:{a:0,k:[0,.8784313725490196,.8784313725490196,.8784313725490196,1,1,1,1]}},s:{a:0,k:[6.591940610097922,75.2952207378632]},e:{a:0,k:[82.34462772765323,75.58141690773564]},t:1,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:31,hd:!1,nm:"Vector 14 - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[224.0092,121.5657]},r:{a:0,k:174.0696},s:{a:0,k:[99.62,-100.33000000000001]},sk:{a:0,k:-1.81},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:32,hd:!1,nm:"Vector 14",sr:1,parent:31,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[3.8354,2.7538],[14.3511,5.0967],[14.3511,33.9922],[8.4362,37.8555],[.8778,19.154],[3.8354,2.7538],[3.8354,2.7538]],i:[[0,0],[-1.6431,-3.254],[0,0],[3.9434,0],[.6572,5.0763],[-5.5865,7.4191],[0,0]],o:[[4.46918,-5.9353],[0,0],[-.3285499999999999,2.4730399999999975],[-4.92925,0],[-.65723,-5.07625],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:3,k:{a:0,k:[.0417,.7098039215686275,.7098039215686275,.7098039215686275,.3625,.8862745098039215,.8862745098039215,.8862745098039215,1,1,1,1]}},s:{a:0,k:[12.895270234498375,18.505816655260606]},e:{a:0,k:[3.4748756395564944,19.465401775061935]},t:1,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:33,hd:!1,nm:"Vector 13 - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[98.7625,119.8784]},r:{a:0,k:-5.3845},s:{a:0,k:[99.65,100.29999999999998]},sk:{a:0,k:1.81},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:34,hd:!1,nm:"Vector 13",sr:1,parent:33,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[3.8354,2.7538],[14.3511,5.0967],[14.3511,33.9922],[8.4362,37.8555],[.8778,19.154],[3.8354,2.7538],[3.8354,2.7538]],i:[[0,0],[-1.6431,-3.254],[0,0],[3.9434,0],[.6572,5.0763],[-5.5865,7.4191],[0,0]],o:[[4.469190000000001,-5.9353],[0,0],[-.3285499999999999,2.4730399999999975],[-4.92925,0],[-.65723,-5.07625],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:3,k:{a:0,k:[.1719,.7411764705882353,.7411764705882353,.7411764705882353,.6406,.8823529411764706,.8823529411764706,.8823529411764706,1,.8666666666666667,.8666666666666667,.8666666666666667]}},s:{a:0,k:[12.895270234498375,18.505816655260606]},e:{a:0,k:[3.4748756395564944,19.465401775061935]},t:1,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:35,hd:!1,nm:"Intersect - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[73.3813,221.1284]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:36,hd:!1,nm:"Intersect",sr:1,parent:35,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[176.9562,14.2579],[88.3045,51.5579],[-1e-4,14.6114],[42.8361,.0076],[86.6769,22.2946],[134.9533,0],[176.9562,14.2579],[176.9562,14.2579]],i:[[0,0],[34.738,0],[22.4871,22.8082],[0,0],[-18.981,-.4651],[-6.5668,12.3875],[-21.0564,-8.5561],[0,0]],o:[[-22.511949999999985,23.015520000000002],[-34.55984,0],[21.33035,-8.74771],[6.316929999999999,11.41202],[20.596860000000007,.5046900000000001],[0,0],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:"replaceColorWithYours"},nm:"Fill",hd:!1,r:2},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:37,hd:!1,nm:"Combined Shape - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[102.6816,130.9973]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:38,hd:!1,nm:"Combined Shape",sr:1,parent:37,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[24.9287,73.4874],[24.9287,73.954],[0,96.2222],[59.6122,122.2049],[119.2244,96.2222],[94.2957,73.9204],[94.3261,29.8559],[94.3261,29.6156],[94.4854,16.542],[24.8205,30.9221],[24.9289,73.4874],[24.9287,73.4874]],i:[[0,0],[0,0],[16.4905,-4.9742],[-19.8704,0],[-19.8704,14.4345],[.2406,9.8879],[-.0173,3.7526],[1.0839,.301],[-.0737,16.8942],[-1.039,-46.389],[-.0661,-5.3568],[0,0]],o:[[0,0],[-.1286200000000015,9.871259999999992],[19.87036,14.434470000000005],[19.870360000000005,0],[-16.378529999999998,-4.980019999999996],[0,-3.7526299999999964],[1.1846599999999938,.16672000000000153],[.03252000000000521,-12.36235],[.07370000000000232,-16.89435],[.014089999999999492,4.729930000000003],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:2,k:{a:0,k:[0,.6941176470588235,.6941176470588235,.6941176470588235,1,1,1,1]}},s:{a:0,k:[54.32503300089149,33.74278237295727]},e:{a:0,k:[54.32503300089149,91.15401515450041]},t:1,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:39,hd:!1,nm:"Intersect - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[37.686,24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:40,hd:!1,nm:"Intersect",sr:1,parent:39,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[124,248],[248,124],[124,0],[0,124],[124,248],[124,248]],i:[[0,0],[0,68.4833],[68.4833,0],[0,-68.4833],[-68.4833,0],[0,0]],o:[[68.48331000000002,0],[0,-68.48331],[-68.48331,0],[0,68.48331000000002],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:7.000000000000001},c:{a:0,k:[0,.47843137254901963,1,1]},nm:"Fill",hd:!1,r:2},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]}]},{nm:"[FRAME] selfietuto - Null / selfiescan2 - Null / Ellipse 194 - Null / Ellipse 194 / selfietuto - Null / selfiescan2 - Null / Group 39567 - Null / selfietuto - Null / selfiescan2 - Null / Group 39567 - Null / User 07a - Null / selfietuto - Null / selfiescan2 - Null / Group 39567 - Null / User 07a - Null / User 07a / User 07a",fr:60,id:"m6p6j2c5c0l7uggl",layers:[{ty:3,ddd:0,ind:41,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:42,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:41,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:43,hd:!1,nm:"Ellipse 194 - Null",sr:1,parent:42,ks:{a:{a:0,k:[20,20]},o:{a:1,k:[{t:40.2,s:[0],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:57.599999999999994,s:[100],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:94.2,s:[0],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:110.4,s:[100],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:144.60000000000002,s:[0]}]},p:{a:1,k:[{t:40.2,s:[1,124],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]},ti:[0,0],to:[0,0]},{t:94.2,s:[244,124],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]},ti:[0,0],to:[0,0]},{t:144.60000000000002,s:[1,124]}]},r:{a:0,k:0},s:{a:1,k:[{t:40.2,s:[150,288],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:57.599999999999994,s:[150,622],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:94.2,s:[150,231.99999999999997],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:110.4,s:[150,666],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:144.60000000000002,s:[150,288]}]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:44,hd:!1,nm:"Ellipse 194",sr:1,parent:43,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:1,k:[{t:40.2,s:[0],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:57.599999999999994,s:[100],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:94.2,s:[0],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:110.4,s:[100],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:144.60000000000002,s:[0]}]}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[40,20],[20,40],[0,20],[20,0],[40,20],[40,20]],i:[[0,0],[11.046,0],[0,11.046],[-11.046,0],[0,-11.046],[0,0]],o:[[0,11.046],[-11.046,0],[0,-11.046],[11.046,0],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:6,k:{a:0,k:[0,1,1,1,.115,1,1,1,.2094,1,1,1,.7074,1,1,1,.8664,1,1,1,1,1,1,1,0,1,.115,1,.2094,.88,.7074,.23,.8664,.08,1,0]}},s:{a:0,k:[20.000004461093873,19.209036763697355]},e:{a:0,k:[20.000004461093873,.875419492625209]},t:2,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:45,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:46,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:45,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:47,hd:!1,nm:"Group 39567 - Null",sr:1,parent:46,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:48,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:49,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:48,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:50,hd:!1,nm:"Group 39567 - Null",sr:1,parent:49,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:51,hd:!1,nm:"User 07a - Null",sr:1,parent:50,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:52,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:53,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:52,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:54,hd:!1,nm:"Group 39567 - Null",sr:1,parent:53,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:55,hd:!1,nm:"User 07a - Null",sr:1,parent:54,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ddd:0,ind:56,ty:0,nm:"User 07a",td:1,refId:"m256ewtth2xv0t9qlhe",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0},{ddd:0,ind:57,ty:0,nm:"User 07a",refId:"m6p6j2c85ejf13b5",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0,tt:1}]},{nm:"[FRAME] selfietuto - Null / selfietuto - Null / faceloop - Null / selfietuto - Null / faceloop - Null / faceloop / faceloop / selfiescan2",fr:60,id:"m6p6j2bzg8qe07hm",layers:[{ty:3,ddd:0,ind:58,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:59,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:60,hd:!1,nm:"faceloop - Null",sr:1,parent:59,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:61,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:62,hd:!1,nm:"faceloop - Null",sr:1,parent:61,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ddd:0,ind:63,ty:0,nm:"faceloop",td:1,refId:"m256ex281vb8hdk2ys3",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0},{ddd:0,ind:64,ty:0,nm:"faceloop",refId:"m6p6j2c0qs37vm69",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0,tt:1},{ddd:0,ind:65,ty:0,nm:"selfiescan2",refId:"m6p6j2c5c0l7uggl",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0}]}],layers$7=[{ddd:0,ind:1,ty:0,nm:"selfietuto",refId:"m6p6j2bzg8qe07hm",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0}],meta$2={a:"",d:"",tc:"",g:"Aninix"},tutorialAnimationJson$2={fr:fr$7,v:v$7,ip:ip$7,op:op$7,w:w$7,h:h$8,nm:nm$7,ddd:ddd$7,markers:markers$7,assets:assets$7,layers:layers$7,meta:meta$2},defaultFlow$1={name:"",checkTutorials:!0,checkAuthorization:!0,redirectDesktopToMobile:!1,disableUnsupportedBrowserScreen:!1,qrPhishingResistance:!1,addContinueToDesktop:!1,redirectOriginOnly:!1,displayOnboardingResultOnDesktop:!1,enableMultipleOnboardings:!1,disableLaunchScreen:!1,disableSmsOption:!1,mergeSessionRecordings:!1,mandatoryConsentCheck:!0,enableSardineRisk:!1,flowModules:[{key:"PHONE",configuration:{otpVerification:!1,otpExpirationInMinutes:10,prefill:!1}},{key:"GEOLOCATION",configuration:{allowUserToSkipGeolocation:!1}},{key:"ID",configuration:{showTutorial:!0,enableId:!0,enablePassport:!0,onlyFront:!1,onlyBack:!1,barcodeCapture:!1,fetchAdditionalPage:!1,secondId:!1,thirdId:!1,autoCaptureTimeout:18,deviceIdleTimeout:60,captureAttempts:3,manualUploadIdCapture:!1,showDocumentChooserScreen:!0,enableIdRecording:!0,perCountryPerDocOverrides:{}}},{key:"ADDRESS",configuration:{disableSkipPoa:!1,title:"",text:""}},{key:"ID_OCR",configuration:{editableOcr:!1}},{key:"SELFIE",configuration:{showTutorial:!0,showPreview:!1,assistedOnboarding:!1,enableFaceRecording:!0,autoCaptureTimeout:20,captureAttempts:3,validateLenses:!0,validateFaceMask:!0,validateHeadCover:!0,validateClosedEyes:!0,validateBrightness:!0,deepsightLiveness:"SINGLE_FRAME"}},{key:"FACE_MATCH",configuration:{matchingType:"selfieVsId",disableFaceMatchAnimation:!1}},{key:"SIGNATURE",configuration:{title:"",subTitle:""}},{key:"VIDEO_ONBOARDING",configuration:{useAsSelfie:!1,showTutorials:!0,companyName:"",checkLiveness:!0,checkIdScan:!0,checkDocumentScan:!0,compareIdEnabled:!0,compareOcrEnabled:!1,compareBackIdEnabled:!1,compareBackOcrEnabled:!1,checkVoiceConsent:!0,voiceConsentQuestions:0,selfieQualityAffectsScore:!1,maxWaitingVideoSelfieFile:0,lastSecondsVideoQualityCheck:!1,lastSecondsVideoQualityCheckDuration:0}}]};function normalizeFlowModules(Be){const Le=Be.flatMap((ft,ht,gt)=>{if(ft.key==="TUTORIAL_ID"){const xt=ft.configuration,yt=[{key:"ID",configuration:xt}];return xt.secondId&&yt.push({key:"SECOND_ID",configuration:xt}),xt.thirdId&&yt.push({key:"THIRD_ID",configuration:xt}),yt}const At=gt[ht-1];return ft.key==="ID"&&(At==null?void 0:At.key)==="TUTORIAL_ID"?[]:[ft]}),Ye=ft=>ft,tt=ft=>ft.filter(ht=>ht.key!=="SELFIE");return(Le.some(ft=>ft.key==="VIDEO_ONBOARDING"&&ft.configuration.useAsSelfie===!0)?tt:Ye)(Le)}function handleResponse(Be){const Le=Be.data,Ye=normalizeFlowModules(Le.flowModules);return Le&&localStorage.setItem("ds",Le.ds?"1":"0"),{...Le,flowModules:Ye}}async function getFlow$1(Be){var Le;try{const Ye=await exports.api.get("/omni/onboarding/flow",{headers:{"X-Incode-Hardware-Id":Be}});return handleResponse(Ye)}catch(Ye){if(isAxiosError(Ye)&&((Le=Ye.response)==null?void 0:Le.status)===400)return defaultFlow$1;throw Ye}}const mergeUiConfig=(Be,Le)=>{var tt,nt;const Ye=getTokensFromDashboardTheme(Le);return{...Be,branding:{logo:Le.logo?{src:Le.logo,height:"100%"}:(tt=Be==null?void 0:Be.branding)==null?void 0:tt.logo,...Be==null?void 0:Be.branding},theming:{...Be==null?void 0:Be.theming,designTokens:{...Ye,...(nt=Be==null?void 0:Be.theming)==null?void 0:nt.designTokens}}}};var FlowType=(Be=>(Be.ID="ID",Be.FACE="Face",Be))(FlowType||{});class AbstractFlowManager{constructor(Le){this.subscribers=[],this.flow=null,this.sessionToken=null,this.captureConfig=null,this.captureConfiguration=null,this.parentSize={width:window.innerWidth,height:window.innerHeight},this.uiConfig=null;const Ye={currentStep:null,isLoading:!1,attempts:0,errorDetails:null,successData:null,flowOutcome:"pending",sessionToken:null,...Le};this.initialState=Object.freeze({...Ye}),this.state={...this.initialState}}async isPermissionsEnabled(){return navigator.permissions?(await navigator.permissions.query({name:"camera"})).state==="granted":!1}subscribe(Le){return this.subscribers.push(Le),Le(this.getState()),()=>{this.subscribers=this.subscribers.filter(Ye=>Ye!==Le)}}notifySubscribers(){const Le=this.getState();this.subscribers.forEach(Ye=>Ye(Le))}setState(Le){this.state={...this.state,...Le},this.notifySubscribers()}getState(){return{...this.state}}getToken(){return this.sessionToken}getParentSize(){return this.parentSize}incrementAttempts(){this.setState({attempts:this.state.attempts+1})}resetAttempts(){this.setState({attempts:0})}canRetry(){return this.state.attempts<this.getMaxAttempts()}getAttemptsLeft(){return Math.max(0,this.getMaxAttempts()-this.state.attempts)}async initialize(Le){var tt,nt;if(this.setState({isLoading:!0,errorDetails:null,flowOutcome:"pending",attempts:0,successData:null,sessionToken:Le.sessionToken}),this.parentSize=(tt=Le.parentSize)!=null&&tt.width&&((nt=Le.parentSize)!=null&&nt.height)?Le.parentSize:this.parentSize,this.sessionToken=Le.sessionToken,this.sessionToken&&Le.uiConfig){const ft=await getTheme(this.sessionToken);this.uiConfig=mergeUiConfig(Le.uiConfig,ft)}if(Le.captureConfig)this.captureConfig=Le.captureConfig;else try{this.flow=await this.fetchFlowConfiguration(this.sessionToken)}catch(ft){console.error("Failed to initialize FlowManager:",ft),this.setState({errorDetails:{message:"Failed to initialize FlowManager",error:ft,code:"FETCH_FLOW_ERROR"},isLoading:!1,flowOutcome:"error",currentStep:"error"});return}this.captureConfiguration=this.getCaptureConfiguration();const Ye=await this.determineInitialStep(this.captureConfiguration);this.setState({currentStep:Ye,isLoading:!1})}reset(){this.state={...this.initialState},this.flow=null,this.sessionToken=null,this.captureConfiguration=null,this.captureConfig=null,this.setState(this.state)}fetchFlowConfiguration(Le){return getFlow$1(Le)}getFlow(){return this.flow}onClose(Le){onboardingAnalytics.update(),MlWasmJSApi$1.reset(),this.completeWithError({code:"USER_CANCELLED",message:`User cancelled the ${Le} capture flow`,error:new Error("User cancelled")})}}class FaceFlowManager extends AbstractFlowManager{constructor(){super({currentStep:null}),this.deepsightVideoRecorder=null,this.mediaRecorder=null,this.authHint=null,this.isAuth=!1,this.shouldShowTutorialInCapture=!1,this.captureOnly=!1,this.onCapture=null}setRecorders(){this.getCaptureConfiguration().isDeepsightEnabled?this.deepsightVideoRecorder=new DeepsightVideoRecorder:this.getCaptureConfiguration().isRecordingEnabled&&(this.mediaRecorder=new MediaRecorder$3({token:this.sessionToken,type:"selfie",isAuthRecording:!1}))}async initialize(Le){this.authHint=Le.authHint,this.isAuth=Le.isAuth,this.captureOnly=Le.captureOnly??!1,this.onCapture=Le.onCapture??null,this.uiConfig=Le.uiConfig??null,await super.initialize(Le),this.setRecorders()}async determineInitialStep(Le){return await this.isPermissionsEnabled()?(this.shouldShowTutorialInCapture=Le.showTutorial,"capture"):Le.showTutorial?"tutorial":"permissions"}getMaxAttempts(){var Le;return((Le=this.captureConfiguration)==null?void 0:Le.selfieCaptureAttempts)||3}goToCapture(){this.setState({currentStep:"capture"})}goToPermissions(){this.setState({currentStep:"permissions"})}goToRetries(){this.setState({currentStep:"retries"})}async completeFlow(Le){this.setState({successData:Le,flowOutcome:"success",currentStep:"success"})}reset(){this.setState({currentStep:null,successData:null,errorDetails:null,flowOutcome:null})}completeWithError(Le){this.setState({flowOutcome:"error",currentStep:"error",errorDetails:Le})}setParentSize(Le){this.parentSize=Le}getCaptureConfiguration(){return this.isAuth?{...this.getAuthConfiguration(),isRecordingEnabled:!1,showPreview:!1,assistedOnboarding:!1,mergeSessionRecordings:!1,ageAssurance:!1,skipProcessFace:!0}:this.getFaceCaptureConfiguration()}getAuthConfiguration(){var tt;const Le=this.captureConfig;if(!this.flow&&!Le)return null;if(Le)return{showTutorial:Le.showTutorial,selfieCaptureAttempts:Le.captureAttempts??Le.numberOfAttempts??3,timeout:Le.autoCaptureTimeout*1e3,numberOfTries:Le.captureAttempts??Le.numberOfAttempts??3,maskCheckEnabled:Le.maskCheckEnabled??Le.validateFaceMask,lensesCheckEnabled:Le.lensesCheckEnabled??Le.validateLenses,hatCheckEnabled:Le.hatCheckEnabled??Le.validateHeadCover,eyesClosedCheckEnabled:Le.eyesClosedCheckEnabled??Le.validateClosedEyes,isDeepsightEnabled:Le.deepsightLiveness==="VIDEOLIVENESS"};const Ye=(tt=this.flow.flowModules.find(nt=>nt.key==="AUTHENTICATION"))==null?void 0:tt.configuration;return Ye?{showTutorial:Ye.showTutorial,selfieCaptureAttempts:Ye.numberOfAttempts,timeout:Ye.autoCaptureTimeout*1e3,numberOfTries:Ye.numberOfAttempts,maskCheckEnabled:Ye.validateFaceMask,lensesCheckEnabled:Ye.validateLenses,hatCheckEnabled:Ye.validateHeadCover,eyesClosedCheckEnabled:Ye.validateClosedEyes,isDeepsightEnabled:Ye.deepsightLiveness==="VIDEOLIVENESS"}:(this.completeWithError({code:"MODULE_NOT_FOUND",message:"Authentication module not found",error:new Error("Authentication module not found")}),null)}getFaceCaptureConfiguration(){var tt;const Le=this.captureConfig;if(!this.flow&&!Le)return null;if(Le)return{isRecordingEnabled:Le.isRecordingEnabled,showPreview:Le.showPreview,assistedOnboarding:Le.assistedOnboarding,showTutorial:Le.showTutorial,mergeSessionRecordings:!1,selfieCaptureAttempts:Le.captureAttempts??Le.numberOfAttempts??3,timeout:Le.autoCaptureTimeout*1e3,ageAssurance:Le.ageAssurance,numberOfTries:Le.captureAttempts??Le.numberOfAttempts??3,maskCheckEnabled:Le.maskCheckEnabled,lensesCheckEnabled:Le.lensesCheckEnabled,hatCheckEnabled:Le.hatCheckEnabled,eyesClosedCheckEnabled:Le.eyesClosedCheckEnabled,skipProcessFace:!0,isDeepsightEnabled:Le.deepsightLiveness==="VIDEOLIVENESS"};const Ye=(tt=this.flow.flowModules.find(nt=>nt.key==="SELFIE"))==null?void 0:tt.configuration;return Ye?{isRecordingEnabled:Ye.enableFaceRecording,showPreview:Ye.showPreview,assistedOnboarding:Ye.assistedOnboarding,showTutorial:Ye.showTutorial,mergeSessionRecordings:this.flow.mergeSessionRecordings,selfieCaptureAttempts:Ye.captureAttempts,timeout:Ye.autoCaptureTimeout*1e3,ageAssurance:this.flow.ageAssurance,isDeepsightEnabled:Ye.deepsightLiveness==="VIDEOLIVENESS",numberOfTries:Ye.captureAttempts,maskCheckEnabled:Ye.validateFaceMask,lensesCheckEnabled:Ye.validateLenses,hatCheckEnabled:Ye.validateHeadCover,eyesClosedCheckEnabled:Ye.validateClosedEyes,skipProcessFace:!0}:(this.completeWithError({code:"MODULE_NOT_FOUND",message:"Selfie module not found",error:new Error("Selfie module not found")}),null)}completeCaptureOnlyFlow(Le,Ye){var At;if(!this.captureOnly||!this.onCapture)return;const{blob:tt,url:nt}=Le.getBlobData(),ft=Le.getBase64Image();this.deepsightVideoRecorder||this.onCapture({image:{imageBase64:ft,blob:tt,url:nt},metadata:Ye});const ht=(At=this.deepsightVideoRecorder)==null?void 0:At.trimmedVideoBlob;if(!ht)throw new Error("Failed to get trimmed video");const gt=URL.createObjectURL(ht);this.onCapture({image:{imageBase64:ft,blob:tt,url:nt},metadata:Ye,trimmedVideo:{blob:ht,url:gt,mimeType:ht.type}})}onClose(){super.onClose(FlowType.FACE)}}const faceFlowManager=new FaceFlowManager,useFaceFlowState=()=>{const[Be,Le]=React.useState(faceFlowManager.getState());return React.useEffect(()=>{const Ye=faceFlowManager.subscribe(tt=>{Le(tt)});return()=>{Ye()}},[]),{...Be,goToCapture:faceFlowManager.goToCapture.bind(faceFlowManager),goToPermissions:faceFlowManager.goToPermissions.bind(faceFlowManager),completeFlow:faceFlowManager.completeFlow.bind(faceFlowManager),completeWithError:faceFlowManager.completeWithError.bind(faceFlowManager),reset:faceFlowManager.reset.bind(faceFlowManager),deepsightVideoRecorder:faceFlowManager.deepsightVideoRecorder,mediaRecorder:faceFlowManager.mediaRecorder,captureConfiguration:faceFlowManager.getCaptureConfiguration(),uiConfig:faceFlowManager.uiConfig,shouldShowTutorialInCapture:faceFlowManager.shouldShowTutorialInCapture,captureOnly:faceFlowManager.captureOnly,onCapture:faceFlowManager.onCapture,completeCaptureOnlyFlow:faceFlowManager.completeCaptureOnlyFlow.bind(faceFlowManager)}},Tutorial$2=({onContinue:Be,onClose:Le,isLoading:Ye})=>{const{t:tt}=useTranslation$1(),{uiConfig:nt,captureConfiguration:ft}=useFaceFlowState();return jsxRuntimeExports.jsx(BaseTutorial,{title:ft.ageAssurance?tt("face.tutorial.ageAssuranceTitle"):tt("face.tutorial.title"),subtitle:ft.ageAssurance?tt("face.tutorial.ageAssuranceSubtitle"):tt("face.tutorial.subtitle"),animationData:tutorialAnimationJson$2,onContinue:Be,buttonText:ft.ageAssurance?tt("face.tutorial.ageAssuranceStartCapture"):tt("face.tutorial.startCapture"),disclaimerText:tt("face.tutorial.autoCapture"),uiConfig:nt,onClose:Le,isLoading:Ye})},FACE_ERROR_CODES={FACE_OCCLUDED:"FACE_OCCLUDED",LIVENESS:"LIVENESS_ERROR",BRIGHTNESS:"BRIGHTNESS_ERROR",LENSES:"LENSES_ERROR",MASK:"MASK_ERROR",CLOSED_EYES:"CLOSED_EYES_ERROR",HEAD_COVER:"HEAD_COVER_ERROR",SERVER:"SERVER_ERROR",FACE_NOT_FOUND:"FACE_NOT_FOUND",MULTIPLE_FACES:"MULTIPLE_FACES",TOO_BLURRY:"TOO_BLURRY_ERROR",TOO_DARK:"TOO_DARK_ERROR",USER_IS_NOT_RECOGNIZED:"USER_IS_NOT_RECOGNIZED",SPOOF_ATTEMPT_DETECTED:"SPOOF_ATTEMPT_DETECTED",FACE_TOO_DARK:"FACE_TOO_DARK",LENSES_DETECTED:"LENSES_DETECTED",FACE_MASK_DETECTED:"FACE_MASK_DETECTED",CLOSED_EYES_DETECTED:"CLOSED_EYES_DETECTED",HEAD_COVER_DETECTED:"HEAD_COVER_DETECTED",FACE_CROPPING_FAILED:"FACE_CROPPING_FAILED",FACE_TOO_SMALL:"FACE_TOO_SMALL",FACE_TOO_BLURRY:"FACE_TOO_BLURRY",BAD_PHOTO_QUALITY:"BAD_PHOTO_QUALITY",PROCESSING_ERROR:"PROCESSING_ERROR",BAD_REQUEST:"BAD_REQUEST",NONEXISTENT_CUSTOMER:"NONEXISTENT_CUSTOMER",HINT_NOT_PROVIDED:"HINT_NOT_PROVIDED",SELFIE_IMAGE_LOW_QUALITY:"SELFIE_IMAGE_LOW_QUALITY"},handleScreenEvent$1=(Be,Le,Ye)=>{addScreenEvent({module:eventModuleNames.selfie,screen:Le,token:Be,shouldOpen:Ye,payload:{moduleVersion:"2"}})},isKnownError=Be=>Object.values(FACE_ERROR_CODES).some(Le=>Le===Be.message),handleError$1=(Be,Le)=>{throw handleScreenEvent$1(Be,eventScreenNames.faceCaptureUpload,!1),handleScreenEvent$1(Be,eventScreenNames.faceCaptureError,!0),new Error(Le)},sendFaceImage=async({canvas:Be,faceCoordinates:Le,sessionToken:Ye,imageType:tt="selfie"})=>{var nt,ft,ht;try{faceFlowManager.incrementAttempts(),handleScreenEvent$1(Ye,eventScreenNames.faceCaptureUpload,!0);const gt=Be.getBase64Image();await onboardingAnalytics.analyzeFrame(gt),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const At=await MlWasmJSApi$1.encryptImage(gt);addEvent({token:Ye,code:"captureAttemptFinished",module:eventModuleNames.selfie,payload:{logs:onboardingAnalytics.getPipelineLogs(),moduleVersion:"2"}}),addDeviceStats(Ye,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const xt=await capture({token:Ye,image:At,type:"selfie",imageType:tt,encrypted:!0,faceCoordinates:Le,recordingId:(nt=faceFlowManager.deepsightVideoRecorder)==null?void 0:nt.recordingId,metadata:onboardingAnalytics.getMetadata()});return xt.confidence!==0&&handleError$1(Ye,FACE_ERROR_CODES.LIVENESS),xt.isBright||handleError$1(Ye,FACE_ERROR_CODES.BRIGHTNESS),xt.hasLenses&&handleError$1(Ye,FACE_ERROR_CODES.LENSES),xt.hasFaceMask&&handleError$1(Ye,FACE_ERROR_CODES.MASK),xt.hasClosedEyes&&handleError$1(Ye,FACE_ERROR_CODES.CLOSED_EYES),xt.hasHeadCover&&handleError$1(Ye,FACE_ERROR_CODES.HEAD_COVER),xt.liveness=xt.confidence===0,xt.imageBase64=gt,handleScreenEvent$1(Ye,eventScreenNames.faceCaptureUpload,!1),handleScreenEvent$1(Ye,eventScreenNames.faceCaptureSuccess,!0),xt}catch(gt){const At=gt,{status:xt}=At;if(gt instanceof Error&&isKnownError(gt))throw gt;if(xt===400){const Et=(ht=(ft=At.response)==null?void 0:ft.data)==null?void 0:ht.status,yt={3004:FACE_ERROR_CODES.FACE_NOT_FOUND,3005:FACE_ERROR_CODES.FACE_NOT_FOUND,3006:FACE_ERROR_CODES.TOO_BLURRY,3007:FACE_ERROR_CODES.TOO_DARK,4010:FACE_ERROR_CODES.MULTIPLE_FACES,4019:FACE_ERROR_CODES.FACE_NOT_FOUND,4077:FACE_ERROR_CODES.BAD_PHOTO_QUALITY,4078:FACE_ERROR_CODES.FACE_OCCLUDED},Ct=Et?yt[Et]:null;throw Ct&&handleError$1(Ye,Ct),new Error(FACE_ERROR_CODES.SERVER)}throw new Error(FACE_ERROR_CODES.SERVER)}},handleScreenEvent=(Be,Le,Ye)=>{addScreenEvent({module:eventModuleNames.authFace,screen:Le,token:Be,shouldOpen:Ye})},handleError=(Be,Le)=>{throw handleScreenEvent(Be,eventScreenNames.authFaceUpload,!1),handleScreenEvent(Be,eventScreenNames.authFaceError,!0),new Error(Le)},sendAuthFaceImage=async({canvas:Be,faceCoordinates:Le,sessionToken:Ye})=>{var tt;try{faceFlowManager.incrementAttempts(),handleScreenEvent(Ye,eventScreenNames.authFaceUpload,!0);const nt=Be.getBase64Image();await onboardingAnalytics.analyzeFrame(nt),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const ft=await MlWasmJSApi$1.encryptImage(nt);addEvent({token:Ye,code:"captureAttemptFinished",module:eventModuleNames.authFace,payload:{logs:onboardingAnalytics.getPipelineLogs()}}),addDeviceStats(Ye,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const ht=await capture({type:"authFace",token:Ye,image:ft,authHint:faceFlowManager.authHint,encrypted:!0,faceCoordinates:Le,recordingId:(tt=faceFlowManager.deepsightVideoRecorder)==null?void 0:tt.recordingId,metadata:onboardingAnalytics.getMetadata()});if(ht.overallStatus!=="PASS"){if(faceFlowManager.getAttemptsLeft()===0){handleScreenEvent(Ye,eventScreenNames.authFaceUpload,!1),handleScreenEvent(Ye,eventScreenNames.authFaceError,!0),faceFlowManager.completeWithError({code:"NO_MORE_ATTEMPTS",message:"No more attempts",error:new Error("No more attempts")});return}throw ht.error.name==="SPOOF_ATTEMPT_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.SPOOF_ATTEMPT_DETECTED),ht.error.name==="FACE_TOO_DARK"&&handleError(Ye,FACE_ERROR_CODES.FACE_TOO_DARK),ht.error.name==="LENSES_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.LENSES_DETECTED),ht.error.name==="FACE_MASK_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.FACE_MASK_DETECTED),ht.error.name==="CLOSED_EYES_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.CLOSED_EYES_DETECTED),ht.error.name==="HEAD_COVER_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.HEAD_COVER_DETECTED),ht.error.name==="FACE_NOT_FOUND"&&handleError(Ye,FACE_ERROR_CODES.FACE_NOT_FOUND),ht.error.name==="FACE_CROPPING_FAILED"&&handleError(Ye,FACE_ERROR_CODES.FACE_CROPPING_FAILED),ht.error.name==="FACE_TOO_SMALL"&&handleError(Ye,FACE_ERROR_CODES.FACE_TOO_SMALL),ht.error.name==="FACE_TOO_BLURRY"&&handleError(Ye,FACE_ERROR_CODES.FACE_TOO_BLURRY),ht.error.name==="BAD_PHOTO_QUALITY"&&handleError(Ye,FACE_ERROR_CODES.BAD_PHOTO_QUALITY),ht.error.name==="PROCESSING_ERROR"&&handleError(Ye,FACE_ERROR_CODES.PROCESSING_ERROR),ht.error.name==="BAD_REQUEST"&&handleError(Ye,FACE_ERROR_CODES.BAD_REQUEST),ht.error.name==="SERVER"&&handleError(Ye,FACE_ERROR_CODES.SERVER),ht.error.name==="USER_IS_NOT_RECOGNIZED"&&handleError(Ye,FACE_ERROR_CODES.USER_IS_NOT_RECOGNIZED),ht.error.name==="NONEXISTENT_CUSTOMER"&&(handleScreenEvent(Ye,eventScreenNames.authFaceUpload,!1),handleScreenEvent(Ye,eventScreenNames.authFaceError,!0),faceFlowManager.completeWithError({code:"NONEXISTENT_CUSTOMER",message:"Non-existent customer",error:new Error("Non-existent customer")})),ht.error.name==="HINT_NOT_PROVIDED"&&(handleScreenEvent(Ye,eventScreenNames.authFaceUpload,!1),handleScreenEvent(Ye,eventScreenNames.authFaceError,!0),faceFlowManager.completeWithError({code:"HINT_NOT_PROVIDED",message:"Hint not provided",error:new Error("Hint not provided")})),new Error(ht.error.name)}return ht.imageBase64=nt,ht.selfieEncryptedBase64=ft,ht.metadata=onboardingAnalytics.getMetadata(),ht}catch(nt){throw nt instanceof Error&&isKnownError(nt)?nt:new Error(FACE_ERROR_CODES.SERVER)}};class DetectionManager{constructor(){this.faceDetection=null,this.manualCaptureHasTriggered=!1,this.subscribers=[],this.config=null,this.getCanvas=null,this.processFrame=async()=>{if(!(this.state.isProcessingLocked||this.state.detectionState==="capturing"||!this.getCanvas)){if(!this.faceDetection)throw new Error("Face detection not initialized");this.setState({isProcessingLocked:!0});try{await MlWasmJSApi$1.handleDetectionCallAndUpdateState(detectionSetup.getProfile(DetectionType.Selfie).pipelineType);const Le=this.getCanvas();if(!Le)return;await this.faceDetection.detect(Le)}finally{await sleep(100),this.setState({isProcessingLocked:!1})}}},this.state={detectionState:"detecting",isProcessingLocked:!1,borderState:"idle",capturedImage:null},window.addEventListener("offline",()=>{this.setState({detectionState:"offline"}),this.stopDetection()}),window.addEventListener("online",()=>{this.setState({detectionState:"detecting"}),this.startDetection()}),this.startDetection()}setState(Le){this.state={...this.state,...Le},this.notifySubscribers()}notifySubscribers(){this.subscribers.forEach(Le=>Le(this.state))}getState(){return this.state}subscribe(Le){return this.subscribers.push(Le),Le(this.state),()=>{this.subscribers=this.subscribers.filter(Ye=>Ye!==Le)}}unsubscribe(Le){this.subscribers=this.subscribers.filter(Ye=>Ye!==Le)}setGetCanvas(Le){this.getCanvas=Le}switchToManualCapture(){addEvent({code:"switchToManualCaptureSelfie",token:faceFlowManager.getToken()}),this.stopDetection(),this.manualCaptureHasTriggered=!0,this.setState({detectionState:"manualCapture"})}async detectVirtualCamera(){const Le={canvas:null,itr:null,skipped:null};if(await MlWasmJSApi$1.poc(Le),(Le==null?void 0:Le.skipped)===!1){if(Le!=null&&Le.canvas){const tt=new IncodeCanvas(Le.canvas).getBase64Image();logFrame({token:faceFlowManager.getToken(),base64Image:tt,source:sources.selfie})}(Le==null?void 0:Le.itr)===!0?(addDeviceStats(faceFlowManager.getToken(),{virtualCameraDetected:!0}),MlWasmJSApi$1.setZc("FAIL")):MlWasmJSApi$1.setZc("PASS")}}async capture(Le,Ye){var tt,nt,ft,ht,gt,At;this.stopDetection(),this.setState({borderState:"capturing",detectionState:"capturing",capturedImage:Le.getBase64Image()}),await((tt=faceFlowManager.deepsightVideoRecorder)==null?void 0:tt.stopRecording(faceFlowManager.getToken(),faceFlowManager.captureOnly)),await this.detectVirtualCamera();try{const xt=await((nt=this.config)==null?void 0:nt.onCapture(Le,Ye));this.setState({borderState:"success",detectionState:"success"}),await sleep(3e3),(ht=(ft=this.config)==null?void 0:ft.onFinish)==null||ht.call(ft,xt)}catch(xt){this.setState({borderState:"error",detectionState:"error",capturedImage:null}),(At=(gt=this.config)==null?void 0:gt.onError)==null||At.call(gt,xt)}}async initialize(Le){this.config=Le,this.faceDetection=new FaceDetection;const Ye=faceFlowManager.getCaptureConfiguration();await this.faceDetection.initialize({onNoFace:emptyFunc,onCaptureFace:emptyFunc,onTooManyFaces:()=>this.setState({detectionState:"tooManyFaces"}),onTooClose:()=>this.setState({detectionState:"tooClose"}),onCenterFace:()=>this.setState({detectionState:"centerFace"}),onFarAway:()=>this.setState({detectionState:"tooFar"}),onGetReady:()=>this.setState({borderState:"loading",detectionState:"getReady"}),onGetReadyFinished:()=>this.setState({borderState:"idle",detectionState:"getReadyFinished"}),onBlur:()=>this.setState({detectionState:"blur"}),onDark:()=>this.setState({detectionState:"dark"}),onFaceAngle:()=>this.setState({detectionState:"faceAngle"}),onHeadWear:()=>this.setState({detectionState:"headWear"}),onLenses:()=>this.setState({detectionState:"lenses"}),onEyesClosed:()=>this.setState({detectionState:"eyesClosed"}),onFaceMask:()=>this.setState({detectionState:"faceMask"}),onSwitchToManualCapture:()=>this.switchToManualCapture(),onCapture:(tt,nt)=>this.capture(tt,nt),onFaceOccluded:()=>{},isLensesCheckEnabled:Ye.lensesCheckEnabled,isMaskCheckEnabled:Ye.maskCheckEnabled,isClosedEyesCheckEnabled:Ye.eyesClosedCheckEnabled,isHeadWearCheckEnabled:Ye.hatCheckEnabled,isVideoSelfie:!1,autocaptureTimeout:Ye.timeout,pipelineProfile:detectionSetup.getProfile(DetectionType.Selfie)})}startDetection(){if(this.manualCaptureHasTriggered){this.setState({detectionState:"manualCapture"});return}this.setState({detectionState:"detecting",isProcessingLocked:!1}),onFrameEmitter.on("newFrame",this.processFrame)}stopDetection(){onFrameEmitter.off("newFrame",this.processFrame)}}const useFaceDetection=({getCanvas:Be,onCapture:Le,onFinish:Ye,onError:tt})=>{const nt=React.useRef(null),[ft,ht]=React.useState(null),gt=React.useRef(Be),At=React.useRef(Le),xt=React.useRef(Ye),Et=React.useRef(tt);return React.useEffect(()=>{gt.current=Be,At.current=Le,xt.current=Ye,Et.current=tt},[Be,Le,Ye,tt]),React.useEffect(()=>{nt.current=new DetectionManager,ht(nt.current.getState());const yt=nt.current;yt.setGetCanvas(gt.current),yt.initialize({onCapture:(kt,vt)=>At.current(kt,vt),onFinish:kt=>{var vt;return(vt=xt.current)==null?void 0:vt.call(xt,kt)},onError:kt=>{var vt;return(vt=Et.current)==null?void 0:vt.call(Et,kt)}}),nt.current=yt;const Ct=kt=>{ht(kt)};return yt.subscribe(Ct),()=>{yt.stopDetection(),yt.unsubscribe(Ct)}},[]),{detectionState:ft==null?void 0:ft.detectionState,borderState:ft==null?void 0:ft.borderState,capturedImage:ft==null?void 0:ft.capturedImage,startDetection:()=>{var yt;return(yt=nt.current)==null?void 0:yt.startDetection()},stopDetection:()=>{var yt;return(yt=nt.current)==null?void 0:yt.stopDetection()},capture:yt=>{var Ct;return(Ct=nt.current)==null?void 0:Ct.capture(yt)}}};function useFaceCaptureAspectRatio(Be){var tt;const[Le,Ye]=React.useState();return React.useEffect(()=>{if(typeof window.CSS<"u"&&window.CSS.supports("aspect-ratio","1")){Ye(void 0);return}function ft(){var gt;const ht=((gt=Be.current)==null?void 0:gt.offsetWidth)??0;Ye(ht*1)}return ft(),window.addEventListener("resize",ft),()=>window.removeEventListener("resize",ft)},[Be,Be.current,(tt=Be.current)==null?void 0:tt.offsetWidth]),{height:Le}}const FaceFlowPage=Be=>{const{uiConfig:Le}=useFaceFlowState();return jsxRuntimeExports.jsx(FlowPage,{uiConfig:Le,onClose:()=>faceFlowManager.onClose(),onCloseCancel:Be.closeButtonOnCancel,...Be})},CaptureOverlay$1=({capturedImage:Be,detectionState:Le})=>Le!=="capturing"&&Le!=="success"?null:jsxRuntimeExports.jsx(Flex,{w:"100%",h:"100%",position:"absolute",top:0,left:0,bg:"#f5f5f6",zIndex:2,justify:"center",align:"center",children:jsxRuntimeExports.jsx(PreviewImage,{src:`data:image/jpeg;base64,${Be}`})}),defaultError={title:"Something went wrong",description:"Please try again later"},errorContent={FACE_OCCLUDED:{title:"notifications.faceOccluded",description:"notifications.faceOccludedDescription"},MASK_ERROR:{title:"notifications.mask",description:"notifications.maskDescription"},BRIGHTNESS_ERROR:{title:"notifications.brightness",description:"notifications.brightnessDescription"},LIVENESS_ERROR:{title:"notifications.spoof",description:"notifications.spoofDescription"},CLOSED_EYES_ERROR:{title:"notifications.closedEyes",description:"notifications.closedEyesDescription"},HEAD_COVER_ERROR:{title:"notifications.removeHeadwear",description:"notifications.removeHeadwearDescription"},LENSES_ERROR:{title:"notifications.lenses",description:"notifications.lensesDescription"},FACE_NOT_FOUND:{title:"notifications.faceNotFound",description:"notifications.faceNotFoundDescription"},MULTIPLE_FACES:{title:"notifications.multiple",description:"notifications.multipleDescription"},TOO_BLURRY_ERROR:defaultError,TOO_DARK_ERROR:defaultError,SERVER_ERROR:defaultError,FACE_CROPPING_FAILED:defaultError,FACE_TOO_SMALL:defaultError,PROCESSING_ERROR:defaultError,BAD_REQUEST:defaultError,USER_IS_NOT_RECOGNIZED:{title:"notifications.accessDenied",description:"notifications.accessDeniedDescription"},SPOOF_ATTEMPT_DETECTED:{title:"notifications.spoof",description:"notifications.spoofDescription"},FACE_TOO_DARK:{title:"notifications.brightness",description:"notifications.brightnessDescription"},LENSES_DETECTED:{title:"notifications.lenses",description:"notifications.lensesDescription"},FACE_MASK_DETECTED:{title:"notifications.mask",description:"notifications.maskDescription"},CLOSED_EYES_DETECTED:{title:"notifications.closedEyes",description:"notifications.closedEyesDescription"},HEAD_COVER_DETECTED:{title:"notifications.removeHeadwear",description:"notifications.removeHeadwearDescription"},FACE_TOO_BLURRY:{title:"notifications.spoof",description:"notifications.spoofDescription"},BAD_PHOTO_QUALITY:{title:"notifications.lowQualityImage",description:"notifications.lowQualityImageDescription"},NONEXISTENT_CUSTOMER:{title:"notifications.nonexistentCustomer",description:"notifications.nonexistentCustomerDescription"},HINT_NOT_PROVIDED:{title:"notifications.hintNotProvided",description:"notifications.hintNotProvidedDescription"},SELFIE_IMAGE_LOW_QUALITY:{title:"notifications.selfieImageLowQuality",description:"notifications.selfieImageLowQualityDescription"}},ErrorModalContent=({title:Be,description:Le,attemptsText:Ye,buttonText:tt,icon:nt,onButtonClick:ft,onCloseCancel:ht})=>{const gt=useTokens();return jsxRuntimeExports.jsx(Modal$3,{open:!0,children:jsxRuntimeExports.jsx(FaceFlowPage,{"data-testid":"face-capture-error-modal",onCloseCancel:ht,children:jsxRuntimeExports.jsx(Flex,{align:"center",justify:"center",direction:"column",wFull:!0,hFull:!0,children:jsxRuntimeExports.jsxs(Flex,{wFull:!0,hFull:!0,bg:gt.color.surface.neutral.light,minW:"320px",direction:"column",justify:"space-between",px:2,children:[jsxRuntimeExports.jsx(Box,{}),jsxRuntimeExports.jsxs(Flex,{direction:"column",align:"center",children:[nt,jsxRuntimeExports.jsx(Spacer,{size:6}),jsxRuntimeExports.jsx(Text$7,{as:"h2",fontSize:gt.typography.fontSize["2xl"],fontWeight:700,textAlign:"center",lineHeight:"114%",letterSpacing:"-0.5px",children:Be}),jsxRuntimeExports.jsx(Spacer,{size:4}),jsxRuntimeExports.jsx(Text$7,{as:"p",fontSize:gt.typography.fontSize.base,textAlign:"center",color:gt.color.text.body.secondary,fontWeight:500,lineHeight:"114%",letterSpacing:"-0.5px",children:Le})]}),jsxRuntimeExports.jsxs(Flex,{direction:"column",align:"center",children:[jsxRuntimeExports.jsx(Text$7,{as:"p",fontSize:gt.typography.fontSize.lg,textAlign:"center",color:gt.color.text.body.secondary,fontWeight:500,lineHeight:"114%",letterSpacing:"-0.5px",children:Ye}),jsxRuntimeExports.jsx(Spacer,{size:6}),jsxRuntimeExports.jsx(Button$b,{onClick:ft,children:tt})]})]})})})})},NoMoreAttemptsModal=({title:Be,onContinue:Le,onCloseCancel:Ye})=>{const{t:tt}=useTranslation$1();return jsxRuntimeExports.jsx(ErrorModalContent,{title:Be,description:tt("notifications.selfieCaptureFailedDescription"),attemptsText:tt("notifications.noAttemptsRemaining"),buttonText:tt("common.continue"),icon:jsxRuntimeExports.jsx(ErrorIcon$1,{}),onButtonClick:Le,onCloseCancel:Ye})},RetryErrorModal=({title:Be,description:Le,attemptsRemaining:Ye,onTryAgain:tt,onCloseCancel:nt})=>{const{t:ft}=useTranslation$1();return jsxRuntimeExports.jsx(ErrorModalContent,{title:Be,description:ft(Le),attemptsText:ft("common.attemptsRemaining",{count:Ye}),buttonText:ft("common.tryAgain"),icon:jsxRuntimeExports.jsx(WarningIcon,{}),onButtonClick:tt,onCloseCancel:nt})},ErrorModal=({error:Be,onTryAgain:Le,onContinue:Ye,onCloseCancel:tt})=>{const{attempts:nt,captureConfiguration:ft}=useFaceFlowState(),{t:ht}=useTranslation$1();if(!Be)return null;const{title:gt,description:At}=errorContent[Be]??defaultError,xt=ft.selfieCaptureAttempts-nt;return xt<=0?jsxRuntimeExports.jsx(NoMoreAttemptsModal,{title:ht(gt),onContinue:Ye,onCloseCancel:tt}):jsxRuntimeExports.jsx(RetryErrorModal,{title:ht(gt),description:At,attemptsRemaining:xt,onTryAgain:Le,onCloseCancel:tt})},SvgOutline=Be=>React__namespace.createElement("svg",{width:292,height:272,viewBox:"0 0 292 272",fill:"none",xmlns:"http://www.w3.org/2000/svg",...Be},React__namespace.createElement("path",{opacity:.8,d:"M145.633 8.0625C115.606 8.06268 85.6206 26.5984 76.9712 54.293L76.771 54.9492C70.4539 76.1063 75.0139 100.802 76.8687 110.58L77.3628 113.188L75.1528 114.656C66.1187 120.66 63.5861 124.089 62.8472 126.92C62.4669 128.377 62.4644 130.035 62.8003 132.412C63.1635 134.983 63.7533 137.484 64.4233 141.347L64.5142 141.841C65.5056 146.956 68.1062 152.133 71.2749 156.618C74.5527 161.257 78.2056 164.826 80.7349 166.584L82.4517 167.777V169.869C82.4517 177.866 85.3476 186.144 89.6763 194.128C93.9906 202.085 99.5748 209.473 104.623 215.646L105.526 216.751V218.178C105.526 220.891 105.68 223.73 105.801 226.9C105.92 230.011 106.003 233.347 105.828 236.771C105.475 243.652 104.077 251.044 99.7446 258.227C91.1977 272.397 72.1081 284.401 31.8677 291.776L29.936 292.124C-41.1597 304.684 -61.4563 361.617 -63.2153 392.062H145.633V400.062H-71.3638L-71.3462 396.044C-71.2048 364.597 -50.9804 298.295 28.5444 284.246L30.4448 283.904C69.9919 276.654 86.1642 265.253 92.894 254.095C96.3216 248.412 97.5261 242.442 97.8374 236.362C97.9939 233.307 97.9241 230.262 97.8071 227.206C97.7111 224.697 97.5799 222.105 97.5396 219.615C92.5931 213.5 87.048 206.064 82.644 197.941C78.308 189.944 74.9442 181.04 74.5024 171.896C71.3932 169.387 67.8531 165.638 64.7417 161.234C61.1656 156.173 57.9337 149.942 56.6587 143.353L56.5415 142.714C55.9864 139.514 55.2491 136.155 54.8784 133.531C54.4806 130.715 54.3377 127.843 55.106 124.899C56.5344 119.427 60.7885 114.886 68.5259 109.489C66.4692 98.2995 62.7062 74.0938 69.106 52.6602L69.3345 51.9092C79.2266 20.2173 112.853 0.0626788 145.633 0.0625V8.0625ZM145.635 0.0625C178.415 0.0625 212.042 20.2172 221.934 51.9092L222.163 52.6602C228.562 74.0938 224.799 98.2996 222.743 109.489C230.48 114.886 234.734 119.427 236.163 124.899C236.931 127.843 236.788 130.715 236.39 133.531C236.019 136.155 235.282 139.514 234.727 142.714L234.61 143.353C233.335 149.942 230.103 156.173 226.527 161.234C223.415 165.638 219.875 169.387 216.766 171.896C216.324 181.04 212.961 189.944 208.625 197.941C204.221 206.064 198.676 213.5 193.729 219.615C193.689 222.105 193.557 224.697 193.461 227.206C193.344 230.262 193.275 233.307 193.431 236.362C193.742 242.442 194.947 248.412 198.375 254.095C205.104 265.253 221.277 276.654 260.824 283.904L262.724 284.246C342.249 298.294 362.473 364.597 362.615 396.044L362.632 400.062H145.635V392.062H354.484C352.725 361.616 332.429 304.683 261.333 292.124L259.401 291.776C219.161 284.401 200.071 272.397 191.524 258.227C187.192 251.044 185.793 243.652 185.441 236.771C185.266 233.347 185.348 230.011 185.467 226.9C185.589 223.73 185.743 220.891 185.743 218.178V216.751L186.646 215.646C191.694 209.473 197.278 202.085 201.592 194.128C205.921 186.144 208.817 177.866 208.817 169.869V167.777L210.534 166.584C213.063 164.826 216.716 161.257 219.994 156.618C223.162 152.133 225.763 146.956 226.754 141.841L226.845 141.347C227.515 137.484 228.105 134.983 228.468 132.412C228.804 130.034 228.802 128.377 228.421 126.92C227.682 124.089 225.15 120.66 216.116 114.656L213.906 113.188L214.4 110.58C216.255 100.802 220.815 76.1064 214.498 54.9492L214.297 54.293C205.648 26.5983 175.662 8.0625 145.635 8.0625V0.0625Z",fill:"white"})),FaceOutline=({height:Be="100%"})=>jsxRuntimeExports.jsx(Box,{position:"absolute",bottom:0,left:"50%",transform:"translateX(-50%)",zIndex:1,h:Be,children:jsxRuntimeExports.jsx(SvgOutline,{title:"Outline",height:"100%"})});function getFill(Be,Le){return Be==="loading"||Be==="capturing"?`url(#paint0_radial_2423_448_${Le.replace("#","")})`:Le}const StyledPath=dt.path`
|
|
3727
|
+
`,BaseTutorial=({title:Be,subtitle:Le,animationData:Ye,onContinue:tt,buttonText:nt,uiConfig:ft,disclaimerText:ht,onClose:gt,isLoading:At=!1})=>{var yt,Ct,kt,vt,bt,It,wt,Rt,Tt,Bt,Dt,Pt,Nt;const{t:xt}=useTranslation$1(),Et=useTokens();return jsxRuntimeExports.jsx(Page$1,{title:Be,subtitle:Le,closeButton:{show:(yt=ft==null?void 0:ft.closeButton)==null?void 0:yt.show,position:(Ct=ft==null?void 0:ft.closeButton)==null?void 0:Ct.position,offset:(kt=ft==null?void 0:ft.closeButton)==null?void 0:kt.offset,onClose:gt},hideHeaderBranding:(vt=ft==null?void 0:ft.branding)==null?void 0:vt.hideHeaderBranding,...(It=(bt=ft==null?void 0:ft.branding)==null?void 0:bt.logo)!=null&&It.src||(Rt=(wt=ft==null?void 0:ft.branding)==null?void 0:wt.logo)!=null&&Rt.height?{logo:{src:(Bt=(Tt=ft==null?void 0:ft.branding)==null?void 0:Tt.logo)==null?void 0:Bt.src,height:(Pt=(Dt=ft==null?void 0:ft.branding)==null?void 0:Dt.logo)==null?void 0:Pt.height}}:{},hideFooterBranding:(Nt=ft==null?void 0:ft.branding)==null?void 0:Nt.hideFooterBranding,"data-testid":"base-tutorial-container",children:jsxRuntimeExports.jsxs(Flex,{direction:"column",justify:"space-between",flex:1,children:[jsxRuntimeExports.jsx(LottieContainer,{hFull:!0,xsH:"250px",$color:Et.color.surface.primary[500],px:6,xsPx:0,maxW:"400px",m:"auto",children:jsxRuntimeExports.jsx(Lottie,{animationData:replaceLottieColor(Ye,Et.color.surface.primary[500]),loop:!0,autoplay:!0,style:{height:"100%"}})}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Text$7,{fontSize:Et.typography.fontSize.lg,textAlign:"center",color:Et.color.text.body.secondary,lineHeight:"114%",fontWeight:500,letterSpacing:"-0.5px",py:3,children:ht||xt("idv2.tutorial.autoCapture")}),jsxRuntimeExports.jsx(Box,{px:2,py:4,children:jsxRuntimeExports.jsx(Button$b,{onClick:tt,"data-testid":"tutorial-continue-button",isLoading:At,children:nt||xt("idv2.tutorial.startScan")})})]})]})})},fr$7=60,v$7="5.9.6",ip$7=0,op$7=239,w$7=296,h$8=296,nm$7="selfietuto",ddd$7=0,markers$7=[],assets$7=[{nm:"faceloop",fr:60,id:"m256ex281vb8hdk2ys3",layers:[{ty:3,ddd:0,ind:4,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:5,hd:!1,nm:"faceloop - Null",sr:1,parent:4,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:6,hd:!1,nm:"faceloop - Shape Mask",sr:1,parent:5,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[.01,0],[295.99,0],[296,.01],[296,295.99],[295.99,296],[.01,296],[0,295.99],[0,.01],[.01,0],[.01,0]],i:[[0,0],[0,0],[0,-.0055],[0,0],[.0055,0],[0,0],[0,.0055],[0,0],[-.0055,0],[0,0]],o:[[0,0],[.005519999999989977,0],[0,0],[0,.005519999999989977],[0,0],[-.00552,0],[0,0],[0,-.00552],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:[0,1,0,1]},nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]}]},{nm:"selfiescan2",fr:60,id:"m256ews56opa1de42ut",layers:[{ty:3,ddd:0,ind:7,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:8,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:7,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:9,hd:!1,nm:"selfietuto - Shape Mask",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[.01,0],[295.99,0],[296,.01],[296,295.99],[295.99,296],[.01,296],[0,295.99],[0,.01],[.01,0],[.01,0]],i:[[0,0],[0,0],[0,-.0055],[0,0],[.0055,0],[0,0],[0,.0055],[0,0],[-.0055,0],[0,0]],o:[[0,0],[.005519999999989977,0],[0,0],[0,.005519999999989977],[0,0],[-.00552,0],[0,0],[0,-.00552],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:[0,1,0,1]},nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]}]},{nm:"Group 39567",fr:60,id:"m256ewscxedd0m9wt7o",layers:[{ty:3,ddd:0,ind:10,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:11,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:10,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:12,hd:!1,nm:"Group 39567 - Null",sr:1,parent:11,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ddd:0,ind:13,ty:0,nm:"selfiescan2",td:1,refId:"m256ews56opa1de42ut",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0},{ty:4,ddd:0,ind:14,hd:!1,nm:"selfietuto - Shape Mask",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[.01,0],[295.99,0],[296,.01],[296,295.99],[295.99,296],[.01,296],[0,295.99],[0,.01],[.01,0],[.01,0]],i:[[0,0],[0,0],[0,-.0055],[0,0],[.0055,0],[0,0],[0,.0055],[0,0],[-.0055,0],[0,0]],o:[[0,0],[.005519999999989977,0],[0,0],[0,.005519999999989977],[0,0],[-.00552,0],[0,0],[0,-.00552],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:[0,1,0,1]},nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}],tt:1}]},{nm:"User 07a",fr:60,id:"m256ewtth2xv0t9qlhe",layers:[{ty:3,ddd:0,ind:15,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:16,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:15,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:17,hd:!1,nm:"Group 39567 - Null",sr:1,parent:16,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:18,hd:!1,nm:"User 07a - Null",sr:1,parent:17,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ddd:0,ind:19,ty:0,nm:"Group 39567",td:1,refId:"m256ewscxedd0m9wt7o",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0},{ty:4,ddd:0,ind:20,hd:!1,nm:"User 07a - Shape Mask",sr:1,parent:18,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[.01,0],[324.5782,0],[324.5882,.01],[324.5882,324.5782],[324.5782,324.5882],[.01,324.5882],[0,324.5782],[0,.01],[.01,0],[.01,0]],i:[[0,0],[0,0],[0,-.0055],[0,0],[.0055,0],[0,0],[0,.0055],[0,0],[-.0055,0],[0,0]],o:[[0,0],[.005519999999989977,0],[0,0],[0,.005519999999989977],[0,0],[-.00552,0],[0,0],[0,-.00552],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:[0,1,0,1]},nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}],tt:1}]},{nm:"faceloop",fr:60,id:"m6p6j2c0qs37vm69",layers:[{ty:3,ddd:0,ind:61,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:62,hd:!1,nm:"faceloop - Null",sr:1,parent:61,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:23,hd:!1,nm:"Ellipse 191 (Stroke) - Null",sr:1,parent:62,ks:{a:{a:0,k:[148,148]},o:{a:0,k:100},p:{a:0,k:[148,148]},r:{a:1,k:[{t:0,s:[0],o:{x:[0],y:[0]},i:{x:[1],y:[1]}},{t:120,s:[360],o:{x:[0],y:[0]},i:{x:[1],y:[1]}},{t:240,s:[720]}]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:24,hd:!1,nm:"Ellipse 191 (Stroke)",sr:1,parent:23,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:4,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[148,287],[287,148],[148,9],[9,148],[148,287],[148,287]],i:[[0,0],[0,76.7676],[76.7676,0],[0,-76.7676],[-76.7676,0],[0,0]],o:[[76.76758000000001,0],[0,-76.76758],[-76.76758,0],[0,76.76758000000001],[0,0],[0,0]]}}},{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[148,296],[296,148],[148,0],[0,148],[148,296],[148,296]],i:[[0,0],[0,81.7381],[81.7381,0],[0,-81.7381],[-81.7381,0],[0,0]],o:[[81.73813999999999,0],[0,-81.73814],[-81.73814,0],[0,81.73813999999999],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:2,k:{a:0,k:[0,0,.47843137254901963,1,1,0,.47843137254901963,1,0,1,1,0]}},s:{a:0,k:[24.51807347262285,30.75903457240274]},e:{a:0,k:[217.54216853549255,256.7710909118675]},t:1,nm:"Fill",hd:!1,r:2},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]}]},{nm:"User 07a",fr:60,id:"m6p6j2c85ejf13b5",layers:[{ty:3,ddd:0,ind:52,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:53,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:52,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:54,hd:!1,nm:"Group 39567 - Null",sr:1,parent:53,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:55,hd:!1,nm:"User 07a - Null",sr:1,parent:54,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:29,hd:!1,nm:"Ellipse 148 - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[108.8158,52.1611]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:30,hd:!1,nm:"Ellipse 148",sr:1,parent:29,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[107.2565,76.6782],[53.6282,152.0111],[-1e-4,76.6782],[53.6282,0],[107.2565,76.6782],[107.2565,76.6782]],i:[[0,0],[23.5084,0],[0,41.6052],[-50.6702,0],[0,-37.926],[0,0]],o:[[0,41.60524000000001],[-25.71208,0],[0,-37.06891],[50.67023,0],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:2,k:{a:0,k:[0,.8784313725490196,.8784313725490196,.8784313725490196,1,1,1,1]}},s:{a:0,k:[6.591940610097922,75.2952207378632]},e:{a:0,k:[82.34462772765323,75.58141690773564]},t:1,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:31,hd:!1,nm:"Vector 14 - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[224.0092,121.5657]},r:{a:0,k:174.0696},s:{a:0,k:[99.62,-100.33000000000001]},sk:{a:0,k:-1.81},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:32,hd:!1,nm:"Vector 14",sr:1,parent:31,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[3.8354,2.7538],[14.3511,5.0967],[14.3511,33.9922],[8.4362,37.8555],[.8778,19.154],[3.8354,2.7538],[3.8354,2.7538]],i:[[0,0],[-1.6431,-3.254],[0,0],[3.9434,0],[.6572,5.0763],[-5.5865,7.4191],[0,0]],o:[[4.46918,-5.9353],[0,0],[-.3285499999999999,2.4730399999999975],[-4.92925,0],[-.65723,-5.07625],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:3,k:{a:0,k:[.0417,.7098039215686275,.7098039215686275,.7098039215686275,.3625,.8862745098039215,.8862745098039215,.8862745098039215,1,1,1,1]}},s:{a:0,k:[12.895270234498375,18.505816655260606]},e:{a:0,k:[3.4748756395564944,19.465401775061935]},t:1,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:33,hd:!1,nm:"Vector 13 - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[98.7625,119.8784]},r:{a:0,k:-5.3845},s:{a:0,k:[99.65,100.29999999999998]},sk:{a:0,k:1.81},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:34,hd:!1,nm:"Vector 13",sr:1,parent:33,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[3.8354,2.7538],[14.3511,5.0967],[14.3511,33.9922],[8.4362,37.8555],[.8778,19.154],[3.8354,2.7538],[3.8354,2.7538]],i:[[0,0],[-1.6431,-3.254],[0,0],[3.9434,0],[.6572,5.0763],[-5.5865,7.4191],[0,0]],o:[[4.469190000000001,-5.9353],[0,0],[-.3285499999999999,2.4730399999999975],[-4.92925,0],[-.65723,-5.07625],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:3,k:{a:0,k:[.1719,.7411764705882353,.7411764705882353,.7411764705882353,.6406,.8823529411764706,.8823529411764706,.8823529411764706,1,.8666666666666667,.8666666666666667,.8666666666666667]}},s:{a:0,k:[12.895270234498375,18.505816655260606]},e:{a:0,k:[3.4748756395564944,19.465401775061935]},t:1,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:35,hd:!1,nm:"Intersect - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[73.3813,221.1284]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:36,hd:!1,nm:"Intersect",sr:1,parent:35,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[176.9562,14.2579],[88.3045,51.5579],[-1e-4,14.6114],[42.8361,.0076],[86.6769,22.2946],[134.9533,0],[176.9562,14.2579],[176.9562,14.2579]],i:[[0,0],[34.738,0],[22.4871,22.8082],[0,0],[-18.981,-.4651],[-6.5668,12.3875],[-21.0564,-8.5561],[0,0]],o:[[-22.511949999999985,23.015520000000002],[-34.55984,0],[21.33035,-8.74771],[6.316929999999999,11.41202],[20.596860000000007,.5046900000000001],[0,0],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:100},c:{a:0,k:"replaceColorWithYours"},nm:"Fill",hd:!1,r:2},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:37,hd:!1,nm:"Combined Shape - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[102.6816,130.9973]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:38,hd:!1,nm:"Combined Shape",sr:1,parent:37,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[24.9287,73.4874],[24.9287,73.954],[0,96.2222],[59.6122,122.2049],[119.2244,96.2222],[94.2957,73.9204],[94.3261,29.8559],[94.3261,29.6156],[94.4854,16.542],[24.8205,30.9221],[24.9289,73.4874],[24.9287,73.4874]],i:[[0,0],[0,0],[16.4905,-4.9742],[-19.8704,0],[-19.8704,14.4345],[.2406,9.8879],[-.0173,3.7526],[1.0839,.301],[-.0737,16.8942],[-1.039,-46.389],[-.0661,-5.3568],[0,0]],o:[[0,0],[-.1286200000000015,9.871259999999992],[19.87036,14.434470000000005],[19.870360000000005,0],[-16.378529999999998,-4.980019999999996],[0,-3.7526299999999964],[1.1846599999999938,.16672000000000153],[.03252000000000521,-12.36235],[.07370000000000232,-16.89435],[.014089999999999492,4.729930000000003],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:2,k:{a:0,k:[0,.6941176470588235,.6941176470588235,.6941176470588235,1,1,1,1]}},s:{a:0,k:[54.32503300089149,33.74278237295727]},e:{a:0,k:[54.32503300089149,91.15401515450041]},t:1,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:39,hd:!1,nm:"Intersect - Null",sr:1,parent:55,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[37.686,24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:40,hd:!1,nm:"Intersect",sr:1,parent:39,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[124,248],[248,124],[124,0],[0,124],[124,248],[124,248]],i:[[0,0],[0,68.4833],[68.4833,0],[0,-68.4833],[-68.4833,0],[0,0]],o:[[68.48331000000002,0],[0,-68.48331],[-68.48331,0],[0,68.48331000000002],[0,0],[0,0]]}}},{ty:"fl",o:{a:0,k:7.000000000000001},c:{a:0,k:[0,.47843137254901963,1,1]},nm:"Fill",hd:!1,r:2},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]}]},{nm:"[FRAME] selfietuto - Null / selfiescan2 - Null / Ellipse 194 - Null / Ellipse 194 / selfietuto - Null / selfiescan2 - Null / Group 39567 - Null / selfietuto - Null / selfiescan2 - Null / Group 39567 - Null / User 07a - Null / selfietuto - Null / selfiescan2 - Null / Group 39567 - Null / User 07a - Null / User 07a / User 07a",fr:60,id:"m6p6j2c5c0l7uggl",layers:[{ty:3,ddd:0,ind:41,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:42,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:41,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:43,hd:!1,nm:"Ellipse 194 - Null",sr:1,parent:42,ks:{a:{a:0,k:[20,20]},o:{a:1,k:[{t:40.2,s:[0],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:57.599999999999994,s:[100],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:94.2,s:[0],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:110.4,s:[100],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:144.60000000000002,s:[0]}]},p:{a:1,k:[{t:40.2,s:[1,124],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]},ti:[0,0],to:[0,0]},{t:94.2,s:[244,124],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]},ti:[0,0],to:[0,0]},{t:144.60000000000002,s:[1,124]}]},r:{a:0,k:0},s:{a:1,k:[{t:40.2,s:[150,288],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:57.599999999999994,s:[150,622],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:94.2,s:[150,231.99999999999997],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:110.4,s:[150,666],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:144.60000000000002,s:[150,288]}]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:4,ddd:0,ind:44,hd:!1,nm:"Ellipse 194",sr:1,parent:43,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:1,k:[{t:40.2,s:[0],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:57.599999999999994,s:[100],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:94.2,s:[0],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:110.4,s:[100],o:{x:[.5],y:[.35]},i:{x:[.15],y:[1]}},{t:144.60000000000002,s:[0]}]}},ao:0,ip:0,op:240,st:0,bm:0,shapes:[{ty:"gr",nm:"Group",hd:!1,np:3,it:[{ty:"sh",nm:"Path",hd:!1,ks:{a:0,k:{c:!0,v:[[40,20],[20,40],[0,20],[20,0],[40,20],[40,20]],i:[[0,0],[11.046,0],[0,11.046],[-11.046,0],[0,-11.046],[0,0]],o:[[0,11.046],[-11.046,0],[0,-11.046],[11.046,0],[0,0],[0,0]]}}},{ty:"gf",o:{a:0,k:100},g:{p:6,k:{a:0,k:[0,1,1,1,.115,1,1,1,.2094,1,1,1,.7074,1,1,1,.8664,1,1,1,1,1,1,1,0,1,.115,1,.2094,.88,.7074,.23,.8664,.08,1,0]}},s:{a:0,k:[20.000004461093873,19.209036763697355]},e:{a:0,k:[20.000004461093873,.875419492625209]},t:2,nm:"Fill",hd:!1,r:1},{ty:"tr",a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}}]}]},{ty:3,ddd:0,ind:45,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:46,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:45,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:47,hd:!1,nm:"Group 39567 - Null",sr:1,parent:46,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:48,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:49,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:48,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:50,hd:!1,nm:"Group 39567 - Null",sr:1,parent:49,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:51,hd:!1,nm:"User 07a - Null",sr:1,parent:50,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:52,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:53,hd:!1,nm:"selfiescan2 - Null",sr:1,parent:52,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[24,24]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:54,hd:!1,nm:"Group 39567 - Null",sr:1,parent:53,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[-37.686,-24.6863]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:55,hd:!1,nm:"User 07a - Null",sr:1,parent:54,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ddd:0,ind:56,ty:0,nm:"User 07a",td:1,refId:"m256ewtth2xv0t9qlhe",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0},{ddd:0,ind:57,ty:0,nm:"User 07a",refId:"m6p6j2c85ejf13b5",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0,tt:1}]},{nm:"[FRAME] selfietuto - Null / selfietuto - Null / faceloop - Null / selfietuto - Null / faceloop - Null / faceloop / faceloop / selfiescan2",fr:60,id:"m6p6j2bzg8qe07hm",layers:[{ty:3,ddd:0,ind:58,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:59,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:60,hd:!1,nm:"faceloop - Null",sr:1,parent:59,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:61,hd:!1,nm:"selfietuto - Null",sr:1,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ty:3,ddd:0,ind:62,hd:!1,nm:"faceloop - Null",sr:1,parent:61,ks:{a:{a:0,k:[0,0]},o:{a:0,k:100},p:{a:0,k:[0,0]},r:{a:0,k:0},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0}},ao:0,ip:0,op:240,st:0,bm:0},{ddd:0,ind:63,ty:0,nm:"faceloop",td:1,refId:"m256ex281vb8hdk2ys3",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0},{ddd:0,ind:64,ty:0,nm:"faceloop",refId:"m6p6j2c0qs37vm69",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0,tt:1},{ddd:0,ind:65,ty:0,nm:"selfiescan2",refId:"m6p6j2c5c0l7uggl",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0}]}],layers$7=[{ddd:0,ind:1,ty:0,nm:"selfietuto",refId:"m6p6j2bzg8qe07hm",sr:1,ks:{a:{a:0,k:[0,0]},p:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},sa:{a:0,k:0},r:{a:0,k:0},o:{a:0,k:100}},ao:0,w:296,h:296,ip:0,op:240,st:0,hd:!1,bm:0}],meta$2={a:"",d:"",tc:"",g:"Aninix"},tutorialAnimationJson$2={fr:fr$7,v:v$7,ip:ip$7,op:op$7,w:w$7,h:h$8,nm:nm$7,ddd:ddd$7,markers:markers$7,assets:assets$7,layers:layers$7,meta:meta$2},defaultFlow$1={name:"",checkTutorials:!0,checkAuthorization:!0,redirectDesktopToMobile:!1,disableUnsupportedBrowserScreen:!1,qrPhishingResistance:!1,addContinueToDesktop:!1,redirectOriginOnly:!1,displayOnboardingResultOnDesktop:!1,enableMultipleOnboardings:!1,disableLaunchScreen:!1,disableSmsOption:!1,mergeSessionRecordings:!1,mandatoryConsentCheck:!0,enableSardineRisk:!1,flowModules:[{key:"PHONE",configuration:{otpVerification:!1,otpExpirationInMinutes:10,prefill:!1}},{key:"GEOLOCATION",configuration:{allowUserToSkipGeolocation:!1}},{key:"ID",configuration:{showTutorial:!0,enableId:!0,enablePassport:!0,onlyFront:!1,onlyBack:!1,barcodeCapture:!1,fetchAdditionalPage:!1,secondId:!1,thirdId:!1,autoCaptureTimeout:18,deviceIdleTimeout:60,captureAttempts:3,manualUploadIdCapture:!1,showDocumentChooserScreen:!0,enableIdRecording:!0,perCountryPerDocOverrides:{}}},{key:"ADDRESS",configuration:{disableSkipPoa:!1,title:"",text:""}},{key:"ID_OCR",configuration:{editableOcr:!1}},{key:"SELFIE",configuration:{showTutorial:!0,showPreview:!1,assistedOnboarding:!1,enableFaceRecording:!0,autoCaptureTimeout:20,captureAttempts:3,validateLenses:!0,validateFaceMask:!0,validateHeadCover:!0,validateClosedEyes:!0,validateBrightness:!0,deepsightLiveness:"SINGLE_FRAME"}},{key:"FACE_MATCH",configuration:{matchingType:"selfieVsId",disableFaceMatchAnimation:!1}},{key:"SIGNATURE",configuration:{title:"",subTitle:""}},{key:"VIDEO_ONBOARDING",configuration:{useAsSelfie:!1,showTutorials:!0,companyName:"",checkLiveness:!0,checkIdScan:!0,checkDocumentScan:!0,compareIdEnabled:!0,compareOcrEnabled:!1,compareBackIdEnabled:!1,compareBackOcrEnabled:!1,checkVoiceConsent:!0,voiceConsentQuestions:0,selfieQualityAffectsScore:!1,maxWaitingVideoSelfieFile:0,lastSecondsVideoQualityCheck:!1,lastSecondsVideoQualityCheckDuration:0}}]};function normalizeFlowModules(Be){const Le=Be.flatMap((ft,ht,gt)=>{if(ft.key==="TUTORIAL_ID"){const xt=ft.configuration,yt=[{key:"ID",configuration:xt}];return xt.secondId&&yt.push({key:"SECOND_ID",configuration:xt}),xt.thirdId&&yt.push({key:"THIRD_ID",configuration:xt}),yt}const At=gt[ht-1];return ft.key==="ID"&&(At==null?void 0:At.key)==="TUTORIAL_ID"?[]:[ft]}),Ye=ft=>ft,tt=ft=>ft.filter(ht=>ht.key!=="SELFIE");return(Le.some(ft=>ft.key==="VIDEO_ONBOARDING"&&ft.configuration.useAsSelfie===!0)?tt:Ye)(Le)}function handleResponse(Be){const Le=Be.data,Ye=normalizeFlowModules(Le.flowModules);return Le&&localStorage.setItem("ds",Le.ds?"1":"0"),{...Le,flowModules:Ye}}async function getFlow$1(Be){var Le;try{const Ye=await exports.api.get("/omni/onboarding/flow",{headers:{"X-Incode-Hardware-Id":Be}});return handleResponse(Ye)}catch(Ye){if(isAxiosError(Ye)&&((Le=Ye.response)==null?void 0:Le.status)===400)return defaultFlow$1;throw Ye}}const mergeUiConfig=(Be,Le)=>{var tt,nt;const Ye=getTokensFromDashboardTheme(Le);return{...Be,branding:{logo:Le.logo?{src:Le.logo,height:"100%"}:(tt=Be==null?void 0:Be.branding)==null?void 0:tt.logo,...Be==null?void 0:Be.branding},theming:{...Be==null?void 0:Be.theming,designTokens:{...Ye,...(nt=Be==null?void 0:Be.theming)==null?void 0:nt.designTokens}}}};var FlowType=(Be=>(Be.ID="ID",Be.FACE="Face",Be))(FlowType||{});class AbstractFlowManager{constructor(Le){this.subscribers=[],this.flow=null,this.sessionToken=null,this.captureConfig=null,this.captureConfiguration=null,this.parentSize={width:window.innerWidth,height:window.innerHeight},this.uiConfig=null;const Ye={currentStep:null,isLoading:!1,attempts:0,errorDetails:null,successData:null,flowOutcome:"pending",sessionToken:null,...Le};this.initialState=Object.freeze({...Ye}),this.state={...this.initialState}}async isPermissionsEnabled(){return navigator.permissions?(await navigator.permissions.query({name:"camera"})).state==="granted":!1}subscribe(Le){return this.subscribers.push(Le),Le(this.getState()),()=>{this.subscribers=this.subscribers.filter(Ye=>Ye!==Le)}}notifySubscribers(){const Le=this.getState();this.subscribers.forEach(Ye=>Ye(Le))}setState(Le){this.state={...this.state,...Le},this.notifySubscribers()}getState(){return{...this.state}}getToken(){return this.sessionToken}getParentSize(){return this.parentSize}incrementAttempts(){this.setState({attempts:this.state.attempts+1})}resetAttempts(){this.setState({attempts:0})}canRetry(){return this.state.attempts<this.getMaxAttempts()}getAttemptsLeft(){return Math.max(0,this.getMaxAttempts()-this.state.attempts)}async initialize(Le){var tt,nt;if(this.setState({isLoading:!0,errorDetails:null,flowOutcome:"pending",attempts:0,successData:null,sessionToken:Le.sessionToken}),this.parentSize=(tt=Le.parentSize)!=null&&tt.width&&((nt=Le.parentSize)!=null&&nt.height)?Le.parentSize:this.parentSize,this.sessionToken=Le.sessionToken,this.sessionToken&&Le.uiConfig){const ft=await getTheme(this.sessionToken);this.uiConfig=mergeUiConfig(Le.uiConfig,ft)}if(Le.captureConfig)this.captureConfig=Le.captureConfig;else try{this.flow=await this.fetchFlowConfiguration(this.sessionToken)}catch(ft){console.error("Failed to initialize FlowManager:",ft),this.setState({errorDetails:{message:"Failed to initialize FlowManager",error:ft,code:"FETCH_FLOW_ERROR"},isLoading:!1,flowOutcome:"error",currentStep:"error"});return}this.captureConfiguration=this.getCaptureConfiguration();const Ye=await this.determineInitialStep(this.captureConfiguration);this.setState({currentStep:Ye,isLoading:!1})}reset(){this.state={...this.initialState},this.flow=null,this.sessionToken=null,this.captureConfiguration=null,this.captureConfig=null,this.setState(this.state)}fetchFlowConfiguration(Le){return getFlow$1(Le)}getFlow(){return this.flow}onClose(Le){onboardingAnalytics.update(),MlWasmJSApi$1.reset(),this.completeWithError({code:"USER_CANCELLED",message:`User cancelled the ${Le} capture flow`,error:new Error("User cancelled")})}}class FaceFlowManager extends AbstractFlowManager{constructor(){super({currentStep:null}),this.deepsightVideoRecorder=null,this.mediaRecorder=null,this.authHint=null,this.isAuth=!1,this.shouldShowTutorialInCapture=!1,this.captureOnly=!1,this.onCapture=null}setRecorders(){this.getCaptureConfiguration().isDeepsightEnabled?this.deepsightVideoRecorder=new DeepsightVideoRecorder:this.getCaptureConfiguration().isRecordingEnabled&&(this.mediaRecorder=new MediaRecorder$3({token:this.sessionToken,type:"selfie",isAuthRecording:!1}))}async initialize(Le){this.authHint=Le.authHint,this.isAuth=Le.isAuth,this.captureOnly=Le.captureOnly??!1,this.onCapture=Le.onCapture??null,this.uiConfig=Le.uiConfig??null,await super.initialize(Le),this.setRecorders()}async determineInitialStep(Le){return await this.isPermissionsEnabled()?(this.shouldShowTutorialInCapture=Le.showTutorial,"capture"):Le.showTutorial?"tutorial":"permissions"}getMaxAttempts(){var Le;return((Le=this.captureConfiguration)==null?void 0:Le.selfieCaptureAttempts)||3}goToCapture(){this.setState({currentStep:"capture"})}goToPermissions(){this.setState({currentStep:"permissions"})}goToRetries(){this.setState({currentStep:"retries"})}async completeFlow(Le){this.setState({successData:Le,flowOutcome:"success",currentStep:"success"})}reset(){this.setState({currentStep:null,successData:null,errorDetails:null,flowOutcome:null})}completeWithError(Le){this.setState({flowOutcome:"error",currentStep:"error",errorDetails:Le})}setParentSize(Le){this.parentSize=Le}getCaptureConfiguration(){return this.isAuth?{...this.getAuthConfiguration(),isRecordingEnabled:!1,showPreview:!1,assistedOnboarding:!1,mergeSessionRecordings:!1,ageAssurance:!1,skipProcessFace:!0}:this.getFaceCaptureConfiguration()}getAuthConfiguration(){var tt;const Le=this.captureConfig;if(!this.flow&&!Le)return null;if(Le)return{showTutorial:Le.showTutorial,selfieCaptureAttempts:Le.captureAttempts??Le.numberOfAttempts??3,timeout:Le.autoCaptureTimeout*1e3,numberOfTries:Le.captureAttempts??Le.numberOfAttempts??3,maskCheckEnabled:Le.maskCheckEnabled??Le.validateFaceMask,lensesCheckEnabled:Le.lensesCheckEnabled??Le.validateLenses,hatCheckEnabled:Le.hatCheckEnabled??Le.validateHeadCover,eyesClosedCheckEnabled:Le.eyesClosedCheckEnabled??Le.validateClosedEyes,isDeepsightEnabled:Le.deepsightLiveness==="VIDEOLIVENESS"};const Ye=(tt=this.flow.flowModules.find(nt=>nt.key==="AUTHENTICATION"))==null?void 0:tt.configuration;return Ye?{showTutorial:Ye.showTutorial,selfieCaptureAttempts:Ye.numberOfAttempts,timeout:Ye.autoCaptureTimeout*1e3,numberOfTries:Ye.numberOfAttempts,maskCheckEnabled:Ye.validateFaceMask,lensesCheckEnabled:Ye.validateLenses,hatCheckEnabled:Ye.validateHeadCover,eyesClosedCheckEnabled:Ye.validateClosedEyes,isDeepsightEnabled:Ye.deepsightLiveness==="VIDEOLIVENESS"}:(this.completeWithError({code:"MODULE_NOT_FOUND",message:"Authentication module not found",error:new Error("Authentication module not found")}),null)}getFaceCaptureConfiguration(){var tt;const Le=this.captureConfig;if(!this.flow&&!Le)return null;if(Le)return{isRecordingEnabled:Le.isRecordingEnabled,showPreview:Le.showPreview,assistedOnboarding:Le.assistedOnboarding,showTutorial:Le.showTutorial,mergeSessionRecordings:!1,selfieCaptureAttempts:Le.captureAttempts??Le.numberOfAttempts??3,timeout:Le.autoCaptureTimeout*1e3,ageAssurance:Le.ageAssurance,numberOfTries:Le.captureAttempts??Le.numberOfAttempts??3,maskCheckEnabled:Le.maskCheckEnabled,lensesCheckEnabled:Le.lensesCheckEnabled,hatCheckEnabled:Le.hatCheckEnabled,eyesClosedCheckEnabled:Le.eyesClosedCheckEnabled,skipProcessFace:!0,isDeepsightEnabled:Le.deepsightLiveness==="VIDEOLIVENESS"};const Ye=(tt=this.flow.flowModules.find(nt=>nt.key==="SELFIE"))==null?void 0:tt.configuration;return Ye?{isRecordingEnabled:Ye.enableFaceRecording,showPreview:Ye.showPreview,assistedOnboarding:Ye.assistedOnboarding,showTutorial:Ye.showTutorial,mergeSessionRecordings:this.flow.mergeSessionRecordings,selfieCaptureAttempts:Ye.captureAttempts,timeout:Ye.autoCaptureTimeout*1e3,ageAssurance:this.flow.ageAssurance,isDeepsightEnabled:Ye.deepsightLiveness==="VIDEOLIVENESS",numberOfTries:Ye.captureAttempts,maskCheckEnabled:Ye.validateFaceMask,lensesCheckEnabled:Ye.validateLenses,hatCheckEnabled:Ye.validateHeadCover,eyesClosedCheckEnabled:Ye.validateClosedEyes,skipProcessFace:!0}:(this.completeWithError({code:"MODULE_NOT_FOUND",message:"Selfie module not found",error:new Error("Selfie module not found")}),null)}completeCaptureOnlyFlow(Le,Ye){var At;if(!this.captureOnly||!this.onCapture)return;const{blob:tt,url:nt}=Le.getBlobData(),ft=Le.getBase64Image();this.deepsightVideoRecorder||this.onCapture({image:{imageBase64:ft,blob:tt,url:nt},metadata:Ye});const ht=(At=this.deepsightVideoRecorder)==null?void 0:At.trimmedVideoBlob;if(!ht)throw new Error("Failed to get trimmed video");const gt=URL.createObjectURL(ht);this.onCapture({image:{imageBase64:ft,blob:tt,url:nt},metadata:Ye,trimmedVideo:{blob:ht,url:gt,mimeType:ht.type}})}onClose(){super.onClose(FlowType.FACE)}}const faceFlowManager=new FaceFlowManager,useFaceFlowState=()=>{const[Be,Le]=React.useState(faceFlowManager.getState());return React.useEffect(()=>{const Ye=faceFlowManager.subscribe(tt=>{Le(tt)});return()=>{Ye()}},[]),{...Be,goToCapture:faceFlowManager.goToCapture.bind(faceFlowManager),goToPermissions:faceFlowManager.goToPermissions.bind(faceFlowManager),completeFlow:faceFlowManager.completeFlow.bind(faceFlowManager),completeWithError:faceFlowManager.completeWithError.bind(faceFlowManager),reset:faceFlowManager.reset.bind(faceFlowManager),deepsightVideoRecorder:faceFlowManager.deepsightVideoRecorder,mediaRecorder:faceFlowManager.mediaRecorder,captureConfiguration:faceFlowManager.getCaptureConfiguration(),uiConfig:faceFlowManager.uiConfig,shouldShowTutorialInCapture:faceFlowManager.shouldShowTutorialInCapture,captureOnly:faceFlowManager.captureOnly,onCapture:faceFlowManager.onCapture,completeCaptureOnlyFlow:faceFlowManager.completeCaptureOnlyFlow.bind(faceFlowManager)}},Tutorial$2=({onContinue:Be,onClose:Le,isLoading:Ye})=>{const{t:tt}=useTranslation$1(),{uiConfig:nt,captureConfiguration:ft}=useFaceFlowState();return jsxRuntimeExports.jsx(BaseTutorial,{title:ft.ageAssurance?tt("face.tutorial.ageAssuranceTitle"):tt("face.tutorial.title"),subtitle:ft.ageAssurance?tt("face.tutorial.ageAssuranceSubtitle"):tt("face.tutorial.subtitle"),animationData:tutorialAnimationJson$2,onContinue:Be,buttonText:ft.ageAssurance?tt("face.tutorial.ageAssuranceStartCapture"):tt("face.tutorial.startCapture"),disclaimerText:tt("face.tutorial.autoCapture"),uiConfig:nt,onClose:Le,isLoading:Ye})},FACE_ERROR_CODES={FACE_OCCLUDED:"FACE_OCCLUDED",LIVENESS:"LIVENESS_ERROR",BRIGHTNESS:"BRIGHTNESS_ERROR",LENSES:"LENSES_ERROR",MASK:"MASK_ERROR",CLOSED_EYES:"CLOSED_EYES_ERROR",HEAD_COVER:"HEAD_COVER_ERROR",SERVER:"SERVER_ERROR",FACE_NOT_FOUND:"FACE_NOT_FOUND",MULTIPLE_FACES:"MULTIPLE_FACES",TOO_BLURRY:"TOO_BLURRY_ERROR",TOO_DARK:"TOO_DARK_ERROR",USER_IS_NOT_RECOGNIZED:"USER_IS_NOT_RECOGNIZED",SPOOF_ATTEMPT_DETECTED:"SPOOF_ATTEMPT_DETECTED",FACE_TOO_DARK:"FACE_TOO_DARK",LENSES_DETECTED:"LENSES_DETECTED",FACE_MASK_DETECTED:"FACE_MASK_DETECTED",CLOSED_EYES_DETECTED:"CLOSED_EYES_DETECTED",HEAD_COVER_DETECTED:"HEAD_COVER_DETECTED",FACE_CROPPING_FAILED:"FACE_CROPPING_FAILED",FACE_TOO_SMALL:"FACE_TOO_SMALL",FACE_TOO_BLURRY:"FACE_TOO_BLURRY",BAD_PHOTO_QUALITY:"BAD_PHOTO_QUALITY",PROCESSING_ERROR:"PROCESSING_ERROR",BAD_REQUEST:"BAD_REQUEST",NONEXISTENT_CUSTOMER:"NONEXISTENT_CUSTOMER",HINT_NOT_PROVIDED:"HINT_NOT_PROVIDED",SELFIE_IMAGE_LOW_QUALITY:"SELFIE_IMAGE_LOW_QUALITY"},handleScreenEvent$1=(Be,Le,Ye)=>{addScreenEvent({module:eventModuleNames.selfie,screen:Le,token:Be,shouldOpen:Ye,payload:{moduleVersion:"2"}})},isKnownError=Be=>Object.values(FACE_ERROR_CODES).some(Le=>Le===Be.message),handleError$1=(Be,Le)=>{throw handleScreenEvent$1(Be,eventScreenNames.faceCaptureUpload,!1),handleScreenEvent$1(Be,eventScreenNames.faceCaptureError,!0),new Error(Le)},sendFaceImage=async({canvas:Be,faceCoordinates:Le,sessionToken:Ye,imageType:tt="selfie"})=>{var nt,ft,ht;try{faceFlowManager.incrementAttempts(),handleScreenEvent$1(Ye,eventScreenNames.faceCaptureUpload,!0);const gt=Be.getBase64Image();await onboardingAnalytics.analyzeFrame(gt),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const At=await MlWasmJSApi$1.ens(gt);addEvent({token:Ye,code:"captureAttemptFinished",module:eventModuleNames.selfie,payload:{logs:onboardingAnalytics.getPipelineLogs(),moduleVersion:"2"}}),addDeviceStats(Ye,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const xt=await capture({token:Ye,image:At,type:"selfie",imageType:tt,encrypted:!0,faceCoordinates:Le,recordingId:(nt=faceFlowManager.deepsightVideoRecorder)==null?void 0:nt.recordingId,metadata:onboardingAnalytics.getMetadata()});return xt.confidence!==0&&handleError$1(Ye,FACE_ERROR_CODES.LIVENESS),xt.isBright||handleError$1(Ye,FACE_ERROR_CODES.BRIGHTNESS),xt.hasLenses&&handleError$1(Ye,FACE_ERROR_CODES.LENSES),xt.hasFaceMask&&handleError$1(Ye,FACE_ERROR_CODES.MASK),xt.hasClosedEyes&&handleError$1(Ye,FACE_ERROR_CODES.CLOSED_EYES),xt.hasHeadCover&&handleError$1(Ye,FACE_ERROR_CODES.HEAD_COVER),xt.liveness=xt.confidence===0,xt.imageBase64=gt,handleScreenEvent$1(Ye,eventScreenNames.faceCaptureUpload,!1),handleScreenEvent$1(Ye,eventScreenNames.faceCaptureSuccess,!0),xt}catch(gt){const At=gt,{status:xt}=At;if(gt instanceof Error&&isKnownError(gt))throw gt;if(xt===400){const Et=(ht=(ft=At.response)==null?void 0:ft.data)==null?void 0:ht.status,yt={3004:FACE_ERROR_CODES.FACE_NOT_FOUND,3005:FACE_ERROR_CODES.FACE_NOT_FOUND,3006:FACE_ERROR_CODES.TOO_BLURRY,3007:FACE_ERROR_CODES.TOO_DARK,4010:FACE_ERROR_CODES.MULTIPLE_FACES,4019:FACE_ERROR_CODES.FACE_NOT_FOUND,4077:FACE_ERROR_CODES.BAD_PHOTO_QUALITY,4078:FACE_ERROR_CODES.FACE_OCCLUDED},Ct=Et?yt[Et]:null;throw Ct&&handleError$1(Ye,Ct),new Error(FACE_ERROR_CODES.SERVER)}throw new Error(FACE_ERROR_CODES.SERVER)}},handleScreenEvent=(Be,Le,Ye)=>{addScreenEvent({module:eventModuleNames.authFace,screen:Le,token:Be,shouldOpen:Ye})},handleError=(Be,Le)=>{throw handleScreenEvent(Be,eventScreenNames.authFaceUpload,!1),handleScreenEvent(Be,eventScreenNames.authFaceError,!0),new Error(Le)},sendAuthFaceImage=async({canvas:Be,faceCoordinates:Le,sessionToken:Ye})=>{var tt;try{faceFlowManager.incrementAttempts(),handleScreenEvent(Ye,eventScreenNames.authFaceUpload,!0);const nt=Be.getBase64Image();await onboardingAnalytics.analyzeFrame(nt),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const ft=await MlWasmJSApi$1.ens(nt);addEvent({token:Ye,code:"captureAttemptFinished",module:eventModuleNames.authFace,payload:{logs:onboardingAnalytics.getPipelineLogs()}}),addDeviceStats(Ye,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const ht=await capture({type:"authFace",token:Ye,image:ft,authHint:faceFlowManager.authHint,encrypted:!0,faceCoordinates:Le,recordingId:(tt=faceFlowManager.deepsightVideoRecorder)==null?void 0:tt.recordingId,metadata:onboardingAnalytics.getMetadata()});if(ht.overallStatus!=="PASS"){if(faceFlowManager.getAttemptsLeft()===0){handleScreenEvent(Ye,eventScreenNames.authFaceUpload,!1),handleScreenEvent(Ye,eventScreenNames.authFaceError,!0),faceFlowManager.completeWithError({code:"NO_MORE_ATTEMPTS",message:"No more attempts",error:new Error("No more attempts")});return}throw ht.error.name==="SPOOF_ATTEMPT_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.SPOOF_ATTEMPT_DETECTED),ht.error.name==="FACE_TOO_DARK"&&handleError(Ye,FACE_ERROR_CODES.FACE_TOO_DARK),ht.error.name==="LENSES_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.LENSES_DETECTED),ht.error.name==="FACE_MASK_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.FACE_MASK_DETECTED),ht.error.name==="CLOSED_EYES_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.CLOSED_EYES_DETECTED),ht.error.name==="HEAD_COVER_DETECTED"&&handleError(Ye,FACE_ERROR_CODES.HEAD_COVER_DETECTED),ht.error.name==="FACE_NOT_FOUND"&&handleError(Ye,FACE_ERROR_CODES.FACE_NOT_FOUND),ht.error.name==="FACE_CROPPING_FAILED"&&handleError(Ye,FACE_ERROR_CODES.FACE_CROPPING_FAILED),ht.error.name==="FACE_TOO_SMALL"&&handleError(Ye,FACE_ERROR_CODES.FACE_TOO_SMALL),ht.error.name==="FACE_TOO_BLURRY"&&handleError(Ye,FACE_ERROR_CODES.FACE_TOO_BLURRY),ht.error.name==="BAD_PHOTO_QUALITY"&&handleError(Ye,FACE_ERROR_CODES.BAD_PHOTO_QUALITY),ht.error.name==="PROCESSING_ERROR"&&handleError(Ye,FACE_ERROR_CODES.PROCESSING_ERROR),ht.error.name==="BAD_REQUEST"&&handleError(Ye,FACE_ERROR_CODES.BAD_REQUEST),ht.error.name==="SERVER"&&handleError(Ye,FACE_ERROR_CODES.SERVER),ht.error.name==="USER_IS_NOT_RECOGNIZED"&&handleError(Ye,FACE_ERROR_CODES.USER_IS_NOT_RECOGNIZED),ht.error.name==="NONEXISTENT_CUSTOMER"&&(handleScreenEvent(Ye,eventScreenNames.authFaceUpload,!1),handleScreenEvent(Ye,eventScreenNames.authFaceError,!0),faceFlowManager.completeWithError({code:"NONEXISTENT_CUSTOMER",message:"Non-existent customer",error:new Error("Non-existent customer")})),ht.error.name==="HINT_NOT_PROVIDED"&&(handleScreenEvent(Ye,eventScreenNames.authFaceUpload,!1),handleScreenEvent(Ye,eventScreenNames.authFaceError,!0),faceFlowManager.completeWithError({code:"HINT_NOT_PROVIDED",message:"Hint not provided",error:new Error("Hint not provided")})),new Error(ht.error.name)}return ht.imageBase64=nt,ht.selfieEncryptedBase64=ft,ht.metadata=onboardingAnalytics.getMetadata(),ht}catch(nt){throw nt instanceof Error&&isKnownError(nt)?nt:new Error(FACE_ERROR_CODES.SERVER)}};class DetectionManager{constructor(){this.faceDetection=null,this.manualCaptureHasTriggered=!1,this.subscribers=[],this.config=null,this.getCanvas=null,this.processFrame=async()=>{if(!(this.state.isProcessingLocked||this.state.detectionState==="capturing"||!this.getCanvas)){if(!this.faceDetection)throw new Error("Face detection not initialized");this.setState({isProcessingLocked:!0});try{await MlWasmJSApi$1.handleDetectionCallAndUpdateState(detectionSetup.getProfile(DetectionType.Selfie).pipelineType);const Le=this.getCanvas();if(!Le)return;await this.faceDetection.detect(Le)}finally{await sleep(100),this.setState({isProcessingLocked:!1})}}},this.state={detectionState:"detecting",isProcessingLocked:!1,borderState:"idle",capturedImage:null},window.addEventListener("offline",()=>{this.setState({detectionState:"offline"}),this.stopDetection()}),window.addEventListener("online",()=>{this.setState({detectionState:"detecting"}),this.startDetection()}),this.startDetection()}setState(Le){this.state={...this.state,...Le},this.notifySubscribers()}notifySubscribers(){this.subscribers.forEach(Le=>Le(this.state))}getState(){return this.state}subscribe(Le){return this.subscribers.push(Le),Le(this.state),()=>{this.subscribers=this.subscribers.filter(Ye=>Ye!==Le)}}unsubscribe(Le){this.subscribers=this.subscribers.filter(Ye=>Ye!==Le)}setGetCanvas(Le){this.getCanvas=Le}switchToManualCapture(){addEvent({code:"switchToManualCaptureSelfie",token:faceFlowManager.getToken()}),this.stopDetection(),this.manualCaptureHasTriggered=!0,this.setState({detectionState:"manualCapture"})}async detectVirtualCamera(){const Le={canvas:null,itr:null,skipped:null};if(await MlWasmJSApi$1.poc(Le),(Le==null?void 0:Le.skipped)===!1){if(Le!=null&&Le.canvas){const tt=new IncodeCanvas(Le.canvas).getBase64Image();logFrame({token:faceFlowManager.getToken(),base64Image:tt,source:sources.selfie})}(Le==null?void 0:Le.itr)===!0?(addDeviceStats(faceFlowManager.getToken(),{virtualCameraDetected:!0}),MlWasmJSApi$1.setZc("FAIL")):MlWasmJSApi$1.setZc("PASS")}}async capture(Le,Ye){var tt,nt,ft,ht,gt,At;this.stopDetection(),this.setState({borderState:"capturing",detectionState:"capturing",capturedImage:Le.getBase64Image()}),await((tt=faceFlowManager.deepsightVideoRecorder)==null?void 0:tt.stopRecording(faceFlowManager.getToken(),faceFlowManager.captureOnly)),await this.detectVirtualCamera();try{const xt=await((nt=this.config)==null?void 0:nt.onCapture(Le,Ye));this.setState({borderState:"success",detectionState:"success"}),await sleep(3e3),(ht=(ft=this.config)==null?void 0:ft.onFinish)==null||ht.call(ft,xt)}catch(xt){this.setState({borderState:"error",detectionState:"error",capturedImage:null}),(At=(gt=this.config)==null?void 0:gt.onError)==null||At.call(gt,xt)}}async initialize(Le){this.config=Le,this.faceDetection=new FaceDetection;const Ye=faceFlowManager.getCaptureConfiguration();await this.faceDetection.initialize({onNoFace:emptyFunc,onCaptureFace:emptyFunc,onTooManyFaces:()=>this.setState({detectionState:"tooManyFaces"}),onTooClose:()=>this.setState({detectionState:"tooClose"}),onCenterFace:()=>this.setState({detectionState:"centerFace"}),onFarAway:()=>this.setState({detectionState:"tooFar"}),onGetReady:()=>this.setState({borderState:"loading",detectionState:"getReady"}),onGetReadyFinished:()=>this.setState({borderState:"idle",detectionState:"getReadyFinished"}),onBlur:()=>this.setState({detectionState:"blur"}),onDark:()=>this.setState({detectionState:"dark"}),onFaceAngle:()=>this.setState({detectionState:"faceAngle"}),onHeadWear:()=>this.setState({detectionState:"headWear"}),onLenses:()=>this.setState({detectionState:"lenses"}),onEyesClosed:()=>this.setState({detectionState:"eyesClosed"}),onFaceMask:()=>this.setState({detectionState:"faceMask"}),onSwitchToManualCapture:()=>this.switchToManualCapture(),onCapture:(tt,nt)=>this.capture(tt,nt),onFaceOccluded:()=>{},isLensesCheckEnabled:Ye.lensesCheckEnabled,isMaskCheckEnabled:Ye.maskCheckEnabled,isClosedEyesCheckEnabled:Ye.eyesClosedCheckEnabled,isHeadWearCheckEnabled:Ye.hatCheckEnabled,isVideoSelfie:!1,autocaptureTimeout:Ye.timeout,pipelineProfile:detectionSetup.getProfile(DetectionType.Selfie)})}startDetection(){if(this.manualCaptureHasTriggered){this.setState({detectionState:"manualCapture"});return}this.setState({detectionState:"detecting",isProcessingLocked:!1}),onFrameEmitter.on("newFrame",this.processFrame)}stopDetection(){onFrameEmitter.off("newFrame",this.processFrame)}}const useFaceDetection=({getCanvas:Be,onCapture:Le,onFinish:Ye,onError:tt})=>{const nt=React.useRef(null),[ft,ht]=React.useState(null),gt=React.useRef(Be),At=React.useRef(Le),xt=React.useRef(Ye),Et=React.useRef(tt);return React.useEffect(()=>{gt.current=Be,At.current=Le,xt.current=Ye,Et.current=tt},[Be,Le,Ye,tt]),React.useEffect(()=>{nt.current=new DetectionManager,ht(nt.current.getState());const yt=nt.current;yt.setGetCanvas(gt.current),yt.initialize({onCapture:(kt,vt)=>At.current(kt,vt),onFinish:kt=>{var vt;return(vt=xt.current)==null?void 0:vt.call(xt,kt)},onError:kt=>{var vt;return(vt=Et.current)==null?void 0:vt.call(Et,kt)}}),nt.current=yt;const Ct=kt=>{ht(kt)};return yt.subscribe(Ct),()=>{yt.stopDetection(),yt.unsubscribe(Ct)}},[]),{detectionState:ft==null?void 0:ft.detectionState,borderState:ft==null?void 0:ft.borderState,capturedImage:ft==null?void 0:ft.capturedImage,startDetection:()=>{var yt;return(yt=nt.current)==null?void 0:yt.startDetection()},stopDetection:()=>{var yt;return(yt=nt.current)==null?void 0:yt.stopDetection()},capture:yt=>{var Ct;return(Ct=nt.current)==null?void 0:Ct.capture(yt)}}};function useFaceCaptureAspectRatio(Be){var tt;const[Le,Ye]=React.useState();return React.useEffect(()=>{if(typeof window.CSS<"u"&&window.CSS.supports("aspect-ratio","1")){Ye(void 0);return}function ft(){var gt;const ht=((gt=Be.current)==null?void 0:gt.offsetWidth)??0;Ye(ht*1)}return ft(),window.addEventListener("resize",ft),()=>window.removeEventListener("resize",ft)},[Be,Be.current,(tt=Be.current)==null?void 0:tt.offsetWidth]),{height:Le}}const FaceFlowPage=Be=>{const{uiConfig:Le}=useFaceFlowState();return jsxRuntimeExports.jsx(FlowPage,{uiConfig:Le,onClose:()=>faceFlowManager.onClose(),onCloseCancel:Be.closeButtonOnCancel,...Be})},CaptureOverlay$1=({capturedImage:Be,detectionState:Le})=>Le!=="capturing"&&Le!=="success"?null:jsxRuntimeExports.jsx(Flex,{w:"100%",h:"100%",position:"absolute",top:0,left:0,bg:"#f5f5f6",zIndex:2,justify:"center",align:"center",children:jsxRuntimeExports.jsx(PreviewImage,{src:`data:image/jpeg;base64,${Be}`})}),defaultError={title:"Something went wrong",description:"Please try again later"},errorContent={FACE_OCCLUDED:{title:"notifications.faceOccluded",description:"notifications.faceOccludedDescription"},MASK_ERROR:{title:"notifications.mask",description:"notifications.maskDescription"},BRIGHTNESS_ERROR:{title:"notifications.brightness",description:"notifications.brightnessDescription"},LIVENESS_ERROR:{title:"notifications.spoof",description:"notifications.spoofDescription"},CLOSED_EYES_ERROR:{title:"notifications.closedEyes",description:"notifications.closedEyesDescription"},HEAD_COVER_ERROR:{title:"notifications.removeHeadwear",description:"notifications.removeHeadwearDescription"},LENSES_ERROR:{title:"notifications.lenses",description:"notifications.lensesDescription"},FACE_NOT_FOUND:{title:"notifications.faceNotFound",description:"notifications.faceNotFoundDescription"},MULTIPLE_FACES:{title:"notifications.multiple",description:"notifications.multipleDescription"},TOO_BLURRY_ERROR:defaultError,TOO_DARK_ERROR:defaultError,SERVER_ERROR:defaultError,FACE_CROPPING_FAILED:defaultError,FACE_TOO_SMALL:defaultError,PROCESSING_ERROR:defaultError,BAD_REQUEST:defaultError,USER_IS_NOT_RECOGNIZED:{title:"notifications.accessDenied",description:"notifications.accessDeniedDescription"},SPOOF_ATTEMPT_DETECTED:{title:"notifications.spoof",description:"notifications.spoofDescription"},FACE_TOO_DARK:{title:"notifications.brightness",description:"notifications.brightnessDescription"},LENSES_DETECTED:{title:"notifications.lenses",description:"notifications.lensesDescription"},FACE_MASK_DETECTED:{title:"notifications.mask",description:"notifications.maskDescription"},CLOSED_EYES_DETECTED:{title:"notifications.closedEyes",description:"notifications.closedEyesDescription"},HEAD_COVER_DETECTED:{title:"notifications.removeHeadwear",description:"notifications.removeHeadwearDescription"},FACE_TOO_BLURRY:{title:"notifications.spoof",description:"notifications.spoofDescription"},BAD_PHOTO_QUALITY:{title:"notifications.lowQualityImage",description:"notifications.lowQualityImageDescription"},NONEXISTENT_CUSTOMER:{title:"notifications.nonexistentCustomer",description:"notifications.nonexistentCustomerDescription"},HINT_NOT_PROVIDED:{title:"notifications.hintNotProvided",description:"notifications.hintNotProvidedDescription"},SELFIE_IMAGE_LOW_QUALITY:{title:"notifications.selfieImageLowQuality",description:"notifications.selfieImageLowQualityDescription"}},ErrorModalContent=({title:Be,description:Le,attemptsText:Ye,buttonText:tt,icon:nt,onButtonClick:ft,onCloseCancel:ht})=>{const gt=useTokens();return jsxRuntimeExports.jsx(Modal$3,{open:!0,children:jsxRuntimeExports.jsx(FaceFlowPage,{"data-testid":"face-capture-error-modal",onCloseCancel:ht,children:jsxRuntimeExports.jsx(Flex,{align:"center",justify:"center",direction:"column",wFull:!0,hFull:!0,children:jsxRuntimeExports.jsxs(Flex,{wFull:!0,hFull:!0,bg:gt.color.surface.neutral.light,minW:"320px",direction:"column",justify:"space-between",px:2,children:[jsxRuntimeExports.jsx(Box,{}),jsxRuntimeExports.jsxs(Flex,{direction:"column",align:"center",children:[nt,jsxRuntimeExports.jsx(Spacer,{size:6}),jsxRuntimeExports.jsx(Text$7,{as:"h2",fontSize:gt.typography.fontSize["2xl"],fontWeight:700,textAlign:"center",lineHeight:"114%",letterSpacing:"-0.5px",children:Be}),jsxRuntimeExports.jsx(Spacer,{size:4}),jsxRuntimeExports.jsx(Text$7,{as:"p",fontSize:gt.typography.fontSize.base,textAlign:"center",color:gt.color.text.body.secondary,fontWeight:500,lineHeight:"114%",letterSpacing:"-0.5px",children:Le})]}),jsxRuntimeExports.jsxs(Flex,{direction:"column",align:"center",children:[jsxRuntimeExports.jsx(Text$7,{as:"p",fontSize:gt.typography.fontSize.lg,textAlign:"center",color:gt.color.text.body.secondary,fontWeight:500,lineHeight:"114%",letterSpacing:"-0.5px",children:Ye}),jsxRuntimeExports.jsx(Spacer,{size:6}),jsxRuntimeExports.jsx(Button$b,{onClick:ft,children:tt})]})]})})})})},NoMoreAttemptsModal=({title:Be,onContinue:Le,onCloseCancel:Ye})=>{const{t:tt}=useTranslation$1();return jsxRuntimeExports.jsx(ErrorModalContent,{title:Be,description:tt("notifications.selfieCaptureFailedDescription"),attemptsText:tt("notifications.noAttemptsRemaining"),buttonText:tt("common.continue"),icon:jsxRuntimeExports.jsx(ErrorIcon$1,{}),onButtonClick:Le,onCloseCancel:Ye})},RetryErrorModal=({title:Be,description:Le,attemptsRemaining:Ye,onTryAgain:tt,onCloseCancel:nt})=>{const{t:ft}=useTranslation$1();return jsxRuntimeExports.jsx(ErrorModalContent,{title:Be,description:ft(Le),attemptsText:ft("common.attemptsRemaining",{count:Ye}),buttonText:ft("common.tryAgain"),icon:jsxRuntimeExports.jsx(WarningIcon,{}),onButtonClick:tt,onCloseCancel:nt})},ErrorModal=({error:Be,onTryAgain:Le,onContinue:Ye,onCloseCancel:tt})=>{const{attempts:nt,captureConfiguration:ft}=useFaceFlowState(),{t:ht}=useTranslation$1();if(!Be)return null;const{title:gt,description:At}=errorContent[Be]??defaultError,xt=ft.selfieCaptureAttempts-nt;return xt<=0?jsxRuntimeExports.jsx(NoMoreAttemptsModal,{title:ht(gt),onContinue:Ye,onCloseCancel:tt}):jsxRuntimeExports.jsx(RetryErrorModal,{title:ht(gt),description:At,attemptsRemaining:xt,onTryAgain:Le,onCloseCancel:tt})},SvgOutline=Be=>React__namespace.createElement("svg",{width:292,height:272,viewBox:"0 0 292 272",fill:"none",xmlns:"http://www.w3.org/2000/svg",...Be},React__namespace.createElement("path",{opacity:.8,d:"M145.633 8.0625C115.606 8.06268 85.6206 26.5984 76.9712 54.293L76.771 54.9492C70.4539 76.1063 75.0139 100.802 76.8687 110.58L77.3628 113.188L75.1528 114.656C66.1187 120.66 63.5861 124.089 62.8472 126.92C62.4669 128.377 62.4644 130.035 62.8003 132.412C63.1635 134.983 63.7533 137.484 64.4233 141.347L64.5142 141.841C65.5056 146.956 68.1062 152.133 71.2749 156.618C74.5527 161.257 78.2056 164.826 80.7349 166.584L82.4517 167.777V169.869C82.4517 177.866 85.3476 186.144 89.6763 194.128C93.9906 202.085 99.5748 209.473 104.623 215.646L105.526 216.751V218.178C105.526 220.891 105.68 223.73 105.801 226.9C105.92 230.011 106.003 233.347 105.828 236.771C105.475 243.652 104.077 251.044 99.7446 258.227C91.1977 272.397 72.1081 284.401 31.8677 291.776L29.936 292.124C-41.1597 304.684 -61.4563 361.617 -63.2153 392.062H145.633V400.062H-71.3638L-71.3462 396.044C-71.2048 364.597 -50.9804 298.295 28.5444 284.246L30.4448 283.904C69.9919 276.654 86.1642 265.253 92.894 254.095C96.3216 248.412 97.5261 242.442 97.8374 236.362C97.9939 233.307 97.9241 230.262 97.8071 227.206C97.7111 224.697 97.5799 222.105 97.5396 219.615C92.5931 213.5 87.048 206.064 82.644 197.941C78.308 189.944 74.9442 181.04 74.5024 171.896C71.3932 169.387 67.8531 165.638 64.7417 161.234C61.1656 156.173 57.9337 149.942 56.6587 143.353L56.5415 142.714C55.9864 139.514 55.2491 136.155 54.8784 133.531C54.4806 130.715 54.3377 127.843 55.106 124.899C56.5344 119.427 60.7885 114.886 68.5259 109.489C66.4692 98.2995 62.7062 74.0938 69.106 52.6602L69.3345 51.9092C79.2266 20.2173 112.853 0.0626788 145.633 0.0625V8.0625ZM145.635 0.0625C178.415 0.0625 212.042 20.2172 221.934 51.9092L222.163 52.6602C228.562 74.0938 224.799 98.2996 222.743 109.489C230.48 114.886 234.734 119.427 236.163 124.899C236.931 127.843 236.788 130.715 236.39 133.531C236.019 136.155 235.282 139.514 234.727 142.714L234.61 143.353C233.335 149.942 230.103 156.173 226.527 161.234C223.415 165.638 219.875 169.387 216.766 171.896C216.324 181.04 212.961 189.944 208.625 197.941C204.221 206.064 198.676 213.5 193.729 219.615C193.689 222.105 193.557 224.697 193.461 227.206C193.344 230.262 193.275 233.307 193.431 236.362C193.742 242.442 194.947 248.412 198.375 254.095C205.104 265.253 221.277 276.654 260.824 283.904L262.724 284.246C342.249 298.294 362.473 364.597 362.615 396.044L362.632 400.062H145.635V392.062H354.484C352.725 361.616 332.429 304.683 261.333 292.124L259.401 291.776C219.161 284.401 200.071 272.397 191.524 258.227C187.192 251.044 185.793 243.652 185.441 236.771C185.266 233.347 185.348 230.011 185.467 226.9C185.589 223.73 185.743 220.891 185.743 218.178V216.751L186.646 215.646C191.694 209.473 197.278 202.085 201.592 194.128C205.921 186.144 208.817 177.866 208.817 169.869V167.777L210.534 166.584C213.063 164.826 216.716 161.257 219.994 156.618C223.162 152.133 225.763 146.956 226.754 141.841L226.845 141.347C227.515 137.484 228.105 134.983 228.468 132.412C228.804 130.034 228.802 128.377 228.421 126.92C227.682 124.089 225.15 120.66 216.116 114.656L213.906 113.188L214.4 110.58C216.255 100.802 220.815 76.1064 214.498 54.9492L214.297 54.293C205.648 26.5983 175.662 8.0625 145.635 8.0625V0.0625Z",fill:"white"})),FaceOutline=({height:Be="100%"})=>jsxRuntimeExports.jsx(Box,{position:"absolute",bottom:0,left:"50%",transform:"translateX(-50%)",zIndex:1,h:Be,children:jsxRuntimeExports.jsx(SvgOutline,{title:"Outline",height:"100%"})});function getFill(Be,Le){return Be==="loading"||Be==="capturing"?`url(#paint0_radial_2423_448_${Le.replace("#","")})`:Le}const StyledPath=dt.path`
|
|
3728
3728
|
transition: all 1s ease-in-out;
|
|
3729
3729
|
fill: ${({$borderState:Be,$color:Le})=>getFill(Be,Le)};
|
|
3730
3730
|
`,getColor=(Be,Le)=>{var Ye,tt,nt,ft,ht,gt;return Be==="success"||Be==="capturing"?(tt=(Ye=Le.primitives)==null?void 0:Ye.color)==null?void 0:tt.positive[600]:Be==="loading"?(ft=(nt=Le==null?void 0:Le.color)==null?void 0:nt.brand)==null?void 0:ft.brand:(gt=(ht=Le==null?void 0:Le.primitives)==null?void 0:ht.color)==null?void 0:gt.gray[100]},LoadingBorder=({width:Be="100%",height:Le="100%",borderState:Ye})=>{const tt=useTokens(),nt=Ye==="loading"||Ye==="capturing",ft=getColor(Ye,tt),ht=React.useRef(null),{height:gt}=useFaceCaptureAspectRatio(ht);return jsxRuntimeExports.jsx(Box,{ref:ht,position:"absolute",w:"100%",xsW:"80%",maxW:"335px",aspectRatio:1,spin:nt,style:{height:gt?`${gt}px`:void 0},children:jsxRuntimeExports.jsxs("svg",{width:Be,height:Le,viewBox:"0 0 335 335",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("title",{children:"Loading Border"}),jsxRuntimeExports.jsx(StyledPath,{$color:ft,$borderState:Ye,fillRule:"evenodd",clipRule:"evenodd",d:"M335 167.5C335 260.008 260.008 335 167.5 335C74.9923 335 0 260.008 0 167.5C0 74.9923 74.9923 0 167.5 0C260.008 0 335 74.9923 335 167.5ZM167.5 325C254.485 325 325 254.485 325 167.5C325 80.5152 254.485 10 167.5 10C80.5152 10 10 80.5152 10 167.5C10 254.485 80.5152 325 167.5 325Z"}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("radialGradient",{id:`paint0_radial_2423_448_${ft.replace("#","")}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(240.418 17.4369) rotate(115.674) scale(167.087)",children:[jsxRuntimeExports.jsx("stop",{stopColor:ft}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:ft,stopOpacity:"0"})]})})]})})},StyledSvg=dt.svg`
|
|
@@ -4035,7 +4035,7 @@ linearGradient:first-of-type {
|
|
|
4035
4035
|
height: 100%;
|
|
4036
4036
|
display: flex;
|
|
4037
4037
|
flex-direction: column;
|
|
4038
|
-
`,getCircleText=(Be,Le)=>({uploading:Be("notifications.uploading"),success:Be("notifications.done"),error:Le}),Selfie$2=({onError:Be,onSuccess:Le,permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,token:gt,timeout:At,numberOfTries:xt,stream:Et,onlyCapture:yt,showCustomCameraPermissionScreen:Ct,isSecondId:kt,isRecordingEnabled:vt=!1,skipProcessFace:bt=!1,deviceId:It,maskCheckEnabled:wt=!1,eyesClosedCheckEnabled:Rt=!1,hatCheckEnabled:Tt=!1,lensesCheckEnabled:Bt=!1,isDeepsightEnabled:Dt=!1})=>{const Pt=gt==null?void 0:gt.token,Nt=React.useRef(null),Lt=React.useRef(!1),Wt=React.useRef(null),$t=React.useRef(null),[Kt,Vt]=React.useState({}),[Ut,_t]=React.useState(1),Xt=React.useRef({}),{isOnline:Qt}=useOnlineStatus({onOnline:()=>{u0(),isManualCaptureMode=!1,Xt.current.canvas&&l0(Xt.current.canvas,Xt.current.faceCoordinates)},onOffline:()=>{}}),{startRecording:jt,stopRecording:Gt,recordingStarted:qt,updateMediaStream:zt}=useMediaRecorder({token:Pt,type:"selfie"}),{startRecording:e0,stopRecording:s0}=useMediaRecorderLocally();React.useEffect(()=>{isManualCaptureMode=!1},[]),React.useEffect(()=>{Nt.current.streamUnlocked=Lt},[]),React.useEffect(()=>()=>{!Dt&&(Gt==null||Gt())},[Dt,Gt]);async function t0(q0){var en;if(Ut>=xt){await A0(q0);return}Dt&&await((en=Nt.current)==null?void 0:en.resetWebcam(!0)),_t(Ut+1),await Yt(q0),isManualCaptureMode||await u0()}const l0=throttle$2(async(q0,en)=>{var k0,S0,H0;Xt.current.canvas=q0,Xt.current.faceCoordinates=en;const w0=q0.getBase64Image();try{addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),clearTimeout(Y0.current),Jt(""),addEvent({code:"selfieCapture",token:Pt}),await onboardingAnalytics.analyzeFrame(w0),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const _0=selfieType,G0=await MlWasmJSApi$1.encryptImage(w0),{blob:K0,url:un}=q0.getBlobData();if(yt)return Le({imageBase64:w0,blob:K0,encryptedImage:G0,url:un});addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),addEvent({token:Pt,code:"captureAttemptFinished",module:"SELFIE",payload:{logs:onboardingAnalytics.getPipelineLogs()}}),addDeviceStats(Pt,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const tn=await capture({token:Pt,image:G0,type:_0,encrypted:!0,faceCoordinates:en,metadata:onboardingAnalytics.getMetadata(),recordingId:$t.current}),cn=selfieChecks(tn,{hatCheckEnabled:Tt,lensesCheckEnabled:Bt,maskCheckEnabled:wt,eyesClosedCheckEnabled:Rt});if(cn.hasErrors){addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),r0("error"),logSelfieChecks(tn,cn,ht,Jt,n0,i0,!1),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Vt({response:tn,livenessPassed:cn.livenessPassed,imageBase64:w0}),J0&&(Lt.current=!1,isManualCaptureMode=!0);return}Jt(n0("notifications.processing"));const{faceMatch:yn,existingUser:Bn,...er}=await o0();return addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),ht(getLogObject("successCapture",{response:tn,message:"Selfie uploaded successfully"})),Jt(n0("notifications.success")),await sleep(3500),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Le({...tn,...er,faceMatch:yn,existingUser:Bn,liveness:cn.livenessPassed,imageBase64:w0})}catch(_0){((S0=(k0=_0==null?void 0:_0.response)==null?void 0:k0.data)==null?void 0:S0.error)==="Maximum capture attempts reached"&&_t(xt),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),f0(_0.response?_0.response.data:n0("notifications.serverError")),r0("error"),await sleep(3e3),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Vt({response:(H0=_0==null?void 0:_0.response)==null?void 0:H0.data,livenessPassed:null,imageBase64:w0}),J0&&(Lt.current=!1,isManualCaptureMode=!0)}},300),d0=async()=>{if(!Dt)return;const q0=await s0(Pt);$t.current=q0},{t:n0}=useTranslation$1(),g0=(q0,en,w0,k0)=>{updateSession$1({token:Pt,key:"manualSelfieCheckNeeded",value:!0});const S0=getLogObject("skip",{existingUser:q0,liveness:en,imageBase64:w0,faceMatch:k0});ht(S0),Be(S0)};async function A0({response:q0,livenessPassed:en,imageBase64:w0}){addEvent({code:"noAttempts",token:Pt}),ht(getLogObject("noAttemps",{response:q0,message:"No attempt left"}));const{faceMatch:k0,existingUser:S0}=await o0();return g0(S0,en,w0,k0)}async function o0(){if(bt)return{faceMatch:!1};const q0=await processFace({token:Pt});kt&&await processFaceSecondId({token:Pt});const en=q0.confidence===1,w0=q0.existingUser;return{faceMatch:en,existingUser:w0,...q0}}const{setMode:r0,resetLoading:Yt,notificationMessage:Mt,setNotificationMessage:Jt,notificationDescription:a0,setNotificationDescription:i0,handleError:f0,startAutoDetect:u0,handleManualCapture:x0,isSuccess:p0,isError:D0,isLoading:P0,isUploading:z0,shouldShowManualCapture:J0,selfieTimeoutRef:Y0,hideCamera:X0}=useSelfie({timeout:At,onLog:ht,handleCapture:l0,handleNoAttemptsLeft:A0,numberOfTries:xt,webcam:Nt,isDetecting:Lt,hatCheckEnabled:Tt,lensesCheckEnabled:Bt,maskCheckEnabled:wt,eyesClosedCheckEnabled:Rt,handleStopRecordingLocally:d0,onSwitchManualCapture:()=>{Jt(""),addEvent({code:"switchToManualCaptureSelfie",token:Pt})},onManualCaptureSelfie:()=>{addEvent({code:"manualCaptureSelfie",token:Pt})}}),T0=async q0=>{Wt.current=q0,Dt?e0(q0):vt&&(qt?await zt(q0):await jt(q0))},L0=P0||D0||p0,j0=xt-Ut;if(!Qt)return jsxRuntimeExports.jsx(NoInternetError,{});const Q0=()=>j0>0;return jsxRuntimeExports.jsxs(Container$f,{className:"IncodeCaptureDesktopSelfieContainer",children:[jsxRuntimeExports.jsx(SrOnlyHeading,{className:"IncodeCaptureDesktopSelfieHeading",children:n0("selfie.title")}),jsxRuntimeExports.jsxs(SelfieContainer,{className:"IncodeCaptureDesktopSelfieSelfieContainer",children:[jsxRuntimeExports.jsxs(FaceMask$2,{className:"IncodeCaptureDesktopSelfieFaceMask",isCapturing:p0,isLoading:z0,error:D0,isUploading:L0,desktop:!0,children:[z0&&jsxRuntimeExports.jsx(BordersContainer,{className:cx("IncodeCaptureSelfieBordersContainer"),children:jsxRuntimeExports.jsx(LoadingBorders,{className:"IncodeCaptureSelfieLoadingBordersContainer",mode:"uploading"})}),jsxRuntimeExports.jsx(FaceFrame$1,{src:faceFrame$1,alt:"face frame",className:cx("IncodeCaptureDesktopSelfieFaceFrame",{hidden:X0})})]}),jsxRuntimeExports.jsx(Webcam,{className:cx("IncodeCaptureDesktopSelfieWebcam",{error:D0,hidden:X0}),ref:Nt,onPlay:()=>{},videoSource:"user",isSelfie:!0,type:"desktopSelfie",permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,stream:Et,onError:Be,token:Pt,onStreamReady:T0,showCustomCameraPermissionScreen:Ct,deviceId:It,isDeepsightEnabled:Dt}),X0&&z0&&jsxRuntimeExports.jsx(CameraOvalInnerText,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeCaptureSelfieCameraOvalInnerText",{isError:D0}),children:getCircleText(n0,Mt).uploading}),Mt&&!z0&&!D0&&jsxRuntimeExports.jsx(Notification$3,{isLoading:P0,isError:D0,className:"desktop IncodeCaptureDesktopSelfieNotification",children:Mt}),D0&&Q0()?jsxRuntimeExports.jsxs(BlockingErrors,{children:[jsxRuntimeExports.jsx("img",{src:warningIcon$1,alt:"Warning icon",width:"32"}),jsxRuntimeExports.jsx(ErrorTitle$1,{className:"IncodeCaptureDesktopSelfieErrorTitle",children:Mt}),jsxRuntimeExports.jsx(ErrorDescription$1,{className:"IncodeCaptureDesktopSelfieErrorDescription",children:a0})]}):D0&&j0===0&&jsxRuntimeExports.jsxs(BlockingErrors,{children:[jsxRuntimeExports.jsx("img",{src:warningIcon$1,alt:"Warning icon",width:"32"}),jsxRuntimeExports.jsx(ErrorTitle$1,{className:"IncodeCaptureDesktopSelfieErrorTitle",children:n0("notifications.selfieCaptureFailed")}),jsxRuntimeExports.jsx(ErrorDescription$1,{className:"IncodeCaptureDesktopSelfieErrorDescription",children:n0("notifications.selfieCaptureFailedDescription")})]}),D0&&jsxRuntimeExports.jsxs(RetryButtonsContainer,{className:"IncodeCaptureDesktopSelfieCaptureRetryButtonsContainer",isDesktop:!0,children:[jsxRuntimeExports.jsx(Button$c,{onClick:async()=>{await t0(Kt)},theme:exports.theme,children:Q0()?n0("common.tryAgain"):n0("common.continue")}),Q0()&&jsxRuntimeExports.jsxs("div",{children:[j0," ",n0("notifications.attemptsRemaining")]})]}),J0&&jsxRuntimeExports.jsx(CaptureButtonContainer,{className:"IncodeCaptureDesktopSelfieCaptureButtonContainer",initial:{scale:0},animate:{scale:1},children:jsxRuntimeExports.jsx("button",{onClick:x0,type:"button",children:jsxRuntimeExports.jsx("img",{src:CaptureButton,alt:"capture button"})})})]}),jsxRuntimeExports.jsx("canvas",{id:"canvasFrame",hidden:!0})]})};function CaptureAndTutorial$3(Be){const[Le,Ye]=useDeviceId(),[tt,nt]=React.useState(!1),{currentStep:ft,nextStep:ht}=useSteps(),{showTutorial:gt,token:At}=Be;function xt(Et){Et!=="error"&&Ye(Et),nt(!0)}return tt?jsxRuntimeExports.jsxs(Steps,{currentStep:ft,children:[gt&&jsxRuntimeExports.jsx(TutorialSelfie,{className:"IncodeCaptureDesktopSelfieTutorial",...Be,onSuccess:ht}),jsxRuntimeExports.jsx(Selfie$2,{deviceId:Le,...Be})]}):jsxRuntimeExports.jsx(ChooseCamera,{onCameraChosen:xt,token:At==null?void 0:At.token})}const CaptureDesktopSelfie=preloadScript$3(CaptureAndTutorial$3);function Selfie$1(Be){return jsxRuntimeExports.jsx(CaptureSelfie$1,{...Be})}async function handleMotionPermissions$1(){const Be=sessionStorage.getItem("cameraPermissionsGranted")==="true",Le=sessionStorage.getItem("motionSensorsPermissionsRequested")==="true";Be&&!Le&&await onboardingAnalytics.startOnboardingCheck()}function CaptureAndTutorial$2(Be){const{currentStep:Le,nextStep:Ye}=useSteps();return jsxRuntimeExports.jsxs(Steps,{currentStep:Le,children:[Be.showTutorial&&isWebRtcSupported()&&jsxRuntimeExports.jsx(TutorialSelfie,{...Be,onSuccess:async()=>{Be.isDeepsightEnabled&&await handleMotionPermissions$1(),Ye()}}),jsxRuntimeExports.jsx(Selfie$1,{...Be})]})}const TutorialBackHeader=()=>{const{t:Be}=useTranslation$1(),Le=React.useRef();return useAutoFocus(Le),jsxRuntimeExports.jsx("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderBack",children:jsxRuntimeExports.jsx("h1",{className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleBack",tabIndex:-1,"aria-label":Be("tutorial.back.titleLabel"),ref:Le,children:Be("tutorial.back.title")})})};function TutorialBack({onSuccess:Be,token:Le,...Ye}){const tt=()=>mobile.isDesktop()?"https://sdk.incode.com/sdk/tutorials/tutorial-back-desktop.mp4":options.darkMode?"https://sdk.incode.com/sdk/tutorials/back-dark.mp4":"https://sdk.incode.com/sdk/tutorials/back.gif";React.useEffect(()=>{Le!=null&&Le.token&&(addEvent({token:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"Back ID capture tutorial"}),addEvent({token:Le.token,code:"tutorialBackId",payload:{tutorialBackID:!0}}))},[Le]);function nt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"Back ID capture tutorial"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{...Ye,token:Le,src:tt(),next:nt,header:jsxRuntimeExports.jsx(TutorialBackHeader,{}),type:"Back"})}const TutorialCreditCardBackHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.creditCardBack")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.creditCardBack2")})]})};function TutorialCreditCardBack({onSuccess:Be,token:Le,src:Ye="https://sdk.incode.com/sdk/tutorials/card%20back.svg",...tt}){const{t:nt}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialCreditCardBack",payload:{tutorialCreditCardBack:!0}})},[Le.token]);function ft(){addEvent({token:Le==null?void 0:Le.token,code:"continue"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{creditCard:!0,...tt,src:Ye,header:jsxRuntimeExports.jsx(TutorialCreditCardBackHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ft,children:nt("common.continue")})})})}const TutorialCreditCardFrontHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.creditCardFront")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.creditCardFront2")})]})};function TutorialCreditCardFront({onSuccess:Be,token:Le,src:Ye="https://sdk.incode.com/sdk/tutorials/card%20front.svg",...tt}){const{t:nt}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialCreditCard",payload:{tutorialCreditCard:!0}})},[Le.token]);function ft(){addEvent({token:Le==null?void 0:Le.token,code:"continue"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{creditCard:!0,...tt,src:Ye,header:jsxRuntimeExports.jsx(TutorialCreditCardFrontHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ft,children:nt("common.continue")})})})}function isObject$3(Be){return Be!==null&&typeof Be=="object"&&"constructor"in Be&&Be.constructor===Object}function extend$4(Be={},Le={}){Object.keys(Le).forEach(Ye=>{typeof Be[Ye]>"u"?Be[Ye]=Le[Ye]:isObject$3(Le[Ye])&&isObject$3(Be[Ye])&&Object.keys(Le[Ye]).length>0&&extend$4(Be[Ye],Le[Ye])})}const ssrDocument={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function getDocument$1(){const Be=typeof document<"u"?document:{};return extend$4(Be,ssrDocument),Be}const ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(Be){return typeof setTimeout>"u"?(Be(),null):setTimeout(Be,0)},cancelAnimationFrame(Be){typeof setTimeout>"u"||clearTimeout(Be)}};function getWindow(){const Be=typeof window<"u"?window:{};return extend$4(Be,ssrWindow),Be}function deleteProps(Be){const Le=Be;Object.keys(Le).forEach(Ye=>{try{Le[Ye]=null}catch{}try{delete Le[Ye]}catch{}})}function nextTick(Be,Le=0){return setTimeout(Be,Le)}function now(){return Date.now()}function getComputedStyle$1(Be){const Le=getWindow();let Ye;return Le.getComputedStyle&&(Ye=Le.getComputedStyle(Be,null)),!Ye&&Be.currentStyle&&(Ye=Be.currentStyle),Ye||(Ye=Be.style),Ye}function getTranslate(Be,Le="x"){const Ye=getWindow();let tt,nt,ft;const ht=getComputedStyle$1(Be);return Ye.WebKitCSSMatrix?(nt=ht.transform||ht.webkitTransform,nt.split(",").length>6&&(nt=nt.split(", ").map(gt=>gt.replace(",",".")).join(", ")),ft=new Ye.WebKitCSSMatrix(nt==="none"?"":nt)):(ft=ht.MozTransform||ht.OTransform||ht.MsTransform||ht.msTransform||ht.transform||ht.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),tt=ft.toString().split(",")),Le==="x"&&(Ye.WebKitCSSMatrix?nt=ft.m41:tt.length===16?nt=parseFloat(tt[12]):nt=parseFloat(tt[4])),Le==="y"&&(Ye.WebKitCSSMatrix?nt=ft.m42:tt.length===16?nt=parseFloat(tt[13]):nt=parseFloat(tt[5])),nt||0}function isObject$2(Be){return typeof Be=="object"&&Be!==null&&Be.constructor&&Object.prototype.toString.call(Be).slice(8,-1)==="Object"}function isNode(Be){return typeof window<"u"&&typeof window.HTMLElement<"u"?Be instanceof HTMLElement:Be&&(Be.nodeType===1||Be.nodeType===11)}function extend$3(...Be){const Le=Object(Be[0]),Ye=["__proto__","constructor","prototype"];for(let tt=1;tt<Be.length;tt+=1){const nt=Be[tt];if(nt!=null&&!isNode(nt)){const ft=Object.keys(Object(nt)).filter(ht=>Ye.indexOf(ht)<0);for(let ht=0,gt=ft.length;ht<gt;ht+=1){const At=ft[ht],xt=Object.getOwnPropertyDescriptor(nt,At);xt!==void 0&&xt.enumerable&&(isObject$2(Le[At])&&isObject$2(nt[At])?nt[At].__swiper__?Le[At]=nt[At]:extend$3(Le[At],nt[At]):!isObject$2(Le[At])&&isObject$2(nt[At])?(Le[At]={},nt[At].__swiper__?Le[At]=nt[At]:extend$3(Le[At],nt[At])):Le[At]=nt[At])}}}return Le}function setCSSProperty(Be,Le,Ye){Be.style.setProperty(Le,Ye)}function animateCSSModeScroll({swiper:Be,targetPosition:Le,side:Ye}){const tt=getWindow(),nt=-Be.translate;let ft=null,ht;const gt=Be.params.speed;Be.wrapperEl.style.scrollSnapType="none",tt.cancelAnimationFrame(Be.cssModeFrameID);const At=Le>nt?"next":"prev",xt=(yt,Ct)=>At==="next"&&yt>=Ct||At==="prev"&&yt<=Ct,Et=()=>{ht=new Date().getTime(),ft===null&&(ft=ht);const yt=Math.max(Math.min((ht-ft)/gt,1),0),Ct=.5-Math.cos(yt*Math.PI)/2;let kt=nt+Ct*(Le-nt);if(xt(kt,Le)&&(kt=Le),Be.wrapperEl.scrollTo({[Ye]:kt}),xt(kt,Le)){Be.wrapperEl.style.overflow="hidden",Be.wrapperEl.style.scrollSnapType="",setTimeout(()=>{Be.wrapperEl.style.overflow="",Be.wrapperEl.scrollTo({[Ye]:kt})}),tt.cancelAnimationFrame(Be.cssModeFrameID);return}Be.cssModeFrameID=tt.requestAnimationFrame(Et)};Et()}function elementChildren(Be,Le=""){return[...Be.children].filter(Ye=>Ye.matches(Le))}function createElement(Be,Le=[]){const Ye=document.createElement(Be);return Ye.classList.add(...Array.isArray(Le)?Le:[Le]),Ye}function elementPrevAll(Be,Le){const Ye=[];for(;Be.previousElementSibling;){const tt=Be.previousElementSibling;Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),Be=tt}return Ye}function elementNextAll(Be,Le){const Ye=[];for(;Be.nextElementSibling;){const tt=Be.nextElementSibling;Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),Be=tt}return Ye}function elementStyle(Be,Le){return getWindow().getComputedStyle(Be,null).getPropertyValue(Le)}function elementIndex(Be){let Le=Be,Ye;if(Le){for(Ye=0;(Le=Le.previousSibling)!==null;)Le.nodeType===1&&(Ye+=1);return Ye}}function elementParents(Be,Le){const Ye=[];let tt=Be.parentElement;for(;tt;)Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),tt=tt.parentElement;return Ye}function elementOuterSize(Be,Le,Ye){const tt=getWindow();return Be[Le==="width"?"offsetWidth":"offsetHeight"]+parseFloat(tt.getComputedStyle(Be,null).getPropertyValue(Le==="width"?"margin-right":"margin-top"))+parseFloat(tt.getComputedStyle(Be,null).getPropertyValue(Le==="width"?"margin-left":"margin-bottom"))}let support;function calcSupport(){const Be=getWindow(),Le=getDocument$1();return{smoothScroll:Le.documentElement&&Le.documentElement.style&&"scrollBehavior"in Le.documentElement.style,touch:!!("ontouchstart"in Be||Be.DocumentTouch&&Le instanceof Be.DocumentTouch)}}function getSupport(){return support||(support=calcSupport()),support}let deviceCached;function calcDevice({userAgent:Be}={}){const Le=getSupport(),Ye=getWindow(),tt=Ye.navigator.platform,nt=Be||Ye.navigator.userAgent,ft={ios:!1,android:!1},ht=Ye.screen.width,gt=Ye.screen.height,At=nt.match(/(Android);?[\s\/]+([\d.]+)?/);let xt=nt.match(/(iPad).*OS\s([\d_]+)/);const Et=nt.match(/(iPod)(.*OS\s([\d_]+))?/),yt=!xt&&nt.match(/(iPhone\sOS|iOS)\s([\d_]+)/),Ct=tt==="Win32";let kt=tt==="MacIntel";const vt=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!xt&&kt&&Le.touch&&vt.indexOf(`${ht}x${gt}`)>=0&&(xt=nt.match(/(Version)\/([\d.]+)/),xt||(xt=[0,1,"13_0_0"]),kt=!1),At&&!Ct&&(ft.os="android",ft.android=!0),(xt||yt||Et)&&(ft.os="ios",ft.ios=!0),ft}function getDevice(Be={}){return deviceCached||(deviceCached=calcDevice(Be)),deviceCached}let browser;function calcBrowser(){const Be=getWindow();let Le=!1;function Ye(){const tt=Be.navigator.userAgent.toLowerCase();return tt.indexOf("safari")>=0&&tt.indexOf("chrome")<0&&tt.indexOf("android")<0}if(Ye()){const tt=String(Be.navigator.userAgent);if(tt.includes("Version/")){const[nt,ft]=tt.split("Version/")[1].split(" ")[0].split(".").map(ht=>Number(ht));Le=nt<16||nt===16&&ft<2}}return{isSafari:Le||Ye(),needPerspectiveFix:Le,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(Be.navigator.userAgent)}}function getBrowser(){return browser||(browser=calcBrowser()),browser}function Resize({swiper:Be,on:Le,emit:Ye}){const tt=getWindow();let nt=null,ft=null;const ht=()=>{!Be||Be.destroyed||!Be.initialized||(Ye("beforeResize"),Ye("resize"))},gt=()=>{!Be||Be.destroyed||!Be.initialized||(nt=new ResizeObserver(Et=>{ft=tt.requestAnimationFrame(()=>{const{width:yt,height:Ct}=Be;let kt=yt,vt=Ct;Et.forEach(({contentBoxSize:bt,contentRect:It,target:wt})=>{wt&&wt!==Be.el||(kt=It?It.width:(bt[0]||bt).inlineSize,vt=It?It.height:(bt[0]||bt).blockSize)}),(kt!==yt||vt!==Ct)&&ht()})}),nt.observe(Be.el))},At=()=>{ft&&tt.cancelAnimationFrame(ft),nt&&nt.unobserve&&Be.el&&(nt.unobserve(Be.el),nt=null)},xt=()=>{!Be||Be.destroyed||!Be.initialized||Ye("orientationchange")};Le("init",()=>{if(Be.params.resizeObserver&&typeof tt.ResizeObserver<"u"){gt();return}tt.addEventListener("resize",ht),tt.addEventListener("orientationchange",xt)}),Le("destroy",()=>{At(),tt.removeEventListener("resize",ht),tt.removeEventListener("orientationchange",xt)})}function Observer({swiper:Be,extendParams:Le,on:Ye,emit:tt}){const nt=[],ft=getWindow(),ht=(xt,Et={})=>{const yt=ft.MutationObserver||ft.WebkitMutationObserver,Ct=new yt(kt=>{if(Be.__preventObserver__)return;if(kt.length===1){tt("observerUpdate",kt[0]);return}const vt=function(){tt("observerUpdate",kt[0])};ft.requestAnimationFrame?ft.requestAnimationFrame(vt):ft.setTimeout(vt,0)});Ct.observe(xt,{attributes:typeof Et.attributes>"u"?!0:Et.attributes,childList:typeof Et.childList>"u"?!0:Et.childList,characterData:typeof Et.characterData>"u"?!0:Et.characterData}),nt.push(Ct)},gt=()=>{if(Be.params.observer){if(Be.params.observeParents){const xt=elementParents(Be.el);for(let Et=0;Et<xt.length;Et+=1)ht(xt[Et])}ht(Be.el,{childList:Be.params.observeSlideChildren}),ht(Be.wrapperEl,{attributes:!1})}},At=()=>{nt.forEach(xt=>{xt.disconnect()}),nt.splice(0,nt.length)};Le({observer:!1,observeParents:!1,observeSlideChildren:!1}),Ye("init",gt),Ye("destroy",At)}const eventsEmitter={on(Be,Le,Ye){const tt=this;if(!tt.eventsListeners||tt.destroyed||typeof Le!="function")return tt;const nt=Ye?"unshift":"push";return Be.split(" ").forEach(ft=>{tt.eventsListeners[ft]||(tt.eventsListeners[ft]=[]),tt.eventsListeners[ft][nt](Le)}),tt},once(Be,Le,Ye){const tt=this;if(!tt.eventsListeners||tt.destroyed||typeof Le!="function")return tt;function nt(...ft){tt.off(Be,nt),nt.__emitterProxy&&delete nt.__emitterProxy,Le.apply(tt,ft)}return nt.__emitterProxy=Le,tt.on(Be,nt,Ye)},onAny(Be,Le){const Ye=this;if(!Ye.eventsListeners||Ye.destroyed||typeof Be!="function")return Ye;const tt=Le?"unshift":"push";return Ye.eventsAnyListeners.indexOf(Be)<0&&Ye.eventsAnyListeners[tt](Be),Ye},offAny(Be){const Le=this;if(!Le.eventsListeners||Le.destroyed||!Le.eventsAnyListeners)return Le;const Ye=Le.eventsAnyListeners.indexOf(Be);return Ye>=0&&Le.eventsAnyListeners.splice(Ye,1),Le},off(Be,Le){const Ye=this;return!Ye.eventsListeners||Ye.destroyed||!Ye.eventsListeners||Be.split(" ").forEach(tt=>{typeof Le>"u"?Ye.eventsListeners[tt]=[]:Ye.eventsListeners[tt]&&Ye.eventsListeners[tt].forEach((nt,ft)=>{(nt===Le||nt.__emitterProxy&&nt.__emitterProxy===Le)&&Ye.eventsListeners[tt].splice(ft,1)})}),Ye},emit(...Be){const Le=this;if(!Le.eventsListeners||Le.destroyed||!Le.eventsListeners)return Le;let Ye,tt,nt;return typeof Be[0]=="string"||Array.isArray(Be[0])?(Ye=Be[0],tt=Be.slice(1,Be.length),nt=Le):(Ye=Be[0].events,tt=Be[0].data,nt=Be[0].context||Le),tt.unshift(nt),(Array.isArray(Ye)?Ye:Ye.split(" ")).forEach(ht=>{Le.eventsAnyListeners&&Le.eventsAnyListeners.length&&Le.eventsAnyListeners.forEach(gt=>{gt.apply(nt,[ht,...tt])}),Le.eventsListeners&&Le.eventsListeners[ht]&&Le.eventsListeners[ht].forEach(gt=>{gt.apply(nt,tt)})}),Le}};function updateSize(){const Be=this;let Le,Ye;const tt=Be.el;typeof Be.params.width<"u"&&Be.params.width!==null?Le=Be.params.width:Le=tt.clientWidth,typeof Be.params.height<"u"&&Be.params.height!==null?Ye=Be.params.height:Ye=tt.clientHeight,!(Le===0&&Be.isHorizontal()||Ye===0&&Be.isVertical())&&(Le=Le-parseInt(elementStyle(tt,"padding-left")||0,10)-parseInt(elementStyle(tt,"padding-right")||0,10),Ye=Ye-parseInt(elementStyle(tt,"padding-top")||0,10)-parseInt(elementStyle(tt,"padding-bottom")||0,10),Number.isNaN(Le)&&(Le=0),Number.isNaN(Ye)&&(Ye=0),Object.assign(Be,{width:Le,height:Ye,size:Be.isHorizontal()?Le:Ye}))}function updateSlides(){const Be=this;function Le(Kt){return Be.isHorizontal()?Kt:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[Kt]}function Ye(Kt,Vt){return parseFloat(Kt.getPropertyValue(Le(Vt))||0)}const tt=Be.params,{wrapperEl:nt,slidesEl:ft,size:ht,rtlTranslate:gt,wrongRTL:At}=Be,xt=Be.virtual&&tt.virtual.enabled,Et=xt?Be.virtual.slides.length:Be.slides.length,yt=elementChildren(ft,`.${Be.params.slideClass}, swiper-slide`),Ct=xt?Be.virtual.slides.length:yt.length;let kt=[];const vt=[],bt=[];let It=tt.slidesOffsetBefore;typeof It=="function"&&(It=tt.slidesOffsetBefore.call(Be));let wt=tt.slidesOffsetAfter;typeof wt=="function"&&(wt=tt.slidesOffsetAfter.call(Be));const Rt=Be.snapGrid.length,Tt=Be.slidesGrid.length;let Bt=tt.spaceBetween,Dt=-It,Pt=0,Nt=0;if(typeof ht>"u")return;typeof Bt=="string"&&Bt.indexOf("%")>=0?Bt=parseFloat(Bt.replace("%",""))/100*ht:typeof Bt=="string"&&(Bt=parseFloat(Bt)),Be.virtualSize=-Bt,yt.forEach(Kt=>{gt?Kt.style.marginLeft="":Kt.style.marginRight="",Kt.style.marginBottom="",Kt.style.marginTop=""}),tt.centeredSlides&&tt.cssMode&&(setCSSProperty(nt,"--swiper-centered-offset-before",""),setCSSProperty(nt,"--swiper-centered-offset-after",""));const Lt=tt.grid&&tt.grid.rows>1&&Be.grid;Lt&&Be.grid.initSlides(Ct);let Wt;const $t=tt.slidesPerView==="auto"&&tt.breakpoints&&Object.keys(tt.breakpoints).filter(Kt=>typeof tt.breakpoints[Kt].slidesPerView<"u").length>0;for(let Kt=0;Kt<Ct;Kt+=1){Wt=0;let Vt;if(yt[Kt]&&(Vt=yt[Kt]),Lt&&Be.grid.updateSlide(Kt,Vt,Ct,Le),!(yt[Kt]&&elementStyle(Vt,"display")==="none")){if(tt.slidesPerView==="auto"){$t&&(yt[Kt].style[Le("width")]="");const Ut=getComputedStyle(Vt),_t=Vt.style.transform,Xt=Vt.style.webkitTransform;if(_t&&(Vt.style.transform="none"),Xt&&(Vt.style.webkitTransform="none"),tt.roundLengths)Wt=Be.isHorizontal()?elementOuterSize(Vt,"width"):elementOuterSize(Vt,"height");else{const Qt=Ye(Ut,"width"),jt=Ye(Ut,"padding-left"),Gt=Ye(Ut,"padding-right"),qt=Ye(Ut,"margin-left"),zt=Ye(Ut,"margin-right"),e0=Ut.getPropertyValue("box-sizing");if(e0&&e0==="border-box")Wt=Qt+qt+zt;else{const{clientWidth:s0,offsetWidth:t0}=Vt;Wt=Qt+jt+Gt+qt+zt+(t0-s0)}}_t&&(Vt.style.transform=_t),Xt&&(Vt.style.webkitTransform=Xt),tt.roundLengths&&(Wt=Math.floor(Wt))}else Wt=(ht-(tt.slidesPerView-1)*Bt)/tt.slidesPerView,tt.roundLengths&&(Wt=Math.floor(Wt)),yt[Kt]&&(yt[Kt].style[Le("width")]=`${Wt}px`);yt[Kt]&&(yt[Kt].swiperSlideSize=Wt),bt.push(Wt),tt.centeredSlides?(Dt=Dt+Wt/2+Pt/2+Bt,Pt===0&&Kt!==0&&(Dt=Dt-ht/2-Bt),Kt===0&&(Dt=Dt-ht/2-Bt),Math.abs(Dt)<1/1e3&&(Dt=0),tt.roundLengths&&(Dt=Math.floor(Dt)),Nt%tt.slidesPerGroup===0&&kt.push(Dt),vt.push(Dt)):(tt.roundLengths&&(Dt=Math.floor(Dt)),(Nt-Math.min(Be.params.slidesPerGroupSkip,Nt))%Be.params.slidesPerGroup===0&&kt.push(Dt),vt.push(Dt),Dt=Dt+Wt+Bt),Be.virtualSize+=Wt+Bt,Pt=Wt,Nt+=1}}if(Be.virtualSize=Math.max(Be.virtualSize,ht)+wt,gt&&At&&(tt.effect==="slide"||tt.effect==="coverflow")&&(nt.style.width=`${Be.virtualSize+Bt}px`),tt.setWrapperSize&&(nt.style[Le("width")]=`${Be.virtualSize+Bt}px`),Lt&&Be.grid.updateWrapperSize(Wt,kt,Le),!tt.centeredSlides){const Kt=[];for(let Vt=0;Vt<kt.length;Vt+=1){let Ut=kt[Vt];tt.roundLengths&&(Ut=Math.floor(Ut)),kt[Vt]<=Be.virtualSize-ht&&Kt.push(Ut)}kt=Kt,Math.floor(Be.virtualSize-ht)-Math.floor(kt[kt.length-1])>1&&kt.push(Be.virtualSize-ht)}if(xt&&tt.loop){const Kt=bt[0]+Bt;if(tt.slidesPerGroup>1){const Vt=Math.ceil((Be.virtual.slidesBefore+Be.virtual.slidesAfter)/tt.slidesPerGroup),Ut=Kt*tt.slidesPerGroup;for(let _t=0;_t<Vt;_t+=1)kt.push(kt[kt.length-1]+Ut)}for(let Vt=0;Vt<Be.virtual.slidesBefore+Be.virtual.slidesAfter;Vt+=1)tt.slidesPerGroup===1&&kt.push(kt[kt.length-1]+Kt),vt.push(vt[vt.length-1]+Kt),Be.virtualSize+=Kt}if(kt.length===0&&(kt=[0]),Bt!==0){const Kt=Be.isHorizontal()&>?"marginLeft":Le("marginRight");yt.filter((Vt,Ut)=>!tt.cssMode||tt.loop?!0:Ut!==yt.length-1).forEach(Vt=>{Vt.style[Kt]=`${Bt}px`})}if(tt.centeredSlides&&tt.centeredSlidesBounds){let Kt=0;bt.forEach(Ut=>{Kt+=Ut+(Bt||0)}),Kt-=Bt;const Vt=Kt-ht;kt=kt.map(Ut=>Ut<=0?-It:Ut>Vt?Vt+wt:Ut)}if(tt.centerInsufficientSlides){let Kt=0;if(bt.forEach(Vt=>{Kt+=Vt+(Bt||0)}),Kt-=Bt,Kt<ht){const Vt=(ht-Kt)/2;kt.forEach((Ut,_t)=>{kt[_t]=Ut-Vt}),vt.forEach((Ut,_t)=>{vt[_t]=Ut+Vt})}}if(Object.assign(Be,{slides:yt,snapGrid:kt,slidesGrid:vt,slidesSizesGrid:bt}),tt.centeredSlides&&tt.cssMode&&!tt.centeredSlidesBounds){setCSSProperty(nt,"--swiper-centered-offset-before",`${-kt[0]}px`),setCSSProperty(nt,"--swiper-centered-offset-after",`${Be.size/2-bt[bt.length-1]/2}px`);const Kt=-Be.snapGrid[0],Vt=-Be.slidesGrid[0];Be.snapGrid=Be.snapGrid.map(Ut=>Ut+Kt),Be.slidesGrid=Be.slidesGrid.map(Ut=>Ut+Vt)}if(Ct!==Et&&Be.emit("slidesLengthChange"),kt.length!==Rt&&(Be.params.watchOverflow&&Be.checkOverflow(),Be.emit("snapGridLengthChange")),vt.length!==Tt&&Be.emit("slidesGridLengthChange"),tt.watchSlidesProgress&&Be.updateSlidesOffset(),!xt&&!tt.cssMode&&(tt.effect==="slide"||tt.effect==="fade")){const Kt=`${tt.containerModifierClass}backface-hidden`,Vt=Be.el.classList.contains(Kt);Ct<=tt.maxBackfaceHiddenSlides?Vt||Be.el.classList.add(Kt):Vt&&Be.el.classList.remove(Kt)}}function updateAutoHeight(Be){const Le=this,Ye=[],tt=Le.virtual&&Le.params.virtual.enabled;let nt=0,ft;typeof Be=="number"?Le.setTransition(Be):Be===!0&&Le.setTransition(Le.params.speed);const ht=gt=>tt?Le.slides[Le.getSlideIndexByData(gt)]:Le.slides[gt];if(Le.params.slidesPerView!=="auto"&&Le.params.slidesPerView>1)if(Le.params.centeredSlides)(Le.visibleSlides||[]).forEach(gt=>{Ye.push(gt)});else for(ft=0;ft<Math.ceil(Le.params.slidesPerView);ft+=1){const gt=Le.activeIndex+ft;if(gt>Le.slides.length&&!tt)break;Ye.push(ht(gt))}else Ye.push(ht(Le.activeIndex));for(ft=0;ft<Ye.length;ft+=1)if(typeof Ye[ft]<"u"){const gt=Ye[ft].offsetHeight;nt=gt>nt?gt:nt}(nt||nt===0)&&(Le.wrapperEl.style.height=`${nt}px`)}function updateSlidesOffset(){const Be=this,Le=Be.slides,Ye=Be.isElement?Be.isHorizontal()?Be.wrapperEl.offsetLeft:Be.wrapperEl.offsetTop:0;for(let tt=0;tt<Le.length;tt+=1)Le[tt].swiperSlideOffset=(Be.isHorizontal()?Le[tt].offsetLeft:Le[tt].offsetTop)-Ye-Be.cssOverflowAdjustment()}function updateSlidesProgress(Be=this&&this.translate||0){const Le=this,Ye=Le.params,{slides:tt,rtlTranslate:nt,snapGrid:ft}=Le;if(tt.length===0)return;typeof tt[0].swiperSlideOffset>"u"&&Le.updateSlidesOffset();let ht=-Be;nt&&(ht=Be),tt.forEach(At=>{At.classList.remove(Ye.slideVisibleClass)}),Le.visibleSlidesIndexes=[],Le.visibleSlides=[];let gt=Ye.spaceBetween;typeof gt=="string"&>.indexOf("%")>=0?gt=parseFloat(gt.replace("%",""))/100*Le.size:typeof gt=="string"&&(gt=parseFloat(gt));for(let At=0;At<tt.length;At+=1){const xt=tt[At];let Et=xt.swiperSlideOffset;Ye.cssMode&&Ye.centeredSlides&&(Et-=tt[0].swiperSlideOffset);const yt=(ht+(Ye.centeredSlides?Le.minTranslate():0)-Et)/(xt.swiperSlideSize+gt),Ct=(ht-ft[0]+(Ye.centeredSlides?Le.minTranslate():0)-Et)/(xt.swiperSlideSize+gt),kt=-(ht-Et),vt=kt+Le.slidesSizesGrid[At];(kt>=0&&kt<Le.size-1||vt>1&&vt<=Le.size||kt<=0&&vt>=Le.size)&&(Le.visibleSlides.push(xt),Le.visibleSlidesIndexes.push(At),tt[At].classList.add(Ye.slideVisibleClass)),xt.progress=nt?-yt:yt,xt.originalProgress=nt?-Ct:Ct}}function updateProgress(Be){const Le=this;if(typeof Be>"u"){const Et=Le.rtlTranslate?-1:1;Be=Le&&Le.translate&&Le.translate*Et||0}const Ye=Le.params,tt=Le.maxTranslate()-Le.minTranslate();let{progress:nt,isBeginning:ft,isEnd:ht,progressLoop:gt}=Le;const At=ft,xt=ht;if(tt===0)nt=0,ft=!0,ht=!0;else{nt=(Be-Le.minTranslate())/tt;const Et=Math.abs(Be-Le.minTranslate())<1,yt=Math.abs(Be-Le.maxTranslate())<1;ft=Et||nt<=0,ht=yt||nt>=1,Et&&(nt=0),yt&&(nt=1)}if(Ye.loop){const Et=Le.getSlideIndexByData(0),yt=Le.getSlideIndexByData(Le.slides.length-1),Ct=Le.slidesGrid[Et],kt=Le.slidesGrid[yt],vt=Le.slidesGrid[Le.slidesGrid.length-1],bt=Math.abs(Be);bt>=Ct?gt=(bt-Ct)/vt:gt=(bt+vt-kt)/vt,gt>1&&(gt-=1)}Object.assign(Le,{progress:nt,progressLoop:gt,isBeginning:ft,isEnd:ht}),(Ye.watchSlidesProgress||Ye.centeredSlides&&Ye.autoHeight)&&Le.updateSlidesProgress(Be),ft&&!At&&Le.emit("reachBeginning toEdge"),ht&&!xt&&Le.emit("reachEnd toEdge"),(At&&!ft||xt&&!ht)&&Le.emit("fromEdge"),Le.emit("progress",nt)}function updateSlidesClasses(){const Be=this,{slides:Le,params:Ye,slidesEl:tt,activeIndex:nt}=Be,ft=Be.virtual&&Ye.virtual.enabled,ht=At=>elementChildren(tt,`.${Ye.slideClass}${At}, swiper-slide${At}`)[0];Le.forEach(At=>{At.classList.remove(Ye.slideActiveClass,Ye.slideNextClass,Ye.slidePrevClass)});let gt;if(ft)if(Ye.loop){let At=nt-Be.virtual.slidesBefore;At<0&&(At=Be.virtual.slides.length+At),At>=Be.virtual.slides.length&&(At-=Be.virtual.slides.length),gt=ht(`[data-swiper-slide-index="${At}"]`)}else gt=ht(`[data-swiper-slide-index="${nt}"]`);else gt=Le[nt];if(gt){gt.classList.add(Ye.slideActiveClass);let At=elementNextAll(gt,`.${Ye.slideClass}, swiper-slide`)[0];Ye.loop&&!At&&(At=Le[0]),At&&At.classList.add(Ye.slideNextClass);let xt=elementPrevAll(gt,`.${Ye.slideClass}, swiper-slide`)[0];Ye.loop&&!xt===0&&(xt=Le[Le.length-1]),xt&&xt.classList.add(Ye.slidePrevClass)}Be.emitSlidesClasses()}const processLazyPreloader=(Be,Le)=>{if(!Be||Be.destroyed||!Be.params)return;const Ye=()=>Be.isElement?"swiper-slide":`.${Be.params.slideClass}`,tt=Le.closest(Ye());if(tt){const nt=tt.querySelector(`.${Be.params.lazyPreloaderClass}`);nt&&nt.remove()}},unlazy=(Be,Le)=>{if(!Be.slides[Le])return;const Ye=Be.slides[Le].querySelector('[loading="lazy"]');Ye&&Ye.removeAttribute("loading")},preload=Be=>{if(!Be||Be.destroyed||!Be.params)return;let Le=Be.params.lazyPreloadPrevNext;const Ye=Be.slides.length;if(!Ye||!Le||Le<0)return;Le=Math.min(Le,Ye);const tt=Be.params.slidesPerView==="auto"?Be.slidesPerViewDynamic():Math.ceil(Be.params.slidesPerView),nt=Be.activeIndex;if(Be.params.grid&&Be.params.grid.rows>1){const ht=nt,gt=[ht-Le];gt.push(...Array.from({length:Le}).map((At,xt)=>ht+tt+xt)),Be.slides.forEach((At,xt)=>{gt.includes(At.column)&&unlazy(Be,xt)});return}const ft=nt+tt-1;if(Be.params.rewind||Be.params.loop)for(let ht=nt-Le;ht<=ft+Le;ht+=1){const gt=(ht%Ye+Ye)%Ye;(gt<nt||gt>ft)&&unlazy(Be,gt)}else for(let ht=Math.max(nt-Le,0);ht<=Math.min(ft+Le,Ye-1);ht+=1)ht!==nt&&(ht>ft||ht<nt)&&unlazy(Be,ht)};function getActiveIndexByTranslate(Be){const{slidesGrid:Le,params:Ye}=Be,tt=Be.rtlTranslate?Be.translate:-Be.translate;let nt;for(let ft=0;ft<Le.length;ft+=1)typeof Le[ft+1]<"u"?tt>=Le[ft]&&tt<Le[ft+1]-(Le[ft+1]-Le[ft])/2?nt=ft:tt>=Le[ft]&&tt<Le[ft+1]&&(nt=ft+1):tt>=Le[ft]&&(nt=ft);return Ye.normalizeSlideIndex&&(nt<0||typeof nt>"u")&&(nt=0),nt}function updateActiveIndex(Be){const Le=this,Ye=Le.rtlTranslate?Le.translate:-Le.translate,{snapGrid:tt,params:nt,activeIndex:ft,realIndex:ht,snapIndex:gt}=Le;let At=Be,xt;const Et=Ct=>{let kt=Ct-Le.virtual.slidesBefore;return kt<0&&(kt=Le.virtual.slides.length+kt),kt>=Le.virtual.slides.length&&(kt-=Le.virtual.slides.length),kt};if(typeof At>"u"&&(At=getActiveIndexByTranslate(Le)),tt.indexOf(Ye)>=0)xt=tt.indexOf(Ye);else{const Ct=Math.min(nt.slidesPerGroupSkip,At);xt=Ct+Math.floor((At-Ct)/nt.slidesPerGroup)}if(xt>=tt.length&&(xt=tt.length-1),At===ft){xt!==gt&&(Le.snapIndex=xt,Le.emit("snapIndexChange")),Le.params.loop&&Le.virtual&&Le.params.virtual.enabled&&(Le.realIndex=Et(At));return}let yt;Le.virtual&&nt.virtual.enabled&&nt.loop?yt=Et(At):Le.slides[At]?yt=parseInt(Le.slides[At].getAttribute("data-swiper-slide-index")||At,10):yt=At,Object.assign(Le,{previousSnapIndex:gt,snapIndex:xt,previousRealIndex:ht,realIndex:yt,previousIndex:ft,activeIndex:At}),Le.initialized&&preload(Le),Le.emit("activeIndexChange"),Le.emit("snapIndexChange"),ht!==yt&&Le.emit("realIndexChange"),(Le.initialized||Le.params.runCallbacksOnInit)&&Le.emit("slideChange")}function updateClickedSlide(Be){const Le=this,Ye=Le.params,tt=Be.closest(`.${Ye.slideClass}, swiper-slide`);let nt=!1,ft;if(tt){for(let ht=0;ht<Le.slides.length;ht+=1)if(Le.slides[ht]===tt){nt=!0,ft=ht;break}}if(tt&&nt)Le.clickedSlide=tt,Le.virtual&&Le.params.virtual.enabled?Le.clickedIndex=parseInt(tt.getAttribute("data-swiper-slide-index"),10):Le.clickedIndex=ft;else{Le.clickedSlide=void 0,Le.clickedIndex=void 0;return}Ye.slideToClickedSlide&&Le.clickedIndex!==void 0&&Le.clickedIndex!==Le.activeIndex&&Le.slideToClickedSlide()}const update$2={updateSize,updateSlides,updateAutoHeight,updateSlidesOffset,updateSlidesProgress,updateProgress,updateSlidesClasses,updateActiveIndex,updateClickedSlide};function getSwiperTranslate(Be=this.isHorizontal()?"x":"y"){const Le=this,{params:Ye,rtlTranslate:tt,translate:nt,wrapperEl:ft}=Le;if(Ye.virtualTranslate)return tt?-nt:nt;if(Ye.cssMode)return nt;let ht=getTranslate(ft,Be);return ht+=Le.cssOverflowAdjustment(),tt&&(ht=-ht),ht||0}function setTranslate(Be,Le){const Ye=this,{rtlTranslate:tt,params:nt,wrapperEl:ft,progress:ht}=Ye;let gt=0,At=0;const xt=0;Ye.isHorizontal()?gt=tt?-Be:Be:At=Be,nt.roundLengths&&(gt=Math.floor(gt),At=Math.floor(At)),Ye.previousTranslate=Ye.translate,Ye.translate=Ye.isHorizontal()?gt:At,nt.cssMode?ft[Ye.isHorizontal()?"scrollLeft":"scrollTop"]=Ye.isHorizontal()?-gt:-At:nt.virtualTranslate||(Ye.isHorizontal()?gt-=Ye.cssOverflowAdjustment():At-=Ye.cssOverflowAdjustment(),ft.style.transform=`translate3d(${gt}px, ${At}px, ${xt}px)`);let Et;const yt=Ye.maxTranslate()-Ye.minTranslate();yt===0?Et=0:Et=(Be-Ye.minTranslate())/yt,Et!==ht&&Ye.updateProgress(Be),Ye.emit("setTranslate",Ye.translate,Le)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}function translateTo(Be=0,Le=this.params.speed,Ye=!0,tt=!0,nt){const ft=this,{params:ht,wrapperEl:gt}=ft;if(ft.animating&&ht.preventInteractionOnTransition)return!1;const At=ft.minTranslate(),xt=ft.maxTranslate();let Et;if(tt&&Be>At?Et=At:tt&&Be<xt?Et=xt:Et=Be,ft.updateProgress(Et),ht.cssMode){const yt=ft.isHorizontal();if(Le===0)gt[yt?"scrollLeft":"scrollTop"]=-Et;else{if(!ft.support.smoothScroll)return animateCSSModeScroll({swiper:ft,targetPosition:-Et,side:yt?"left":"top"}),!0;gt.scrollTo({[yt?"left":"top"]:-Et,behavior:"smooth"})}return!0}return Le===0?(ft.setTransition(0),ft.setTranslate(Et),Ye&&(ft.emit("beforeTransitionStart",Le,nt),ft.emit("transitionEnd"))):(ft.setTransition(Le),ft.setTranslate(Et),Ye&&(ft.emit("beforeTransitionStart",Le,nt),ft.emit("transitionStart")),ft.animating||(ft.animating=!0,ft.onTranslateToWrapperTransitionEnd||(ft.onTranslateToWrapperTransitionEnd=function(Ct){!ft||ft.destroyed||Ct.target===this&&(ft.wrapperEl.removeEventListener("transitionend",ft.onTranslateToWrapperTransitionEnd),ft.onTranslateToWrapperTransitionEnd=null,delete ft.onTranslateToWrapperTransitionEnd,Ye&&ft.emit("transitionEnd"))}),ft.wrapperEl.addEventListener("transitionend",ft.onTranslateToWrapperTransitionEnd))),!0}const translate={getTranslate:getSwiperTranslate,setTranslate,minTranslate,maxTranslate,translateTo};function setTransition(Be,Le){const Ye=this;Ye.params.cssMode||(Ye.wrapperEl.style.transitionDuration=`${Be}ms`),Ye.emit("setTransition",Be,Le)}function transitionEmit({swiper:Be,runCallbacks:Le,direction:Ye,step:tt}){const{activeIndex:nt,previousIndex:ft}=Be;let ht=Ye;if(ht||(nt>ft?ht="next":nt<ft?ht="prev":ht="reset"),Be.emit(`transition${tt}`),Le&&nt!==ft){if(ht==="reset"){Be.emit(`slideResetTransition${tt}`);return}Be.emit(`slideChangeTransition${tt}`),ht==="next"?Be.emit(`slideNextTransition${tt}`):Be.emit(`slidePrevTransition${tt}`)}}function transitionStart(Be=!0,Le){const Ye=this,{params:tt}=Ye;tt.cssMode||(tt.autoHeight&&Ye.updateAutoHeight(),transitionEmit({swiper:Ye,runCallbacks:Be,direction:Le,step:"Start"}))}function transitionEnd(Be=!0,Le){const Ye=this,{params:tt}=Ye;Ye.animating=!1,!tt.cssMode&&(Ye.setTransition(0),transitionEmit({swiper:Ye,runCallbacks:Be,direction:Le,step:"End"}))}const transition={setTransition,transitionStart,transitionEnd};function slideTo(Be=0,Le=this.params.speed,Ye=!0,tt,nt){typeof Be=="string"&&(Be=parseInt(Be,10));const ft=this;let ht=Be;ht<0&&(ht=0);const{params:gt,snapGrid:At,slidesGrid:xt,previousIndex:Et,activeIndex:yt,rtlTranslate:Ct,wrapperEl:kt,enabled:vt}=ft;if(ft.animating&>.preventInteractionOnTransition||!vt&&!tt&&!nt)return!1;const bt=Math.min(ft.params.slidesPerGroupSkip,ht);let It=bt+Math.floor((ht-bt)/ft.params.slidesPerGroup);It>=At.length&&(It=At.length-1);const wt=-At[It];if(gt.normalizeSlideIndex)for(let Tt=0;Tt<xt.length;Tt+=1){const Bt=-Math.floor(wt*100),Dt=Math.floor(xt[Tt]*100),Pt=Math.floor(xt[Tt+1]*100);typeof xt[Tt+1]<"u"?Bt>=Dt&&Bt<Pt-(Pt-Dt)/2?ht=Tt:Bt>=Dt&&Bt<Pt&&(ht=Tt+1):Bt>=Dt&&(ht=Tt)}if(ft.initialized&&ht!==yt&&(!ft.allowSlideNext&&(Ct?wt>ft.translate&&wt>ft.minTranslate():wt<ft.translate&&wt<ft.minTranslate())||!ft.allowSlidePrev&&wt>ft.translate&&wt>ft.maxTranslate()&&(yt||0)!==ht))return!1;ht!==(Et||0)&&Ye&&ft.emit("beforeSlideChangeStart"),ft.updateProgress(wt);let Rt;if(ht>yt?Rt="next":ht<yt?Rt="prev":Rt="reset",Ct&&-wt===ft.translate||!Ct&&wt===ft.translate)return ft.updateActiveIndex(ht),gt.autoHeight&&ft.updateAutoHeight(),ft.updateSlidesClasses(),gt.effect!=="slide"&&ft.setTranslate(wt),Rt!=="reset"&&(ft.transitionStart(Ye,Rt),ft.transitionEnd(Ye,Rt)),!1;if(gt.cssMode){const Tt=ft.isHorizontal(),Bt=Ct?wt:-wt;if(Le===0){const Dt=ft.virtual&&ft.params.virtual.enabled;Dt&&(ft.wrapperEl.style.scrollSnapType="none",ft._immediateVirtual=!0),Dt&&!ft._cssModeVirtualInitialSet&&ft.params.initialSlide>0?(ft._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{kt[Tt?"scrollLeft":"scrollTop"]=Bt})):kt[Tt?"scrollLeft":"scrollTop"]=Bt,Dt&&requestAnimationFrame(()=>{ft.wrapperEl.style.scrollSnapType="",ft._immediateVirtual=!1})}else{if(!ft.support.smoothScroll)return animateCSSModeScroll({swiper:ft,targetPosition:Bt,side:Tt?"left":"top"}),!0;kt.scrollTo({[Tt?"left":"top"]:Bt,behavior:"smooth"})}return!0}return ft.setTransition(Le),ft.setTranslate(wt),ft.updateActiveIndex(ht),ft.updateSlidesClasses(),ft.emit("beforeTransitionStart",Le,tt),ft.transitionStart(Ye,Rt),Le===0?ft.transitionEnd(Ye,Rt):ft.animating||(ft.animating=!0,ft.onSlideToWrapperTransitionEnd||(ft.onSlideToWrapperTransitionEnd=function(Bt){!ft||ft.destroyed||Bt.target===this&&(ft.wrapperEl.removeEventListener("transitionend",ft.onSlideToWrapperTransitionEnd),ft.onSlideToWrapperTransitionEnd=null,delete ft.onSlideToWrapperTransitionEnd,ft.transitionEnd(Ye,Rt))}),ft.wrapperEl.addEventListener("transitionend",ft.onSlideToWrapperTransitionEnd)),!0}function slideToLoop(Be=0,Le=this.params.speed,Ye=!0,tt){typeof Be=="string"&&(Be=parseInt(Be,10));const nt=this;let ft=Be;return nt.params.loop&&(nt.virtual&&nt.params.virtual.enabled?ft=ft+nt.virtual.slidesBefore:ft=nt.getSlideIndexByData(ft)),nt.slideTo(ft,Le,Ye,tt)}function slideNext(Be=this.params.speed,Le=!0,Ye){const tt=this,{enabled:nt,params:ft,animating:ht}=tt;if(!nt)return tt;let gt=ft.slidesPerGroup;ft.slidesPerView==="auto"&&ft.slidesPerGroup===1&&ft.slidesPerGroupAuto&&(gt=Math.max(tt.slidesPerViewDynamic("current",!0),1));const At=tt.activeIndex<ft.slidesPerGroupSkip?1:gt,xt=tt.virtual&&ft.virtual.enabled;if(ft.loop){if(ht&&!xt&&ft.loopPreventsSliding)return!1;tt.loopFix({direction:"next"}),tt._clientLeft=tt.wrapperEl.clientLeft}return ft.rewind&&tt.isEnd?tt.slideTo(0,Be,Le,Ye):tt.slideTo(tt.activeIndex+At,Be,Le,Ye)}function slidePrev(Be=this.params.speed,Le=!0,Ye){const tt=this,{params:nt,snapGrid:ft,slidesGrid:ht,rtlTranslate:gt,enabled:At,animating:xt}=tt;if(!At)return tt;const Et=tt.virtual&&nt.virtual.enabled;if(nt.loop){if(xt&&!Et&&nt.loopPreventsSliding)return!1;tt.loopFix({direction:"prev"}),tt._clientLeft=tt.wrapperEl.clientLeft}const yt=gt?tt.translate:-tt.translate;function Ct(wt){return wt<0?-Math.floor(Math.abs(wt)):Math.floor(wt)}const kt=Ct(yt),vt=ft.map(wt=>Ct(wt));let bt=ft[vt.indexOf(kt)-1];if(typeof bt>"u"&&nt.cssMode){let wt;ft.forEach((Rt,Tt)=>{kt>=Rt&&(wt=Tt)}),typeof wt<"u"&&(bt=ft[wt>0?wt-1:wt])}let It=0;if(typeof bt<"u"&&(It=ht.indexOf(bt),It<0&&(It=tt.activeIndex-1),nt.slidesPerView==="auto"&&nt.slidesPerGroup===1&&nt.slidesPerGroupAuto&&(It=It-tt.slidesPerViewDynamic("previous",!0)+1,It=Math.max(It,0))),nt.rewind&&tt.isBeginning){const wt=tt.params.virtual&&tt.params.virtual.enabled&&tt.virtual?tt.virtual.slides.length-1:tt.slides.length-1;return tt.slideTo(wt,Be,Le,Ye)}return tt.slideTo(It,Be,Le,Ye)}function slideReset(Be=this.params.speed,Le=!0,Ye){const tt=this;return tt.slideTo(tt.activeIndex,Be,Le,Ye)}function slideToClosest(Be=this.params.speed,Le=!0,Ye,tt=.5){const nt=this;let ft=nt.activeIndex;const ht=Math.min(nt.params.slidesPerGroupSkip,ft),gt=ht+Math.floor((ft-ht)/nt.params.slidesPerGroup),At=nt.rtlTranslate?nt.translate:-nt.translate;if(At>=nt.snapGrid[gt]){const xt=nt.snapGrid[gt],Et=nt.snapGrid[gt+1];At-xt>(Et-xt)*tt&&(ft+=nt.params.slidesPerGroup)}else{const xt=nt.snapGrid[gt-1],Et=nt.snapGrid[gt];At-xt<=(Et-xt)*tt&&(ft-=nt.params.slidesPerGroup)}return ft=Math.max(ft,0),ft=Math.min(ft,nt.slidesGrid.length-1),nt.slideTo(ft,Be,Le,Ye)}function slideToClickedSlide(){const Be=this,{params:Le,slidesEl:Ye}=Be,tt=Le.slidesPerView==="auto"?Be.slidesPerViewDynamic():Le.slidesPerView;let nt=Be.clickedIndex,ft;const ht=Be.isElement?"swiper-slide":`.${Le.slideClass}`;if(Le.loop){if(Be.animating)return;ft=parseInt(Be.clickedSlide.getAttribute("data-swiper-slide-index"),10),Le.centeredSlides?nt<Be.loopedSlides-tt/2||nt>Be.slides.length-Be.loopedSlides+tt/2?(Be.loopFix(),nt=Be.getSlideIndex(elementChildren(Ye,`${ht}[data-swiper-slide-index="${ft}"]`)[0]),nextTick(()=>{Be.slideTo(nt)})):Be.slideTo(nt):nt>Be.slides.length-tt?(Be.loopFix(),nt=Be.getSlideIndex(elementChildren(Ye,`${ht}[data-swiper-slide-index="${ft}"]`)[0]),nextTick(()=>{Be.slideTo(nt)})):Be.slideTo(nt)}else Be.slideTo(nt)}const slide={slideTo,slideToLoop,slideNext,slidePrev,slideReset,slideToClosest,slideToClickedSlide};function loopCreate(Be){const Le=this,{params:Ye,slidesEl:tt}=Le;if(!Ye.loop||Le.virtual&&Le.params.virtual.enabled)return;elementChildren(tt,`.${Ye.slideClass}, swiper-slide`).forEach((ft,ht)=>{ft.setAttribute("data-swiper-slide-index",ht)}),Le.loopFix({slideRealIndex:Be,direction:Ye.centeredSlides?void 0:"next"})}function loopFix({slideRealIndex:Be,slideTo:Le=!0,direction:Ye,setTranslate:tt,activeSlideIndex:nt,byController:ft,byMousewheel:ht}={}){const gt=this;if(!gt.params.loop)return;gt.emit("beforeLoopFix");const{slides:At,allowSlidePrev:xt,allowSlideNext:Et,slidesEl:yt,params:Ct}=gt;if(gt.allowSlidePrev=!0,gt.allowSlideNext=!0,gt.virtual&&Ct.virtual.enabled){Le&&(!Ct.centeredSlides&>.snapIndex===0?gt.slideTo(gt.virtual.slides.length,0,!1,!0):Ct.centeredSlides&>.snapIndex<Ct.slidesPerView?gt.slideTo(gt.virtual.slides.length+gt.snapIndex,0,!1,!0):gt.snapIndex===gt.snapGrid.length-1&>.slideTo(gt.virtual.slidesBefore,0,!1,!0)),gt.allowSlidePrev=xt,gt.allowSlideNext=Et,gt.emit("loopFix");return}const kt=Ct.slidesPerView==="auto"?gt.slidesPerViewDynamic():Math.ceil(parseFloat(Ct.slidesPerView,10));let vt=Ct.loopedSlides||kt;vt%Ct.slidesPerGroup!==0&&(vt+=Ct.slidesPerGroup-vt%Ct.slidesPerGroup),gt.loopedSlides=vt;const bt=[],It=[];let wt=gt.activeIndex;typeof nt>"u"?nt=gt.getSlideIndex(gt.slides.filter(Pt=>Pt.classList.contains(Ct.slideActiveClass))[0]):wt=nt;const Rt=Ye==="next"||!Ye,Tt=Ye==="prev"||!Ye;let Bt=0,Dt=0;if(nt<vt){Bt=Math.max(vt-nt,Ct.slidesPerGroup);for(let Pt=0;Pt<vt-nt;Pt+=1){const Nt=Pt-Math.floor(Pt/At.length)*At.length;bt.push(At.length-Nt-1)}}else if(nt>gt.slides.length-vt*2){Dt=Math.max(nt-(gt.slides.length-vt*2),Ct.slidesPerGroup);for(let Pt=0;Pt<Dt;Pt+=1){const Nt=Pt-Math.floor(Pt/At.length)*At.length;It.push(Nt)}}if(Tt&&bt.forEach(Pt=>{gt.slides[Pt].swiperLoopMoveDOM=!0,yt.prepend(gt.slides[Pt]),gt.slides[Pt].swiperLoopMoveDOM=!1}),Rt&&It.forEach(Pt=>{gt.slides[Pt].swiperLoopMoveDOM=!0,yt.append(gt.slides[Pt]),gt.slides[Pt].swiperLoopMoveDOM=!1}),gt.recalcSlides(),Ct.slidesPerView==="auto"&>.updateSlides(),Ct.watchSlidesProgress&>.updateSlidesOffset(),Le){if(bt.length>0&&Tt)if(typeof Be>"u"){const Pt=gt.slidesGrid[wt],Lt=gt.slidesGrid[wt+Bt]-Pt;ht?gt.setTranslate(gt.translate-Lt):(gt.slideTo(wt+Bt,0,!1,!0),tt&&(gt.touches[gt.isHorizontal()?"startX":"startY"]+=Lt))}else tt&>.slideToLoop(Be,0,!1,!0);else if(It.length>0&&Rt)if(typeof Be>"u"){const Pt=gt.slidesGrid[wt],Lt=gt.slidesGrid[wt-Dt]-Pt;ht?gt.setTranslate(gt.translate-Lt):(gt.slideTo(wt-Dt,0,!1,!0),tt&&(gt.touches[gt.isHorizontal()?"startX":"startY"]+=Lt))}else gt.slideToLoop(Be,0,!1,!0)}if(gt.allowSlidePrev=xt,gt.allowSlideNext=Et,gt.controller&>.controller.control&&!ft){const Pt={slideRealIndex:Be,slideTo:!1,direction:Ye,setTranslate:tt,activeSlideIndex:nt,byController:!0};Array.isArray(gt.controller.control)?gt.controller.control.forEach(Nt=>{!Nt.destroyed&&Nt.params.loop&&Nt.loopFix(Pt)}):gt.controller.control instanceof gt.constructor&>.controller.control.params.loop&>.controller.control.loopFix(Pt)}gt.emit("loopFix")}function loopDestroy(){const Be=this,{params:Le,slidesEl:Ye}=Be;if(!Le.loop||Be.virtual&&Be.params.virtual.enabled)return;Be.recalcSlides();const tt=[];Be.slides.forEach(nt=>{const ft=typeof nt.swiperSlideIndex>"u"?nt.getAttribute("data-swiper-slide-index")*1:nt.swiperSlideIndex;tt[ft]=nt}),Be.slides.forEach(nt=>{nt.removeAttribute("data-swiper-slide-index")}),tt.forEach(nt=>{Ye.append(nt)}),Be.recalcSlides(),Be.slideTo(Be.realIndex,0)}const loop={loopCreate,loopFix,loopDestroy};function setGrabCursor(Be){const Le=this;if(!Le.params.simulateTouch||Le.params.watchOverflow&&Le.isLocked||Le.params.cssMode)return;const Ye=Le.params.touchEventsTarget==="container"?Le.el:Le.wrapperEl;Le.isElement&&(Le.__preventObserver__=!0),Ye.style.cursor="move",Ye.style.cursor=Be?"grabbing":"grab",Le.isElement&&requestAnimationFrame(()=>{Le.__preventObserver__=!1})}function unsetGrabCursor(){const Be=this;Be.params.watchOverflow&&Be.isLocked||Be.params.cssMode||(Be.isElement&&(Be.__preventObserver__=!0),Be[Be.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",Be.isElement&&requestAnimationFrame(()=>{Be.__preventObserver__=!1}))}const grabCursor={setGrabCursor,unsetGrabCursor};function closestElement(Be,Le=this){function Ye(tt){if(!tt||tt===getDocument$1()||tt===getWindow())return null;tt.assignedSlot&&(tt=tt.assignedSlot);const nt=tt.closest(Be);return!nt&&!tt.getRootNode?null:nt||Ye(tt.getRootNode().host)}return Ye(Le)}function onTouchStart(Be){const Le=this,Ye=getDocument$1(),tt=getWindow(),nt=Le.touchEventsData;nt.evCache.push(Be);const{params:ft,touches:ht,enabled:gt}=Le;if(!gt||!ft.simulateTouch&&Be.pointerType==="mouse"||Le.animating&&ft.preventInteractionOnTransition)return;!Le.animating&&ft.cssMode&&ft.loop&&Le.loopFix();let At=Be;At.originalEvent&&(At=At.originalEvent);let xt=At.target;if(ft.touchEventsTarget==="wrapper"&&!Le.wrapperEl.contains(xt)||"which"in At&&At.which===3||"button"in At&&At.button>0||nt.isTouched&&nt.isMoved)return;const Et=!!ft.noSwipingClass&&ft.noSwipingClass!=="",yt=Be.composedPath?Be.composedPath():Be.path;Et&&At.target&&At.target.shadowRoot&&yt&&(xt=yt[0]);const Ct=ft.noSwipingSelector?ft.noSwipingSelector:`.${ft.noSwipingClass}`,kt=!!(At.target&&At.target.shadowRoot);if(ft.noSwiping&&(kt?closestElement(Ct,xt):xt.closest(Ct))){Le.allowClick=!0;return}if(ft.swipeHandler&&!xt.closest(ft.swipeHandler))return;ht.currentX=At.pageX,ht.currentY=At.pageY;const vt=ht.currentX,bt=ht.currentY,It=ft.edgeSwipeDetection||ft.iOSEdgeSwipeDetection,wt=ft.edgeSwipeThreshold||ft.iOSEdgeSwipeThreshold;if(It&&(vt<=wt||vt>=tt.innerWidth-wt))if(It==="prevent")Be.preventDefault();else return;Object.assign(nt,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),ht.startX=vt,ht.startY=bt,nt.touchStartTime=now(),Le.allowClick=!0,Le.updateSize(),Le.swipeDirection=void 0,ft.threshold>0&&(nt.allowThresholdMove=!1);let Rt=!0;xt.matches(nt.focusableElements)&&(Rt=!1,xt.nodeName==="SELECT"&&(nt.isTouched=!1)),Ye.activeElement&&Ye.activeElement.matches(nt.focusableElements)&&Ye.activeElement!==xt&&Ye.activeElement.blur();const Tt=Rt&&Le.allowTouchMove&&ft.touchStartPreventDefault;(ft.touchStartForcePreventDefault||Tt)&&!xt.isContentEditable&&At.preventDefault(),ft.freeMode&&ft.freeMode.enabled&&Le.freeMode&&Le.animating&&!ft.cssMode&&Le.freeMode.onTouchStart(),Le.emit("touchStart",At)}function onTouchMove(Be){const Le=getDocument$1(),Ye=this,tt=Ye.touchEventsData,{params:nt,touches:ft,rtlTranslate:ht,enabled:gt}=Ye;if(!gt||!nt.simulateTouch&&Be.pointerType==="mouse")return;let At=Be;if(At.originalEvent&&(At=At.originalEvent),!tt.isTouched){tt.startMoving&&tt.isScrolling&&Ye.emit("touchMoveOpposite",At);return}const xt=tt.evCache.findIndex(Pt=>Pt.pointerId===At.pointerId);xt>=0&&(tt.evCache[xt]=At);const Et=tt.evCache.length>1?tt.evCache[0]:At,yt=Et.pageX,Ct=Et.pageY;if(At.preventedByNestedSwiper){ft.startX=yt,ft.startY=Ct;return}if(!Ye.allowTouchMove){At.target.matches(tt.focusableElements)||(Ye.allowClick=!1),tt.isTouched&&(Object.assign(ft,{startX:yt,startY:Ct,prevX:Ye.touches.currentX,prevY:Ye.touches.currentY,currentX:yt,currentY:Ct}),tt.touchStartTime=now());return}if(nt.touchReleaseOnEdges&&!nt.loop){if(Ye.isVertical()){if(Ct<ft.startY&&Ye.translate<=Ye.maxTranslate()||Ct>ft.startY&&Ye.translate>=Ye.minTranslate()){tt.isTouched=!1,tt.isMoved=!1;return}}else if(yt<ft.startX&&Ye.translate<=Ye.maxTranslate()||yt>ft.startX&&Ye.translate>=Ye.minTranslate())return}if(Le.activeElement&&At.target===Le.activeElement&&At.target.matches(tt.focusableElements)){tt.isMoved=!0,Ye.allowClick=!1;return}if(tt.allowTouchCallbacks&&Ye.emit("touchMove",At),At.targetTouches&&At.targetTouches.length>1)return;ft.currentX=yt,ft.currentY=Ct;const kt=ft.currentX-ft.startX,vt=ft.currentY-ft.startY;if(Ye.params.threshold&&Math.sqrt(kt**2+vt**2)<Ye.params.threshold)return;if(typeof tt.isScrolling>"u"){let Pt;Ye.isHorizontal()&&ft.currentY===ft.startY||Ye.isVertical()&&ft.currentX===ft.startX?tt.isScrolling=!1:kt*kt+vt*vt>=25&&(Pt=Math.atan2(Math.abs(vt),Math.abs(kt))*180/Math.PI,tt.isScrolling=Ye.isHorizontal()?Pt>nt.touchAngle:90-Pt>nt.touchAngle)}if(tt.isScrolling&&Ye.emit("touchMoveOpposite",At),typeof tt.startMoving>"u"&&(ft.currentX!==ft.startX||ft.currentY!==ft.startY)&&(tt.startMoving=!0),tt.isScrolling||Ye.zoom&&Ye.params.zoom&&Ye.params.zoom.enabled&&tt.evCache.length>1){tt.isTouched=!1;return}if(!tt.startMoving)return;Ye.allowClick=!1,!nt.cssMode&&At.cancelable&&At.preventDefault(),nt.touchMoveStopPropagation&&!nt.nested&&At.stopPropagation();let bt=Ye.isHorizontal()?kt:vt,It=Ye.isHorizontal()?ft.currentX-ft.previousX:ft.currentY-ft.previousY;nt.oneWayMovement&&(bt=Math.abs(bt)*(ht?1:-1),It=Math.abs(It)*(ht?1:-1)),ft.diff=bt,bt*=nt.touchRatio,ht&&(bt=-bt,It=-It);const wt=Ye.touchesDirection;Ye.swipeDirection=bt>0?"prev":"next",Ye.touchesDirection=It>0?"prev":"next";const Rt=Ye.params.loop&&!nt.cssMode;if(!tt.isMoved){if(Rt&&Ye.loopFix({direction:Ye.swipeDirection}),tt.startTranslate=Ye.getTranslate(),Ye.setTransition(0),Ye.animating){const Pt=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});Ye.wrapperEl.dispatchEvent(Pt)}tt.allowMomentumBounce=!1,nt.grabCursor&&(Ye.allowSlideNext===!0||Ye.allowSlidePrev===!0)&&Ye.setGrabCursor(!0),Ye.emit("sliderFirstMove",At)}let Tt;tt.isMoved&&wt!==Ye.touchesDirection&&Rt&&Math.abs(bt)>=1&&(Ye.loopFix({direction:Ye.swipeDirection,setTranslate:!0}),Tt=!0),Ye.emit("sliderMove",At),tt.isMoved=!0,tt.currentTranslate=bt+tt.startTranslate;let Bt=!0,Dt=nt.resistanceRatio;if(nt.touchReleaseOnEdges&&(Dt=0),bt>0?(Rt&&!Tt&&tt.currentTranslate>(nt.centeredSlides?Ye.minTranslate()-Ye.size/2:Ye.minTranslate())&&Ye.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),tt.currentTranslate>Ye.minTranslate()&&(Bt=!1,nt.resistance&&(tt.currentTranslate=Ye.minTranslate()-1+(-Ye.minTranslate()+tt.startTranslate+bt)**Dt))):bt<0&&(Rt&&!Tt&&tt.currentTranslate<(nt.centeredSlides?Ye.maxTranslate()+Ye.size/2:Ye.maxTranslate())&&Ye.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:Ye.slides.length-(nt.slidesPerView==="auto"?Ye.slidesPerViewDynamic():Math.ceil(parseFloat(nt.slidesPerView,10)))}),tt.currentTranslate<Ye.maxTranslate()&&(Bt=!1,nt.resistance&&(tt.currentTranslate=Ye.maxTranslate()+1-(Ye.maxTranslate()-tt.startTranslate-bt)**Dt))),Bt&&(At.preventedByNestedSwiper=!0),!Ye.allowSlideNext&&Ye.swipeDirection==="next"&&tt.currentTranslate<tt.startTranslate&&(tt.currentTranslate=tt.startTranslate),!Ye.allowSlidePrev&&Ye.swipeDirection==="prev"&&tt.currentTranslate>tt.startTranslate&&(tt.currentTranslate=tt.startTranslate),!Ye.allowSlidePrev&&!Ye.allowSlideNext&&(tt.currentTranslate=tt.startTranslate),nt.threshold>0)if(Math.abs(bt)>nt.threshold||tt.allowThresholdMove){if(!tt.allowThresholdMove){tt.allowThresholdMove=!0,ft.startX=ft.currentX,ft.startY=ft.currentY,tt.currentTranslate=tt.startTranslate,ft.diff=Ye.isHorizontal()?ft.currentX-ft.startX:ft.currentY-ft.startY;return}}else{tt.currentTranslate=tt.startTranslate;return}!nt.followFinger||nt.cssMode||((nt.freeMode&&nt.freeMode.enabled&&Ye.freeMode||nt.watchSlidesProgress)&&(Ye.updateActiveIndex(),Ye.updateSlidesClasses()),nt.freeMode&&nt.freeMode.enabled&&Ye.freeMode&&Ye.freeMode.onTouchMove(),Ye.updateProgress(tt.currentTranslate),Ye.setTranslate(tt.currentTranslate))}function onTouchEnd(Be){const Le=this,Ye=Le.touchEventsData,tt=Ye.evCache.findIndex(Tt=>Tt.pointerId===Be.pointerId);if(tt>=0&&Ye.evCache.splice(tt,1),["pointercancel","pointerout","pointerleave"].includes(Be.type)&&!(Be.type==="pointercancel"&&(Le.browser.isSafari||Le.browser.isWebView)))return;const{params:nt,touches:ft,rtlTranslate:ht,slidesGrid:gt,enabled:At}=Le;if(!At||!nt.simulateTouch&&Be.pointerType==="mouse")return;let xt=Be;if(xt.originalEvent&&(xt=xt.originalEvent),Ye.allowTouchCallbacks&&Le.emit("touchEnd",xt),Ye.allowTouchCallbacks=!1,!Ye.isTouched){Ye.isMoved&&nt.grabCursor&&Le.setGrabCursor(!1),Ye.isMoved=!1,Ye.startMoving=!1;return}nt.grabCursor&&Ye.isMoved&&Ye.isTouched&&(Le.allowSlideNext===!0||Le.allowSlidePrev===!0)&&Le.setGrabCursor(!1);const Et=now(),yt=Et-Ye.touchStartTime;if(Le.allowClick){const Tt=xt.path||xt.composedPath&&xt.composedPath();Le.updateClickedSlide(Tt&&Tt[0]||xt.target),Le.emit("tap click",xt),yt<300&&Et-Ye.lastClickTime<300&&Le.emit("doubleTap doubleClick",xt)}if(Ye.lastClickTime=now(),nextTick(()=>{Le.destroyed||(Le.allowClick=!0)}),!Ye.isTouched||!Ye.isMoved||!Le.swipeDirection||ft.diff===0||Ye.currentTranslate===Ye.startTranslate){Ye.isTouched=!1,Ye.isMoved=!1,Ye.startMoving=!1;return}Ye.isTouched=!1,Ye.isMoved=!1,Ye.startMoving=!1;let Ct;if(nt.followFinger?Ct=ht?Le.translate:-Le.translate:Ct=-Ye.currentTranslate,nt.cssMode)return;if(nt.freeMode&&nt.freeMode.enabled){Le.freeMode.onTouchEnd({currentPos:Ct});return}let kt=0,vt=Le.slidesSizesGrid[0];for(let Tt=0;Tt<gt.length;Tt+=Tt<nt.slidesPerGroupSkip?1:nt.slidesPerGroup){const Bt=Tt<nt.slidesPerGroupSkip-1?1:nt.slidesPerGroup;typeof gt[Tt+Bt]<"u"?Ct>=gt[Tt]&&Ct<gt[Tt+Bt]&&(kt=Tt,vt=gt[Tt+Bt]-gt[Tt]):Ct>=gt[Tt]&&(kt=Tt,vt=gt[gt.length-1]-gt[gt.length-2])}let bt=null,It=null;nt.rewind&&(Le.isBeginning?It=nt.virtual&&nt.virtual.enabled&&Le.virtual?Le.virtual.slides.length-1:Le.slides.length-1:Le.isEnd&&(bt=0));const wt=(Ct-gt[kt])/vt,Rt=kt<nt.slidesPerGroupSkip-1?1:nt.slidesPerGroup;if(yt>nt.longSwipesMs){if(!nt.longSwipes){Le.slideTo(Le.activeIndex);return}Le.swipeDirection==="next"&&(wt>=nt.longSwipesRatio?Le.slideTo(nt.rewind&&Le.isEnd?bt:kt+Rt):Le.slideTo(kt)),Le.swipeDirection==="prev"&&(wt>1-nt.longSwipesRatio?Le.slideTo(kt+Rt):It!==null&&wt<0&&Math.abs(wt)>nt.longSwipesRatio?Le.slideTo(It):Le.slideTo(kt))}else{if(!nt.shortSwipes){Le.slideTo(Le.activeIndex);return}Le.navigation&&(xt.target===Le.navigation.nextEl||xt.target===Le.navigation.prevEl)?xt.target===Le.navigation.nextEl?Le.slideTo(kt+Rt):Le.slideTo(kt):(Le.swipeDirection==="next"&&Le.slideTo(bt!==null?bt:kt+Rt),Le.swipeDirection==="prev"&&Le.slideTo(It!==null?It:kt))}}function onResize(){const Be=this,{params:Le,el:Ye}=Be;if(Ye&&Ye.offsetWidth===0)return;Le.breakpoints&&Be.setBreakpoint();const{allowSlideNext:tt,allowSlidePrev:nt,snapGrid:ft}=Be,ht=Be.virtual&&Be.params.virtual.enabled;Be.allowSlideNext=!0,Be.allowSlidePrev=!0,Be.updateSize(),Be.updateSlides(),Be.updateSlidesClasses();const gt=ht&&Le.loop;(Le.slidesPerView==="auto"||Le.slidesPerView>1)&&Be.isEnd&&!Be.isBeginning&&!Be.params.centeredSlides&&!gt?Be.slideTo(Be.slides.length-1,0,!1,!0):Be.params.loop&&!ht?Be.slideToLoop(Be.realIndex,0,!1,!0):Be.slideTo(Be.activeIndex,0,!1,!0),Be.autoplay&&Be.autoplay.running&&Be.autoplay.paused&&(clearTimeout(Be.autoplay.resizeTimeout),Be.autoplay.resizeTimeout=setTimeout(()=>{Be.autoplay&&Be.autoplay.running&&Be.autoplay.paused&&Be.autoplay.resume()},500)),Be.allowSlidePrev=nt,Be.allowSlideNext=tt,Be.params.watchOverflow&&ft!==Be.snapGrid&&Be.checkOverflow()}function onClick(Be){const Le=this;Le.enabled&&(Le.allowClick||(Le.params.preventClicks&&Be.preventDefault(),Le.params.preventClicksPropagation&&Le.animating&&(Be.stopPropagation(),Be.stopImmediatePropagation())))}function onScroll(){const Be=this,{wrapperEl:Le,rtlTranslate:Ye,enabled:tt}=Be;if(!tt)return;Be.previousTranslate=Be.translate,Be.isHorizontal()?Be.translate=-Le.scrollLeft:Be.translate=-Le.scrollTop,Be.translate===0&&(Be.translate=0),Be.updateActiveIndex(),Be.updateSlidesClasses();let nt;const ft=Be.maxTranslate()-Be.minTranslate();ft===0?nt=0:nt=(Be.translate-Be.minTranslate())/ft,nt!==Be.progress&&Be.updateProgress(Ye?-Be.translate:Be.translate),Be.emit("setTranslate",Be.translate,!1)}function onLoad(Be){const Le=this;processLazyPreloader(Le,Be.target),!(Le.params.cssMode||Le.params.slidesPerView!=="auto"&&!Le.params.autoHeight)&&Le.update()}let dummyEventAttached=!1;function dummyEventListener(){}const events=(Be,Le)=>{const Ye=getDocument$1(),{params:tt,el:nt,wrapperEl:ft,device:ht}=Be,gt=!!tt.nested,At=Le==="on"?"addEventListener":"removeEventListener",xt=Le;nt[At]("pointerdown",Be.onTouchStart,{passive:!1}),Ye[At]("pointermove",Be.onTouchMove,{passive:!1,capture:gt}),Ye[At]("pointerup",Be.onTouchEnd,{passive:!0}),Ye[At]("pointercancel",Be.onTouchEnd,{passive:!0}),Ye[At]("pointerout",Be.onTouchEnd,{passive:!0}),Ye[At]("pointerleave",Be.onTouchEnd,{passive:!0}),(tt.preventClicks||tt.preventClicksPropagation)&&nt[At]("click",Be.onClick,!0),tt.cssMode&&ft[At]("scroll",Be.onScroll),tt.updateOnWindowResize?Be[xt](ht.ios||ht.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0):Be[xt]("observerUpdate",onResize,!0),nt[At]("load",Be.onLoad,{capture:!0})};function attachEvents(){const Be=this,Le=getDocument$1(),{params:Ye}=Be;Be.onTouchStart=onTouchStart.bind(Be),Be.onTouchMove=onTouchMove.bind(Be),Be.onTouchEnd=onTouchEnd.bind(Be),Ye.cssMode&&(Be.onScroll=onScroll.bind(Be)),Be.onClick=onClick.bind(Be),Be.onLoad=onLoad.bind(Be),dummyEventAttached||(Le.addEventListener("touchstart",dummyEventListener),dummyEventAttached=!0),events(Be,"on")}function detachEvents(){events(this,"off")}const events$1={attachEvents,detachEvents},isGridEnabled=(Be,Le)=>Be.grid&&Le.grid&&Le.grid.rows>1;function setBreakpoint(){const Be=this,{realIndex:Le,initialized:Ye,params:tt,el:nt}=Be,ft=tt.breakpoints;if(!ft||ft&&Object.keys(ft).length===0)return;const ht=Be.getBreakpoint(ft,Be.params.breakpointsBase,Be.el);if(!ht||Be.currentBreakpoint===ht)return;const At=(ht in ft?ft[ht]:void 0)||Be.originalParams,xt=isGridEnabled(Be,tt),Et=isGridEnabled(Be,At),yt=tt.enabled;xt&&!Et?(nt.classList.remove(`${tt.containerModifierClass}grid`,`${tt.containerModifierClass}grid-column`),Be.emitContainerClasses()):!xt&&Et&&(nt.classList.add(`${tt.containerModifierClass}grid`),(At.grid.fill&&At.grid.fill==="column"||!At.grid.fill&&tt.grid.fill==="column")&&nt.classList.add(`${tt.containerModifierClass}grid-column`),Be.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(bt=>{if(typeof At[bt]>"u")return;const It=tt[bt]&&tt[bt].enabled,wt=At[bt]&&At[bt].enabled;It&&!wt&&Be[bt].disable(),!It&&wt&&Be[bt].enable()});const Ct=At.direction&&At.direction!==tt.direction,kt=tt.loop&&(At.slidesPerView!==tt.slidesPerView||Ct);Ct&&Ye&&Be.changeDirection(),extend$3(Be.params,At);const vt=Be.params.enabled;Object.assign(Be,{allowTouchMove:Be.params.allowTouchMove,allowSlideNext:Be.params.allowSlideNext,allowSlidePrev:Be.params.allowSlidePrev}),yt&&!vt?Be.disable():!yt&&vt&&Be.enable(),Be.currentBreakpoint=ht,Be.emit("_beforeBreakpoint",At),kt&&Ye&&(Be.loopDestroy(),Be.loopCreate(Le),Be.updateSlides()),Be.emit("breakpoint",At)}function getBreakpoint(Be,Le="window",Ye){if(!Be||Le==="container"&&!Ye)return;let tt=!1;const nt=getWindow(),ft=Le==="window"?nt.innerHeight:Ye.clientHeight,ht=Object.keys(Be).map(gt=>{if(typeof gt=="string"&>.indexOf("@")===0){const At=parseFloat(gt.substr(1));return{value:ft*At,point:gt}}return{value:gt,point:gt}});ht.sort((gt,At)=>parseInt(gt.value,10)-parseInt(At.value,10));for(let gt=0;gt<ht.length;gt+=1){const{point:At,value:xt}=ht[gt];Le==="window"?nt.matchMedia(`(min-width: ${xt}px)`).matches&&(tt=At):xt<=Ye.clientWidth&&(tt=At)}return tt||"max"}const breakpoints={setBreakpoint,getBreakpoint};function prepareClasses(Be,Le){const Ye=[];return Be.forEach(tt=>{typeof tt=="object"?Object.keys(tt).forEach(nt=>{tt[nt]&&Ye.push(Le+nt)}):typeof tt=="string"&&Ye.push(Le+tt)}),Ye}function addClasses(){const Be=this,{classNames:Le,params:Ye,rtl:tt,el:nt,device:ft}=Be,ht=prepareClasses(["initialized",Ye.direction,{"free-mode":Be.params.freeMode&&Ye.freeMode.enabled},{autoheight:Ye.autoHeight},{rtl:tt},{grid:Ye.grid&&Ye.grid.rows>1},{"grid-column":Ye.grid&&Ye.grid.rows>1&&Ye.grid.fill==="column"},{android:ft.android},{ios:ft.ios},{"css-mode":Ye.cssMode},{centered:Ye.cssMode&&Ye.centeredSlides},{"watch-progress":Ye.watchSlidesProgress}],Ye.containerModifierClass);Le.push(...ht),nt.classList.add(...Le),Be.emitContainerClasses()}function removeClasses(){const Be=this,{el:Le,classNames:Ye}=Be;Le.classList.remove(...Ye),Be.emitContainerClasses()}const classes={addClasses,removeClasses};function checkOverflow(){const Be=this,{isLocked:Le,params:Ye}=Be,{slidesOffsetBefore:tt}=Ye;if(tt){const nt=Be.slides.length-1,ft=Be.slidesGrid[nt]+Be.slidesSizesGrid[nt]+tt*2;Be.isLocked=Be.size>ft}else Be.isLocked=Be.snapGrid.length===1;Ye.allowSlideNext===!0&&(Be.allowSlideNext=!Be.isLocked),Ye.allowSlidePrev===!0&&(Be.allowSlidePrev=!Be.isLocked),Le&&Le!==Be.isLocked&&(Be.isEnd=!1),Le!==Be.isLocked&&Be.emit(Be.isLocked?"lock":"unlock")}const checkOverflow$1={checkOverflow},defaults={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function moduleExtendParams(Be,Le){return function(tt={}){const nt=Object.keys(tt)[0],ft=tt[nt];if(typeof ft!="object"||ft===null){extend$3(Le,tt);return}if(["navigation","pagination","scrollbar"].indexOf(nt)>=0&&Be[nt]===!0&&(Be[nt]={auto:!0}),!(nt in Be&&"enabled"in ft)){extend$3(Le,tt);return}Be[nt]===!0&&(Be[nt]={enabled:!0}),typeof Be[nt]=="object"&&!("enabled"in Be[nt])&&(Be[nt].enabled=!0),Be[nt]||(Be[nt]={enabled:!1}),extend$3(Le,tt)}}const prototypes={eventsEmitter,update:update$2,translate,transition,slide,loop,grabCursor,events:events$1,breakpoints,checkOverflow:checkOverflow$1,classes},extendedDefaults={};let Swiper$1=class vo{constructor(...Le){let Ye,tt;Le.length===1&&Le[0].constructor&&Object.prototype.toString.call(Le[0]).slice(8,-1)==="Object"?tt=Le[0]:[Ye,tt]=Le,tt||(tt={}),tt=extend$3({},tt),Ye&&!tt.el&&(tt.el=Ye);const nt=getDocument$1();if(tt.el&&typeof tt.el=="string"&&nt.querySelectorAll(tt.el).length>1){const At=[];return nt.querySelectorAll(tt.el).forEach(xt=>{const Et=extend$3({},tt,{el:xt});At.push(new vo(Et))}),At}const ft=this;ft.__swiper__=!0,ft.support=getSupport(),ft.device=getDevice({userAgent:tt.userAgent}),ft.browser=getBrowser(),ft.eventsListeners={},ft.eventsAnyListeners=[],ft.modules=[...ft.__modules__],tt.modules&&Array.isArray(tt.modules)&&ft.modules.push(...tt.modules);const ht={};ft.modules.forEach(At=>{At({params:tt,swiper:ft,extendParams:moduleExtendParams(tt,ht),on:ft.on.bind(ft),once:ft.once.bind(ft),off:ft.off.bind(ft),emit:ft.emit.bind(ft)})});const gt=extend$3({},defaults,ht);return ft.params=extend$3({},gt,extendedDefaults,tt),ft.originalParams=extend$3({},ft.params),ft.passedParams=extend$3({},tt),ft.params&&ft.params.on&&Object.keys(ft.params.on).forEach(At=>{ft.on(At,ft.params.on[At])}),ft.params&&ft.params.onAny&&ft.onAny(ft.params.onAny),Object.assign(ft,{enabled:ft.params.enabled,el:Ye,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return ft.params.direction==="horizontal"},isVertical(){return ft.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:ft.params.allowSlideNext,allowSlidePrev:ft.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:ft.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:ft.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),ft.emit("_swiper"),ft.params.init&&ft.init(),ft}getSlideIndex(Le){const{slidesEl:Ye,params:tt}=this,nt=elementChildren(Ye,`.${tt.slideClass}, swiper-slide`),ft=elementIndex(nt[0]);return elementIndex(Le)-ft}getSlideIndexByData(Le){return this.getSlideIndex(this.slides.filter(Ye=>Ye.getAttribute("data-swiper-slide-index")*1===Le)[0])}recalcSlides(){const Le=this,{slidesEl:Ye,params:tt}=Le;Le.slides=elementChildren(Ye,`.${tt.slideClass}, swiper-slide`)}enable(){const Le=this;Le.enabled||(Le.enabled=!0,Le.params.grabCursor&&Le.setGrabCursor(),Le.emit("enable"))}disable(){const Le=this;Le.enabled&&(Le.enabled=!1,Le.params.grabCursor&&Le.unsetGrabCursor(),Le.emit("disable"))}setProgress(Le,Ye){const tt=this;Le=Math.min(Math.max(Le,0),1);const nt=tt.minTranslate(),ht=(tt.maxTranslate()-nt)*Le+nt;tt.translateTo(ht,typeof Ye>"u"?0:Ye),tt.updateActiveIndex(),tt.updateSlidesClasses()}emitContainerClasses(){const Le=this;if(!Le.params._emitClasses||!Le.el)return;const Ye=Le.el.className.split(" ").filter(tt=>tt.indexOf("swiper")===0||tt.indexOf(Le.params.containerModifierClass)===0);Le.emit("_containerClasses",Ye.join(" "))}getSlideClasses(Le){const Ye=this;return Ye.destroyed?"":Le.className.split(" ").filter(tt=>tt.indexOf("swiper-slide")===0||tt.indexOf(Ye.params.slideClass)===0).join(" ")}emitSlidesClasses(){const Le=this;if(!Le.params._emitClasses||!Le.el)return;const Ye=[];Le.slides.forEach(tt=>{const nt=Le.getSlideClasses(tt);Ye.push({slideEl:tt,classNames:nt}),Le.emit("_slideClass",tt,nt)}),Le.emit("_slideClasses",Ye)}slidesPerViewDynamic(Le="current",Ye=!1){const tt=this,{params:nt,slides:ft,slidesGrid:ht,slidesSizesGrid:gt,size:At,activeIndex:xt}=tt;let Et=1;if(nt.centeredSlides){let yt=ft[xt]?ft[xt].swiperSlideSize:0,Ct;for(let kt=xt+1;kt<ft.length;kt+=1)ft[kt]&&!Ct&&(yt+=ft[kt].swiperSlideSize,Et+=1,yt>At&&(Ct=!0));for(let kt=xt-1;kt>=0;kt-=1)ft[kt]&&!Ct&&(yt+=ft[kt].swiperSlideSize,Et+=1,yt>At&&(Ct=!0))}else if(Le==="current")for(let yt=xt+1;yt<ft.length;yt+=1)(Ye?ht[yt]+gt[yt]-ht[xt]<At:ht[yt]-ht[xt]<At)&&(Et+=1);else for(let yt=xt-1;yt>=0;yt-=1)ht[xt]-ht[yt]<At&&(Et+=1);return Et}update(){const Le=this;if(!Le||Le.destroyed)return;const{snapGrid:Ye,params:tt}=Le;tt.breakpoints&&Le.setBreakpoint(),[...Le.el.querySelectorAll('[loading="lazy"]')].forEach(ht=>{ht.complete&&processLazyPreloader(Le,ht)}),Le.updateSize(),Le.updateSlides(),Le.updateProgress(),Le.updateSlidesClasses();function nt(){const ht=Le.rtlTranslate?Le.translate*-1:Le.translate,gt=Math.min(Math.max(ht,Le.maxTranslate()),Le.minTranslate());Le.setTranslate(gt),Le.updateActiveIndex(),Le.updateSlidesClasses()}let ft;if(tt.freeMode&&tt.freeMode.enabled&&!tt.cssMode)nt(),tt.autoHeight&&Le.updateAutoHeight();else{if((tt.slidesPerView==="auto"||tt.slidesPerView>1)&&Le.isEnd&&!tt.centeredSlides){const ht=Le.virtual&&tt.virtual.enabled?Le.virtual.slides:Le.slides;ft=Le.slideTo(ht.length-1,0,!1,!0)}else ft=Le.slideTo(Le.activeIndex,0,!1,!0);ft||nt()}tt.watchOverflow&&Ye!==Le.snapGrid&&Le.checkOverflow(),Le.emit("update")}changeDirection(Le,Ye=!0){const tt=this,nt=tt.params.direction;return Le||(Le=nt==="horizontal"?"vertical":"horizontal"),Le===nt||Le!=="horizontal"&&Le!=="vertical"||(tt.el.classList.remove(`${tt.params.containerModifierClass}${nt}`),tt.el.classList.add(`${tt.params.containerModifierClass}${Le}`),tt.emitContainerClasses(),tt.params.direction=Le,tt.slides.forEach(ft=>{Le==="vertical"?ft.style.width="":ft.style.height=""}),tt.emit("changeDirection"),Ye&&tt.update()),tt}changeLanguageDirection(Le){const Ye=this;Ye.rtl&&Le==="rtl"||!Ye.rtl&&Le==="ltr"||(Ye.rtl=Le==="rtl",Ye.rtlTranslate=Ye.params.direction==="horizontal"&&Ye.rtl,Ye.rtl?(Ye.el.classList.add(`${Ye.params.containerModifierClass}rtl`),Ye.el.dir="rtl"):(Ye.el.classList.remove(`${Ye.params.containerModifierClass}rtl`),Ye.el.dir="ltr"),Ye.update())}mount(Le){const Ye=this;if(Ye.mounted)return!0;let tt=Le||Ye.params.el;if(typeof tt=="string"&&(tt=document.querySelector(tt)),!tt)return!1;tt.swiper=Ye,tt.shadowEl&&(Ye.isElement=!0);const nt=()=>`.${(Ye.params.wrapperClass||"").trim().split(" ").join(".")}`;let ht=tt&&tt.shadowRoot&&tt.shadowRoot.querySelector?tt.shadowRoot.querySelector(nt()):elementChildren(tt,nt())[0];return!ht&&Ye.params.createElements&&(ht=createElement("div",Ye.params.wrapperClass),tt.append(ht),elementChildren(tt,`.${Ye.params.slideClass}`).forEach(gt=>{ht.append(gt)})),Object.assign(Ye,{el:tt,wrapperEl:ht,slidesEl:Ye.isElement?tt:ht,mounted:!0,rtl:tt.dir.toLowerCase()==="rtl"||elementStyle(tt,"direction")==="rtl",rtlTranslate:Ye.params.direction==="horizontal"&&(tt.dir.toLowerCase()==="rtl"||elementStyle(tt,"direction")==="rtl"),wrongRTL:elementStyle(ht,"display")==="-webkit-box"}),!0}init(Le){const Ye=this;return Ye.initialized||Ye.mount(Le)===!1||(Ye.emit("beforeInit"),Ye.params.breakpoints&&Ye.setBreakpoint(),Ye.addClasses(),Ye.updateSize(),Ye.updateSlides(),Ye.params.watchOverflow&&Ye.checkOverflow(),Ye.params.grabCursor&&Ye.enabled&&Ye.setGrabCursor(),Ye.params.loop&&Ye.virtual&&Ye.params.virtual.enabled?Ye.slideTo(Ye.params.initialSlide+Ye.virtual.slidesBefore,0,Ye.params.runCallbacksOnInit,!1,!0):Ye.slideTo(Ye.params.initialSlide,0,Ye.params.runCallbacksOnInit,!1,!0),Ye.params.loop&&Ye.loopCreate(),Ye.attachEvents(),[...Ye.el.querySelectorAll('[loading="lazy"]')].forEach(nt=>{nt.complete?processLazyPreloader(Ye,nt):nt.addEventListener("load",ft=>{processLazyPreloader(Ye,ft.target)})}),preload(Ye),Ye.initialized=!0,preload(Ye),Ye.emit("init"),Ye.emit("afterInit")),Ye}destroy(Le=!0,Ye=!0){const tt=this,{params:nt,el:ft,wrapperEl:ht,slides:gt}=tt;return typeof tt.params>"u"||tt.destroyed||(tt.emit("beforeDestroy"),tt.initialized=!1,tt.detachEvents(),nt.loop&&tt.loopDestroy(),Ye&&(tt.removeClasses(),ft.removeAttribute("style"),ht.removeAttribute("style"),gt&>.length&>.forEach(At=>{At.classList.remove(nt.slideVisibleClass,nt.slideActiveClass,nt.slideNextClass,nt.slidePrevClass),At.removeAttribute("style"),At.removeAttribute("data-swiper-slide-index")})),tt.emit("destroy"),Object.keys(tt.eventsListeners).forEach(At=>{tt.off(At)}),Le!==!1&&(tt.el.swiper=null,deleteProps(tt)),tt.destroyed=!0),null}static extendDefaults(Le){extend$3(extendedDefaults,Le)}static get extendedDefaults(){return extendedDefaults}static get defaults(){return defaults}static installModule(Le){vo.prototype.__modules__||(vo.prototype.__modules__=[]);const Ye=vo.prototype.__modules__;typeof Le=="function"&&Ye.indexOf(Le)<0&&Ye.push(Le)}static use(Le){return Array.isArray(Le)?(Le.forEach(Ye=>vo.installModule(Ye)),vo):(vo.installModule(Le),vo)}};Object.keys(prototypes).forEach(Be=>{Object.keys(prototypes[Be]).forEach(Le=>{Swiper$1.prototype[Le]=prototypes[Be][Le]})}),Swiper$1.use([Resize,Observer]);function createElementIfNotDefined(Be,Le,Ye,tt){return Be.params.createElements&&Object.keys(tt).forEach(nt=>{if(!Ye[nt]&&Ye.auto===!0){let ft=elementChildren(Be.el,`.${tt[nt]}`)[0];ft||(ft=createElement("div",tt[nt]),ft.className=tt[nt],Be.el.append(ft)),Ye[nt]=ft,Le[nt]=ft}}),Ye}function classesToSelector(Be=""){return`.${Be.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Pagination({swiper:Be,extendParams:Le,on:Ye,emit:tt}){const nt="swiper-pagination";Le({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:wt=>wt,formatFractionTotal:wt=>wt,bulletClass:`${nt}-bullet`,bulletActiveClass:`${nt}-bullet-active`,modifierClass:`${nt}-`,currentClass:`${nt}-current`,totalClass:`${nt}-total`,hiddenClass:`${nt}-hidden`,progressbarFillClass:`${nt}-progressbar-fill`,progressbarOppositeClass:`${nt}-progressbar-opposite`,clickableClass:`${nt}-clickable`,lockClass:`${nt}-lock`,horizontalClass:`${nt}-horizontal`,verticalClass:`${nt}-vertical`,paginationDisabledClass:`${nt}-disabled`}}),Be.pagination={el:null,bullets:[]};let ft,ht=0;const gt=wt=>(Array.isArray(wt)||(wt=[wt].filter(Rt=>!!Rt)),wt);function At(){return!Be.params.pagination.el||!Be.pagination.el||Array.isArray(Be.pagination.el)&&Be.pagination.el.length===0}function xt(wt,Rt){const{bulletActiveClass:Tt}=Be.params.pagination;wt&&(wt=wt[`${Rt==="prev"?"previous":"next"}ElementSibling`],wt&&(wt.classList.add(`${Tt}-${Rt}`),wt=wt[`${Rt==="prev"?"previous":"next"}ElementSibling`],wt&&wt.classList.add(`${Tt}-${Rt}-${Rt}`)))}function Et(wt){const Rt=wt.target.closest(classesToSelector(Be.params.pagination.bulletClass));if(!Rt)return;wt.preventDefault();const Tt=elementIndex(Rt)*Be.params.slidesPerGroup;if(Be.params.loop){if(Be.realIndex===Tt)return;const Bt=Be.getSlideIndexByData(Tt),Dt=Be.getSlideIndexByData(Be.realIndex);Bt>Be.slides.length-Be.loopedSlides&&Be.loopFix({direction:Bt>Dt?"next":"prev",activeSlideIndex:Bt,slideTo:!1}),Be.slideToLoop(Tt)}else Be.slideTo(Tt)}function yt(){const wt=Be.rtl,Rt=Be.params.pagination;if(At())return;let Tt=Be.pagination.el;Tt=gt(Tt);let Bt,Dt;const Pt=Be.virtual&&Be.params.virtual.enabled?Be.virtual.slides.length:Be.slides.length,Nt=Be.params.loop?Math.ceil(Pt/Be.params.slidesPerGroup):Be.snapGrid.length;if(Be.params.loop?(Dt=Be.previousRealIndex||0,Bt=Be.params.slidesPerGroup>1?Math.floor(Be.realIndex/Be.params.slidesPerGroup):Be.realIndex):typeof Be.snapIndex<"u"?(Bt=Be.snapIndex,Dt=Be.previousSnapIndex):(Dt=Be.previousIndex||0,Bt=Be.activeIndex||0),Rt.type==="bullets"&&Be.pagination.bullets&&Be.pagination.bullets.length>0){const Lt=Be.pagination.bullets;let Wt,$t,Kt;if(Rt.dynamicBullets&&(ft=elementOuterSize(Lt[0],Be.isHorizontal()?"width":"height"),Tt.forEach(Vt=>{Vt.style[Be.isHorizontal()?"width":"height"]=`${ft*(Rt.dynamicMainBullets+4)}px`}),Rt.dynamicMainBullets>1&&Dt!==void 0&&(ht+=Bt-(Dt||0),ht>Rt.dynamicMainBullets-1?ht=Rt.dynamicMainBullets-1:ht<0&&(ht=0)),Wt=Math.max(Bt-ht,0),$t=Wt+(Math.min(Lt.length,Rt.dynamicMainBullets)-1),Kt=($t+Wt)/2),Lt.forEach(Vt=>{const Ut=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(_t=>`${Rt.bulletActiveClass}${_t}`)].map(_t=>typeof _t=="string"&&_t.includes(" ")?_t.split(" "):_t).flat();Vt.classList.remove(...Ut)}),Tt.length>1)Lt.forEach(Vt=>{const Ut=elementIndex(Vt);Ut===Bt?Vt.classList.add(...Rt.bulletActiveClass.split(" ")):Be.isElement&&Vt.setAttribute("part","bullet"),Rt.dynamicBullets&&(Ut>=Wt&&Ut<=$t&&Vt.classList.add(...`${Rt.bulletActiveClass}-main`.split(" ")),Ut===Wt&&xt(Vt,"prev"),Ut===$t&&xt(Vt,"next"))});else{const Vt=Lt[Bt];if(Vt&&Vt.classList.add(...Rt.bulletActiveClass.split(" ")),Be.isElement&&Lt.forEach((Ut,_t)=>{Ut.setAttribute("part",_t===Bt?"bullet-active":"bullet")}),Rt.dynamicBullets){const Ut=Lt[Wt],_t=Lt[$t];for(let Xt=Wt;Xt<=$t;Xt+=1)Lt[Xt]&&Lt[Xt].classList.add(...`${Rt.bulletActiveClass}-main`.split(" "));xt(Ut,"prev"),xt(_t,"next")}}if(Rt.dynamicBullets){const Vt=Math.min(Lt.length,Rt.dynamicMainBullets+4),Ut=(ft*Vt-ft)/2-Kt*ft,_t=wt?"right":"left";Lt.forEach(Xt=>{Xt.style[Be.isHorizontal()?_t:"top"]=`${Ut}px`})}}Tt.forEach((Lt,Wt)=>{if(Rt.type==="fraction"&&(Lt.querySelectorAll(classesToSelector(Rt.currentClass)).forEach($t=>{$t.textContent=Rt.formatFractionCurrent(Bt+1)}),Lt.querySelectorAll(classesToSelector(Rt.totalClass)).forEach($t=>{$t.textContent=Rt.formatFractionTotal(Nt)})),Rt.type==="progressbar"){let $t;Rt.progressbarOpposite?$t=Be.isHorizontal()?"vertical":"horizontal":$t=Be.isHorizontal()?"horizontal":"vertical";const Kt=(Bt+1)/Nt;let Vt=1,Ut=1;$t==="horizontal"?Vt=Kt:Ut=Kt,Lt.querySelectorAll(classesToSelector(Rt.progressbarFillClass)).forEach(_t=>{_t.style.transform=`translate3d(0,0,0) scaleX(${Vt}) scaleY(${Ut})`,_t.style.transitionDuration=`${Be.params.speed}ms`})}Rt.type==="custom"&&Rt.renderCustom?(Lt.innerHTML=Rt.renderCustom(Be,Bt+1,Nt),Wt===0&&tt("paginationRender",Lt)):(Wt===0&&tt("paginationRender",Lt),tt("paginationUpdate",Lt)),Be.params.watchOverflow&&Be.enabled&&Lt.classList[Be.isLocked?"add":"remove"](Rt.lockClass)})}function Ct(){const wt=Be.params.pagination;if(At())return;const Rt=Be.virtual&&Be.params.virtual.enabled?Be.virtual.slides.length:Be.slides.length;let Tt=Be.pagination.el;Tt=gt(Tt);let Bt="";if(wt.type==="bullets"){let Dt=Be.params.loop?Math.ceil(Rt/Be.params.slidesPerGroup):Be.snapGrid.length;Be.params.freeMode&&Be.params.freeMode.enabled&&Dt>Rt&&(Dt=Rt);for(let Pt=0;Pt<Dt;Pt+=1)wt.renderBullet?Bt+=wt.renderBullet.call(Be,Pt,wt.bulletClass):Bt+=`<${wt.bulletElement} ${Be.isElement?'part="bullet"':""} class="${wt.bulletClass}"></${wt.bulletElement}>`}wt.type==="fraction"&&(wt.renderFraction?Bt=wt.renderFraction.call(Be,wt.currentClass,wt.totalClass):Bt=`<span class="${wt.currentClass}"></span> / <span class="${wt.totalClass}"></span>`),wt.type==="progressbar"&&(wt.renderProgressbar?Bt=wt.renderProgressbar.call(Be,wt.progressbarFillClass):Bt=`<span class="${wt.progressbarFillClass}"></span>`),Be.pagination.bullets=[],Tt.forEach(Dt=>{wt.type!=="custom"&&(Dt.innerHTML=Bt||""),wt.type==="bullets"&&Be.pagination.bullets.push(...Dt.querySelectorAll(classesToSelector(wt.bulletClass)))}),wt.type!=="custom"&&tt("paginationRender",Tt[0])}function kt(){Be.params.pagination=createElementIfNotDefined(Be,Be.originalParams.pagination,Be.params.pagination,{el:"swiper-pagination"});const wt=Be.params.pagination;if(!wt.el)return;let Rt;typeof wt.el=="string"&&Be.isElement&&(Rt=Be.el.shadowRoot.querySelector(wt.el)),!Rt&&typeof wt.el=="string"&&(Rt=[...document.querySelectorAll(wt.el)]),Rt||(Rt=wt.el),!(!Rt||Rt.length===0)&&(Be.params.uniqueNavElements&&typeof wt.el=="string"&&Array.isArray(Rt)&&Rt.length>1&&(Rt=[...Be.el.querySelectorAll(wt.el)],Rt.length>1&&(Rt=Rt.filter(Tt=>elementParents(Tt,".swiper")[0]===Be.el)[0])),Array.isArray(Rt)&&Rt.length===1&&(Rt=Rt[0]),Object.assign(Be.pagination,{el:Rt}),Rt=gt(Rt),Rt.forEach(Tt=>{wt.type==="bullets"&&wt.clickable&&Tt.classList.add(wt.clickableClass),Tt.classList.add(wt.modifierClass+wt.type),Tt.classList.add(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass),wt.type==="bullets"&&wt.dynamicBullets&&(Tt.classList.add(`${wt.modifierClass}${wt.type}-dynamic`),ht=0,wt.dynamicMainBullets<1&&(wt.dynamicMainBullets=1)),wt.type==="progressbar"&&wt.progressbarOpposite&&Tt.classList.add(wt.progressbarOppositeClass),wt.clickable&&Tt.addEventListener("click",Et),Be.enabled||Tt.classList.add(wt.lockClass)}))}function vt(){const wt=Be.params.pagination;if(At())return;let Rt=Be.pagination.el;Rt&&(Rt=gt(Rt),Rt.forEach(Tt=>{Tt.classList.remove(wt.hiddenClass),Tt.classList.remove(wt.modifierClass+wt.type),Tt.classList.remove(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass),wt.clickable&&Tt.removeEventListener("click",Et)})),Be.pagination.bullets&&Be.pagination.bullets.forEach(Tt=>Tt.classList.remove(...wt.bulletActiveClass.split(" ")))}Ye("changeDirection",()=>{if(!Be.pagination||!Be.pagination.el)return;const wt=Be.params.pagination;let{el:Rt}=Be.pagination;Rt=gt(Rt),Rt.forEach(Tt=>{Tt.classList.remove(wt.horizontalClass,wt.verticalClass),Tt.classList.add(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass)})}),Ye("init",()=>{Be.params.pagination.enabled===!1?It():(kt(),Ct(),yt())}),Ye("activeIndexChange",()=>{typeof Be.snapIndex>"u"&&yt()}),Ye("snapIndexChange",()=>{yt()}),Ye("snapGridLengthChange",()=>{Ct(),yt()}),Ye("destroy",()=>{vt()}),Ye("enable disable",()=>{let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList[Be.enabled?"remove":"add"](Be.params.pagination.lockClass)))}),Ye("lock unlock",()=>{yt()}),Ye("click",(wt,Rt)=>{const Tt=Rt.target;let{el:Bt}=Be.pagination;if(Array.isArray(Bt)||(Bt=[Bt].filter(Dt=>!!Dt)),Be.params.pagination.el&&Be.params.pagination.hideOnClick&&Bt&&Bt.length>0&&!Tt.classList.contains(Be.params.pagination.bulletClass)){if(Be.navigation&&(Be.navigation.nextEl&&Tt===Be.navigation.nextEl||Be.navigation.prevEl&&Tt===Be.navigation.prevEl))return;const Dt=Bt[0].classList.contains(Be.params.pagination.hiddenClass);tt(Dt===!0?"paginationShow":"paginationHide"),Bt.forEach(Pt=>Pt.classList.toggle(Be.params.pagination.hiddenClass))}});const bt=()=>{Be.el.classList.remove(Be.params.pagination.paginationDisabledClass);let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList.remove(Be.params.pagination.paginationDisabledClass))),kt(),Ct(),yt()},It=()=>{Be.el.classList.add(Be.params.pagination.paginationDisabledClass);let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList.add(Be.params.pagination.paginationDisabledClass))),vt()};Object.assign(Be.pagination,{enable:bt,disable:It,render:Ct,update:yt,init:kt,destroy:vt})}function isObject$1(Be){return typeof Be=="object"&&Be!==null&&Be.constructor&&Object.prototype.toString.call(Be).slice(8,-1)==="Object"}function extend$2(Be,Le){const Ye=["__proto__","constructor","prototype"];Object.keys(Le).filter(tt=>Ye.indexOf(tt)<0).forEach(tt=>{typeof Be[tt]>"u"?Be[tt]=Le[tt]:isObject$1(Le[tt])&&isObject$1(Be[tt])&&Object.keys(Le[tt]).length>0?Le[tt].__swiper__?Be[tt]=Le[tt]:extend$2(Be[tt],Le[tt]):Be[tt]=Le[tt]})}function needsNavigation(Be={}){return Be.navigation&&typeof Be.navigation.nextEl>"u"&&typeof Be.navigation.prevEl>"u"}function needsPagination(Be={}){return Be.pagination&&typeof Be.pagination.el>"u"}function needsScrollbar(Be={}){return Be.scrollbar&&typeof Be.scrollbar.el>"u"}function uniqueClasses(Be=""){const Le=Be.split(" ").map(tt=>tt.trim()).filter(tt=>!!tt),Ye=[];return Le.forEach(tt=>{Ye.indexOf(tt)<0&&Ye.push(tt)}),Ye.join(" ")}function wrapperClass(Be=""){return Be?Be.includes("swiper-wrapper")?Be:`swiper-wrapper ${Be}`:"swiper-wrapper"}const paramsList=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function getParams(Be={},Le=!0){const Ye={on:{}},tt={},nt={};extend$2(Ye,Swiper$1.defaults),extend$2(Ye,Swiper$1.extendedDefaults),Ye._emitClasses=!0,Ye.init=!1;const ft={},ht=paramsList.map(At=>At.replace(/_/,"")),gt=Object.assign({},Be);return Object.keys(gt).forEach(At=>{typeof Be[At]>"u"||(ht.indexOf(At)>=0?isObject$1(Be[At])?(Ye[At]={},nt[At]={},extend$2(Ye[At],Be[At]),extend$2(nt[At],Be[At])):(Ye[At]=Be[At],nt[At]=Be[At]):At.search(/on[A-Z]/)===0&&typeof Be[At]=="function"?Le?tt[`${At[2].toLowerCase()}${At.substr(3)}`]=Be[At]:Ye.on[`${At[2].toLowerCase()}${At.substr(3)}`]=Be[At]:ft[At]=Be[At])}),["navigation","pagination","scrollbar"].forEach(At=>{Ye[At]===!0&&(Ye[At]={}),Ye[At]===!1&&delete Ye[At]}),{params:Ye,passedParams:nt,rest:ft,events:tt}}function mountSwiper({el:Be,nextEl:Le,prevEl:Ye,paginationEl:tt,scrollbarEl:nt,swiper:ft},ht){needsNavigation(ht)&&Le&&Ye&&(ft.params.navigation.nextEl=Le,ft.originalParams.navigation.nextEl=Le,ft.params.navigation.prevEl=Ye,ft.originalParams.navigation.prevEl=Ye),needsPagination(ht)&&tt&&(ft.params.pagination.el=tt,ft.originalParams.pagination.el=tt),needsScrollbar(ht)&&nt&&(ft.params.scrollbar.el=nt,ft.originalParams.scrollbar.el=nt),ft.init(Be)}function getChangedParams(Be,Le,Ye,tt,nt){const ft=[];if(!Le)return ft;const ht=At=>{ft.indexOf(At)<0&&ft.push(At)};if(Ye&&tt){const At=tt.map(nt),xt=Ye.map(nt);At.join("")!==xt.join("")&&ht("children"),tt.length!==Ye.length&&ht("children")}return paramsList.filter(At=>At[0]==="_").map(At=>At.replace(/_/,"")).forEach(At=>{if(At in Be&&At in Le)if(isObject$1(Be[At])&&isObject$1(Le[At])){const xt=Object.keys(Be[At]),Et=Object.keys(Le[At]);xt.length!==Et.length?ht(At):(xt.forEach(yt=>{Be[At][yt]!==Le[At][yt]&&ht(At)}),Et.forEach(yt=>{Be[At][yt]!==Le[At][yt]&&ht(At)}))}else Be[At]!==Le[At]&&ht(At)}),ft}function isChildSwiperSlide(Be){return Be.type&&Be.type.displayName&&Be.type.displayName.includes("SwiperSlide")}function processChildren(Be){const Le=[];return React.Children.toArray(Be).forEach(Ye=>{isChildSwiperSlide(Ye)?Le.push(Ye):Ye.props&&Ye.props.children&&processChildren(Ye.props.children).forEach(tt=>Le.push(tt))}),Le}function getChildren(Be){const Le=[],Ye={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return React.Children.toArray(Be).forEach(tt=>{if(isChildSwiperSlide(tt))Le.push(tt);else if(tt.props&&tt.props.slot&&Ye[tt.props.slot])Ye[tt.props.slot].push(tt);else if(tt.props&&tt.props.children){const nt=processChildren(tt.props.children);nt.length>0?nt.forEach(ft=>Le.push(ft)):Ye["container-end"].push(tt)}else Ye["container-end"].push(tt)}),{slides:Le,slots:Ye}}function updateSwiper({swiper:Be,slides:Le,passedParams:Ye,changedParams:tt,nextEl:nt,prevEl:ft,scrollbarEl:ht,paginationEl:gt}){const At=tt.filter(Lt=>Lt!=="children"&&Lt!=="direction"&&Lt!=="wrapperClass"),{params:xt,pagination:Et,navigation:yt,scrollbar:Ct,virtual:kt,thumbs:vt}=Be;let bt,It,wt,Rt,Tt,Bt,Dt,Pt;tt.includes("thumbs")&&Ye.thumbs&&Ye.thumbs.swiper&&xt.thumbs&&!xt.thumbs.swiper&&(bt=!0),tt.includes("controller")&&Ye.controller&&Ye.controller.control&&xt.controller&&!xt.controller.control&&(It=!0),tt.includes("pagination")&&Ye.pagination&&(Ye.pagination.el||gt)&&(xt.pagination||xt.pagination===!1)&&Et&&!Et.el&&(wt=!0),tt.includes("scrollbar")&&Ye.scrollbar&&(Ye.scrollbar.el||ht)&&(xt.scrollbar||xt.scrollbar===!1)&&Ct&&!Ct.el&&(Rt=!0),tt.includes("navigation")&&Ye.navigation&&(Ye.navigation.prevEl||ft)&&(Ye.navigation.nextEl||nt)&&(xt.navigation||xt.navigation===!1)&&yt&&!yt.prevEl&&!yt.nextEl&&(Tt=!0);const Nt=Lt=>{Be[Lt]&&(Be[Lt].destroy(),Lt==="navigation"?(Be.isElement&&(Be[Lt].prevEl.remove(),Be[Lt].nextEl.remove()),xt[Lt].prevEl=void 0,xt[Lt].nextEl=void 0,Be[Lt].prevEl=void 0,Be[Lt].nextEl=void 0):(Be.isElement&&Be[Lt].el.remove(),xt[Lt].el=void 0,Be[Lt].el=void 0))};tt.includes("loop")&&Be.isElement&&(xt.loop&&!Ye.loop?Bt=!0:!xt.loop&&Ye.loop?Dt=!0:Pt=!0),At.forEach(Lt=>{if(isObject$1(xt[Lt])&&isObject$1(Ye[Lt]))extend$2(xt[Lt],Ye[Lt]),(Lt==="navigation"||Lt==="pagination"||Lt==="scrollbar")&&"enabled"in Ye[Lt]&&!Ye[Lt].enabled&&Nt(Lt);else{const Wt=Ye[Lt];(Wt===!0||Wt===!1)&&(Lt==="navigation"||Lt==="pagination"||Lt==="scrollbar")?Wt===!1&&Nt(Lt):xt[Lt]=Ye[Lt]}}),At.includes("controller")&&!It&&Be.controller&&Be.controller.control&&xt.controller&&xt.controller.control&&(Be.controller.control=xt.controller.control),tt.includes("children")&&Le&&kt&&xt.virtual.enabled&&(kt.slides=Le,kt.update(!0)),tt.includes("children")&&Le&&xt.loop&&(Pt=!0),bt&&vt.init()&&vt.update(!0),It&&(Be.controller.control=xt.controller.control),wt&&(Be.isElement&&(!gt||typeof gt=="string")&&(gt=document.createElement("div"),gt.classList.add("swiper-pagination"),Be.el.shadowEl.appendChild(gt)),gt&&(xt.pagination.el=gt),Et.init(),Et.render(),Et.update()),Rt&&(Be.isElement&&(!ht||typeof ht=="string")&&(ht=document.createElement("div"),ht.classList.add("swiper-scrollbar"),Be.el.shadowEl.appendChild(ht)),ht&&(xt.scrollbar.el=ht),Ct.init(),Ct.updateSize(),Ct.setTranslate()),Tt&&(Be.isElement&&((!nt||typeof nt=="string")&&(nt=document.createElement("div"),nt.classList.add("swiper-button-next"),Be.el.shadowEl.appendChild(nt)),(!ft||typeof ft=="string")&&(ft=document.createElement("div"),ft.classList.add("swiper-button-prev"),Be.el.shadowEl.appendChild(ft))),nt&&(xt.navigation.nextEl=nt),ft&&(xt.navigation.prevEl=ft),yt.init(),yt.update()),tt.includes("allowSlideNext")&&(Be.allowSlideNext=Ye.allowSlideNext),tt.includes("allowSlidePrev")&&(Be.allowSlidePrev=Ye.allowSlidePrev),tt.includes("direction")&&Be.changeDirection(Ye.direction,!1),(Bt||Pt)&&Be.loopDestroy(),(Dt||Pt)&&Be.loopCreate(),Be.update()}function renderVirtual(Be,Le,Ye){if(!Ye)return null;const tt=Et=>{let yt=Et;return Et<0?yt=Le.length+Et:yt>=Le.length&&(yt=yt-Le.length),yt},nt=Be.isHorizontal()?{[Be.rtlTranslate?"right":"left"]:`${Ye.offset}px`}:{top:`${Ye.offset}px`},{from:ft,to:ht}=Ye,gt=Be.params.loop?-Le.length:0,At=Be.params.loop?Le.length*2:Le.length,xt=[];for(let Et=gt;Et<At;Et+=1)Et>=ft&&Et<=ht&&xt.push(Le[tt(Et)]);return xt.map((Et,yt)=>React.cloneElement(Et,{swiper:Be,style:nt,key:`slide-${yt}`}))}const updateOnVirtualData=Be=>{!Be||Be.destroyed||!Be.params.virtual||Be.params.virtual&&!Be.params.virtual.enabled||(Be.updateSlides(),Be.updateProgress(),Be.updateSlidesClasses(),Be.parallax&&Be.params.parallax&&Be.params.parallax.enabled&&Be.parallax.setTranslate())};function useIsomorphicLayoutEffect(Be,Le){return typeof window>"u"?React.useEffect(Be,Le):React.useLayoutEffect(Be,Le)}const SwiperSlideContext=React.createContext(null),SwiperContext=React.createContext(null);function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(Be){for(var Le=1;Le<arguments.length;Le++){var Ye=arguments[Le];for(var tt in Ye)Object.prototype.hasOwnProperty.call(Ye,tt)&&(Be[tt]=Ye[tt])}return Be},_extends$3.apply(this,arguments)}const Swiper=React.forwardRef(function(Be,Le){let{className:Ye,tag:tt="div",wrapperTag:nt="div",children:ft,onSwiper:ht,...gt}=Be===void 0?{}:Be,At=!1;const[xt,Et]=React.useState("swiper"),[yt,Ct]=React.useState(null),[kt,vt]=React.useState(!1),bt=React.useRef(!1),It=React.useRef(null),wt=React.useRef(null),Rt=React.useRef(null),Tt=React.useRef(null),Bt=React.useRef(null),Dt=React.useRef(null),Pt=React.useRef(null),Nt=React.useRef(null),{params:Lt,passedParams:Wt,rest:$t,events:Kt}=getParams(gt),{slides:Vt,slots:Ut}=getChildren(ft),_t=()=>{vt(!kt)};Object.assign(Lt.on,{_containerClasses(qt,zt){Et(zt)}});const Xt=()=>{Object.assign(Lt.on,Kt),At=!0;const qt={...Lt};if(delete qt.wrapperClass,wt.current=new Swiper$1(qt),wt.current.virtual&&wt.current.params.virtual.enabled){wt.current.virtual.slides=Vt;const zt={cache:!1,slides:Vt,renderExternal:Ct,renderExternalUpdate:!1};extend$2(wt.current.params.virtual,zt),extend$2(wt.current.originalParams.virtual,zt)}};It.current||Xt(),wt.current&&wt.current.on("_beforeBreakpoint",_t);const Qt=()=>{At||!Kt||!wt.current||Object.keys(Kt).forEach(qt=>{wt.current.on(qt,Kt[qt])})},jt=()=>{!Kt||!wt.current||Object.keys(Kt).forEach(qt=>{wt.current.off(qt,Kt[qt])})};React.useEffect(()=>()=>{wt.current&&wt.current.off("_beforeBreakpoint",_t)}),React.useEffect(()=>{!bt.current&&wt.current&&(wt.current.emitSlidesClasses(),bt.current=!0)}),useIsomorphicLayoutEffect(()=>{if(Le&&(Le.current=It.current),!!It.current)return wt.current.destroyed&&Xt(),mountSwiper({el:It.current,nextEl:Bt.current,prevEl:Dt.current,paginationEl:Pt.current,scrollbarEl:Nt.current,swiper:wt.current},Lt),ht&&ht(wt.current),()=>{wt.current&&!wt.current.destroyed&&wt.current.destroy(!0,!1)}},[]),useIsomorphicLayoutEffect(()=>{Qt();const qt=getChangedParams(Wt,Rt.current,Vt,Tt.current,zt=>zt.key);return Rt.current=Wt,Tt.current=Vt,qt.length&&wt.current&&!wt.current.destroyed&&updateSwiper({swiper:wt.current,slides:Vt,passedParams:Wt,changedParams:qt,nextEl:Bt.current,prevEl:Dt.current,scrollbarEl:Nt.current,paginationEl:Pt.current}),()=>{jt()}}),useIsomorphicLayoutEffect(()=>{updateOnVirtualData(wt.current)},[yt]);function Gt(){return Lt.virtual?renderVirtual(wt.current,Vt,yt):Vt.map((qt,zt)=>React.cloneElement(qt,{swiper:wt.current,swiperSlideIndex:zt}))}return React.createElement(tt,_extends$3({ref:It,className:uniqueClasses(`${xt}${Ye?` ${Ye}`:""}`)},$t),React.createElement(SwiperContext.Provider,{value:wt.current},Ut["container-start"],React.createElement(nt,{className:wrapperClass(Lt.wrapperClass)},Ut["wrapper-start"],Gt(),Ut["wrapper-end"]),needsNavigation(Lt)&&React.createElement(React.Fragment,null,React.createElement("div",{ref:Dt,className:"swiper-button-prev"}),React.createElement("div",{ref:Bt,className:"swiper-button-next"})),needsScrollbar(Lt)&&React.createElement("div",{ref:Nt,className:"swiper-scrollbar"}),needsPagination(Lt)&&React.createElement("div",{ref:Pt,className:"swiper-pagination"}),Ut["container-end"]))});Swiper.displayName="Swiper";function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(Be){for(var Le=1;Le<arguments.length;Le++){var Ye=arguments[Le];for(var tt in Ye)Object.prototype.hasOwnProperty.call(Ye,tt)&&(Be[tt]=Ye[tt])}return Be},_extends$2.apply(this,arguments)}const SwiperSlide=React.forwardRef(function(Be,Le){let{tag:Ye="div",children:tt,className:nt="",swiper:ft,zoom:ht,lazy:gt,virtualIndex:At,swiperSlideIndex:xt,...Et}=Be===void 0?{}:Be;const yt=React.useRef(null),[Ct,kt]=React.useState("swiper-slide"),[vt,bt]=React.useState(!1);function It(Bt,Dt,Pt){Dt===yt.current&&kt(Pt)}useIsomorphicLayoutEffect(()=>{if(typeof xt<"u"&&(yt.current.swiperSlideIndex=xt),Le&&(Le.current=yt.current),!(!yt.current||!ft)){if(ft.destroyed){Ct!=="swiper-slide"&&kt("swiper-slide");return}return ft.on("_slideClass",It),()=>{ft&&ft.off("_slideClass",It)}}}),useIsomorphicLayoutEffect(()=>{ft&&yt.current&&!ft.destroyed&&kt(ft.getSlideClasses(yt.current))},[ft]);const wt={isActive:Ct.indexOf("swiper-slide-active")>=0,isVisible:Ct.indexOf("swiper-slide-visible")>=0,isPrev:Ct.indexOf("swiper-slide-prev")>=0,isNext:Ct.indexOf("swiper-slide-next")>=0},Rt=()=>typeof tt=="function"?tt(wt):tt,Tt=()=>{bt(!0)};return React.createElement(Ye,_extends$2({ref:yt,className:uniqueClasses(`${Ct}${nt?` ${nt}`:""}`),"data-swiper-slide-index":At,onLoad:Tt},Et),ht&&React.createElement(SwiperSlideContext.Provider,{value:wt},React.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof ht=="number"?ht:void 0},Rt(),gt&&!vt&&React.createElement("div",{className:"swiper-lazy-preloader"}))),!ht&&React.createElement(SwiperSlideContext.Provider,{value:wt},Rt(),gt&&!vt&&React.createElement("div",{className:"swiper-lazy-preloader"})))});SwiperSlide.displayName="SwiperSlide";const step1="data:image/svg+xml,%3csvg%20width='74'%20height='44'%20viewBox='0%200%2074%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8319_10898)'%3e%3cpath%20d='M0.227051%204.7727C0.227051%202.56356%202.01791%200.772705%204.22705%200.772705L70.147%200.772705C72.3562%200.772705%2074.147%202.56357%2074.147%204.77271V39.3327C74.147%2041.5419%2072.3562%2043.3327%2070.147%2043.3327L4.22706%2043.3327C2.01792%2043.3327%200.227051%2041.5418%200.227051%2039.3327L0.227051%204.7727Z'%20fill='white'/%3e%3cpath%20d='M0.727051%204.7727C0.727051%202.8397%202.29405%201.27271%204.22705%201.27271L70.147%201.27271C72.08%201.27271%2073.647%202.83971%2073.647%204.77271V39.3327C73.647%2041.2657%2072.08%2042.8327%2070.147%2042.8327L4.22706%2042.8327C2.29406%2042.8327%200.727051%2041.2657%200.727051%2039.3327L0.727051%204.7727Z'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.36742%2010.0223C4.36752%209.86768%204.49285%209.74243%204.64742%209.74243L69.8559%209.74243C70.0106%209.74243%2070.1359%209.86779%2070.1359%2010.0224V10.8544C70.1359%2011.009%2070.0105%2011.1344%2069.8559%2011.1344L4.64688%2011.1344C4.49217%2011.1344%204.36678%2011.0089%204.36688%2010.8542L4.36742%2010.0223Z'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='17.0227'%20width='17.08'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='22.342'%20width='17.08'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='27.6624'%20width='23.8'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='32.9827'%20width='7.56'%20height='2.52'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='4.3667'%20y='3.86255'%20width='31.36'%20height='3.08'%20rx='0.28'%20fill='%23D7D7D7'/%3e%3crect%20x='63.7876'%20y='3.70435'%20width='6.44'%20height='3.36'%20rx='0.28'%20fill='%23DBB107'/%3e%3cg%20clip-path='url(%23clip1_8319_10898)'%3e%3cg%20clip-path='url(%23clip2_8319_10898)'%3e%3crect%20x='4.30713'%20y='13.9685'%20width='19.5599'%20height='23.4718'%20rx='1.4'%20fill='%23C9C9C9'/%3e%3cpath%20d='M24.2206%2034.0174C25.1192%2035.6252%2025.6364%2039.3334%2025.6364%2039.3334H2.98291C2.98291%2039.3334%203.50035%2035.6248%204.39876%2034.0174C5.29716%2032.4099%2010.7724%2030.919%2010.7724%2030.919C11.2573%2031.7951%2012.6809%2032.5943%2014.138%2032.63C15.7193%2032.6688%2017.3401%2031.8695%2017.8443%2030.9185C17.8443%2030.9185%2023.322%2032.4095%2024.2206%2034.0174Z'%20fill='white'/%3e%3cpath%20d='M11.6467%2029.6414V29.6773C11.6368%2030.4351%2010.9989%2031.0049%209.73291%2031.3868C11.2584%2032.495%2012.7839%2033.3815%2014.3094%2033.3815C15.8349%2033.3815%2017.3604%2032.495%2018.8859%2031.3868C17.6285%2031.0045%2016.9905%2030.4338%2016.9721%2029.6747C16.9721%2029.3866%2016.9731%2026.5799%2016.9744%2026.2918C17.0653%2026.3046%2017.0576%2026.2965%2016.9744%2026.2734C16.9769%2025.3243%2016.981%2026.5667%2016.9866%2025.2697C16.9923%2023.9727%2011.5586%2022.8124%2011.6384%2026.3737C11.6395%2026.7368%2011.6416%2029.2302%2011.6467%2029.6414Z'%20fill='url(%23paint0_linear_8319_10898)'/%3e%3cpath%20d='M24.2206%2034.0174C25.1192%2035.6252%2025.6364%2039.3334%2025.6364%2039.3334H2.98291C2.98291%2039.3334%203.50035%2035.6248%204.39876%2034.0174C5.29716%2032.4099%2010.7724%2030.919%2010.7724%2030.919C10.7724%2031.8934%2012.6611%2033.2985%2014.138%2033.3236C16.1975%2033.3236%2017.8443%2031.8934%2017.8443%2030.9185C17.8443%2030.9185%2023.322%2032.4095%2024.2206%2034.0174Z'%20fill='%23007AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.0534%2026.0701C17.321%2028.1537%2015.6774%2029.617%2014.3206%2029.617C12.8015%2029.617%2011.1821%2028.0835%2010.5166%2025.9209C10.468%2025.9369%2010.4115%2025.9491%2010.3463%2025.9574C9.97084%2026.0049%209.72284%2024.9825%209.63634%2024.6008C9.62277%2024.5409%209.60695%2024.4836%209.59135%2024.427C9.50748%2024.1231%209.43001%2023.8423%209.74386%2023.3188C9.89353%2023.0691%2010.0618%2023.0312%2010.211%2023.0849C10.2713%2020.4793%2010.7708%2017.947%2014.3206%2017.947C17.9246%2017.947%2018.3845%2020.5007%2018.4327%2023.1917C18.5347%2023.2095%2018.6385%2023.2834%2018.7338%2023.4457C19.0427%2023.9722%2018.9625%2024.2522%2018.8758%2024.5554C18.8597%2024.6118%2018.8433%2024.669%2018.8292%2024.7287C18.7391%2025.1095%2018.4814%2026.1296%2018.1064%2026.0785C18.0881%2026.076%2018.0704%2026.0732%2018.0534%2026.0701Z'%20fill='url(%23paint1_linear_8319_10898)'/%3e%3c/g%3e%3c/g%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip3_8319_10898)'%3e%3cpath%20d='M65.1692%2034.8527V34.8672C65.1652%2035.1737%2064.9071%2035.4042%2064.395%2035.5587C65.0121%2036.007%2065.6292%2036.3656%2066.2463%2036.3656C66.8633%2036.3656%2067.4804%2036.007%2068.0975%2035.5587C67.5889%2035.4041%2067.3308%2035.1732%2067.3233%2034.8661C67.3233%2034.7496%2067.3237%2033.6143%2067.3243%2033.4977C67.3611%2033.5029%2067.3579%2033.4996%2067.3243%2033.4903C67.3253%2033.1064%2067.3269%2033.6089%2067.3292%2033.0843C67.3315%2032.5596%2065.1335%2032.0902%2065.1658%2033.5308C65.1662%2033.6777%2065.1671%2034.6863%2065.1692%2034.8527Z'%20fill='url(%23paint2_linear_8319_10898)'/%3e%3cpath%20d='M70.2564%2036.6232C70.6199%2037.2736%2070.8292%2038.7736%2070.8292%2038.7736H61.6655C61.6655%2038.7736%2061.8748%2037.2734%2062.2383%2036.6232C62.6017%2035.973%2064.8164%2035.3699%2064.8164%2035.3699C64.8164%2035.764%2065.5805%2036.3324%2066.1779%2036.3425C67.011%2036.3425%2067.6771%2035.764%2067.6771%2035.3696C67.6771%2035.3696%2069.8929%2035.9728%2070.2564%2036.6232Z'%20fill='%23C6C6C6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M67.6813%2033.4161C67.3844%2034.2908%2066.7176%2034.9051%2066.1672%2034.9051C65.554%2034.9051%2064.9005%2034.2676%2064.6282%2033.3668C64.6038%2033.3802%2064.572%2033.3902%2064.5316%2033.3967C64.3821%2033.4206%2064.2696%2033.0151%2064.23%2032.8636C64.2238%2032.8399%2064.2167%2032.8171%2064.2097%2032.7947C64.1722%2032.6743%2064.1376%2032.5631%2064.2562%2032.3497C64.3318%2032.2137%2064.4256%2032.2284%2064.498%2032.2804C64.5053%2031.1457%2064.6147%2029.991%2066.1672%2030.0082C67.8446%2030.0082%2067.841%2031.1465%2067.8373%2032.313C67.8372%2032.3238%2067.8372%2032.3347%2067.8372%2032.3455C67.9174%2032.2842%2068.0295%2032.254%2068.1018%2032.4149C68.2019%2032.6376%2068.158%2032.7455%2068.1104%2032.8623C68.1016%2032.8841%2068.0926%2032.9061%2068.0844%2032.9292C68.0321%2033.0768%2067.8857%2033.4713%2067.7388%2033.4349C67.717%2033.4295%2067.6979%2033.4232%2067.6813%2033.4161Z'%20fill='url(%23paint3_linear_8319_10898)'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8319_10898'%20x1='13.9035'%20y1='26.5902'%20x2='13.9035'%20y2='30.9977'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B1B1B1'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8319_10898'%20x1='10.71'%20y1='23.7275'%20x2='16.5256'%20y2='23.7495'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8319_10898'%20x1='66.0821'%20y1='33.6184'%20x2='66.0821'%20y2='35.4013'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D6D4D4'/%3e%3cstop%20offset='1'%20stop-color='%23E4E4E4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8319_10898'%20x1='64.4093'%20y1='33.0791'%20x2='66.3543'%20y2='33.0791'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CECECE'/%3e%3cstop%20offset='1'%20stop-color='%23E7E7E7'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_8319_10898'%3e%3crect%20x='0.227051'%20y='0.772461'%20width='73.7729'%20height='42.455'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10898'%3e%3crect%20x='4.3667'%20y='13.9426'%20width='19.32'%20height='23.52'%20rx='1.04397'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10898'%3e%3crect%20width='24.9189'%20height='24.9189'%20fill='white'%20transform='translate(1.8501%2013.9429)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10898'%3e%3crect%20width='10.08'%20height='10.08'%20fill='white'%20transform='translate(61.2065%2028.5022)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",step2="data:image/svg+xml,%3csvg%20width='73'%20height='42'%20viewBox='0%200%2073%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20clip-path='url(%23clip0_8319_10931)'%3e%3cg%20clip-path='url(%23clip1_8319_10931)'%3e%3cpath%20d='M-49.9917%20-40.2858C-49.9917%20-45.6521%20-45.6415%20-50.0023%20-40.2752%20-50.0023L117.375%20-50.0023C122.742%20-50.0023%20127.092%20-45.6521%20127.092%20-40.2858V42.2813C127.092%2047.6476%20122.742%2051.9979%20117.375%2051.9979L-40.2752%2051.9979C-45.6415%2051.9979%20-49.9917%2047.6476%20-49.9917%2042.2813L-49.9917%20-40.2858Z'%20fill='white'/%3e%3cpath%20d='M-48.7771%20-40.2858C-48.7771%20-44.9813%20-44.9707%20-48.7878%20-40.2752%20-48.7878L117.375%20-48.7878C122.071%20-48.7878%20125.877%20-44.9813%20125.877%20-40.2858V42.2813C125.877%2046.9768%20122.071%2050.7833%20117.375%2050.7833L-40.2752%2050.7833C-44.9707%2050.7833%20-48.7771%2046.9768%20-48.7771%2042.2813L-48.7771%20-40.2858Z'%20stroke='black'%20stroke-opacity='0.1'%20stroke-width='2.42913'/%3e%3crect%20opacity='0.25'%20x='-39.3672'%20y='-43.6262'%20width='112.625'%20height='81.4585'%20fill='url(%23pattern0_8319_10931)'/%3e%3cpath%20d='M15.5587%2020.4843H16.9621C17.2785%2020.4843%2017.5198%2020.5085%2017.6858%2020.5569C17.9089%2020.6227%2018.1%2020.7394%2018.2591%2020.9071C18.4182%2021.0749%2018.5392%2021.2807%2018.6222%2021.5245C18.7052%2021.7666%2018.7467%2022.0658%2018.7467%2022.422C18.7467%2022.735%2018.7078%2023.0048%2018.63%2023.2314C18.5349%2023.508%2018.3991%2023.732%2018.2228%2023.9032C18.0896%2024.0329%2017.9097%2024.1341%2017.6832%2024.2067C17.5137%2024.2603%2017.2872%2024.2871%2017.0036%2024.2871H15.5587V20.4843ZM16.3265%2021.1276V23.6464H16.8998C17.1143%2023.6464%2017.269%2023.6343%2017.3641%2023.6101C17.4887%2023.5789%2017.5915%2023.5262%2017.6728%2023.4518C17.7558%2023.3775%2017.8233%2023.2556%2017.8752%2023.0861C17.927%2022.9149%2017.953%2022.6823%2017.953%2022.3883C17.953%2022.0943%2017.927%2021.8686%2017.8752%2021.7113C17.8233%2021.5539%2017.7506%2021.4311%2017.6573%2021.3429C17.5639%2021.2547%2017.4454%2021.1951%2017.3019%2021.1639C17.1947%2021.1397%2016.9846%2021.1276%2016.6715%2021.1276H16.3265ZM19.2448%2022.4091C19.2448%2022.0217%2019.3027%2021.6966%2019.4186%2021.4337C19.5051%2021.24%2019.6226%2021.0662%2019.7714%2020.9123C19.9218%2020.7584%2020.0861%2020.6443%2020.2642%2020.5699C20.5011%2020.4696%2020.7744%2020.4195%2021.0839%2020.4195C21.6442%2020.4195%2022.0921%2020.5933%2022.4276%2020.9409C22.7648%2021.2884%2022.9335%2021.7718%2022.9335%2022.3909C22.9335%2023.0048%2022.7666%2023.4856%2022.4328%2023.8332C22.0991%2024.179%2021.6529%2024.352%2021.0943%2024.352C20.5288%2024.352%2020.0792%2024.1799%2019.7454%2023.8358C19.4117%2023.4899%2019.2448%2023.0143%2019.2448%2022.4091ZM20.036%2022.3831C20.036%2022.8137%2020.1354%2023.1406%2020.3343%2023.3636C20.5331%2023.585%2020.7856%2023.6957%2021.0917%2023.6957C21.3978%2023.6957%2021.6486%2023.5859%2021.844%2023.3662C22.0411%2023.1449%2022.1397%2022.8137%2022.1397%2022.3727C22.1397%2021.9369%2022.0437%2021.6118%2021.8518%2021.3974C21.6615%2021.183%2021.4082%2021.0757%2021.0917%2021.0757C20.7752%2021.0757%2020.5202%2021.1847%2020.3265%2021.4026C20.1328%2021.6187%2020.036%2021.9456%2020.036%2022.3831ZM23.5379%2020.4843H25.0579C25.3588%2020.4843%2025.5828%2020.4973%2025.7298%2020.5232C25.8785%2020.5474%2026.0108%2020.5993%2026.1267%2020.6789C26.2443%2020.7584%2026.342%2020.8648%2026.4198%2020.9979C26.4976%2021.1293%2026.5365%2021.2772%2026.5365%2021.4415C26.5365%2021.6196%2026.4881%2021.783%2026.3913%2021.9318C26.2961%2022.0805%2026.1664%2022.192%2026.0022%2022.2664C26.2339%2022.3338%2026.412%2022.4488%2026.5365%2022.6114C26.661%2022.7739%2026.7233%2022.965%2026.7233%2023.1847C26.7233%2023.3576%2026.6826%2023.5262%2026.6014%2023.6905C26.5218%2023.853%2026.412%2023.9836%2026.2719%2024.0822C26.1336%2024.179%2025.9624%2024.2387%2025.7583%2024.2612C25.6303%2024.275%2025.3217%2024.2837%2024.8323%2024.2871H23.5379V20.4843ZM24.3057%2021.1172V21.9966H24.8089C25.1081%2021.9966%2025.294%2021.9923%2025.3666%2021.9836C25.4981%2021.9681%2025.6009%2021.9231%2025.6753%2021.8488C25.7514%2021.7727%2025.7894%2021.6732%2025.7894%2021.5504C25.7894%2021.4328%2025.7566%2021.3377%2025.6909%2021.2651C25.6269%2021.1907%2025.5309%2021.1458%2025.4029%2021.1302C25.3268%2021.1216%2025.1081%2021.1172%2024.7467%2021.1172H24.3057ZM24.3057%2022.6295V23.6464H25.0164C25.2931%2023.6464%2025.4687%2023.6386%2025.543%2023.623C25.6572%2023.6023%2025.7497%2023.5521%2025.8206%2023.4726C25.8932%2023.3913%2025.9295%2023.2832%2025.9295%2023.1483C25.9295%2023.0342%2025.9019%2022.9374%2025.8465%2022.8578C25.7912%2022.7783%2025.7108%2022.7203%2025.6053%2022.684C25.5015%2022.6477%2025.275%2022.6295%2024.9256%2022.6295H24.3057ZM29.9243%2020.4687C30.2926%2020.4687%2030.5806%2020.6002%2030.7881%2020.863C31.0354%2021.1743%2031.159%2021.6905%2031.159%2022.4116C31.159%2023.1311%2031.0345%2023.6481%2030.7855%2023.9629C30.5797%2024.2223%2030.2926%2024.352%2029.9243%2024.352C29.5542%2024.352%2029.2559%2024.2102%2029.0293%2023.9265C28.8028%2023.6412%2028.6895%2023.1336%2028.6895%2022.4039C28.6895%2021.6879%2028.814%2021.1726%2029.0631%2020.8578C29.2689%2020.5984%2029.5559%2020.4687%2029.9243%2020.4687ZM29.9243%2021.0731C29.8361%2021.0731%2029.7574%2021.1017%2029.6882%2021.1587C29.6191%2021.2141%2029.5654%2021.3144%2029.5274%2021.4597C29.4772%2021.6481%2029.4522%2021.9655%2029.4522%2022.4116C29.4522%2022.8578%2029.4747%2023.1648%2029.5196%2023.3325C29.5646%2023.4985%2029.6208%2023.6092%2029.6882%2023.6645C29.7574%2023.7199%2029.8361%2023.7476%2029.9243%2023.7476C30.0125%2023.7476%2030.0912%2023.7199%2030.1603%2023.6645C30.2295%2023.6075%2030.2831%2023.5063%2030.3212%2023.3611C30.3713%2023.1743%2030.3964%2022.8578%2030.3964%2022.4116C30.3964%2021.9655%2030.3739%2021.6594%2030.3289%2021.4934C30.284%2021.3256%2030.2269%2021.2141%2030.1577%2021.1587C30.0903%2021.1017%2030.0125%2021.0731%2029.9243%2021.0731ZM32.2744%2022.2353C32.0859%2022.1557%2031.9485%2022.0468%2031.862%2021.9084C31.7773%2021.7683%2031.7349%2021.6153%2031.7349%2021.4493C31.7349%2021.1657%2031.8335%2020.9313%2032.0306%2020.7463C32.2295%2020.5613%2032.5114%2020.4687%2032.8762%2020.4687C33.2377%2020.4687%2033.5178%2020.5613%2033.7167%2020.7463C33.9173%2020.9313%2034.0176%2021.1657%2034.0176%2021.4493C34.0176%2021.6257%2033.9718%2021.783%2033.8801%2021.9214C33.7885%2022.058%2033.6596%2022.1626%2033.4936%2022.2353C33.7046%2022.32%2033.8646%2022.4436%2033.9735%2022.6062C34.0842%2022.7688%2034.1395%2022.9564%2034.1395%2023.1691C34.1395%2023.5202%2034.0271%2023.8055%2033.8023%2024.0251C33.5792%2024.2447%2033.2818%2024.3546%2032.91%2024.3546C32.5641%2024.3546%2032.2762%2024.2638%2032.0462%2024.0822C31.7747%2023.8677%2031.6389%2023.5738%2031.6389%2023.2002C31.6389%2022.9944%2031.6899%2022.8059%2031.792%2022.6347C31.894%2022.4618%2032.0548%2022.3286%2032.2744%2022.2353ZM32.4249%2021.5012C32.4249%2021.6464%2032.4655%2021.7597%2032.5468%2021.841C32.6298%2021.9222%2032.7396%2021.9629%2032.8762%2021.9629C33.0146%2021.9629%2033.1253%2021.9222%2033.2083%2021.841C33.2913%2021.758%2033.3328%2021.6438%2033.3328%2021.4986C33.3328%2021.3619%2033.2913%2021.253%2033.2083%2021.1717C33.127%2021.0887%2033.0189%2021.0472%2032.884%2021.0472C32.744%2021.0472%2032.6324%2021.0887%2032.5494%2021.1717C32.4664%2021.2547%2032.4249%2021.3645%2032.4249%2021.5012ZM32.3575%2023.1302C32.3575%2023.3308%2032.4085%2023.4873%2032.5105%2023.5997C32.6143%2023.7121%2032.7431%2023.7683%2032.897%2023.7683C33.0475%2023.7683%2033.172%2023.7147%2033.2705%2023.6075C33.3691%2023.4985%2033.4184%2023.342%2033.4184%2023.138C33.4184%2022.9598%2033.3682%2022.8172%2033.2679%2022.71C33.1676%2022.601%2033.0405%2022.5465%2032.8866%2022.5465C32.7085%2022.5465%2032.5753%2022.6079%2032.4872%2022.7307C32.4007%2022.8535%2032.3575%2022.9867%2032.3575%2023.1302ZM34.373%2024.352L35.3146%2020.4195H35.8619L34.9099%2024.352H34.373ZM36.0591%2023.278L36.7647%2023.1924C36.7871%2023.3723%2036.8477%2023.5098%2036.9462%2023.6049C37.0448%2023.7%2037.1641%2023.7476%2037.3042%2023.7476C37.4547%2023.7476%2037.5809%2023.6905%2037.6829%2023.5764C37.7867%2023.4622%2037.8386%2023.3083%2037.8386%2023.1146C37.8386%2022.9313%2037.7893%2022.786%2037.6907%2022.6788C37.5921%2022.5716%2037.472%2022.518%2037.3301%2022.518C37.2368%2022.518%2037.1252%2022.5362%2036.9955%2022.5725L37.0759%2021.9785C37.2731%2021.9836%2037.4235%2021.9413%2037.5273%2021.8513C37.631%2021.7597%2037.6829%2021.6386%2037.6829%2021.4882C37.6829%2021.3602%2037.6449%2021.2582%2037.5688%2021.1821C37.4927%2021.106%2037.3915%2021.068%2037.2653%2021.068C37.1408%2021.068%2037.0344%2021.1112%2036.9462%2021.1977C36.858%2021.2841%2036.8044%2021.4104%2036.7854%2021.5764L36.1136%2021.4622C36.1603%2021.2322%2036.2303%2021.0489%2036.3237%2020.9123C36.4188%2020.774%2036.5502%2020.6659%2036.718%2020.5881C36.8874%2020.5085%2037.0768%2020.4687%2037.286%2020.4687C37.644%2020.4687%2037.9311%2020.5829%2038.1473%2020.8112C38.3254%2020.9979%2038.4144%2021.2089%2038.4144%2021.4441C38.4144%2021.7778%2038.232%2022.0442%2037.8671%2022.243C38.085%2022.2897%2038.2588%2022.3944%2038.3885%2022.5569C38.5199%2022.7195%2038.5856%2022.9157%2038.5856%2023.1458C38.5856%2023.4795%2038.4637%2023.764%2038.2199%2023.9992C37.9761%2024.2344%2037.6726%2024.352%2037.3094%2024.352C36.9653%2024.352%2036.6799%2024.2534%2036.4534%2024.0562C36.2268%2023.8574%2036.0954%2023.598%2036.0591%2023.278ZM40.9073%2024.2871H40.1784V21.5401C39.912%2021.7891%2039.5982%2021.9733%2039.2367%2022.0926V21.4311C39.427%2021.3689%2039.6336%2021.2513%2039.8567%2021.0783C40.0798%2020.9037%2040.2328%2020.7005%2040.3158%2020.4687H40.9073V24.2871ZM41.7659%2024.352L42.7075%2020.4195H43.2548L42.3028%2024.352H41.7659ZM45.343%2024.2871H44.6141V21.5401C44.3478%2021.7891%2044.0339%2021.9733%2043.6725%2022.0926V21.4311C43.8627%2021.3689%2044.0694%2021.2513%2044.2924%2021.0783C44.5155%2020.9037%2044.6686%2020.7005%2044.7516%2020.4687H45.343V24.2871ZM46.4506%2023.4077L47.1562%2023.3299C47.1735%2023.4735%2047.2185%2023.5798%2047.2911%2023.649C47.3637%2023.7182%2047.4597%2023.7527%2047.579%2023.7527C47.7295%2023.7527%2047.8575%2023.6836%2047.9629%2023.5452C48.0684%2023.4069%2048.1359%2023.1198%2048.1653%2022.684C47.982%2022.8967%2047.7528%2023.0031%2047.4779%2023.0031C47.1787%2023.0031%2046.9202%2022.8881%2046.7023%2022.6581C46.4861%2022.4263%2046.378%2022.1254%2046.378%2021.7554C46.378%2021.3697%2046.4921%2021.0593%2046.7204%2020.8241C46.9504%2020.5872%2047.2427%2020.4687%2047.5972%2020.4687C47.9828%2020.4687%2048.2993%2020.6183%2048.5466%2020.9175C48.7939%2021.215%2048.9175%2021.7052%2048.9175%2022.3883C48.9175%2023.0835%2048.7887%2023.585%2048.531%2023.8928C48.2734%2024.2006%2047.9379%2024.3546%2047.5246%2024.3546C47.2271%2024.3546%2046.9867%2024.2759%2046.8034%2024.1185C46.6201%2023.9594%2046.5025%2023.7225%2046.4506%2023.4077ZM48.1004%2021.815C48.1004%2021.5798%2048.046%2021.3974%2047.937%2021.2677C47.8298%2021.138%2047.7053%2021.0731%2047.5635%2021.0731C47.4286%2021.0731%2047.3162%2021.1268%2047.2262%2021.234C47.1381%2021.3395%2047.094%2021.5133%2047.094%2021.7554C47.094%2022.0009%2047.1424%2022.1816%2047.2392%2022.2975C47.3361%2022.4116%2047.4571%2022.4687%2047.6024%2022.4687C47.7425%2022.4687%2047.86%2022.4134%2047.9552%2022.3027C48.052%2022.192%2048.1004%2022.0295%2048.1004%2021.815ZM50.0174%2022.2353C49.8289%2022.1557%2049.6914%2022.0468%2049.6049%2021.9084C49.5202%2021.7683%2049.4778%2021.6153%2049.4778%2021.4493C49.4778%2021.1657%2049.5764%2020.9313%2049.7736%2020.7463C49.9724%2020.5613%2050.2543%2020.4687%2050.6192%2020.4687C50.9806%2020.4687%2051.2608%2020.5613%2051.4597%2020.7463C51.6603%2020.9313%2051.7606%2021.1657%2051.7606%2021.4493C51.7606%2021.6257%2051.7147%2021.783%2051.6231%2021.9214C51.5314%2022.058%2051.4026%2022.1626%2051.2366%2022.2353C51.4475%2022.32%2051.6075%2022.4436%2051.7165%2022.6062C51.8271%2022.7688%2051.8825%2022.9564%2051.8825%2023.1691C51.8825%2023.5202%2051.7701%2023.8055%2051.5453%2024.0251C51.3222%2024.2447%2051.0247%2024.3546%2050.6529%2024.3546C50.3071%2024.3546%2050.0191%2024.2638%2049.7891%2024.0822C49.5176%2023.8677%2049.3819%2023.5738%2049.3819%2023.2002C49.3819%2022.9944%2049.4329%2022.8059%2049.5349%2022.6347C49.6369%2022.4618%2049.7978%2022.3286%2050.0174%2022.2353ZM50.1678%2021.5012C50.1678%2021.6464%2050.2085%2021.7597%2050.2898%2021.841C50.3728%2021.9222%2050.4826%2021.9629%2050.6192%2021.9629C50.7575%2021.9629%2050.8682%2021.9222%2050.9512%2021.841C51.0342%2021.758%2051.0757%2021.6438%2051.0757%2021.4986C51.0757%2021.3619%2051.0342%2021.253%2050.9512%2021.1717C50.8699%2021.0887%2050.7619%2021.0472%2050.627%2021.0472C50.4869%2021.0472%2050.3754%2021.0887%2050.2924%2021.1717C50.2093%2021.2547%2050.1678%2021.3645%2050.1678%2021.5012ZM50.1004%2023.1302C50.1004%2023.3308%2050.1514%2023.4873%2050.2534%2023.5997C50.3572%2023.7121%2050.486%2023.7683%2050.6399%2023.7683C50.7904%2023.7683%2050.9149%2023.7147%2051.0135%2023.6075C51.1121%2023.4985%2051.1613%2023.342%2051.1613%2023.138C51.1613%2022.9598%2051.1112%2022.8172%2051.0109%2022.71C50.9106%2022.601%2050.7835%2022.5465%2050.6296%2022.5465C50.4515%2022.5465%2050.3183%2022.6079%2050.2301%2022.7307C50.1436%2022.8535%2050.1004%2022.9867%2050.1004%2023.1302ZM52.3235%2023.278L53.029%2023.1924C53.0515%2023.3723%2053.112%2023.5098%2053.2106%2023.6049C53.3092%2023.7%2053.4285%2023.7476%2053.5686%2023.7476C53.719%2023.7476%2053.8453%2023.6905%2053.9473%2023.5764C54.0511%2023.4622%2054.1029%2023.3083%2054.1029%2023.1146C54.1029%2022.9313%2054.0537%2022.786%2053.9551%2022.6788C53.8565%2022.5716%2053.7363%2022.518%2053.5945%2022.518C53.5011%2022.518%2053.3896%2022.5362%2053.2599%2022.5725L53.3403%2021.9785C53.5374%2021.9836%2053.6879%2021.9413%2053.7917%2021.8513C53.8954%2021.7597%2053.9473%2021.6386%2053.9473%2021.4882C53.9473%2021.3602%2053.9093%2021.2582%2053.8332%2021.1821C53.7571%2021.106%2053.6559%2021.068%2053.5297%2021.068C53.4052%2021.068%2053.2988%2021.1112%2053.2106%2021.1977C53.1224%2021.2841%2053.0688%2021.4104%2053.0498%2021.5764L52.3779%2021.4622C52.4246%2021.2322%2052.4947%2021.0489%2052.588%2020.9123C52.6832%2020.774%2052.8146%2020.6659%2052.9823%2020.5881C53.1518%2020.5085%2053.3412%2020.4687%2053.5504%2020.4687C53.9084%2020.4687%2054.1955%2020.5829%2054.4116%2020.8112C54.5897%2020.9979%2054.6788%2021.2089%2054.6788%2021.4441C54.6788%2021.7778%2054.4964%2022.0442%2054.1315%2022.243C54.3494%2022.2897%2054.5232%2022.3944%2054.6529%2022.5569C54.7843%2022.7195%2054.85%2022.9157%2054.85%2023.1458C54.85%2023.4795%2054.7281%2023.764%2054.4843%2023.9992C54.2404%2024.2344%2053.9369%2024.352%2053.5738%2024.352C53.2296%2024.352%2052.9443%2024.2534%2052.7177%2024.0562C52.4912%2023.8574%2052.3598%2023.598%2052.3235%2023.278Z'%20fill='%23007AFF'/%3e%3cg%20clip-path='url(%23clip2_8319_10931)'%3e%3cg%20clip-path='url(%23clip3_8319_10931)'%3e%3crect%20x='-40.7822'%20y='-18.129'%20width='46.7501'%20height='56.6668'%20rx='3.54167'%20fill='%23D2D2D2'/%3e%3cpath%20d='M7.51522%2030.5187C9.67871%2034.4436%2010.9241%2043.4957%2010.9241%2043.4957H-43.6177C-43.6177%2043.4957%20-42.3719%2034.4426%20-40.2088%2030.5187C-38.0458%2026.5948%20-24.8634%2022.9554%20-24.8634%2022.9554C-23.6958%2025.0941%20-20.2684%2027.0449%20-16.76%2027.1321C-12.953%2027.2267%20-9.05053%2025.2755%20-7.83675%2022.954C-7.83675%2022.954%205.35173%2026.5938%207.51522%2030.5187Z'%20fill='white'/%3e%3cpath%20d='M7.51522%2030.5187C9.67871%2034.4436%2010.9241%2043.4957%2010.9241%2043.4957H-43.6177C-43.6177%2043.4957%20-42.3719%2034.4426%20-40.2088%2030.5187C-38.0458%2026.5948%20-24.8634%2022.9554%20-24.8634%2022.9554C-24.8634%2025.3339%20-20.3161%2028.764%20-16.76%2028.8251C-11.8017%2028.8251%20-7.83675%2025.3339%20-7.83675%2022.954C-7.83675%2022.954%205.35173%2026.5938%207.51522%2030.5187Z'%20fill='%23007AFF'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3crect%20x='0.600098'%20y='0.504761'%20width='71.9'%20height='40.9904'%20rx='3.5'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cdefs%3e%3cpattern%20id='pattern0_8319_10931'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_8319_10931'%20transform='matrix(0.00598802%200%200%200.00827909%200%20-0.000885247)'/%3e%3c/pattern%3e%3cclipPath%20id='clip0_8319_10931'%3e%3crect%20x='0.100098'%20y='0.00476074'%20width='72.9'%20height='41.9904'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10931'%3e%3crect%20x='-49.9917'%20y='-50.0001'%20width='177.084'%20height='102'%20rx='4.25001'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10931'%3e%3crect%20x='-40.0728'%20y='-18.129'%20width='46.0417'%20height='56.6668'%20rx='2.83334'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10931'%3e%3crect%20width='60.2084'%20height='60.2084'%20fill='white'%20transform='translate(-46.4478%20-18.129)'/%3e%3c/clipPath%3e%3cimage%20id='image0_8319_10931'%20width='167'%20height='121'%20xlink:href='data:image/png;base64,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'/%3e%3c/defs%3e%3c/svg%3e",step3="data:image/svg+xml,%3csvg%20width='73'%20height='42'%20viewBox='0%200%2073%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20clip-path='url(%23clip0_8319_10967)'%3e%3cpath%20d='M0.100098%204.00354C0.100098%201.79441%201.89096%200.00354004%204.1001%200.00354004L69.0001%200.00354004C71.2092%200.00354004%2073.0001%201.7944%2073.0001%204.00354V37.9939C73.0001%2040.2031%2071.2092%2041.9939%2069.0001%2041.9939L4.1001%2041.9939C1.89097%2041.9939%200.100098%2040.2031%200.100098%2037.9939L0.100098%204.00354Z'%20fill='white'/%3e%3cpath%20d='M0.600098%204.00354C0.600098%202.07055%202.1671%200.50354%204.1001%200.50354L69.0001%200.50354C70.9331%200.50354%2072.5001%202.07054%2072.5001%204.00354V37.9939C72.5001%2039.9269%2070.9331%2041.4939%2069.0001%2041.4939L4.1001%2041.4939C2.16711%2041.4939%200.600098%2039.9269%200.600098%2037.9939L0.600098%204.00354Z'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.18382%209.02844C4.18392%208.87551%204.30791%208.75159%204.46084%208.75159L68.9329%208.75159C69.0859%208.75159%2069.2099%208.87561%2069.2099%209.02861V9.93257C69.2099%2010.0856%2069.0859%2010.2096%2068.9329%2010.2096L4.46029%2010.2096C4.30723%2010.2096%204.18318%2010.0855%204.18327%209.9324L4.18382%209.02844Z'%20fill='%23E9E9EB'/%3e%3crect%20x='62.7935'%20y='2.91858'%20width='6.4152'%20height='3.2076'%20rx='0.2916'%20fill='%23DBB107'/%3e%3crect%20opacity='0.25'%20x='4.47412'%20y='2.62854'%20width='46.3644'%20height='33.534'%20fill='url(%23pattern0_8319_10967)'/%3e%3cpath%20d='M4.60424%204.78977L5.11067%204.74053C5.14115%204.91052%205.2027%205.03536%205.29531%205.11508C5.38909%205.19479%205.51511%205.23465%205.67337%205.23465C5.84101%205.23465%205.96703%205.19948%206.05143%205.12915C6.13701%205.05764%206.1798%204.9744%206.1798%204.87945C6.1798%204.81849%206.16163%204.76691%206.12528%204.72471C6.09012%204.68133%206.02799%204.64382%205.93889%204.61217C5.87793%204.59107%205.73902%204.55355%205.52214%204.49963C5.24314%204.43046%205.04737%204.34547%204.93483%204.24466C4.77657%204.10281%204.69744%203.9299%204.69744%203.72592C4.69744%203.59463%204.73437%203.47212%204.80822%203.35841C4.88325%203.24353%204.99051%203.15619%205.13001%203.0964C5.27069%203.03662%205.44008%203.00672%205.6382%203.00672C5.96175%203.00672%206.205%203.07765%206.36795%203.21949C6.53207%203.36134%206.61823%203.55066%206.62644%203.78747L6.10594%203.81033C6.08367%203.67786%206.0356%203.5829%205.96175%203.52546C5.88907%203.46685%205.77946%203.43754%205.63292%203.43754C5.4817%203.43754%205.3633%203.4686%205.27772%203.53074C5.22263%203.57059%205.19508%203.62393%205.19508%203.69075C5.19508%203.75171%205.22087%203.80388%205.27245%203.84725C5.3381%203.90235%205.49753%203.95979%205.75074%204.01958C6.00395%204.07937%206.19093%204.1415%206.31168%204.20597C6.4336%204.26928%206.52855%204.35661%206.59654%204.46798C6.66571%204.57817%206.70029%204.71474%206.70029%204.87769C6.70029%205.0254%206.65926%205.16373%206.5772%205.29268C6.49514%205.42163%206.37908%205.51776%206.22903%205.58106C6.07898%205.64319%205.892%205.67426%205.66809%205.67426C5.3422%205.67426%205.09192%205.59923%204.91724%205.44918C4.74257%205.29796%204.63824%205.07815%204.60424%204.78977ZM7.66568%205.62854V3.48678H6.90076V3.05069H8.94933V3.48678H8.18617V5.62854H7.66568ZM11.2916%205.62854H10.7254L10.5003%205.04298H9.46984L9.25707%205.62854H8.70492L9.70898%203.05069H10.2594L11.2916%205.62854ZM10.3332%204.60865L9.97802%203.65207L9.62985%204.60865H10.3332ZM11.8297%205.62854V3.48678H11.0647V3.05069H13.1133V3.48678H12.3502V5.62854H11.8297ZM13.3982%205.62854V3.05069H15.3096V3.48678H13.9187V4.05826H15.2129V4.4926H13.9187V5.19421H15.3588V5.62854H13.3982ZM16.7023%205.62854V3.05069H17.2087L18.2638%204.77219V3.05069H18.7473V5.62854H18.2251L17.1859%203.94748V5.62854H16.7023ZM21.5714%205.62854H21.0052L20.7801%205.04298H19.7497L19.5369%205.62854H18.9847L19.9888%203.05069H20.5392L21.5714%205.62854ZM20.613%204.60865L20.2578%203.65207L19.9097%204.60865H20.613ZM21.7894%205.62854V3.05069H22.5684L23.0362%204.80911L23.4986%203.05069H24.2794V5.62854H23.7958V3.59931L23.2841%205.62854H22.783L22.273%203.59931V5.62854H21.7894ZM24.7436%205.62854V3.05069H26.655V3.48678H25.2641V4.05826H26.5583V4.4926H25.2641V5.19421H26.7043V5.62854H24.7436Z'%20fill='%23A6A6A6'/%3e%3cpath%20d='M27.0853%2029.1392H27.663C27.7933%2029.1392%2027.8926%2029.1492%2027.9609%2029.1691C28.0528%2029.1962%2028.1314%2029.2442%2028.1969%2029.3133C28.2624%2029.3823%2028.3123%2029.467%2028.3464%2029.5674C28.3806%2029.6671%2028.3977%2029.7903%2028.3977%2029.9369C28.3977%2030.0658%2028.3817%2030.1768%2028.3497%2030.2701C28.3105%2030.384%2028.2546%2030.4762%2028.182%2030.5467C28.1272%2030.6001%2028.0531%2030.6417%2027.9599%2030.6716C27.8901%2030.6937%2027.7968%2030.7047%2027.6801%2030.7047H27.0853V29.1392ZM27.4014%2029.404V30.4409H27.6374C27.7257%2030.4409%2027.7894%2030.436%2027.8285%2030.426C27.8798%2030.4132%2027.9221%2030.3915%2027.9556%2030.3609C27.9898%2030.3302%2028.0175%2030.2801%2028.0389%2030.2103C28.0603%2030.1398%2028.0709%2030.0441%2028.0709%2029.923C28.0709%2029.802%2028.0603%2029.7091%2028.0389%2029.6443C28.0175%2029.5795%2027.9876%2029.529%2027.9492%2029.4927C27.9108%2029.4564%2027.862%2029.4318%2027.8029%2029.419C27.7588%2029.409%2027.6723%2029.404%2027.5434%2029.404H27.4014ZM28.6027%2029.9316C28.6027%2029.7721%2028.6266%2029.6383%2028.6743%2029.5301C28.7099%2029.4503%2028.7583%2029.3788%2028.8195%2029.3154C28.8815%2029.2521%2028.9491%2029.2051%2029.0224%2029.1745C29.1199%2029.1332%2029.2324%2029.1125%2029.3599%2029.1125C29.5905%2029.1125%2029.7749%2029.1841%2029.913%2029.3272C30.0518%2029.4703%2030.1212%2029.6692%2030.1212%2029.9241C30.1212%2030.1768%2030.0525%2030.3747%2029.9151%2030.5178C29.7777%2030.6602%2029.5941%2030.7314%2029.3641%2030.7314C29.1313%2030.7314%2028.9462%2030.6606%2028.8088%2030.5189C28.6714%2030.3765%2028.6027%2030.1807%2028.6027%2029.9316ZM28.9284%2029.9209C28.9284%2030.0982%2028.9694%2030.2327%2029.0512%2030.3245C29.1331%2030.4157%2029.2371%2030.4612%2029.3631%2030.4612C29.4891%2030.4612%2029.5923%2030.416%2029.6727%2030.3256C29.7539%2030.2345%2029.7945%2030.0982%2029.7945%2029.9166C29.7945%2029.7372%2029.755%2029.6034%2029.6759%2029.5151C29.5976%2029.4268%2029.4933%2029.3827%2029.3631%2029.3827C29.2328%2029.3827%2029.1278%2029.4275%2029.048%2029.5172C28.9683%2029.6062%2028.9284%2029.7408%2028.9284%2029.9209ZM30.3701%2029.1392H30.9958C31.1197%2029.1392%2031.2119%2029.1446%2031.2724%2029.1552C31.3336%2029.1652%2031.3881%2029.1866%2031.4358%2029.2193C31.4842%2029.2521%2031.5244%2029.2958%2031.5565%2029.3507C31.5885%2029.4048%2031.6045%2029.4656%2031.6045%2029.5333C31.6045%2029.6066%2031.5846%2029.6739%2031.5447%2029.7351C31.5056%2029.7963%2031.4522%2029.8422%2031.3845%2029.8728C31.4799%2029.9006%2031.5533%2029.9479%2031.6045%2030.0149C31.6558%2030.0818%2031.6814%2030.1605%2031.6814%2030.2509C31.6814%2030.3221%2031.6647%2030.3915%2031.6312%2030.4591C31.5985%2030.526%2031.5533%2030.5798%2031.4956%2030.6204C31.4386%2030.6602%2031.3682%2030.6848%2031.2842%2030.694C31.2315%2030.6997%2031.1044%2030.7033%2030.9029%2030.7047H30.3701V29.1392ZM30.6862%2029.3998V29.7618H30.8933C31.0165%2029.7618%2031.093%2029.76%2031.1229%2029.7564C31.177%2029.75%2031.2194%2029.7315%2031.25%2029.7009C31.2813%2029.6696%2031.297%2029.6287%2031.297%2029.5781C31.297%2029.5297%2031.2834%2029.4905%2031.2564%2029.4606C31.2301%2029.43%2031.1905%2029.4115%2031.1379%2029.4051C31.1065%2029.4016%2031.0165%2029.3998%2030.8677%2029.3998H30.6862ZM30.6862%2030.0223V30.4409H30.9787C31.0927%2030.4409%2031.1649%2030.4377%2031.1955%2030.4313C31.2425%2030.4228%2031.2806%2030.4021%2031.3098%2030.3694C31.3397%2030.3359%2031.3546%2030.2914%2031.3546%2030.2359C31.3546%2030.1889%2031.3432%2030.1491%2031.3205%2030.1163C31.2977%2030.0836%2031.2646%2030.0597%2031.2212%2030.0448C31.1784%2030.0298%2031.0852%2030.0223%2030.9414%2030.0223H30.6862ZM32.9992%2029.1328C33.1508%2029.1328%2033.2693%2029.1869%2033.3548%2029.2951C33.4566%2029.4233%2033.5075%2029.6358%2033.5075%2029.9326C33.5075%2030.2288%2033.4562%2030.4417%2033.3537%2030.5712C33.269%2030.678%2033.1508%2030.7314%2032.9992%2030.7314C32.8468%2030.7314%2032.724%2030.673%2032.6307%2030.5563C32.5375%2030.4388%2032.4909%2030.2299%2032.4909%2029.9294C32.4909%2029.6347%2032.5421%2029.4226%2032.6446%2029.293C32.7293%2029.1862%2032.8475%2029.1328%2032.9992%2029.1328ZM32.9992%2029.3816C32.9629%2029.3816%2032.9305%2029.3934%2032.902%2029.4169C32.8735%2029.4396%2032.8514%2029.4809%2032.8358%2029.5407C32.8151%2029.6183%2032.8048%2029.749%2032.8048%2029.9326C32.8048%2030.1163%2032.8141%2030.2427%2032.8326%2030.3117C32.8511%2030.3801%2032.8742%2030.4256%2032.902%2030.4484C32.9305%2030.4712%2032.9629%2030.4826%2032.9992%2030.4826C33.0355%2030.4826%2033.0679%2030.4712%2033.0963%2030.4484C33.1248%2030.4249%2033.1469%2030.3833%2033.1625%2030.3235C33.1832%2030.2466%2033.1935%2030.1163%2033.1935%2029.9326C33.1935%2029.749%2033.1843%2029.623%2033.1657%2029.5546C33.1472%2029.4856%2033.1237%2029.4396%2033.0953%2029.4169C33.0675%2029.3934%2033.0355%2029.3816%2032.9992%2029.3816ZM33.9667%2029.86C33.8891%2029.8273%2033.8325%2029.7824%2033.7969%2029.7255C33.762%2029.6678%2033.7445%2029.6048%2033.7445%2029.5365C33.7445%2029.4197%2033.7851%2029.3232%2033.8663%2029.2471C33.9481%2029.1709%2034.0642%2029.1328%2034.2144%2029.1328C34.3632%2029.1328%2034.4785%2029.1709%2034.5604%2029.2471C34.643%2029.3232%2034.6843%2029.4197%2034.6843%2029.5365C34.6843%2029.6091%2034.6654%2029.6739%2034.6277%2029.7308C34.5899%2029.7871%2034.5369%2029.8301%2034.4686%2029.86C34.5554%2029.8949%2034.6213%2029.9458%2034.6661%2030.0127C34.7117%2030.0797%2034.7345%2030.1569%2034.7345%2030.2445C34.7345%2030.389%2034.6882%2030.5064%2034.5956%2030.5969C34.5038%2030.6873%2034.3813%2030.7325%2034.2283%2030.7325C34.0859%2030.7325%2033.9674%2030.6951%2033.8727%2030.6204C33.7609%2030.5321%2033.705%2030.411%2033.705%2030.2573C33.705%2030.1726%2033.726%2030.095%2033.768%2030.0245C33.81%2029.9533%2033.8762%2029.8985%2033.9667%2029.86ZM34.0286%2029.5578C34.0286%2029.6176%2034.0453%2029.6642%2034.0788%2029.6977C34.113%2029.7312%2034.1582%2029.7479%2034.2144%2029.7479C34.2714%2029.7479%2034.3169%2029.7312%2034.3511%2029.6977C34.3853%2029.6635%2034.4023%2029.6166%2034.4023%2029.5568C34.4023%2029.5005%2034.3853%2029.4557%2034.3511%2029.4222C34.3176%2029.388%2034.2731%2029.3709%2034.2176%2029.3709C34.1599%2029.3709%2034.114%2029.388%2034.0798%2029.4222C34.0457%2029.4564%2034.0286%2029.5016%2034.0286%2029.5578ZM34.0008%2030.2284C34.0008%2030.311%2034.0218%2030.3755%2034.0638%2030.4217C34.1065%2030.468%2034.1596%2030.4911%2034.2229%2030.4911C34.2849%2030.4911%2034.3361%2030.4691%2034.3767%2030.4249C34.4173%2030.3801%2034.4376%2030.3157%2034.4376%2030.2316C34.4376%2030.1583%2034.4169%2030.0996%2034.3756%2030.0554C34.3344%2030.0106%2034.282%2029.9882%2034.2187%2029.9882C34.1453%2029.9882%2034.0905%2030.0134%2034.0542%2030.064C34.0186%2030.1145%2034.0008%2030.1694%2034.0008%2030.2284ZM34.8306%2030.7314L35.2182%2029.1125H35.4435L35.0516%2030.7314H34.8306ZM35.5247%2030.2893L35.8151%2030.2541C35.8244%2030.3281%2035.8493%2030.3847%2035.8899%2030.4239C35.9305%2030.463%2035.9796%2030.4826%2036.0373%2030.4826C36.0992%2030.4826%2036.1512%2030.4591%2036.1932%2030.4121C36.2359%2030.3651%2036.2572%2030.3018%2036.2572%2030.222C36.2572%2030.1466%2036.2369%2030.0868%2036.1964%2030.0426C36.1558%2029.9985%2036.1063%2029.9764%2036.0479%2029.9764C36.0095%2029.9764%2035.9636%2029.9839%2035.9102%2029.9988L35.9433%2029.7543C36.0244%2029.7564%2036.0864%2029.739%2036.1291%2029.702C36.1718%2029.6642%2036.1932%2029.6144%2036.1932%2029.5525C36.1932%2029.4998%2036.1775%2029.4578%2036.1462%2029.4265C36.1149%2029.3951%2036.0732%2029.3795%2036.0212%2029.3795C35.97%2029.3795%2035.9262%2029.3973%2035.8899%2029.4329C35.8536%2029.4685%2035.8315%2029.5204%2035.8237%2029.5888L35.5471%2029.5418C35.5663%2029.4471%2035.5952%2029.3717%2035.6336%2029.3154C35.6728%2029.2585%2035.7269%2029.214%2035.7959%2029.1819C35.8657%2029.1492%2035.9436%2029.1328%2036.0298%2029.1328C36.1771%2029.1328%2036.2953%2029.1798%2036.3843%2029.2738C36.4576%2029.3507%2036.4943%2029.4375%2036.4943%2029.5343C36.4943%2029.6717%2036.4192%2029.7814%2036.269%2029.8632C36.3587%2029.8825%2036.4302%2029.9255%2036.4836%2029.9924C36.5377%2030.0594%2036.5648%2030.1402%2036.5648%2030.2348C36.5648%2030.3722%2036.5146%2030.4894%2036.4142%2030.5862C36.3138%2030.683%2036.1889%2030.7314%2036.0394%2030.7314C35.8977%2030.7314%2035.7803%2030.6908%2035.687%2030.6097C35.5937%2030.5278%2035.5396%2030.421%2035.5247%2030.2893ZM37.5205%2030.7047H37.2205V29.5738C37.1108%2029.6764%2036.9816%2029.7522%2036.8328%2029.8013V29.529C36.9111%2029.5034%2036.9962%2029.4549%2037.088%2029.3838C37.1799%2029.3119%2037.2429%2029.2282%2037.2771%2029.1328H37.5205V30.7047ZM37.874%2030.7314L38.2616%2029.1125H38.4869L38.095%2030.7314H37.874ZM39.3466%2030.7047H39.0465V29.5738C38.9369%2029.6764%2038.8077%2029.7522%2038.6589%2029.8013V29.529C38.7372%2029.5034%2038.8223%2029.4549%2038.9141%2029.3838C39.0059%2029.3119%2039.0689%2029.2282%2039.1031%2029.1328H39.3466V30.7047ZM39.8026%2030.3427L40.093%2030.3107C40.1001%2030.3698%2040.1187%2030.4135%2040.1486%2030.442C40.1785%2030.4705%2040.218%2030.4847%2040.2671%2030.4847C40.329%2030.4847%2040.3817%2030.4563%2040.4251%2030.3993C40.4686%2030.3423%2040.4963%2030.2242%2040.5084%2030.0448C40.433%2030.1323%2040.3386%2030.1761%2040.2254%2030.1761C40.1023%2030.1761%2039.9959%2030.1288%2039.9062%2030.0341C39.8172%2029.9387%2039.7727%2029.8148%2039.7727%2029.6625C39.7727%2029.5037%2039.8197%2029.3759%2039.9136%2029.2791C40.0083%2029.1816%2040.1286%2029.1328%2040.2746%2029.1328C40.4333%2029.1328%2040.5636%2029.1944%2040.6654%2029.3175C40.7672%2029.44%2040.8181%2029.6418%2040.8181%2029.923C40.8181%2030.2092%2040.7651%2030.4157%2040.659%2030.5424C40.5529%2030.6691%2040.4148%2030.7325%2040.2447%2030.7325C40.1222%2030.7325%2040.0233%2030.7001%2039.9478%2030.6353C39.8723%2030.5698%2039.8239%2030.4723%2039.8026%2030.3427ZM40.4817%2029.687C40.4817%2029.5902%2040.4593%2029.5151%2040.4145%2029.4617C40.3703%2029.4083%2040.3191%2029.3816%2040.2607%2029.3816C40.2052%2029.3816%2040.1589%2029.4037%2040.1219%2029.4478C40.0856%2029.4913%2040.0674%2029.5628%2040.0674%2029.6625C40.0674%2029.7636%2040.0873%2029.838%2040.1272%2029.8857C40.1671%2029.9326%2040.2169%2029.9561%2040.2767%2029.9561C40.3344%2029.9561%2040.3828%2029.9334%2040.4219%2029.8878C40.4618%2029.8422%2040.4817%2029.7753%2040.4817%2029.687ZM41.2709%2029.86C41.1933%2029.8273%2041.1367%2029.7824%2041.1011%2029.7255C41.0662%2029.6678%2041.0488%2029.6048%2041.0488%2029.5365C41.0488%2029.4197%2041.0894%2029.3232%2041.1705%2029.2471C41.2524%2029.1709%2041.3684%2029.1328%2041.5186%2029.1328C41.6674%2029.1328%2041.7828%2029.1709%2041.8646%2029.2471C41.9472%2029.3232%2041.9885%2029.4197%2041.9885%2029.5365C41.9885%2029.6091%2041.9696%2029.6739%2041.9319%2029.7308C41.8942%2029.7871%2041.8411%2029.8301%2041.7728%2029.86C41.8596%2029.8949%2041.9255%2029.9458%2041.9703%2030.0127C42.0159%2030.0797%2042.0387%2030.1569%2042.0387%2030.2445C42.0387%2030.389%2041.9924%2030.5064%2041.8999%2030.5969C41.808%2030.6873%2041.6856%2030.7325%2041.5325%2030.7325C41.3901%2030.7325%2041.2716%2030.6951%2041.1769%2030.6204C41.0651%2030.5321%2041.0093%2030.411%2041.0093%2030.2573C41.0093%2030.1726%2041.0303%2030.095%2041.0723%2030.0245C41.1143%2029.9533%2041.1805%2029.8985%2041.2709%2029.86ZM41.3328%2029.5578C41.3328%2029.6176%2041.3496%2029.6642%2041.383%2029.6977C41.4172%2029.7312%2041.4624%2029.7479%2041.5186%2029.7479C41.5756%2029.7479%2041.6212%2029.7312%2041.6553%2029.6977C41.6895%2029.6635%2041.7066%2029.6166%2041.7066%2029.5568C41.7066%2029.5005%2041.6895%2029.4557%2041.6553%2029.4222C41.6219%2029.388%2041.5774%2029.3709%2041.5218%2029.3709C41.4642%2029.3709%2041.4183%2029.388%2041.3841%2029.4222C41.3499%2029.4564%2041.3328%2029.5016%2041.3328%2029.5578ZM41.3051%2030.2284C41.3051%2030.311%2041.3261%2030.3755%2041.3681%2030.4217C41.4108%2030.468%2041.4638%2030.4911%2041.5272%2030.4911C41.5891%2030.4911%2041.6404%2030.4691%2041.681%2030.4249C41.7215%2030.3801%2041.7418%2030.3157%2041.7418%2030.2316C41.7418%2030.1583%2041.7212%2030.0996%2041.6799%2030.0554C41.6386%2030.0106%2041.5863%2029.9882%2041.5229%2029.9882C41.4496%2029.9882%2041.3948%2030.0134%2041.3585%2030.064C41.3229%2030.1145%2041.3051%2030.1694%2041.3051%2030.2284ZM42.2202%2030.2893L42.5107%2030.2541C42.5199%2030.3281%2042.5449%2030.3847%2042.5854%2030.4239C42.626%2030.463%2042.6751%2030.4826%2042.7328%2030.4826C42.7947%2030.4826%2042.8467%2030.4591%2042.8887%2030.4121C42.9314%2030.3651%2042.9528%2030.3018%2042.9528%2030.222C42.9528%2030.1466%2042.9325%2030.0868%2042.8919%2030.0426C42.8513%2029.9985%2042.8019%2029.9764%2042.7435%2029.9764C42.705%2029.9764%2042.6591%2029.9839%2042.6057%2029.9988L42.6388%2029.7543C42.72%2029.7564%2042.7819%2029.739%2042.8246%2029.702C42.8674%2029.6642%2042.8887%2029.6144%2042.8887%2029.5525C42.8887%2029.4998%2042.8731%2029.4578%2042.8417%2029.4265C42.8104%2029.3951%2042.7688%2029.3795%2042.7168%2029.3795C42.6655%2029.3795%2042.6217%2029.3973%2042.5854%2029.4329C42.5491%2029.4685%2042.5271%2029.5204%2042.5192%2029.5888L42.2427%2029.5418C42.2619%2029.4471%2042.2907%2029.3717%2042.3291%2029.3154C42.3683%2029.2585%2042.4224%2029.214%2042.4915%2029.1819C42.5612%2029.1492%2042.6392%2029.1328%2042.7253%2029.1328C42.8727%2029.1328%2042.9909%2029.1798%2043.0799%2029.2738C43.1532%2029.3507%2043.1899%2029.4375%2043.1899%2029.5343C43.1899%2029.6717%2043.1147%2029.7814%2042.9645%2029.8632C43.0542%2029.8825%2043.1258%2029.9255%2043.1792%2029.9924C43.2333%2030.0594%2043.2603%2030.1402%2043.2603%2030.2348C43.2603%2030.3722%2043.2101%2030.4894%2043.1098%2030.5862C43.0094%2030.683%2042.8844%2030.7314%2042.7349%2030.7314C42.5933%2030.7314%2042.4758%2030.6908%2042.3825%2030.6097C42.2893%2030.5278%2042.2352%2030.421%2042.2202%2030.2893Z'%20fill='%23007AFF'/%3e%3cg%20clip-path='url(%23clip1_8319_10967)'%3e%3cg%20clip-path='url(%23clip2_8319_10967)'%3e%3crect%20x='3.89111'%20y='13.1241'%20width='19.2456'%20height='23.328'%20rx='1.458'%20fill='%23D2D2D2'/%3e%3cpath%20d='M23.774%2033.1515C24.6646%2034.7673%2025.1773%2038.4938%2025.1773%2038.4938H2.72412C2.72412%2038.4938%203.23699%2034.7669%204.12745%2033.1515C5.0179%2031.5362%2010.4447%2030.0379%2010.4447%2030.0379C10.9253%2030.9184%2012.3363%2031.7215%2013.7806%2031.7574C15.3479%2031.7963%2016.9544%2030.993%2017.4541%2030.0374C17.4541%2030.0374%2022.8834%2031.5358%2023.774%2033.1515Z'%20fill='white'/%3e%3cpath%20d='M11.3212%2028.6495V28.6851C11.3115%2029.4389%2010.6815%2030.0056%209.43115%2030.3854C10.9377%2031.4876%2012.4444%2032.3694%2013.951%2032.3694C15.4575%2032.3694%2016.9642%2031.4876%2018.4708%2030.3854C17.2289%2030.0052%2016.5989%2029.4376%2016.5807%2028.6825C16.5807%2028.396%2016.5816%2025.6045%2016.583%2025.3179C16.6728%2025.3306%2016.6651%2025.3225%2016.583%2025.2996C16.5854%2024.3556%2016.5894%2025.5913%2016.595%2024.3013C16.6006%2023.0113%2011.2343%2021.8572%2011.313%2025.3993C11.3141%2025.7605%2011.3162%2028.2405%2011.3212%2028.6495Z'%20fill='url(%23paint0_linear_8319_10967)'/%3e%3cpath%20d='M23.774%2033.1515C24.6646%2034.7673%2025.1773%2038.4938%2025.1773%2038.4938H2.72412C2.72412%2038.4938%203.23699%2034.7669%204.12745%2033.1515C5.0179%2031.5362%2010.4447%2030.0379%2010.4447%2030.0379C10.4447%2031.0171%2012.3167%2032.4292%2013.7806%2032.4543C15.8218%2032.4543%2017.4541%2031.0171%2017.4541%2030.0374C17.4541%2030.0374%2022.8834%2031.5358%2023.774%2033.1515Z'%20fill='%23007AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.5277%2025.2645C16.8122%2027.3791%2015.1639%2028.8702%2013.8056%2028.8702C12.322%2028.8702%2010.742%2027.3833%2010.0641%2025.2733C9.68216%2025.2756%209.43571%2024.2888%209.34859%2023.9151C9.33461%2023.8551%209.31822%2023.7976%209.30207%2023.7409C9.21521%2023.4364%209.13499%2023.155%209.47015%2022.6267C9.55347%2022.4953%209.64178%2022.4217%209.72956%2022.3888C9.7844%2019.768%2010.2642%2017.2062%2013.8056%2017.2062C17.3499%2017.2062%2017.8275%2019.7169%2017.8817%2022.382C17.9702%2022.4152%2018.0589%2022.4898%2018.1419%2022.6235C18.4721%2023.1551%2018.3893%2023.4356%2018.2996%2023.7394L18.2996%2023.7394C18.2829%2023.7959%2018.266%2023.8532%2018.2514%2023.913C18.1612%2024.2845%2017.9071%2025.2628%2017.5277%2025.2645Z'%20fill='url(%23paint1_linear_8319_10967)'/%3e%3c/g%3e%3c/g%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip3_8319_10967)'%3e%3cpath%20d='M64.4011%2033.7762V33.7906C64.3973%2034.0968%2064.1534%2034.3271%2063.6694%2034.4814C64.2526%2034.9292%2064.8358%2035.2874%2065.419%2035.2874C66.0022%2035.2874%2066.5854%2034.9292%2067.1686%2034.4814C66.6879%2034.3269%2066.444%2034.0963%2066.437%2033.7896C66.437%2033.6732%2066.4374%2032.5391%2066.4379%2032.4227C66.4726%2032.4279%2066.4697%2032.4246%2066.4379%2032.4153C66.4388%2032.0318%2066.4404%2032.5338%2066.4425%2032.0097C66.4447%2031.4857%2064.3674%2031.0168%2064.3979%2032.4558C64.3983%2032.6025%2064.3991%2033.61%2064.4011%2033.7762Z'%20fill='url(%23paint2_linear_8319_10967)'/%3e%3cpath%20d='M69.5191%2035.3017C69.8776%2035.9146%2070.084%2037.3281%2070.084%2037.3281H61.0444C61.0444%2037.3281%2061.2509%2035.9144%2061.6094%2035.3017C61.9679%2034.689%2064.1527%2034.1207%2064.1527%2034.1207C64.1527%2034.4921%2064.9064%2035.0277%2065.4957%2035.0373C66.3175%2035.0373%2066.9747%2034.4921%2066.9747%2034.1205C66.9747%2034.1205%2069.1605%2034.6888%2069.5191%2035.3017Z'%20fill='%23C6C6C6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M67.0406%2032.2085C66.7509%2033.1524%2066.0183%2033.8267%2065.4179%2033.8267C64.7838%2033.8267%2064.1085%2033.1979%2063.8169%2032.3048C63.6457%2032.2712%2063.5307%2031.9204%2063.4883%2031.7821C63.481%2031.7584%2063.4726%2031.7358%2063.4643%2031.7136C63.4195%2031.5938%2063.3781%2031.4832%2063.5426%2031.2621C63.583%2031.2078%2063.6262%2031.1759%2063.6693%2031.1601C63.6775%2030.0146%2063.796%2028.8523%2065.4179%2028.8697C67.1407%2028.8697%2067.1709%2029.9771%2067.1677%2031.1331C67.2115%2031.1518%2067.2541%2031.1877%2067.2915%2031.2481C67.4366%2031.4821%2067.3859%2031.5888%2067.331%2031.7043L67.331%2031.7043C67.3208%2031.7258%2067.3105%2031.7476%2067.3012%2031.7706C67.2592%2031.8748%2067.1628%2032.1027%2067.0406%2032.2085Z'%20fill='url(%23paint3_linear_8319_10967)'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_8319_10967'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_8319_10967'%20transform='matrix(0.00598802%200%200%200.00827909%200%20-0.000885226)'/%3e%3c/pattern%3e%3clinearGradient%20id='paint0_linear_8319_10967'%20x1='13.5501'%20y1='25.6147'%20x2='13.5501'%20y2='29.9985'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B1B1B1'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8319_10967'%20x1='10.3827'%20y1='22.9837'%20x2='16.0242'%20y2='23.0044'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8319_10967'%20x1='65.2639'%20y1='32.5433'%20x2='65.2639'%20y2='34.3242'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D6D4D4'/%3e%3cstop%20offset='1'%20stop-color='%23E4E4E4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8319_10967'%20x1='63.6576'%20y1='31.9783'%20x2='65.5906'%20y2='31.9783'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CECECE'/%3e%3cstop%20offset='1'%20stop-color='%23E7E7E7'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_8319_10967'%3e%3crect%20x='0.100098'%20y='0.00476074'%20width='72.9'%20height='41.9904'%20rx='1.7496'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10967'%3e%3crect%20x='4.18311'%20y='13.1246'%20width='18.954'%20height='23.328'%20rx='1.1664'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10967'%3e%3crect%20width='24.786'%20height='24.786'%20fill='white'%20transform='translate(1.55908%2013.1244)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10967'%3e%3crect%20width='9.9144'%20height='9.9144'%20fill='white'%20transform='translate(60.4614%2027.4137)'/%3e%3c/clipPath%3e%3cimage%20id='image0_8319_10967'%20width='167'%20height='121'%20xlink:href='data:image/png;base64,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'/%3e%3c/defs%3e%3c/svg%3e",imageSources={light:{position:"https://sdk.incode.com/sdk/tutorials/id-position.gif",shadow:"https://sdk.incode.com/sdk/tutorials/id-shadow.gif"},dark:{position:"https://sdk.incode.com/sdk/tutorials/front-dark.gif",shadow:"https://sdk.incode.com/sdk/tutorials/front-shadow-dark.gif"}};function TutorialFront$1({onSuccess:Be,token:Le={token:""},ageAssurance:Ye}){const{t:tt}=useTranslation$1();useScreenEvents({module:eventModuleNames.front,screen:eventScreenNames.frontTutorial,token:Le==null?void 0:Le.token});const nt=React.useRef(null);useAutoFocus(nt,!0);const[ft,ht]=React.useState(tt("common.continue")),[gt,At]=React.useState(()=>tt(`tutorial.front.${Ye?"ageVerification":"titleFrame"}`)),[xt,Et]=React.useState(()=>Ye?tt("tutorial.front.ageVerificationSubtitle"):null),[yt,Ct]=React.useState(!0),[kt,vt]=React.useState(null),bt=Pt=>{const Nt=options.darkMode?"dark":"light";return imageSources[Nt][Pt]},It=()=>{ht(tt("common.continue")),At(tt("tutorial.front.titleFrame")),Et(null),Ct(!0)},wt=()=>{ht(tt("common.readyToScan")),At(tt("tutorial.front.titleGlare")),Et(null),Ct(!1)},Rt=()=>{switch(kt.slides[kt.activeIndex].id){case"AGE_ASSURANCE":It(),kt.slideTo(1);break;case"FRAME_INSTRUCTIONS":wt(),Bt(),kt.slideTo(Ye?2:1);break;case"GLARE_INSTRUCTIONS":Tt();break}};React.useEffect(()=>{Le&&addEvent({token:Le==null?void 0:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"ID Preparation feedbacks"})},[]);function Tt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be(!0)}const Bt=()=>{setTimeout(()=>{var Pt,Nt;(Pt=nt.current)==null||Pt.focus(),(Nt=nt.current)==null||Nt.blur()},0)};function Dt(Pt){const Nt=Pt.activeIndex,Lt=Pt.slides[Nt],Wt=Lt==null?void 0:Lt.getAttribute("id");Wt==="GLARE_INSTRUCTIONS"&&!Ye&&wt(),Wt==="FRAME_INSTRUCTIONS"&&It()}return mobile.isDesktop()?jsxRuntimeExports.jsx(Tutorial$1,{token:Le,src:"https://sdk.incode.com/sdk/tutorials/tutorial-front-desktop.mp4",next:Tt,type:"Front",header:jsxRuntimeExports.jsx(HiddenTitle,{"aria-hidden":"true",children:"Capture Front ID Tutorial"})}):jsxRuntimeExports.jsx(RootContainer,{cssSelector:"IncodeTutorialContainerFront",children:jsxRuntimeExports.jsxs(TutorialContainer$2,{children:[jsxRuntimeExports.jsx(TutorialHeader$1,{children:jsxRuntimeExports.jsxs("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderFront",children:[jsxRuntimeExports.jsx("h1",{ref:nt,tabIndex:-1,className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleFront",children:gt}),xt?jsxRuntimeExports.jsx(TutorialSubtitle,{children:xt}):null]})}),jsxRuntimeExports.jsxs(Swiper,{cssMode:!0,autoplay:!1,className:"IncodeSwiperComponent",onSwiper:vt,pagination:!0,modules:[Pagination],onSlideChange:Dt,children:[Ye?jsxRuntimeExports.jsx(SwiperSlide,{id:"AGE_ASSURANCE",style:{flexDirection:"column"},children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",style:{alignItems:"flex-start"},children:jsxRuntimeExports.jsxs(AgeStepsWrapper,{children:[jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"1"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep1")}),jsxRuntimeExports.jsx("img",{src:step1,alt:tt("tutorial.front.ageVerificationStep1")})]}),jsxRuntimeExports.jsx(AgeStepDivder,{}),jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"2"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep2")}),jsxRuntimeExports.jsx("img",{src:step2,alt:tt("tutorial.front.ageVerificationStep2")})]}),jsxRuntimeExports.jsx(AgeStepDivder,{}),jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"3"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep3")}),jsxRuntimeExports.jsx("img",{src:step3,alt:tt("tutorial.front.ageVerificationStep3")})]})]})})}):null,jsxRuntimeExports.jsx(SwiperSlide,{id:"FRAME_INSTRUCTIONS",children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",children:jsxRuntimeExports.jsx("img",{src:bt("position"),"aria-hidden":!yt,alt:tt("tutorial.front.titleAriaFrame")})})}),jsxRuntimeExports.jsx(SwiperSlide,{id:"GLARE_INSTRUCTIONS",children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",children:jsxRuntimeExports.jsx("img",{src:bt("shadow"),alt:tt("tutorial.front.titleGlare")})})})]}),jsxRuntimeExports.jsx(FrontTutorialAction,{className:cx("IncodeTutorialButtonContainer","IncodeTutorialButtonContainerFront"),children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonFront"),onClick:Rt,children:ft})})]})})}const TutorialPapperDLHeader=({title:Be,subtitle:Le})=>jsxRuntimeExports.jsxs("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderFront",children:[jsxRuntimeExports.jsx("h1",{className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleFront",children:Be}),jsxRuntimeExports.jsx("p",{style:{fontSize:"18px"},children:Le})]}),videoUrl="https://sdk.incode.com/sdk/tutorials/paper-license-tutorial.mp4";function TutorialFront({onSuccess:Be,token:Le}){const{t:Ye}=useTranslation$1();React.useEffect(()=>{Le!=null&&Le.token&&addEvent({token:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"ID Preparation feedbacks"})},[]);function tt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be()}return jsxRuntimeExports.jsxs(TutorialContainer$2,{children:[jsxRuntimeExports.jsx(TutorialHeader$1,{children:jsxRuntimeExports.jsx(TutorialPapperDLHeader,{title:Ye("tutorial.paperDL.titleFrame"),subtitle:Ye("tutorial.paperDL.subtitle")})}),jsxRuntimeExports.jsx(VideoContainer,{children:jsxRuntimeExports.jsx("video",{preload:"auto",playsInline:!0,src:videoUrl,muted:!0,autoPlay:!0,loop:!0})}),jsxRuntimeExports.jsx(FrontTutorialAction,{className:cx("IncodeTutorialButtonContainer","IncodeTutorialButtonContainerFront"),children:jsxRuntimeExports.jsx(StyledButton$b,{className:cx("IncodeTutorialButton","IncodeTutorialButtonFront"),onClick:tt,theme:exports.theme,children:Ye("common.continue")})})]})}const TutorialPassportHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.passport1")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.passport2")})]})};function TutorialPassport({onSuccess:Be,token:Le,src:Ye,...tt}){const nt=options.darkMode?"https://sdk.incode.com/sdk/tutorials/passport-dark.mp4":"https://sdk.incode.com/sdk/tutorials/passport.gif";Ye=Ye||nt;const{t:ft}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialPassport",payload:{tutorialPassport:!0}})},[Le.token]);function ht(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{...tt,token:Le,src:Ye,header:jsxRuntimeExports.jsx(TutorialPassportHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ht,children:ft("common.continue")})})})}function addCreditCardBack({token:Be,base64Image:Le,onProgress:Ye=emptyFunc}){return exports.api.post("/omni/add/credit-card-back/v2",{base64Image:Le},{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":"application/json"},onUploadProgress:({loaded:tt,total:nt})=>Ye(tt/nt*100)}).then(tt=>tt.data).catch(tt=>Promise.reject(tt.response.data))}function addCreditCardFront({token:Be,base64Image:Le,onProgress:Ye=emptyFunc}){return exports.api.post("/omni/add/credit-card-front/v2",{base64Image:Le},{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":"application/json"},onUploadProgress:({loaded:tt,total:nt})=>Ye(tt/nt*100)}).then(tt=>tt.data).catch(tt=>Promise.reject(tt.response.data))}class IdDetectorBase{constructor(){this.pipelineProfile=null,this.currentCanvas=null}async initialize({onCapturing:Le,onFarAway:Ye,onGlare:tt,onBlur:nt,onIDNotDetected:ft,onMaskChange:ht,onDetectionStarted:gt,onSwitchToManualCapture:At,onIDTypeChange:xt,onIDSideChange:Et,onCapturingCounterValueChange:yt,idType:Ct,isFixedMask:kt,isBlurCheckEnabled:vt,isGlareCheckEnabled:bt,pipelineProfile:It,isV2:wt=!1,onCapture:Rt=()=>{},idDetectedTimeout:Tt=0,autocaptureTimeout:Bt=-1}){this.pipelineProfile=It;const Dt=this.pipelineProfile.pipelineType;this.pipelineProfile.reconfigureParams(mobile.isDesktop(),wt),await MlWasmJSApi$1.setIdCaptureCallbacks(Dt,Ye,gt,ht,nt,tt,this.getOnCapturing(Le),this.getOnCapture(Rt),this.getOnBestFrame(),ft,At,xt,Et,yt),await MlWasmJSApi$1.setIdCaptureThresholds(Dt,It.parameters.sharpnessThreshold,It.parameters.sharpnessChangeThreshold,It.parameters.glareThreshold,It.parameters.classificationThreshold,It.parameters.sideThreshold,It.parameters.iouThreshold,Tt,Bt,It.parameters.framesAggregationInterval,It.parameters.minFaceIdQualityScore),await MlWasmJSApi$1.setIdCaptureConfigParams(Dt,kt,localStorage.getItem("isIPhone14OrHigher")==="true",Ct,vt,bt,It.parameters.isIdFaceQualityCheckEnabled,It.parameters.isIouCheckEnabled),await MlWasmJSApi$1.setIdCaptureGeometryParams(Dt,It.parameters.areaDown,It.parameters.areaUp,It.parameters.areaIOSPassportUp,It.parameters.areaIOSPassportDown,It.parameters.widthIOSUp,It.parameters.widthIOSDown,It.parameters.widthDown,It.parameters.widthUp,window.outerWidth,window.outerHeight,window.innerWidth,window.innerHeight),MlWasmJSApi$1.setIdCaptureModelType(Dt,this.pipelineProfile.parameters.modelType)}async detectCommon(Le,Ye){try{this.currentCanvas=Le;const tt=Le.getImageData();await MlWasmJSApi$1.allocateImageBuffers(tt.width,tt.height),await MlWasmJSApi$1.process(tt,Ye),this.currentCanvas.release()}catch(tt){console.error(`Exception: ${tt}`)}}}class IdCapture extends IdDetectorBase{constructor(){super(...arguments),this.bestCanvas=null,this.qualityElements=null,this.bestOrientation=null}getOnBestFrame(){return(Le,Ye,tt)=>{this.bestCanvas=this.currentCanvas.clone(),this.qualityElements={glare:Ye,sharpness:Le},this.bestOrientation=tt}}getOnCapture(Le){return()=>{this.bestCanvas.updateBase64Image(),this.bestCanvas.updateBlob(),Le(this.bestCanvas,this.qualityElements,this.bestOrientation)}}getOnCapturing(Le){return()=>{Le()}}async detect(Le){this.detectCommon(Le,this.pipelineProfile.pipelineType)}}class IdVideoSelfie extends IdDetectorBase{getOnCapturing(Le){return()=>{Le(this.currentMode,this.currentCanvas.clone().getBase64Image())}}getOnCapture(Le){return()=>{}}getOnBestFrame(){return(Le,Ye,tt)=>{}}async detect(Le){this.detectCommon(Le,this.pipelineProfile.pipelineType)}updateCurrentMode(Le){this.currentMode=Le}}function getImages$1({token:Be,body:Le,onDownloadProgress:Ye}){return exports.api.post("/omni/get/images",Le,{headers:{"X-Incode-Hardware-Id":Be},onDownloadProgress:({loaded:tt,total:nt})=>{Ye==null||Ye(tt*100/nt)}}).then(tt=>tt.data)}var __webpack_require__={};__webpack_require__.d=(Be,Le)=>{for(var Ye in Le)__webpack_require__.o(Le,Ye)&&!__webpack_require__.o(Be,Ye)&&Object.defineProperty(Be,Ye,{enumerable:!0,get:Le[Ye]})},__webpack_require__.o=(Be,Le)=>Object.prototype.hasOwnProperty.call(Be,Le);var __webpack_exports__=globalThis.pdfjsLib={};__webpack_require__.d(__webpack_exports__,{AbortException:()=>AbortException,AnnotationEditorLayer:()=>AnnotationEditorLayer,AnnotationEditorParamsType:()=>AnnotationEditorParamsType,AnnotationEditorType:()=>AnnotationEditorType,AnnotationEditorUIManager:()=>AnnotationEditorUIManager,AnnotationLayer:()=>AnnotationLayer$1,AnnotationMode:()=>AnnotationMode,ColorPicker:()=>ColorPicker,DOMSVGFactory:()=>DOMSVGFactory,DrawLayer:()=>DrawLayer,FeatureTest:()=>util_FeatureTest,GlobalWorkerOptions:()=>GlobalWorkerOptions,ImageKind:()=>util_ImageKind,InvalidPDFException:()=>InvalidPDFException,MissingPDFException:()=>MissingPDFException,OPS:()=>OPS,OutputScale:()=>OutputScale,PDFDataRangeTransport:()=>PDFDataRangeTransport$1,PDFDateString:()=>PDFDateString,PDFWorker:()=>PDFWorker,PasswordResponses:()=>PasswordResponses$1,PermissionFlag:()=>PermissionFlag,PixelsPerInch:()=>PixelsPerInch,RenderingCancelledException:()=>RenderingCancelledException,TextLayer:()=>TextLayer$1,UnexpectedResponseException:()=>UnexpectedResponseException,Util:()=>Util,VerbosityLevel:()=>VerbosityLevel,XfaLayer:()=>XfaLayer,build:()=>build,createValidAbsoluteUrl:()=>createValidAbsoluteUrl,fetchData:()=>fetchData,getDocument:()=>getDocument,getFilenameFromUrl:()=>getFilenameFromUrl$1,getPdfFilenameFromUrl:()=>getPdfFilenameFromUrl,getXfaPageViewport:()=>getXfaPageViewport,isDataScheme:()=>isDataScheme,isPdfFile:()=>isPdfFile,noContextMenu:()=>noContextMenu,normalizeUnicode:()=>normalizeUnicode,setLayerDimensions:()=>setLayerDimensions,shadow:()=>shadow,version:()=>version});const isNodeJS=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),IDENTITY_MATRIX=[1,0,0,1,0,0],FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],MAX_IMAGE_SIZE_TO_CACHE=1e7,LINE_FACTOR=1.35,RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},AnnotationEditorPrefix="pdfjs_internal_editor_",AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},util_ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,WIDGET:20},AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},VerbosityLevel={ERRORS:0,WARNINGS:1,INFOS:5},OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},PasswordResponses$1={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let verbosity=VerbosityLevel.WARNINGS;function setVerbosityLevel(Be){Number.isInteger(Be)&&(verbosity=Be)}function getVerbosityLevel(){return verbosity}function info(Be){verbosity>=VerbosityLevel.INFOS&&console.log(`Info: ${Be}`)}function warn$1(Be){verbosity>=VerbosityLevel.WARNINGS&&console.log(`Warning: ${Be}`)}function unreachable$1(Be){throw new Error(Be)}function assert(Be,Le){Be||unreachable$1(Le)}function _isValidProtocol(Be){switch(Be==null?void 0:Be.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function createValidAbsoluteUrl(Be,Le=null,Ye=null){if(!Be)return null;try{if(Ye&&typeof Be=="string"){if(Ye.addDefaultProtocol&&Be.startsWith("www.")){const nt=Be.match(/\./g);(nt==null?void 0:nt.length)>=2&&(Be=`http://${Be}`)}if(Ye.tryConvertEncoding)try{Be=stringToUTF8String(Be)}catch{}}const tt=Le?new URL(Be,Le):new URL(Be);if(_isValidProtocol(tt))return tt}catch{}return null}function shadow(Be,Le,Ye,tt=!1){return Object.defineProperty(Be,Le,{value:Ye,enumerable:!tt,configurable:!0,writable:!1}),Ye}const BaseException=function(){function Le(Ye,tt){this.message=Ye,this.name=tt}return Le.prototype=new Error,Le.constructor=Le,Le}();class PasswordException extends BaseException{constructor(Le,Ye){super(Le,"PasswordException"),this.code=Ye}}class UnknownErrorException extends BaseException{constructor(Le,Ye){super(Le,"UnknownErrorException"),this.details=Ye}}class InvalidPDFException extends BaseException{constructor(Le){super(Le,"InvalidPDFException")}}class MissingPDFException extends BaseException{constructor(Le){super(Le,"MissingPDFException")}}class UnexpectedResponseException extends BaseException{constructor(Le,Ye){super(Le,"UnexpectedResponseException"),this.status=Ye}}class FormatError extends BaseException{constructor(Le){super(Le,"FormatError")}}class AbortException extends BaseException{constructor(Le){super(Le,"AbortException")}}function bytesToString(Be){(typeof Be!="object"||(Be==null?void 0:Be.length)===void 0)&&unreachable$1("Invalid argument for bytesToString");const Le=Be.length,Ye=8192;if(Le<Ye)return String.fromCharCode.apply(null,Be);const tt=[];for(let nt=0;nt<Le;nt+=Ye){const ft=Math.min(nt+Ye,Le),ht=Be.subarray(nt,ft);tt.push(String.fromCharCode.apply(null,ht))}return tt.join("")}function stringToBytes(Be){typeof Be!="string"&&unreachable$1("Invalid argument for stringToBytes");const Le=Be.length,Ye=new Uint8Array(Le);for(let tt=0;tt<Le;++tt)Ye[tt]=Be.charCodeAt(tt)&255;return Ye}function string32(Be){return String.fromCharCode(Be>>24&255,Be>>16&255,Be>>8&255,Be&255)}function objectFromMap(Be){const Le=Object.create(null);for(const[Ye,tt]of Be)Le[Ye]=tt;return Le}function isLittleEndian(){const Be=new Uint8Array(4);return Be[0]=1,new Uint32Array(Be.buffer,0,1)[0]===1}function isEvalSupported(){try{return new Function(""),!0}catch{return!1}}class util_FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",isLittleEndian())}static get isEvalSupported(){return shadow(this,"isEvalSupported",isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"?shadow(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):shadow(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var Le,Ye;return shadow(this,"isCSSRoundSupported",(Ye=(Le=globalThis.CSS)==null?void 0:Le.supports)==null?void 0:Ye.call(Le,"width: round(1.5px, 1px)"))}}const hexNumbers=Array.from(Array(256).keys(),Be=>Be.toString(16).padStart(2,"0"));class Util{static makeHexColor(Le,Ye,tt){return`#${hexNumbers[Le]}${hexNumbers[Ye]}${hexNumbers[tt]}`}static scaleMinMax(Le,Ye){let tt;Le[0]?(Le[0]<0&&(tt=Ye[0],Ye[0]=Ye[2],Ye[2]=tt),Ye[0]*=Le[0],Ye[2]*=Le[0],Le[3]<0&&(tt=Ye[1],Ye[1]=Ye[3],Ye[3]=tt),Ye[1]*=Le[3],Ye[3]*=Le[3]):(tt=Ye[0],Ye[0]=Ye[1],Ye[1]=tt,tt=Ye[2],Ye[2]=Ye[3],Ye[3]=tt,Le[1]<0&&(tt=Ye[1],Ye[1]=Ye[3],Ye[3]=tt),Ye[1]*=Le[1],Ye[3]*=Le[1],Le[2]<0&&(tt=Ye[0],Ye[0]=Ye[2],Ye[2]=tt),Ye[0]*=Le[2],Ye[2]*=Le[2]),Ye[0]+=Le[4],Ye[1]+=Le[5],Ye[2]+=Le[4],Ye[3]+=Le[5]}static transform(Le,Ye){return[Le[0]*Ye[0]+Le[2]*Ye[1],Le[1]*Ye[0]+Le[3]*Ye[1],Le[0]*Ye[2]+Le[2]*Ye[3],Le[1]*Ye[2]+Le[3]*Ye[3],Le[0]*Ye[4]+Le[2]*Ye[5]+Le[4],Le[1]*Ye[4]+Le[3]*Ye[5]+Le[5]]}static applyTransform(Le,Ye){const tt=Le[0]*Ye[0]+Le[1]*Ye[2]+Ye[4],nt=Le[0]*Ye[1]+Le[1]*Ye[3]+Ye[5];return[tt,nt]}static applyInverseTransform(Le,Ye){const tt=Ye[0]*Ye[3]-Ye[1]*Ye[2],nt=(Le[0]*Ye[3]-Le[1]*Ye[2]+Ye[2]*Ye[5]-Ye[4]*Ye[3])/tt,ft=(-Le[0]*Ye[1]+Le[1]*Ye[0]+Ye[4]*Ye[1]-Ye[5]*Ye[0])/tt;return[nt,ft]}static getAxialAlignedBoundingBox(Le,Ye){const tt=this.applyTransform(Le,Ye),nt=this.applyTransform(Le.slice(2,4),Ye),ft=this.applyTransform([Le[0],Le[3]],Ye),ht=this.applyTransform([Le[2],Le[1]],Ye);return[Math.min(tt[0],nt[0],ft[0],ht[0]),Math.min(tt[1],nt[1],ft[1],ht[1]),Math.max(tt[0],nt[0],ft[0],ht[0]),Math.max(tt[1],nt[1],ft[1],ht[1])]}static inverseTransform(Le){const Ye=Le[0]*Le[3]-Le[1]*Le[2];return[Le[3]/Ye,-Le[1]/Ye,-Le[2]/Ye,Le[0]/Ye,(Le[2]*Le[5]-Le[4]*Le[3])/Ye,(Le[4]*Le[1]-Le[5]*Le[0])/Ye]}static singularValueDecompose2dScale(Le){const Ye=[Le[0],Le[2],Le[1],Le[3]],tt=Le[0]*Ye[0]+Le[1]*Ye[2],nt=Le[0]*Ye[1]+Le[1]*Ye[3],ft=Le[2]*Ye[0]+Le[3]*Ye[2],ht=Le[2]*Ye[1]+Le[3]*Ye[3],gt=(tt+ht)/2,At=Math.sqrt((tt+ht)**2-4*(tt*ht-ft*nt))/2,xt=gt+At||1,Et=gt-At||1;return[Math.sqrt(xt),Math.sqrt(Et)]}static normalizeRect(Le){const Ye=Le.slice(0);return Le[0]>Le[2]&&(Ye[0]=Le[2],Ye[2]=Le[0]),Le[1]>Le[3]&&(Ye[1]=Le[3],Ye[3]=Le[1]),Ye}static intersect(Le,Ye){const tt=Math.max(Math.min(Le[0],Le[2]),Math.min(Ye[0],Ye[2])),nt=Math.min(Math.max(Le[0],Le[2]),Math.max(Ye[0],Ye[2]));if(tt>nt)return null;const ft=Math.max(Math.min(Le[1],Le[3]),Math.min(Ye[1],Ye[3])),ht=Math.min(Math.max(Le[1],Le[3]),Math.max(Ye[1],Ye[3]));return ft>ht?null:[tt,ft,nt,ht]}static bezierBoundingBox(Le,Ye,tt,nt,ft,ht,gt,At,xt){return xt?(xt[0]=Math.min(xt[0],Le,gt),xt[1]=Math.min(xt[1],Ye,At),xt[2]=Math.max(xt[2],Le,gt),xt[3]=Math.max(xt[3],Ye,At)):xt=[Math.min(Le,gt),Math.min(Ye,At),Math.max(Le,gt),Math.max(Ye,At)],y0(this,Ns,L9).call(this,Le,tt,ft,gt,Ye,nt,ht,At,3*(-Le+3*(tt-ft)+gt),6*(Le-2*tt+ft),3*(tt-Le),xt),y0(this,Ns,L9).call(this,Le,tt,ft,gt,Ye,nt,ht,At,3*(-Ye+3*(nt-ht)+At),6*(Ye-2*nt+ht),3*(nt-Ye),xt),xt}}Ns=new WeakSet,Yd=function(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et){if(xt<=0||xt>=1)return;const yt=1-xt,Ct=xt*xt,kt=Ct*xt,vt=yt*(yt*(yt*Le+3*xt*Ye)+3*Ct*tt)+kt*nt,bt=yt*(yt*(yt*ft+3*xt*ht)+3*Ct*gt)+kt*At;Et[0]=Math.min(Et[0],vt),Et[1]=Math.min(Et[1],bt),Et[2]=Math.max(Et[2],vt),Et[3]=Math.max(Et[3],bt)},L9=function(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct){if(Math.abs(xt)<1e-12){Math.abs(Et)>=1e-12&&y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,-yt/Et,Ct);return}const kt=Et**2-4*yt*xt;if(kt<0)return;const vt=Math.sqrt(kt),bt=2*xt;y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,(-Et+vt)/bt,Ct),y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,(-Et-vt)/bt,Ct)},v0(Util,Ns);function stringToUTF8String(Be){return decodeURIComponent(escape(Be))}let NormalizeRegex=null,NormalizationMap=null;function normalizeUnicode(Be){return NormalizeRegex||(NormalizeRegex=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,NormalizationMap=new Map([["ſt","ſt"]])),Be.replaceAll(NormalizeRegex,(Le,Ye,tt)=>Ye?Ye.normalize("NFKC"):NormalizationMap.get(tt))}function getUuid(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const Be=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(Be);else for(let Le=0;Le<32;Le++)Be[Le]=Math.floor(Math.random()*255);return bytesToString(Be)}const AnnotationPrefix="pdfjs_internal_id_",FontRenderOps={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};function toBase64Util(Be){return Uint8Array.prototype.toBase64?Be.toBase64():btoa(bytesToString(Be))}const SVG_NS="http://www.w3.org/2000/svg",d2=class d2{};Nn(d2,"CSS",96),Nn(d2,"PDF",72),Nn(d2,"PDF_TO_CSS_UNITS",d2.CSS/d2.PDF);let PixelsPerInch=d2;async function fetchData(Be,Le="text"){if(isValidFetchUrl(Be,document.baseURI)){const Ye=await fetch(Be);if(!Ye.ok)throw new Error(Ye.statusText);switch(Le){case"arraybuffer":return Ye.arrayBuffer();case"blob":return Ye.blob();case"json":return Ye.json()}return Ye.text()}return new Promise((Ye,tt)=>{const nt=new XMLHttpRequest;nt.open("GET",Be,!0),nt.responseType=Le,nt.onreadystatechange=()=>{if(nt.readyState===XMLHttpRequest.DONE){if(nt.status===200||nt.status===0){switch(Le){case"arraybuffer":case"blob":case"json":Ye(nt.response);return}Ye(nt.responseText);return}tt(new Error(nt.statusText))}},nt.send(null)})}class PageViewport{constructor({viewBox:Le,scale:Ye,rotation:tt,offsetX:nt=0,offsetY:ft=0,dontFlip:ht=!1}){this.viewBox=Le,this.scale=Ye,this.rotation=tt,this.offsetX=nt,this.offsetY=ft;const gt=(Le[2]+Le[0])/2,At=(Le[3]+Le[1])/2;let xt,Et,yt,Ct;switch(tt%=360,tt<0&&(tt+=360),tt){case 180:xt=-1,Et=0,yt=0,Ct=1;break;case 90:xt=0,Et=1,yt=1,Ct=0;break;case 270:xt=0,Et=-1,yt=-1,Ct=0;break;case 0:xt=1,Et=0,yt=0,Ct=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ht&&(yt=-yt,Ct=-Ct);let kt,vt,bt,It;xt===0?(kt=Math.abs(At-Le[1])*Ye+nt,vt=Math.abs(gt-Le[0])*Ye+ft,bt=(Le[3]-Le[1])*Ye,It=(Le[2]-Le[0])*Ye):(kt=Math.abs(gt-Le[0])*Ye+nt,vt=Math.abs(At-Le[1])*Ye+ft,bt=(Le[2]-Le[0])*Ye,It=(Le[3]-Le[1])*Ye),this.transform=[xt*Ye,Et*Ye,yt*Ye,Ct*Ye,kt-xt*Ye*gt-yt*Ye*At,vt-Et*Ye*gt-Ct*Ye*At],this.width=bt,this.height=It}get rawDims(){const{viewBox:Le}=this;return shadow(this,"rawDims",{pageWidth:Le[2]-Le[0],pageHeight:Le[3]-Le[1],pageX:Le[0],pageY:Le[1]})}clone({scale:Le=this.scale,rotation:Ye=this.rotation,offsetX:tt=this.offsetX,offsetY:nt=this.offsetY,dontFlip:ft=!1}={}){return new PageViewport({viewBox:this.viewBox.slice(),scale:Le,rotation:Ye,offsetX:tt,offsetY:nt,dontFlip:ft})}convertToViewportPoint(Le,Ye){return Util.applyTransform([Le,Ye],this.transform)}convertToViewportRectangle(Le){const Ye=Util.applyTransform([Le[0],Le[1]],this.transform),tt=Util.applyTransform([Le[2],Le[3]],this.transform);return[Ye[0],Ye[1],tt[0],tt[1]]}convertToPdfPoint(Le,Ye){return Util.applyInverseTransform([Le,Ye],this.transform)}}class RenderingCancelledException extends BaseException{constructor(Le,Ye=0){super(Le,"RenderingCancelledException"),this.extraDelay=Ye}}function isDataScheme(Be){const Le=Be.length;let Ye=0;for(;Ye<Le&&Be[Ye].trim()==="";)Ye++;return Be.substring(Ye,Ye+5).toLowerCase()==="data:"}function isPdfFile(Be){return typeof Be=="string"&&/\.pdf$/i.test(Be)}function getFilenameFromUrl$1(Be){return[Be]=Be.split(/[#?]/,1),Be.substring(Be.lastIndexOf("/")+1)}function getPdfFilenameFromUrl(Be,Le="document.pdf"){if(typeof Be!="string")return Le;if(isDataScheme(Be))return warn$1('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),Le;const Ye=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,tt=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,nt=Ye.exec(Be);let ft=tt.exec(nt[1])||tt.exec(nt[2])||tt.exec(nt[3]);if(ft&&(ft=ft[0],ft.includes("%")))try{ft=tt.exec(decodeURIComponent(ft))[0]}catch{}return ft||Le}class StatTimer{constructor(){Nn(this,"started",Object.create(null));Nn(this,"times",[])}time(Le){Le in this.started&&warn$1(`Timer is already running for ${Le}`),this.started[Le]=Date.now()}timeEnd(Le){Le in this.started||warn$1(`Timer has not been started for ${Le}`),this.times.push({name:Le,start:this.started[Le],end:Date.now()}),delete this.started[Le]}toString(){const Le=[];let Ye=0;for(const{name:tt}of this.times)Ye=Math.max(tt.length,Ye);for(const{name:tt,start:nt,end:ft}of this.times)Le.push(`${tt.padEnd(Ye)} ${ft-nt}ms
|
|
4038
|
+
`,getCircleText=(Be,Le)=>({uploading:Be("notifications.uploading"),success:Be("notifications.done"),error:Le}),Selfie$2=({onError:Be,onSuccess:Le,permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,token:gt,timeout:At,numberOfTries:xt,stream:Et,onlyCapture:yt,showCustomCameraPermissionScreen:Ct,isSecondId:kt,isRecordingEnabled:vt=!1,skipProcessFace:bt=!1,deviceId:It,maskCheckEnabled:wt=!1,eyesClosedCheckEnabled:Rt=!1,hatCheckEnabled:Tt=!1,lensesCheckEnabled:Bt=!1,isDeepsightEnabled:Dt=!1})=>{const Pt=gt==null?void 0:gt.token,Nt=React.useRef(null),Lt=React.useRef(!1),Wt=React.useRef(null),$t=React.useRef(null),[Kt,Vt]=React.useState({}),[Ut,_t]=React.useState(1),Xt=React.useRef({}),{isOnline:Qt}=useOnlineStatus({onOnline:()=>{u0(),isManualCaptureMode=!1,Xt.current.canvas&&l0(Xt.current.canvas,Xt.current.faceCoordinates)},onOffline:()=>{}}),{startRecording:jt,stopRecording:Gt,recordingStarted:qt,updateMediaStream:zt}=useMediaRecorder({token:Pt,type:"selfie"}),{startRecording:e0,stopRecording:s0}=useMediaRecorderLocally();React.useEffect(()=>{isManualCaptureMode=!1},[]),React.useEffect(()=>{Nt.current.streamUnlocked=Lt},[]),React.useEffect(()=>()=>{!Dt&&(Gt==null||Gt())},[Dt,Gt]);async function t0(q0){var en;if(Ut>=xt){await A0(q0);return}Dt&&await((en=Nt.current)==null?void 0:en.resetWebcam(!0)),_t(Ut+1),await Yt(q0),isManualCaptureMode||await u0()}const l0=throttle$2(async(q0,en)=>{var k0,S0,H0;Xt.current.canvas=q0,Xt.current.faceCoordinates=en;const w0=q0.getBase64Image();try{addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),clearTimeout(Y0.current),Jt(""),addEvent({code:"selfieCapture",token:Pt}),await onboardingAnalytics.analyzeFrame(w0),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const _0=selfieType,G0=await MlWasmJSApi$1.ens(w0),{blob:K0,url:un}=q0.getBlobData();if(yt)return Le({imageBase64:w0,blob:K0,encryptedImage:G0,url:un});addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),addEvent({token:Pt,code:"captureAttemptFinished",module:"SELFIE",payload:{logs:onboardingAnalytics.getPipelineLogs()}}),addDeviceStats(Pt,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const tn=await capture({token:Pt,image:G0,type:_0,encrypted:!0,faceCoordinates:en,metadata:onboardingAnalytics.getMetadata(),recordingId:$t.current}),cn=selfieChecks(tn,{hatCheckEnabled:Tt,lensesCheckEnabled:Bt,maskCheckEnabled:wt,eyesClosedCheckEnabled:Rt});if(cn.hasErrors){addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),r0("error"),logSelfieChecks(tn,cn,ht,Jt,n0,i0,!1),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Vt({response:tn,livenessPassed:cn.livenessPassed,imageBase64:w0}),J0&&(Lt.current=!1,isManualCaptureMode=!0);return}Jt(n0("notifications.processing"));const{faceMatch:yn,existingUser:Bn,...er}=await o0();return addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),ht(getLogObject("successCapture",{response:tn,message:"Selfie uploaded successfully"})),Jt(n0("notifications.success")),await sleep(3500),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Le({...tn,...er,faceMatch:yn,existingUser:Bn,liveness:cn.livenessPassed,imageBase64:w0})}catch(_0){((S0=(k0=_0==null?void 0:_0.response)==null?void 0:k0.data)==null?void 0:S0.error)==="Maximum capture attempts reached"&&_t(xt),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Pt,shouldOpen:!0,payload:{moduleVersion:"1"}}),f0(_0.response?_0.response.data:n0("notifications.serverError")),r0("error"),await sleep(3e3),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Pt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Vt({response:(H0=_0==null?void 0:_0.response)==null?void 0:H0.data,livenessPassed:null,imageBase64:w0}),J0&&(Lt.current=!1,isManualCaptureMode=!0)}},300),d0=async()=>{if(!Dt)return;const q0=await s0(Pt);$t.current=q0},{t:n0}=useTranslation$1(),g0=(q0,en,w0,k0)=>{updateSession$1({token:Pt,key:"manualSelfieCheckNeeded",value:!0});const S0=getLogObject("skip",{existingUser:q0,liveness:en,imageBase64:w0,faceMatch:k0});ht(S0),Be(S0)};async function A0({response:q0,livenessPassed:en,imageBase64:w0}){addEvent({code:"noAttempts",token:Pt}),ht(getLogObject("noAttemps",{response:q0,message:"No attempt left"}));const{faceMatch:k0,existingUser:S0}=await o0();return g0(S0,en,w0,k0)}async function o0(){if(bt)return{faceMatch:!1};const q0=await processFace({token:Pt});kt&&await processFaceSecondId({token:Pt});const en=q0.confidence===1,w0=q0.existingUser;return{faceMatch:en,existingUser:w0,...q0}}const{setMode:r0,resetLoading:Yt,notificationMessage:Mt,setNotificationMessage:Jt,notificationDescription:a0,setNotificationDescription:i0,handleError:f0,startAutoDetect:u0,handleManualCapture:x0,isSuccess:p0,isError:D0,isLoading:P0,isUploading:z0,shouldShowManualCapture:J0,selfieTimeoutRef:Y0,hideCamera:X0}=useSelfie({timeout:At,onLog:ht,handleCapture:l0,handleNoAttemptsLeft:A0,numberOfTries:xt,webcam:Nt,isDetecting:Lt,hatCheckEnabled:Tt,lensesCheckEnabled:Bt,maskCheckEnabled:wt,eyesClosedCheckEnabled:Rt,handleStopRecordingLocally:d0,onSwitchManualCapture:()=>{Jt(""),addEvent({code:"switchToManualCaptureSelfie",token:Pt})},onManualCaptureSelfie:()=>{addEvent({code:"manualCaptureSelfie",token:Pt})}}),T0=async q0=>{Wt.current=q0,Dt?e0(q0):vt&&(qt?await zt(q0):await jt(q0))},L0=P0||D0||p0,j0=xt-Ut;if(!Qt)return jsxRuntimeExports.jsx(NoInternetError,{});const Q0=()=>j0>0;return jsxRuntimeExports.jsxs(Container$f,{className:"IncodeCaptureDesktopSelfieContainer",children:[jsxRuntimeExports.jsx(SrOnlyHeading,{className:"IncodeCaptureDesktopSelfieHeading",children:n0("selfie.title")}),jsxRuntimeExports.jsxs(SelfieContainer,{className:"IncodeCaptureDesktopSelfieSelfieContainer",children:[jsxRuntimeExports.jsxs(FaceMask$2,{className:"IncodeCaptureDesktopSelfieFaceMask",isCapturing:p0,isLoading:z0,error:D0,isUploading:L0,desktop:!0,children:[z0&&jsxRuntimeExports.jsx(BordersContainer,{className:cx("IncodeCaptureSelfieBordersContainer"),children:jsxRuntimeExports.jsx(LoadingBorders,{className:"IncodeCaptureSelfieLoadingBordersContainer",mode:"uploading"})}),jsxRuntimeExports.jsx(FaceFrame$1,{src:faceFrame$1,alt:"face frame",className:cx("IncodeCaptureDesktopSelfieFaceFrame",{hidden:X0})})]}),jsxRuntimeExports.jsx(Webcam,{className:cx("IncodeCaptureDesktopSelfieWebcam",{error:D0,hidden:X0}),ref:Nt,onPlay:()=>{},videoSource:"user",isSelfie:!0,type:"desktopSelfie",permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,stream:Et,onError:Be,token:Pt,onStreamReady:T0,showCustomCameraPermissionScreen:Ct,deviceId:It,isDeepsightEnabled:Dt}),X0&&z0&&jsxRuntimeExports.jsx(CameraOvalInnerText,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeCaptureSelfieCameraOvalInnerText",{isError:D0}),children:getCircleText(n0,Mt).uploading}),Mt&&!z0&&!D0&&jsxRuntimeExports.jsx(Notification$3,{isLoading:P0,isError:D0,className:"desktop IncodeCaptureDesktopSelfieNotification",children:Mt}),D0&&Q0()?jsxRuntimeExports.jsxs(BlockingErrors,{children:[jsxRuntimeExports.jsx("img",{src:warningIcon$1,alt:"Warning icon",width:"32"}),jsxRuntimeExports.jsx(ErrorTitle$1,{className:"IncodeCaptureDesktopSelfieErrorTitle",children:Mt}),jsxRuntimeExports.jsx(ErrorDescription$1,{className:"IncodeCaptureDesktopSelfieErrorDescription",children:a0})]}):D0&&j0===0&&jsxRuntimeExports.jsxs(BlockingErrors,{children:[jsxRuntimeExports.jsx("img",{src:warningIcon$1,alt:"Warning icon",width:"32"}),jsxRuntimeExports.jsx(ErrorTitle$1,{className:"IncodeCaptureDesktopSelfieErrorTitle",children:n0("notifications.selfieCaptureFailed")}),jsxRuntimeExports.jsx(ErrorDescription$1,{className:"IncodeCaptureDesktopSelfieErrorDescription",children:n0("notifications.selfieCaptureFailedDescription")})]}),D0&&jsxRuntimeExports.jsxs(RetryButtonsContainer,{className:"IncodeCaptureDesktopSelfieCaptureRetryButtonsContainer",isDesktop:!0,children:[jsxRuntimeExports.jsx(Button$c,{onClick:async()=>{await t0(Kt)},theme:exports.theme,children:Q0()?n0("common.tryAgain"):n0("common.continue")}),Q0()&&jsxRuntimeExports.jsxs("div",{children:[j0," ",n0("notifications.attemptsRemaining")]})]}),J0&&jsxRuntimeExports.jsx(CaptureButtonContainer,{className:"IncodeCaptureDesktopSelfieCaptureButtonContainer",initial:{scale:0},animate:{scale:1},children:jsxRuntimeExports.jsx("button",{onClick:x0,type:"button",children:jsxRuntimeExports.jsx("img",{src:CaptureButton,alt:"capture button"})})})]}),jsxRuntimeExports.jsx("canvas",{id:"canvasFrame",hidden:!0})]})};function CaptureAndTutorial$3(Be){const[Le,Ye]=useDeviceId(),[tt,nt]=React.useState(!1),{currentStep:ft,nextStep:ht}=useSteps(),{showTutorial:gt,token:At}=Be;function xt(Et){Et!=="error"&&Ye(Et),nt(!0)}return tt?jsxRuntimeExports.jsxs(Steps,{currentStep:ft,children:[gt&&jsxRuntimeExports.jsx(TutorialSelfie,{className:"IncodeCaptureDesktopSelfieTutorial",...Be,onSuccess:ht}),jsxRuntimeExports.jsx(Selfie$2,{deviceId:Le,...Be})]}):jsxRuntimeExports.jsx(ChooseCamera,{onCameraChosen:xt,token:At==null?void 0:At.token})}const CaptureDesktopSelfie=preloadScript$3(CaptureAndTutorial$3);function Selfie$1(Be){return jsxRuntimeExports.jsx(CaptureSelfie$1,{...Be})}async function handleMotionPermissions$1(){const Be=sessionStorage.getItem("cameraPermissionsGranted")==="true",Le=sessionStorage.getItem("motionSensorsPermissionsRequested")==="true";Be&&!Le&&await onboardingAnalytics.startOnboardingCheck()}function CaptureAndTutorial$2(Be){const{currentStep:Le,nextStep:Ye}=useSteps();return jsxRuntimeExports.jsxs(Steps,{currentStep:Le,children:[Be.showTutorial&&isWebRtcSupported()&&jsxRuntimeExports.jsx(TutorialSelfie,{...Be,onSuccess:async()=>{Be.isDeepsightEnabled&&await handleMotionPermissions$1(),Ye()}}),jsxRuntimeExports.jsx(Selfie$1,{...Be})]})}const TutorialBackHeader=()=>{const{t:Be}=useTranslation$1(),Le=React.useRef();return useAutoFocus(Le),jsxRuntimeExports.jsx("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderBack",children:jsxRuntimeExports.jsx("h1",{className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleBack",tabIndex:-1,"aria-label":Be("tutorial.back.titleLabel"),ref:Le,children:Be("tutorial.back.title")})})};function TutorialBack({onSuccess:Be,token:Le,...Ye}){const tt=()=>mobile.isDesktop()?"https://sdk.incode.com/sdk/tutorials/tutorial-back-desktop.mp4":options.darkMode?"https://sdk.incode.com/sdk/tutorials/back-dark.mp4":"https://sdk.incode.com/sdk/tutorials/back.gif";React.useEffect(()=>{Le!=null&&Le.token&&(addEvent({token:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"Back ID capture tutorial"}),addEvent({token:Le.token,code:"tutorialBackId",payload:{tutorialBackID:!0}}))},[Le]);function nt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"Back ID capture tutorial"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{...Ye,token:Le,src:tt(),next:nt,header:jsxRuntimeExports.jsx(TutorialBackHeader,{}),type:"Back"})}const TutorialCreditCardBackHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.creditCardBack")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.creditCardBack2")})]})};function TutorialCreditCardBack({onSuccess:Be,token:Le,src:Ye="https://sdk.incode.com/sdk/tutorials/card%20back.svg",...tt}){const{t:nt}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialCreditCardBack",payload:{tutorialCreditCardBack:!0}})},[Le.token]);function ft(){addEvent({token:Le==null?void 0:Le.token,code:"continue"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{creditCard:!0,...tt,src:Ye,header:jsxRuntimeExports.jsx(TutorialCreditCardBackHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ft,children:nt("common.continue")})})})}const TutorialCreditCardFrontHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.creditCardFront")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.creditCardFront2")})]})};function TutorialCreditCardFront({onSuccess:Be,token:Le,src:Ye="https://sdk.incode.com/sdk/tutorials/card%20front.svg",...tt}){const{t:nt}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialCreditCard",payload:{tutorialCreditCard:!0}})},[Le.token]);function ft(){addEvent({token:Le==null?void 0:Le.token,code:"continue"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{creditCard:!0,...tt,src:Ye,header:jsxRuntimeExports.jsx(TutorialCreditCardFrontHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ft,children:nt("common.continue")})})})}function isObject$3(Be){return Be!==null&&typeof Be=="object"&&"constructor"in Be&&Be.constructor===Object}function extend$4(Be={},Le={}){Object.keys(Le).forEach(Ye=>{typeof Be[Ye]>"u"?Be[Ye]=Le[Ye]:isObject$3(Le[Ye])&&isObject$3(Be[Ye])&&Object.keys(Le[Ye]).length>0&&extend$4(Be[Ye],Le[Ye])})}const ssrDocument={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function getDocument$1(){const Be=typeof document<"u"?document:{};return extend$4(Be,ssrDocument),Be}const ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(Be){return typeof setTimeout>"u"?(Be(),null):setTimeout(Be,0)},cancelAnimationFrame(Be){typeof setTimeout>"u"||clearTimeout(Be)}};function getWindow(){const Be=typeof window<"u"?window:{};return extend$4(Be,ssrWindow),Be}function deleteProps(Be){const Le=Be;Object.keys(Le).forEach(Ye=>{try{Le[Ye]=null}catch{}try{delete Le[Ye]}catch{}})}function nextTick(Be,Le=0){return setTimeout(Be,Le)}function now(){return Date.now()}function getComputedStyle$1(Be){const Le=getWindow();let Ye;return Le.getComputedStyle&&(Ye=Le.getComputedStyle(Be,null)),!Ye&&Be.currentStyle&&(Ye=Be.currentStyle),Ye||(Ye=Be.style),Ye}function getTranslate(Be,Le="x"){const Ye=getWindow();let tt,nt,ft;const ht=getComputedStyle$1(Be);return Ye.WebKitCSSMatrix?(nt=ht.transform||ht.webkitTransform,nt.split(",").length>6&&(nt=nt.split(", ").map(gt=>gt.replace(",",".")).join(", ")),ft=new Ye.WebKitCSSMatrix(nt==="none"?"":nt)):(ft=ht.MozTransform||ht.OTransform||ht.MsTransform||ht.msTransform||ht.transform||ht.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),tt=ft.toString().split(",")),Le==="x"&&(Ye.WebKitCSSMatrix?nt=ft.m41:tt.length===16?nt=parseFloat(tt[12]):nt=parseFloat(tt[4])),Le==="y"&&(Ye.WebKitCSSMatrix?nt=ft.m42:tt.length===16?nt=parseFloat(tt[13]):nt=parseFloat(tt[5])),nt||0}function isObject$2(Be){return typeof Be=="object"&&Be!==null&&Be.constructor&&Object.prototype.toString.call(Be).slice(8,-1)==="Object"}function isNode(Be){return typeof window<"u"&&typeof window.HTMLElement<"u"?Be instanceof HTMLElement:Be&&(Be.nodeType===1||Be.nodeType===11)}function extend$3(...Be){const Le=Object(Be[0]),Ye=["__proto__","constructor","prototype"];for(let tt=1;tt<Be.length;tt+=1){const nt=Be[tt];if(nt!=null&&!isNode(nt)){const ft=Object.keys(Object(nt)).filter(ht=>Ye.indexOf(ht)<0);for(let ht=0,gt=ft.length;ht<gt;ht+=1){const At=ft[ht],xt=Object.getOwnPropertyDescriptor(nt,At);xt!==void 0&&xt.enumerable&&(isObject$2(Le[At])&&isObject$2(nt[At])?nt[At].__swiper__?Le[At]=nt[At]:extend$3(Le[At],nt[At]):!isObject$2(Le[At])&&isObject$2(nt[At])?(Le[At]={},nt[At].__swiper__?Le[At]=nt[At]:extend$3(Le[At],nt[At])):Le[At]=nt[At])}}}return Le}function setCSSProperty(Be,Le,Ye){Be.style.setProperty(Le,Ye)}function animateCSSModeScroll({swiper:Be,targetPosition:Le,side:Ye}){const tt=getWindow(),nt=-Be.translate;let ft=null,ht;const gt=Be.params.speed;Be.wrapperEl.style.scrollSnapType="none",tt.cancelAnimationFrame(Be.cssModeFrameID);const At=Le>nt?"next":"prev",xt=(yt,Ct)=>At==="next"&&yt>=Ct||At==="prev"&&yt<=Ct,Et=()=>{ht=new Date().getTime(),ft===null&&(ft=ht);const yt=Math.max(Math.min((ht-ft)/gt,1),0),Ct=.5-Math.cos(yt*Math.PI)/2;let kt=nt+Ct*(Le-nt);if(xt(kt,Le)&&(kt=Le),Be.wrapperEl.scrollTo({[Ye]:kt}),xt(kt,Le)){Be.wrapperEl.style.overflow="hidden",Be.wrapperEl.style.scrollSnapType="",setTimeout(()=>{Be.wrapperEl.style.overflow="",Be.wrapperEl.scrollTo({[Ye]:kt})}),tt.cancelAnimationFrame(Be.cssModeFrameID);return}Be.cssModeFrameID=tt.requestAnimationFrame(Et)};Et()}function elementChildren(Be,Le=""){return[...Be.children].filter(Ye=>Ye.matches(Le))}function createElement(Be,Le=[]){const Ye=document.createElement(Be);return Ye.classList.add(...Array.isArray(Le)?Le:[Le]),Ye}function elementPrevAll(Be,Le){const Ye=[];for(;Be.previousElementSibling;){const tt=Be.previousElementSibling;Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),Be=tt}return Ye}function elementNextAll(Be,Le){const Ye=[];for(;Be.nextElementSibling;){const tt=Be.nextElementSibling;Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),Be=tt}return Ye}function elementStyle(Be,Le){return getWindow().getComputedStyle(Be,null).getPropertyValue(Le)}function elementIndex(Be){let Le=Be,Ye;if(Le){for(Ye=0;(Le=Le.previousSibling)!==null;)Le.nodeType===1&&(Ye+=1);return Ye}}function elementParents(Be,Le){const Ye=[];let tt=Be.parentElement;for(;tt;)Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),tt=tt.parentElement;return Ye}function elementOuterSize(Be,Le,Ye){const tt=getWindow();return Be[Le==="width"?"offsetWidth":"offsetHeight"]+parseFloat(tt.getComputedStyle(Be,null).getPropertyValue(Le==="width"?"margin-right":"margin-top"))+parseFloat(tt.getComputedStyle(Be,null).getPropertyValue(Le==="width"?"margin-left":"margin-bottom"))}let support;function calcSupport(){const Be=getWindow(),Le=getDocument$1();return{smoothScroll:Le.documentElement&&Le.documentElement.style&&"scrollBehavior"in Le.documentElement.style,touch:!!("ontouchstart"in Be||Be.DocumentTouch&&Le instanceof Be.DocumentTouch)}}function getSupport(){return support||(support=calcSupport()),support}let deviceCached;function calcDevice({userAgent:Be}={}){const Le=getSupport(),Ye=getWindow(),tt=Ye.navigator.platform,nt=Be||Ye.navigator.userAgent,ft={ios:!1,android:!1},ht=Ye.screen.width,gt=Ye.screen.height,At=nt.match(/(Android);?[\s\/]+([\d.]+)?/);let xt=nt.match(/(iPad).*OS\s([\d_]+)/);const Et=nt.match(/(iPod)(.*OS\s([\d_]+))?/),yt=!xt&&nt.match(/(iPhone\sOS|iOS)\s([\d_]+)/),Ct=tt==="Win32";let kt=tt==="MacIntel";const vt=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!xt&&kt&&Le.touch&&vt.indexOf(`${ht}x${gt}`)>=0&&(xt=nt.match(/(Version)\/([\d.]+)/),xt||(xt=[0,1,"13_0_0"]),kt=!1),At&&!Ct&&(ft.os="android",ft.android=!0),(xt||yt||Et)&&(ft.os="ios",ft.ios=!0),ft}function getDevice(Be={}){return deviceCached||(deviceCached=calcDevice(Be)),deviceCached}let browser;function calcBrowser(){const Be=getWindow();let Le=!1;function Ye(){const tt=Be.navigator.userAgent.toLowerCase();return tt.indexOf("safari")>=0&&tt.indexOf("chrome")<0&&tt.indexOf("android")<0}if(Ye()){const tt=String(Be.navigator.userAgent);if(tt.includes("Version/")){const[nt,ft]=tt.split("Version/")[1].split(" ")[0].split(".").map(ht=>Number(ht));Le=nt<16||nt===16&&ft<2}}return{isSafari:Le||Ye(),needPerspectiveFix:Le,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(Be.navigator.userAgent)}}function getBrowser(){return browser||(browser=calcBrowser()),browser}function Resize({swiper:Be,on:Le,emit:Ye}){const tt=getWindow();let nt=null,ft=null;const ht=()=>{!Be||Be.destroyed||!Be.initialized||(Ye("beforeResize"),Ye("resize"))},gt=()=>{!Be||Be.destroyed||!Be.initialized||(nt=new ResizeObserver(Et=>{ft=tt.requestAnimationFrame(()=>{const{width:yt,height:Ct}=Be;let kt=yt,vt=Ct;Et.forEach(({contentBoxSize:bt,contentRect:It,target:wt})=>{wt&&wt!==Be.el||(kt=It?It.width:(bt[0]||bt).inlineSize,vt=It?It.height:(bt[0]||bt).blockSize)}),(kt!==yt||vt!==Ct)&&ht()})}),nt.observe(Be.el))},At=()=>{ft&&tt.cancelAnimationFrame(ft),nt&&nt.unobserve&&Be.el&&(nt.unobserve(Be.el),nt=null)},xt=()=>{!Be||Be.destroyed||!Be.initialized||Ye("orientationchange")};Le("init",()=>{if(Be.params.resizeObserver&&typeof tt.ResizeObserver<"u"){gt();return}tt.addEventListener("resize",ht),tt.addEventListener("orientationchange",xt)}),Le("destroy",()=>{At(),tt.removeEventListener("resize",ht),tt.removeEventListener("orientationchange",xt)})}function Observer({swiper:Be,extendParams:Le,on:Ye,emit:tt}){const nt=[],ft=getWindow(),ht=(xt,Et={})=>{const yt=ft.MutationObserver||ft.WebkitMutationObserver,Ct=new yt(kt=>{if(Be.__preventObserver__)return;if(kt.length===1){tt("observerUpdate",kt[0]);return}const vt=function(){tt("observerUpdate",kt[0])};ft.requestAnimationFrame?ft.requestAnimationFrame(vt):ft.setTimeout(vt,0)});Ct.observe(xt,{attributes:typeof Et.attributes>"u"?!0:Et.attributes,childList:typeof Et.childList>"u"?!0:Et.childList,characterData:typeof Et.characterData>"u"?!0:Et.characterData}),nt.push(Ct)},gt=()=>{if(Be.params.observer){if(Be.params.observeParents){const xt=elementParents(Be.el);for(let Et=0;Et<xt.length;Et+=1)ht(xt[Et])}ht(Be.el,{childList:Be.params.observeSlideChildren}),ht(Be.wrapperEl,{attributes:!1})}},At=()=>{nt.forEach(xt=>{xt.disconnect()}),nt.splice(0,nt.length)};Le({observer:!1,observeParents:!1,observeSlideChildren:!1}),Ye("init",gt),Ye("destroy",At)}const eventsEmitter={on(Be,Le,Ye){const tt=this;if(!tt.eventsListeners||tt.destroyed||typeof Le!="function")return tt;const nt=Ye?"unshift":"push";return Be.split(" ").forEach(ft=>{tt.eventsListeners[ft]||(tt.eventsListeners[ft]=[]),tt.eventsListeners[ft][nt](Le)}),tt},once(Be,Le,Ye){const tt=this;if(!tt.eventsListeners||tt.destroyed||typeof Le!="function")return tt;function nt(...ft){tt.off(Be,nt),nt.__emitterProxy&&delete nt.__emitterProxy,Le.apply(tt,ft)}return nt.__emitterProxy=Le,tt.on(Be,nt,Ye)},onAny(Be,Le){const Ye=this;if(!Ye.eventsListeners||Ye.destroyed||typeof Be!="function")return Ye;const tt=Le?"unshift":"push";return Ye.eventsAnyListeners.indexOf(Be)<0&&Ye.eventsAnyListeners[tt](Be),Ye},offAny(Be){const Le=this;if(!Le.eventsListeners||Le.destroyed||!Le.eventsAnyListeners)return Le;const Ye=Le.eventsAnyListeners.indexOf(Be);return Ye>=0&&Le.eventsAnyListeners.splice(Ye,1),Le},off(Be,Le){const Ye=this;return!Ye.eventsListeners||Ye.destroyed||!Ye.eventsListeners||Be.split(" ").forEach(tt=>{typeof Le>"u"?Ye.eventsListeners[tt]=[]:Ye.eventsListeners[tt]&&Ye.eventsListeners[tt].forEach((nt,ft)=>{(nt===Le||nt.__emitterProxy&&nt.__emitterProxy===Le)&&Ye.eventsListeners[tt].splice(ft,1)})}),Ye},emit(...Be){const Le=this;if(!Le.eventsListeners||Le.destroyed||!Le.eventsListeners)return Le;let Ye,tt,nt;return typeof Be[0]=="string"||Array.isArray(Be[0])?(Ye=Be[0],tt=Be.slice(1,Be.length),nt=Le):(Ye=Be[0].events,tt=Be[0].data,nt=Be[0].context||Le),tt.unshift(nt),(Array.isArray(Ye)?Ye:Ye.split(" ")).forEach(ht=>{Le.eventsAnyListeners&&Le.eventsAnyListeners.length&&Le.eventsAnyListeners.forEach(gt=>{gt.apply(nt,[ht,...tt])}),Le.eventsListeners&&Le.eventsListeners[ht]&&Le.eventsListeners[ht].forEach(gt=>{gt.apply(nt,tt)})}),Le}};function updateSize(){const Be=this;let Le,Ye;const tt=Be.el;typeof Be.params.width<"u"&&Be.params.width!==null?Le=Be.params.width:Le=tt.clientWidth,typeof Be.params.height<"u"&&Be.params.height!==null?Ye=Be.params.height:Ye=tt.clientHeight,!(Le===0&&Be.isHorizontal()||Ye===0&&Be.isVertical())&&(Le=Le-parseInt(elementStyle(tt,"padding-left")||0,10)-parseInt(elementStyle(tt,"padding-right")||0,10),Ye=Ye-parseInt(elementStyle(tt,"padding-top")||0,10)-parseInt(elementStyle(tt,"padding-bottom")||0,10),Number.isNaN(Le)&&(Le=0),Number.isNaN(Ye)&&(Ye=0),Object.assign(Be,{width:Le,height:Ye,size:Be.isHorizontal()?Le:Ye}))}function updateSlides(){const Be=this;function Le(Kt){return Be.isHorizontal()?Kt:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[Kt]}function Ye(Kt,Vt){return parseFloat(Kt.getPropertyValue(Le(Vt))||0)}const tt=Be.params,{wrapperEl:nt,slidesEl:ft,size:ht,rtlTranslate:gt,wrongRTL:At}=Be,xt=Be.virtual&&tt.virtual.enabled,Et=xt?Be.virtual.slides.length:Be.slides.length,yt=elementChildren(ft,`.${Be.params.slideClass}, swiper-slide`),Ct=xt?Be.virtual.slides.length:yt.length;let kt=[];const vt=[],bt=[];let It=tt.slidesOffsetBefore;typeof It=="function"&&(It=tt.slidesOffsetBefore.call(Be));let wt=tt.slidesOffsetAfter;typeof wt=="function"&&(wt=tt.slidesOffsetAfter.call(Be));const Rt=Be.snapGrid.length,Tt=Be.slidesGrid.length;let Bt=tt.spaceBetween,Dt=-It,Pt=0,Nt=0;if(typeof ht>"u")return;typeof Bt=="string"&&Bt.indexOf("%")>=0?Bt=parseFloat(Bt.replace("%",""))/100*ht:typeof Bt=="string"&&(Bt=parseFloat(Bt)),Be.virtualSize=-Bt,yt.forEach(Kt=>{gt?Kt.style.marginLeft="":Kt.style.marginRight="",Kt.style.marginBottom="",Kt.style.marginTop=""}),tt.centeredSlides&&tt.cssMode&&(setCSSProperty(nt,"--swiper-centered-offset-before",""),setCSSProperty(nt,"--swiper-centered-offset-after",""));const Lt=tt.grid&&tt.grid.rows>1&&Be.grid;Lt&&Be.grid.initSlides(Ct);let Wt;const $t=tt.slidesPerView==="auto"&&tt.breakpoints&&Object.keys(tt.breakpoints).filter(Kt=>typeof tt.breakpoints[Kt].slidesPerView<"u").length>0;for(let Kt=0;Kt<Ct;Kt+=1){Wt=0;let Vt;if(yt[Kt]&&(Vt=yt[Kt]),Lt&&Be.grid.updateSlide(Kt,Vt,Ct,Le),!(yt[Kt]&&elementStyle(Vt,"display")==="none")){if(tt.slidesPerView==="auto"){$t&&(yt[Kt].style[Le("width")]="");const Ut=getComputedStyle(Vt),_t=Vt.style.transform,Xt=Vt.style.webkitTransform;if(_t&&(Vt.style.transform="none"),Xt&&(Vt.style.webkitTransform="none"),tt.roundLengths)Wt=Be.isHorizontal()?elementOuterSize(Vt,"width"):elementOuterSize(Vt,"height");else{const Qt=Ye(Ut,"width"),jt=Ye(Ut,"padding-left"),Gt=Ye(Ut,"padding-right"),qt=Ye(Ut,"margin-left"),zt=Ye(Ut,"margin-right"),e0=Ut.getPropertyValue("box-sizing");if(e0&&e0==="border-box")Wt=Qt+qt+zt;else{const{clientWidth:s0,offsetWidth:t0}=Vt;Wt=Qt+jt+Gt+qt+zt+(t0-s0)}}_t&&(Vt.style.transform=_t),Xt&&(Vt.style.webkitTransform=Xt),tt.roundLengths&&(Wt=Math.floor(Wt))}else Wt=(ht-(tt.slidesPerView-1)*Bt)/tt.slidesPerView,tt.roundLengths&&(Wt=Math.floor(Wt)),yt[Kt]&&(yt[Kt].style[Le("width")]=`${Wt}px`);yt[Kt]&&(yt[Kt].swiperSlideSize=Wt),bt.push(Wt),tt.centeredSlides?(Dt=Dt+Wt/2+Pt/2+Bt,Pt===0&&Kt!==0&&(Dt=Dt-ht/2-Bt),Kt===0&&(Dt=Dt-ht/2-Bt),Math.abs(Dt)<1/1e3&&(Dt=0),tt.roundLengths&&(Dt=Math.floor(Dt)),Nt%tt.slidesPerGroup===0&&kt.push(Dt),vt.push(Dt)):(tt.roundLengths&&(Dt=Math.floor(Dt)),(Nt-Math.min(Be.params.slidesPerGroupSkip,Nt))%Be.params.slidesPerGroup===0&&kt.push(Dt),vt.push(Dt),Dt=Dt+Wt+Bt),Be.virtualSize+=Wt+Bt,Pt=Wt,Nt+=1}}if(Be.virtualSize=Math.max(Be.virtualSize,ht)+wt,gt&&At&&(tt.effect==="slide"||tt.effect==="coverflow")&&(nt.style.width=`${Be.virtualSize+Bt}px`),tt.setWrapperSize&&(nt.style[Le("width")]=`${Be.virtualSize+Bt}px`),Lt&&Be.grid.updateWrapperSize(Wt,kt,Le),!tt.centeredSlides){const Kt=[];for(let Vt=0;Vt<kt.length;Vt+=1){let Ut=kt[Vt];tt.roundLengths&&(Ut=Math.floor(Ut)),kt[Vt]<=Be.virtualSize-ht&&Kt.push(Ut)}kt=Kt,Math.floor(Be.virtualSize-ht)-Math.floor(kt[kt.length-1])>1&&kt.push(Be.virtualSize-ht)}if(xt&&tt.loop){const Kt=bt[0]+Bt;if(tt.slidesPerGroup>1){const Vt=Math.ceil((Be.virtual.slidesBefore+Be.virtual.slidesAfter)/tt.slidesPerGroup),Ut=Kt*tt.slidesPerGroup;for(let _t=0;_t<Vt;_t+=1)kt.push(kt[kt.length-1]+Ut)}for(let Vt=0;Vt<Be.virtual.slidesBefore+Be.virtual.slidesAfter;Vt+=1)tt.slidesPerGroup===1&&kt.push(kt[kt.length-1]+Kt),vt.push(vt[vt.length-1]+Kt),Be.virtualSize+=Kt}if(kt.length===0&&(kt=[0]),Bt!==0){const Kt=Be.isHorizontal()&>?"marginLeft":Le("marginRight");yt.filter((Vt,Ut)=>!tt.cssMode||tt.loop?!0:Ut!==yt.length-1).forEach(Vt=>{Vt.style[Kt]=`${Bt}px`})}if(tt.centeredSlides&&tt.centeredSlidesBounds){let Kt=0;bt.forEach(Ut=>{Kt+=Ut+(Bt||0)}),Kt-=Bt;const Vt=Kt-ht;kt=kt.map(Ut=>Ut<=0?-It:Ut>Vt?Vt+wt:Ut)}if(tt.centerInsufficientSlides){let Kt=0;if(bt.forEach(Vt=>{Kt+=Vt+(Bt||0)}),Kt-=Bt,Kt<ht){const Vt=(ht-Kt)/2;kt.forEach((Ut,_t)=>{kt[_t]=Ut-Vt}),vt.forEach((Ut,_t)=>{vt[_t]=Ut+Vt})}}if(Object.assign(Be,{slides:yt,snapGrid:kt,slidesGrid:vt,slidesSizesGrid:bt}),tt.centeredSlides&&tt.cssMode&&!tt.centeredSlidesBounds){setCSSProperty(nt,"--swiper-centered-offset-before",`${-kt[0]}px`),setCSSProperty(nt,"--swiper-centered-offset-after",`${Be.size/2-bt[bt.length-1]/2}px`);const Kt=-Be.snapGrid[0],Vt=-Be.slidesGrid[0];Be.snapGrid=Be.snapGrid.map(Ut=>Ut+Kt),Be.slidesGrid=Be.slidesGrid.map(Ut=>Ut+Vt)}if(Ct!==Et&&Be.emit("slidesLengthChange"),kt.length!==Rt&&(Be.params.watchOverflow&&Be.checkOverflow(),Be.emit("snapGridLengthChange")),vt.length!==Tt&&Be.emit("slidesGridLengthChange"),tt.watchSlidesProgress&&Be.updateSlidesOffset(),!xt&&!tt.cssMode&&(tt.effect==="slide"||tt.effect==="fade")){const Kt=`${tt.containerModifierClass}backface-hidden`,Vt=Be.el.classList.contains(Kt);Ct<=tt.maxBackfaceHiddenSlides?Vt||Be.el.classList.add(Kt):Vt&&Be.el.classList.remove(Kt)}}function updateAutoHeight(Be){const Le=this,Ye=[],tt=Le.virtual&&Le.params.virtual.enabled;let nt=0,ft;typeof Be=="number"?Le.setTransition(Be):Be===!0&&Le.setTransition(Le.params.speed);const ht=gt=>tt?Le.slides[Le.getSlideIndexByData(gt)]:Le.slides[gt];if(Le.params.slidesPerView!=="auto"&&Le.params.slidesPerView>1)if(Le.params.centeredSlides)(Le.visibleSlides||[]).forEach(gt=>{Ye.push(gt)});else for(ft=0;ft<Math.ceil(Le.params.slidesPerView);ft+=1){const gt=Le.activeIndex+ft;if(gt>Le.slides.length&&!tt)break;Ye.push(ht(gt))}else Ye.push(ht(Le.activeIndex));for(ft=0;ft<Ye.length;ft+=1)if(typeof Ye[ft]<"u"){const gt=Ye[ft].offsetHeight;nt=gt>nt?gt:nt}(nt||nt===0)&&(Le.wrapperEl.style.height=`${nt}px`)}function updateSlidesOffset(){const Be=this,Le=Be.slides,Ye=Be.isElement?Be.isHorizontal()?Be.wrapperEl.offsetLeft:Be.wrapperEl.offsetTop:0;for(let tt=0;tt<Le.length;tt+=1)Le[tt].swiperSlideOffset=(Be.isHorizontal()?Le[tt].offsetLeft:Le[tt].offsetTop)-Ye-Be.cssOverflowAdjustment()}function updateSlidesProgress(Be=this&&this.translate||0){const Le=this,Ye=Le.params,{slides:tt,rtlTranslate:nt,snapGrid:ft}=Le;if(tt.length===0)return;typeof tt[0].swiperSlideOffset>"u"&&Le.updateSlidesOffset();let ht=-Be;nt&&(ht=Be),tt.forEach(At=>{At.classList.remove(Ye.slideVisibleClass)}),Le.visibleSlidesIndexes=[],Le.visibleSlides=[];let gt=Ye.spaceBetween;typeof gt=="string"&>.indexOf("%")>=0?gt=parseFloat(gt.replace("%",""))/100*Le.size:typeof gt=="string"&&(gt=parseFloat(gt));for(let At=0;At<tt.length;At+=1){const xt=tt[At];let Et=xt.swiperSlideOffset;Ye.cssMode&&Ye.centeredSlides&&(Et-=tt[0].swiperSlideOffset);const yt=(ht+(Ye.centeredSlides?Le.minTranslate():0)-Et)/(xt.swiperSlideSize+gt),Ct=(ht-ft[0]+(Ye.centeredSlides?Le.minTranslate():0)-Et)/(xt.swiperSlideSize+gt),kt=-(ht-Et),vt=kt+Le.slidesSizesGrid[At];(kt>=0&&kt<Le.size-1||vt>1&&vt<=Le.size||kt<=0&&vt>=Le.size)&&(Le.visibleSlides.push(xt),Le.visibleSlidesIndexes.push(At),tt[At].classList.add(Ye.slideVisibleClass)),xt.progress=nt?-yt:yt,xt.originalProgress=nt?-Ct:Ct}}function updateProgress(Be){const Le=this;if(typeof Be>"u"){const Et=Le.rtlTranslate?-1:1;Be=Le&&Le.translate&&Le.translate*Et||0}const Ye=Le.params,tt=Le.maxTranslate()-Le.minTranslate();let{progress:nt,isBeginning:ft,isEnd:ht,progressLoop:gt}=Le;const At=ft,xt=ht;if(tt===0)nt=0,ft=!0,ht=!0;else{nt=(Be-Le.minTranslate())/tt;const Et=Math.abs(Be-Le.minTranslate())<1,yt=Math.abs(Be-Le.maxTranslate())<1;ft=Et||nt<=0,ht=yt||nt>=1,Et&&(nt=0),yt&&(nt=1)}if(Ye.loop){const Et=Le.getSlideIndexByData(0),yt=Le.getSlideIndexByData(Le.slides.length-1),Ct=Le.slidesGrid[Et],kt=Le.slidesGrid[yt],vt=Le.slidesGrid[Le.slidesGrid.length-1],bt=Math.abs(Be);bt>=Ct?gt=(bt-Ct)/vt:gt=(bt+vt-kt)/vt,gt>1&&(gt-=1)}Object.assign(Le,{progress:nt,progressLoop:gt,isBeginning:ft,isEnd:ht}),(Ye.watchSlidesProgress||Ye.centeredSlides&&Ye.autoHeight)&&Le.updateSlidesProgress(Be),ft&&!At&&Le.emit("reachBeginning toEdge"),ht&&!xt&&Le.emit("reachEnd toEdge"),(At&&!ft||xt&&!ht)&&Le.emit("fromEdge"),Le.emit("progress",nt)}function updateSlidesClasses(){const Be=this,{slides:Le,params:Ye,slidesEl:tt,activeIndex:nt}=Be,ft=Be.virtual&&Ye.virtual.enabled,ht=At=>elementChildren(tt,`.${Ye.slideClass}${At}, swiper-slide${At}`)[0];Le.forEach(At=>{At.classList.remove(Ye.slideActiveClass,Ye.slideNextClass,Ye.slidePrevClass)});let gt;if(ft)if(Ye.loop){let At=nt-Be.virtual.slidesBefore;At<0&&(At=Be.virtual.slides.length+At),At>=Be.virtual.slides.length&&(At-=Be.virtual.slides.length),gt=ht(`[data-swiper-slide-index="${At}"]`)}else gt=ht(`[data-swiper-slide-index="${nt}"]`);else gt=Le[nt];if(gt){gt.classList.add(Ye.slideActiveClass);let At=elementNextAll(gt,`.${Ye.slideClass}, swiper-slide`)[0];Ye.loop&&!At&&(At=Le[0]),At&&At.classList.add(Ye.slideNextClass);let xt=elementPrevAll(gt,`.${Ye.slideClass}, swiper-slide`)[0];Ye.loop&&!xt===0&&(xt=Le[Le.length-1]),xt&&xt.classList.add(Ye.slidePrevClass)}Be.emitSlidesClasses()}const processLazyPreloader=(Be,Le)=>{if(!Be||Be.destroyed||!Be.params)return;const Ye=()=>Be.isElement?"swiper-slide":`.${Be.params.slideClass}`,tt=Le.closest(Ye());if(tt){const nt=tt.querySelector(`.${Be.params.lazyPreloaderClass}`);nt&&nt.remove()}},unlazy=(Be,Le)=>{if(!Be.slides[Le])return;const Ye=Be.slides[Le].querySelector('[loading="lazy"]');Ye&&Ye.removeAttribute("loading")},preload=Be=>{if(!Be||Be.destroyed||!Be.params)return;let Le=Be.params.lazyPreloadPrevNext;const Ye=Be.slides.length;if(!Ye||!Le||Le<0)return;Le=Math.min(Le,Ye);const tt=Be.params.slidesPerView==="auto"?Be.slidesPerViewDynamic():Math.ceil(Be.params.slidesPerView),nt=Be.activeIndex;if(Be.params.grid&&Be.params.grid.rows>1){const ht=nt,gt=[ht-Le];gt.push(...Array.from({length:Le}).map((At,xt)=>ht+tt+xt)),Be.slides.forEach((At,xt)=>{gt.includes(At.column)&&unlazy(Be,xt)});return}const ft=nt+tt-1;if(Be.params.rewind||Be.params.loop)for(let ht=nt-Le;ht<=ft+Le;ht+=1){const gt=(ht%Ye+Ye)%Ye;(gt<nt||gt>ft)&&unlazy(Be,gt)}else for(let ht=Math.max(nt-Le,0);ht<=Math.min(ft+Le,Ye-1);ht+=1)ht!==nt&&(ht>ft||ht<nt)&&unlazy(Be,ht)};function getActiveIndexByTranslate(Be){const{slidesGrid:Le,params:Ye}=Be,tt=Be.rtlTranslate?Be.translate:-Be.translate;let nt;for(let ft=0;ft<Le.length;ft+=1)typeof Le[ft+1]<"u"?tt>=Le[ft]&&tt<Le[ft+1]-(Le[ft+1]-Le[ft])/2?nt=ft:tt>=Le[ft]&&tt<Le[ft+1]&&(nt=ft+1):tt>=Le[ft]&&(nt=ft);return Ye.normalizeSlideIndex&&(nt<0||typeof nt>"u")&&(nt=0),nt}function updateActiveIndex(Be){const Le=this,Ye=Le.rtlTranslate?Le.translate:-Le.translate,{snapGrid:tt,params:nt,activeIndex:ft,realIndex:ht,snapIndex:gt}=Le;let At=Be,xt;const Et=Ct=>{let kt=Ct-Le.virtual.slidesBefore;return kt<0&&(kt=Le.virtual.slides.length+kt),kt>=Le.virtual.slides.length&&(kt-=Le.virtual.slides.length),kt};if(typeof At>"u"&&(At=getActiveIndexByTranslate(Le)),tt.indexOf(Ye)>=0)xt=tt.indexOf(Ye);else{const Ct=Math.min(nt.slidesPerGroupSkip,At);xt=Ct+Math.floor((At-Ct)/nt.slidesPerGroup)}if(xt>=tt.length&&(xt=tt.length-1),At===ft){xt!==gt&&(Le.snapIndex=xt,Le.emit("snapIndexChange")),Le.params.loop&&Le.virtual&&Le.params.virtual.enabled&&(Le.realIndex=Et(At));return}let yt;Le.virtual&&nt.virtual.enabled&&nt.loop?yt=Et(At):Le.slides[At]?yt=parseInt(Le.slides[At].getAttribute("data-swiper-slide-index")||At,10):yt=At,Object.assign(Le,{previousSnapIndex:gt,snapIndex:xt,previousRealIndex:ht,realIndex:yt,previousIndex:ft,activeIndex:At}),Le.initialized&&preload(Le),Le.emit("activeIndexChange"),Le.emit("snapIndexChange"),ht!==yt&&Le.emit("realIndexChange"),(Le.initialized||Le.params.runCallbacksOnInit)&&Le.emit("slideChange")}function updateClickedSlide(Be){const Le=this,Ye=Le.params,tt=Be.closest(`.${Ye.slideClass}, swiper-slide`);let nt=!1,ft;if(tt){for(let ht=0;ht<Le.slides.length;ht+=1)if(Le.slides[ht]===tt){nt=!0,ft=ht;break}}if(tt&&nt)Le.clickedSlide=tt,Le.virtual&&Le.params.virtual.enabled?Le.clickedIndex=parseInt(tt.getAttribute("data-swiper-slide-index"),10):Le.clickedIndex=ft;else{Le.clickedSlide=void 0,Le.clickedIndex=void 0;return}Ye.slideToClickedSlide&&Le.clickedIndex!==void 0&&Le.clickedIndex!==Le.activeIndex&&Le.slideToClickedSlide()}const update$2={updateSize,updateSlides,updateAutoHeight,updateSlidesOffset,updateSlidesProgress,updateProgress,updateSlidesClasses,updateActiveIndex,updateClickedSlide};function getSwiperTranslate(Be=this.isHorizontal()?"x":"y"){const Le=this,{params:Ye,rtlTranslate:tt,translate:nt,wrapperEl:ft}=Le;if(Ye.virtualTranslate)return tt?-nt:nt;if(Ye.cssMode)return nt;let ht=getTranslate(ft,Be);return ht+=Le.cssOverflowAdjustment(),tt&&(ht=-ht),ht||0}function setTranslate(Be,Le){const Ye=this,{rtlTranslate:tt,params:nt,wrapperEl:ft,progress:ht}=Ye;let gt=0,At=0;const xt=0;Ye.isHorizontal()?gt=tt?-Be:Be:At=Be,nt.roundLengths&&(gt=Math.floor(gt),At=Math.floor(At)),Ye.previousTranslate=Ye.translate,Ye.translate=Ye.isHorizontal()?gt:At,nt.cssMode?ft[Ye.isHorizontal()?"scrollLeft":"scrollTop"]=Ye.isHorizontal()?-gt:-At:nt.virtualTranslate||(Ye.isHorizontal()?gt-=Ye.cssOverflowAdjustment():At-=Ye.cssOverflowAdjustment(),ft.style.transform=`translate3d(${gt}px, ${At}px, ${xt}px)`);let Et;const yt=Ye.maxTranslate()-Ye.minTranslate();yt===0?Et=0:Et=(Be-Ye.minTranslate())/yt,Et!==ht&&Ye.updateProgress(Be),Ye.emit("setTranslate",Ye.translate,Le)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}function translateTo(Be=0,Le=this.params.speed,Ye=!0,tt=!0,nt){const ft=this,{params:ht,wrapperEl:gt}=ft;if(ft.animating&&ht.preventInteractionOnTransition)return!1;const At=ft.minTranslate(),xt=ft.maxTranslate();let Et;if(tt&&Be>At?Et=At:tt&&Be<xt?Et=xt:Et=Be,ft.updateProgress(Et),ht.cssMode){const yt=ft.isHorizontal();if(Le===0)gt[yt?"scrollLeft":"scrollTop"]=-Et;else{if(!ft.support.smoothScroll)return animateCSSModeScroll({swiper:ft,targetPosition:-Et,side:yt?"left":"top"}),!0;gt.scrollTo({[yt?"left":"top"]:-Et,behavior:"smooth"})}return!0}return Le===0?(ft.setTransition(0),ft.setTranslate(Et),Ye&&(ft.emit("beforeTransitionStart",Le,nt),ft.emit("transitionEnd"))):(ft.setTransition(Le),ft.setTranslate(Et),Ye&&(ft.emit("beforeTransitionStart",Le,nt),ft.emit("transitionStart")),ft.animating||(ft.animating=!0,ft.onTranslateToWrapperTransitionEnd||(ft.onTranslateToWrapperTransitionEnd=function(Ct){!ft||ft.destroyed||Ct.target===this&&(ft.wrapperEl.removeEventListener("transitionend",ft.onTranslateToWrapperTransitionEnd),ft.onTranslateToWrapperTransitionEnd=null,delete ft.onTranslateToWrapperTransitionEnd,Ye&&ft.emit("transitionEnd"))}),ft.wrapperEl.addEventListener("transitionend",ft.onTranslateToWrapperTransitionEnd))),!0}const translate={getTranslate:getSwiperTranslate,setTranslate,minTranslate,maxTranslate,translateTo};function setTransition(Be,Le){const Ye=this;Ye.params.cssMode||(Ye.wrapperEl.style.transitionDuration=`${Be}ms`),Ye.emit("setTransition",Be,Le)}function transitionEmit({swiper:Be,runCallbacks:Le,direction:Ye,step:tt}){const{activeIndex:nt,previousIndex:ft}=Be;let ht=Ye;if(ht||(nt>ft?ht="next":nt<ft?ht="prev":ht="reset"),Be.emit(`transition${tt}`),Le&&nt!==ft){if(ht==="reset"){Be.emit(`slideResetTransition${tt}`);return}Be.emit(`slideChangeTransition${tt}`),ht==="next"?Be.emit(`slideNextTransition${tt}`):Be.emit(`slidePrevTransition${tt}`)}}function transitionStart(Be=!0,Le){const Ye=this,{params:tt}=Ye;tt.cssMode||(tt.autoHeight&&Ye.updateAutoHeight(),transitionEmit({swiper:Ye,runCallbacks:Be,direction:Le,step:"Start"}))}function transitionEnd(Be=!0,Le){const Ye=this,{params:tt}=Ye;Ye.animating=!1,!tt.cssMode&&(Ye.setTransition(0),transitionEmit({swiper:Ye,runCallbacks:Be,direction:Le,step:"End"}))}const transition={setTransition,transitionStart,transitionEnd};function slideTo(Be=0,Le=this.params.speed,Ye=!0,tt,nt){typeof Be=="string"&&(Be=parseInt(Be,10));const ft=this;let ht=Be;ht<0&&(ht=0);const{params:gt,snapGrid:At,slidesGrid:xt,previousIndex:Et,activeIndex:yt,rtlTranslate:Ct,wrapperEl:kt,enabled:vt}=ft;if(ft.animating&>.preventInteractionOnTransition||!vt&&!tt&&!nt)return!1;const bt=Math.min(ft.params.slidesPerGroupSkip,ht);let It=bt+Math.floor((ht-bt)/ft.params.slidesPerGroup);It>=At.length&&(It=At.length-1);const wt=-At[It];if(gt.normalizeSlideIndex)for(let Tt=0;Tt<xt.length;Tt+=1){const Bt=-Math.floor(wt*100),Dt=Math.floor(xt[Tt]*100),Pt=Math.floor(xt[Tt+1]*100);typeof xt[Tt+1]<"u"?Bt>=Dt&&Bt<Pt-(Pt-Dt)/2?ht=Tt:Bt>=Dt&&Bt<Pt&&(ht=Tt+1):Bt>=Dt&&(ht=Tt)}if(ft.initialized&&ht!==yt&&(!ft.allowSlideNext&&(Ct?wt>ft.translate&&wt>ft.minTranslate():wt<ft.translate&&wt<ft.minTranslate())||!ft.allowSlidePrev&&wt>ft.translate&&wt>ft.maxTranslate()&&(yt||0)!==ht))return!1;ht!==(Et||0)&&Ye&&ft.emit("beforeSlideChangeStart"),ft.updateProgress(wt);let Rt;if(ht>yt?Rt="next":ht<yt?Rt="prev":Rt="reset",Ct&&-wt===ft.translate||!Ct&&wt===ft.translate)return ft.updateActiveIndex(ht),gt.autoHeight&&ft.updateAutoHeight(),ft.updateSlidesClasses(),gt.effect!=="slide"&&ft.setTranslate(wt),Rt!=="reset"&&(ft.transitionStart(Ye,Rt),ft.transitionEnd(Ye,Rt)),!1;if(gt.cssMode){const Tt=ft.isHorizontal(),Bt=Ct?wt:-wt;if(Le===0){const Dt=ft.virtual&&ft.params.virtual.enabled;Dt&&(ft.wrapperEl.style.scrollSnapType="none",ft._immediateVirtual=!0),Dt&&!ft._cssModeVirtualInitialSet&&ft.params.initialSlide>0?(ft._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{kt[Tt?"scrollLeft":"scrollTop"]=Bt})):kt[Tt?"scrollLeft":"scrollTop"]=Bt,Dt&&requestAnimationFrame(()=>{ft.wrapperEl.style.scrollSnapType="",ft._immediateVirtual=!1})}else{if(!ft.support.smoothScroll)return animateCSSModeScroll({swiper:ft,targetPosition:Bt,side:Tt?"left":"top"}),!0;kt.scrollTo({[Tt?"left":"top"]:Bt,behavior:"smooth"})}return!0}return ft.setTransition(Le),ft.setTranslate(wt),ft.updateActiveIndex(ht),ft.updateSlidesClasses(),ft.emit("beforeTransitionStart",Le,tt),ft.transitionStart(Ye,Rt),Le===0?ft.transitionEnd(Ye,Rt):ft.animating||(ft.animating=!0,ft.onSlideToWrapperTransitionEnd||(ft.onSlideToWrapperTransitionEnd=function(Bt){!ft||ft.destroyed||Bt.target===this&&(ft.wrapperEl.removeEventListener("transitionend",ft.onSlideToWrapperTransitionEnd),ft.onSlideToWrapperTransitionEnd=null,delete ft.onSlideToWrapperTransitionEnd,ft.transitionEnd(Ye,Rt))}),ft.wrapperEl.addEventListener("transitionend",ft.onSlideToWrapperTransitionEnd)),!0}function slideToLoop(Be=0,Le=this.params.speed,Ye=!0,tt){typeof Be=="string"&&(Be=parseInt(Be,10));const nt=this;let ft=Be;return nt.params.loop&&(nt.virtual&&nt.params.virtual.enabled?ft=ft+nt.virtual.slidesBefore:ft=nt.getSlideIndexByData(ft)),nt.slideTo(ft,Le,Ye,tt)}function slideNext(Be=this.params.speed,Le=!0,Ye){const tt=this,{enabled:nt,params:ft,animating:ht}=tt;if(!nt)return tt;let gt=ft.slidesPerGroup;ft.slidesPerView==="auto"&&ft.slidesPerGroup===1&&ft.slidesPerGroupAuto&&(gt=Math.max(tt.slidesPerViewDynamic("current",!0),1));const At=tt.activeIndex<ft.slidesPerGroupSkip?1:gt,xt=tt.virtual&&ft.virtual.enabled;if(ft.loop){if(ht&&!xt&&ft.loopPreventsSliding)return!1;tt.loopFix({direction:"next"}),tt._clientLeft=tt.wrapperEl.clientLeft}return ft.rewind&&tt.isEnd?tt.slideTo(0,Be,Le,Ye):tt.slideTo(tt.activeIndex+At,Be,Le,Ye)}function slidePrev(Be=this.params.speed,Le=!0,Ye){const tt=this,{params:nt,snapGrid:ft,slidesGrid:ht,rtlTranslate:gt,enabled:At,animating:xt}=tt;if(!At)return tt;const Et=tt.virtual&&nt.virtual.enabled;if(nt.loop){if(xt&&!Et&&nt.loopPreventsSliding)return!1;tt.loopFix({direction:"prev"}),tt._clientLeft=tt.wrapperEl.clientLeft}const yt=gt?tt.translate:-tt.translate;function Ct(wt){return wt<0?-Math.floor(Math.abs(wt)):Math.floor(wt)}const kt=Ct(yt),vt=ft.map(wt=>Ct(wt));let bt=ft[vt.indexOf(kt)-1];if(typeof bt>"u"&&nt.cssMode){let wt;ft.forEach((Rt,Tt)=>{kt>=Rt&&(wt=Tt)}),typeof wt<"u"&&(bt=ft[wt>0?wt-1:wt])}let It=0;if(typeof bt<"u"&&(It=ht.indexOf(bt),It<0&&(It=tt.activeIndex-1),nt.slidesPerView==="auto"&&nt.slidesPerGroup===1&&nt.slidesPerGroupAuto&&(It=It-tt.slidesPerViewDynamic("previous",!0)+1,It=Math.max(It,0))),nt.rewind&&tt.isBeginning){const wt=tt.params.virtual&&tt.params.virtual.enabled&&tt.virtual?tt.virtual.slides.length-1:tt.slides.length-1;return tt.slideTo(wt,Be,Le,Ye)}return tt.slideTo(It,Be,Le,Ye)}function slideReset(Be=this.params.speed,Le=!0,Ye){const tt=this;return tt.slideTo(tt.activeIndex,Be,Le,Ye)}function slideToClosest(Be=this.params.speed,Le=!0,Ye,tt=.5){const nt=this;let ft=nt.activeIndex;const ht=Math.min(nt.params.slidesPerGroupSkip,ft),gt=ht+Math.floor((ft-ht)/nt.params.slidesPerGroup),At=nt.rtlTranslate?nt.translate:-nt.translate;if(At>=nt.snapGrid[gt]){const xt=nt.snapGrid[gt],Et=nt.snapGrid[gt+1];At-xt>(Et-xt)*tt&&(ft+=nt.params.slidesPerGroup)}else{const xt=nt.snapGrid[gt-1],Et=nt.snapGrid[gt];At-xt<=(Et-xt)*tt&&(ft-=nt.params.slidesPerGroup)}return ft=Math.max(ft,0),ft=Math.min(ft,nt.slidesGrid.length-1),nt.slideTo(ft,Be,Le,Ye)}function slideToClickedSlide(){const Be=this,{params:Le,slidesEl:Ye}=Be,tt=Le.slidesPerView==="auto"?Be.slidesPerViewDynamic():Le.slidesPerView;let nt=Be.clickedIndex,ft;const ht=Be.isElement?"swiper-slide":`.${Le.slideClass}`;if(Le.loop){if(Be.animating)return;ft=parseInt(Be.clickedSlide.getAttribute("data-swiper-slide-index"),10),Le.centeredSlides?nt<Be.loopedSlides-tt/2||nt>Be.slides.length-Be.loopedSlides+tt/2?(Be.loopFix(),nt=Be.getSlideIndex(elementChildren(Ye,`${ht}[data-swiper-slide-index="${ft}"]`)[0]),nextTick(()=>{Be.slideTo(nt)})):Be.slideTo(nt):nt>Be.slides.length-tt?(Be.loopFix(),nt=Be.getSlideIndex(elementChildren(Ye,`${ht}[data-swiper-slide-index="${ft}"]`)[0]),nextTick(()=>{Be.slideTo(nt)})):Be.slideTo(nt)}else Be.slideTo(nt)}const slide={slideTo,slideToLoop,slideNext,slidePrev,slideReset,slideToClosest,slideToClickedSlide};function loopCreate(Be){const Le=this,{params:Ye,slidesEl:tt}=Le;if(!Ye.loop||Le.virtual&&Le.params.virtual.enabled)return;elementChildren(tt,`.${Ye.slideClass}, swiper-slide`).forEach((ft,ht)=>{ft.setAttribute("data-swiper-slide-index",ht)}),Le.loopFix({slideRealIndex:Be,direction:Ye.centeredSlides?void 0:"next"})}function loopFix({slideRealIndex:Be,slideTo:Le=!0,direction:Ye,setTranslate:tt,activeSlideIndex:nt,byController:ft,byMousewheel:ht}={}){const gt=this;if(!gt.params.loop)return;gt.emit("beforeLoopFix");const{slides:At,allowSlidePrev:xt,allowSlideNext:Et,slidesEl:yt,params:Ct}=gt;if(gt.allowSlidePrev=!0,gt.allowSlideNext=!0,gt.virtual&&Ct.virtual.enabled){Le&&(!Ct.centeredSlides&>.snapIndex===0?gt.slideTo(gt.virtual.slides.length,0,!1,!0):Ct.centeredSlides&>.snapIndex<Ct.slidesPerView?gt.slideTo(gt.virtual.slides.length+gt.snapIndex,0,!1,!0):gt.snapIndex===gt.snapGrid.length-1&>.slideTo(gt.virtual.slidesBefore,0,!1,!0)),gt.allowSlidePrev=xt,gt.allowSlideNext=Et,gt.emit("loopFix");return}const kt=Ct.slidesPerView==="auto"?gt.slidesPerViewDynamic():Math.ceil(parseFloat(Ct.slidesPerView,10));let vt=Ct.loopedSlides||kt;vt%Ct.slidesPerGroup!==0&&(vt+=Ct.slidesPerGroup-vt%Ct.slidesPerGroup),gt.loopedSlides=vt;const bt=[],It=[];let wt=gt.activeIndex;typeof nt>"u"?nt=gt.getSlideIndex(gt.slides.filter(Pt=>Pt.classList.contains(Ct.slideActiveClass))[0]):wt=nt;const Rt=Ye==="next"||!Ye,Tt=Ye==="prev"||!Ye;let Bt=0,Dt=0;if(nt<vt){Bt=Math.max(vt-nt,Ct.slidesPerGroup);for(let Pt=0;Pt<vt-nt;Pt+=1){const Nt=Pt-Math.floor(Pt/At.length)*At.length;bt.push(At.length-Nt-1)}}else if(nt>gt.slides.length-vt*2){Dt=Math.max(nt-(gt.slides.length-vt*2),Ct.slidesPerGroup);for(let Pt=0;Pt<Dt;Pt+=1){const Nt=Pt-Math.floor(Pt/At.length)*At.length;It.push(Nt)}}if(Tt&&bt.forEach(Pt=>{gt.slides[Pt].swiperLoopMoveDOM=!0,yt.prepend(gt.slides[Pt]),gt.slides[Pt].swiperLoopMoveDOM=!1}),Rt&&It.forEach(Pt=>{gt.slides[Pt].swiperLoopMoveDOM=!0,yt.append(gt.slides[Pt]),gt.slides[Pt].swiperLoopMoveDOM=!1}),gt.recalcSlides(),Ct.slidesPerView==="auto"&>.updateSlides(),Ct.watchSlidesProgress&>.updateSlidesOffset(),Le){if(bt.length>0&&Tt)if(typeof Be>"u"){const Pt=gt.slidesGrid[wt],Lt=gt.slidesGrid[wt+Bt]-Pt;ht?gt.setTranslate(gt.translate-Lt):(gt.slideTo(wt+Bt,0,!1,!0),tt&&(gt.touches[gt.isHorizontal()?"startX":"startY"]+=Lt))}else tt&>.slideToLoop(Be,0,!1,!0);else if(It.length>0&&Rt)if(typeof Be>"u"){const Pt=gt.slidesGrid[wt],Lt=gt.slidesGrid[wt-Dt]-Pt;ht?gt.setTranslate(gt.translate-Lt):(gt.slideTo(wt-Dt,0,!1,!0),tt&&(gt.touches[gt.isHorizontal()?"startX":"startY"]+=Lt))}else gt.slideToLoop(Be,0,!1,!0)}if(gt.allowSlidePrev=xt,gt.allowSlideNext=Et,gt.controller&>.controller.control&&!ft){const Pt={slideRealIndex:Be,slideTo:!1,direction:Ye,setTranslate:tt,activeSlideIndex:nt,byController:!0};Array.isArray(gt.controller.control)?gt.controller.control.forEach(Nt=>{!Nt.destroyed&&Nt.params.loop&&Nt.loopFix(Pt)}):gt.controller.control instanceof gt.constructor&>.controller.control.params.loop&>.controller.control.loopFix(Pt)}gt.emit("loopFix")}function loopDestroy(){const Be=this,{params:Le,slidesEl:Ye}=Be;if(!Le.loop||Be.virtual&&Be.params.virtual.enabled)return;Be.recalcSlides();const tt=[];Be.slides.forEach(nt=>{const ft=typeof nt.swiperSlideIndex>"u"?nt.getAttribute("data-swiper-slide-index")*1:nt.swiperSlideIndex;tt[ft]=nt}),Be.slides.forEach(nt=>{nt.removeAttribute("data-swiper-slide-index")}),tt.forEach(nt=>{Ye.append(nt)}),Be.recalcSlides(),Be.slideTo(Be.realIndex,0)}const loop={loopCreate,loopFix,loopDestroy};function setGrabCursor(Be){const Le=this;if(!Le.params.simulateTouch||Le.params.watchOverflow&&Le.isLocked||Le.params.cssMode)return;const Ye=Le.params.touchEventsTarget==="container"?Le.el:Le.wrapperEl;Le.isElement&&(Le.__preventObserver__=!0),Ye.style.cursor="move",Ye.style.cursor=Be?"grabbing":"grab",Le.isElement&&requestAnimationFrame(()=>{Le.__preventObserver__=!1})}function unsetGrabCursor(){const Be=this;Be.params.watchOverflow&&Be.isLocked||Be.params.cssMode||(Be.isElement&&(Be.__preventObserver__=!0),Be[Be.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",Be.isElement&&requestAnimationFrame(()=>{Be.__preventObserver__=!1}))}const grabCursor={setGrabCursor,unsetGrabCursor};function closestElement(Be,Le=this){function Ye(tt){if(!tt||tt===getDocument$1()||tt===getWindow())return null;tt.assignedSlot&&(tt=tt.assignedSlot);const nt=tt.closest(Be);return!nt&&!tt.getRootNode?null:nt||Ye(tt.getRootNode().host)}return Ye(Le)}function onTouchStart(Be){const Le=this,Ye=getDocument$1(),tt=getWindow(),nt=Le.touchEventsData;nt.evCache.push(Be);const{params:ft,touches:ht,enabled:gt}=Le;if(!gt||!ft.simulateTouch&&Be.pointerType==="mouse"||Le.animating&&ft.preventInteractionOnTransition)return;!Le.animating&&ft.cssMode&&ft.loop&&Le.loopFix();let At=Be;At.originalEvent&&(At=At.originalEvent);let xt=At.target;if(ft.touchEventsTarget==="wrapper"&&!Le.wrapperEl.contains(xt)||"which"in At&&At.which===3||"button"in At&&At.button>0||nt.isTouched&&nt.isMoved)return;const Et=!!ft.noSwipingClass&&ft.noSwipingClass!=="",yt=Be.composedPath?Be.composedPath():Be.path;Et&&At.target&&At.target.shadowRoot&&yt&&(xt=yt[0]);const Ct=ft.noSwipingSelector?ft.noSwipingSelector:`.${ft.noSwipingClass}`,kt=!!(At.target&&At.target.shadowRoot);if(ft.noSwiping&&(kt?closestElement(Ct,xt):xt.closest(Ct))){Le.allowClick=!0;return}if(ft.swipeHandler&&!xt.closest(ft.swipeHandler))return;ht.currentX=At.pageX,ht.currentY=At.pageY;const vt=ht.currentX,bt=ht.currentY,It=ft.edgeSwipeDetection||ft.iOSEdgeSwipeDetection,wt=ft.edgeSwipeThreshold||ft.iOSEdgeSwipeThreshold;if(It&&(vt<=wt||vt>=tt.innerWidth-wt))if(It==="prevent")Be.preventDefault();else return;Object.assign(nt,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),ht.startX=vt,ht.startY=bt,nt.touchStartTime=now(),Le.allowClick=!0,Le.updateSize(),Le.swipeDirection=void 0,ft.threshold>0&&(nt.allowThresholdMove=!1);let Rt=!0;xt.matches(nt.focusableElements)&&(Rt=!1,xt.nodeName==="SELECT"&&(nt.isTouched=!1)),Ye.activeElement&&Ye.activeElement.matches(nt.focusableElements)&&Ye.activeElement!==xt&&Ye.activeElement.blur();const Tt=Rt&&Le.allowTouchMove&&ft.touchStartPreventDefault;(ft.touchStartForcePreventDefault||Tt)&&!xt.isContentEditable&&At.preventDefault(),ft.freeMode&&ft.freeMode.enabled&&Le.freeMode&&Le.animating&&!ft.cssMode&&Le.freeMode.onTouchStart(),Le.emit("touchStart",At)}function onTouchMove(Be){const Le=getDocument$1(),Ye=this,tt=Ye.touchEventsData,{params:nt,touches:ft,rtlTranslate:ht,enabled:gt}=Ye;if(!gt||!nt.simulateTouch&&Be.pointerType==="mouse")return;let At=Be;if(At.originalEvent&&(At=At.originalEvent),!tt.isTouched){tt.startMoving&&tt.isScrolling&&Ye.emit("touchMoveOpposite",At);return}const xt=tt.evCache.findIndex(Pt=>Pt.pointerId===At.pointerId);xt>=0&&(tt.evCache[xt]=At);const Et=tt.evCache.length>1?tt.evCache[0]:At,yt=Et.pageX,Ct=Et.pageY;if(At.preventedByNestedSwiper){ft.startX=yt,ft.startY=Ct;return}if(!Ye.allowTouchMove){At.target.matches(tt.focusableElements)||(Ye.allowClick=!1),tt.isTouched&&(Object.assign(ft,{startX:yt,startY:Ct,prevX:Ye.touches.currentX,prevY:Ye.touches.currentY,currentX:yt,currentY:Ct}),tt.touchStartTime=now());return}if(nt.touchReleaseOnEdges&&!nt.loop){if(Ye.isVertical()){if(Ct<ft.startY&&Ye.translate<=Ye.maxTranslate()||Ct>ft.startY&&Ye.translate>=Ye.minTranslate()){tt.isTouched=!1,tt.isMoved=!1;return}}else if(yt<ft.startX&&Ye.translate<=Ye.maxTranslate()||yt>ft.startX&&Ye.translate>=Ye.minTranslate())return}if(Le.activeElement&&At.target===Le.activeElement&&At.target.matches(tt.focusableElements)){tt.isMoved=!0,Ye.allowClick=!1;return}if(tt.allowTouchCallbacks&&Ye.emit("touchMove",At),At.targetTouches&&At.targetTouches.length>1)return;ft.currentX=yt,ft.currentY=Ct;const kt=ft.currentX-ft.startX,vt=ft.currentY-ft.startY;if(Ye.params.threshold&&Math.sqrt(kt**2+vt**2)<Ye.params.threshold)return;if(typeof tt.isScrolling>"u"){let Pt;Ye.isHorizontal()&&ft.currentY===ft.startY||Ye.isVertical()&&ft.currentX===ft.startX?tt.isScrolling=!1:kt*kt+vt*vt>=25&&(Pt=Math.atan2(Math.abs(vt),Math.abs(kt))*180/Math.PI,tt.isScrolling=Ye.isHorizontal()?Pt>nt.touchAngle:90-Pt>nt.touchAngle)}if(tt.isScrolling&&Ye.emit("touchMoveOpposite",At),typeof tt.startMoving>"u"&&(ft.currentX!==ft.startX||ft.currentY!==ft.startY)&&(tt.startMoving=!0),tt.isScrolling||Ye.zoom&&Ye.params.zoom&&Ye.params.zoom.enabled&&tt.evCache.length>1){tt.isTouched=!1;return}if(!tt.startMoving)return;Ye.allowClick=!1,!nt.cssMode&&At.cancelable&&At.preventDefault(),nt.touchMoveStopPropagation&&!nt.nested&&At.stopPropagation();let bt=Ye.isHorizontal()?kt:vt,It=Ye.isHorizontal()?ft.currentX-ft.previousX:ft.currentY-ft.previousY;nt.oneWayMovement&&(bt=Math.abs(bt)*(ht?1:-1),It=Math.abs(It)*(ht?1:-1)),ft.diff=bt,bt*=nt.touchRatio,ht&&(bt=-bt,It=-It);const wt=Ye.touchesDirection;Ye.swipeDirection=bt>0?"prev":"next",Ye.touchesDirection=It>0?"prev":"next";const Rt=Ye.params.loop&&!nt.cssMode;if(!tt.isMoved){if(Rt&&Ye.loopFix({direction:Ye.swipeDirection}),tt.startTranslate=Ye.getTranslate(),Ye.setTransition(0),Ye.animating){const Pt=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});Ye.wrapperEl.dispatchEvent(Pt)}tt.allowMomentumBounce=!1,nt.grabCursor&&(Ye.allowSlideNext===!0||Ye.allowSlidePrev===!0)&&Ye.setGrabCursor(!0),Ye.emit("sliderFirstMove",At)}let Tt;tt.isMoved&&wt!==Ye.touchesDirection&&Rt&&Math.abs(bt)>=1&&(Ye.loopFix({direction:Ye.swipeDirection,setTranslate:!0}),Tt=!0),Ye.emit("sliderMove",At),tt.isMoved=!0,tt.currentTranslate=bt+tt.startTranslate;let Bt=!0,Dt=nt.resistanceRatio;if(nt.touchReleaseOnEdges&&(Dt=0),bt>0?(Rt&&!Tt&&tt.currentTranslate>(nt.centeredSlides?Ye.minTranslate()-Ye.size/2:Ye.minTranslate())&&Ye.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),tt.currentTranslate>Ye.minTranslate()&&(Bt=!1,nt.resistance&&(tt.currentTranslate=Ye.minTranslate()-1+(-Ye.minTranslate()+tt.startTranslate+bt)**Dt))):bt<0&&(Rt&&!Tt&&tt.currentTranslate<(nt.centeredSlides?Ye.maxTranslate()+Ye.size/2:Ye.maxTranslate())&&Ye.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:Ye.slides.length-(nt.slidesPerView==="auto"?Ye.slidesPerViewDynamic():Math.ceil(parseFloat(nt.slidesPerView,10)))}),tt.currentTranslate<Ye.maxTranslate()&&(Bt=!1,nt.resistance&&(tt.currentTranslate=Ye.maxTranslate()+1-(Ye.maxTranslate()-tt.startTranslate-bt)**Dt))),Bt&&(At.preventedByNestedSwiper=!0),!Ye.allowSlideNext&&Ye.swipeDirection==="next"&&tt.currentTranslate<tt.startTranslate&&(tt.currentTranslate=tt.startTranslate),!Ye.allowSlidePrev&&Ye.swipeDirection==="prev"&&tt.currentTranslate>tt.startTranslate&&(tt.currentTranslate=tt.startTranslate),!Ye.allowSlidePrev&&!Ye.allowSlideNext&&(tt.currentTranslate=tt.startTranslate),nt.threshold>0)if(Math.abs(bt)>nt.threshold||tt.allowThresholdMove){if(!tt.allowThresholdMove){tt.allowThresholdMove=!0,ft.startX=ft.currentX,ft.startY=ft.currentY,tt.currentTranslate=tt.startTranslate,ft.diff=Ye.isHorizontal()?ft.currentX-ft.startX:ft.currentY-ft.startY;return}}else{tt.currentTranslate=tt.startTranslate;return}!nt.followFinger||nt.cssMode||((nt.freeMode&&nt.freeMode.enabled&&Ye.freeMode||nt.watchSlidesProgress)&&(Ye.updateActiveIndex(),Ye.updateSlidesClasses()),nt.freeMode&&nt.freeMode.enabled&&Ye.freeMode&&Ye.freeMode.onTouchMove(),Ye.updateProgress(tt.currentTranslate),Ye.setTranslate(tt.currentTranslate))}function onTouchEnd(Be){const Le=this,Ye=Le.touchEventsData,tt=Ye.evCache.findIndex(Tt=>Tt.pointerId===Be.pointerId);if(tt>=0&&Ye.evCache.splice(tt,1),["pointercancel","pointerout","pointerleave"].includes(Be.type)&&!(Be.type==="pointercancel"&&(Le.browser.isSafari||Le.browser.isWebView)))return;const{params:nt,touches:ft,rtlTranslate:ht,slidesGrid:gt,enabled:At}=Le;if(!At||!nt.simulateTouch&&Be.pointerType==="mouse")return;let xt=Be;if(xt.originalEvent&&(xt=xt.originalEvent),Ye.allowTouchCallbacks&&Le.emit("touchEnd",xt),Ye.allowTouchCallbacks=!1,!Ye.isTouched){Ye.isMoved&&nt.grabCursor&&Le.setGrabCursor(!1),Ye.isMoved=!1,Ye.startMoving=!1;return}nt.grabCursor&&Ye.isMoved&&Ye.isTouched&&(Le.allowSlideNext===!0||Le.allowSlidePrev===!0)&&Le.setGrabCursor(!1);const Et=now(),yt=Et-Ye.touchStartTime;if(Le.allowClick){const Tt=xt.path||xt.composedPath&&xt.composedPath();Le.updateClickedSlide(Tt&&Tt[0]||xt.target),Le.emit("tap click",xt),yt<300&&Et-Ye.lastClickTime<300&&Le.emit("doubleTap doubleClick",xt)}if(Ye.lastClickTime=now(),nextTick(()=>{Le.destroyed||(Le.allowClick=!0)}),!Ye.isTouched||!Ye.isMoved||!Le.swipeDirection||ft.diff===0||Ye.currentTranslate===Ye.startTranslate){Ye.isTouched=!1,Ye.isMoved=!1,Ye.startMoving=!1;return}Ye.isTouched=!1,Ye.isMoved=!1,Ye.startMoving=!1;let Ct;if(nt.followFinger?Ct=ht?Le.translate:-Le.translate:Ct=-Ye.currentTranslate,nt.cssMode)return;if(nt.freeMode&&nt.freeMode.enabled){Le.freeMode.onTouchEnd({currentPos:Ct});return}let kt=0,vt=Le.slidesSizesGrid[0];for(let Tt=0;Tt<gt.length;Tt+=Tt<nt.slidesPerGroupSkip?1:nt.slidesPerGroup){const Bt=Tt<nt.slidesPerGroupSkip-1?1:nt.slidesPerGroup;typeof gt[Tt+Bt]<"u"?Ct>=gt[Tt]&&Ct<gt[Tt+Bt]&&(kt=Tt,vt=gt[Tt+Bt]-gt[Tt]):Ct>=gt[Tt]&&(kt=Tt,vt=gt[gt.length-1]-gt[gt.length-2])}let bt=null,It=null;nt.rewind&&(Le.isBeginning?It=nt.virtual&&nt.virtual.enabled&&Le.virtual?Le.virtual.slides.length-1:Le.slides.length-1:Le.isEnd&&(bt=0));const wt=(Ct-gt[kt])/vt,Rt=kt<nt.slidesPerGroupSkip-1?1:nt.slidesPerGroup;if(yt>nt.longSwipesMs){if(!nt.longSwipes){Le.slideTo(Le.activeIndex);return}Le.swipeDirection==="next"&&(wt>=nt.longSwipesRatio?Le.slideTo(nt.rewind&&Le.isEnd?bt:kt+Rt):Le.slideTo(kt)),Le.swipeDirection==="prev"&&(wt>1-nt.longSwipesRatio?Le.slideTo(kt+Rt):It!==null&&wt<0&&Math.abs(wt)>nt.longSwipesRatio?Le.slideTo(It):Le.slideTo(kt))}else{if(!nt.shortSwipes){Le.slideTo(Le.activeIndex);return}Le.navigation&&(xt.target===Le.navigation.nextEl||xt.target===Le.navigation.prevEl)?xt.target===Le.navigation.nextEl?Le.slideTo(kt+Rt):Le.slideTo(kt):(Le.swipeDirection==="next"&&Le.slideTo(bt!==null?bt:kt+Rt),Le.swipeDirection==="prev"&&Le.slideTo(It!==null?It:kt))}}function onResize(){const Be=this,{params:Le,el:Ye}=Be;if(Ye&&Ye.offsetWidth===0)return;Le.breakpoints&&Be.setBreakpoint();const{allowSlideNext:tt,allowSlidePrev:nt,snapGrid:ft}=Be,ht=Be.virtual&&Be.params.virtual.enabled;Be.allowSlideNext=!0,Be.allowSlidePrev=!0,Be.updateSize(),Be.updateSlides(),Be.updateSlidesClasses();const gt=ht&&Le.loop;(Le.slidesPerView==="auto"||Le.slidesPerView>1)&&Be.isEnd&&!Be.isBeginning&&!Be.params.centeredSlides&&!gt?Be.slideTo(Be.slides.length-1,0,!1,!0):Be.params.loop&&!ht?Be.slideToLoop(Be.realIndex,0,!1,!0):Be.slideTo(Be.activeIndex,0,!1,!0),Be.autoplay&&Be.autoplay.running&&Be.autoplay.paused&&(clearTimeout(Be.autoplay.resizeTimeout),Be.autoplay.resizeTimeout=setTimeout(()=>{Be.autoplay&&Be.autoplay.running&&Be.autoplay.paused&&Be.autoplay.resume()},500)),Be.allowSlidePrev=nt,Be.allowSlideNext=tt,Be.params.watchOverflow&&ft!==Be.snapGrid&&Be.checkOverflow()}function onClick(Be){const Le=this;Le.enabled&&(Le.allowClick||(Le.params.preventClicks&&Be.preventDefault(),Le.params.preventClicksPropagation&&Le.animating&&(Be.stopPropagation(),Be.stopImmediatePropagation())))}function onScroll(){const Be=this,{wrapperEl:Le,rtlTranslate:Ye,enabled:tt}=Be;if(!tt)return;Be.previousTranslate=Be.translate,Be.isHorizontal()?Be.translate=-Le.scrollLeft:Be.translate=-Le.scrollTop,Be.translate===0&&(Be.translate=0),Be.updateActiveIndex(),Be.updateSlidesClasses();let nt;const ft=Be.maxTranslate()-Be.minTranslate();ft===0?nt=0:nt=(Be.translate-Be.minTranslate())/ft,nt!==Be.progress&&Be.updateProgress(Ye?-Be.translate:Be.translate),Be.emit("setTranslate",Be.translate,!1)}function onLoad(Be){const Le=this;processLazyPreloader(Le,Be.target),!(Le.params.cssMode||Le.params.slidesPerView!=="auto"&&!Le.params.autoHeight)&&Le.update()}let dummyEventAttached=!1;function dummyEventListener(){}const events=(Be,Le)=>{const Ye=getDocument$1(),{params:tt,el:nt,wrapperEl:ft,device:ht}=Be,gt=!!tt.nested,At=Le==="on"?"addEventListener":"removeEventListener",xt=Le;nt[At]("pointerdown",Be.onTouchStart,{passive:!1}),Ye[At]("pointermove",Be.onTouchMove,{passive:!1,capture:gt}),Ye[At]("pointerup",Be.onTouchEnd,{passive:!0}),Ye[At]("pointercancel",Be.onTouchEnd,{passive:!0}),Ye[At]("pointerout",Be.onTouchEnd,{passive:!0}),Ye[At]("pointerleave",Be.onTouchEnd,{passive:!0}),(tt.preventClicks||tt.preventClicksPropagation)&&nt[At]("click",Be.onClick,!0),tt.cssMode&&ft[At]("scroll",Be.onScroll),tt.updateOnWindowResize?Be[xt](ht.ios||ht.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0):Be[xt]("observerUpdate",onResize,!0),nt[At]("load",Be.onLoad,{capture:!0})};function attachEvents(){const Be=this,Le=getDocument$1(),{params:Ye}=Be;Be.onTouchStart=onTouchStart.bind(Be),Be.onTouchMove=onTouchMove.bind(Be),Be.onTouchEnd=onTouchEnd.bind(Be),Ye.cssMode&&(Be.onScroll=onScroll.bind(Be)),Be.onClick=onClick.bind(Be),Be.onLoad=onLoad.bind(Be),dummyEventAttached||(Le.addEventListener("touchstart",dummyEventListener),dummyEventAttached=!0),events(Be,"on")}function detachEvents(){events(this,"off")}const events$1={attachEvents,detachEvents},isGridEnabled=(Be,Le)=>Be.grid&&Le.grid&&Le.grid.rows>1;function setBreakpoint(){const Be=this,{realIndex:Le,initialized:Ye,params:tt,el:nt}=Be,ft=tt.breakpoints;if(!ft||ft&&Object.keys(ft).length===0)return;const ht=Be.getBreakpoint(ft,Be.params.breakpointsBase,Be.el);if(!ht||Be.currentBreakpoint===ht)return;const At=(ht in ft?ft[ht]:void 0)||Be.originalParams,xt=isGridEnabled(Be,tt),Et=isGridEnabled(Be,At),yt=tt.enabled;xt&&!Et?(nt.classList.remove(`${tt.containerModifierClass}grid`,`${tt.containerModifierClass}grid-column`),Be.emitContainerClasses()):!xt&&Et&&(nt.classList.add(`${tt.containerModifierClass}grid`),(At.grid.fill&&At.grid.fill==="column"||!At.grid.fill&&tt.grid.fill==="column")&&nt.classList.add(`${tt.containerModifierClass}grid-column`),Be.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(bt=>{if(typeof At[bt]>"u")return;const It=tt[bt]&&tt[bt].enabled,wt=At[bt]&&At[bt].enabled;It&&!wt&&Be[bt].disable(),!It&&wt&&Be[bt].enable()});const Ct=At.direction&&At.direction!==tt.direction,kt=tt.loop&&(At.slidesPerView!==tt.slidesPerView||Ct);Ct&&Ye&&Be.changeDirection(),extend$3(Be.params,At);const vt=Be.params.enabled;Object.assign(Be,{allowTouchMove:Be.params.allowTouchMove,allowSlideNext:Be.params.allowSlideNext,allowSlidePrev:Be.params.allowSlidePrev}),yt&&!vt?Be.disable():!yt&&vt&&Be.enable(),Be.currentBreakpoint=ht,Be.emit("_beforeBreakpoint",At),kt&&Ye&&(Be.loopDestroy(),Be.loopCreate(Le),Be.updateSlides()),Be.emit("breakpoint",At)}function getBreakpoint(Be,Le="window",Ye){if(!Be||Le==="container"&&!Ye)return;let tt=!1;const nt=getWindow(),ft=Le==="window"?nt.innerHeight:Ye.clientHeight,ht=Object.keys(Be).map(gt=>{if(typeof gt=="string"&>.indexOf("@")===0){const At=parseFloat(gt.substr(1));return{value:ft*At,point:gt}}return{value:gt,point:gt}});ht.sort((gt,At)=>parseInt(gt.value,10)-parseInt(At.value,10));for(let gt=0;gt<ht.length;gt+=1){const{point:At,value:xt}=ht[gt];Le==="window"?nt.matchMedia(`(min-width: ${xt}px)`).matches&&(tt=At):xt<=Ye.clientWidth&&(tt=At)}return tt||"max"}const breakpoints={setBreakpoint,getBreakpoint};function prepareClasses(Be,Le){const Ye=[];return Be.forEach(tt=>{typeof tt=="object"?Object.keys(tt).forEach(nt=>{tt[nt]&&Ye.push(Le+nt)}):typeof tt=="string"&&Ye.push(Le+tt)}),Ye}function addClasses(){const Be=this,{classNames:Le,params:Ye,rtl:tt,el:nt,device:ft}=Be,ht=prepareClasses(["initialized",Ye.direction,{"free-mode":Be.params.freeMode&&Ye.freeMode.enabled},{autoheight:Ye.autoHeight},{rtl:tt},{grid:Ye.grid&&Ye.grid.rows>1},{"grid-column":Ye.grid&&Ye.grid.rows>1&&Ye.grid.fill==="column"},{android:ft.android},{ios:ft.ios},{"css-mode":Ye.cssMode},{centered:Ye.cssMode&&Ye.centeredSlides},{"watch-progress":Ye.watchSlidesProgress}],Ye.containerModifierClass);Le.push(...ht),nt.classList.add(...Le),Be.emitContainerClasses()}function removeClasses(){const Be=this,{el:Le,classNames:Ye}=Be;Le.classList.remove(...Ye),Be.emitContainerClasses()}const classes={addClasses,removeClasses};function checkOverflow(){const Be=this,{isLocked:Le,params:Ye}=Be,{slidesOffsetBefore:tt}=Ye;if(tt){const nt=Be.slides.length-1,ft=Be.slidesGrid[nt]+Be.slidesSizesGrid[nt]+tt*2;Be.isLocked=Be.size>ft}else Be.isLocked=Be.snapGrid.length===1;Ye.allowSlideNext===!0&&(Be.allowSlideNext=!Be.isLocked),Ye.allowSlidePrev===!0&&(Be.allowSlidePrev=!Be.isLocked),Le&&Le!==Be.isLocked&&(Be.isEnd=!1),Le!==Be.isLocked&&Be.emit(Be.isLocked?"lock":"unlock")}const checkOverflow$1={checkOverflow},defaults={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function moduleExtendParams(Be,Le){return function(tt={}){const nt=Object.keys(tt)[0],ft=tt[nt];if(typeof ft!="object"||ft===null){extend$3(Le,tt);return}if(["navigation","pagination","scrollbar"].indexOf(nt)>=0&&Be[nt]===!0&&(Be[nt]={auto:!0}),!(nt in Be&&"enabled"in ft)){extend$3(Le,tt);return}Be[nt]===!0&&(Be[nt]={enabled:!0}),typeof Be[nt]=="object"&&!("enabled"in Be[nt])&&(Be[nt].enabled=!0),Be[nt]||(Be[nt]={enabled:!1}),extend$3(Le,tt)}}const prototypes={eventsEmitter,update:update$2,translate,transition,slide,loop,grabCursor,events:events$1,breakpoints,checkOverflow:checkOverflow$1,classes},extendedDefaults={};let Swiper$1=class vo{constructor(...Le){let Ye,tt;Le.length===1&&Le[0].constructor&&Object.prototype.toString.call(Le[0]).slice(8,-1)==="Object"?tt=Le[0]:[Ye,tt]=Le,tt||(tt={}),tt=extend$3({},tt),Ye&&!tt.el&&(tt.el=Ye);const nt=getDocument$1();if(tt.el&&typeof tt.el=="string"&&nt.querySelectorAll(tt.el).length>1){const At=[];return nt.querySelectorAll(tt.el).forEach(xt=>{const Et=extend$3({},tt,{el:xt});At.push(new vo(Et))}),At}const ft=this;ft.__swiper__=!0,ft.support=getSupport(),ft.device=getDevice({userAgent:tt.userAgent}),ft.browser=getBrowser(),ft.eventsListeners={},ft.eventsAnyListeners=[],ft.modules=[...ft.__modules__],tt.modules&&Array.isArray(tt.modules)&&ft.modules.push(...tt.modules);const ht={};ft.modules.forEach(At=>{At({params:tt,swiper:ft,extendParams:moduleExtendParams(tt,ht),on:ft.on.bind(ft),once:ft.once.bind(ft),off:ft.off.bind(ft),emit:ft.emit.bind(ft)})});const gt=extend$3({},defaults,ht);return ft.params=extend$3({},gt,extendedDefaults,tt),ft.originalParams=extend$3({},ft.params),ft.passedParams=extend$3({},tt),ft.params&&ft.params.on&&Object.keys(ft.params.on).forEach(At=>{ft.on(At,ft.params.on[At])}),ft.params&&ft.params.onAny&&ft.onAny(ft.params.onAny),Object.assign(ft,{enabled:ft.params.enabled,el:Ye,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return ft.params.direction==="horizontal"},isVertical(){return ft.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:ft.params.allowSlideNext,allowSlidePrev:ft.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:ft.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:ft.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),ft.emit("_swiper"),ft.params.init&&ft.init(),ft}getSlideIndex(Le){const{slidesEl:Ye,params:tt}=this,nt=elementChildren(Ye,`.${tt.slideClass}, swiper-slide`),ft=elementIndex(nt[0]);return elementIndex(Le)-ft}getSlideIndexByData(Le){return this.getSlideIndex(this.slides.filter(Ye=>Ye.getAttribute("data-swiper-slide-index")*1===Le)[0])}recalcSlides(){const Le=this,{slidesEl:Ye,params:tt}=Le;Le.slides=elementChildren(Ye,`.${tt.slideClass}, swiper-slide`)}enable(){const Le=this;Le.enabled||(Le.enabled=!0,Le.params.grabCursor&&Le.setGrabCursor(),Le.emit("enable"))}disable(){const Le=this;Le.enabled&&(Le.enabled=!1,Le.params.grabCursor&&Le.unsetGrabCursor(),Le.emit("disable"))}setProgress(Le,Ye){const tt=this;Le=Math.min(Math.max(Le,0),1);const nt=tt.minTranslate(),ht=(tt.maxTranslate()-nt)*Le+nt;tt.translateTo(ht,typeof Ye>"u"?0:Ye),tt.updateActiveIndex(),tt.updateSlidesClasses()}emitContainerClasses(){const Le=this;if(!Le.params._emitClasses||!Le.el)return;const Ye=Le.el.className.split(" ").filter(tt=>tt.indexOf("swiper")===0||tt.indexOf(Le.params.containerModifierClass)===0);Le.emit("_containerClasses",Ye.join(" "))}getSlideClasses(Le){const Ye=this;return Ye.destroyed?"":Le.className.split(" ").filter(tt=>tt.indexOf("swiper-slide")===0||tt.indexOf(Ye.params.slideClass)===0).join(" ")}emitSlidesClasses(){const Le=this;if(!Le.params._emitClasses||!Le.el)return;const Ye=[];Le.slides.forEach(tt=>{const nt=Le.getSlideClasses(tt);Ye.push({slideEl:tt,classNames:nt}),Le.emit("_slideClass",tt,nt)}),Le.emit("_slideClasses",Ye)}slidesPerViewDynamic(Le="current",Ye=!1){const tt=this,{params:nt,slides:ft,slidesGrid:ht,slidesSizesGrid:gt,size:At,activeIndex:xt}=tt;let Et=1;if(nt.centeredSlides){let yt=ft[xt]?ft[xt].swiperSlideSize:0,Ct;for(let kt=xt+1;kt<ft.length;kt+=1)ft[kt]&&!Ct&&(yt+=ft[kt].swiperSlideSize,Et+=1,yt>At&&(Ct=!0));for(let kt=xt-1;kt>=0;kt-=1)ft[kt]&&!Ct&&(yt+=ft[kt].swiperSlideSize,Et+=1,yt>At&&(Ct=!0))}else if(Le==="current")for(let yt=xt+1;yt<ft.length;yt+=1)(Ye?ht[yt]+gt[yt]-ht[xt]<At:ht[yt]-ht[xt]<At)&&(Et+=1);else for(let yt=xt-1;yt>=0;yt-=1)ht[xt]-ht[yt]<At&&(Et+=1);return Et}update(){const Le=this;if(!Le||Le.destroyed)return;const{snapGrid:Ye,params:tt}=Le;tt.breakpoints&&Le.setBreakpoint(),[...Le.el.querySelectorAll('[loading="lazy"]')].forEach(ht=>{ht.complete&&processLazyPreloader(Le,ht)}),Le.updateSize(),Le.updateSlides(),Le.updateProgress(),Le.updateSlidesClasses();function nt(){const ht=Le.rtlTranslate?Le.translate*-1:Le.translate,gt=Math.min(Math.max(ht,Le.maxTranslate()),Le.minTranslate());Le.setTranslate(gt),Le.updateActiveIndex(),Le.updateSlidesClasses()}let ft;if(tt.freeMode&&tt.freeMode.enabled&&!tt.cssMode)nt(),tt.autoHeight&&Le.updateAutoHeight();else{if((tt.slidesPerView==="auto"||tt.slidesPerView>1)&&Le.isEnd&&!tt.centeredSlides){const ht=Le.virtual&&tt.virtual.enabled?Le.virtual.slides:Le.slides;ft=Le.slideTo(ht.length-1,0,!1,!0)}else ft=Le.slideTo(Le.activeIndex,0,!1,!0);ft||nt()}tt.watchOverflow&&Ye!==Le.snapGrid&&Le.checkOverflow(),Le.emit("update")}changeDirection(Le,Ye=!0){const tt=this,nt=tt.params.direction;return Le||(Le=nt==="horizontal"?"vertical":"horizontal"),Le===nt||Le!=="horizontal"&&Le!=="vertical"||(tt.el.classList.remove(`${tt.params.containerModifierClass}${nt}`),tt.el.classList.add(`${tt.params.containerModifierClass}${Le}`),tt.emitContainerClasses(),tt.params.direction=Le,tt.slides.forEach(ft=>{Le==="vertical"?ft.style.width="":ft.style.height=""}),tt.emit("changeDirection"),Ye&&tt.update()),tt}changeLanguageDirection(Le){const Ye=this;Ye.rtl&&Le==="rtl"||!Ye.rtl&&Le==="ltr"||(Ye.rtl=Le==="rtl",Ye.rtlTranslate=Ye.params.direction==="horizontal"&&Ye.rtl,Ye.rtl?(Ye.el.classList.add(`${Ye.params.containerModifierClass}rtl`),Ye.el.dir="rtl"):(Ye.el.classList.remove(`${Ye.params.containerModifierClass}rtl`),Ye.el.dir="ltr"),Ye.update())}mount(Le){const Ye=this;if(Ye.mounted)return!0;let tt=Le||Ye.params.el;if(typeof tt=="string"&&(tt=document.querySelector(tt)),!tt)return!1;tt.swiper=Ye,tt.shadowEl&&(Ye.isElement=!0);const nt=()=>`.${(Ye.params.wrapperClass||"").trim().split(" ").join(".")}`;let ht=tt&&tt.shadowRoot&&tt.shadowRoot.querySelector?tt.shadowRoot.querySelector(nt()):elementChildren(tt,nt())[0];return!ht&&Ye.params.createElements&&(ht=createElement("div",Ye.params.wrapperClass),tt.append(ht),elementChildren(tt,`.${Ye.params.slideClass}`).forEach(gt=>{ht.append(gt)})),Object.assign(Ye,{el:tt,wrapperEl:ht,slidesEl:Ye.isElement?tt:ht,mounted:!0,rtl:tt.dir.toLowerCase()==="rtl"||elementStyle(tt,"direction")==="rtl",rtlTranslate:Ye.params.direction==="horizontal"&&(tt.dir.toLowerCase()==="rtl"||elementStyle(tt,"direction")==="rtl"),wrongRTL:elementStyle(ht,"display")==="-webkit-box"}),!0}init(Le){const Ye=this;return Ye.initialized||Ye.mount(Le)===!1||(Ye.emit("beforeInit"),Ye.params.breakpoints&&Ye.setBreakpoint(),Ye.addClasses(),Ye.updateSize(),Ye.updateSlides(),Ye.params.watchOverflow&&Ye.checkOverflow(),Ye.params.grabCursor&&Ye.enabled&&Ye.setGrabCursor(),Ye.params.loop&&Ye.virtual&&Ye.params.virtual.enabled?Ye.slideTo(Ye.params.initialSlide+Ye.virtual.slidesBefore,0,Ye.params.runCallbacksOnInit,!1,!0):Ye.slideTo(Ye.params.initialSlide,0,Ye.params.runCallbacksOnInit,!1,!0),Ye.params.loop&&Ye.loopCreate(),Ye.attachEvents(),[...Ye.el.querySelectorAll('[loading="lazy"]')].forEach(nt=>{nt.complete?processLazyPreloader(Ye,nt):nt.addEventListener("load",ft=>{processLazyPreloader(Ye,ft.target)})}),preload(Ye),Ye.initialized=!0,preload(Ye),Ye.emit("init"),Ye.emit("afterInit")),Ye}destroy(Le=!0,Ye=!0){const tt=this,{params:nt,el:ft,wrapperEl:ht,slides:gt}=tt;return typeof tt.params>"u"||tt.destroyed||(tt.emit("beforeDestroy"),tt.initialized=!1,tt.detachEvents(),nt.loop&&tt.loopDestroy(),Ye&&(tt.removeClasses(),ft.removeAttribute("style"),ht.removeAttribute("style"),gt&>.length&>.forEach(At=>{At.classList.remove(nt.slideVisibleClass,nt.slideActiveClass,nt.slideNextClass,nt.slidePrevClass),At.removeAttribute("style"),At.removeAttribute("data-swiper-slide-index")})),tt.emit("destroy"),Object.keys(tt.eventsListeners).forEach(At=>{tt.off(At)}),Le!==!1&&(tt.el.swiper=null,deleteProps(tt)),tt.destroyed=!0),null}static extendDefaults(Le){extend$3(extendedDefaults,Le)}static get extendedDefaults(){return extendedDefaults}static get defaults(){return defaults}static installModule(Le){vo.prototype.__modules__||(vo.prototype.__modules__=[]);const Ye=vo.prototype.__modules__;typeof Le=="function"&&Ye.indexOf(Le)<0&&Ye.push(Le)}static use(Le){return Array.isArray(Le)?(Le.forEach(Ye=>vo.installModule(Ye)),vo):(vo.installModule(Le),vo)}};Object.keys(prototypes).forEach(Be=>{Object.keys(prototypes[Be]).forEach(Le=>{Swiper$1.prototype[Le]=prototypes[Be][Le]})}),Swiper$1.use([Resize,Observer]);function createElementIfNotDefined(Be,Le,Ye,tt){return Be.params.createElements&&Object.keys(tt).forEach(nt=>{if(!Ye[nt]&&Ye.auto===!0){let ft=elementChildren(Be.el,`.${tt[nt]}`)[0];ft||(ft=createElement("div",tt[nt]),ft.className=tt[nt],Be.el.append(ft)),Ye[nt]=ft,Le[nt]=ft}}),Ye}function classesToSelector(Be=""){return`.${Be.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Pagination({swiper:Be,extendParams:Le,on:Ye,emit:tt}){const nt="swiper-pagination";Le({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:wt=>wt,formatFractionTotal:wt=>wt,bulletClass:`${nt}-bullet`,bulletActiveClass:`${nt}-bullet-active`,modifierClass:`${nt}-`,currentClass:`${nt}-current`,totalClass:`${nt}-total`,hiddenClass:`${nt}-hidden`,progressbarFillClass:`${nt}-progressbar-fill`,progressbarOppositeClass:`${nt}-progressbar-opposite`,clickableClass:`${nt}-clickable`,lockClass:`${nt}-lock`,horizontalClass:`${nt}-horizontal`,verticalClass:`${nt}-vertical`,paginationDisabledClass:`${nt}-disabled`}}),Be.pagination={el:null,bullets:[]};let ft,ht=0;const gt=wt=>(Array.isArray(wt)||(wt=[wt].filter(Rt=>!!Rt)),wt);function At(){return!Be.params.pagination.el||!Be.pagination.el||Array.isArray(Be.pagination.el)&&Be.pagination.el.length===0}function xt(wt,Rt){const{bulletActiveClass:Tt}=Be.params.pagination;wt&&(wt=wt[`${Rt==="prev"?"previous":"next"}ElementSibling`],wt&&(wt.classList.add(`${Tt}-${Rt}`),wt=wt[`${Rt==="prev"?"previous":"next"}ElementSibling`],wt&&wt.classList.add(`${Tt}-${Rt}-${Rt}`)))}function Et(wt){const Rt=wt.target.closest(classesToSelector(Be.params.pagination.bulletClass));if(!Rt)return;wt.preventDefault();const Tt=elementIndex(Rt)*Be.params.slidesPerGroup;if(Be.params.loop){if(Be.realIndex===Tt)return;const Bt=Be.getSlideIndexByData(Tt),Dt=Be.getSlideIndexByData(Be.realIndex);Bt>Be.slides.length-Be.loopedSlides&&Be.loopFix({direction:Bt>Dt?"next":"prev",activeSlideIndex:Bt,slideTo:!1}),Be.slideToLoop(Tt)}else Be.slideTo(Tt)}function yt(){const wt=Be.rtl,Rt=Be.params.pagination;if(At())return;let Tt=Be.pagination.el;Tt=gt(Tt);let Bt,Dt;const Pt=Be.virtual&&Be.params.virtual.enabled?Be.virtual.slides.length:Be.slides.length,Nt=Be.params.loop?Math.ceil(Pt/Be.params.slidesPerGroup):Be.snapGrid.length;if(Be.params.loop?(Dt=Be.previousRealIndex||0,Bt=Be.params.slidesPerGroup>1?Math.floor(Be.realIndex/Be.params.slidesPerGroup):Be.realIndex):typeof Be.snapIndex<"u"?(Bt=Be.snapIndex,Dt=Be.previousSnapIndex):(Dt=Be.previousIndex||0,Bt=Be.activeIndex||0),Rt.type==="bullets"&&Be.pagination.bullets&&Be.pagination.bullets.length>0){const Lt=Be.pagination.bullets;let Wt,$t,Kt;if(Rt.dynamicBullets&&(ft=elementOuterSize(Lt[0],Be.isHorizontal()?"width":"height"),Tt.forEach(Vt=>{Vt.style[Be.isHorizontal()?"width":"height"]=`${ft*(Rt.dynamicMainBullets+4)}px`}),Rt.dynamicMainBullets>1&&Dt!==void 0&&(ht+=Bt-(Dt||0),ht>Rt.dynamicMainBullets-1?ht=Rt.dynamicMainBullets-1:ht<0&&(ht=0)),Wt=Math.max(Bt-ht,0),$t=Wt+(Math.min(Lt.length,Rt.dynamicMainBullets)-1),Kt=($t+Wt)/2),Lt.forEach(Vt=>{const Ut=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(_t=>`${Rt.bulletActiveClass}${_t}`)].map(_t=>typeof _t=="string"&&_t.includes(" ")?_t.split(" "):_t).flat();Vt.classList.remove(...Ut)}),Tt.length>1)Lt.forEach(Vt=>{const Ut=elementIndex(Vt);Ut===Bt?Vt.classList.add(...Rt.bulletActiveClass.split(" ")):Be.isElement&&Vt.setAttribute("part","bullet"),Rt.dynamicBullets&&(Ut>=Wt&&Ut<=$t&&Vt.classList.add(...`${Rt.bulletActiveClass}-main`.split(" ")),Ut===Wt&&xt(Vt,"prev"),Ut===$t&&xt(Vt,"next"))});else{const Vt=Lt[Bt];if(Vt&&Vt.classList.add(...Rt.bulletActiveClass.split(" ")),Be.isElement&&Lt.forEach((Ut,_t)=>{Ut.setAttribute("part",_t===Bt?"bullet-active":"bullet")}),Rt.dynamicBullets){const Ut=Lt[Wt],_t=Lt[$t];for(let Xt=Wt;Xt<=$t;Xt+=1)Lt[Xt]&&Lt[Xt].classList.add(...`${Rt.bulletActiveClass}-main`.split(" "));xt(Ut,"prev"),xt(_t,"next")}}if(Rt.dynamicBullets){const Vt=Math.min(Lt.length,Rt.dynamicMainBullets+4),Ut=(ft*Vt-ft)/2-Kt*ft,_t=wt?"right":"left";Lt.forEach(Xt=>{Xt.style[Be.isHorizontal()?_t:"top"]=`${Ut}px`})}}Tt.forEach((Lt,Wt)=>{if(Rt.type==="fraction"&&(Lt.querySelectorAll(classesToSelector(Rt.currentClass)).forEach($t=>{$t.textContent=Rt.formatFractionCurrent(Bt+1)}),Lt.querySelectorAll(classesToSelector(Rt.totalClass)).forEach($t=>{$t.textContent=Rt.formatFractionTotal(Nt)})),Rt.type==="progressbar"){let $t;Rt.progressbarOpposite?$t=Be.isHorizontal()?"vertical":"horizontal":$t=Be.isHorizontal()?"horizontal":"vertical";const Kt=(Bt+1)/Nt;let Vt=1,Ut=1;$t==="horizontal"?Vt=Kt:Ut=Kt,Lt.querySelectorAll(classesToSelector(Rt.progressbarFillClass)).forEach(_t=>{_t.style.transform=`translate3d(0,0,0) scaleX(${Vt}) scaleY(${Ut})`,_t.style.transitionDuration=`${Be.params.speed}ms`})}Rt.type==="custom"&&Rt.renderCustom?(Lt.innerHTML=Rt.renderCustom(Be,Bt+1,Nt),Wt===0&&tt("paginationRender",Lt)):(Wt===0&&tt("paginationRender",Lt),tt("paginationUpdate",Lt)),Be.params.watchOverflow&&Be.enabled&&Lt.classList[Be.isLocked?"add":"remove"](Rt.lockClass)})}function Ct(){const wt=Be.params.pagination;if(At())return;const Rt=Be.virtual&&Be.params.virtual.enabled?Be.virtual.slides.length:Be.slides.length;let Tt=Be.pagination.el;Tt=gt(Tt);let Bt="";if(wt.type==="bullets"){let Dt=Be.params.loop?Math.ceil(Rt/Be.params.slidesPerGroup):Be.snapGrid.length;Be.params.freeMode&&Be.params.freeMode.enabled&&Dt>Rt&&(Dt=Rt);for(let Pt=0;Pt<Dt;Pt+=1)wt.renderBullet?Bt+=wt.renderBullet.call(Be,Pt,wt.bulletClass):Bt+=`<${wt.bulletElement} ${Be.isElement?'part="bullet"':""} class="${wt.bulletClass}"></${wt.bulletElement}>`}wt.type==="fraction"&&(wt.renderFraction?Bt=wt.renderFraction.call(Be,wt.currentClass,wt.totalClass):Bt=`<span class="${wt.currentClass}"></span> / <span class="${wt.totalClass}"></span>`),wt.type==="progressbar"&&(wt.renderProgressbar?Bt=wt.renderProgressbar.call(Be,wt.progressbarFillClass):Bt=`<span class="${wt.progressbarFillClass}"></span>`),Be.pagination.bullets=[],Tt.forEach(Dt=>{wt.type!=="custom"&&(Dt.innerHTML=Bt||""),wt.type==="bullets"&&Be.pagination.bullets.push(...Dt.querySelectorAll(classesToSelector(wt.bulletClass)))}),wt.type!=="custom"&&tt("paginationRender",Tt[0])}function kt(){Be.params.pagination=createElementIfNotDefined(Be,Be.originalParams.pagination,Be.params.pagination,{el:"swiper-pagination"});const wt=Be.params.pagination;if(!wt.el)return;let Rt;typeof wt.el=="string"&&Be.isElement&&(Rt=Be.el.shadowRoot.querySelector(wt.el)),!Rt&&typeof wt.el=="string"&&(Rt=[...document.querySelectorAll(wt.el)]),Rt||(Rt=wt.el),!(!Rt||Rt.length===0)&&(Be.params.uniqueNavElements&&typeof wt.el=="string"&&Array.isArray(Rt)&&Rt.length>1&&(Rt=[...Be.el.querySelectorAll(wt.el)],Rt.length>1&&(Rt=Rt.filter(Tt=>elementParents(Tt,".swiper")[0]===Be.el)[0])),Array.isArray(Rt)&&Rt.length===1&&(Rt=Rt[0]),Object.assign(Be.pagination,{el:Rt}),Rt=gt(Rt),Rt.forEach(Tt=>{wt.type==="bullets"&&wt.clickable&&Tt.classList.add(wt.clickableClass),Tt.classList.add(wt.modifierClass+wt.type),Tt.classList.add(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass),wt.type==="bullets"&&wt.dynamicBullets&&(Tt.classList.add(`${wt.modifierClass}${wt.type}-dynamic`),ht=0,wt.dynamicMainBullets<1&&(wt.dynamicMainBullets=1)),wt.type==="progressbar"&&wt.progressbarOpposite&&Tt.classList.add(wt.progressbarOppositeClass),wt.clickable&&Tt.addEventListener("click",Et),Be.enabled||Tt.classList.add(wt.lockClass)}))}function vt(){const wt=Be.params.pagination;if(At())return;let Rt=Be.pagination.el;Rt&&(Rt=gt(Rt),Rt.forEach(Tt=>{Tt.classList.remove(wt.hiddenClass),Tt.classList.remove(wt.modifierClass+wt.type),Tt.classList.remove(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass),wt.clickable&&Tt.removeEventListener("click",Et)})),Be.pagination.bullets&&Be.pagination.bullets.forEach(Tt=>Tt.classList.remove(...wt.bulletActiveClass.split(" ")))}Ye("changeDirection",()=>{if(!Be.pagination||!Be.pagination.el)return;const wt=Be.params.pagination;let{el:Rt}=Be.pagination;Rt=gt(Rt),Rt.forEach(Tt=>{Tt.classList.remove(wt.horizontalClass,wt.verticalClass),Tt.classList.add(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass)})}),Ye("init",()=>{Be.params.pagination.enabled===!1?It():(kt(),Ct(),yt())}),Ye("activeIndexChange",()=>{typeof Be.snapIndex>"u"&&yt()}),Ye("snapIndexChange",()=>{yt()}),Ye("snapGridLengthChange",()=>{Ct(),yt()}),Ye("destroy",()=>{vt()}),Ye("enable disable",()=>{let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList[Be.enabled?"remove":"add"](Be.params.pagination.lockClass)))}),Ye("lock unlock",()=>{yt()}),Ye("click",(wt,Rt)=>{const Tt=Rt.target;let{el:Bt}=Be.pagination;if(Array.isArray(Bt)||(Bt=[Bt].filter(Dt=>!!Dt)),Be.params.pagination.el&&Be.params.pagination.hideOnClick&&Bt&&Bt.length>0&&!Tt.classList.contains(Be.params.pagination.bulletClass)){if(Be.navigation&&(Be.navigation.nextEl&&Tt===Be.navigation.nextEl||Be.navigation.prevEl&&Tt===Be.navigation.prevEl))return;const Dt=Bt[0].classList.contains(Be.params.pagination.hiddenClass);tt(Dt===!0?"paginationShow":"paginationHide"),Bt.forEach(Pt=>Pt.classList.toggle(Be.params.pagination.hiddenClass))}});const bt=()=>{Be.el.classList.remove(Be.params.pagination.paginationDisabledClass);let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList.remove(Be.params.pagination.paginationDisabledClass))),kt(),Ct(),yt()},It=()=>{Be.el.classList.add(Be.params.pagination.paginationDisabledClass);let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList.add(Be.params.pagination.paginationDisabledClass))),vt()};Object.assign(Be.pagination,{enable:bt,disable:It,render:Ct,update:yt,init:kt,destroy:vt})}function isObject$1(Be){return typeof Be=="object"&&Be!==null&&Be.constructor&&Object.prototype.toString.call(Be).slice(8,-1)==="Object"}function extend$2(Be,Le){const Ye=["__proto__","constructor","prototype"];Object.keys(Le).filter(tt=>Ye.indexOf(tt)<0).forEach(tt=>{typeof Be[tt]>"u"?Be[tt]=Le[tt]:isObject$1(Le[tt])&&isObject$1(Be[tt])&&Object.keys(Le[tt]).length>0?Le[tt].__swiper__?Be[tt]=Le[tt]:extend$2(Be[tt],Le[tt]):Be[tt]=Le[tt]})}function needsNavigation(Be={}){return Be.navigation&&typeof Be.navigation.nextEl>"u"&&typeof Be.navigation.prevEl>"u"}function needsPagination(Be={}){return Be.pagination&&typeof Be.pagination.el>"u"}function needsScrollbar(Be={}){return Be.scrollbar&&typeof Be.scrollbar.el>"u"}function uniqueClasses(Be=""){const Le=Be.split(" ").map(tt=>tt.trim()).filter(tt=>!!tt),Ye=[];return Le.forEach(tt=>{Ye.indexOf(tt)<0&&Ye.push(tt)}),Ye.join(" ")}function wrapperClass(Be=""){return Be?Be.includes("swiper-wrapper")?Be:`swiper-wrapper ${Be}`:"swiper-wrapper"}const paramsList=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function getParams(Be={},Le=!0){const Ye={on:{}},tt={},nt={};extend$2(Ye,Swiper$1.defaults),extend$2(Ye,Swiper$1.extendedDefaults),Ye._emitClasses=!0,Ye.init=!1;const ft={},ht=paramsList.map(At=>At.replace(/_/,"")),gt=Object.assign({},Be);return Object.keys(gt).forEach(At=>{typeof Be[At]>"u"||(ht.indexOf(At)>=0?isObject$1(Be[At])?(Ye[At]={},nt[At]={},extend$2(Ye[At],Be[At]),extend$2(nt[At],Be[At])):(Ye[At]=Be[At],nt[At]=Be[At]):At.search(/on[A-Z]/)===0&&typeof Be[At]=="function"?Le?tt[`${At[2].toLowerCase()}${At.substr(3)}`]=Be[At]:Ye.on[`${At[2].toLowerCase()}${At.substr(3)}`]=Be[At]:ft[At]=Be[At])}),["navigation","pagination","scrollbar"].forEach(At=>{Ye[At]===!0&&(Ye[At]={}),Ye[At]===!1&&delete Ye[At]}),{params:Ye,passedParams:nt,rest:ft,events:tt}}function mountSwiper({el:Be,nextEl:Le,prevEl:Ye,paginationEl:tt,scrollbarEl:nt,swiper:ft},ht){needsNavigation(ht)&&Le&&Ye&&(ft.params.navigation.nextEl=Le,ft.originalParams.navigation.nextEl=Le,ft.params.navigation.prevEl=Ye,ft.originalParams.navigation.prevEl=Ye),needsPagination(ht)&&tt&&(ft.params.pagination.el=tt,ft.originalParams.pagination.el=tt),needsScrollbar(ht)&&nt&&(ft.params.scrollbar.el=nt,ft.originalParams.scrollbar.el=nt),ft.init(Be)}function getChangedParams(Be,Le,Ye,tt,nt){const ft=[];if(!Le)return ft;const ht=At=>{ft.indexOf(At)<0&&ft.push(At)};if(Ye&&tt){const At=tt.map(nt),xt=Ye.map(nt);At.join("")!==xt.join("")&&ht("children"),tt.length!==Ye.length&&ht("children")}return paramsList.filter(At=>At[0]==="_").map(At=>At.replace(/_/,"")).forEach(At=>{if(At in Be&&At in Le)if(isObject$1(Be[At])&&isObject$1(Le[At])){const xt=Object.keys(Be[At]),Et=Object.keys(Le[At]);xt.length!==Et.length?ht(At):(xt.forEach(yt=>{Be[At][yt]!==Le[At][yt]&&ht(At)}),Et.forEach(yt=>{Be[At][yt]!==Le[At][yt]&&ht(At)}))}else Be[At]!==Le[At]&&ht(At)}),ft}function isChildSwiperSlide(Be){return Be.type&&Be.type.displayName&&Be.type.displayName.includes("SwiperSlide")}function processChildren(Be){const Le=[];return React.Children.toArray(Be).forEach(Ye=>{isChildSwiperSlide(Ye)?Le.push(Ye):Ye.props&&Ye.props.children&&processChildren(Ye.props.children).forEach(tt=>Le.push(tt))}),Le}function getChildren(Be){const Le=[],Ye={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return React.Children.toArray(Be).forEach(tt=>{if(isChildSwiperSlide(tt))Le.push(tt);else if(tt.props&&tt.props.slot&&Ye[tt.props.slot])Ye[tt.props.slot].push(tt);else if(tt.props&&tt.props.children){const nt=processChildren(tt.props.children);nt.length>0?nt.forEach(ft=>Le.push(ft)):Ye["container-end"].push(tt)}else Ye["container-end"].push(tt)}),{slides:Le,slots:Ye}}function updateSwiper({swiper:Be,slides:Le,passedParams:Ye,changedParams:tt,nextEl:nt,prevEl:ft,scrollbarEl:ht,paginationEl:gt}){const At=tt.filter(Lt=>Lt!=="children"&&Lt!=="direction"&&Lt!=="wrapperClass"),{params:xt,pagination:Et,navigation:yt,scrollbar:Ct,virtual:kt,thumbs:vt}=Be;let bt,It,wt,Rt,Tt,Bt,Dt,Pt;tt.includes("thumbs")&&Ye.thumbs&&Ye.thumbs.swiper&&xt.thumbs&&!xt.thumbs.swiper&&(bt=!0),tt.includes("controller")&&Ye.controller&&Ye.controller.control&&xt.controller&&!xt.controller.control&&(It=!0),tt.includes("pagination")&&Ye.pagination&&(Ye.pagination.el||gt)&&(xt.pagination||xt.pagination===!1)&&Et&&!Et.el&&(wt=!0),tt.includes("scrollbar")&&Ye.scrollbar&&(Ye.scrollbar.el||ht)&&(xt.scrollbar||xt.scrollbar===!1)&&Ct&&!Ct.el&&(Rt=!0),tt.includes("navigation")&&Ye.navigation&&(Ye.navigation.prevEl||ft)&&(Ye.navigation.nextEl||nt)&&(xt.navigation||xt.navigation===!1)&&yt&&!yt.prevEl&&!yt.nextEl&&(Tt=!0);const Nt=Lt=>{Be[Lt]&&(Be[Lt].destroy(),Lt==="navigation"?(Be.isElement&&(Be[Lt].prevEl.remove(),Be[Lt].nextEl.remove()),xt[Lt].prevEl=void 0,xt[Lt].nextEl=void 0,Be[Lt].prevEl=void 0,Be[Lt].nextEl=void 0):(Be.isElement&&Be[Lt].el.remove(),xt[Lt].el=void 0,Be[Lt].el=void 0))};tt.includes("loop")&&Be.isElement&&(xt.loop&&!Ye.loop?Bt=!0:!xt.loop&&Ye.loop?Dt=!0:Pt=!0),At.forEach(Lt=>{if(isObject$1(xt[Lt])&&isObject$1(Ye[Lt]))extend$2(xt[Lt],Ye[Lt]),(Lt==="navigation"||Lt==="pagination"||Lt==="scrollbar")&&"enabled"in Ye[Lt]&&!Ye[Lt].enabled&&Nt(Lt);else{const Wt=Ye[Lt];(Wt===!0||Wt===!1)&&(Lt==="navigation"||Lt==="pagination"||Lt==="scrollbar")?Wt===!1&&Nt(Lt):xt[Lt]=Ye[Lt]}}),At.includes("controller")&&!It&&Be.controller&&Be.controller.control&&xt.controller&&xt.controller.control&&(Be.controller.control=xt.controller.control),tt.includes("children")&&Le&&kt&&xt.virtual.enabled&&(kt.slides=Le,kt.update(!0)),tt.includes("children")&&Le&&xt.loop&&(Pt=!0),bt&&vt.init()&&vt.update(!0),It&&(Be.controller.control=xt.controller.control),wt&&(Be.isElement&&(!gt||typeof gt=="string")&&(gt=document.createElement("div"),gt.classList.add("swiper-pagination"),Be.el.shadowEl.appendChild(gt)),gt&&(xt.pagination.el=gt),Et.init(),Et.render(),Et.update()),Rt&&(Be.isElement&&(!ht||typeof ht=="string")&&(ht=document.createElement("div"),ht.classList.add("swiper-scrollbar"),Be.el.shadowEl.appendChild(ht)),ht&&(xt.scrollbar.el=ht),Ct.init(),Ct.updateSize(),Ct.setTranslate()),Tt&&(Be.isElement&&((!nt||typeof nt=="string")&&(nt=document.createElement("div"),nt.classList.add("swiper-button-next"),Be.el.shadowEl.appendChild(nt)),(!ft||typeof ft=="string")&&(ft=document.createElement("div"),ft.classList.add("swiper-button-prev"),Be.el.shadowEl.appendChild(ft))),nt&&(xt.navigation.nextEl=nt),ft&&(xt.navigation.prevEl=ft),yt.init(),yt.update()),tt.includes("allowSlideNext")&&(Be.allowSlideNext=Ye.allowSlideNext),tt.includes("allowSlidePrev")&&(Be.allowSlidePrev=Ye.allowSlidePrev),tt.includes("direction")&&Be.changeDirection(Ye.direction,!1),(Bt||Pt)&&Be.loopDestroy(),(Dt||Pt)&&Be.loopCreate(),Be.update()}function renderVirtual(Be,Le,Ye){if(!Ye)return null;const tt=Et=>{let yt=Et;return Et<0?yt=Le.length+Et:yt>=Le.length&&(yt=yt-Le.length),yt},nt=Be.isHorizontal()?{[Be.rtlTranslate?"right":"left"]:`${Ye.offset}px`}:{top:`${Ye.offset}px`},{from:ft,to:ht}=Ye,gt=Be.params.loop?-Le.length:0,At=Be.params.loop?Le.length*2:Le.length,xt=[];for(let Et=gt;Et<At;Et+=1)Et>=ft&&Et<=ht&&xt.push(Le[tt(Et)]);return xt.map((Et,yt)=>React.cloneElement(Et,{swiper:Be,style:nt,key:`slide-${yt}`}))}const updateOnVirtualData=Be=>{!Be||Be.destroyed||!Be.params.virtual||Be.params.virtual&&!Be.params.virtual.enabled||(Be.updateSlides(),Be.updateProgress(),Be.updateSlidesClasses(),Be.parallax&&Be.params.parallax&&Be.params.parallax.enabled&&Be.parallax.setTranslate())};function useIsomorphicLayoutEffect(Be,Le){return typeof window>"u"?React.useEffect(Be,Le):React.useLayoutEffect(Be,Le)}const SwiperSlideContext=React.createContext(null),SwiperContext=React.createContext(null);function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(Be){for(var Le=1;Le<arguments.length;Le++){var Ye=arguments[Le];for(var tt in Ye)Object.prototype.hasOwnProperty.call(Ye,tt)&&(Be[tt]=Ye[tt])}return Be},_extends$3.apply(this,arguments)}const Swiper=React.forwardRef(function(Be,Le){let{className:Ye,tag:tt="div",wrapperTag:nt="div",children:ft,onSwiper:ht,...gt}=Be===void 0?{}:Be,At=!1;const[xt,Et]=React.useState("swiper"),[yt,Ct]=React.useState(null),[kt,vt]=React.useState(!1),bt=React.useRef(!1),It=React.useRef(null),wt=React.useRef(null),Rt=React.useRef(null),Tt=React.useRef(null),Bt=React.useRef(null),Dt=React.useRef(null),Pt=React.useRef(null),Nt=React.useRef(null),{params:Lt,passedParams:Wt,rest:$t,events:Kt}=getParams(gt),{slides:Vt,slots:Ut}=getChildren(ft),_t=()=>{vt(!kt)};Object.assign(Lt.on,{_containerClasses(qt,zt){Et(zt)}});const Xt=()=>{Object.assign(Lt.on,Kt),At=!0;const qt={...Lt};if(delete qt.wrapperClass,wt.current=new Swiper$1(qt),wt.current.virtual&&wt.current.params.virtual.enabled){wt.current.virtual.slides=Vt;const zt={cache:!1,slides:Vt,renderExternal:Ct,renderExternalUpdate:!1};extend$2(wt.current.params.virtual,zt),extend$2(wt.current.originalParams.virtual,zt)}};It.current||Xt(),wt.current&&wt.current.on("_beforeBreakpoint",_t);const Qt=()=>{At||!Kt||!wt.current||Object.keys(Kt).forEach(qt=>{wt.current.on(qt,Kt[qt])})},jt=()=>{!Kt||!wt.current||Object.keys(Kt).forEach(qt=>{wt.current.off(qt,Kt[qt])})};React.useEffect(()=>()=>{wt.current&&wt.current.off("_beforeBreakpoint",_t)}),React.useEffect(()=>{!bt.current&&wt.current&&(wt.current.emitSlidesClasses(),bt.current=!0)}),useIsomorphicLayoutEffect(()=>{if(Le&&(Le.current=It.current),!!It.current)return wt.current.destroyed&&Xt(),mountSwiper({el:It.current,nextEl:Bt.current,prevEl:Dt.current,paginationEl:Pt.current,scrollbarEl:Nt.current,swiper:wt.current},Lt),ht&&ht(wt.current),()=>{wt.current&&!wt.current.destroyed&&wt.current.destroy(!0,!1)}},[]),useIsomorphicLayoutEffect(()=>{Qt();const qt=getChangedParams(Wt,Rt.current,Vt,Tt.current,zt=>zt.key);return Rt.current=Wt,Tt.current=Vt,qt.length&&wt.current&&!wt.current.destroyed&&updateSwiper({swiper:wt.current,slides:Vt,passedParams:Wt,changedParams:qt,nextEl:Bt.current,prevEl:Dt.current,scrollbarEl:Nt.current,paginationEl:Pt.current}),()=>{jt()}}),useIsomorphicLayoutEffect(()=>{updateOnVirtualData(wt.current)},[yt]);function Gt(){return Lt.virtual?renderVirtual(wt.current,Vt,yt):Vt.map((qt,zt)=>React.cloneElement(qt,{swiper:wt.current,swiperSlideIndex:zt}))}return React.createElement(tt,_extends$3({ref:It,className:uniqueClasses(`${xt}${Ye?` ${Ye}`:""}`)},$t),React.createElement(SwiperContext.Provider,{value:wt.current},Ut["container-start"],React.createElement(nt,{className:wrapperClass(Lt.wrapperClass)},Ut["wrapper-start"],Gt(),Ut["wrapper-end"]),needsNavigation(Lt)&&React.createElement(React.Fragment,null,React.createElement("div",{ref:Dt,className:"swiper-button-prev"}),React.createElement("div",{ref:Bt,className:"swiper-button-next"})),needsScrollbar(Lt)&&React.createElement("div",{ref:Nt,className:"swiper-scrollbar"}),needsPagination(Lt)&&React.createElement("div",{ref:Pt,className:"swiper-pagination"}),Ut["container-end"]))});Swiper.displayName="Swiper";function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(Be){for(var Le=1;Le<arguments.length;Le++){var Ye=arguments[Le];for(var tt in Ye)Object.prototype.hasOwnProperty.call(Ye,tt)&&(Be[tt]=Ye[tt])}return Be},_extends$2.apply(this,arguments)}const SwiperSlide=React.forwardRef(function(Be,Le){let{tag:Ye="div",children:tt,className:nt="",swiper:ft,zoom:ht,lazy:gt,virtualIndex:At,swiperSlideIndex:xt,...Et}=Be===void 0?{}:Be;const yt=React.useRef(null),[Ct,kt]=React.useState("swiper-slide"),[vt,bt]=React.useState(!1);function It(Bt,Dt,Pt){Dt===yt.current&&kt(Pt)}useIsomorphicLayoutEffect(()=>{if(typeof xt<"u"&&(yt.current.swiperSlideIndex=xt),Le&&(Le.current=yt.current),!(!yt.current||!ft)){if(ft.destroyed){Ct!=="swiper-slide"&&kt("swiper-slide");return}return ft.on("_slideClass",It),()=>{ft&&ft.off("_slideClass",It)}}}),useIsomorphicLayoutEffect(()=>{ft&&yt.current&&!ft.destroyed&&kt(ft.getSlideClasses(yt.current))},[ft]);const wt={isActive:Ct.indexOf("swiper-slide-active")>=0,isVisible:Ct.indexOf("swiper-slide-visible")>=0,isPrev:Ct.indexOf("swiper-slide-prev")>=0,isNext:Ct.indexOf("swiper-slide-next")>=0},Rt=()=>typeof tt=="function"?tt(wt):tt,Tt=()=>{bt(!0)};return React.createElement(Ye,_extends$2({ref:yt,className:uniqueClasses(`${Ct}${nt?` ${nt}`:""}`),"data-swiper-slide-index":At,onLoad:Tt},Et),ht&&React.createElement(SwiperSlideContext.Provider,{value:wt},React.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof ht=="number"?ht:void 0},Rt(),gt&&!vt&&React.createElement("div",{className:"swiper-lazy-preloader"}))),!ht&&React.createElement(SwiperSlideContext.Provider,{value:wt},Rt(),gt&&!vt&&React.createElement("div",{className:"swiper-lazy-preloader"})))});SwiperSlide.displayName="SwiperSlide";const step1="data:image/svg+xml,%3csvg%20width='74'%20height='44'%20viewBox='0%200%2074%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8319_10898)'%3e%3cpath%20d='M0.227051%204.7727C0.227051%202.56356%202.01791%200.772705%204.22705%200.772705L70.147%200.772705C72.3562%200.772705%2074.147%202.56357%2074.147%204.77271V39.3327C74.147%2041.5419%2072.3562%2043.3327%2070.147%2043.3327L4.22706%2043.3327C2.01792%2043.3327%200.227051%2041.5418%200.227051%2039.3327L0.227051%204.7727Z'%20fill='white'/%3e%3cpath%20d='M0.727051%204.7727C0.727051%202.8397%202.29405%201.27271%204.22705%201.27271L70.147%201.27271C72.08%201.27271%2073.647%202.83971%2073.647%204.77271V39.3327C73.647%2041.2657%2072.08%2042.8327%2070.147%2042.8327L4.22706%2042.8327C2.29406%2042.8327%200.727051%2041.2657%200.727051%2039.3327L0.727051%204.7727Z'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.36742%2010.0223C4.36752%209.86768%204.49285%209.74243%204.64742%209.74243L69.8559%209.74243C70.0106%209.74243%2070.1359%209.86779%2070.1359%2010.0224V10.8544C70.1359%2011.009%2070.0105%2011.1344%2069.8559%2011.1344L4.64688%2011.1344C4.49217%2011.1344%204.36678%2011.0089%204.36688%2010.8542L4.36742%2010.0223Z'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='17.0227'%20width='17.08'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='22.342'%20width='17.08'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='27.6624'%20width='23.8'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='32.9827'%20width='7.56'%20height='2.52'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='4.3667'%20y='3.86255'%20width='31.36'%20height='3.08'%20rx='0.28'%20fill='%23D7D7D7'/%3e%3crect%20x='63.7876'%20y='3.70435'%20width='6.44'%20height='3.36'%20rx='0.28'%20fill='%23DBB107'/%3e%3cg%20clip-path='url(%23clip1_8319_10898)'%3e%3cg%20clip-path='url(%23clip2_8319_10898)'%3e%3crect%20x='4.30713'%20y='13.9685'%20width='19.5599'%20height='23.4718'%20rx='1.4'%20fill='%23C9C9C9'/%3e%3cpath%20d='M24.2206%2034.0174C25.1192%2035.6252%2025.6364%2039.3334%2025.6364%2039.3334H2.98291C2.98291%2039.3334%203.50035%2035.6248%204.39876%2034.0174C5.29716%2032.4099%2010.7724%2030.919%2010.7724%2030.919C11.2573%2031.7951%2012.6809%2032.5943%2014.138%2032.63C15.7193%2032.6688%2017.3401%2031.8695%2017.8443%2030.9185C17.8443%2030.9185%2023.322%2032.4095%2024.2206%2034.0174Z'%20fill='white'/%3e%3cpath%20d='M11.6467%2029.6414V29.6773C11.6368%2030.4351%2010.9989%2031.0049%209.73291%2031.3868C11.2584%2032.495%2012.7839%2033.3815%2014.3094%2033.3815C15.8349%2033.3815%2017.3604%2032.495%2018.8859%2031.3868C17.6285%2031.0045%2016.9905%2030.4338%2016.9721%2029.6747C16.9721%2029.3866%2016.9731%2026.5799%2016.9744%2026.2918C17.0653%2026.3046%2017.0576%2026.2965%2016.9744%2026.2734C16.9769%2025.3243%2016.981%2026.5667%2016.9866%2025.2697C16.9923%2023.9727%2011.5586%2022.8124%2011.6384%2026.3737C11.6395%2026.7368%2011.6416%2029.2302%2011.6467%2029.6414Z'%20fill='url(%23paint0_linear_8319_10898)'/%3e%3cpath%20d='M24.2206%2034.0174C25.1192%2035.6252%2025.6364%2039.3334%2025.6364%2039.3334H2.98291C2.98291%2039.3334%203.50035%2035.6248%204.39876%2034.0174C5.29716%2032.4099%2010.7724%2030.919%2010.7724%2030.919C10.7724%2031.8934%2012.6611%2033.2985%2014.138%2033.3236C16.1975%2033.3236%2017.8443%2031.8934%2017.8443%2030.9185C17.8443%2030.9185%2023.322%2032.4095%2024.2206%2034.0174Z'%20fill='%23007AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.0534%2026.0701C17.321%2028.1537%2015.6774%2029.617%2014.3206%2029.617C12.8015%2029.617%2011.1821%2028.0835%2010.5166%2025.9209C10.468%2025.9369%2010.4115%2025.9491%2010.3463%2025.9574C9.97084%2026.0049%209.72284%2024.9825%209.63634%2024.6008C9.62277%2024.5409%209.60695%2024.4836%209.59135%2024.427C9.50748%2024.1231%209.43001%2023.8423%209.74386%2023.3188C9.89353%2023.0691%2010.0618%2023.0312%2010.211%2023.0849C10.2713%2020.4793%2010.7708%2017.947%2014.3206%2017.947C17.9246%2017.947%2018.3845%2020.5007%2018.4327%2023.1917C18.5347%2023.2095%2018.6385%2023.2834%2018.7338%2023.4457C19.0427%2023.9722%2018.9625%2024.2522%2018.8758%2024.5554C18.8597%2024.6118%2018.8433%2024.669%2018.8292%2024.7287C18.7391%2025.1095%2018.4814%2026.1296%2018.1064%2026.0785C18.0881%2026.076%2018.0704%2026.0732%2018.0534%2026.0701Z'%20fill='url(%23paint1_linear_8319_10898)'/%3e%3c/g%3e%3c/g%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip3_8319_10898)'%3e%3cpath%20d='M65.1692%2034.8527V34.8672C65.1652%2035.1737%2064.9071%2035.4042%2064.395%2035.5587C65.0121%2036.007%2065.6292%2036.3656%2066.2463%2036.3656C66.8633%2036.3656%2067.4804%2036.007%2068.0975%2035.5587C67.5889%2035.4041%2067.3308%2035.1732%2067.3233%2034.8661C67.3233%2034.7496%2067.3237%2033.6143%2067.3243%2033.4977C67.3611%2033.5029%2067.3579%2033.4996%2067.3243%2033.4903C67.3253%2033.1064%2067.3269%2033.6089%2067.3292%2033.0843C67.3315%2032.5596%2065.1335%2032.0902%2065.1658%2033.5308C65.1662%2033.6777%2065.1671%2034.6863%2065.1692%2034.8527Z'%20fill='url(%23paint2_linear_8319_10898)'/%3e%3cpath%20d='M70.2564%2036.6232C70.6199%2037.2736%2070.8292%2038.7736%2070.8292%2038.7736H61.6655C61.6655%2038.7736%2061.8748%2037.2734%2062.2383%2036.6232C62.6017%2035.973%2064.8164%2035.3699%2064.8164%2035.3699C64.8164%2035.764%2065.5805%2036.3324%2066.1779%2036.3425C67.011%2036.3425%2067.6771%2035.764%2067.6771%2035.3696C67.6771%2035.3696%2069.8929%2035.9728%2070.2564%2036.6232Z'%20fill='%23C6C6C6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M67.6813%2033.4161C67.3844%2034.2908%2066.7176%2034.9051%2066.1672%2034.9051C65.554%2034.9051%2064.9005%2034.2676%2064.6282%2033.3668C64.6038%2033.3802%2064.572%2033.3902%2064.5316%2033.3967C64.3821%2033.4206%2064.2696%2033.0151%2064.23%2032.8636C64.2238%2032.8399%2064.2167%2032.8171%2064.2097%2032.7947C64.1722%2032.6743%2064.1376%2032.5631%2064.2562%2032.3497C64.3318%2032.2137%2064.4256%2032.2284%2064.498%2032.2804C64.5053%2031.1457%2064.6147%2029.991%2066.1672%2030.0082C67.8446%2030.0082%2067.841%2031.1465%2067.8373%2032.313C67.8372%2032.3238%2067.8372%2032.3347%2067.8372%2032.3455C67.9174%2032.2842%2068.0295%2032.254%2068.1018%2032.4149C68.2019%2032.6376%2068.158%2032.7455%2068.1104%2032.8623C68.1016%2032.8841%2068.0926%2032.9061%2068.0844%2032.9292C68.0321%2033.0768%2067.8857%2033.4713%2067.7388%2033.4349C67.717%2033.4295%2067.6979%2033.4232%2067.6813%2033.4161Z'%20fill='url(%23paint3_linear_8319_10898)'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8319_10898'%20x1='13.9035'%20y1='26.5902'%20x2='13.9035'%20y2='30.9977'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B1B1B1'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8319_10898'%20x1='10.71'%20y1='23.7275'%20x2='16.5256'%20y2='23.7495'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8319_10898'%20x1='66.0821'%20y1='33.6184'%20x2='66.0821'%20y2='35.4013'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D6D4D4'/%3e%3cstop%20offset='1'%20stop-color='%23E4E4E4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8319_10898'%20x1='64.4093'%20y1='33.0791'%20x2='66.3543'%20y2='33.0791'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CECECE'/%3e%3cstop%20offset='1'%20stop-color='%23E7E7E7'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_8319_10898'%3e%3crect%20x='0.227051'%20y='0.772461'%20width='73.7729'%20height='42.455'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10898'%3e%3crect%20x='4.3667'%20y='13.9426'%20width='19.32'%20height='23.52'%20rx='1.04397'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10898'%3e%3crect%20width='24.9189'%20height='24.9189'%20fill='white'%20transform='translate(1.8501%2013.9429)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10898'%3e%3crect%20width='10.08'%20height='10.08'%20fill='white'%20transform='translate(61.2065%2028.5022)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",step2="data:image/svg+xml,%3csvg%20width='73'%20height='42'%20viewBox='0%200%2073%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20clip-path='url(%23clip0_8319_10931)'%3e%3cg%20clip-path='url(%23clip1_8319_10931)'%3e%3cpath%20d='M-49.9917%20-40.2858C-49.9917%20-45.6521%20-45.6415%20-50.0023%20-40.2752%20-50.0023L117.375%20-50.0023C122.742%20-50.0023%20127.092%20-45.6521%20127.092%20-40.2858V42.2813C127.092%2047.6476%20122.742%2051.9979%20117.375%2051.9979L-40.2752%2051.9979C-45.6415%2051.9979%20-49.9917%2047.6476%20-49.9917%2042.2813L-49.9917%20-40.2858Z'%20fill='white'/%3e%3cpath%20d='M-48.7771%20-40.2858C-48.7771%20-44.9813%20-44.9707%20-48.7878%20-40.2752%20-48.7878L117.375%20-48.7878C122.071%20-48.7878%20125.877%20-44.9813%20125.877%20-40.2858V42.2813C125.877%2046.9768%20122.071%2050.7833%20117.375%2050.7833L-40.2752%2050.7833C-44.9707%2050.7833%20-48.7771%2046.9768%20-48.7771%2042.2813L-48.7771%20-40.2858Z'%20stroke='black'%20stroke-opacity='0.1'%20stroke-width='2.42913'/%3e%3crect%20opacity='0.25'%20x='-39.3672'%20y='-43.6262'%20width='112.625'%20height='81.4585'%20fill='url(%23pattern0_8319_10931)'/%3e%3cpath%20d='M15.5587%2020.4843H16.9621C17.2785%2020.4843%2017.5198%2020.5085%2017.6858%2020.5569C17.9089%2020.6227%2018.1%2020.7394%2018.2591%2020.9071C18.4182%2021.0749%2018.5392%2021.2807%2018.6222%2021.5245C18.7052%2021.7666%2018.7467%2022.0658%2018.7467%2022.422C18.7467%2022.735%2018.7078%2023.0048%2018.63%2023.2314C18.5349%2023.508%2018.3991%2023.732%2018.2228%2023.9032C18.0896%2024.0329%2017.9097%2024.1341%2017.6832%2024.2067C17.5137%2024.2603%2017.2872%2024.2871%2017.0036%2024.2871H15.5587V20.4843ZM16.3265%2021.1276V23.6464H16.8998C17.1143%2023.6464%2017.269%2023.6343%2017.3641%2023.6101C17.4887%2023.5789%2017.5915%2023.5262%2017.6728%2023.4518C17.7558%2023.3775%2017.8233%2023.2556%2017.8752%2023.0861C17.927%2022.9149%2017.953%2022.6823%2017.953%2022.3883C17.953%2022.0943%2017.927%2021.8686%2017.8752%2021.7113C17.8233%2021.5539%2017.7506%2021.4311%2017.6573%2021.3429C17.5639%2021.2547%2017.4454%2021.1951%2017.3019%2021.1639C17.1947%2021.1397%2016.9846%2021.1276%2016.6715%2021.1276H16.3265ZM19.2448%2022.4091C19.2448%2022.0217%2019.3027%2021.6966%2019.4186%2021.4337C19.5051%2021.24%2019.6226%2021.0662%2019.7714%2020.9123C19.9218%2020.7584%2020.0861%2020.6443%2020.2642%2020.5699C20.5011%2020.4696%2020.7744%2020.4195%2021.0839%2020.4195C21.6442%2020.4195%2022.0921%2020.5933%2022.4276%2020.9409C22.7648%2021.2884%2022.9335%2021.7718%2022.9335%2022.3909C22.9335%2023.0048%2022.7666%2023.4856%2022.4328%2023.8332C22.0991%2024.179%2021.6529%2024.352%2021.0943%2024.352C20.5288%2024.352%2020.0792%2024.1799%2019.7454%2023.8358C19.4117%2023.4899%2019.2448%2023.0143%2019.2448%2022.4091ZM20.036%2022.3831C20.036%2022.8137%2020.1354%2023.1406%2020.3343%2023.3636C20.5331%2023.585%2020.7856%2023.6957%2021.0917%2023.6957C21.3978%2023.6957%2021.6486%2023.5859%2021.844%2023.3662C22.0411%2023.1449%2022.1397%2022.8137%2022.1397%2022.3727C22.1397%2021.9369%2022.0437%2021.6118%2021.8518%2021.3974C21.6615%2021.183%2021.4082%2021.0757%2021.0917%2021.0757C20.7752%2021.0757%2020.5202%2021.1847%2020.3265%2021.4026C20.1328%2021.6187%2020.036%2021.9456%2020.036%2022.3831ZM23.5379%2020.4843H25.0579C25.3588%2020.4843%2025.5828%2020.4973%2025.7298%2020.5232C25.8785%2020.5474%2026.0108%2020.5993%2026.1267%2020.6789C26.2443%2020.7584%2026.342%2020.8648%2026.4198%2020.9979C26.4976%2021.1293%2026.5365%2021.2772%2026.5365%2021.4415C26.5365%2021.6196%2026.4881%2021.783%2026.3913%2021.9318C26.2961%2022.0805%2026.1664%2022.192%2026.0022%2022.2664C26.2339%2022.3338%2026.412%2022.4488%2026.5365%2022.6114C26.661%2022.7739%2026.7233%2022.965%2026.7233%2023.1847C26.7233%2023.3576%2026.6826%2023.5262%2026.6014%2023.6905C26.5218%2023.853%2026.412%2023.9836%2026.2719%2024.0822C26.1336%2024.179%2025.9624%2024.2387%2025.7583%2024.2612C25.6303%2024.275%2025.3217%2024.2837%2024.8323%2024.2871H23.5379V20.4843ZM24.3057%2021.1172V21.9966H24.8089C25.1081%2021.9966%2025.294%2021.9923%2025.3666%2021.9836C25.4981%2021.9681%2025.6009%2021.9231%2025.6753%2021.8488C25.7514%2021.7727%2025.7894%2021.6732%2025.7894%2021.5504C25.7894%2021.4328%2025.7566%2021.3377%2025.6909%2021.2651C25.6269%2021.1907%2025.5309%2021.1458%2025.4029%2021.1302C25.3268%2021.1216%2025.1081%2021.1172%2024.7467%2021.1172H24.3057ZM24.3057%2022.6295V23.6464H25.0164C25.2931%2023.6464%2025.4687%2023.6386%2025.543%2023.623C25.6572%2023.6023%2025.7497%2023.5521%2025.8206%2023.4726C25.8932%2023.3913%2025.9295%2023.2832%2025.9295%2023.1483C25.9295%2023.0342%2025.9019%2022.9374%2025.8465%2022.8578C25.7912%2022.7783%2025.7108%2022.7203%2025.6053%2022.684C25.5015%2022.6477%2025.275%2022.6295%2024.9256%2022.6295H24.3057ZM29.9243%2020.4687C30.2926%2020.4687%2030.5806%2020.6002%2030.7881%2020.863C31.0354%2021.1743%2031.159%2021.6905%2031.159%2022.4116C31.159%2023.1311%2031.0345%2023.6481%2030.7855%2023.9629C30.5797%2024.2223%2030.2926%2024.352%2029.9243%2024.352C29.5542%2024.352%2029.2559%2024.2102%2029.0293%2023.9265C28.8028%2023.6412%2028.6895%2023.1336%2028.6895%2022.4039C28.6895%2021.6879%2028.814%2021.1726%2029.0631%2020.8578C29.2689%2020.5984%2029.5559%2020.4687%2029.9243%2020.4687ZM29.9243%2021.0731C29.8361%2021.0731%2029.7574%2021.1017%2029.6882%2021.1587C29.6191%2021.2141%2029.5654%2021.3144%2029.5274%2021.4597C29.4772%2021.6481%2029.4522%2021.9655%2029.4522%2022.4116C29.4522%2022.8578%2029.4747%2023.1648%2029.5196%2023.3325C29.5646%2023.4985%2029.6208%2023.6092%2029.6882%2023.6645C29.7574%2023.7199%2029.8361%2023.7476%2029.9243%2023.7476C30.0125%2023.7476%2030.0912%2023.7199%2030.1603%2023.6645C30.2295%2023.6075%2030.2831%2023.5063%2030.3212%2023.3611C30.3713%2023.1743%2030.3964%2022.8578%2030.3964%2022.4116C30.3964%2021.9655%2030.3739%2021.6594%2030.3289%2021.4934C30.284%2021.3256%2030.2269%2021.2141%2030.1577%2021.1587C30.0903%2021.1017%2030.0125%2021.0731%2029.9243%2021.0731ZM32.2744%2022.2353C32.0859%2022.1557%2031.9485%2022.0468%2031.862%2021.9084C31.7773%2021.7683%2031.7349%2021.6153%2031.7349%2021.4493C31.7349%2021.1657%2031.8335%2020.9313%2032.0306%2020.7463C32.2295%2020.5613%2032.5114%2020.4687%2032.8762%2020.4687C33.2377%2020.4687%2033.5178%2020.5613%2033.7167%2020.7463C33.9173%2020.9313%2034.0176%2021.1657%2034.0176%2021.4493C34.0176%2021.6257%2033.9718%2021.783%2033.8801%2021.9214C33.7885%2022.058%2033.6596%2022.1626%2033.4936%2022.2353C33.7046%2022.32%2033.8646%2022.4436%2033.9735%2022.6062C34.0842%2022.7688%2034.1395%2022.9564%2034.1395%2023.1691C34.1395%2023.5202%2034.0271%2023.8055%2033.8023%2024.0251C33.5792%2024.2447%2033.2818%2024.3546%2032.91%2024.3546C32.5641%2024.3546%2032.2762%2024.2638%2032.0462%2024.0822C31.7747%2023.8677%2031.6389%2023.5738%2031.6389%2023.2002C31.6389%2022.9944%2031.6899%2022.8059%2031.792%2022.6347C31.894%2022.4618%2032.0548%2022.3286%2032.2744%2022.2353ZM32.4249%2021.5012C32.4249%2021.6464%2032.4655%2021.7597%2032.5468%2021.841C32.6298%2021.9222%2032.7396%2021.9629%2032.8762%2021.9629C33.0146%2021.9629%2033.1253%2021.9222%2033.2083%2021.841C33.2913%2021.758%2033.3328%2021.6438%2033.3328%2021.4986C33.3328%2021.3619%2033.2913%2021.253%2033.2083%2021.1717C33.127%2021.0887%2033.0189%2021.0472%2032.884%2021.0472C32.744%2021.0472%2032.6324%2021.0887%2032.5494%2021.1717C32.4664%2021.2547%2032.4249%2021.3645%2032.4249%2021.5012ZM32.3575%2023.1302C32.3575%2023.3308%2032.4085%2023.4873%2032.5105%2023.5997C32.6143%2023.7121%2032.7431%2023.7683%2032.897%2023.7683C33.0475%2023.7683%2033.172%2023.7147%2033.2705%2023.6075C33.3691%2023.4985%2033.4184%2023.342%2033.4184%2023.138C33.4184%2022.9598%2033.3682%2022.8172%2033.2679%2022.71C33.1676%2022.601%2033.0405%2022.5465%2032.8866%2022.5465C32.7085%2022.5465%2032.5753%2022.6079%2032.4872%2022.7307C32.4007%2022.8535%2032.3575%2022.9867%2032.3575%2023.1302ZM34.373%2024.352L35.3146%2020.4195H35.8619L34.9099%2024.352H34.373ZM36.0591%2023.278L36.7647%2023.1924C36.7871%2023.3723%2036.8477%2023.5098%2036.9462%2023.6049C37.0448%2023.7%2037.1641%2023.7476%2037.3042%2023.7476C37.4547%2023.7476%2037.5809%2023.6905%2037.6829%2023.5764C37.7867%2023.4622%2037.8386%2023.3083%2037.8386%2023.1146C37.8386%2022.9313%2037.7893%2022.786%2037.6907%2022.6788C37.5921%2022.5716%2037.472%2022.518%2037.3301%2022.518C37.2368%2022.518%2037.1252%2022.5362%2036.9955%2022.5725L37.0759%2021.9785C37.2731%2021.9836%2037.4235%2021.9413%2037.5273%2021.8513C37.631%2021.7597%2037.6829%2021.6386%2037.6829%2021.4882C37.6829%2021.3602%2037.6449%2021.2582%2037.5688%2021.1821C37.4927%2021.106%2037.3915%2021.068%2037.2653%2021.068C37.1408%2021.068%2037.0344%2021.1112%2036.9462%2021.1977C36.858%2021.2841%2036.8044%2021.4104%2036.7854%2021.5764L36.1136%2021.4622C36.1603%2021.2322%2036.2303%2021.0489%2036.3237%2020.9123C36.4188%2020.774%2036.5502%2020.6659%2036.718%2020.5881C36.8874%2020.5085%2037.0768%2020.4687%2037.286%2020.4687C37.644%2020.4687%2037.9311%2020.5829%2038.1473%2020.8112C38.3254%2020.9979%2038.4144%2021.2089%2038.4144%2021.4441C38.4144%2021.7778%2038.232%2022.0442%2037.8671%2022.243C38.085%2022.2897%2038.2588%2022.3944%2038.3885%2022.5569C38.5199%2022.7195%2038.5856%2022.9157%2038.5856%2023.1458C38.5856%2023.4795%2038.4637%2023.764%2038.2199%2023.9992C37.9761%2024.2344%2037.6726%2024.352%2037.3094%2024.352C36.9653%2024.352%2036.6799%2024.2534%2036.4534%2024.0562C36.2268%2023.8574%2036.0954%2023.598%2036.0591%2023.278ZM40.9073%2024.2871H40.1784V21.5401C39.912%2021.7891%2039.5982%2021.9733%2039.2367%2022.0926V21.4311C39.427%2021.3689%2039.6336%2021.2513%2039.8567%2021.0783C40.0798%2020.9037%2040.2328%2020.7005%2040.3158%2020.4687H40.9073V24.2871ZM41.7659%2024.352L42.7075%2020.4195H43.2548L42.3028%2024.352H41.7659ZM45.343%2024.2871H44.6141V21.5401C44.3478%2021.7891%2044.0339%2021.9733%2043.6725%2022.0926V21.4311C43.8627%2021.3689%2044.0694%2021.2513%2044.2924%2021.0783C44.5155%2020.9037%2044.6686%2020.7005%2044.7516%2020.4687H45.343V24.2871ZM46.4506%2023.4077L47.1562%2023.3299C47.1735%2023.4735%2047.2185%2023.5798%2047.2911%2023.649C47.3637%2023.7182%2047.4597%2023.7527%2047.579%2023.7527C47.7295%2023.7527%2047.8575%2023.6836%2047.9629%2023.5452C48.0684%2023.4069%2048.1359%2023.1198%2048.1653%2022.684C47.982%2022.8967%2047.7528%2023.0031%2047.4779%2023.0031C47.1787%2023.0031%2046.9202%2022.8881%2046.7023%2022.6581C46.4861%2022.4263%2046.378%2022.1254%2046.378%2021.7554C46.378%2021.3697%2046.4921%2021.0593%2046.7204%2020.8241C46.9504%2020.5872%2047.2427%2020.4687%2047.5972%2020.4687C47.9828%2020.4687%2048.2993%2020.6183%2048.5466%2020.9175C48.7939%2021.215%2048.9175%2021.7052%2048.9175%2022.3883C48.9175%2023.0835%2048.7887%2023.585%2048.531%2023.8928C48.2734%2024.2006%2047.9379%2024.3546%2047.5246%2024.3546C47.2271%2024.3546%2046.9867%2024.2759%2046.8034%2024.1185C46.6201%2023.9594%2046.5025%2023.7225%2046.4506%2023.4077ZM48.1004%2021.815C48.1004%2021.5798%2048.046%2021.3974%2047.937%2021.2677C47.8298%2021.138%2047.7053%2021.0731%2047.5635%2021.0731C47.4286%2021.0731%2047.3162%2021.1268%2047.2262%2021.234C47.1381%2021.3395%2047.094%2021.5133%2047.094%2021.7554C47.094%2022.0009%2047.1424%2022.1816%2047.2392%2022.2975C47.3361%2022.4116%2047.4571%2022.4687%2047.6024%2022.4687C47.7425%2022.4687%2047.86%2022.4134%2047.9552%2022.3027C48.052%2022.192%2048.1004%2022.0295%2048.1004%2021.815ZM50.0174%2022.2353C49.8289%2022.1557%2049.6914%2022.0468%2049.6049%2021.9084C49.5202%2021.7683%2049.4778%2021.6153%2049.4778%2021.4493C49.4778%2021.1657%2049.5764%2020.9313%2049.7736%2020.7463C49.9724%2020.5613%2050.2543%2020.4687%2050.6192%2020.4687C50.9806%2020.4687%2051.2608%2020.5613%2051.4597%2020.7463C51.6603%2020.9313%2051.7606%2021.1657%2051.7606%2021.4493C51.7606%2021.6257%2051.7147%2021.783%2051.6231%2021.9214C51.5314%2022.058%2051.4026%2022.1626%2051.2366%2022.2353C51.4475%2022.32%2051.6075%2022.4436%2051.7165%2022.6062C51.8271%2022.7688%2051.8825%2022.9564%2051.8825%2023.1691C51.8825%2023.5202%2051.7701%2023.8055%2051.5453%2024.0251C51.3222%2024.2447%2051.0247%2024.3546%2050.6529%2024.3546C50.3071%2024.3546%2050.0191%2024.2638%2049.7891%2024.0822C49.5176%2023.8677%2049.3819%2023.5738%2049.3819%2023.2002C49.3819%2022.9944%2049.4329%2022.8059%2049.5349%2022.6347C49.6369%2022.4618%2049.7978%2022.3286%2050.0174%2022.2353ZM50.1678%2021.5012C50.1678%2021.6464%2050.2085%2021.7597%2050.2898%2021.841C50.3728%2021.9222%2050.4826%2021.9629%2050.6192%2021.9629C50.7575%2021.9629%2050.8682%2021.9222%2050.9512%2021.841C51.0342%2021.758%2051.0757%2021.6438%2051.0757%2021.4986C51.0757%2021.3619%2051.0342%2021.253%2050.9512%2021.1717C50.8699%2021.0887%2050.7619%2021.0472%2050.627%2021.0472C50.4869%2021.0472%2050.3754%2021.0887%2050.2924%2021.1717C50.2093%2021.2547%2050.1678%2021.3645%2050.1678%2021.5012ZM50.1004%2023.1302C50.1004%2023.3308%2050.1514%2023.4873%2050.2534%2023.5997C50.3572%2023.7121%2050.486%2023.7683%2050.6399%2023.7683C50.7904%2023.7683%2050.9149%2023.7147%2051.0135%2023.6075C51.1121%2023.4985%2051.1613%2023.342%2051.1613%2023.138C51.1613%2022.9598%2051.1112%2022.8172%2051.0109%2022.71C50.9106%2022.601%2050.7835%2022.5465%2050.6296%2022.5465C50.4515%2022.5465%2050.3183%2022.6079%2050.2301%2022.7307C50.1436%2022.8535%2050.1004%2022.9867%2050.1004%2023.1302ZM52.3235%2023.278L53.029%2023.1924C53.0515%2023.3723%2053.112%2023.5098%2053.2106%2023.6049C53.3092%2023.7%2053.4285%2023.7476%2053.5686%2023.7476C53.719%2023.7476%2053.8453%2023.6905%2053.9473%2023.5764C54.0511%2023.4622%2054.1029%2023.3083%2054.1029%2023.1146C54.1029%2022.9313%2054.0537%2022.786%2053.9551%2022.6788C53.8565%2022.5716%2053.7363%2022.518%2053.5945%2022.518C53.5011%2022.518%2053.3896%2022.5362%2053.2599%2022.5725L53.3403%2021.9785C53.5374%2021.9836%2053.6879%2021.9413%2053.7917%2021.8513C53.8954%2021.7597%2053.9473%2021.6386%2053.9473%2021.4882C53.9473%2021.3602%2053.9093%2021.2582%2053.8332%2021.1821C53.7571%2021.106%2053.6559%2021.068%2053.5297%2021.068C53.4052%2021.068%2053.2988%2021.1112%2053.2106%2021.1977C53.1224%2021.2841%2053.0688%2021.4104%2053.0498%2021.5764L52.3779%2021.4622C52.4246%2021.2322%2052.4947%2021.0489%2052.588%2020.9123C52.6832%2020.774%2052.8146%2020.6659%2052.9823%2020.5881C53.1518%2020.5085%2053.3412%2020.4687%2053.5504%2020.4687C53.9084%2020.4687%2054.1955%2020.5829%2054.4116%2020.8112C54.5897%2020.9979%2054.6788%2021.2089%2054.6788%2021.4441C54.6788%2021.7778%2054.4964%2022.0442%2054.1315%2022.243C54.3494%2022.2897%2054.5232%2022.3944%2054.6529%2022.5569C54.7843%2022.7195%2054.85%2022.9157%2054.85%2023.1458C54.85%2023.4795%2054.7281%2023.764%2054.4843%2023.9992C54.2404%2024.2344%2053.9369%2024.352%2053.5738%2024.352C53.2296%2024.352%2052.9443%2024.2534%2052.7177%2024.0562C52.4912%2023.8574%2052.3598%2023.598%2052.3235%2023.278Z'%20fill='%23007AFF'/%3e%3cg%20clip-path='url(%23clip2_8319_10931)'%3e%3cg%20clip-path='url(%23clip3_8319_10931)'%3e%3crect%20x='-40.7822'%20y='-18.129'%20width='46.7501'%20height='56.6668'%20rx='3.54167'%20fill='%23D2D2D2'/%3e%3cpath%20d='M7.51522%2030.5187C9.67871%2034.4436%2010.9241%2043.4957%2010.9241%2043.4957H-43.6177C-43.6177%2043.4957%20-42.3719%2034.4426%20-40.2088%2030.5187C-38.0458%2026.5948%20-24.8634%2022.9554%20-24.8634%2022.9554C-23.6958%2025.0941%20-20.2684%2027.0449%20-16.76%2027.1321C-12.953%2027.2267%20-9.05053%2025.2755%20-7.83675%2022.954C-7.83675%2022.954%205.35173%2026.5938%207.51522%2030.5187Z'%20fill='white'/%3e%3cpath%20d='M7.51522%2030.5187C9.67871%2034.4436%2010.9241%2043.4957%2010.9241%2043.4957H-43.6177C-43.6177%2043.4957%20-42.3719%2034.4426%20-40.2088%2030.5187C-38.0458%2026.5948%20-24.8634%2022.9554%20-24.8634%2022.9554C-24.8634%2025.3339%20-20.3161%2028.764%20-16.76%2028.8251C-11.8017%2028.8251%20-7.83675%2025.3339%20-7.83675%2022.954C-7.83675%2022.954%205.35173%2026.5938%207.51522%2030.5187Z'%20fill='%23007AFF'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3crect%20x='0.600098'%20y='0.504761'%20width='71.9'%20height='40.9904'%20rx='3.5'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cdefs%3e%3cpattern%20id='pattern0_8319_10931'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_8319_10931'%20transform='matrix(0.00598802%200%200%200.00827909%200%20-0.000885247)'/%3e%3c/pattern%3e%3cclipPath%20id='clip0_8319_10931'%3e%3crect%20x='0.100098'%20y='0.00476074'%20width='72.9'%20height='41.9904'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10931'%3e%3crect%20x='-49.9917'%20y='-50.0001'%20width='177.084'%20height='102'%20rx='4.25001'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10931'%3e%3crect%20x='-40.0728'%20y='-18.129'%20width='46.0417'%20height='56.6668'%20rx='2.83334'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10931'%3e%3crect%20width='60.2084'%20height='60.2084'%20fill='white'%20transform='translate(-46.4478%20-18.129)'/%3e%3c/clipPath%3e%3cimage%20id='image0_8319_10931'%20width='167'%20height='121'%20xlink:href='data:image/png;base64,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'/%3e%3c/defs%3e%3c/svg%3e",step3="data:image/svg+xml,%3csvg%20width='73'%20height='42'%20viewBox='0%200%2073%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20clip-path='url(%23clip0_8319_10967)'%3e%3cpath%20d='M0.100098%204.00354C0.100098%201.79441%201.89096%200.00354004%204.1001%200.00354004L69.0001%200.00354004C71.2092%200.00354004%2073.0001%201.7944%2073.0001%204.00354V37.9939C73.0001%2040.2031%2071.2092%2041.9939%2069.0001%2041.9939L4.1001%2041.9939C1.89097%2041.9939%200.100098%2040.2031%200.100098%2037.9939L0.100098%204.00354Z'%20fill='white'/%3e%3cpath%20d='M0.600098%204.00354C0.600098%202.07055%202.1671%200.50354%204.1001%200.50354L69.0001%200.50354C70.9331%200.50354%2072.5001%202.07054%2072.5001%204.00354V37.9939C72.5001%2039.9269%2070.9331%2041.4939%2069.0001%2041.4939L4.1001%2041.4939C2.16711%2041.4939%200.600098%2039.9269%200.600098%2037.9939L0.600098%204.00354Z'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.18382%209.02844C4.18392%208.87551%204.30791%208.75159%204.46084%208.75159L68.9329%208.75159C69.0859%208.75159%2069.2099%208.87561%2069.2099%209.02861V9.93257C69.2099%2010.0856%2069.0859%2010.2096%2068.9329%2010.2096L4.46029%2010.2096C4.30723%2010.2096%204.18318%2010.0855%204.18327%209.9324L4.18382%209.02844Z'%20fill='%23E9E9EB'/%3e%3crect%20x='62.7935'%20y='2.91858'%20width='6.4152'%20height='3.2076'%20rx='0.2916'%20fill='%23DBB107'/%3e%3crect%20opacity='0.25'%20x='4.47412'%20y='2.62854'%20width='46.3644'%20height='33.534'%20fill='url(%23pattern0_8319_10967)'/%3e%3cpath%20d='M4.60424%204.78977L5.11067%204.74053C5.14115%204.91052%205.2027%205.03536%205.29531%205.11508C5.38909%205.19479%205.51511%205.23465%205.67337%205.23465C5.84101%205.23465%205.96703%205.19948%206.05143%205.12915C6.13701%205.05764%206.1798%204.9744%206.1798%204.87945C6.1798%204.81849%206.16163%204.76691%206.12528%204.72471C6.09012%204.68133%206.02799%204.64382%205.93889%204.61217C5.87793%204.59107%205.73902%204.55355%205.52214%204.49963C5.24314%204.43046%205.04737%204.34547%204.93483%204.24466C4.77657%204.10281%204.69744%203.9299%204.69744%203.72592C4.69744%203.59463%204.73437%203.47212%204.80822%203.35841C4.88325%203.24353%204.99051%203.15619%205.13001%203.0964C5.27069%203.03662%205.44008%203.00672%205.6382%203.00672C5.96175%203.00672%206.205%203.07765%206.36795%203.21949C6.53207%203.36134%206.61823%203.55066%206.62644%203.78747L6.10594%203.81033C6.08367%203.67786%206.0356%203.5829%205.96175%203.52546C5.88907%203.46685%205.77946%203.43754%205.63292%203.43754C5.4817%203.43754%205.3633%203.4686%205.27772%203.53074C5.22263%203.57059%205.19508%203.62393%205.19508%203.69075C5.19508%203.75171%205.22087%203.80388%205.27245%203.84725C5.3381%203.90235%205.49753%203.95979%205.75074%204.01958C6.00395%204.07937%206.19093%204.1415%206.31168%204.20597C6.4336%204.26928%206.52855%204.35661%206.59654%204.46798C6.66571%204.57817%206.70029%204.71474%206.70029%204.87769C6.70029%205.0254%206.65926%205.16373%206.5772%205.29268C6.49514%205.42163%206.37908%205.51776%206.22903%205.58106C6.07898%205.64319%205.892%205.67426%205.66809%205.67426C5.3422%205.67426%205.09192%205.59923%204.91724%205.44918C4.74257%205.29796%204.63824%205.07815%204.60424%204.78977ZM7.66568%205.62854V3.48678H6.90076V3.05069H8.94933V3.48678H8.18617V5.62854H7.66568ZM11.2916%205.62854H10.7254L10.5003%205.04298H9.46984L9.25707%205.62854H8.70492L9.70898%203.05069H10.2594L11.2916%205.62854ZM10.3332%204.60865L9.97802%203.65207L9.62985%204.60865H10.3332ZM11.8297%205.62854V3.48678H11.0647V3.05069H13.1133V3.48678H12.3502V5.62854H11.8297ZM13.3982%205.62854V3.05069H15.3096V3.48678H13.9187V4.05826H15.2129V4.4926H13.9187V5.19421H15.3588V5.62854H13.3982ZM16.7023%205.62854V3.05069H17.2087L18.2638%204.77219V3.05069H18.7473V5.62854H18.2251L17.1859%203.94748V5.62854H16.7023ZM21.5714%205.62854H21.0052L20.7801%205.04298H19.7497L19.5369%205.62854H18.9847L19.9888%203.05069H20.5392L21.5714%205.62854ZM20.613%204.60865L20.2578%203.65207L19.9097%204.60865H20.613ZM21.7894%205.62854V3.05069H22.5684L23.0362%204.80911L23.4986%203.05069H24.2794V5.62854H23.7958V3.59931L23.2841%205.62854H22.783L22.273%203.59931V5.62854H21.7894ZM24.7436%205.62854V3.05069H26.655V3.48678H25.2641V4.05826H26.5583V4.4926H25.2641V5.19421H26.7043V5.62854H24.7436Z'%20fill='%23A6A6A6'/%3e%3cpath%20d='M27.0853%2029.1392H27.663C27.7933%2029.1392%2027.8926%2029.1492%2027.9609%2029.1691C28.0528%2029.1962%2028.1314%2029.2442%2028.1969%2029.3133C28.2624%2029.3823%2028.3123%2029.467%2028.3464%2029.5674C28.3806%2029.6671%2028.3977%2029.7903%2028.3977%2029.9369C28.3977%2030.0658%2028.3817%2030.1768%2028.3497%2030.2701C28.3105%2030.384%2028.2546%2030.4762%2028.182%2030.5467C28.1272%2030.6001%2028.0531%2030.6417%2027.9599%2030.6716C27.8901%2030.6937%2027.7968%2030.7047%2027.6801%2030.7047H27.0853V29.1392ZM27.4014%2029.404V30.4409H27.6374C27.7257%2030.4409%2027.7894%2030.436%2027.8285%2030.426C27.8798%2030.4132%2027.9221%2030.3915%2027.9556%2030.3609C27.9898%2030.3302%2028.0175%2030.2801%2028.0389%2030.2103C28.0603%2030.1398%2028.0709%2030.0441%2028.0709%2029.923C28.0709%2029.802%2028.0603%2029.7091%2028.0389%2029.6443C28.0175%2029.5795%2027.9876%2029.529%2027.9492%2029.4927C27.9108%2029.4564%2027.862%2029.4318%2027.8029%2029.419C27.7588%2029.409%2027.6723%2029.404%2027.5434%2029.404H27.4014ZM28.6027%2029.9316C28.6027%2029.7721%2028.6266%2029.6383%2028.6743%2029.5301C28.7099%2029.4503%2028.7583%2029.3788%2028.8195%2029.3154C28.8815%2029.2521%2028.9491%2029.2051%2029.0224%2029.1745C29.1199%2029.1332%2029.2324%2029.1125%2029.3599%2029.1125C29.5905%2029.1125%2029.7749%2029.1841%2029.913%2029.3272C30.0518%2029.4703%2030.1212%2029.6692%2030.1212%2029.9241C30.1212%2030.1768%2030.0525%2030.3747%2029.9151%2030.5178C29.7777%2030.6602%2029.5941%2030.7314%2029.3641%2030.7314C29.1313%2030.7314%2028.9462%2030.6606%2028.8088%2030.5189C28.6714%2030.3765%2028.6027%2030.1807%2028.6027%2029.9316ZM28.9284%2029.9209C28.9284%2030.0982%2028.9694%2030.2327%2029.0512%2030.3245C29.1331%2030.4157%2029.2371%2030.4612%2029.3631%2030.4612C29.4891%2030.4612%2029.5923%2030.416%2029.6727%2030.3256C29.7539%2030.2345%2029.7945%2030.0982%2029.7945%2029.9166C29.7945%2029.7372%2029.755%2029.6034%2029.6759%2029.5151C29.5976%2029.4268%2029.4933%2029.3827%2029.3631%2029.3827C29.2328%2029.3827%2029.1278%2029.4275%2029.048%2029.5172C28.9683%2029.6062%2028.9284%2029.7408%2028.9284%2029.9209ZM30.3701%2029.1392H30.9958C31.1197%2029.1392%2031.2119%2029.1446%2031.2724%2029.1552C31.3336%2029.1652%2031.3881%2029.1866%2031.4358%2029.2193C31.4842%2029.2521%2031.5244%2029.2958%2031.5565%2029.3507C31.5885%2029.4048%2031.6045%2029.4656%2031.6045%2029.5333C31.6045%2029.6066%2031.5846%2029.6739%2031.5447%2029.7351C31.5056%2029.7963%2031.4522%2029.8422%2031.3845%2029.8728C31.4799%2029.9006%2031.5533%2029.9479%2031.6045%2030.0149C31.6558%2030.0818%2031.6814%2030.1605%2031.6814%2030.2509C31.6814%2030.3221%2031.6647%2030.3915%2031.6312%2030.4591C31.5985%2030.526%2031.5533%2030.5798%2031.4956%2030.6204C31.4386%2030.6602%2031.3682%2030.6848%2031.2842%2030.694C31.2315%2030.6997%2031.1044%2030.7033%2030.9029%2030.7047H30.3701V29.1392ZM30.6862%2029.3998V29.7618H30.8933C31.0165%2029.7618%2031.093%2029.76%2031.1229%2029.7564C31.177%2029.75%2031.2194%2029.7315%2031.25%2029.7009C31.2813%2029.6696%2031.297%2029.6287%2031.297%2029.5781C31.297%2029.5297%2031.2834%2029.4905%2031.2564%2029.4606C31.2301%2029.43%2031.1905%2029.4115%2031.1379%2029.4051C31.1065%2029.4016%2031.0165%2029.3998%2030.8677%2029.3998H30.6862ZM30.6862%2030.0223V30.4409H30.9787C31.0927%2030.4409%2031.1649%2030.4377%2031.1955%2030.4313C31.2425%2030.4228%2031.2806%2030.4021%2031.3098%2030.3694C31.3397%2030.3359%2031.3546%2030.2914%2031.3546%2030.2359C31.3546%2030.1889%2031.3432%2030.1491%2031.3205%2030.1163C31.2977%2030.0836%2031.2646%2030.0597%2031.2212%2030.0448C31.1784%2030.0298%2031.0852%2030.0223%2030.9414%2030.0223H30.6862ZM32.9992%2029.1328C33.1508%2029.1328%2033.2693%2029.1869%2033.3548%2029.2951C33.4566%2029.4233%2033.5075%2029.6358%2033.5075%2029.9326C33.5075%2030.2288%2033.4562%2030.4417%2033.3537%2030.5712C33.269%2030.678%2033.1508%2030.7314%2032.9992%2030.7314C32.8468%2030.7314%2032.724%2030.673%2032.6307%2030.5563C32.5375%2030.4388%2032.4909%2030.2299%2032.4909%2029.9294C32.4909%2029.6347%2032.5421%2029.4226%2032.6446%2029.293C32.7293%2029.1862%2032.8475%2029.1328%2032.9992%2029.1328ZM32.9992%2029.3816C32.9629%2029.3816%2032.9305%2029.3934%2032.902%2029.4169C32.8735%2029.4396%2032.8514%2029.4809%2032.8358%2029.5407C32.8151%2029.6183%2032.8048%2029.749%2032.8048%2029.9326C32.8048%2030.1163%2032.8141%2030.2427%2032.8326%2030.3117C32.8511%2030.3801%2032.8742%2030.4256%2032.902%2030.4484C32.9305%2030.4712%2032.9629%2030.4826%2032.9992%2030.4826C33.0355%2030.4826%2033.0679%2030.4712%2033.0963%2030.4484C33.1248%2030.4249%2033.1469%2030.3833%2033.1625%2030.3235C33.1832%2030.2466%2033.1935%2030.1163%2033.1935%2029.9326C33.1935%2029.749%2033.1843%2029.623%2033.1657%2029.5546C33.1472%2029.4856%2033.1237%2029.4396%2033.0953%2029.4169C33.0675%2029.3934%2033.0355%2029.3816%2032.9992%2029.3816ZM33.9667%2029.86C33.8891%2029.8273%2033.8325%2029.7824%2033.7969%2029.7255C33.762%2029.6678%2033.7445%2029.6048%2033.7445%2029.5365C33.7445%2029.4197%2033.7851%2029.3232%2033.8663%2029.2471C33.9481%2029.1709%2034.0642%2029.1328%2034.2144%2029.1328C34.3632%2029.1328%2034.4785%2029.1709%2034.5604%2029.2471C34.643%2029.3232%2034.6843%2029.4197%2034.6843%2029.5365C34.6843%2029.6091%2034.6654%2029.6739%2034.6277%2029.7308C34.5899%2029.7871%2034.5369%2029.8301%2034.4686%2029.86C34.5554%2029.8949%2034.6213%2029.9458%2034.6661%2030.0127C34.7117%2030.0797%2034.7345%2030.1569%2034.7345%2030.2445C34.7345%2030.389%2034.6882%2030.5064%2034.5956%2030.5969C34.5038%2030.6873%2034.3813%2030.7325%2034.2283%2030.7325C34.0859%2030.7325%2033.9674%2030.6951%2033.8727%2030.6204C33.7609%2030.5321%2033.705%2030.411%2033.705%2030.2573C33.705%2030.1726%2033.726%2030.095%2033.768%2030.0245C33.81%2029.9533%2033.8762%2029.8985%2033.9667%2029.86ZM34.0286%2029.5578C34.0286%2029.6176%2034.0453%2029.6642%2034.0788%2029.6977C34.113%2029.7312%2034.1582%2029.7479%2034.2144%2029.7479C34.2714%2029.7479%2034.3169%2029.7312%2034.3511%2029.6977C34.3853%2029.6635%2034.4023%2029.6166%2034.4023%2029.5568C34.4023%2029.5005%2034.3853%2029.4557%2034.3511%2029.4222C34.3176%2029.388%2034.2731%2029.3709%2034.2176%2029.3709C34.1599%2029.3709%2034.114%2029.388%2034.0798%2029.4222C34.0457%2029.4564%2034.0286%2029.5016%2034.0286%2029.5578ZM34.0008%2030.2284C34.0008%2030.311%2034.0218%2030.3755%2034.0638%2030.4217C34.1065%2030.468%2034.1596%2030.4911%2034.2229%2030.4911C34.2849%2030.4911%2034.3361%2030.4691%2034.3767%2030.4249C34.4173%2030.3801%2034.4376%2030.3157%2034.4376%2030.2316C34.4376%2030.1583%2034.4169%2030.0996%2034.3756%2030.0554C34.3344%2030.0106%2034.282%2029.9882%2034.2187%2029.9882C34.1453%2029.9882%2034.0905%2030.0134%2034.0542%2030.064C34.0186%2030.1145%2034.0008%2030.1694%2034.0008%2030.2284ZM34.8306%2030.7314L35.2182%2029.1125H35.4435L35.0516%2030.7314H34.8306ZM35.5247%2030.2893L35.8151%2030.2541C35.8244%2030.3281%2035.8493%2030.3847%2035.8899%2030.4239C35.9305%2030.463%2035.9796%2030.4826%2036.0373%2030.4826C36.0992%2030.4826%2036.1512%2030.4591%2036.1932%2030.4121C36.2359%2030.3651%2036.2572%2030.3018%2036.2572%2030.222C36.2572%2030.1466%2036.2369%2030.0868%2036.1964%2030.0426C36.1558%2029.9985%2036.1063%2029.9764%2036.0479%2029.9764C36.0095%2029.9764%2035.9636%2029.9839%2035.9102%2029.9988L35.9433%2029.7543C36.0244%2029.7564%2036.0864%2029.739%2036.1291%2029.702C36.1718%2029.6642%2036.1932%2029.6144%2036.1932%2029.5525C36.1932%2029.4998%2036.1775%2029.4578%2036.1462%2029.4265C36.1149%2029.3951%2036.0732%2029.3795%2036.0212%2029.3795C35.97%2029.3795%2035.9262%2029.3973%2035.8899%2029.4329C35.8536%2029.4685%2035.8315%2029.5204%2035.8237%2029.5888L35.5471%2029.5418C35.5663%2029.4471%2035.5952%2029.3717%2035.6336%2029.3154C35.6728%2029.2585%2035.7269%2029.214%2035.7959%2029.1819C35.8657%2029.1492%2035.9436%2029.1328%2036.0298%2029.1328C36.1771%2029.1328%2036.2953%2029.1798%2036.3843%2029.2738C36.4576%2029.3507%2036.4943%2029.4375%2036.4943%2029.5343C36.4943%2029.6717%2036.4192%2029.7814%2036.269%2029.8632C36.3587%2029.8825%2036.4302%2029.9255%2036.4836%2029.9924C36.5377%2030.0594%2036.5648%2030.1402%2036.5648%2030.2348C36.5648%2030.3722%2036.5146%2030.4894%2036.4142%2030.5862C36.3138%2030.683%2036.1889%2030.7314%2036.0394%2030.7314C35.8977%2030.7314%2035.7803%2030.6908%2035.687%2030.6097C35.5937%2030.5278%2035.5396%2030.421%2035.5247%2030.2893ZM37.5205%2030.7047H37.2205V29.5738C37.1108%2029.6764%2036.9816%2029.7522%2036.8328%2029.8013V29.529C36.9111%2029.5034%2036.9962%2029.4549%2037.088%2029.3838C37.1799%2029.3119%2037.2429%2029.2282%2037.2771%2029.1328H37.5205V30.7047ZM37.874%2030.7314L38.2616%2029.1125H38.4869L38.095%2030.7314H37.874ZM39.3466%2030.7047H39.0465V29.5738C38.9369%2029.6764%2038.8077%2029.7522%2038.6589%2029.8013V29.529C38.7372%2029.5034%2038.8223%2029.4549%2038.9141%2029.3838C39.0059%2029.3119%2039.0689%2029.2282%2039.1031%2029.1328H39.3466V30.7047ZM39.8026%2030.3427L40.093%2030.3107C40.1001%2030.3698%2040.1187%2030.4135%2040.1486%2030.442C40.1785%2030.4705%2040.218%2030.4847%2040.2671%2030.4847C40.329%2030.4847%2040.3817%2030.4563%2040.4251%2030.3993C40.4686%2030.3423%2040.4963%2030.2242%2040.5084%2030.0448C40.433%2030.1323%2040.3386%2030.1761%2040.2254%2030.1761C40.1023%2030.1761%2039.9959%2030.1288%2039.9062%2030.0341C39.8172%2029.9387%2039.7727%2029.8148%2039.7727%2029.6625C39.7727%2029.5037%2039.8197%2029.3759%2039.9136%2029.2791C40.0083%2029.1816%2040.1286%2029.1328%2040.2746%2029.1328C40.4333%2029.1328%2040.5636%2029.1944%2040.6654%2029.3175C40.7672%2029.44%2040.8181%2029.6418%2040.8181%2029.923C40.8181%2030.2092%2040.7651%2030.4157%2040.659%2030.5424C40.5529%2030.6691%2040.4148%2030.7325%2040.2447%2030.7325C40.1222%2030.7325%2040.0233%2030.7001%2039.9478%2030.6353C39.8723%2030.5698%2039.8239%2030.4723%2039.8026%2030.3427ZM40.4817%2029.687C40.4817%2029.5902%2040.4593%2029.5151%2040.4145%2029.4617C40.3703%2029.4083%2040.3191%2029.3816%2040.2607%2029.3816C40.2052%2029.3816%2040.1589%2029.4037%2040.1219%2029.4478C40.0856%2029.4913%2040.0674%2029.5628%2040.0674%2029.6625C40.0674%2029.7636%2040.0873%2029.838%2040.1272%2029.8857C40.1671%2029.9326%2040.2169%2029.9561%2040.2767%2029.9561C40.3344%2029.9561%2040.3828%2029.9334%2040.4219%2029.8878C40.4618%2029.8422%2040.4817%2029.7753%2040.4817%2029.687ZM41.2709%2029.86C41.1933%2029.8273%2041.1367%2029.7824%2041.1011%2029.7255C41.0662%2029.6678%2041.0488%2029.6048%2041.0488%2029.5365C41.0488%2029.4197%2041.0894%2029.3232%2041.1705%2029.2471C41.2524%2029.1709%2041.3684%2029.1328%2041.5186%2029.1328C41.6674%2029.1328%2041.7828%2029.1709%2041.8646%2029.2471C41.9472%2029.3232%2041.9885%2029.4197%2041.9885%2029.5365C41.9885%2029.6091%2041.9696%2029.6739%2041.9319%2029.7308C41.8942%2029.7871%2041.8411%2029.8301%2041.7728%2029.86C41.8596%2029.8949%2041.9255%2029.9458%2041.9703%2030.0127C42.0159%2030.0797%2042.0387%2030.1569%2042.0387%2030.2445C42.0387%2030.389%2041.9924%2030.5064%2041.8999%2030.5969C41.808%2030.6873%2041.6856%2030.7325%2041.5325%2030.7325C41.3901%2030.7325%2041.2716%2030.6951%2041.1769%2030.6204C41.0651%2030.5321%2041.0093%2030.411%2041.0093%2030.2573C41.0093%2030.1726%2041.0303%2030.095%2041.0723%2030.0245C41.1143%2029.9533%2041.1805%2029.8985%2041.2709%2029.86ZM41.3328%2029.5578C41.3328%2029.6176%2041.3496%2029.6642%2041.383%2029.6977C41.4172%2029.7312%2041.4624%2029.7479%2041.5186%2029.7479C41.5756%2029.7479%2041.6212%2029.7312%2041.6553%2029.6977C41.6895%2029.6635%2041.7066%2029.6166%2041.7066%2029.5568C41.7066%2029.5005%2041.6895%2029.4557%2041.6553%2029.4222C41.6219%2029.388%2041.5774%2029.3709%2041.5218%2029.3709C41.4642%2029.3709%2041.4183%2029.388%2041.3841%2029.4222C41.3499%2029.4564%2041.3328%2029.5016%2041.3328%2029.5578ZM41.3051%2030.2284C41.3051%2030.311%2041.3261%2030.3755%2041.3681%2030.4217C41.4108%2030.468%2041.4638%2030.4911%2041.5272%2030.4911C41.5891%2030.4911%2041.6404%2030.4691%2041.681%2030.4249C41.7215%2030.3801%2041.7418%2030.3157%2041.7418%2030.2316C41.7418%2030.1583%2041.7212%2030.0996%2041.6799%2030.0554C41.6386%2030.0106%2041.5863%2029.9882%2041.5229%2029.9882C41.4496%2029.9882%2041.3948%2030.0134%2041.3585%2030.064C41.3229%2030.1145%2041.3051%2030.1694%2041.3051%2030.2284ZM42.2202%2030.2893L42.5107%2030.2541C42.5199%2030.3281%2042.5449%2030.3847%2042.5854%2030.4239C42.626%2030.463%2042.6751%2030.4826%2042.7328%2030.4826C42.7947%2030.4826%2042.8467%2030.4591%2042.8887%2030.4121C42.9314%2030.3651%2042.9528%2030.3018%2042.9528%2030.222C42.9528%2030.1466%2042.9325%2030.0868%2042.8919%2030.0426C42.8513%2029.9985%2042.8019%2029.9764%2042.7435%2029.9764C42.705%2029.9764%2042.6591%2029.9839%2042.6057%2029.9988L42.6388%2029.7543C42.72%2029.7564%2042.7819%2029.739%2042.8246%2029.702C42.8674%2029.6642%2042.8887%2029.6144%2042.8887%2029.5525C42.8887%2029.4998%2042.8731%2029.4578%2042.8417%2029.4265C42.8104%2029.3951%2042.7688%2029.3795%2042.7168%2029.3795C42.6655%2029.3795%2042.6217%2029.3973%2042.5854%2029.4329C42.5491%2029.4685%2042.5271%2029.5204%2042.5192%2029.5888L42.2427%2029.5418C42.2619%2029.4471%2042.2907%2029.3717%2042.3291%2029.3154C42.3683%2029.2585%2042.4224%2029.214%2042.4915%2029.1819C42.5612%2029.1492%2042.6392%2029.1328%2042.7253%2029.1328C42.8727%2029.1328%2042.9909%2029.1798%2043.0799%2029.2738C43.1532%2029.3507%2043.1899%2029.4375%2043.1899%2029.5343C43.1899%2029.6717%2043.1147%2029.7814%2042.9645%2029.8632C43.0542%2029.8825%2043.1258%2029.9255%2043.1792%2029.9924C43.2333%2030.0594%2043.2603%2030.1402%2043.2603%2030.2348C43.2603%2030.3722%2043.2101%2030.4894%2043.1098%2030.5862C43.0094%2030.683%2042.8844%2030.7314%2042.7349%2030.7314C42.5933%2030.7314%2042.4758%2030.6908%2042.3825%2030.6097C42.2893%2030.5278%2042.2352%2030.421%2042.2202%2030.2893Z'%20fill='%23007AFF'/%3e%3cg%20clip-path='url(%23clip1_8319_10967)'%3e%3cg%20clip-path='url(%23clip2_8319_10967)'%3e%3crect%20x='3.89111'%20y='13.1241'%20width='19.2456'%20height='23.328'%20rx='1.458'%20fill='%23D2D2D2'/%3e%3cpath%20d='M23.774%2033.1515C24.6646%2034.7673%2025.1773%2038.4938%2025.1773%2038.4938H2.72412C2.72412%2038.4938%203.23699%2034.7669%204.12745%2033.1515C5.0179%2031.5362%2010.4447%2030.0379%2010.4447%2030.0379C10.9253%2030.9184%2012.3363%2031.7215%2013.7806%2031.7574C15.3479%2031.7963%2016.9544%2030.993%2017.4541%2030.0374C17.4541%2030.0374%2022.8834%2031.5358%2023.774%2033.1515Z'%20fill='white'/%3e%3cpath%20d='M11.3212%2028.6495V28.6851C11.3115%2029.4389%2010.6815%2030.0056%209.43115%2030.3854C10.9377%2031.4876%2012.4444%2032.3694%2013.951%2032.3694C15.4575%2032.3694%2016.9642%2031.4876%2018.4708%2030.3854C17.2289%2030.0052%2016.5989%2029.4376%2016.5807%2028.6825C16.5807%2028.396%2016.5816%2025.6045%2016.583%2025.3179C16.6728%2025.3306%2016.6651%2025.3225%2016.583%2025.2996C16.5854%2024.3556%2016.5894%2025.5913%2016.595%2024.3013C16.6006%2023.0113%2011.2343%2021.8572%2011.313%2025.3993C11.3141%2025.7605%2011.3162%2028.2405%2011.3212%2028.6495Z'%20fill='url(%23paint0_linear_8319_10967)'/%3e%3cpath%20d='M23.774%2033.1515C24.6646%2034.7673%2025.1773%2038.4938%2025.1773%2038.4938H2.72412C2.72412%2038.4938%203.23699%2034.7669%204.12745%2033.1515C5.0179%2031.5362%2010.4447%2030.0379%2010.4447%2030.0379C10.4447%2031.0171%2012.3167%2032.4292%2013.7806%2032.4543C15.8218%2032.4543%2017.4541%2031.0171%2017.4541%2030.0374C17.4541%2030.0374%2022.8834%2031.5358%2023.774%2033.1515Z'%20fill='%23007AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.5277%2025.2645C16.8122%2027.3791%2015.1639%2028.8702%2013.8056%2028.8702C12.322%2028.8702%2010.742%2027.3833%2010.0641%2025.2733C9.68216%2025.2756%209.43571%2024.2888%209.34859%2023.9151C9.33461%2023.8551%209.31822%2023.7976%209.30207%2023.7409C9.21521%2023.4364%209.13499%2023.155%209.47015%2022.6267C9.55347%2022.4953%209.64178%2022.4217%209.72956%2022.3888C9.7844%2019.768%2010.2642%2017.2062%2013.8056%2017.2062C17.3499%2017.2062%2017.8275%2019.7169%2017.8817%2022.382C17.9702%2022.4152%2018.0589%2022.4898%2018.1419%2022.6235C18.4721%2023.1551%2018.3893%2023.4356%2018.2996%2023.7394L18.2996%2023.7394C18.2829%2023.7959%2018.266%2023.8532%2018.2514%2023.913C18.1612%2024.2845%2017.9071%2025.2628%2017.5277%2025.2645Z'%20fill='url(%23paint1_linear_8319_10967)'/%3e%3c/g%3e%3c/g%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip3_8319_10967)'%3e%3cpath%20d='M64.4011%2033.7762V33.7906C64.3973%2034.0968%2064.1534%2034.3271%2063.6694%2034.4814C64.2526%2034.9292%2064.8358%2035.2874%2065.419%2035.2874C66.0022%2035.2874%2066.5854%2034.9292%2067.1686%2034.4814C66.6879%2034.3269%2066.444%2034.0963%2066.437%2033.7896C66.437%2033.6732%2066.4374%2032.5391%2066.4379%2032.4227C66.4726%2032.4279%2066.4697%2032.4246%2066.4379%2032.4153C66.4388%2032.0318%2066.4404%2032.5338%2066.4425%2032.0097C66.4447%2031.4857%2064.3674%2031.0168%2064.3979%2032.4558C64.3983%2032.6025%2064.3991%2033.61%2064.4011%2033.7762Z'%20fill='url(%23paint2_linear_8319_10967)'/%3e%3cpath%20d='M69.5191%2035.3017C69.8776%2035.9146%2070.084%2037.3281%2070.084%2037.3281H61.0444C61.0444%2037.3281%2061.2509%2035.9144%2061.6094%2035.3017C61.9679%2034.689%2064.1527%2034.1207%2064.1527%2034.1207C64.1527%2034.4921%2064.9064%2035.0277%2065.4957%2035.0373C66.3175%2035.0373%2066.9747%2034.4921%2066.9747%2034.1205C66.9747%2034.1205%2069.1605%2034.6888%2069.5191%2035.3017Z'%20fill='%23C6C6C6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M67.0406%2032.2085C66.7509%2033.1524%2066.0183%2033.8267%2065.4179%2033.8267C64.7838%2033.8267%2064.1085%2033.1979%2063.8169%2032.3048C63.6457%2032.2712%2063.5307%2031.9204%2063.4883%2031.7821C63.481%2031.7584%2063.4726%2031.7358%2063.4643%2031.7136C63.4195%2031.5938%2063.3781%2031.4832%2063.5426%2031.2621C63.583%2031.2078%2063.6262%2031.1759%2063.6693%2031.1601C63.6775%2030.0146%2063.796%2028.8523%2065.4179%2028.8697C67.1407%2028.8697%2067.1709%2029.9771%2067.1677%2031.1331C67.2115%2031.1518%2067.2541%2031.1877%2067.2915%2031.2481C67.4366%2031.4821%2067.3859%2031.5888%2067.331%2031.7043L67.331%2031.7043C67.3208%2031.7258%2067.3105%2031.7476%2067.3012%2031.7706C67.2592%2031.8748%2067.1628%2032.1027%2067.0406%2032.2085Z'%20fill='url(%23paint3_linear_8319_10967)'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_8319_10967'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_8319_10967'%20transform='matrix(0.00598802%200%200%200.00827909%200%20-0.000885226)'/%3e%3c/pattern%3e%3clinearGradient%20id='paint0_linear_8319_10967'%20x1='13.5501'%20y1='25.6147'%20x2='13.5501'%20y2='29.9985'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B1B1B1'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8319_10967'%20x1='10.3827'%20y1='22.9837'%20x2='16.0242'%20y2='23.0044'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8319_10967'%20x1='65.2639'%20y1='32.5433'%20x2='65.2639'%20y2='34.3242'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D6D4D4'/%3e%3cstop%20offset='1'%20stop-color='%23E4E4E4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8319_10967'%20x1='63.6576'%20y1='31.9783'%20x2='65.5906'%20y2='31.9783'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CECECE'/%3e%3cstop%20offset='1'%20stop-color='%23E7E7E7'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_8319_10967'%3e%3crect%20x='0.100098'%20y='0.00476074'%20width='72.9'%20height='41.9904'%20rx='1.7496'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10967'%3e%3crect%20x='4.18311'%20y='13.1246'%20width='18.954'%20height='23.328'%20rx='1.1664'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10967'%3e%3crect%20width='24.786'%20height='24.786'%20fill='white'%20transform='translate(1.55908%2013.1244)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10967'%3e%3crect%20width='9.9144'%20height='9.9144'%20fill='white'%20transform='translate(60.4614%2027.4137)'/%3e%3c/clipPath%3e%3cimage%20id='image0_8319_10967'%20width='167'%20height='121'%20xlink:href='data:image/png;base64,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'/%3e%3c/defs%3e%3c/svg%3e",imageSources={light:{position:"https://sdk.incode.com/sdk/tutorials/id-position.gif",shadow:"https://sdk.incode.com/sdk/tutorials/id-shadow.gif"},dark:{position:"https://sdk.incode.com/sdk/tutorials/front-dark.gif",shadow:"https://sdk.incode.com/sdk/tutorials/front-shadow-dark.gif"}};function TutorialFront$1({onSuccess:Be,token:Le={token:""},ageAssurance:Ye}){const{t:tt}=useTranslation$1();useScreenEvents({module:eventModuleNames.front,screen:eventScreenNames.frontTutorial,token:Le==null?void 0:Le.token});const nt=React.useRef(null);useAutoFocus(nt,!0);const[ft,ht]=React.useState(tt("common.continue")),[gt,At]=React.useState(()=>tt(`tutorial.front.${Ye?"ageVerification":"titleFrame"}`)),[xt,Et]=React.useState(()=>Ye?tt("tutorial.front.ageVerificationSubtitle"):null),[yt,Ct]=React.useState(!0),[kt,vt]=React.useState(null),bt=Pt=>{const Nt=options.darkMode?"dark":"light";return imageSources[Nt][Pt]},It=()=>{ht(tt("common.continue")),At(tt("tutorial.front.titleFrame")),Et(null),Ct(!0)},wt=()=>{ht(tt("common.readyToScan")),At(tt("tutorial.front.titleGlare")),Et(null),Ct(!1)},Rt=()=>{switch(kt.slides[kt.activeIndex].id){case"AGE_ASSURANCE":It(),kt.slideTo(1);break;case"FRAME_INSTRUCTIONS":wt(),Bt(),kt.slideTo(Ye?2:1);break;case"GLARE_INSTRUCTIONS":Tt();break}};React.useEffect(()=>{Le&&addEvent({token:Le==null?void 0:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"ID Preparation feedbacks"})},[]);function Tt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be(!0)}const Bt=()=>{setTimeout(()=>{var Pt,Nt;(Pt=nt.current)==null||Pt.focus(),(Nt=nt.current)==null||Nt.blur()},0)};function Dt(Pt){const Nt=Pt.activeIndex,Lt=Pt.slides[Nt],Wt=Lt==null?void 0:Lt.getAttribute("id");Wt==="GLARE_INSTRUCTIONS"&&!Ye&&wt(),Wt==="FRAME_INSTRUCTIONS"&&It()}return mobile.isDesktop()?jsxRuntimeExports.jsx(Tutorial$1,{token:Le,src:"https://sdk.incode.com/sdk/tutorials/tutorial-front-desktop.mp4",next:Tt,type:"Front",header:jsxRuntimeExports.jsx(HiddenTitle,{"aria-hidden":"true",children:"Capture Front ID Tutorial"})}):jsxRuntimeExports.jsx(RootContainer,{cssSelector:"IncodeTutorialContainerFront",children:jsxRuntimeExports.jsxs(TutorialContainer$2,{children:[jsxRuntimeExports.jsx(TutorialHeader$1,{children:jsxRuntimeExports.jsxs("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderFront",children:[jsxRuntimeExports.jsx("h1",{ref:nt,tabIndex:-1,className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleFront",children:gt}),xt?jsxRuntimeExports.jsx(TutorialSubtitle,{children:xt}):null]})}),jsxRuntimeExports.jsxs(Swiper,{cssMode:!0,autoplay:!1,className:"IncodeSwiperComponent",onSwiper:vt,pagination:!0,modules:[Pagination],onSlideChange:Dt,children:[Ye?jsxRuntimeExports.jsx(SwiperSlide,{id:"AGE_ASSURANCE",style:{flexDirection:"column"},children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",style:{alignItems:"flex-start"},children:jsxRuntimeExports.jsxs(AgeStepsWrapper,{children:[jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"1"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep1")}),jsxRuntimeExports.jsx("img",{src:step1,alt:tt("tutorial.front.ageVerificationStep1")})]}),jsxRuntimeExports.jsx(AgeStepDivder,{}),jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"2"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep2")}),jsxRuntimeExports.jsx("img",{src:step2,alt:tt("tutorial.front.ageVerificationStep2")})]}),jsxRuntimeExports.jsx(AgeStepDivder,{}),jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"3"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep3")}),jsxRuntimeExports.jsx("img",{src:step3,alt:tt("tutorial.front.ageVerificationStep3")})]})]})})}):null,jsxRuntimeExports.jsx(SwiperSlide,{id:"FRAME_INSTRUCTIONS",children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",children:jsxRuntimeExports.jsx("img",{src:bt("position"),"aria-hidden":!yt,alt:tt("tutorial.front.titleAriaFrame")})})}),jsxRuntimeExports.jsx(SwiperSlide,{id:"GLARE_INSTRUCTIONS",children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",children:jsxRuntimeExports.jsx("img",{src:bt("shadow"),alt:tt("tutorial.front.titleGlare")})})})]}),jsxRuntimeExports.jsx(FrontTutorialAction,{className:cx("IncodeTutorialButtonContainer","IncodeTutorialButtonContainerFront"),children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonFront"),onClick:Rt,children:ft})})]})})}const TutorialPapperDLHeader=({title:Be,subtitle:Le})=>jsxRuntimeExports.jsxs("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderFront",children:[jsxRuntimeExports.jsx("h1",{className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleFront",children:Be}),jsxRuntimeExports.jsx("p",{style:{fontSize:"18px"},children:Le})]}),videoUrl="https://sdk.incode.com/sdk/tutorials/paper-license-tutorial.mp4";function TutorialFront({onSuccess:Be,token:Le}){const{t:Ye}=useTranslation$1();React.useEffect(()=>{Le!=null&&Le.token&&addEvent({token:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"ID Preparation feedbacks"})},[]);function tt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be()}return jsxRuntimeExports.jsxs(TutorialContainer$2,{children:[jsxRuntimeExports.jsx(TutorialHeader$1,{children:jsxRuntimeExports.jsx(TutorialPapperDLHeader,{title:Ye("tutorial.paperDL.titleFrame"),subtitle:Ye("tutorial.paperDL.subtitle")})}),jsxRuntimeExports.jsx(VideoContainer,{children:jsxRuntimeExports.jsx("video",{preload:"auto",playsInline:!0,src:videoUrl,muted:!0,autoPlay:!0,loop:!0})}),jsxRuntimeExports.jsx(FrontTutorialAction,{className:cx("IncodeTutorialButtonContainer","IncodeTutorialButtonContainerFront"),children:jsxRuntimeExports.jsx(StyledButton$b,{className:cx("IncodeTutorialButton","IncodeTutorialButtonFront"),onClick:tt,theme:exports.theme,children:Ye("common.continue")})})]})}const TutorialPassportHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.passport1")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.passport2")})]})};function TutorialPassport({onSuccess:Be,token:Le,src:Ye,...tt}){const nt=options.darkMode?"https://sdk.incode.com/sdk/tutorials/passport-dark.mp4":"https://sdk.incode.com/sdk/tutorials/passport.gif";Ye=Ye||nt;const{t:ft}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialPassport",payload:{tutorialPassport:!0}})},[Le.token]);function ht(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{...tt,token:Le,src:Ye,header:jsxRuntimeExports.jsx(TutorialPassportHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ht,children:ft("common.continue")})})})}function addCreditCardBack({token:Be,base64Image:Le,onProgress:Ye=emptyFunc}){return exports.api.post("/omni/add/credit-card-back/v2",{base64Image:Le},{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":"application/json"},onUploadProgress:({loaded:tt,total:nt})=>Ye(tt/nt*100)}).then(tt=>tt.data).catch(tt=>Promise.reject(tt.response.data))}function addCreditCardFront({token:Be,base64Image:Le,onProgress:Ye=emptyFunc}){return exports.api.post("/omni/add/credit-card-front/v2",{base64Image:Le},{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":"application/json"},onUploadProgress:({loaded:tt,total:nt})=>Ye(tt/nt*100)}).then(tt=>tt.data).catch(tt=>Promise.reject(tt.response.data))}class IdDetectorBase{constructor(){this.pipelineProfile=null,this.currentCanvas=null}async initialize({onCapturing:Le,onFarAway:Ye,onGlare:tt,onBlur:nt,onIDNotDetected:ft,onMaskChange:ht,onDetectionStarted:gt,onSwitchToManualCapture:At,onIDTypeChange:xt,onIDSideChange:Et,onCapturingCounterValueChange:yt,idType:Ct,isFixedMask:kt,isBlurCheckEnabled:vt,isGlareCheckEnabled:bt,pipelineProfile:It,isV2:wt=!1,onCapture:Rt=()=>{},idDetectedTimeout:Tt=0,autocaptureTimeout:Bt=-1}){this.pipelineProfile=It;const Dt=this.pipelineProfile.pipelineType;this.pipelineProfile.reconfigureParams(mobile.isDesktop(),wt),await MlWasmJSApi$1.setIdCaptureCallbacks(Dt,Ye,gt,ht,nt,tt,this.getOnCapturing(Le),this.getOnCapture(Rt),this.getOnBestFrame(),ft,At,xt,Et,yt),await MlWasmJSApi$1.setIdCaptureThresholds(Dt,It.parameters.sharpnessThreshold,It.parameters.sharpnessChangeThreshold,It.parameters.glareThreshold,It.parameters.classificationThreshold,It.parameters.sideThreshold,It.parameters.iouThreshold,Tt,Bt,It.parameters.framesAggregationInterval,It.parameters.minFaceIdQualityScore),await MlWasmJSApi$1.setIdCaptureConfigParams(Dt,kt,localStorage.getItem("isIPhone14OrHigher")==="true",Ct,vt,bt,It.parameters.isIdFaceQualityCheckEnabled,It.parameters.isIouCheckEnabled),await MlWasmJSApi$1.setIdCaptureGeometryParams(Dt,It.parameters.areaDown,It.parameters.areaUp,It.parameters.areaIOSPassportUp,It.parameters.areaIOSPassportDown,It.parameters.widthIOSUp,It.parameters.widthIOSDown,It.parameters.widthDown,It.parameters.widthUp,window.outerWidth,window.outerHeight,window.innerWidth,window.innerHeight),MlWasmJSApi$1.setIdCaptureModelType(Dt,this.pipelineProfile.parameters.modelType)}async detectCommon(Le,Ye){try{this.currentCanvas=Le;const tt=Le.getImageData();await MlWasmJSApi$1.allocateImageBuffers(tt.width,tt.height),await MlWasmJSApi$1.process(tt,Ye),this.currentCanvas.release()}catch(tt){console.error(`Exception: ${tt}`)}}}class IdCapture extends IdDetectorBase{constructor(){super(...arguments),this.bestCanvas=null,this.qualityElements=null,this.bestOrientation=null}getOnBestFrame(){return(Le,Ye,tt)=>{this.bestCanvas=this.currentCanvas.clone(),this.qualityElements={glare:Ye,sharpness:Le},this.bestOrientation=tt}}getOnCapture(Le){return()=>{this.bestCanvas.updateBase64Image(),this.bestCanvas.updateBlob(),Le(this.bestCanvas,this.qualityElements,this.bestOrientation)}}getOnCapturing(Le){return()=>{Le()}}async detect(Le){this.detectCommon(Le,this.pipelineProfile.pipelineType)}}class IdVideoSelfie extends IdDetectorBase{getOnCapturing(Le){return()=>{Le(this.currentMode,this.currentCanvas.clone().getBase64Image())}}getOnCapture(Le){return()=>{}}getOnBestFrame(){return(Le,Ye,tt)=>{}}async detect(Le){this.detectCommon(Le,this.pipelineProfile.pipelineType)}updateCurrentMode(Le){this.currentMode=Le}}function getImages$1({token:Be,body:Le,onDownloadProgress:Ye}){return exports.api.post("/omni/get/images",Le,{headers:{"X-Incode-Hardware-Id":Be},onDownloadProgress:({loaded:tt,total:nt})=>{Ye==null||Ye(tt*100/nt)}}).then(tt=>tt.data)}var __webpack_require__={};__webpack_require__.d=(Be,Le)=>{for(var Ye in Le)__webpack_require__.o(Le,Ye)&&!__webpack_require__.o(Be,Ye)&&Object.defineProperty(Be,Ye,{enumerable:!0,get:Le[Ye]})},__webpack_require__.o=(Be,Le)=>Object.prototype.hasOwnProperty.call(Be,Le);var __webpack_exports__=globalThis.pdfjsLib={};__webpack_require__.d(__webpack_exports__,{AbortException:()=>AbortException,AnnotationEditorLayer:()=>AnnotationEditorLayer,AnnotationEditorParamsType:()=>AnnotationEditorParamsType,AnnotationEditorType:()=>AnnotationEditorType,AnnotationEditorUIManager:()=>AnnotationEditorUIManager,AnnotationLayer:()=>AnnotationLayer$1,AnnotationMode:()=>AnnotationMode,ColorPicker:()=>ColorPicker,DOMSVGFactory:()=>DOMSVGFactory,DrawLayer:()=>DrawLayer,FeatureTest:()=>util_FeatureTest,GlobalWorkerOptions:()=>GlobalWorkerOptions,ImageKind:()=>util_ImageKind,InvalidPDFException:()=>InvalidPDFException,MissingPDFException:()=>MissingPDFException,OPS:()=>OPS,OutputScale:()=>OutputScale,PDFDataRangeTransport:()=>PDFDataRangeTransport$1,PDFDateString:()=>PDFDateString,PDFWorker:()=>PDFWorker,PasswordResponses:()=>PasswordResponses$1,PermissionFlag:()=>PermissionFlag,PixelsPerInch:()=>PixelsPerInch,RenderingCancelledException:()=>RenderingCancelledException,TextLayer:()=>TextLayer$1,UnexpectedResponseException:()=>UnexpectedResponseException,Util:()=>Util,VerbosityLevel:()=>VerbosityLevel,XfaLayer:()=>XfaLayer,build:()=>build,createValidAbsoluteUrl:()=>createValidAbsoluteUrl,fetchData:()=>fetchData,getDocument:()=>getDocument,getFilenameFromUrl:()=>getFilenameFromUrl$1,getPdfFilenameFromUrl:()=>getPdfFilenameFromUrl,getXfaPageViewport:()=>getXfaPageViewport,isDataScheme:()=>isDataScheme,isPdfFile:()=>isPdfFile,noContextMenu:()=>noContextMenu,normalizeUnicode:()=>normalizeUnicode,setLayerDimensions:()=>setLayerDimensions,shadow:()=>shadow,version:()=>version});const isNodeJS=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),IDENTITY_MATRIX=[1,0,0,1,0,0],FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],MAX_IMAGE_SIZE_TO_CACHE=1e7,LINE_FACTOR=1.35,RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},AnnotationEditorPrefix="pdfjs_internal_editor_",AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},util_ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,WIDGET:20},AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},VerbosityLevel={ERRORS:0,WARNINGS:1,INFOS:5},OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},PasswordResponses$1={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let verbosity=VerbosityLevel.WARNINGS;function setVerbosityLevel(Be){Number.isInteger(Be)&&(verbosity=Be)}function getVerbosityLevel(){return verbosity}function info(Be){verbosity>=VerbosityLevel.INFOS&&console.log(`Info: ${Be}`)}function warn$1(Be){verbosity>=VerbosityLevel.WARNINGS&&console.log(`Warning: ${Be}`)}function unreachable$1(Be){throw new Error(Be)}function assert(Be,Le){Be||unreachable$1(Le)}function _isValidProtocol(Be){switch(Be==null?void 0:Be.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function createValidAbsoluteUrl(Be,Le=null,Ye=null){if(!Be)return null;try{if(Ye&&typeof Be=="string"){if(Ye.addDefaultProtocol&&Be.startsWith("www.")){const nt=Be.match(/\./g);(nt==null?void 0:nt.length)>=2&&(Be=`http://${Be}`)}if(Ye.tryConvertEncoding)try{Be=stringToUTF8String(Be)}catch{}}const tt=Le?new URL(Be,Le):new URL(Be);if(_isValidProtocol(tt))return tt}catch{}return null}function shadow(Be,Le,Ye,tt=!1){return Object.defineProperty(Be,Le,{value:Ye,enumerable:!tt,configurable:!0,writable:!1}),Ye}const BaseException=function(){function Le(Ye,tt){this.message=Ye,this.name=tt}return Le.prototype=new Error,Le.constructor=Le,Le}();class PasswordException extends BaseException{constructor(Le,Ye){super(Le,"PasswordException"),this.code=Ye}}class UnknownErrorException extends BaseException{constructor(Le,Ye){super(Le,"UnknownErrorException"),this.details=Ye}}class InvalidPDFException extends BaseException{constructor(Le){super(Le,"InvalidPDFException")}}class MissingPDFException extends BaseException{constructor(Le){super(Le,"MissingPDFException")}}class UnexpectedResponseException extends BaseException{constructor(Le,Ye){super(Le,"UnexpectedResponseException"),this.status=Ye}}class FormatError extends BaseException{constructor(Le){super(Le,"FormatError")}}class AbortException extends BaseException{constructor(Le){super(Le,"AbortException")}}function bytesToString(Be){(typeof Be!="object"||(Be==null?void 0:Be.length)===void 0)&&unreachable$1("Invalid argument for bytesToString");const Le=Be.length,Ye=8192;if(Le<Ye)return String.fromCharCode.apply(null,Be);const tt=[];for(let nt=0;nt<Le;nt+=Ye){const ft=Math.min(nt+Ye,Le),ht=Be.subarray(nt,ft);tt.push(String.fromCharCode.apply(null,ht))}return tt.join("")}function stringToBytes(Be){typeof Be!="string"&&unreachable$1("Invalid argument for stringToBytes");const Le=Be.length,Ye=new Uint8Array(Le);for(let tt=0;tt<Le;++tt)Ye[tt]=Be.charCodeAt(tt)&255;return Ye}function string32(Be){return String.fromCharCode(Be>>24&255,Be>>16&255,Be>>8&255,Be&255)}function objectFromMap(Be){const Le=Object.create(null);for(const[Ye,tt]of Be)Le[Ye]=tt;return Le}function isLittleEndian(){const Be=new Uint8Array(4);return Be[0]=1,new Uint32Array(Be.buffer,0,1)[0]===1}function isEvalSupported(){try{return new Function(""),!0}catch{return!1}}class util_FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",isLittleEndian())}static get isEvalSupported(){return shadow(this,"isEvalSupported",isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"?shadow(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):shadow(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var Le,Ye;return shadow(this,"isCSSRoundSupported",(Ye=(Le=globalThis.CSS)==null?void 0:Le.supports)==null?void 0:Ye.call(Le,"width: round(1.5px, 1px)"))}}const hexNumbers=Array.from(Array(256).keys(),Be=>Be.toString(16).padStart(2,"0"));class Util{static makeHexColor(Le,Ye,tt){return`#${hexNumbers[Le]}${hexNumbers[Ye]}${hexNumbers[tt]}`}static scaleMinMax(Le,Ye){let tt;Le[0]?(Le[0]<0&&(tt=Ye[0],Ye[0]=Ye[2],Ye[2]=tt),Ye[0]*=Le[0],Ye[2]*=Le[0],Le[3]<0&&(tt=Ye[1],Ye[1]=Ye[3],Ye[3]=tt),Ye[1]*=Le[3],Ye[3]*=Le[3]):(tt=Ye[0],Ye[0]=Ye[1],Ye[1]=tt,tt=Ye[2],Ye[2]=Ye[3],Ye[3]=tt,Le[1]<0&&(tt=Ye[1],Ye[1]=Ye[3],Ye[3]=tt),Ye[1]*=Le[1],Ye[3]*=Le[1],Le[2]<0&&(tt=Ye[0],Ye[0]=Ye[2],Ye[2]=tt),Ye[0]*=Le[2],Ye[2]*=Le[2]),Ye[0]+=Le[4],Ye[1]+=Le[5],Ye[2]+=Le[4],Ye[3]+=Le[5]}static transform(Le,Ye){return[Le[0]*Ye[0]+Le[2]*Ye[1],Le[1]*Ye[0]+Le[3]*Ye[1],Le[0]*Ye[2]+Le[2]*Ye[3],Le[1]*Ye[2]+Le[3]*Ye[3],Le[0]*Ye[4]+Le[2]*Ye[5]+Le[4],Le[1]*Ye[4]+Le[3]*Ye[5]+Le[5]]}static applyTransform(Le,Ye){const tt=Le[0]*Ye[0]+Le[1]*Ye[2]+Ye[4],nt=Le[0]*Ye[1]+Le[1]*Ye[3]+Ye[5];return[tt,nt]}static applyInverseTransform(Le,Ye){const tt=Ye[0]*Ye[3]-Ye[1]*Ye[2],nt=(Le[0]*Ye[3]-Le[1]*Ye[2]+Ye[2]*Ye[5]-Ye[4]*Ye[3])/tt,ft=(-Le[0]*Ye[1]+Le[1]*Ye[0]+Ye[4]*Ye[1]-Ye[5]*Ye[0])/tt;return[nt,ft]}static getAxialAlignedBoundingBox(Le,Ye){const tt=this.applyTransform(Le,Ye),nt=this.applyTransform(Le.slice(2,4),Ye),ft=this.applyTransform([Le[0],Le[3]],Ye),ht=this.applyTransform([Le[2],Le[1]],Ye);return[Math.min(tt[0],nt[0],ft[0],ht[0]),Math.min(tt[1],nt[1],ft[1],ht[1]),Math.max(tt[0],nt[0],ft[0],ht[0]),Math.max(tt[1],nt[1],ft[1],ht[1])]}static inverseTransform(Le){const Ye=Le[0]*Le[3]-Le[1]*Le[2];return[Le[3]/Ye,-Le[1]/Ye,-Le[2]/Ye,Le[0]/Ye,(Le[2]*Le[5]-Le[4]*Le[3])/Ye,(Le[4]*Le[1]-Le[5]*Le[0])/Ye]}static singularValueDecompose2dScale(Le){const Ye=[Le[0],Le[2],Le[1],Le[3]],tt=Le[0]*Ye[0]+Le[1]*Ye[2],nt=Le[0]*Ye[1]+Le[1]*Ye[3],ft=Le[2]*Ye[0]+Le[3]*Ye[2],ht=Le[2]*Ye[1]+Le[3]*Ye[3],gt=(tt+ht)/2,At=Math.sqrt((tt+ht)**2-4*(tt*ht-ft*nt))/2,xt=gt+At||1,Et=gt-At||1;return[Math.sqrt(xt),Math.sqrt(Et)]}static normalizeRect(Le){const Ye=Le.slice(0);return Le[0]>Le[2]&&(Ye[0]=Le[2],Ye[2]=Le[0]),Le[1]>Le[3]&&(Ye[1]=Le[3],Ye[3]=Le[1]),Ye}static intersect(Le,Ye){const tt=Math.max(Math.min(Le[0],Le[2]),Math.min(Ye[0],Ye[2])),nt=Math.min(Math.max(Le[0],Le[2]),Math.max(Ye[0],Ye[2]));if(tt>nt)return null;const ft=Math.max(Math.min(Le[1],Le[3]),Math.min(Ye[1],Ye[3])),ht=Math.min(Math.max(Le[1],Le[3]),Math.max(Ye[1],Ye[3]));return ft>ht?null:[tt,ft,nt,ht]}static bezierBoundingBox(Le,Ye,tt,nt,ft,ht,gt,At,xt){return xt?(xt[0]=Math.min(xt[0],Le,gt),xt[1]=Math.min(xt[1],Ye,At),xt[2]=Math.max(xt[2],Le,gt),xt[3]=Math.max(xt[3],Ye,At)):xt=[Math.min(Le,gt),Math.min(Ye,At),Math.max(Le,gt),Math.max(Ye,At)],y0(this,Ns,L9).call(this,Le,tt,ft,gt,Ye,nt,ht,At,3*(-Le+3*(tt-ft)+gt),6*(Le-2*tt+ft),3*(tt-Le),xt),y0(this,Ns,L9).call(this,Le,tt,ft,gt,Ye,nt,ht,At,3*(-Ye+3*(nt-ht)+At),6*(Ye-2*nt+ht),3*(nt-Ye),xt),xt}}Ns=new WeakSet,Yd=function(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et){if(xt<=0||xt>=1)return;const yt=1-xt,Ct=xt*xt,kt=Ct*xt,vt=yt*(yt*(yt*Le+3*xt*Ye)+3*Ct*tt)+kt*nt,bt=yt*(yt*(yt*ft+3*xt*ht)+3*Ct*gt)+kt*At;Et[0]=Math.min(Et[0],vt),Et[1]=Math.min(Et[1],bt),Et[2]=Math.max(Et[2],vt),Et[3]=Math.max(Et[3],bt)},L9=function(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct){if(Math.abs(xt)<1e-12){Math.abs(Et)>=1e-12&&y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,-yt/Et,Ct);return}const kt=Et**2-4*yt*xt;if(kt<0)return;const vt=Math.sqrt(kt),bt=2*xt;y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,(-Et+vt)/bt,Ct),y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,(-Et-vt)/bt,Ct)},v0(Util,Ns);function stringToUTF8String(Be){return decodeURIComponent(escape(Be))}let NormalizeRegex=null,NormalizationMap=null;function normalizeUnicode(Be){return NormalizeRegex||(NormalizeRegex=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,NormalizationMap=new Map([["ſt","ſt"]])),Be.replaceAll(NormalizeRegex,(Le,Ye,tt)=>Ye?Ye.normalize("NFKC"):NormalizationMap.get(tt))}function getUuid(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const Be=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(Be);else for(let Le=0;Le<32;Le++)Be[Le]=Math.floor(Math.random()*255);return bytesToString(Be)}const AnnotationPrefix="pdfjs_internal_id_",FontRenderOps={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};function toBase64Util(Be){return Uint8Array.prototype.toBase64?Be.toBase64():btoa(bytesToString(Be))}const SVG_NS="http://www.w3.org/2000/svg",d2=class d2{};Nn(d2,"CSS",96),Nn(d2,"PDF",72),Nn(d2,"PDF_TO_CSS_UNITS",d2.CSS/d2.PDF);let PixelsPerInch=d2;async function fetchData(Be,Le="text"){if(isValidFetchUrl(Be,document.baseURI)){const Ye=await fetch(Be);if(!Ye.ok)throw new Error(Ye.statusText);switch(Le){case"arraybuffer":return Ye.arrayBuffer();case"blob":return Ye.blob();case"json":return Ye.json()}return Ye.text()}return new Promise((Ye,tt)=>{const nt=new XMLHttpRequest;nt.open("GET",Be,!0),nt.responseType=Le,nt.onreadystatechange=()=>{if(nt.readyState===XMLHttpRequest.DONE){if(nt.status===200||nt.status===0){switch(Le){case"arraybuffer":case"blob":case"json":Ye(nt.response);return}Ye(nt.responseText);return}tt(new Error(nt.statusText))}},nt.send(null)})}class PageViewport{constructor({viewBox:Le,scale:Ye,rotation:tt,offsetX:nt=0,offsetY:ft=0,dontFlip:ht=!1}){this.viewBox=Le,this.scale=Ye,this.rotation=tt,this.offsetX=nt,this.offsetY=ft;const gt=(Le[2]+Le[0])/2,At=(Le[3]+Le[1])/2;let xt,Et,yt,Ct;switch(tt%=360,tt<0&&(tt+=360),tt){case 180:xt=-1,Et=0,yt=0,Ct=1;break;case 90:xt=0,Et=1,yt=1,Ct=0;break;case 270:xt=0,Et=-1,yt=-1,Ct=0;break;case 0:xt=1,Et=0,yt=0,Ct=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ht&&(yt=-yt,Ct=-Ct);let kt,vt,bt,It;xt===0?(kt=Math.abs(At-Le[1])*Ye+nt,vt=Math.abs(gt-Le[0])*Ye+ft,bt=(Le[3]-Le[1])*Ye,It=(Le[2]-Le[0])*Ye):(kt=Math.abs(gt-Le[0])*Ye+nt,vt=Math.abs(At-Le[1])*Ye+ft,bt=(Le[2]-Le[0])*Ye,It=(Le[3]-Le[1])*Ye),this.transform=[xt*Ye,Et*Ye,yt*Ye,Ct*Ye,kt-xt*Ye*gt-yt*Ye*At,vt-Et*Ye*gt-Ct*Ye*At],this.width=bt,this.height=It}get rawDims(){const{viewBox:Le}=this;return shadow(this,"rawDims",{pageWidth:Le[2]-Le[0],pageHeight:Le[3]-Le[1],pageX:Le[0],pageY:Le[1]})}clone({scale:Le=this.scale,rotation:Ye=this.rotation,offsetX:tt=this.offsetX,offsetY:nt=this.offsetY,dontFlip:ft=!1}={}){return new PageViewport({viewBox:this.viewBox.slice(),scale:Le,rotation:Ye,offsetX:tt,offsetY:nt,dontFlip:ft})}convertToViewportPoint(Le,Ye){return Util.applyTransform([Le,Ye],this.transform)}convertToViewportRectangle(Le){const Ye=Util.applyTransform([Le[0],Le[1]],this.transform),tt=Util.applyTransform([Le[2],Le[3]],this.transform);return[Ye[0],Ye[1],tt[0],tt[1]]}convertToPdfPoint(Le,Ye){return Util.applyInverseTransform([Le,Ye],this.transform)}}class RenderingCancelledException extends BaseException{constructor(Le,Ye=0){super(Le,"RenderingCancelledException"),this.extraDelay=Ye}}function isDataScheme(Be){const Le=Be.length;let Ye=0;for(;Ye<Le&&Be[Ye].trim()==="";)Ye++;return Be.substring(Ye,Ye+5).toLowerCase()==="data:"}function isPdfFile(Be){return typeof Be=="string"&&/\.pdf$/i.test(Be)}function getFilenameFromUrl$1(Be){return[Be]=Be.split(/[#?]/,1),Be.substring(Be.lastIndexOf("/")+1)}function getPdfFilenameFromUrl(Be,Le="document.pdf"){if(typeof Be!="string")return Le;if(isDataScheme(Be))return warn$1('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),Le;const Ye=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,tt=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,nt=Ye.exec(Be);let ft=tt.exec(nt[1])||tt.exec(nt[2])||tt.exec(nt[3]);if(ft&&(ft=ft[0],ft.includes("%")))try{ft=tt.exec(decodeURIComponent(ft))[0]}catch{}return ft||Le}class StatTimer{constructor(){Nn(this,"started",Object.create(null));Nn(this,"times",[])}time(Le){Le in this.started&&warn$1(`Timer is already running for ${Le}`),this.started[Le]=Date.now()}timeEnd(Le){Le in this.started||warn$1(`Timer has not been started for ${Le}`),this.times.push({name:Le,start:this.started[Le],end:Date.now()}),delete this.started[Le]}toString(){const Le=[];let Ye=0;for(const{name:tt}of this.times)Ye=Math.max(tt.length,Ye);for(const{name:tt,start:nt,end:ft}of this.times)Le.push(`${tt.padEnd(Ye)} ${ft-nt}ms
|
|
4039
4039
|
`);return Le.join("")}}function isValidFetchUrl(Be,Le){try{const{protocol:Ye}=Le?new URL(Be,Le):new URL(Be);return Ye==="http:"||Ye==="https:"}catch{return!1}}function noContextMenu(Be){Be.preventDefault()}function deprecated(Be){console.log("Deprecated API usage: "+Be)}class PDFDateString{static toDateObject(Le){if(!Le||typeof Le!="string")return null;Ht(this,Jl)||C0(this,Jl,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const Ye=Ht(this,Jl).exec(Le);if(!Ye)return null;const tt=parseInt(Ye[1],10);let nt=parseInt(Ye[2],10);nt=nt>=1&&nt<=12?nt-1:0;let ft=parseInt(Ye[3],10);ft=ft>=1&&ft<=31?ft:1;let ht=parseInt(Ye[4],10);ht=ht>=0&&ht<=23?ht:0;let gt=parseInt(Ye[5],10);gt=gt>=0&><=59?gt:0;let At=parseInt(Ye[6],10);At=At>=0&&At<=59?At:0;const xt=Ye[7]||"Z";let Et=parseInt(Ye[8],10);Et=Et>=0&&Et<=23?Et:0;let yt=parseInt(Ye[9],10)||0;return yt=yt>=0&&yt<=59?yt:0,xt==="-"?(ht+=Et,gt+=yt):xt==="+"&&(ht-=Et,gt-=yt),new Date(Date.UTC(tt,nt,ft,ht,gt,At))}}Jl=new WeakMap,v0(PDFDateString,Jl);function getXfaPageViewport(Be,{scale:Le=1,rotation:Ye=0}){const{width:tt,height:nt}=Be.attributes.style,ft=[0,0,parseInt(tt),parseInt(nt)];return new PageViewport({viewBox:ft,scale:Le,rotation:Ye})}function getRGB(Be){if(Be.startsWith("#")){const Le=parseInt(Be.slice(1),16);return[(Le&16711680)>>16,(Le&65280)>>8,Le&255]}return Be.startsWith("rgb(")?Be.slice(4,-1).split(",").map(Le=>parseInt(Le)):Be.startsWith("rgba(")?Be.slice(5,-1).split(",").map(Le=>parseInt(Le)).slice(0,3):(warn$1(`Not a valid color format: "${Be}"`),[0,0,0])}function getColorValues(Be){const Le=document.createElement("span");Le.style.visibility="hidden",document.body.append(Le);for(const Ye of Be.keys()){Le.style.color=Ye;const tt=window.getComputedStyle(Le).color;Be.set(Ye,getRGB(tt))}Le.remove()}function getCurrentTransform(Be){const{a:Le,b:Ye,c:tt,d:nt,e:ft,f:ht}=Be.getTransform();return[Le,Ye,tt,nt,ft,ht]}function getCurrentTransformInverse(Be){const{a:Le,b:Ye,c:tt,d:nt,e:ft,f:ht}=Be.getTransform().invertSelf();return[Le,Ye,tt,nt,ft,ht]}function setLayerDimensions(Be,Le,Ye=!1,tt=!0){if(Le instanceof PageViewport){const{pageWidth:nt,pageHeight:ft}=Le.rawDims,{style:ht}=Be,gt=util_FeatureTest.isCSSRoundSupported,At=`var(--scale-factor) * ${nt}px`,xt=`var(--scale-factor) * ${ft}px`,Et=gt?`round(down, ${At}, var(--scale-round-x, 1px))`:`calc(${At})`,yt=gt?`round(down, ${xt}, var(--scale-round-y, 1px))`:`calc(${xt})`;!Ye||Le.rotation%180===0?(ht.width=Et,ht.height=yt):(ht.width=yt,ht.height=Et)}tt&&Be.setAttribute("data-main-rotation",Le.rotation)}class OutputScale{constructor(){const Le=window.devicePixelRatio||1;this.sx=Le,this.sy=Le}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}}const Ds=class Ds{constructor(Le){v0(this,Pa);v0(this,bo,null);v0(this,p2,null);v0(this,ji);v0(this,f2,null);v0(this,ec,null);C0(this,ji,Le),Ht(Ds,tc)||C0(Ds,tc,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const Le=C0(this,bo,document.createElement("div"));Le.classList.add("editToolbar","hidden"),Le.setAttribute("role","toolbar");const Ye=Ht(this,ji)._uiManager._signal;Le.addEventListener("contextmenu",noContextMenu,{signal:Ye}),Le.addEventListener("pointerdown",y0(Ds,qu,$5),{signal:Ye});const tt=C0(this,f2,document.createElement("div"));tt.className="buttons",Le.append(tt);const nt=Ht(this,ji).toolbarPosition;if(nt){const{style:ft}=Le,ht=Ht(this,ji)._uiManager.direction==="ltr"?1-nt[0]:nt[0];ft.insetInlineEnd=`${100*ht}%`,ft.top=`calc(${100*nt[1]}% + var(--editor-toolbar-vert-offset))`}return y0(this,Pa,Y5).call(this),Le}get div(){return Ht(this,bo)}hide(){var Le;Ht(this,bo).classList.add("hidden"),(Le=Ht(this,p2))==null||Le.hideDropdown()}show(){var Le;Ht(this,bo).classList.remove("hidden"),(Le=Ht(this,ec))==null||Le.shown()}async addAltText(Le){const Ye=await Le.render();y0(this,Pa,Zd).call(this,Ye),Ht(this,f2).prepend(Ye,Ht(this,Pa,_9)),C0(this,ec,Le)}addColorPicker(Le){C0(this,p2,Le);const Ye=Le.renderButton();y0(this,Pa,Zd).call(this,Ye),Ht(this,f2).prepend(Ye,Ht(this,Pa,_9))}remove(){var Le;Ht(this,bo).remove(),(Le=Ht(this,p2))==null||Le.destroy(),C0(this,p2,null)}};bo=new WeakMap,p2=new WeakMap,ji=new WeakMap,f2=new WeakMap,ec=new WeakMap,tc=new WeakMap,qu=new WeakSet,$5=function(Le){Le.stopPropagation()},Pa=new WeakSet,K5=function(Le){Ht(this,ji)._focusEventsAllowed=!1,Le.preventDefault(),Le.stopPropagation()},q5=function(Le){Ht(this,ji)._focusEventsAllowed=!0,Le.preventDefault(),Le.stopPropagation()},Zd=function(Le){const Ye=Ht(this,ji)._uiManager._signal;Le.addEventListener("focusin",y0(this,Pa,K5).bind(this),{capture:!0,signal:Ye}),Le.addEventListener("focusout",y0(this,Pa,q5).bind(this),{capture:!0,signal:Ye}),Le.addEventListener("contextmenu",noContextMenu,{signal:Ye})},Y5=function(){const{editorType:Le,_uiManager:Ye}=Ht(this,ji),tt=document.createElement("button");tt.className="delete",tt.tabIndex=0,tt.setAttribute("data-l10n-id",Ht(Ds,tc)[Le]),y0(this,Pa,Zd).call(this,tt),tt.addEventListener("click",nt=>{Ye.delete()},{signal:Ye._signal}),Ht(this,f2).append(tt)},_9=function(){const Le=document.createElement("div");return Le.className="divider",Le},v0(Ds,qu),v0(Ds,tc,null);let EditorToolbar=Ds;class HighlightToolbar{constructor(Le){v0(this,Io);v0(this,nc,null);v0(this,h2,null);v0(this,m2);C0(this,m2,Le)}show(Le,Ye,tt){const[nt,ft]=y0(this,Io,J5).call(this,Ye,tt),{style:ht}=Ht(this,h2)||C0(this,h2,y0(this,Io,Z5).call(this));Le.append(Ht(this,h2)),ht.insetInlineEnd=`${100*nt}%`,ht.top=`calc(${100*ft}% + var(--editor-toolbar-vert-offset))`}hide(){Ht(this,h2).remove()}}nc=new WeakMap,h2=new WeakMap,m2=new WeakMap,Io=new WeakSet,Z5=function(){const Le=C0(this,h2,document.createElement("div"));Le.className="editToolbar",Le.setAttribute("role","toolbar"),Le.addEventListener("contextmenu",noContextMenu,{signal:Ht(this,m2)._signal});const Ye=C0(this,nc,document.createElement("div"));return Ye.className="buttons",Le.append(Ye),y0(this,Io,eh).call(this),Le},J5=function(Le,Ye){let tt=0,nt=0;for(const ft of Le){const ht=ft.y+ft.height;if(ht<tt)continue;const gt=ft.x+(Ye?ft.width:0);if(ht>tt){nt=gt,tt=ht;continue}Ye?gt>nt&&(nt=gt):gt<nt&&(nt=gt)}return[Ye?1-nt:nt,tt]},eh=function(){const Le=document.createElement("button");Le.className="highlightButton",Le.tabIndex=0,Le.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const Ye=document.createElement("span");Le.append(Ye),Ye.className="visuallyHidden",Ye.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const tt=Ht(this,m2)._signal;Le.addEventListener("contextmenu",noContextMenu,{signal:tt}),Le.addEventListener("click",()=>{Ht(this,m2).highlightSelection("floating_button")},{signal:tt}),Ht(this,nc).append(Le)};function bindEvents(Be,Le,Ye){for(const tt of Ye)Le.addEventListener(tt,Be[tt].bind(Be))}function opacityToHex(Be){return Math.round(Math.min(255,Math.max(1,255*Be))).toString(16).padStart(2,"0")}class IdManager{constructor(){v0(this,Yu,0)}get id(){return`${AnnotationEditorPrefix}${Va(this,Yu)._++}`}}Yu=new WeakMap;const w3=class w3{constructor(){v0(this,T1);v0(this,R1,getUuid());v0(this,rc,0);v0(this,ba,null)}static get _isSVGFittingCanvas(){const Le='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',tt=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),nt=new Image;nt.src=Le;const ft=nt.decode().then(()=>(tt.drawImage(nt,0,0,1,1,0,0,1,3),new Uint32Array(tt.getImageData(0,0,1,1).data.buffer)[0]===0));return shadow(this,"_isSVGFittingCanvas",ft)}async getFromFile(Le){const{lastModified:Ye,name:tt,size:nt,type:ft}=Le;return y0(this,T1,Jd).call(this,`${Ye}_${tt}_${nt}_${ft}`,Le)}async getFromUrl(Le){return y0(this,T1,Jd).call(this,Le,Le)}async getFromBlob(Le,Ye){const tt=await Ye;return y0(this,T1,Jd).call(this,Le,tt)}async getFromId(Le){Ht(this,ba)||C0(this,ba,new Map);const Ye=Ht(this,ba).get(Le);if(!Ye)return null;if(Ye.bitmap)return Ye.refCounter+=1,Ye;if(Ye.file)return this.getFromFile(Ye.file);if(Ye.blobPromise){const{blobPromise:tt}=Ye;return delete Ye.blobPromise,this.getFromBlob(Ye.id,tt)}return this.getFromUrl(Ye.url)}getFromCanvas(Le,Ye){Ht(this,ba)||C0(this,ba,new Map);let tt=Ht(this,ba).get(Le);if(tt!=null&&tt.bitmap)return tt.refCounter+=1,tt;const nt=new OffscreenCanvas(Ye.width,Ye.height);return nt.getContext("2d").drawImage(Ye,0,0),tt={bitmap:nt.transferToImageBitmap(),id:`image_${Ht(this,R1)}_${Va(this,rc)._++}`,refCounter:1,isSvg:!1},Ht(this,ba).set(Le,tt),Ht(this,ba).set(tt.id,tt),tt}getSvgUrl(Le){const Ye=Ht(this,ba).get(Le);return Ye!=null&&Ye.isSvg?Ye.svgUrl:null}deleteId(Le){var nt;Ht(this,ba)||C0(this,ba,new Map);const Ye=Ht(this,ba).get(Le);if(!Ye||(Ye.refCounter-=1,Ye.refCounter!==0))return;const{bitmap:tt}=Ye;if(!Ye.url&&!Ye.file){const ft=new OffscreenCanvas(tt.width,tt.height);ft.getContext("bitmaprenderer").transferFromImageBitmap(tt),Ye.blobPromise=ft.convertToBlob()}(nt=tt.close)==null||nt.call(tt),Ye.bitmap=null}isValidId(Le){return Le.startsWith(`image_${Ht(this,R1)}_`)}};R1=new WeakMap,rc=new WeakMap,ba=new WeakMap,T1=new WeakSet,Jd=async function(Le,Ye){Ht(this,ba)||C0(this,ba,new Map);let tt=Ht(this,ba).get(Le);if(tt===null)return null;if(tt!=null&&tt.bitmap)return tt.refCounter+=1,tt;try{tt||(tt={bitmap:null,id:`image_${Ht(this,R1)}_${Va(this,rc)._++}`,refCounter:0,isSvg:!1});let nt;if(typeof Ye=="string"?(tt.url=Ye,nt=await fetchData(Ye,"blob")):Ye instanceof File?nt=tt.file=Ye:Ye instanceof Blob&&(nt=Ye),nt.type==="image/svg+xml"){const ft=w3._isSVGFittingCanvas,ht=new FileReader,gt=new Image,At=new Promise((xt,Et)=>{gt.onload=()=>{tt.bitmap=gt,tt.isSvg=!0,xt()},ht.onload=async()=>{const yt=tt.svgUrl=ht.result;gt.src=await ft?`${yt}#svgView(preserveAspectRatio(none))`:yt},gt.onerror=ht.onerror=Et});ht.readAsDataURL(nt),await At}else tt.bitmap=await createImageBitmap(nt);tt.refCounter=1}catch(nt){console.error(nt),tt=null}return Ht(this,ba).set(Le,tt),tt&&Ht(this,ba).set(tt.id,tt),tt};let ImageManager=w3;class CommandManager{constructor(Le=128){v0(this,la,[]);v0(this,So,!1);v0(this,ac);v0(this,ua,-1);C0(this,ac,Le)}add({cmd:Le,undo:Ye,post:tt,mustExec:nt,type:ft=NaN,overwriteIfSameType:ht=!1,keepUndo:gt=!1}){if(nt&&Le(),Ht(this,So))return;const At={cmd:Le,undo:Ye,post:tt,type:ft};if(Ht(this,ua)===-1){Ht(this,la).length>0&&(Ht(this,la).length=0),C0(this,ua,0),Ht(this,la).push(At);return}if(ht&&Ht(this,la)[Ht(this,ua)].type===ft){gt&&(At.undo=Ht(this,la)[Ht(this,ua)].undo),Ht(this,la)[Ht(this,ua)]=At;return}const xt=Ht(this,ua)+1;xt===Ht(this,ac)?Ht(this,la).splice(0,1):(C0(this,ua,xt),xt<Ht(this,la).length&&Ht(this,la).splice(xt)),Ht(this,la).push(At)}undo(){if(Ht(this,ua)===-1)return;C0(this,So,!0);const{undo:Le,post:Ye}=Ht(this,la)[Ht(this,ua)];Le(),Ye==null||Ye(),C0(this,So,!1),C0(this,ua,Ht(this,ua)-1)}redo(){if(Ht(this,ua)<Ht(this,la).length-1){C0(this,ua,Ht(this,ua)+1),C0(this,So,!0);const{cmd:Le,post:Ye}=Ht(this,la)[Ht(this,ua)];Le(),Ye==null||Ye(),C0(this,So,!1)}}hasSomethingToUndo(){return Ht(this,ua)!==-1}hasSomethingToRedo(){return Ht(this,ua)<Ht(this,la).length-1}destroy(){C0(this,la,null)}}la=new WeakMap,So=new WeakMap,ac=new WeakMap,ua=new WeakMap;class KeyboardManager{constructor(Le){v0(this,Zu);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:Ye}=util_FeatureTest.platform;for(const[tt,nt,ft={}]of Le)for(const ht of tt){const gt=ht.startsWith("mac+");Ye&>?(this.callbacks.set(ht.slice(4),{callback:nt,options:ft}),this.allKeys.add(ht.split("+").at(-1))):!Ye&&!gt&&(this.callbacks.set(ht,{callback:nt,options:ft}),this.allKeys.add(ht.split("+").at(-1)))}}exec(Le,Ye){if(!this.allKeys.has(Ye.key))return;const tt=this.callbacks.get(y0(this,Zu,th).call(this,Ye));if(!tt)return;const{callback:nt,options:{bubbles:ft=!1,args:ht=[],checker:gt=null}}=tt;gt&&!gt(Le,Ye)||(nt.bind(Le,...ht,Ye)(),ft||(Ye.stopPropagation(),Ye.preventDefault()))}}Zu=new WeakSet,th=function(Le){Le.altKey&&this.buffer.push("alt"),Le.ctrlKey&&this.buffer.push("ctrl"),Le.metaKey&&this.buffer.push("meta"),Le.shiftKey&&this.buffer.push("shift"),this.buffer.push(Le.key);const Ye=this.buffer.join("+");return this.buffer.length=0,Ye};const Ju=class Ju{get _colors(){const Le=new Map([["CanvasText",null],["Canvas",null]]);return getColorValues(Le),shadow(this,"_colors",Le)}convert(Le){const Ye=getRGB(Le);if(!window.matchMedia("(forced-colors: active)").matches)return Ye;for(const[tt,nt]of this._colors)if(nt.every((ft,ht)=>ft===Ye[ht]))return Ju._colorsMapping.get(tt);return Ye}getHexCode(Le){const Ye=this._colors.get(Le);return Ye?Util.makeHexColor(...Ye):Le}};Nn(Ju,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let ColorManager=Ju;const _1=class _1{constructor(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){v0(this,kn);v0(this,B1,new AbortController);v0(this,ri,null);v0(this,na,new Map);v0(this,ma,new Map);v0(this,O1,null);v0(this,Ps,null);v0(this,N1,null);v0(this,Fi,new CommandManager);v0(this,wo,null);v0(this,D1,0);v0(this,g2,new Set);v0(this,ss,null);v0(this,Qi,null);v0(this,A2,new Set);v0(this,ic,!1);v0(this,sc,!1);v0(this,P1,!1);v0(this,oc,null);v0(this,os,null);v0(this,Ro,null);v0(this,L1,null);v0(this,To,!1);v0(this,ls,null);v0(this,ed,new IdManager);v0(this,Bo,!1);v0(this,lc,!1);v0(this,Oo,null);v0(this,x2,null);v0(this,uc,null);v0(this,dc,null);v0(this,da,AnnotationEditorType.NONE);v0(this,vr,new Set);v0(this,Ls,null);v0(this,E2,null);v0(this,pc,null);v0(this,fc,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});v0(this,No,[0,0]);v0(this,cs,null);v0(this,_s,null);v0(this,hc,null);v0(this,Ei,null);const Ct=this._signal=Ht(this,B1).signal;C0(this,_s,Le),C0(this,hc,Ye),C0(this,O1,tt),this._eventBus=nt,nt._on("editingaction",this.onEditingAction.bind(this),{signal:Ct}),nt._on("pagechanging",this.onPageChanging.bind(this),{signal:Ct}),nt._on("scalechanging",this.onScaleChanging.bind(this),{signal:Ct}),nt._on("rotationchanging",this.onRotationChanging.bind(this),{signal:Ct}),nt._on("setpreference",this.onSetPreference.bind(this),{signal:Ct}),nt._on("switchannotationeditorparams",kt=>this.updateParams(kt.type,kt.value),{signal:Ct}),y0(this,kn,ah).call(this),y0(this,kn,lh).call(this),y0(this,kn,j9).call(this),C0(this,Ps,ft.annotationStorage),C0(this,oc,ft.filterFactory),C0(this,E2,ht),C0(this,L1,gt||null),C0(this,ic,At),C0(this,sc,xt),C0(this,P1,Et),C0(this,dc,yt||null),this.viewParameters={realScale:PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const Le=_1.prototype,Ye=ht=>Ht(ht,_s).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&ht.hasSomethingToControl(),tt=(ht,{target:gt})=>{if(gt instanceof HTMLInputElement){const{type:At}=gt;return At!=="text"&&At!=="number"}return!0},nt=this.TRANSLATE_SMALL,ft=this.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+a","mac+meta+a"],Le.selectAll,{checker:tt}],[["ctrl+z","mac+meta+z"],Le.undo,{checker:tt}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],Le.redo,{checker:tt}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],Le.delete,{checker:tt}],[["Enter","mac+Enter"],Le.addNewEditorFromKeyboard,{checker:(ht,{target:gt})=>!(gt instanceof HTMLButtonElement)&&Ht(ht,_s).contains(gt)&&!ht.isEnterHandled}],[[" ","mac+ "],Le.addNewEditorFromKeyboard,{checker:(ht,{target:gt})=>!(gt instanceof HTMLButtonElement)&&Ht(ht,_s).contains(document.activeElement)}],[["Escape","mac+Escape"],Le.unselectAll],[["ArrowLeft","mac+ArrowLeft"],Le.translateSelectedEditors,{args:[-nt,0],checker:Ye}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Le.translateSelectedEditors,{args:[-ft,0],checker:Ye}],[["ArrowRight","mac+ArrowRight"],Le.translateSelectedEditors,{args:[nt,0],checker:Ye}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Le.translateSelectedEditors,{args:[ft,0],checker:Ye}],[["ArrowUp","mac+ArrowUp"],Le.translateSelectedEditors,{args:[0,-nt],checker:Ye}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Le.translateSelectedEditors,{args:[0,-ft],checker:Ye}],[["ArrowDown","mac+ArrowDown"],Le.translateSelectedEditors,{args:[0,nt],checker:Ye}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Le.translateSelectedEditors,{args:[0,ft],checker:Ye}]]))}destroy(){var Le,Ye,tt,nt;(Le=Ht(this,Ei))==null||Le.resolve(),C0(this,Ei,null),(Ye=Ht(this,B1))==null||Ye.abort(),C0(this,B1,null),this._signal=null;for(const ft of Ht(this,ma).values())ft.destroy();Ht(this,ma).clear(),Ht(this,na).clear(),Ht(this,A2).clear(),C0(this,ri,null),Ht(this,vr).clear(),Ht(this,Fi).destroy(),(tt=Ht(this,O1))==null||tt.destroy(),(nt=Ht(this,ls))==null||nt.hide(),C0(this,ls,null),Ht(this,os)&&(clearTimeout(Ht(this,os)),C0(this,os,null)),Ht(this,cs)&&(clearTimeout(Ht(this,cs)),C0(this,cs,null))}combinedSignal(Le){return AbortSignal.any([this._signal,Le.signal])}get mlManager(){return Ht(this,dc)}get useNewAltTextFlow(){return Ht(this,sc)}get useNewAltTextWhenAddingImage(){return Ht(this,P1)}get hcmFilter(){return shadow(this,"hcmFilter",Ht(this,E2)?Ht(this,oc).addHCMFilter(Ht(this,E2).foreground,Ht(this,E2).background):"none")}get direction(){return shadow(this,"direction",getComputedStyle(Ht(this,_s)).direction)}get highlightColors(){return shadow(this,"highlightColors",Ht(this,L1)?new Map(Ht(this,L1).split(",").map(Le=>Le.split("=").map(Ye=>Ye.trim()))):null)}get highlightColorNames(){return shadow(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,Le=>Le.reverse())):null)}setMainHighlightColorPicker(Le){C0(this,uc,Le)}editAltText(Le,Ye=!1){var tt;(tt=Ht(this,O1))==null||tt.editAltText(this,Le,Ye)}switchToMode(Le,Ye){this._eventBus.on("annotationeditormodechanged",Ye,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:Le})}setPreference(Le,Ye){this._eventBus.dispatch("setpreference",{source:this,name:Le,value:Ye})}onSetPreference({name:Le,value:Ye}){switch(Le){case"enableNewAltTextWhenAddingImage":C0(this,P1,Ye);break}}onPageChanging({pageNumber:Le}){C0(this,D1,Le-1)}focusMainContainer(){Ht(this,_s).focus()}findParent(Le,Ye){for(const tt of Ht(this,ma).values()){const{x:nt,y:ft,width:ht,height:gt}=tt.div.getBoundingClientRect();if(Le>=nt&&Le<=nt+ht&&Ye>=ft&&Ye<=ft+gt)return tt}return null}disableUserSelect(Le=!1){Ht(this,hc).classList.toggle("noUserSelect",Le)}addShouldRescale(Le){Ht(this,A2).add(Le)}removeShouldRescale(Le){Ht(this,A2).delete(Le)}onScaleChanging({scale:Le}){this.commitOrRemove(),this.viewParameters.realScale=Le*PixelsPerInch.PDF_TO_CSS_UNITS;for(const Ye of Ht(this,A2))Ye.onScaleChanging()}onRotationChanging({pagesRotation:Le}){this.commitOrRemove(),this.viewParameters.rotation=Le}highlightSelection(Le=""){const Ye=document.getSelection();if(!Ye||Ye.isCollapsed)return;const{anchorNode:tt,anchorOffset:nt,focusNode:ft,focusOffset:ht}=Ye,gt=Ye.toString(),xt=y0(this,kn,e3).call(this,Ye).closest(".textLayer"),Et=this.getSelectionBoxes(xt);if(!Et)return;Ye.empty();const yt=y0(this,kn,M9).call(this,xt),Ct=Ht(this,da)===AnnotationEditorType.NONE,kt=()=>{yt==null||yt.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:Le,boxes:Et,anchorNode:tt,anchorOffset:nt,focusNode:ft,focusOffset:ht,text:gt}),Ct&&this.showAllEditors("highlight",!0,!0)};if(Ct){this.switchToMode(AnnotationEditorType.HIGHLIGHT,kt);return}kt()}addToAnnotationStorage(Le){!Le.isEmpty()&&Ht(this,Ps)&&!Ht(this,Ps).has(Le.id)&&Ht(this,Ps).setValue(Le.id,Le)}blur(){if(this.isShiftKeyDown=!1,Ht(this,To)&&(C0(this,To,!1),y0(this,kn,t3).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:Le}=document;for(const Ye of Ht(this,vr))if(Ye.div.contains(Le)){C0(this,x2,[Ye,Le]),Ye._focusEventsAllowed=!1;break}}focus(){if(!Ht(this,x2))return;const[Le,Ye]=Ht(this,x2);C0(this,x2,null),Ye.addEventListener("focusin",()=>{Le._focusEventsAllowed=!0},{once:!0,signal:this._signal}),Ye.focus()}addEditListeners(){y0(this,kn,j9).call(this),y0(this,kn,F9).call(this)}removeEditListeners(){y0(this,kn,oh).call(this),y0(this,kn,Q9).call(this)}dragOver(Le){for(const{type:Ye}of Le.dataTransfer.items)for(const tt of Ht(this,Qi))if(tt.isHandlingMimeForPasting(Ye)){Le.dataTransfer.dropEffect="copy",Le.preventDefault();return}}drop(Le){for(const Ye of Le.dataTransfer.items)for(const tt of Ht(this,Qi))if(tt.isHandlingMimeForPasting(Ye.type)){tt.paste(Ye,this.currentLayer),Le.preventDefault();return}}copy(Le){var tt;if(Le.preventDefault(),(tt=Ht(this,ri))==null||tt.commitOrRemove(),!this.hasSelection)return;const Ye=[];for(const nt of Ht(this,vr)){const ft=nt.serialize(!0);ft&&Ye.push(ft)}Ye.length!==0&&Le.clipboardData.setData("application/pdfjs",JSON.stringify(Ye))}cut(Le){this.copy(Le),this.delete()}async paste(Le){Le.preventDefault();const{clipboardData:Ye}=Le;for(const ft of Ye.items)for(const ht of Ht(this,Qi))if(ht.isHandlingMimeForPasting(ft.type)){ht.paste(ft,this.currentLayer);return}let tt=Ye.getData("application/pdfjs");if(!tt)return;try{tt=JSON.parse(tt)}catch(ft){warn$1(`paste: "${ft.message}".`);return}if(!Array.isArray(tt))return;this.unselectAll();const nt=this.currentLayer;try{const ft=[];for(const At of tt){const xt=await nt.deserialize(At);if(!xt)return;ft.push(xt)}const ht=()=>{for(const At of ft)y0(this,kn,U9).call(this,At);y0(this,kn,V9).call(this,ft)},gt=()=>{for(const At of ft)At.remove()};this.addCommands({cmd:ht,undo:gt,mustExec:!0})}catch(ft){warn$1(`paste: "${ft.message}".`)}}keydown(Le){!this.isShiftKeyDown&&Le.key==="Shift"&&(this.isShiftKeyDown=!0),Ht(this,da)!==AnnotationEditorType.NONE&&!this.isEditorHandlingKeyboard&&_1._keyboardManager.exec(this,Le)}keyup(Le){this.isShiftKeyDown&&Le.key==="Shift"&&(this.isShiftKeyDown=!1,Ht(this,To)&&(C0(this,To,!1),y0(this,kn,t3).call(this,"main_toolbar")))}onEditingAction({name:Le}){switch(Le){case"undo":case"redo":case"delete":case"selectAll":this[Le]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}setEditingState(Le){Le?(y0(this,kn,ih).call(this),y0(this,kn,F9).call(this),y0(this,kn,Ha).call(this,{isEditing:Ht(this,da)!==AnnotationEditorType.NONE,isEmpty:y0(this,kn,Lu).call(this),hasSomethingToUndo:Ht(this,Fi).hasSomethingToUndo(),hasSomethingToRedo:Ht(this,Fi).hasSomethingToRedo(),hasSelectedEditor:!1})):(y0(this,kn,sh).call(this),y0(this,kn,Q9).call(this),y0(this,kn,Ha).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(Le){if(!Ht(this,Qi)){C0(this,Qi,Le);for(const Ye of Ht(this,Qi))y0(this,kn,l2).call(this,Ye.defaultPropertiesToUpdate)}}getId(){return Ht(this,ed).id}get currentLayer(){return Ht(this,ma).get(Ht(this,D1))}getLayer(Le){return Ht(this,ma).get(Le)}get currentPageIndex(){return Ht(this,D1)}addLayer(Le){Ht(this,ma).set(Le.pageIndex,Le),Ht(this,Bo)?Le.enable():Le.disable()}removeLayer(Le){Ht(this,ma).delete(Le.pageIndex)}async updateMode(Le,Ye=null,tt=!1){if(Ht(this,da)!==Le&&!(Ht(this,Ei)&&(await Ht(this,Ei).promise,!Ht(this,Ei)))){if(C0(this,Ei,Promise.withResolvers()),C0(this,da,Le),Le===AnnotationEditorType.NONE){this.setEditingState(!1),y0(this,kn,uh).call(this),Ht(this,Ei).resolve();return}this.setEditingState(!0),await y0(this,kn,ch).call(this),this.unselectAll();for(const nt of Ht(this,ma).values())nt.updateMode(Le);if(!Ye){tt&&this.addNewEditorFromKeyboard(),Ht(this,Ei).resolve();return}for(const nt of Ht(this,na).values())nt.annotationElementId===Ye?(this.setSelected(nt),nt.enterInEditMode()):nt.unselect();Ht(this,Ei).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(Le){Le!==Ht(this,da)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:Le})}updateParams(Le,Ye){var tt;if(Ht(this,Qi)){switch(Le){case AnnotationEditorParamsType.CREATE:this.currentLayer.addNewEditor();return;case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:(tt=Ht(this,uc))==null||tt.updateColor(Ye);break;case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(Ht(this,pc)||C0(this,pc,new Map)).set(Le,Ye),this.showAllEditors("highlight",Ye);break}for(const nt of Ht(this,vr))nt.updateParams(Le,Ye);for(const nt of Ht(this,Qi))nt.updateDefaultParams(Le,Ye)}}showAllEditors(Le,Ye,tt=!1){var ft;for(const ht of Ht(this,na).values())ht.editorType===Le&&ht.show(Ye);(((ft=Ht(this,pc))==null?void 0:ft.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL))??!0)!==Ye&&y0(this,kn,l2).call(this,[[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL,Ye]])}enableWaiting(Le=!1){if(Ht(this,lc)!==Le){C0(this,lc,Le);for(const Ye of Ht(this,ma).values())Le?Ye.disableClick():Ye.enableClick(),Ye.div.classList.toggle("waiting",Le)}}getEditors(Le){const Ye=[];for(const tt of Ht(this,na).values())tt.pageIndex===Le&&Ye.push(tt);return Ye}getEditor(Le){return Ht(this,na).get(Le)}addEditor(Le){Ht(this,na).set(Le.id,Le)}removeEditor(Le){var Ye;Le.div.contains(document.activeElement)&&(Ht(this,os)&&clearTimeout(Ht(this,os)),C0(this,os,setTimeout(()=>{this.focusMainContainer(),C0(this,os,null)},0))),Ht(this,na).delete(Le.id),this.unselect(Le),(!Le.annotationElementId||!Ht(this,g2).has(Le.annotationElementId))&&((Ye=Ht(this,Ps))==null||Ye.remove(Le.id))}addDeletedAnnotationElement(Le){Ht(this,g2).add(Le.annotationElementId),this.addChangedExistingAnnotation(Le),Le.deleted=!0}isDeletedAnnotationElement(Le){return Ht(this,g2).has(Le)}removeDeletedAnnotationElement(Le){Ht(this,g2).delete(Le.annotationElementId),this.removeChangedExistingAnnotation(Le),Le.deleted=!1}setActiveEditor(Le){Ht(this,ri)!==Le&&(C0(this,ri,Le),Le&&y0(this,kn,l2).call(this,Le.propertiesToUpdate))}updateUI(Le){Ht(this,kn,dh)===Le&&y0(this,kn,l2).call(this,Le.propertiesToUpdate)}toggleSelected(Le){if(Ht(this,vr).has(Le)){Ht(this,vr).delete(Le),Le.unselect(),y0(this,kn,Ha).call(this,{hasSelectedEditor:this.hasSelection});return}Ht(this,vr).add(Le),Le.select(),y0(this,kn,l2).call(this,Le.propertiesToUpdate),y0(this,kn,Ha).call(this,{hasSelectedEditor:!0})}setSelected(Le){for(const Ye of Ht(this,vr))Ye!==Le&&Ye.unselect();Ht(this,vr).clear(),Ht(this,vr).add(Le),Le.select(),y0(this,kn,l2).call(this,Le.propertiesToUpdate),y0(this,kn,Ha).call(this,{hasSelectedEditor:!0})}isSelected(Le){return Ht(this,vr).has(Le)}get firstSelectedEditor(){return Ht(this,vr).values().next().value}unselect(Le){Le.unselect(),Ht(this,vr).delete(Le),y0(this,kn,Ha).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return Ht(this,vr).size!==0}get isEnterHandled(){return Ht(this,vr).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){Ht(this,Fi).undo(),y0(this,kn,Ha).call(this,{hasSomethingToUndo:Ht(this,Fi).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:y0(this,kn,Lu).call(this)})}redo(){Ht(this,Fi).redo(),y0(this,kn,Ha).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:Ht(this,Fi).hasSomethingToRedo(),isEmpty:y0(this,kn,Lu).call(this)})}addCommands(Le){Ht(this,Fi).add(Le),y0(this,kn,Ha).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:y0(this,kn,Lu).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const Le=[...Ht(this,vr)],Ye=()=>{for(const nt of Le)nt.remove()},tt=()=>{for(const nt of Le)y0(this,kn,U9).call(this,nt)};this.addCommands({cmd:Ye,undo:tt,mustExec:!0})}commitOrRemove(){var Le;(Le=Ht(this,ri))==null||Le.commitOrRemove()}hasSomethingToControl(){return Ht(this,ri)||this.hasSelection}selectAll(){for(const Le of Ht(this,vr))Le.commit();y0(this,kn,V9).call(this,Ht(this,na).values())}unselectAll(){if(!(Ht(this,ri)&&(Ht(this,ri).commitOrRemove(),Ht(this,da)!==AnnotationEditorType.NONE))&&this.hasSelection){for(const Le of Ht(this,vr))Le.unselect();Ht(this,vr).clear(),y0(this,kn,Ha).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(Le,Ye,tt=!1){if(tt||this.commitOrRemove(),!this.hasSelection)return;Ht(this,No)[0]+=Le,Ht(this,No)[1]+=Ye;const[nt,ft]=Ht(this,No),ht=[...Ht(this,vr)],gt=1e3;Ht(this,cs)&&clearTimeout(Ht(this,cs)),C0(this,cs,setTimeout(()=>{C0(this,cs,null),Ht(this,No)[0]=Ht(this,No)[1]=0,this.addCommands({cmd:()=>{for(const At of ht)Ht(this,na).has(At.id)&&At.translateInPage(nt,ft)},undo:()=>{for(const At of ht)Ht(this,na).has(At.id)&&At.translateInPage(-nt,-ft)},mustExec:!1})},gt));for(const At of ht)At.translateInPage(Le,Ye)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),C0(this,ss,new Map);for(const Le of Ht(this,vr))Ht(this,ss).set(Le,{savedX:Le.x,savedY:Le.y,savedPageIndex:Le.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!Ht(this,ss))return!1;this.disableUserSelect(!1);const Le=Ht(this,ss);C0(this,ss,null);let Ye=!1;for(const[{x:nt,y:ft,pageIndex:ht},gt]of Le)gt.newX=nt,gt.newY=ft,gt.newPageIndex=ht,Ye||(Ye=nt!==gt.savedX||ft!==gt.savedY||ht!==gt.savedPageIndex);if(!Ye)return!1;const tt=(nt,ft,ht,gt)=>{if(Ht(this,na).has(nt.id)){const At=Ht(this,ma).get(gt);At?nt._setParentAndPosition(At,ft,ht):(nt.pageIndex=gt,nt.x=ft,nt.y=ht)}};return this.addCommands({cmd:()=>{for(const[nt,{newX:ft,newY:ht,newPageIndex:gt}]of Le)tt(nt,ft,ht,gt)},undo:()=>{for(const[nt,{savedX:ft,savedY:ht,savedPageIndex:gt}]of Le)tt(nt,ft,ht,gt)},mustExec:!0}),!0}dragSelectedEditors(Le,Ye){if(Ht(this,ss))for(const tt of Ht(this,ss).keys())tt.drag(Le,Ye)}rebuild(Le){if(Le.parent===null){const Ye=this.getLayer(Le.pageIndex);Ye?(Ye.changeParent(Le),Ye.addOrRebuild(Le)):(this.addEditor(Le),this.addToAnnotationStorage(Le),Le.rebuild())}else Le.parent.addOrRebuild(Le)}get isEditorHandlingKeyboard(){var Le;return((Le=this.getActive())==null?void 0:Le.shouldGetKeyboardEvents())||Ht(this,vr).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(Le){return Ht(this,ri)===Le}getActive(){return Ht(this,ri)}getMode(){return Ht(this,da)}get imageManager(){return shadow(this,"imageManager",new ImageManager)}getSelectionBoxes(Le){if(!Le)return null;const Ye=document.getSelection();for(let xt=0,Et=Ye.rangeCount;xt<Et;xt++)if(!Le.contains(Ye.getRangeAt(xt).commonAncestorContainer))return null;const{x:tt,y:nt,width:ft,height:ht}=Le.getBoundingClientRect();let gt;switch(Le.getAttribute("data-main-rotation")){case"90":gt=(xt,Et,yt,Ct)=>({x:(Et-nt)/ht,y:1-(xt+yt-tt)/ft,width:Ct/ht,height:yt/ft});break;case"180":gt=(xt,Et,yt,Ct)=>({x:1-(xt+yt-tt)/ft,y:1-(Et+Ct-nt)/ht,width:yt/ft,height:Ct/ht});break;case"270":gt=(xt,Et,yt,Ct)=>({x:1-(Et+Ct-nt)/ht,y:(xt-tt)/ft,width:Ct/ht,height:yt/ft});break;default:gt=(xt,Et,yt,Ct)=>({x:(xt-tt)/ft,y:(Et-nt)/ht,width:yt/ft,height:Ct/ht});break}const At=[];for(let xt=0,Et=Ye.rangeCount;xt<Et;xt++){const yt=Ye.getRangeAt(xt);if(!yt.collapsed)for(const{x:Ct,y:kt,width:vt,height:bt}of yt.getClientRects())vt===0||bt===0||At.push(gt(Ct,kt,vt,bt))}return At.length===0?null:At}addChangedExistingAnnotation({annotationElementId:Le,id:Ye}){(Ht(this,N1)||C0(this,N1,new Map)).set(Le,Ye)}removeChangedExistingAnnotation({annotationElementId:Le}){var Ye;(Ye=Ht(this,N1))==null||Ye.delete(Le)}renderAnnotationElement(Le){var nt;const Ye=(nt=Ht(this,N1))==null?void 0:nt.get(Le.data.id);if(!Ye)return;const tt=Ht(this,Ps).getRawValue(Ye);tt&&(Ht(this,da)===AnnotationEditorType.NONE&&!tt.hasBeenModified||tt.renderAnnotationElement(Le))}};B1=new WeakMap,ri=new WeakMap,na=new WeakMap,ma=new WeakMap,O1=new WeakMap,Ps=new WeakMap,N1=new WeakMap,Fi=new WeakMap,wo=new WeakMap,D1=new WeakMap,g2=new WeakMap,ss=new WeakMap,Qi=new WeakMap,A2=new WeakMap,ic=new WeakMap,sc=new WeakMap,P1=new WeakMap,oc=new WeakMap,os=new WeakMap,Ro=new WeakMap,L1=new WeakMap,To=new WeakMap,ls=new WeakMap,ed=new WeakMap,Bo=new WeakMap,lc=new WeakMap,Oo=new WeakMap,x2=new WeakMap,uc=new WeakMap,dc=new WeakMap,da=new WeakMap,vr=new WeakMap,Ls=new WeakMap,E2=new WeakMap,pc=new WeakMap,fc=new WeakMap,No=new WeakMap,cs=new WeakMap,_s=new WeakMap,hc=new WeakMap,Ei=new WeakMap,kn=new WeakSet,e3=function({anchorNode:Le}){return Le.nodeType===Node.TEXT_NODE?Le.parentElement:Le},M9=function(Le){const{currentLayer:Ye}=this;if(Ye.hasTextLayer(Le))return Ye;for(const tt of Ht(this,ma).values())if(tt.hasTextLayer(Le))return tt;return null},nh=function(){const Le=document.getSelection();if(!Le||Le.isCollapsed)return;const tt=y0(this,kn,e3).call(this,Le).closest(".textLayer"),nt=this.getSelectionBoxes(tt);nt&&(Ht(this,ls)||C0(this,ls,new HighlightToolbar(this)),Ht(this,ls).show(tt,nt,this.direction==="ltr"))},rh=function(){var ft,ht,gt;const Le=document.getSelection();if(!Le||Le.isCollapsed){Ht(this,Ls)&&((ft=Ht(this,ls))==null||ft.hide(),C0(this,Ls,null),y0(this,kn,Ha).call(this,{hasSelectedText:!1}));return}const{anchorNode:Ye}=Le;if(Ye===Ht(this,Ls))return;const nt=y0(this,kn,e3).call(this,Le).closest(".textLayer");if(!nt){Ht(this,Ls)&&((ht=Ht(this,ls))==null||ht.hide(),C0(this,Ls,null),y0(this,kn,Ha).call(this,{hasSelectedText:!1}));return}if((gt=Ht(this,ls))==null||gt.hide(),C0(this,Ls,Ye),y0(this,kn,Ha).call(this,{hasSelectedText:!0}),!(Ht(this,da)!==AnnotationEditorType.HIGHLIGHT&&Ht(this,da)!==AnnotationEditorType.NONE)&&(Ht(this,da)===AnnotationEditorType.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),C0(this,To,this.isShiftKeyDown),!this.isShiftKeyDown)){const At=Ht(this,da)===AnnotationEditorType.HIGHLIGHT?y0(this,kn,M9).call(this,nt):null;At==null||At.toggleDrawing();const xt=new AbortController,Et=this.combinedSignal(xt),yt=Ct=>{Ct.type==="pointerup"&&Ct.button!==0||(xt.abort(),At==null||At.toggleDrawing(!0),Ct.type==="pointerup"&&y0(this,kn,t3).call(this,"main_toolbar"))};window.addEventListener("pointerup",yt,{signal:Et}),window.addEventListener("blur",yt,{signal:Et})}},t3=function(Le=""){Ht(this,da)===AnnotationEditorType.HIGHLIGHT?this.highlightSelection(Le):Ht(this,ic)&&y0(this,kn,nh).call(this)},ah=function(){document.addEventListener("selectionchange",y0(this,kn,rh).bind(this),{signal:this._signal})},ih=function(){if(Ht(this,Ro))return;C0(this,Ro,new AbortController);const Le=this.combinedSignal(Ht(this,Ro));window.addEventListener("focus",this.focus.bind(this),{signal:Le}),window.addEventListener("blur",this.blur.bind(this),{signal:Le})},sh=function(){var Le;(Le=Ht(this,Ro))==null||Le.abort(),C0(this,Ro,null)},j9=function(){if(Ht(this,Oo))return;C0(this,Oo,new AbortController);const Le=this.combinedSignal(Ht(this,Oo));window.addEventListener("keydown",this.keydown.bind(this),{signal:Le}),window.addEventListener("keyup",this.keyup.bind(this),{signal:Le})},oh=function(){var Le;(Le=Ht(this,Oo))==null||Le.abort(),C0(this,Oo,null)},F9=function(){if(Ht(this,wo))return;C0(this,wo,new AbortController);const Le=this.combinedSignal(Ht(this,wo));document.addEventListener("copy",this.copy.bind(this),{signal:Le}),document.addEventListener("cut",this.cut.bind(this),{signal:Le}),document.addEventListener("paste",this.paste.bind(this),{signal:Le})},Q9=function(){var Le;(Le=Ht(this,wo))==null||Le.abort(),C0(this,wo,null)},lh=function(){const Le=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:Le}),document.addEventListener("drop",this.drop.bind(this),{signal:Le})},Ha=function(Le){Object.entries(Le).some(([tt,nt])=>Ht(this,fc)[tt]!==nt)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(Ht(this,fc),Le)}),Ht(this,da)===AnnotationEditorType.HIGHLIGHT&&Le.hasSelectedEditor===!1&&y0(this,kn,l2).call(this,[[AnnotationEditorParamsType.HIGHLIGHT_FREE,!0]]))},l2=function(Le){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:Le})},ch=async function(){if(!Ht(this,Bo)){C0(this,Bo,!0);const Le=[];for(const Ye of Ht(this,ma).values())Le.push(Ye.enable());await Promise.all(Le);for(const Ye of Ht(this,na).values())Ye.enable()}},uh=function(){if(this.unselectAll(),Ht(this,Bo)){C0(this,Bo,!1);for(const Le of Ht(this,ma).values())Le.disable();for(const Le of Ht(this,na).values())Le.disable()}},U9=function(Le){const Ye=Ht(this,ma).get(Le.pageIndex);Ye?Ye.addOrRebuild(Le):(this.addEditor(Le),this.addToAnnotationStorage(Le))},dh=function(){let Le=null;for(Le of Ht(this,vr));return Le},Lu=function(){if(Ht(this,na).size===0)return!0;if(Ht(this,na).size===1)for(const Le of Ht(this,na).values())return Le.isEmpty();return!1},V9=function(Le){for(const Ye of Ht(this,vr))Ye.unselect();Ht(this,vr).clear();for(const Ye of Le)Ye.isEmpty()||(Ht(this,vr).add(Ye),Ye.select());y0(this,kn,Ha).call(this,{hasSelectedEditor:this.hasSelection})},Nn(_1,"TRANSLATE_SMALL",1),Nn(_1,"TRANSLATE_BIG",10);let AnnotationEditorUIManager=_1;const La=class La{constructor(Le){v0(this,Vi);v0(this,pa,null);v0(this,us,!1);v0(this,Ui,null);v0(this,M1,null);v0(this,ds,null);v0(this,ai,null);v0(this,j1,!1);v0(this,ps,null);v0(this,za,null);v0(this,Ms,null);v0(this,C2,null);v0(this,fs,!1);C0(this,za,Le),C0(this,fs,Le._uiManager.useNewAltTextFlow),Ht(La,Do)||C0(La,Do,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(Le){La._l10n??(La._l10n=Le)}async render(){const Le=C0(this,Ui,document.createElement("button"));Le.className="altText",Le.tabIndex="0";const Ye=C0(this,M1,document.createElement("span"));Le.append(Ye),Ht(this,fs)?(Le.classList.add("new"),Le.setAttribute("data-l10n-id",Ht(La,Do).missing),Ye.setAttribute("data-l10n-id",Ht(La,Do)["missing-label"])):(Le.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),Ye.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const tt=Ht(this,za)._uiManager._signal;Le.addEventListener("contextmenu",noContextMenu,{signal:tt}),Le.addEventListener("pointerdown",ft=>ft.stopPropagation(),{signal:tt});const nt=ft=>{ft.preventDefault(),Ht(this,za)._uiManager.editAltText(Ht(this,za)),Ht(this,fs)&&Ht(this,za)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:Ht(this,Vi,_u)}})};return Le.addEventListener("click",nt,{capture:!0,signal:tt}),Le.addEventListener("keydown",ft=>{ft.target===Le&&ft.key==="Enter"&&(C0(this,j1,!0),nt(ft))},{signal:tt}),await y0(this,Vi,n3).call(this),Le}finish(){Ht(this,Ui)&&(Ht(this,Ui).focus({focusVisible:Ht(this,j1)}),C0(this,j1,!1))}isEmpty(){return Ht(this,fs)?Ht(this,pa)===null:!Ht(this,pa)&&!Ht(this,us)}hasData(){return Ht(this,fs)?Ht(this,pa)!==null||!!Ht(this,Ms):this.isEmpty()}get guessedText(){return Ht(this,Ms)}async setGuessedText(Le){Ht(this,pa)===null&&(C0(this,Ms,Le),C0(this,C2,await La._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:Le})),y0(this,Vi,n3).call(this))}toggleAltTextBadge(Le=!1){var Ye;if(!Ht(this,fs)||Ht(this,pa)){(Ye=Ht(this,ps))==null||Ye.remove(),C0(this,ps,null);return}if(!Ht(this,ps)){const tt=C0(this,ps,document.createElement("div"));tt.className="noAltTextBadge",Ht(this,za).div.append(tt)}Ht(this,ps).classList.toggle("hidden",!Le)}serialize(Le){let Ye=Ht(this,pa);return!Le&&Ht(this,Ms)===Ye&&(Ye=Ht(this,C2)),{altText:Ye,decorative:Ht(this,us),guessedText:Ht(this,Ms),textWithDisclaimer:Ht(this,C2)}}get data(){return{altText:Ht(this,pa),decorative:Ht(this,us)}}set data({altText:Le,decorative:Ye,guessedText:tt,textWithDisclaimer:nt,cancel:ft=!1}){tt&&(C0(this,Ms,tt),C0(this,C2,nt)),!(Ht(this,pa)===Le&&Ht(this,us)===Ye)&&(ft||(C0(this,pa,Le),C0(this,us,Ye)),y0(this,Vi,n3).call(this))}toggle(Le=!1){Ht(this,Ui)&&(!Le&&Ht(this,ai)&&(clearTimeout(Ht(this,ai)),C0(this,ai,null)),Ht(this,Ui).disabled=!Le)}shown(){Ht(this,za)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:Ht(this,Vi,_u)}})}destroy(){var Le,Ye;(Le=Ht(this,Ui))==null||Le.remove(),C0(this,Ui,null),C0(this,M1,null),C0(this,ds,null),(Ye=Ht(this,ps))==null||Ye.remove(),C0(this,ps,null)}};pa=new WeakMap,us=new WeakMap,Ui=new WeakMap,M1=new WeakMap,ds=new WeakMap,ai=new WeakMap,j1=new WeakMap,ps=new WeakMap,za=new WeakMap,Ms=new WeakMap,C2=new WeakMap,fs=new WeakMap,Do=new WeakMap,Vi=new WeakSet,_u=function(){return Ht(this,pa)&&"added"||Ht(this,pa)===null&&this.guessedText&&"review"||"missing"},n3=async function(){var nt,ft,ht;const Le=Ht(this,Ui);if(!Le)return;if(Ht(this,fs)){if(Le.classList.toggle("done",!!Ht(this,pa)),Le.setAttribute("data-l10n-id",Ht(La,Do)[Ht(this,Vi,_u)]),(nt=Ht(this,M1))==null||nt.setAttribute("data-l10n-id",Ht(La,Do)[`${Ht(this,Vi,_u)}-label`]),!Ht(this,pa)){(ft=Ht(this,ds))==null||ft.remove();return}}else{if(!Ht(this,pa)&&!Ht(this,us)){Le.classList.remove("done"),(ht=Ht(this,ds))==null||ht.remove();return}Le.classList.add("done"),Le.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let Ye=Ht(this,ds);if(!Ye){C0(this,ds,Ye=document.createElement("span")),Ye.className="tooltip",Ye.setAttribute("role","tooltip"),Ye.id=`alt-text-tooltip-${Ht(this,za).id}`;const gt=100,At=Ht(this,za)._uiManager._signal;At.addEventListener("abort",()=>{clearTimeout(Ht(this,ai)),C0(this,ai,null)},{once:!0}),Le.addEventListener("mouseenter",()=>{C0(this,ai,setTimeout(()=>{C0(this,ai,null),Ht(this,ds).classList.add("show"),Ht(this,za)._reportTelemetry({action:"alt_text_tooltip"})},gt))},{signal:At}),Le.addEventListener("mouseleave",()=>{var xt;Ht(this,ai)&&(clearTimeout(Ht(this,ai)),C0(this,ai,null)),(xt=Ht(this,ds))==null||xt.classList.remove("show")},{signal:At})}Ht(this,us)?Ye.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(Ye.removeAttribute("data-l10n-id"),Ye.textContent=Ht(this,pa)),Ye.parentNode||Le.append(Ye);const tt=Ht(this,za).getImageForAltText();tt==null||tt.setAttribute("aria-describedby",Ye.id)},v0(La,Do,null),Nn(La,"_l10n",null);let AltText=La;const yr=class yr{constructor(Le){v0(this,ir);v0(this,y2,null);v0(this,Hi,null);v0(this,Ur,null);v0(this,F1,!1);v0(this,k2,!1);v0(this,ga,null);v0(this,v2,null);v0(this,Po,null);v0(this,mc,"");v0(this,b2,!1);v0(this,Lo,null);v0(this,gc,!1);v0(this,I2,!1);v0(this,js,!1);v0(this,hs,null);v0(this,Q1,0);v0(this,U1,0);v0(this,Ci,null);Nn(this,"_editToolbar",null);Nn(this,"_initialOptions",Object.create(null));Nn(this,"_initialData",null);Nn(this,"_isVisible",!0);Nn(this,"_uiManager",null);Nn(this,"_focusEventsAllowed",!0);v0(this,Ac,!1);v0(this,td,yr._zIndex++);this.parent=Le.parent,this.id=Le.id,this.width=this.height=null,this.pageIndex=Le.parent.pageIndex,this.name=Le.name,this.div=null,this._uiManager=Le.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=Le.isCentered,this._structTreeParentId=null;const{rotation:Ye,rawDims:{pageWidth:tt,pageHeight:nt,pageX:ft,pageY:ht}}=this.parent.viewport;this.rotation=Ye,this.pageRotation=(360+Ye-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[tt,nt],this.pageTranslation=[ft,ht];const[gt,At]=this.parentDimensions;this.x=Le.x/gt,this.y=Le.y/At,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const Le=yr.prototype._resizeWithKeyboard,Ye=AnnotationEditorUIManager.TRANSLATE_SMALL,tt=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_resizerKeyboardManager",new KeyboardManager([[["ArrowLeft","mac+ArrowLeft"],Le,{args:[-Ye,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Le,{args:[-tt,0]}],[["ArrowRight","mac+ArrowRight"],Le,{args:[Ye,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Le,{args:[tt,0]}],[["ArrowUp","mac+ArrowUp"],Le,{args:[0,-Ye]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Le,{args:[0,-tt]}],[["ArrowDown","mac+ArrowDown"],Le,{args:[0,Ye]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Le,{args:[0,tt]}],[["Escape","mac+Escape"],yr.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return shadow(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(Le){const Ye=new FakeEditor({id:Le.parent.getNextId(),parent:Le.parent,uiManager:Le._uiManager});Ye.annotationElementId=Le.annotationElementId,Ye.deleted=!0,Ye._uiManager.addToAnnotationStorage(Ye)}static initialize(Le,Ye){if(yr._l10n??(yr._l10n=Le),yr._l10nResizer||(yr._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),yr._borderLineWidth!==-1)return;const tt=getComputedStyle(document.documentElement);yr._borderLineWidth=parseFloat(tt.getPropertyValue("--outline-width"))||0}static updateDefaultParams(Le,Ye){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(Le){return!1}static paste(Le,Ye){unreachable$1("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return Ht(this,Ac)}set _isDraggable(Le){var Ye;C0(this,Ac,Le),(Ye=this.div)==null||Ye.classList.toggle("draggable",Le)}get isEnterHandled(){return!0}center(){const[Le,Ye]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*Ye/(Le*2),this.y+=this.width*Le/(Ye*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*Ye/(Le*2),this.y-=this.width*Le/(Ye*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(Le){this._uiManager.addCommands(Le)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=Ht(this,td)}setParent(Le){Le!==null?(this.pageIndex=Le.pageIndex,this.pageDimensions=Le.pageDimensions):y0(this,ir,Mu).call(this),this.parent=Le}focusin(Le){this._focusEventsAllowed&&(Ht(this,b2)?C0(this,b2,!1):this.parent.setSelected(this))}focusout(Le){var tt;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const Ye=Le.relatedTarget;Ye!=null&&Ye.closest(`#${this.id}`)||(Le.preventDefault(),(tt=this.parent)!=null&&tt.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(Le,Ye,tt,nt){const[ft,ht]=this.parentDimensions;[tt,nt]=this.screenToPageTranslation(tt,nt),this.x=(Le+tt)/ft,this.y=(Ye+nt)/ht,this.fixAndSetPosition()}translate(Le,Ye){y0(this,ir,H9).call(this,this.parentDimensions,Le,Ye)}translateInPage(Le,Ye){Ht(this,Lo)||C0(this,Lo,[this.x,this.y]),y0(this,ir,H9).call(this,this.pageDimensions,Le,Ye),this.div.scrollIntoView({block:"nearest"})}drag(Le,Ye){Ht(this,Lo)||C0(this,Lo,[this.x,this.y]);const[tt,nt]=this.parentDimensions;if(this.x+=Le/tt,this.y+=Ye/nt,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:xt,y:Et}=this.div.getBoundingClientRect();this.parent.findNewParent(this,xt,Et)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:ft,y:ht}=this;const[gt,At]=this.getBaseTranslation();ft+=gt,ht+=At,this.div.style.left=`${(100*ft).toFixed(2)}%`,this.div.style.top=`${(100*ht).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!Ht(this,Lo)&&(Ht(this,Lo)[0]!==this.x||Ht(this,Lo)[1]!==this.y)}getBaseTranslation(){const[Le,Ye]=this.parentDimensions,{_borderLineWidth:tt}=yr,nt=tt/Le,ft=tt/Ye;switch(this.rotation){case 90:return[-nt,ft];case 180:return[nt,ft];case 270:return[nt,-ft];default:return[-nt,-ft]}}get _mustFixPosition(){return!0}fixAndSetPosition(Le=this.rotation){const[Ye,tt]=this.pageDimensions;let{x:nt,y:ft,width:ht,height:gt}=this;if(ht*=Ye,gt*=tt,nt*=Ye,ft*=tt,this._mustFixPosition)switch(Le){case 0:nt=Math.max(0,Math.min(Ye-ht,nt)),ft=Math.max(0,Math.min(tt-gt,ft));break;case 90:nt=Math.max(0,Math.min(Ye-gt,nt)),ft=Math.min(tt,Math.max(ht,ft));break;case 180:nt=Math.min(Ye,Math.max(ht,nt)),ft=Math.min(tt,Math.max(gt,ft));break;case 270:nt=Math.min(Ye,Math.max(gt,nt)),ft=Math.max(0,Math.min(tt-ht,ft));break}this.x=nt/=Ye,this.y=ft/=tt;const[At,xt]=this.getBaseTranslation();nt+=At,ft+=xt;const{style:Et}=this.div;Et.left=`${(100*nt).toFixed(2)}%`,Et.top=`${(100*ft).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(Le,Ye){var tt;return y0(tt=yr,xc,G9).call(tt,Le,Ye,this.parentRotation)}pageTranslationToScreen(Le,Ye){var tt;return y0(tt=yr,xc,G9).call(tt,Le,Ye,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:Le,pageDimensions:[Ye,tt]}=this;return[Ye*Le,tt*Le]}setDims(Le,Ye){const[tt,nt]=this.parentDimensions;this.div.style.width=`${(100*Le/tt).toFixed(2)}%`,Ht(this,k2)||(this.div.style.height=`${(100*Ye/nt).toFixed(2)}%`)}fixDims(){const{style:Le}=this.div,{height:Ye,width:tt}=Le,nt=tt.endsWith("%"),ft=!Ht(this,k2)&&Ye.endsWith("%");if(nt&&ft)return;const[ht,gt]=this.parentDimensions;nt||(Le.width=`${(100*parseFloat(tt)/ht).toFixed(2)}%`),!Ht(this,k2)&&!ft&&(Le.height=`${(100*parseFloat(Ye)/gt).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var Le;(Le=Ht(this,Ur))==null||Le.finish()}async addEditToolbar(){return this._editToolbar||Ht(this,I2)?this._editToolbar:(this._editToolbar=new EditorToolbar(this),this.div.append(this._editToolbar.render()),Ht(this,Ur)&&await this._editToolbar.addAltText(Ht(this,Ur)),this._editToolbar)}removeEditToolbar(){var Le;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(Le=Ht(this,Ur))==null||Le.destroy())}addContainer(Le){var tt;const Ye=(tt=this._editToolbar)==null?void 0:tt.div;Ye?Ye.before(Le):this.div.append(Le)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){Ht(this,Ur)||(AltText.initialize(yr._l10n),C0(this,Ur,new AltText(this)),Ht(this,y2)&&(Ht(this,Ur).data=Ht(this,y2),C0(this,y2,null)),await this.addEditToolbar())}get altTextData(){var Le;return(Le=Ht(this,Ur))==null?void 0:Le.data}set altTextData(Le){Ht(this,Ur)&&(Ht(this,Ur).data=Le)}get guessedAltText(){var Le;return(Le=Ht(this,Ur))==null?void 0:Le.guessedText}async setGuessedAltText(Le){var Ye;await((Ye=Ht(this,Ur))==null?void 0:Ye.setGuessedText(Le))}serializeAltText(Le){var Ye;return(Ye=Ht(this,Ur))==null?void 0:Ye.serialize(Le)}hasAltText(){return!!Ht(this,Ur)&&!Ht(this,Ur).isEmpty()}hasAltTextData(){var Le;return((Le=Ht(this,Ur))==null?void 0:Le.hasData())??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=Ht(this,F1)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),y0(this,ir,K9).call(this);const[Le,Ye]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*Ye/Le).toFixed(2)}%`,this.div.style.maxHeight=`${(100*Le/Ye).toFixed(2)}%`);const[tt,nt]=this.getInitialTranslation();return this.translate(tt,nt),bindEvents(this,this.div,["pointerdown"]),this.div}pointerdown(Le){const{isMac:Ye}=util_FeatureTest.platform;if(Le.button!==0||Le.ctrlKey&&Ye){Le.preventDefault();return}if(C0(this,b2,!0),this._isDraggable){y0(this,ir,hh).call(this,Le);return}y0(this,ir,$9).call(this,Le)}get isSelected(){return this._uiManager.isSelected(this)}moveInDOM(){Ht(this,hs)&&clearTimeout(Ht(this,hs)),C0(this,hs,setTimeout(()=>{var Le;C0(this,hs,null),(Le=this.parent)==null||Le.moveEditorInDOM(this)},0))}_setParentAndPosition(Le,Ye,tt){Le.changeParent(this),this.x=Ye,this.y=tt,this.fixAndSetPosition()}getRect(Le,Ye,tt=this.rotation){const nt=this.parentScale,[ft,ht]=this.pageDimensions,[gt,At]=this.pageTranslation,xt=Le/nt,Et=Ye/nt,yt=this.x*ft,Ct=this.y*ht,kt=this.width*ft,vt=this.height*ht;switch(tt){case 0:return[yt+xt+gt,ht-Ct-Et-vt+At,yt+xt+kt+gt,ht-Ct-Et+At];case 90:return[yt+Et+gt,ht-Ct+xt+At,yt+Et+vt+gt,ht-Ct+xt+kt+At];case 180:return[yt-xt-kt+gt,ht-Ct+Et+At,yt-xt+gt,ht-Ct+Et+vt+At];case 270:return[yt-Et-vt+gt,ht-Ct-xt-kt+At,yt-Et+gt,ht-Ct-xt+At];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(Le,Ye){const[tt,nt,ft,ht]=Le,gt=ft-tt,At=ht-nt;switch(this.rotation){case 0:return[tt,Ye-ht,gt,At];case 90:return[tt,Ye-nt,At,gt];case 180:return[ft,Ye-nt,gt,At];case 270:return[ft,Ye-ht,At,gt];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){C0(this,I2,!0)}disableEditMode(){C0(this,I2,!1)}isInEditMode(){return Ht(this,I2)}shouldGetKeyboardEvents(){return Ht(this,js)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){y0(this,ir,K9).call(this)}rotate(Le){}serializeDeleted(){var Le;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((Le=this._initialData)==null?void 0:Le.popupRef)||""}}serialize(Le=!1,Ye=null){unreachable$1("An editor must be serializable")}static async deserialize(Le,Ye,tt){const nt=new this.prototype.constructor({parent:Ye,id:Ye.getNextId(),uiManager:tt});nt.rotation=Le.rotation,C0(nt,y2,Le.accessibilityData);const[ft,ht]=nt.pageDimensions,[gt,At,xt,Et]=nt.getRectInCurrentCoords(Le.rect,ht);return nt.x=gt/ft,nt.y=At/ht,nt.width=xt/ft,nt.height=Et/ht,nt}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var Le;if((Le=Ht(this,Po))==null||Le.abort(),C0(this,Po,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),Ht(this,hs)&&(clearTimeout(Ht(this,hs)),C0(this,hs,null)),y0(this,ir,Mu).call(this),this.removeEditToolbar(),Ht(this,Ci)){for(const Ye of Ht(this,Ci).values())clearTimeout(Ye);C0(this,Ci,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(y0(this,ir,ph).call(this),Ht(this,ga).classList.remove("hidden"),bindEvents(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(Le){if(!this.isResizable||Le.target!==this.div||Le.key!=="Enter")return;this._uiManager.setSelected(this),C0(this,v2,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const Ye=Ht(this,ga).children;if(!Ht(this,Hi)){C0(this,Hi,Array.from(Ye));const ht=y0(this,ir,mh).bind(this),gt=y0(this,ir,gh).bind(this),At=this._uiManager._signal;for(const xt of Ht(this,Hi)){const Et=xt.getAttribute("data-resizer-name");xt.setAttribute("role","spinbutton"),xt.addEventListener("keydown",ht,{signal:At}),xt.addEventListener("blur",gt,{signal:At}),xt.addEventListener("focus",y0(this,ir,Ah).bind(this,Et),{signal:At}),xt.setAttribute("data-l10n-id",yr._l10nResizer[Et])}}const tt=Ht(this,Hi)[0];let nt=0;for(const ht of Ye){if(ht===tt)break;nt++}const ft=(360-this.rotation+this.parentRotation)%360/90*(Ht(this,Hi).length/4);if(ft!==nt){if(ft<nt)for(let gt=0;gt<nt-ft;gt++)Ht(this,ga).append(Ht(this,ga).firstChild);else if(ft>nt)for(let gt=0;gt<ft-nt;gt++)Ht(this,ga).firstChild.before(Ht(this,ga).lastChild);let ht=0;for(const gt of Ye){const xt=Ht(this,Hi)[ht++].getAttribute("data-resizer-name");gt.setAttribute("data-l10n-id",yr._l10nResizer[xt])}}y0(this,ir,q9).call(this,0),C0(this,js,!0),Ht(this,ga).firstChild.focus({focusVisible:!0}),Le.preventDefault(),Le.stopImmediatePropagation()}_resizeWithKeyboard(Le,Ye){Ht(this,js)&&y0(this,ir,X9).call(this,Ht(this,mc),{movementX:Le,movementY:Ye})}_stopResizingWithKeyboard(){y0(this,ir,Mu).call(this),this.div.focus()}select(){var Le,Ye,tt;if(this.makeResizable(),(Le=this.div)==null||Le.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var nt,ft;(nt=this.div)!=null&&nt.classList.contains("selectedEditor")&&((ft=this._editToolbar)==null||ft.show())});return}(Ye=this._editToolbar)==null||Ye.show(),(tt=Ht(this,Ur))==null||tt.toggleAltTextBadge(!1)}unselect(){var Le,Ye,tt,nt,ft;(Le=Ht(this,ga))==null||Le.classList.add("hidden"),(Ye=this.div)==null||Ye.classList.remove("selectedEditor"),(tt=this.div)!=null&&tt.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(nt=this._editToolbar)==null||nt.hide(),(ft=Ht(this,Ur))==null||ft.toggleAltTextBadge(!0)}updateParams(Le,Ye){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return Ht(this,gc)}set isEditing(Le){C0(this,gc,Le),this.parent&&(Le?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(Le,Ye){C0(this,k2,!0);const tt=Le/Ye,{style:nt}=this.div;nt.aspectRatio=tt,nt.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(Le,Ye=!1){if(Ye){Ht(this,Ci)||C0(this,Ci,new Map);const{action:tt}=Le;let nt=Ht(this,Ci).get(tt);nt&&clearTimeout(nt),nt=setTimeout(()=>{this._reportTelemetry(Le),Ht(this,Ci).delete(tt),Ht(this,Ci).size===0&&C0(this,Ci,null)},yr._telemetryTimeout),Ht(this,Ci).set(tt,nt);return}Le.type||(Le.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:Le}})}show(Le=this._isVisible){this.div.classList.toggle("hidden",!Le),this._isVisible=Le}enable(){this.div&&(this.div.tabIndex=0),C0(this,F1,!1)}disable(){this.div&&(this.div.tabIndex=-1),C0(this,F1,!0)}renderAnnotationElement(Le){let Ye=Le.container.querySelector(".annotationContent");if(!Ye)Ye=document.createElement("div"),Ye.classList.add("annotationContent",this.editorType),Le.container.prepend(Ye);else if(Ye.nodeName==="CANVAS"){const tt=Ye;Ye=document.createElement("div"),Ye.classList.add("annotationContent",this.editorType),tt.before(Ye)}return Ye}resetAnnotationElement(Le){const{firstChild:Ye}=Le.container;(Ye==null?void 0:Ye.nodeName)==="DIV"&&Ye.classList.contains("annotationContent")&&Ye.remove()}};y2=new WeakMap,Hi=new WeakMap,Ur=new WeakMap,F1=new WeakMap,k2=new WeakMap,ga=new WeakMap,v2=new WeakMap,Po=new WeakMap,mc=new WeakMap,b2=new WeakMap,Lo=new WeakMap,gc=new WeakMap,I2=new WeakMap,js=new WeakMap,hs=new WeakMap,Q1=new WeakMap,U1=new WeakMap,Ci=new WeakMap,Ac=new WeakMap,td=new WeakMap,ir=new WeakSet,H9=function([Le,Ye],tt,nt){[tt,nt]=this.screenToPageTranslation(tt,nt),this.x+=tt/Le,this.y+=nt/Ye,this.fixAndSetPosition()},xc=new WeakSet,G9=function(Le,Ye,tt){switch(tt){case 90:return[Ye,-Le];case 180:return[-Le,-Ye];case 270:return[-Ye,Le];default:return[Le,Ye]}},z9=function(Le){switch(Le){case 90:{const[Ye,tt]=this.pageDimensions;return[0,-Ye/tt,tt/Ye,0]}case 180:return[-1,0,0,-1];case 270:{const[Ye,tt]=this.pageDimensions;return[0,Ye/tt,-tt/Ye,0]}default:return[1,0,0,1]}},ph=function(){if(Ht(this,ga))return;C0(this,ga,document.createElement("div")),Ht(this,ga).classList.add("resizers");const Le=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],Ye=this._uiManager._signal;for(const tt of Le){const nt=document.createElement("div");Ht(this,ga).append(nt),nt.classList.add("resizer",tt),nt.setAttribute("data-resizer-name",tt),nt.addEventListener("pointerdown",y0(this,ir,fh).bind(this,tt),{signal:Ye}),nt.addEventListener("contextmenu",noContextMenu,{signal:Ye}),nt.tabIndex=-1}this.div.prepend(Ht(this,ga))},fh=function(Le,Ye){var vt;Ye.preventDefault();const{isMac:tt}=util_FeatureTest.platform;if(Ye.button!==0||Ye.ctrlKey&&tt)return;(vt=Ht(this,Ur))==null||vt.toggle(!1);const nt=this._isDraggable;this._isDraggable=!1;const ft=new AbortController,ht=this._uiManager.combinedSignal(ft);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",y0(this,ir,X9).bind(this,Le),{passive:!0,capture:!0,signal:ht}),window.addEventListener("contextmenu",noContextMenu,{signal:ht});const gt=this.x,At=this.y,xt=this.width,Et=this.height,yt=this.parent.div.style.cursor,Ct=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(Ye.target).cursor;const kt=()=>{var bt;ft.abort(),this.parent.togglePointerEvents(!0),(bt=Ht(this,Ur))==null||bt.toggle(!0),this._isDraggable=nt,this.parent.div.style.cursor=yt,this.div.style.cursor=Ct,y0(this,ir,W9).call(this,gt,At,xt,Et)};window.addEventListener("pointerup",kt,{signal:ht}),window.addEventListener("blur",kt,{signal:ht})},W9=function(Le,Ye,tt,nt){const ft=this.x,ht=this.y,gt=this.width,At=this.height;ft===Le&&ht===Ye&>===tt&&At===nt||this.addCommands({cmd:()=>{this.width=gt,this.height=At,this.x=ft,this.y=ht;const[xt,Et]=this.parentDimensions;this.setDims(xt*gt,Et*At),this.fixAndSetPosition()},undo:()=>{this.width=tt,this.height=nt,this.x=Le,this.y=Ye;const[xt,Et]=this.parentDimensions;this.setDims(xt*tt,Et*nt),this.fixAndSetPosition()},mustExec:!0})},X9=function(Le,Ye){const[tt,nt]=this.parentDimensions,ft=this.x,ht=this.y,gt=this.width,At=this.height,xt=yr.MIN_SIZE/tt,Et=yr.MIN_SIZE/nt,yt=jt=>Math.round(jt*1e4)/1e4,Ct=y0(this,ir,z9).call(this,this.rotation),kt=(jt,Gt)=>[Ct[0]*jt+Ct[2]*Gt,Ct[1]*jt+Ct[3]*Gt],vt=y0(this,ir,z9).call(this,360-this.rotation),bt=(jt,Gt)=>[vt[0]*jt+vt[2]*Gt,vt[1]*jt+vt[3]*Gt];let It,wt,Rt=!1,Tt=!1;switch(Le){case"topLeft":Rt=!0,It=(jt,Gt)=>[0,0],wt=(jt,Gt)=>[jt,Gt];break;case"topMiddle":It=(jt,Gt)=>[jt/2,0],wt=(jt,Gt)=>[jt/2,Gt];break;case"topRight":Rt=!0,It=(jt,Gt)=>[jt,0],wt=(jt,Gt)=>[0,Gt];break;case"middleRight":Tt=!0,It=(jt,Gt)=>[jt,Gt/2],wt=(jt,Gt)=>[0,Gt/2];break;case"bottomRight":Rt=!0,It=(jt,Gt)=>[jt,Gt],wt=(jt,Gt)=>[0,0];break;case"bottomMiddle":It=(jt,Gt)=>[jt/2,Gt],wt=(jt,Gt)=>[jt/2,0];break;case"bottomLeft":Rt=!0,It=(jt,Gt)=>[0,Gt],wt=(jt,Gt)=>[jt,0];break;case"middleLeft":Tt=!0,It=(jt,Gt)=>[0,Gt/2],wt=(jt,Gt)=>[jt,Gt/2];break}const Bt=It(gt,At),Dt=wt(gt,At);let Pt=kt(...Dt);const Nt=yt(ft+Pt[0]),Lt=yt(ht+Pt[1]);let Wt=1,$t=1,[Kt,Vt]=this.screenToPageTranslation(Ye.movementX,Ye.movementY);if([Kt,Vt]=bt(Kt/tt,Vt/nt),Rt){const jt=Math.hypot(gt,At);Wt=$t=Math.max(Math.min(Math.hypot(Dt[0]-Bt[0]-Kt,Dt[1]-Bt[1]-Vt)/jt,1/gt,1/At),xt/gt,Et/At)}else Tt?Wt=Math.max(xt,Math.min(1,Math.abs(Dt[0]-Bt[0]-Kt)))/gt:$t=Math.max(Et,Math.min(1,Math.abs(Dt[1]-Bt[1]-Vt)))/At;const Ut=yt(gt*Wt),_t=yt(At*$t);Pt=kt(...wt(Ut,_t));const Xt=Nt-Pt[0],Qt=Lt-Pt[1];this.width=Ut,this.height=_t,this.x=Xt,this.y=Qt,this.setDims(tt*Ut,nt*_t),this.fixAndSetPosition()},$9=function(Le){const{isMac:Ye}=util_FeatureTest.platform;Le.ctrlKey&&!Ye||Le.shiftKey||Le.metaKey&&Ye?this.parent.toggleSelected(this):this.parent.setSelected(this)},hh=function(Le){const{isSelected:Ye}=this;this._uiManager.setUpDragSession();const tt=new AbortController,nt=this._uiManager.combinedSignal(tt);if(Ye){this.div.classList.add("moving"),C0(this,Q1,Le.clientX),C0(this,U1,Le.clientY);const ht=gt=>{const{clientX:At,clientY:xt}=gt,[Et,yt]=this.screenToPageTranslation(At-Ht(this,Q1),xt-Ht(this,U1));C0(this,Q1,At),C0(this,U1,xt),this._uiManager.dragSelectedEditors(Et,yt)};window.addEventListener("pointermove",ht,{passive:!0,capture:!0,signal:nt})}const ft=()=>{tt.abort(),Ye&&this.div.classList.remove("moving"),C0(this,b2,!1),this._uiManager.endDragSession()||y0(this,ir,$9).call(this,Le)};window.addEventListener("pointerup",ft,{signal:nt}),window.addEventListener("blur",ft,{signal:nt})},K9=function(){if(Ht(this,Po)||!this.div)return;C0(this,Po,new AbortController);const Le=this._uiManager.combinedSignal(Ht(this,Po));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:Le}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:Le})},mh=function(Le){yr._resizerKeyboardManager.exec(this,Le)},gh=function(Le){var Ye;Ht(this,js)&&((Ye=Le.relatedTarget)==null?void 0:Ye.parentNode)!==Ht(this,ga)&&y0(this,ir,Mu).call(this)},Ah=function(Le){C0(this,mc,Ht(this,js)?Le:"")},q9=function(Le){if(Ht(this,Hi))for(const Ye of Ht(this,Hi))Ye.tabIndex=Le},Mu=function(){if(C0(this,js,!1),y0(this,ir,q9).call(this,-1),Ht(this,v2)){const{savedX:Le,savedY:Ye,savedWidth:tt,savedHeight:nt}=Ht(this,v2);y0(this,ir,W9).call(this,Le,Ye,tt,nt),C0(this,v2,null)}},v0(yr,xc),Nn(yr,"_l10n",null),Nn(yr,"_l10nResizer",null),Nn(yr,"_borderLineWidth",-1),Nn(yr,"_colorManager",new ColorManager),Nn(yr,"_zIndex",1),Nn(yr,"_telemetryTimeout",1e3);let AnnotationEditor=yr;class FakeEditor extends AnnotationEditor{constructor(Le){super(Le),this.annotationElementId=Le.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const SEED=3285377520,MASK_HIGH=4294901760,MASK_LOW=65535;class MurmurHash3_64{constructor(Le){this.h1=Le?Le&4294967295:SEED,this.h2=Le?Le&4294967295:SEED}update(Le){let Ye,tt;if(typeof Le=="string"){Ye=new Uint8Array(Le.length*2),tt=0;for(let bt=0,It=Le.length;bt<It;bt++){const wt=Le.charCodeAt(bt);wt<=255?Ye[tt++]=wt:(Ye[tt++]=wt>>>8,Ye[tt++]=wt&255)}}else if(ArrayBuffer.isView(Le))Ye=Le.slice(),tt=Ye.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const nt=tt>>2,ft=tt-nt*4,ht=new Uint32Array(Ye.buffer,0,nt);let gt=0,At=0,xt=this.h1,Et=this.h2;const yt=3432918353,Ct=461845907,kt=yt&MASK_LOW,vt=Ct&MASK_LOW;for(let bt=0;bt<nt;bt++)bt&1?(gt=ht[bt],gt=gt*yt&MASK_HIGH|gt*kt&MASK_LOW,gt=gt<<15|gt>>>17,gt=gt*Ct&MASK_HIGH|gt*vt&MASK_LOW,xt^=gt,xt=xt<<13|xt>>>19,xt=xt*5+3864292196):(At=ht[bt],At=At*yt&MASK_HIGH|At*kt&MASK_LOW,At=At<<15|At>>>17,At=At*Ct&MASK_HIGH|At*vt&MASK_LOW,Et^=At,Et=Et<<13|Et>>>19,Et=Et*5+3864292196);switch(gt=0,ft){case 3:gt^=Ye[nt*4+2]<<16;case 2:gt^=Ye[nt*4+1]<<8;case 1:gt^=Ye[nt*4],gt=gt*yt&MASK_HIGH|gt*kt&MASK_LOW,gt=gt<<15|gt>>>17,gt=gt*Ct&MASK_HIGH|gt*vt&MASK_LOW,nt&1?xt^=gt:Et^=gt}this.h1=xt,this.h2=Et}hexdigest(){let Le=this.h1,Ye=this.h2;return Le^=Ye>>>1,Le=Le*3981806797&MASK_HIGH|Le*36045&MASK_LOW,Ye=Ye*4283543511&MASK_HIGH|((Ye<<16|Le>>>16)*2950163797&MASK_HIGH)>>>16,Le^=Ye>>>1,Le=Le*444984403&MASK_HIGH|Le*60499&MASK_LOW,Ye=Ye*3301882366&MASK_HIGH|((Ye<<16|Le>>>16)*3120437893&MASK_HIGH)>>>16,Le^=Ye>>>1,(Le>>>0).toString(16).padStart(8,"0")+(Ye>>>0).toString(16).padStart(8,"0")}}const SerializableEmpty=Object.freeze({map:null,hash:"",transfer:void 0});class AnnotationStorage{constructor(){v0(this,nd);v0(this,S2,!1);v0(this,w2,null);v0(this,fa,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(Le,Ye){const tt=Ht(this,fa).get(Le);return tt===void 0?Ye:Object.assign(Ye,tt)}getRawValue(Le){return Ht(this,fa).get(Le)}remove(Le){if(Ht(this,fa).delete(Le),Ht(this,fa).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const Ye of Ht(this,fa).values())if(Ye instanceof AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(Le,Ye){const tt=Ht(this,fa).get(Le);let nt=!1;if(tt!==void 0)for(const[ft,ht]of Object.entries(Ye))tt[ft]!==ht&&(nt=!0,tt[ft]=ht);else nt=!0,Ht(this,fa).set(Le,Ye);nt&&y0(this,nd,xh).call(this),Ye instanceof AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(Ye.constructor._type)}has(Le){return Ht(this,fa).has(Le)}getAll(){return Ht(this,fa).size>0?objectFromMap(Ht(this,fa)):null}setAll(Le){for(const[Ye,tt]of Object.entries(Le))this.setValue(Ye,tt)}get size(){return Ht(this,fa).size}resetModified(){Ht(this,S2)&&(C0(this,S2,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new PrintAnnotationStorage(this)}get serializable(){if(Ht(this,fa).size===0)return SerializableEmpty;const Le=new Map,Ye=new MurmurHash3_64,tt=[],nt=Object.create(null);let ft=!1;for(const[ht,gt]of Ht(this,fa)){const At=gt instanceof AnnotationEditor?gt.serialize(!1,nt):gt;At&&(Le.set(ht,At),Ye.update(`${ht}:${JSON.stringify(At)}`),ft||(ft=!!At.bitmap))}if(ft)for(const ht of Le.values())ht.bitmap&&tt.push(ht.bitmap);return Le.size>0?{map:Le,hash:Ye.hexdigest(),transfer:tt}:SerializableEmpty}get editorStats(){let Le=null;const Ye=new Map;for(const tt of Ht(this,fa).values()){if(!(tt instanceof AnnotationEditor))continue;const nt=tt.telemetryFinalData;if(!nt)continue;const{type:ft}=nt;Ye.has(ft)||Ye.set(ft,Object.getPrototypeOf(tt).constructor),Le||(Le=Object.create(null));const ht=Le[ft]||(Le[ft]=new Map);for(const[gt,At]of Object.entries(nt)){if(gt==="type")continue;let xt=ht.get(gt);xt||(xt=new Map,ht.set(gt,xt));const Et=xt.get(At)??0;xt.set(At,Et+1)}}for(const[tt,nt]of Ye)Le[tt]=nt.computeTelemetryFinalData(Le[tt]);return Le}resetModifiedIds(){C0(this,w2,null)}get modifiedIds(){if(Ht(this,w2))return Ht(this,w2);const Le=[];for(const Ye of Ht(this,fa).values())!(Ye instanceof AnnotationEditor)||!Ye.annotationElementId||!Ye.serialize()||Le.push(Ye.annotationElementId);return C0(this,w2,{ids:new Set(Le),hash:Le.join(",")})}}S2=new WeakMap,w2=new WeakMap,fa=new WeakMap,nd=new WeakSet,xh=function(){Ht(this,S2)||(C0(this,S2,!0),typeof this.onSetModified=="function"&&this.onSetModified())};class PrintAnnotationStorage extends AnnotationStorage{constructor(Ye){super();v0(this,Ec);const{map:tt,hash:nt,transfer:ft}=Ye.serializable,ht=structuredClone(tt,ft?{transfer:ft}:null);C0(this,Ec,{map:ht,hash:nt,transfer:ft})}get print(){unreachable$1("Should not call PrintAnnotationStorage.print")}get serializable(){return Ht(this,Ec)}get modifiedIds(){return shadow(this,"modifiedIds",{ids:new Set,hash:""})}}Ec=new WeakMap;class FontLoader{constructor({ownerDocument:Le=globalThis.document,styleElement:Ye=null}){v0(this,V1,new Set);this._document=Le,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(Le){this.nativeFontFaces.add(Le),this._document.fonts.add(Le)}removeNativeFontFace(Le){this.nativeFontFaces.delete(Le),this._document.fonts.delete(Le)}insertRule(Le){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const Ye=this.styleElement.sheet;Ye.insertRule(Le,Ye.cssRules.length)}clear(){for(const Le of this.nativeFontFaces)this._document.fonts.delete(Le);this.nativeFontFaces.clear(),Ht(this,V1).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:Le,_inspectFont:Ye}){if(!(!Le||Ht(this,V1).has(Le.loadedName))){if(assert(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:tt,src:nt,style:ft}=Le,ht=new FontFace(tt,nt,ft);this.addNativeFontFace(ht);try{await ht.load(),Ht(this,V1).add(tt),Ye==null||Ye(Le)}catch{warn$1(`Cannot load system font: ${Le.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(ht)}return}unreachable$1("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(Le){if(Le.attached||Le.missingFile&&!Le.systemFontInfo)return;if(Le.attached=!0,Le.systemFontInfo){await this.loadSystemFont(Le);return}if(this.isFontLoadingAPISupported){const tt=Le.createNativeFontFace();if(tt){this.addNativeFontFace(tt);try{await tt.loaded}catch(nt){throw warn$1(`Failed to load font '${tt.family}': '${nt}'.`),Le.disableFontFace=!0,nt}}return}const Ye=Le.createFontFaceRule();if(Ye){if(this.insertRule(Ye),this.isSyncFontLoadingSupported)return;await new Promise(tt=>{const nt=this._queueLoadingCallback(tt);this._prepareFontLoadEvent(Le,nt)})}}get isFontLoadingAPISupported(){var Ye;const Le=!!((Ye=this._document)!=null&&Ye.fonts);return shadow(this,"isFontLoadingAPISupported",Le)}get isSyncFontLoadingSupported(){let Le=!1;return(isNodeJS||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(Le=!0),shadow(this,"isSyncFontLoadingSupported",Le)}_queueLoadingCallback(Le){function Ye(){for(assert(!nt.done,"completeRequest() cannot be called twice."),nt.done=!0;tt.length>0&&tt[0].done;){const ft=tt.shift();setTimeout(ft.callback,0)}}const{loadingRequests:tt}=this,nt={done:!1,complete:Ye,callback:Le};return tt.push(nt),nt}get _loadTestFont(){const Le=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return shadow(this,"_loadTestFont",Le)}_prepareFontLoadEvent(Le,Ye){function tt(Bt,Dt){return Bt.charCodeAt(Dt)<<24|Bt.charCodeAt(Dt+1)<<16|Bt.charCodeAt(Dt+2)<<8|Bt.charCodeAt(Dt+3)&255}function nt(Bt,Dt,Pt,Nt){const Lt=Bt.substring(0,Dt),Wt=Bt.substring(Dt+Pt);return Lt+Nt+Wt}let ft,ht;const gt=this._document.createElement("canvas");gt.width=1,gt.height=1;const At=gt.getContext("2d");let xt=0;function Et(Bt,Dt){if(++xt>30){warn$1("Load test font never loaded."),Dt();return}if(At.font="30px "+Bt,At.fillText(".",0,20),At.getImageData(0,0,1,1).data[3]>0){Dt();return}setTimeout(Et.bind(null,Bt,Dt))}const yt=`lt${Date.now()}${this.loadTestFontId++}`;let Ct=this._loadTestFont;Ct=nt(Ct,976,yt.length,yt);const vt=16,bt=1482184792;let It=tt(Ct,vt);for(ft=0,ht=yt.length-3;ft<ht;ft+=4)It=It-bt+tt(yt,ft)|0;ft<yt.length&&(It=It-bt+tt(yt+"XXX",ft)|0),Ct=nt(Ct,vt,4,string32(It));const wt=`url(data:font/opentype;base64,${btoa(Ct)});`,Rt=`@font-face {font-family:"${yt}";src:${wt}}`;this.insertRule(Rt);const Tt=this._document.createElement("div");Tt.style.visibility="hidden",Tt.style.width=Tt.style.height="10px",Tt.style.position="absolute",Tt.style.top=Tt.style.left="0px";for(const Bt of[Le.loadedName,yt]){const Dt=this._document.createElement("span");Dt.textContent="Hi",Dt.style.fontFamily=Bt,Tt.append(Dt)}this._document.body.append(Tt),Et(yt,()=>{Tt.remove(),Ye.complete()})}}V1=new WeakMap;class FontFaceObject{constructor(Le,{disableFontFace:Ye=!1,inspectFont:tt=null}){this.compiledGlyphs=Object.create(null);for(const nt in Le)this[nt]=Le[nt];this.disableFontFace=Ye===!0,this._inspectFont=tt}createNativeFontFace(){var Ye;if(!this.data||this.disableFontFace)return null;let Le;if(!this.cssFontInfo)Le=new FontFace(this.loadedName,this.data,{});else{const tt={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(tt.style=`oblique ${this.cssFontInfo.italicAngle}deg`),Le=new FontFace(this.cssFontInfo.fontFamily,this.data,tt)}return(Ye=this._inspectFont)==null||Ye.call(this,this),Le}createFontFaceRule(){var tt;if(!this.data||this.disableFontFace)return null;const Le=`url(data:${this.mimetype};base64,${toBase64Util(this.data)});`;let Ye;if(!this.cssFontInfo)Ye=`@font-face {font-family:"${this.loadedName}";src:${Le}}`;else{let nt=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(nt+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),Ye=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${nt}src:${Le}}`}return(tt=this._inspectFont)==null||tt.call(this,this,Le),Ye}getPathGenerator(Le,Ye){if(this.compiledGlyphs[Ye]!==void 0)return this.compiledGlyphs[Ye];let tt;try{tt=Le.get(this.loadedName+"_path_"+Ye)}catch(ft){warn$1(`getPathGenerator - ignoring character: "${ft}".`)}if(!Array.isArray(tt)||tt.length===0)return this.compiledGlyphs[Ye]=function(ft,ht){};const nt=[];for(let ft=0,ht=tt.length;ft<ht;)switch(tt[ft++]){case FontRenderOps.BEZIER_CURVE_TO:{const[gt,At,xt,Et,yt,Ct]=tt.slice(ft,ft+6);nt.push(kt=>kt.bezierCurveTo(gt,At,xt,Et,yt,Ct)),ft+=6}break;case FontRenderOps.MOVE_TO:{const[gt,At]=tt.slice(ft,ft+2);nt.push(xt=>xt.moveTo(gt,At)),ft+=2}break;case FontRenderOps.LINE_TO:{const[gt,At]=tt.slice(ft,ft+2);nt.push(xt=>xt.lineTo(gt,At)),ft+=2}break;case FontRenderOps.QUADRATIC_CURVE_TO:{const[gt,At,xt,Et]=tt.slice(ft,ft+4);nt.push(yt=>yt.quadraticCurveTo(gt,At,xt,Et)),ft+=4}break;case FontRenderOps.RESTORE:nt.push(gt=>gt.restore());break;case FontRenderOps.SAVE:nt.push(gt=>gt.save());break;case FontRenderOps.SCALE:assert(nt.length===2,"Scale command is only valid at the third position.");break;case FontRenderOps.TRANSFORM:{const[gt,At,xt,Et,yt,Ct]=tt.slice(ft,ft+6);nt.push(kt=>kt.transform(gt,At,xt,Et,yt,Ct)),ft+=6}break;case FontRenderOps.TRANSLATE:{const[gt,At]=tt.slice(ft,ft+2);nt.push(xt=>xt.translate(gt,At)),ft+=2}break}return this.compiledGlyphs[Ye]=function(ht,gt){nt[0](ht),nt[1](ht),ht.scale(gt,-gt);for(let At=2,xt=nt.length;At<xt;At++)nt[At](ht)}}}class BaseCanvasFactory{constructor({enableHWA:Le=!1}){v0(this,Cc,!1);C0(this,Cc,Le)}create(Le,Ye){if(Le<=0||Ye<=0)throw new Error("Invalid canvas size");const tt=this._createCanvas(Le,Ye);return{canvas:tt,context:tt.getContext("2d",{willReadFrequently:!Ht(this,Cc)})}}reset(Le,Ye,tt){if(!Le.canvas)throw new Error("Canvas is not specified");if(Ye<=0||tt<=0)throw new Error("Invalid canvas size");Le.canvas.width=Ye,Le.canvas.height=tt}destroy(Le){if(!Le.canvas)throw new Error("Canvas is not specified");Le.canvas.width=0,Le.canvas.height=0,Le.canvas=null,Le.context=null}_createCanvas(Le,Ye){unreachable$1("Abstract method `_createCanvas` called.")}}Cc=new WeakMap;class DOMCanvasFactory extends BaseCanvasFactory{constructor({ownerDocument:Le=globalThis.document,enableHWA:Ye=!1}){super({enableHWA:Ye}),this._document=Le}_createCanvas(Le,Ye){const tt=this._document.createElement("canvas");return tt.width=Le,tt.height=Ye,tt}}class BaseCMapReaderFactory{constructor({baseUrl:Le=null,isCompressed:Ye=!0}){this.baseUrl=Le,this.isCompressed=Ye}async fetch({name:Le}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!Le)throw new Error("CMap name must be specified.");const Ye=this.baseUrl+Le+(this.isCompressed?".bcmap":"");return this._fetch(Ye).then(tt=>({cMapData:tt,isCompressed:this.isCompressed})).catch(tt=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${Ye}`)})}async _fetch(Le){unreachable$1("Abstract method `_fetch` called.")}}class DOMCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(Le){const Ye=await fetchData(Le,this.isCompressed?"arraybuffer":"text");return Ye instanceof ArrayBuffer?new Uint8Array(Ye):stringToBytes(Ye)}}class BaseFilterFactory{addFilter(Le){return"none"}addHCMFilter(Le,Ye){return"none"}addAlphaFilter(Le){return"none"}addLuminosityFilter(Le){return"none"}addHighlightHCMFilter(Le,Ye,tt,nt,ft){return"none"}destroy(Le=!1){}}class DOMFilterFactory extends BaseFilterFactory{constructor({docId:Ye,ownerDocument:tt=globalThis.document}){super();v0(this,In);v0(this,R2);v0(this,T2);v0(this,ms);v0(this,Fs);v0(this,Ia);v0(this,rd);v0(this,B2,0);C0(this,Fs,Ye),C0(this,Ia,tt)}addFilter(Ye){if(!Ye)return"none";let tt=Ht(this,In,Na).get(Ye);if(tt)return tt;const[nt,ft,ht]=y0(this,In,r3).call(this,Ye),gt=Ye.length===1?nt:`${nt}${ft}${ht}`;if(tt=Ht(this,In,Na).get(gt),tt)return Ht(this,In,Na).set(Ye,tt),tt;const At=`g_${Ht(this,Fs)}_transfer_map_${Va(this,B2)._++}`,xt=y0(this,In,$l).call(this,At);Ht(this,In,Na).set(Ye,xt),Ht(this,In,Na).set(gt,xt);const Et=y0(this,In,Kl).call(this,At);return y0(this,In,Fu).call(this,nt,ft,ht,Et),xt}addHCMFilter(Ye,tt){var vt;const nt=`${Ye}-${tt}`,ft="base";let ht=Ht(this,In,Wl).get(ft);if((ht==null?void 0:ht.key)===nt||(ht?((vt=ht.filter)==null||vt.remove(),ht.key=nt,ht.url="none",ht.filter=null):(ht={key:nt,url:"none",filter:null},Ht(this,In,Wl).set(ft,ht)),!Ye||!tt))return ht.url;const gt=y0(this,In,Qu).call(this,Ye);Ye=Util.makeHexColor(...gt);const At=y0(this,In,Qu).call(this,tt);if(tt=Util.makeHexColor(...At),Ht(this,In,Xl).style.color="",Ye==="#000000"&&tt==="#ffffff"||Ye===tt)return ht.url;const xt=new Array(256);for(let bt=0;bt<=255;bt++){const It=bt/255;xt[bt]=It<=.03928?It/12.92:((It+.055)/1.055)**2.4}const Et=xt.join(","),yt=`g_${Ht(this,Fs)}_hcm_filter`,Ct=ht.filter=y0(this,In,Kl).call(this,yt);y0(this,In,Fu).call(this,Et,Et,Et,Ct),y0(this,In,Y9).call(this,Ct);const kt=(bt,It)=>{const wt=gt[bt]/255,Rt=At[bt]/255,Tt=new Array(It+1);for(let Bt=0;Bt<=It;Bt++)Tt[Bt]=wt+Bt/It*(Rt-wt);return Tt.join(",")};return y0(this,In,Fu).call(this,kt(0,5),kt(1,5),kt(2,5),Ct),ht.url=y0(this,In,$l).call(this,yt),ht.url}addAlphaFilter(Ye){let tt=Ht(this,In,Na).get(Ye);if(tt)return tt;const[nt]=y0(this,In,r3).call(this,[Ye]),ft=`alpha_${nt}`;if(tt=Ht(this,In,Na).get(ft),tt)return Ht(this,In,Na).set(Ye,tt),tt;const ht=`g_${Ht(this,Fs)}_alpha_map_${Va(this,B2)._++}`,gt=y0(this,In,$l).call(this,ht);Ht(this,In,Na).set(Ye,gt),Ht(this,In,Na).set(ft,gt);const At=y0(this,In,Kl).call(this,ht);return y0(this,In,Z9).call(this,nt,At),gt}addLuminosityFilter(Ye){let tt=Ht(this,In,Na).get(Ye||"luminosity");if(tt)return tt;let nt,ft;if(Ye?([nt]=y0(this,In,r3).call(this,[Ye]),ft=`luminosity_${nt}`):ft="luminosity",tt=Ht(this,In,Na).get(ft),tt)return Ht(this,In,Na).set(Ye,tt),tt;const ht=`g_${Ht(this,Fs)}_luminosity_map_${Va(this,B2)._++}`,gt=y0(this,In,$l).call(this,ht);Ht(this,In,Na).set(Ye,gt),Ht(this,In,Na).set(ft,gt);const At=y0(this,In,Kl).call(this,ht);return y0(this,In,Eh).call(this,At),Ye&&y0(this,In,Z9).call(this,nt,At),gt}addHighlightHCMFilter(Ye,tt,nt,ft,ht){var Rt;const gt=`${tt}-${nt}-${ft}-${ht}`;let At=Ht(this,In,Wl).get(Ye);if((At==null?void 0:At.key)===gt||(At?((Rt=At.filter)==null||Rt.remove(),At.key=gt,At.url="none",At.filter=null):(At={key:gt,url:"none",filter:null},Ht(this,In,Wl).set(Ye,At)),!tt||!nt))return At.url;const[xt,Et]=[tt,nt].map(y0(this,In,Qu).bind(this));let yt=Math.round(.2126*xt[0]+.7152*xt[1]+.0722*xt[2]),Ct=Math.round(.2126*Et[0]+.7152*Et[1]+.0722*Et[2]),[kt,vt]=[ft,ht].map(y0(this,In,Qu).bind(this));Ct<yt&&([yt,Ct,kt,vt]=[Ct,yt,vt,kt]),Ht(this,In,Xl).style.color="";const bt=(Tt,Bt,Dt)=>{const Pt=new Array(256),Nt=(Ct-yt)/Dt,Lt=Tt/255,Wt=(Bt-Tt)/(255*Dt);let $t=0;for(let Kt=0;Kt<=Dt;Kt++){const Vt=Math.round(yt+Kt*Nt),Ut=Lt+Kt*Wt;for(let _t=$t;_t<=Vt;_t++)Pt[_t]=Ut;$t=Vt+1}for(let Kt=$t;Kt<256;Kt++)Pt[Kt]=Pt[$t-1];return Pt.join(",")},It=`g_${Ht(this,Fs)}_hcm_${Ye}_filter`,wt=At.filter=y0(this,In,Kl).call(this,It);return y0(this,In,Y9).call(this,wt),y0(this,In,Fu).call(this,bt(kt[0],vt[0],5),bt(kt[1],vt[1],5),bt(kt[2],vt[2],5),wt),At.url=y0(this,In,$l).call(this,It),At.url}destroy(Ye=!1){Ye&&Ht(this,In,Wl).size!==0||(Ht(this,ms)&&(Ht(this,ms).parentNode.parentNode.remove(),C0(this,ms,null)),Ht(this,T2)&&(Ht(this,T2).clear(),C0(this,T2,null)),C0(this,B2,0))}}R2=new WeakMap,T2=new WeakMap,ms=new WeakMap,Fs=new WeakMap,Ia=new WeakMap,rd=new WeakMap,B2=new WeakMap,In=new WeakSet,Na=function(){return Ht(this,T2)||C0(this,T2,new Map)},Wl=function(){return Ht(this,rd)||C0(this,rd,new Map)},Xl=function(){if(!Ht(this,ms)){const Ye=Ht(this,Ia).createElement("div"),{style:tt}=Ye;tt.visibility="hidden",tt.contain="strict",tt.width=tt.height=0,tt.position="absolute",tt.top=tt.left=0,tt.zIndex=-1;const nt=Ht(this,Ia).createElementNS(SVG_NS,"svg");nt.setAttribute("width",0),nt.setAttribute("height",0),C0(this,ms,Ht(this,Ia).createElementNS(SVG_NS,"defs")),Ye.append(nt),nt.append(Ht(this,ms)),Ht(this,Ia).body.append(Ye)}return Ht(this,ms)},r3=function(Ye){if(Ye.length===1){const xt=Ye[0],Et=new Array(256);for(let Ct=0;Ct<256;Ct++)Et[Ct]=xt[Ct]/255;const yt=Et.join(",");return[yt,yt,yt]}const[tt,nt,ft]=Ye,ht=new Array(256),gt=new Array(256),At=new Array(256);for(let xt=0;xt<256;xt++)ht[xt]=tt[xt]/255,gt[xt]=nt[xt]/255,At[xt]=ft[xt]/255;return[ht.join(","),gt.join(","),At.join(",")]},$l=function(Ye){if(Ht(this,R2)===void 0){C0(this,R2,"");const tt=Ht(this,Ia).URL;tt!==Ht(this,Ia).baseURI&&(isDataScheme(tt)?warn$1('#createUrl: ignore "data:"-URL for performance reasons.'):C0(this,R2,tt.split("#",1)[0]))}return`url(${Ht(this,R2)}#${Ye})`},Eh=function(Ye){const tt=Ht(this,Ia).createElementNS(SVG_NS,"feColorMatrix");tt.setAttribute("type","matrix"),tt.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),Ye.append(tt)},Y9=function(Ye){const tt=Ht(this,Ia).createElementNS(SVG_NS,"feColorMatrix");tt.setAttribute("type","matrix"),tt.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),Ye.append(tt)},Kl=function(Ye){const tt=Ht(this,Ia).createElementNS(SVG_NS,"filter");return tt.setAttribute("color-interpolation-filters","sRGB"),tt.setAttribute("id",Ye),Ht(this,In,Xl).append(tt),tt},ju=function(Ye,tt,nt){const ft=Ht(this,Ia).createElementNS(SVG_NS,tt);ft.setAttribute("type","discrete"),ft.setAttribute("tableValues",nt),Ye.append(ft)},Fu=function(Ye,tt,nt,ft){const ht=Ht(this,Ia).createElementNS(SVG_NS,"feComponentTransfer");ft.append(ht),y0(this,In,ju).call(this,ht,"feFuncR",Ye),y0(this,In,ju).call(this,ht,"feFuncG",tt),y0(this,In,ju).call(this,ht,"feFuncB",nt)},Z9=function(Ye,tt){const nt=Ht(this,Ia).createElementNS(SVG_NS,"feComponentTransfer");tt.append(nt),y0(this,In,ju).call(this,nt,"feFuncA",Ye)},Qu=function(Ye){return Ht(this,In,Xl).style.color=Ye,getRGB(getComputedStyle(Ht(this,In,Xl)).getPropertyValue("color"))};class BaseStandardFontDataFactory{constructor({baseUrl:Le=null}){this.baseUrl=Le}async fetch({filename:Le}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!Le)throw new Error("Font filename must be specified.");const Ye=`${this.baseUrl}${Le}`;return this._fetch(Ye).catch(tt=>{throw new Error(`Unable to load font data at: ${Ye}`)})}async _fetch(Le){unreachable$1("Abstract method `_fetch` called.")}}class DOMStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(Le){const Ye=await fetchData(Le,"arraybuffer");return new Uint8Array(Ye)}}if(isNodeJS){var packageCapability=Promise.withResolvers(),packageMap=null;(async()=>{const Le=await Promise.resolve().then(()=>__viteBrowserExternal$1),Ye=await Promise.resolve().then(()=>__viteBrowserExternal$1),tt=await Promise.resolve().then(()=>__viteBrowserExternal$1),nt=await Promise.resolve().then(()=>__viteBrowserExternal$1);let ft,ht;return new Map(Object.entries({fs:Le,http:Ye,https:tt,url:nt,canvas:ft,path2d:ht}))})().then(Le=>{packageMap=Le,packageCapability.resolve()},Le=>{warn$1(`loadPackages: ${Le}`),packageMap=new Map,packageCapability.resolve()})}class NodePackages{static get promise(){return packageCapability.promise}static get(Le){return packageMap==null?void 0:packageMap.get(Le)}}async function node_utils_fetchData(Be){const Ye=await NodePackages.get("fs").promises.readFile(Be);return new Uint8Array(Ye)}class NodeFilterFactory extends BaseFilterFactory{}class NodeCanvasFactory extends BaseCanvasFactory{_createCanvas(Le,Ye){return NodePackages.get("canvas").createCanvas(Le,Ye)}}class NodeCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(Le){return node_utils_fetchData(Le)}}class NodeStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(Le){return node_utils_fetchData(Le)}}const PathType={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function applyBoundingBox(Be,Le){if(!Le)return;const Ye=Le[2]-Le[0],tt=Le[3]-Le[1],nt=new Path2D;nt.rect(Le[0],Le[1],Ye,tt),Be.clip(nt)}class BaseShadingPattern{getPattern(){unreachable$1("Abstract method `getPattern` called.")}}class RadialAxialShadingPattern extends BaseShadingPattern{constructor(Le){super(),this._type=Le[1],this._bbox=Le[2],this._colorStops=Le[3],this._p0=Le[4],this._p1=Le[5],this._r0=Le[6],this._r1=Le[7],this.matrix=null}_createGradient(Le){let Ye;this._type==="axial"?Ye=Le.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(Ye=Le.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const tt of this._colorStops)Ye.addColorStop(tt[0],tt[1]);return Ye}getPattern(Le,Ye,tt,nt){let ft;if(nt===PathType.STROKE||nt===PathType.FILL){const ht=Ye.current.getClippedPathBoundingBox(nt,getCurrentTransform(Le))||[0,0,0,0],gt=Math.ceil(ht[2]-ht[0])||1,At=Math.ceil(ht[3]-ht[1])||1,xt=Ye.cachedCanvases.getCanvas("pattern",gt,At),Et=xt.context;Et.clearRect(0,0,Et.canvas.width,Et.canvas.height),Et.beginPath(),Et.rect(0,0,Et.canvas.width,Et.canvas.height),Et.translate(-ht[0],-ht[1]),tt=Util.transform(tt,[1,0,0,1,ht[0],ht[1]]),Et.transform(...Ye.baseTransform),this.matrix&&Et.transform(...this.matrix),applyBoundingBox(Et,this._bbox),Et.fillStyle=this._createGradient(Et),Et.fill(),ft=Le.createPattern(xt.canvas,"no-repeat");const yt=new DOMMatrix(tt);ft.setTransform(yt)}else applyBoundingBox(Le,this._bbox),ft=this._createGradient(Le);return ft}}function drawTriangle(Be,Le,Ye,tt,nt,ft,ht,gt){const At=Le.coords,xt=Le.colors,Et=Be.data,yt=Be.width*4;let Ct;At[Ye+1]>At[tt+1]&&(Ct=Ye,Ye=tt,tt=Ct,Ct=ft,ft=ht,ht=Ct),At[tt+1]>At[nt+1]&&(Ct=tt,tt=nt,nt=Ct,Ct=ht,ht=gt,gt=Ct),At[Ye+1]>At[tt+1]&&(Ct=Ye,Ye=tt,tt=Ct,Ct=ft,ft=ht,ht=Ct);const kt=(At[Ye]+Le.offsetX)*Le.scaleX,vt=(At[Ye+1]+Le.offsetY)*Le.scaleY,bt=(At[tt]+Le.offsetX)*Le.scaleX,It=(At[tt+1]+Le.offsetY)*Le.scaleY,wt=(At[nt]+Le.offsetX)*Le.scaleX,Rt=(At[nt+1]+Le.offsetY)*Le.scaleY;if(vt>=Rt)return;const Tt=xt[ft],Bt=xt[ft+1],Dt=xt[ft+2],Pt=xt[ht],Nt=xt[ht+1],Lt=xt[ht+2],Wt=xt[gt],$t=xt[gt+1],Kt=xt[gt+2],Vt=Math.round(vt),Ut=Math.round(Rt);let _t,Xt,Qt,jt,Gt,qt,zt,e0;for(let s0=Vt;s0<=Ut;s0++){if(s0<It){const g0=s0<vt?0:(vt-s0)/(vt-It);_t=kt-(kt-bt)*g0,Xt=Tt-(Tt-Pt)*g0,Qt=Bt-(Bt-Nt)*g0,jt=Dt-(Dt-Lt)*g0}else{let g0;s0>Rt?g0=1:It===Rt?g0=0:g0=(It-s0)/(It-Rt),_t=bt-(bt-wt)*g0,Xt=Pt-(Pt-Wt)*g0,Qt=Nt-(Nt-$t)*g0,jt=Lt-(Lt-Kt)*g0}let t0;s0<vt?t0=0:s0>Rt?t0=1:t0=(vt-s0)/(vt-Rt),Gt=kt-(kt-wt)*t0,qt=Tt-(Tt-Wt)*t0,zt=Bt-(Bt-$t)*t0,e0=Dt-(Dt-Kt)*t0;const l0=Math.round(Math.min(_t,Gt)),d0=Math.round(Math.max(_t,Gt));let n0=yt*s0+l0*4;for(let g0=l0;g0<=d0;g0++)t0=(_t-g0)/(_t-Gt),t0<0?t0=0:t0>1&&(t0=1),Et[n0++]=Xt-(Xt-qt)*t0|0,Et[n0++]=Qt-(Qt-zt)*t0|0,Et[n0++]=jt-(jt-e0)*t0|0,Et[n0++]=255}}function drawFigure(Be,Le,Ye){const tt=Le.coords,nt=Le.colors;let ft,ht;switch(Le.type){case"lattice":const gt=Le.verticesPerRow,At=Math.floor(tt.length/gt)-1,xt=gt-1;for(ft=0;ft<At;ft++){let Et=ft*gt;for(let yt=0;yt<xt;yt++,Et++)drawTriangle(Be,Ye,tt[Et],tt[Et+1],tt[Et+gt],nt[Et],nt[Et+1],nt[Et+gt]),drawTriangle(Be,Ye,tt[Et+gt+1],tt[Et+1],tt[Et+gt],nt[Et+gt+1],nt[Et+1],nt[Et+gt])}break;case"triangles":for(ft=0,ht=tt.length;ft<ht;ft+=3)drawTriangle(Be,Ye,tt[ft],tt[ft+1],tt[ft+2],nt[ft],nt[ft+1],nt[ft+2]);break;default:throw new Error("illegal figure")}}class MeshShadingPattern extends BaseShadingPattern{constructor(Le){super(),this._coords=Le[2],this._colors=Le[3],this._figures=Le[4],this._bounds=Le[5],this._bbox=Le[7],this._background=Le[8],this.matrix=null}_createMeshCanvas(Le,Ye,tt){const gt=Math.floor(this._bounds[0]),At=Math.floor(this._bounds[1]),xt=Math.ceil(this._bounds[2])-gt,Et=Math.ceil(this._bounds[3])-At,yt=Math.min(Math.ceil(Math.abs(xt*Le[0]*1.1)),3e3),Ct=Math.min(Math.ceil(Math.abs(Et*Le[1]*1.1)),3e3),kt=xt/yt,vt=Et/Ct,bt={coords:this._coords,colors:this._colors,offsetX:-gt,offsetY:-At,scaleX:1/kt,scaleY:1/vt},It=yt+2*2,wt=Ct+2*2,Rt=tt.getCanvas("mesh",It,wt),Tt=Rt.context,Bt=Tt.createImageData(yt,Ct);if(Ye){const Pt=Bt.data;for(let Nt=0,Lt=Pt.length;Nt<Lt;Nt+=4)Pt[Nt]=Ye[0],Pt[Nt+1]=Ye[1],Pt[Nt+2]=Ye[2],Pt[Nt+3]=255}for(const Pt of this._figures)drawFigure(Bt,Pt,bt);return Tt.putImageData(Bt,2,2),{canvas:Rt.canvas,offsetX:gt-2*kt,offsetY:At-2*vt,scaleX:kt,scaleY:vt}}getPattern(Le,Ye,tt,nt){applyBoundingBox(Le,this._bbox);let ft;if(nt===PathType.SHADING)ft=Util.singularValueDecompose2dScale(getCurrentTransform(Le));else if(ft=Util.singularValueDecompose2dScale(Ye.baseTransform),this.matrix){const gt=Util.singularValueDecompose2dScale(this.matrix);ft=[ft[0]*gt[0],ft[1]*gt[1]]}const ht=this._createMeshCanvas(ft,nt===PathType.SHADING?null:this._background,Ye.cachedCanvases);return nt!==PathType.SHADING&&(Le.setTransform(...Ye.baseTransform),this.matrix&&Le.transform(...this.matrix)),Le.translate(ht.offsetX,ht.offsetY),Le.scale(ht.scaleX,ht.scaleY),Le.createPattern(ht.canvas,"no-repeat")}}class DummyShadingPattern extends BaseShadingPattern{getPattern(){return"hotpink"}}function getShadingPattern(Be){switch(Be[0]){case"RadialAxial":return new RadialAxialShadingPattern(Be);case"Mesh":return new MeshShadingPattern(Be);case"Dummy":return new DummyShadingPattern}throw new Error(`Unknown IR type: ${Be[0]}`)}const PaintType={COLORED:1,UNCOLORED:2},ad=class ad{constructor(Le,Ye,tt,nt,ft){this.operatorList=Le[2],this.matrix=Le[3],this.bbox=Le[4],this.xstep=Le[5],this.ystep=Le[6],this.paintType=Le[7],this.tilingType=Le[8],this.color=Ye,this.ctx=tt,this.canvasGraphicsFactory=nt,this.baseTransform=ft}createPatternCanvas(Le){const{bbox:Ye,operatorList:tt,paintType:nt,tilingType:ft,color:ht,canvasGraphicsFactory:gt}=this;let{xstep:At,ystep:xt}=this;At=Math.abs(At),xt=Math.abs(xt),info("TilingType: "+ft);const Et=Ye[0],yt=Ye[1],Ct=Ye[2],kt=Ye[3],vt=Ct-Et,bt=kt-yt,It=Util.singularValueDecompose2dScale(this.matrix),wt=Util.singularValueDecompose2dScale(this.baseTransform),Rt=It[0]*wt[0],Tt=It[1]*wt[1];let Bt=vt,Dt=bt,Pt=!1,Nt=!1;const Lt=Math.ceil(At*Rt),Wt=Math.ceil(xt*Tt),$t=Math.ceil(vt*Rt),Kt=Math.ceil(bt*Tt);Lt>=$t?Bt=At:Pt=!0,Wt>=Kt?Dt=xt:Nt=!0;const Vt=this.getSizeAndScale(Bt,this.ctx.canvas.width,Rt),Ut=this.getSizeAndScale(Dt,this.ctx.canvas.height,Tt),_t=Le.cachedCanvases.getCanvas("pattern",Vt.size,Ut.size),Xt=_t.context,Qt=gt.createCanvasGraphics(Xt);if(Qt.groupLevel=Le.groupLevel,this.setFillAndStrokeStyleToContext(Qt,nt,ht),Xt.translate(-Vt.scale*Et,-Ut.scale*yt),Qt.transform(Vt.scale,0,0,Ut.scale,0,0),Xt.save(),this.clipBbox(Qt,Et,yt,Ct,kt),Qt.baseTransform=getCurrentTransform(Qt.ctx),Qt.executeOperatorList(tt),Qt.endDrawing(),Xt.restore(),Pt||Nt){const jt=_t.canvas;Pt&&(Bt=At),Nt&&(Dt=xt);const Gt=this.getSizeAndScale(Bt,this.ctx.canvas.width,Rt),qt=this.getSizeAndScale(Dt,this.ctx.canvas.height,Tt),zt=Gt.size,e0=qt.size,s0=Le.cachedCanvases.getCanvas("pattern-workaround",zt,e0),t0=s0.context,l0=Pt?Math.floor(vt/At):0,d0=Nt?Math.floor(bt/xt):0;for(let n0=0;n0<=l0;n0++)for(let g0=0;g0<=d0;g0++)t0.drawImage(jt,zt*n0,e0*g0,zt,e0,0,0,zt,e0);return{canvas:s0.canvas,scaleX:Gt.scale,scaleY:qt.scale,offsetX:Et,offsetY:yt}}return{canvas:_t.canvas,scaleX:Vt.scale,scaleY:Ut.scale,offsetX:Et,offsetY:yt}}getSizeAndScale(Le,Ye,tt){const nt=Math.max(ad.MAX_PATTERN_SIZE,Ye);let ft=Math.ceil(Le*tt);return ft>=nt?ft=nt:tt=ft/Le,{scale:tt,size:ft}}clipBbox(Le,Ye,tt,nt,ft){const ht=nt-Ye,gt=ft-tt;Le.ctx.rect(Ye,tt,ht,gt),Le.current.updateRectMinMax(getCurrentTransform(Le.ctx),[Ye,tt,nt,ft]),Le.clip(),Le.endPath()}setFillAndStrokeStyleToContext(Le,Ye,tt){const nt=Le.ctx,ft=Le.current;switch(Ye){case PaintType.COLORED:const ht=this.ctx;nt.fillStyle=ht.fillStyle,nt.strokeStyle=ht.strokeStyle,ft.fillColor=ht.fillStyle,ft.strokeColor=ht.strokeStyle;break;case PaintType.UNCOLORED:const gt=Util.makeHexColor(tt[0],tt[1],tt[2]);nt.fillStyle=gt,nt.strokeStyle=gt,ft.fillColor=gt,ft.strokeColor=gt;break;default:throw new FormatError(`Unsupported paint type: ${Ye}`)}}getPattern(Le,Ye,tt,nt){let ft=tt;nt!==PathType.SHADING&&(ft=Util.transform(ft,Ye.baseTransform),this.matrix&&(ft=Util.transform(ft,this.matrix)));const ht=this.createPatternCanvas(Ye);let gt=new DOMMatrix(ft);gt=gt.translate(ht.offsetX,ht.offsetY),gt=gt.scale(1/ht.scaleX,1/ht.scaleY);const At=Le.createPattern(ht.canvas,"repeat");return At.setTransform(gt),At}};Nn(ad,"MAX_PATTERN_SIZE",3e3);let TilingPattern=ad;function convertBlackAndWhiteToRGBA({src:Be,srcPos:Le=0,dest:Ye,width:tt,height:nt,nonBlackColor:ft=4294967295,inverseDecode:ht=!1}){const gt=util_FeatureTest.isLittleEndian?4278190080:255,[At,xt]=ht?[ft,gt]:[gt,ft],Et=tt>>3,yt=tt&7,Ct=Be.length;Ye=new Uint32Array(Ye.buffer);let kt=0;for(let vt=0;vt<nt;vt++){for(const It=Le+Et;Le<It;Le++){const wt=Le<Ct?Be[Le]:255;Ye[kt++]=wt&128?xt:At,Ye[kt++]=wt&64?xt:At,Ye[kt++]=wt&32?xt:At,Ye[kt++]=wt&16?xt:At,Ye[kt++]=wt&8?xt:At,Ye[kt++]=wt&4?xt:At,Ye[kt++]=wt&2?xt:At,Ye[kt++]=wt&1?xt:At}if(yt===0)continue;const bt=Le<Ct?Be[Le++]:255;for(let It=0;It<yt;It++)Ye[kt++]=bt&1<<7-It?xt:At}return{srcPos:Le,destPos:kt}}const MIN_FONT_SIZE=16,MAX_FONT_SIZE=100,EXECUTION_TIME=15,EXECUTION_STEPS=10,MAX_SIZE_TO_COMPILE=1e3,FULL_CHUNK_HEIGHT=16;function mirrorContextOperations(Be,Le){if(Be._removeMirroring)throw new Error("Context is already forwarding operations.");Be.__originalSave=Be.save,Be.__originalRestore=Be.restore,Be.__originalRotate=Be.rotate,Be.__originalScale=Be.scale,Be.__originalTranslate=Be.translate,Be.__originalTransform=Be.transform,Be.__originalSetTransform=Be.setTransform,Be.__originalResetTransform=Be.resetTransform,Be.__originalClip=Be.clip,Be.__originalMoveTo=Be.moveTo,Be.__originalLineTo=Be.lineTo,Be.__originalBezierCurveTo=Be.bezierCurveTo,Be.__originalRect=Be.rect,Be.__originalClosePath=Be.closePath,Be.__originalBeginPath=Be.beginPath,Be._removeMirroring=()=>{Be.save=Be.__originalSave,Be.restore=Be.__originalRestore,Be.rotate=Be.__originalRotate,Be.scale=Be.__originalScale,Be.translate=Be.__originalTranslate,Be.transform=Be.__originalTransform,Be.setTransform=Be.__originalSetTransform,Be.resetTransform=Be.__originalResetTransform,Be.clip=Be.__originalClip,Be.moveTo=Be.__originalMoveTo,Be.lineTo=Be.__originalLineTo,Be.bezierCurveTo=Be.__originalBezierCurveTo,Be.rect=Be.__originalRect,Be.closePath=Be.__originalClosePath,Be.beginPath=Be.__originalBeginPath,delete Be._removeMirroring},Be.save=function(){Le.save(),this.__originalSave()},Be.restore=function(){Le.restore(),this.__originalRestore()},Be.translate=function(tt,nt){Le.translate(tt,nt),this.__originalTranslate(tt,nt)},Be.scale=function(tt,nt){Le.scale(tt,nt),this.__originalScale(tt,nt)},Be.transform=function(tt,nt,ft,ht,gt,At){Le.transform(tt,nt,ft,ht,gt,At),this.__originalTransform(tt,nt,ft,ht,gt,At)},Be.setTransform=function(tt,nt,ft,ht,gt,At){Le.setTransform(tt,nt,ft,ht,gt,At),this.__originalSetTransform(tt,nt,ft,ht,gt,At)},Be.resetTransform=function(){Le.resetTransform(),this.__originalResetTransform()},Be.rotate=function(tt){Le.rotate(tt),this.__originalRotate(tt)},Be.clip=function(tt){Le.clip(tt),this.__originalClip(tt)},Be.moveTo=function(Ye,tt){Le.moveTo(Ye,tt),this.__originalMoveTo(Ye,tt)},Be.lineTo=function(Ye,tt){Le.lineTo(Ye,tt),this.__originalLineTo(Ye,tt)},Be.bezierCurveTo=function(Ye,tt,nt,ft,ht,gt){Le.bezierCurveTo(Ye,tt,nt,ft,ht,gt),this.__originalBezierCurveTo(Ye,tt,nt,ft,ht,gt)},Be.rect=function(Ye,tt,nt,ft){Le.rect(Ye,tt,nt,ft),this.__originalRect(Ye,tt,nt,ft)},Be.closePath=function(){Le.closePath(),this.__originalClosePath()},Be.beginPath=function(){Le.beginPath(),this.__originalBeginPath()}}class CachedCanvases{constructor(Le){this.canvasFactory=Le,this.cache=Object.create(null)}getCanvas(Le,Ye,tt){let nt;return this.cache[Le]!==void 0?(nt=this.cache[Le],this.canvasFactory.reset(nt,Ye,tt)):(nt=this.canvasFactory.create(Ye,tt),this.cache[Le]=nt),nt}delete(Le){delete this.cache[Le]}clear(){for(const Le in this.cache){const Ye=this.cache[Le];this.canvasFactory.destroy(Ye),delete this.cache[Le]}}}function drawImageAtIntegerCoords(Be,Le,Ye,tt,nt,ft,ht,gt,At,xt){const[Et,yt,Ct,kt,vt,bt]=getCurrentTransform(Be);if(yt===0&&Ct===0){const Rt=ht*Et+vt,Tt=Math.round(Rt),Bt=gt*kt+bt,Dt=Math.round(Bt),Pt=(ht+At)*Et+vt,Nt=Math.abs(Math.round(Pt)-Tt)||1,Lt=(gt+xt)*kt+bt,Wt=Math.abs(Math.round(Lt)-Dt)||1;return Be.setTransform(Math.sign(Et),0,0,Math.sign(kt),Tt,Dt),Be.drawImage(Le,Ye,tt,nt,ft,0,0,Nt,Wt),Be.setTransform(Et,yt,Ct,kt,vt,bt),[Nt,Wt]}if(Et===0&&kt===0){const Rt=gt*Ct+vt,Tt=Math.round(Rt),Bt=ht*yt+bt,Dt=Math.round(Bt),Pt=(gt+xt)*Ct+vt,Nt=Math.abs(Math.round(Pt)-Tt)||1,Lt=(ht+At)*yt+bt,Wt=Math.abs(Math.round(Lt)-Dt)||1;return Be.setTransform(0,Math.sign(yt),Math.sign(Ct),0,Tt,Dt),Be.drawImage(Le,Ye,tt,nt,ft,0,0,Wt,Nt),Be.setTransform(Et,yt,Ct,kt,vt,bt),[Wt,Nt]}Be.drawImage(Le,Ye,tt,nt,ft,ht,gt,At,xt);const It=Math.hypot(Et,yt),wt=Math.hypot(Ct,kt);return[It*At,wt*xt]}function compileType3Glyph(Be){const{width:Le,height:Ye}=Be;if(Le>MAX_SIZE_TO_COMPILE||Ye>MAX_SIZE_TO_COMPILE)return null;const tt=1e3,nt=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),ft=Le+1;let ht=new Uint8Array(ft*(Ye+1)),gt,At,xt;const Et=Le+7&-8;let yt=new Uint8Array(Et*Ye),Ct=0;for(const wt of Be.data){let Rt=128;for(;Rt>0;)yt[Ct++]=wt&Rt?0:255,Rt>>=1}let kt=0;for(Ct=0,yt[Ct]!==0&&(ht[0]=1,++kt),At=1;At<Le;At++)yt[Ct]!==yt[Ct+1]&&(ht[At]=yt[Ct]?2:1,++kt),Ct++;for(yt[Ct]!==0&&(ht[At]=2,++kt),gt=1;gt<Ye;gt++){Ct=gt*Et,xt=gt*ft,yt[Ct-Et]!==yt[Ct]&&(ht[xt]=yt[Ct]?1:8,++kt);let wt=(yt[Ct]?4:0)+(yt[Ct-Et]?8:0);for(At=1;At<Le;At++)wt=(wt>>2)+(yt[Ct+1]?4:0)+(yt[Ct-Et+1]?8:0),nt[wt]&&(ht[xt+At]=nt[wt],++kt),Ct++;if(yt[Ct-Et]!==yt[Ct]&&(ht[xt+At]=yt[Ct]?2:4,++kt),kt>tt)return null}for(Ct=Et*(Ye-1),xt=gt*ft,yt[Ct]!==0&&(ht[xt]=8,++kt),At=1;At<Le;At++)yt[Ct]!==yt[Ct+1]&&(ht[xt+At]=yt[Ct]?4:8,++kt),Ct++;if(yt[Ct]!==0&&(ht[xt+At]=4,++kt),kt>tt)return null;const vt=new Int32Array([0,ft,-1,0,-ft,0,0,0,1]),bt=new Path2D;for(gt=0;kt&><=Ye;gt++){let wt=gt*ft;const Rt=wt+Le;for(;wt<Rt&&!ht[wt];)wt++;if(wt===Rt)continue;bt.moveTo(wt%ft,gt);const Tt=wt;let Bt=ht[wt];do{const Dt=vt[Bt];do wt+=Dt;while(!ht[wt]);const Pt=ht[wt];Pt!==5&&Pt!==10?(Bt=Pt,ht[wt]=0):(Bt=Pt&51*Bt>>4,ht[wt]&=Bt>>2|Bt<<2),bt.lineTo(wt%ft,wt/ft|0),ht[wt]||--kt}while(Tt!==wt);--gt}return yt=null,ht=null,function(wt){wt.save(),wt.scale(1/Le,-1/Ye),wt.translate(0,-Ye),wt.fill(bt),wt.beginPath(),wt.restore()}}class CanvasExtraState{constructor(Le,Ye){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,Le,Ye])}clone(){const Le=Object.create(this);return Le.clipBox=this.clipBox.slice(),Le}setCurrentPoint(Le,Ye){this.x=Le,this.y=Ye}updatePathMinMax(Le,Ye,tt){[Ye,tt]=Util.applyTransform([Ye,tt],Le),this.minX=Math.min(this.minX,Ye),this.minY=Math.min(this.minY,tt),this.maxX=Math.max(this.maxX,Ye),this.maxY=Math.max(this.maxY,tt)}updateRectMinMax(Le,Ye){const tt=Util.applyTransform(Ye,Le),nt=Util.applyTransform(Ye.slice(2),Le),ft=Util.applyTransform([Ye[0],Ye[3]],Le),ht=Util.applyTransform([Ye[2],Ye[1]],Le);this.minX=Math.min(this.minX,tt[0],nt[0],ft[0],ht[0]),this.minY=Math.min(this.minY,tt[1],nt[1],ft[1],ht[1]),this.maxX=Math.max(this.maxX,tt[0],nt[0],ft[0],ht[0]),this.maxY=Math.max(this.maxY,tt[1],nt[1],ft[1],ht[1])}updateScalingPathMinMax(Le,Ye){Util.scaleMinMax(Le,Ye),this.minX=Math.min(this.minX,Ye[0]),this.minY=Math.min(this.minY,Ye[1]),this.maxX=Math.max(this.maxX,Ye[2]),this.maxY=Math.max(this.maxY,Ye[3])}updateCurvePathMinMax(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et){const yt=Util.bezierBoundingBox(Ye,tt,nt,ft,ht,gt,At,xt,Et);Et||this.updateRectMinMax(Le,yt)}getPathBoundingBox(Le=PathType.FILL,Ye=null){const tt=[this.minX,this.minY,this.maxX,this.maxY];if(Le===PathType.STROKE){Ye||unreachable$1("Stroke bounding box must include transform.");const nt=Util.singularValueDecompose2dScale(Ye),ft=nt[0]*this.lineWidth/2,ht=nt[1]*this.lineWidth/2;tt[0]-=ft,tt[1]-=ht,tt[2]+=ft,tt[3]+=ht}return tt}updateClipFromPath(){const Le=Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(Le||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(Le){this.clipBox=Le,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(Le=PathType.FILL,Ye=null){return Util.intersect(this.clipBox,this.getPathBoundingBox(Le,Ye))}}function putBinaryImageData(Be,Le){if(typeof ImageData<"u"&&Le instanceof ImageData){Be.putImageData(Le,0,0);return}const Ye=Le.height,tt=Le.width,nt=Ye%FULL_CHUNK_HEIGHT,ft=(Ye-nt)/FULL_CHUNK_HEIGHT,ht=nt===0?ft:ft+1,gt=Be.createImageData(tt,FULL_CHUNK_HEIGHT);let At=0,xt;const Et=Le.data,yt=gt.data;let Ct,kt,vt,bt;if(Le.kind===util_ImageKind.GRAYSCALE_1BPP){const It=Et.byteLength,wt=new Uint32Array(yt.buffer,0,yt.byteLength>>2),Rt=wt.length,Tt=tt+7>>3,Bt=4294967295,Dt=util_FeatureTest.isLittleEndian?4278190080:255;for(Ct=0;Ct<ht;Ct++){for(vt=Ct<ft?FULL_CHUNK_HEIGHT:nt,xt=0,kt=0;kt<vt;kt++){const Pt=It-At;let Nt=0;const Lt=Pt>Tt?tt:Pt*8-7,Wt=Lt&-8;let $t=0,Kt=0;for(;Nt<Wt;Nt+=8)Kt=Et[At++],wt[xt++]=Kt&128?Bt:Dt,wt[xt++]=Kt&64?Bt:Dt,wt[xt++]=Kt&32?Bt:Dt,wt[xt++]=Kt&16?Bt:Dt,wt[xt++]=Kt&8?Bt:Dt,wt[xt++]=Kt&4?Bt:Dt,wt[xt++]=Kt&2?Bt:Dt,wt[xt++]=Kt&1?Bt:Dt;for(;Nt<Lt;Nt++)$t===0&&(Kt=Et[At++],$t=128),wt[xt++]=Kt&$t?Bt:Dt,$t>>=1}for(;xt<Rt;)wt[xt++]=0;Be.putImageData(gt,0,Ct*FULL_CHUNK_HEIGHT)}}else if(Le.kind===util_ImageKind.RGBA_32BPP){for(kt=0,bt=tt*FULL_CHUNK_HEIGHT*4,Ct=0;Ct<ft;Ct++)yt.set(Et.subarray(At,At+bt)),At+=bt,Be.putImageData(gt,0,kt),kt+=FULL_CHUNK_HEIGHT;Ct<ht&&(bt=tt*nt*4,yt.set(Et.subarray(At,At+bt)),Be.putImageData(gt,0,kt))}else if(Le.kind===util_ImageKind.RGB_24BPP)for(vt=FULL_CHUNK_HEIGHT,bt=tt*vt,Ct=0;Ct<ht;Ct++){for(Ct>=ft&&(vt=nt,bt=tt*vt),xt=0,kt=bt;kt--;)yt[xt++]=Et[At++],yt[xt++]=Et[At++],yt[xt++]=Et[At++],yt[xt++]=255;Be.putImageData(gt,0,Ct*FULL_CHUNK_HEIGHT)}else throw new Error(`bad image kind: ${Le.kind}`)}function putBinaryImageMask(Be,Le){if(Le.bitmap){Be.drawImage(Le.bitmap,0,0);return}const Ye=Le.height,tt=Le.width,nt=Ye%FULL_CHUNK_HEIGHT,ft=(Ye-nt)/FULL_CHUNK_HEIGHT,ht=nt===0?ft:ft+1,gt=Be.createImageData(tt,FULL_CHUNK_HEIGHT);let At=0;const xt=Le.data,Et=gt.data;for(let yt=0;yt<ht;yt++){const Ct=yt<ft?FULL_CHUNK_HEIGHT:nt;({srcPos:At}=convertBlackAndWhiteToRGBA({src:xt,srcPos:At,dest:Et,width:tt,height:Ct,nonBlackColor:0})),Be.putImageData(gt,0,yt*FULL_CHUNK_HEIGHT)}}function copyCtxState(Be,Le){const Ye=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const tt of Ye)Be[tt]!==void 0&&(Le[tt]=Be[tt]);Be.setLineDash!==void 0&&(Le.setLineDash(Be.getLineDash()),Le.lineDashOffset=Be.lineDashOffset)}function resetCtxToDefault(Be){if(Be.strokeStyle=Be.fillStyle="#000000",Be.fillRule="nonzero",Be.globalAlpha=1,Be.lineWidth=1,Be.lineCap="butt",Be.lineJoin="miter",Be.miterLimit=10,Be.globalCompositeOperation="source-over",Be.font="10px sans-serif",Be.setLineDash!==void 0&&(Be.setLineDash([]),Be.lineDashOffset=0),!isNodeJS){const{filter:Le}=Be;Le!=="none"&&Le!==""&&(Be.filter="none")}}function getImageSmoothingEnabled(Be,Le){if(Le)return!0;const Ye=Util.singularValueDecompose2dScale(Be);Ye[0]=Math.fround(Ye[0]),Ye[1]=Math.fround(Ye[1]);const tt=Math.fround((globalThis.devicePixelRatio||1)*PixelsPerInch.PDF_TO_CSS_UNITS);return Ye[0]<=tt&&Ye[1]<=tt}const LINE_CAP_STYLES=["butt","round","square"],LINE_JOIN_STYLES=["miter","round","bevel"],NORMAL_CLIP={},EO_CLIP={},R3=class R3{constructor(Le,Ye,tt,nt,ft,{optionalContentConfig:ht,markedContentStack:gt=null},At,xt){v0(this,_o);this.ctx=Le,this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=Ye,this.objs=tt,this.canvasFactory=nt,this.filterFactory=ft,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=gt||[],this.optionalContentConfig=ht,this.cachedCanvases=new CachedCanvases(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=At,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=xt,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(Le,Ye=null){return typeof Le=="string"?Le.startsWith("g_")?this.commonObjs.get(Le):this.objs.get(Le):Ye}beginDrawing({transform:Le,viewport:Ye,transparency:tt=!1,background:nt=null}){const ft=this.ctx.canvas.width,ht=this.ctx.canvas.height,gt=this.ctx.fillStyle;if(this.ctx.fillStyle=nt||"#ffffff",this.ctx.fillRect(0,0,ft,ht),this.ctx.fillStyle=gt,tt){const At=this.cachedCanvases.getCanvas("transparent",ft,ht);this.compositeCtx=this.ctx,this.transparentCanvas=At.canvas,this.ctx=At.context,this.ctx.save(),this.ctx.transform(...getCurrentTransform(this.compositeCtx))}this.ctx.save(),resetCtxToDefault(this.ctx),Le&&(this.ctx.transform(...Le),this.outputScaleX=Le[0],this.outputScaleY=Le[0]),this.ctx.transform(...Ye.transform),this.viewportScale=Ye.scale,this.baseTransform=getCurrentTransform(this.ctx)}executeOperatorList(Le,Ye,tt,nt){const ft=Le.argsArray,ht=Le.fnArray;let gt=Ye||0;const At=ft.length;if(At===gt)return gt;const xt=At-gt>EXECUTION_STEPS&&typeof tt=="function",Et=xt?Date.now()+EXECUTION_TIME:0;let yt=0;const Ct=this.commonObjs,kt=this.objs;let vt;for(;;){if(nt!==void 0&>===nt.nextBreakPoint)return nt.breakIt(gt,tt),gt;if(vt=ht[gt],vt!==OPS.dependency)this[vt].apply(this,ft[gt]);else for(const bt of ft[gt]){const It=bt.startsWith("g_")?Ct:kt;if(!It.has(bt))return It.get(bt,tt),gt}if(gt++,gt===At)return gt;if(xt&&++yt>EXECUTION_STEPS){if(Date.now()>Et)return tt(),gt;yt=0}}}endDrawing(){y0(this,_o,J9).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const Le of this._cachedBitmapsMap.values()){for(const Ye of Le.values())typeof HTMLCanvasElement<"u"&&Ye instanceof HTMLCanvasElement&&(Ye.width=Ye.height=0);Le.clear()}this._cachedBitmapsMap.clear(),y0(this,_o,ep).call(this)}_scaleImage(Le,Ye){const tt=Le.width??Le.displayWidth,nt=Le.height??Le.displayHeight;let ft=Math.max(Math.hypot(Ye[0],Ye[1]),1),ht=Math.max(Math.hypot(Ye[2],Ye[3]),1),gt=tt,At=nt,xt="prescale1",Et,yt;for(;ft>2&>>1||ht>2&&At>1;){let Ct=gt,kt=At;ft>2&>>1&&(Ct=gt>=16384?Math.floor(gt/2)-1||1:Math.ceil(gt/2),ft/=gt/Ct),ht>2&&At>1&&(kt=At>=16384?Math.floor(At/2)-1||1:Math.ceil(At)/2,ht/=At/kt),Et=this.cachedCanvases.getCanvas(xt,Ct,kt),yt=Et.context,yt.clearRect(0,0,Ct,kt),yt.drawImage(Le,0,0,gt,At,0,0,Ct,kt),Le=Et.canvas,gt=Ct,At=kt,xt=xt==="prescale1"?"prescale2":"prescale1"}return{img:Le,paintWidth:gt,paintHeight:At}}_createMaskCanvas(Le){const Ye=this.ctx,{width:tt,height:nt}=Le,ft=this.current.fillColor,ht=this.current.patternFill,gt=getCurrentTransform(Ye);let At,xt,Et,yt;if((Le.bitmap||Le.data)&&Le.count>1){const Lt=Le.bitmap||Le.data.buffer;xt=JSON.stringify(ht?gt:[gt.slice(0,4),ft]),At=this._cachedBitmapsMap.get(Lt),At||(At=new Map,this._cachedBitmapsMap.set(Lt,At));const Wt=At.get(xt);if(Wt&&!ht){const $t=Math.round(Math.min(gt[0],gt[2])+gt[4]),Kt=Math.round(Math.min(gt[1],gt[3])+gt[5]);return{canvas:Wt,offsetX:$t,offsetY:Kt}}Et=Wt}Et||(yt=this.cachedCanvases.getCanvas("maskCanvas",tt,nt),putBinaryImageMask(yt.context,Le));let Ct=Util.transform(gt,[1/tt,0,0,-1/nt,0,0]);Ct=Util.transform(Ct,[1,0,0,1,0,-nt]);const[kt,vt,bt,It]=Util.getAxialAlignedBoundingBox([0,0,tt,nt],Ct),wt=Math.round(bt-kt)||1,Rt=Math.round(It-vt)||1,Tt=this.cachedCanvases.getCanvas("fillCanvas",wt,Rt),Bt=Tt.context,Dt=kt,Pt=vt;Bt.translate(-Dt,-Pt),Bt.transform(...Ct),Et||(Et=this._scaleImage(yt.canvas,getCurrentTransformInverse(Bt)),Et=Et.img,At&&ht&&At.set(xt,Et)),Bt.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(Bt),Le.interpolate),drawImageAtIntegerCoords(Bt,Et,0,0,Et.width,Et.height,0,0,tt,nt),Bt.globalCompositeOperation="source-in";const Nt=Util.transform(getCurrentTransformInverse(Bt),[1,0,0,1,-Dt,-Pt]);return Bt.fillStyle=ht?ft.getPattern(Ye,this,Nt,PathType.FILL):ft,Bt.fillRect(0,0,tt,nt),At&&!ht&&(this.cachedCanvases.delete("fillCanvas"),At.set(xt,Tt.canvas)),{canvas:Tt.canvas,offsetX:Math.round(Dt),offsetY:Math.round(Pt)}}setLineWidth(Le){Le!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=Le,this.ctx.lineWidth=Le}setLineCap(Le){this.ctx.lineCap=LINE_CAP_STYLES[Le]}setLineJoin(Le){this.ctx.lineJoin=LINE_JOIN_STYLES[Le]}setMiterLimit(Le){this.ctx.miterLimit=Le}setDash(Le,Ye){const tt=this.ctx;tt.setLineDash!==void 0&&(tt.setLineDash(Le),tt.lineDashOffset=Ye)}setRenderingIntent(Le){}setFlatness(Le){}setGState(Le){for(const[Ye,tt]of Le)switch(Ye){case"LW":this.setLineWidth(tt);break;case"LC":this.setLineCap(tt);break;case"LJ":this.setLineJoin(tt);break;case"ML":this.setMiterLimit(tt);break;case"D":this.setDash(tt[0],tt[1]);break;case"RI":this.setRenderingIntent(tt);break;case"FL":this.setFlatness(tt);break;case"Font":this.setFont(tt[0],tt[1]);break;case"CA":this.current.strokeAlpha=tt;break;case"ca":this.current.fillAlpha=tt,this.ctx.globalAlpha=tt;break;case"BM":this.ctx.globalCompositeOperation=tt;break;case"SMask":this.current.activeSMask=tt?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(tt);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const Le=this.inSMaskMode;this.current.activeSMask&&!Le?this.beginSMaskMode():!this.current.activeSMask&&Le&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const Le=this.ctx.canvas.width,Ye=this.ctx.canvas.height,tt="smaskGroupAt"+this.groupLevel,nt=this.cachedCanvases.getCanvas(tt,Le,Ye);this.suspendedCtx=this.ctx,this.ctx=nt.context;const ft=this.ctx;ft.setTransform(...getCurrentTransform(this.suspendedCtx)),copyCtxState(this.suspendedCtx,ft),mirrorContextOperations(ft,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),copyCtxState(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(Le){if(!this.current.activeSMask)return;Le?(Le[0]=Math.floor(Le[0]),Le[1]=Math.floor(Le[1]),Le[2]=Math.ceil(Le[2]),Le[3]=Math.ceil(Le[3])):Le=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const Ye=this.current.activeSMask,tt=this.suspendedCtx;this.composeSMask(tt,Ye,this.ctx,Le),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(Le,Ye,tt,nt){const ft=nt[0],ht=nt[1],gt=nt[2]-ft,At=nt[3]-ht;gt===0||At===0||(this.genericComposeSMask(Ye.context,tt,gt,At,Ye.subtype,Ye.backdrop,Ye.transferMap,ft,ht,Ye.offsetX,Ye.offsetY),Le.save(),Le.globalAlpha=1,Le.globalCompositeOperation="source-over",Le.setTransform(1,0,0,1,0,0),Le.drawImage(tt.canvas,0,0),Le.restore())}genericComposeSMask(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){let Ct=Le.canvas,kt=At-Et,vt=xt-yt;if(ht){const It=Util.makeHexColor(...ht);if(kt<0||vt<0||kt+tt>Ct.width||vt+nt>Ct.height){const wt=this.cachedCanvases.getCanvas("maskExtension",tt,nt),Rt=wt.context;Rt.drawImage(Ct,-kt,-vt),Rt.globalCompositeOperation="destination-atop",Rt.fillStyle=It,Rt.fillRect(0,0,tt,nt),Rt.globalCompositeOperation="source-over",Ct=wt.canvas,kt=vt=0}else{Le.save(),Le.globalAlpha=1,Le.setTransform(1,0,0,1,0,0);const wt=new Path2D;wt.rect(kt,vt,tt,nt),Le.clip(wt),Le.globalCompositeOperation="destination-atop",Le.fillStyle=It,Le.fillRect(kt,vt,tt,nt),Le.restore()}}Ye.save(),Ye.globalAlpha=1,Ye.setTransform(1,0,0,1,0,0),ft==="Alpha"&>?Ye.filter=this.filterFactory.addAlphaFilter(gt):ft==="Luminosity"&&(Ye.filter=this.filterFactory.addLuminosityFilter(gt));const bt=new Path2D;bt.rect(At,xt,tt,nt),Ye.clip(bt),Ye.globalCompositeOperation="destination-in",Ye.drawImage(Ct,kt,vt,tt,nt,At,xt,tt,nt),Ye.restore()}save(){this.inSMaskMode?(copyCtxState(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const Le=this.current;this.stateStack.push(Le),this.current=Le.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),copyCtxState(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(Le,Ye,tt,nt,ft,ht){this.ctx.transform(Le,Ye,tt,nt,ft,ht),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(Le,Ye,tt){const nt=this.ctx,ft=this.current;let ht=ft.x,gt=ft.y,At,xt;const Et=getCurrentTransform(nt),yt=Et[0]===0&&Et[3]===0||Et[1]===0&&Et[2]===0,Ct=yt?tt.slice(0):null;for(let kt=0,vt=0,bt=Le.length;kt<bt;kt++)switch(Le[kt]|0){case OPS.rectangle:ht=Ye[vt++],gt=Ye[vt++];const It=Ye[vt++],wt=Ye[vt++],Rt=ht+It,Tt=gt+wt;nt.moveTo(ht,gt),It===0||wt===0?nt.lineTo(Rt,Tt):(nt.lineTo(Rt,gt),nt.lineTo(Rt,Tt),nt.lineTo(ht,Tt)),yt||ft.updateRectMinMax(Et,[ht,gt,Rt,Tt]),nt.closePath();break;case OPS.moveTo:ht=Ye[vt++],gt=Ye[vt++],nt.moveTo(ht,gt),yt||ft.updatePathMinMax(Et,ht,gt);break;case OPS.lineTo:ht=Ye[vt++],gt=Ye[vt++],nt.lineTo(ht,gt),yt||ft.updatePathMinMax(Et,ht,gt);break;case OPS.curveTo:At=ht,xt=gt,ht=Ye[vt+4],gt=Ye[vt+5],nt.bezierCurveTo(Ye[vt],Ye[vt+1],Ye[vt+2],Ye[vt+3],ht,gt),ft.updateCurvePathMinMax(Et,At,xt,Ye[vt],Ye[vt+1],Ye[vt+2],Ye[vt+3],ht,gt,Ct),vt+=6;break;case OPS.curveTo2:At=ht,xt=gt,nt.bezierCurveTo(ht,gt,Ye[vt],Ye[vt+1],Ye[vt+2],Ye[vt+3]),ft.updateCurvePathMinMax(Et,At,xt,ht,gt,Ye[vt],Ye[vt+1],Ye[vt+2],Ye[vt+3],Ct),ht=Ye[vt+2],gt=Ye[vt+3],vt+=4;break;case OPS.curveTo3:At=ht,xt=gt,ht=Ye[vt+2],gt=Ye[vt+3],nt.bezierCurveTo(Ye[vt],Ye[vt+1],ht,gt,ht,gt),ft.updateCurvePathMinMax(Et,At,xt,Ye[vt],Ye[vt+1],ht,gt,ht,gt,Ct),vt+=4;break;case OPS.closePath:nt.closePath();break}yt&&ft.updateScalingPathMinMax(Et,Ct),ft.setCurrentPoint(ht,gt)}closePath(){this.ctx.closePath()}stroke(Le=!0){const Ye=this.ctx,tt=this.current.strokeColor;Ye.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof tt=="object"&&(tt!=null&&tt.getPattern)?(Ye.save(),Ye.strokeStyle=tt.getPattern(Ye,this,getCurrentTransformInverse(Ye),PathType.STROKE),this.rescaleAndStroke(!1),Ye.restore()):this.rescaleAndStroke(!0)),Le&&this.consumePath(this.current.getClippedPathBoundingBox()),Ye.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(Le=!0){const Ye=this.ctx,tt=this.current.fillColor,nt=this.current.patternFill;let ft=!1;nt&&(Ye.save(),Ye.fillStyle=tt.getPattern(Ye,this,getCurrentTransformInverse(Ye),PathType.FILL),ft=!0);const ht=this.current.getClippedPathBoundingBox();this.contentVisible&&ht!==null&&(this.pendingEOFill?(Ye.fill("evenodd"),this.pendingEOFill=!1):Ye.fill()),ft&&Ye.restore(),Le&&this.consumePath(ht)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=NORMAL_CLIP}eoClip(){this.pendingClip=EO_CLIP}beginText(){this.current.textMatrix=IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const Le=this.pendingTextPaths,Ye=this.ctx;if(Le===void 0){Ye.beginPath();return}Ye.save(),Ye.beginPath();for(const tt of Le)Ye.setTransform(...tt.transform),Ye.translate(tt.x,tt.y),tt.addToPath(Ye,tt.fontSize);Ye.restore(),Ye.clip(),Ye.beginPath(),delete this.pendingTextPaths}setCharSpacing(Le){this.current.charSpacing=Le}setWordSpacing(Le){this.current.wordSpacing=Le}setHScale(Le){this.current.textHScale=Le/100}setLeading(Le){this.current.leading=-Le}setFont(Le,Ye){var Et;const tt=this.commonObjs.get(Le),nt=this.current;if(!tt)throw new Error(`Can't find font for ${Le}`);if(nt.fontMatrix=tt.fontMatrix||FONT_IDENTITY_MATRIX,(nt.fontMatrix[0]===0||nt.fontMatrix[3]===0)&&warn$1("Invalid font matrix for font "+Le),Ye<0?(Ye=-Ye,nt.fontDirection=-1):nt.fontDirection=1,this.current.font=tt,this.current.fontSize=Ye,tt.isType3Font)return;const ft=tt.loadedName||"sans-serif",ht=((Et=tt.systemFontInfo)==null?void 0:Et.css)||`"${ft}", ${tt.fallbackName}`;let gt="normal";tt.black?gt="900":tt.bold&&(gt="bold");const At=tt.italic?"italic":"normal";let xt=Ye;Ye<MIN_FONT_SIZE?xt=MIN_FONT_SIZE:Ye>MAX_FONT_SIZE&&(xt=MAX_FONT_SIZE),this.current.fontSizeScale=Ye/xt,this.ctx.font=`${At} ${gt} ${xt}px ${ht}`}setTextRenderingMode(Le){this.current.textRenderingMode=Le}setTextRise(Le){this.current.textRise=Le}moveText(Le,Ye){this.current.x=this.current.lineX+=Le,this.current.y=this.current.lineY+=Ye}setLeadingMoveText(Le,Ye){this.setLeading(-Ye),this.moveText(Le,Ye)}setTextMatrix(Le,Ye,tt,nt,ft,ht){this.current.textMatrix=[Le,Ye,tt,nt,ft,ht],this.current.textMatrixScale=Math.hypot(Le,Ye),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(Le,Ye,tt,nt){const ft=this.ctx,ht=this.current,gt=ht.font,At=ht.textRenderingMode,xt=ht.fontSize/ht.fontSizeScale,Et=At&TextRenderingMode.FILL_STROKE_MASK,yt=!!(At&TextRenderingMode.ADD_TO_PATH_FLAG),Ct=ht.patternFill&&!gt.missingFile;let kt;(gt.disableFontFace||yt||Ct)&&(kt=gt.getPathGenerator(this.commonObjs,Le)),gt.disableFontFace||Ct?(ft.save(),ft.translate(Ye,tt),ft.beginPath(),kt(ft,xt),nt&&ft.setTransform(...nt),(Et===TextRenderingMode.FILL||Et===TextRenderingMode.FILL_STROKE)&&ft.fill(),(Et===TextRenderingMode.STROKE||Et===TextRenderingMode.FILL_STROKE)&&ft.stroke(),ft.restore()):((Et===TextRenderingMode.FILL||Et===TextRenderingMode.FILL_STROKE)&&ft.fillText(Le,Ye,tt),(Et===TextRenderingMode.STROKE||Et===TextRenderingMode.FILL_STROKE)&&ft.strokeText(Le,Ye,tt)),yt&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:getCurrentTransform(ft),x:Ye,y:tt,fontSize:xt,addToPath:kt})}get isFontSubpixelAAEnabled(){const{context:Le}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);Le.scale(1.5,1),Le.fillText("I",0,10);const Ye=Le.getImageData(0,0,10,10).data;let tt=!1;for(let nt=3;nt<Ye.length;nt+=4)if(Ye[nt]>0&&Ye[nt]<255){tt=!0;break}return shadow(this,"isFontSubpixelAAEnabled",tt)}showText(Le){const Ye=this.current,tt=Ye.font;if(tt.isType3Font)return this.showType3Text(Le);const nt=Ye.fontSize;if(nt===0)return;const ft=this.ctx,ht=Ye.fontSizeScale,gt=Ye.charSpacing,At=Ye.wordSpacing,xt=Ye.fontDirection,Et=Ye.textHScale*xt,yt=Le.length,Ct=tt.vertical,kt=Ct?1:-1,vt=tt.defaultVMetrics,bt=nt*Ye.fontMatrix[0],It=Ye.textRenderingMode===TextRenderingMode.FILL&&!tt.disableFontFace&&!Ye.patternFill;ft.save(),ft.transform(...Ye.textMatrix),ft.translate(Ye.x,Ye.y+Ye.textRise),xt>0?ft.scale(Et,-1):ft.scale(Et,1);let wt;if(Ye.patternFill){ft.save();const Pt=Ye.fillColor.getPattern(ft,this,getCurrentTransformInverse(ft),PathType.FILL);wt=getCurrentTransform(ft),ft.restore(),ft.fillStyle=Pt}let Rt=Ye.lineWidth;const Tt=Ye.textMatrixScale;if(Tt===0||Rt===0){const Pt=Ye.textRenderingMode&TextRenderingMode.FILL_STROKE_MASK;(Pt===TextRenderingMode.STROKE||Pt===TextRenderingMode.FILL_STROKE)&&(Rt=this.getSinglePixelWidth())}else Rt/=Tt;if(ht!==1&&(ft.scale(ht,ht),Rt/=ht),ft.lineWidth=Rt,tt.isInvalidPDFjsFont){const Pt=[];let Nt=0;for(const Lt of Le)Pt.push(Lt.unicode),Nt+=Lt.width;ft.fillText(Pt.join(""),0,0),Ye.x+=Nt*bt*Et,ft.restore(),this.compose();return}let Bt=0,Dt;for(Dt=0;Dt<yt;++Dt){const Pt=Le[Dt];if(typeof Pt=="number"){Bt+=kt*Pt*nt/1e3;continue}let Nt=!1;const Lt=(Pt.isSpace?At:0)+gt,Wt=Pt.fontChar,$t=Pt.accent;let Kt,Vt,Ut=Pt.width;if(Ct){const Xt=Pt.vmetric||vt,Qt=-(Pt.vmetric?Xt[1]:Ut*.5)*bt,jt=Xt[2]*bt;Ut=Xt?-Xt[0]:Ut,Kt=Qt/ht,Vt=(Bt+jt)/ht}else Kt=Bt/ht,Vt=0;if(tt.remeasure&&Ut>0){const Xt=ft.measureText(Wt).width*1e3/nt*ht;if(Ut<Xt&&this.isFontSubpixelAAEnabled){const Qt=Ut/Xt;Nt=!0,ft.save(),ft.scale(Qt,1),Kt/=Qt}else Ut!==Xt&&(Kt+=(Ut-Xt)/2e3*nt/ht)}if(this.contentVisible&&(Pt.isInFont||tt.missingFile)){if(It&&!$t)ft.fillText(Wt,Kt,Vt);else if(this.paintChar(Wt,Kt,Vt,wt),$t){const Xt=Kt+nt*$t.offset.x/ht,Qt=Vt-nt*$t.offset.y/ht;this.paintChar($t.fontChar,Xt,Qt,wt)}}const _t=Ct?Ut*bt-Lt*xt:Ut*bt+Lt*xt;Bt+=_t,Nt&&ft.restore()}Ct?Ye.y-=Bt:Ye.x+=Bt*Et,ft.restore(),this.compose()}showType3Text(Le){const Ye=this.ctx,tt=this.current,nt=tt.font,ft=tt.fontSize,ht=tt.fontDirection,gt=nt.vertical?1:-1,At=tt.charSpacing,xt=tt.wordSpacing,Et=tt.textHScale*ht,yt=tt.fontMatrix||FONT_IDENTITY_MATRIX,Ct=Le.length,kt=tt.textRenderingMode===TextRenderingMode.INVISIBLE;let vt,bt,It,wt;if(!(kt||ft===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,Ye.save(),Ye.transform(...tt.textMatrix),Ye.translate(tt.x,tt.y),Ye.scale(Et,ht),vt=0;vt<Ct;++vt){if(bt=Le[vt],typeof bt=="number"){wt=gt*bt*ft/1e3,this.ctx.translate(wt,0),tt.x+=wt*Et;continue}const Rt=(bt.isSpace?xt:0)+At,Tt=nt.charProcOperatorList[bt.operatorListId];if(!Tt){warn$1(`Type3 character "${bt.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=bt,this.save(),Ye.scale(ft,ft),Ye.transform(...yt),this.executeOperatorList(Tt),this.restore()),It=Util.applyTransform([bt.width,0],yt)[0]*ft+Rt,Ye.translate(It,0),tt.x+=It*Et}Ye.restore(),this.processingType3=null}}setCharWidth(Le,Ye){}setCharWidthAndBounds(Le,Ye,tt,nt,ft,ht){this.ctx.rect(tt,nt,ft-tt,ht-nt),this.ctx.clip(),this.endPath()}getColorN_Pattern(Le){let Ye;if(Le[0]==="TilingPattern"){const tt=Le[1],nt=this.baseTransform||getCurrentTransform(this.ctx),ft={createCanvasGraphics:ht=>new R3(ht,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};Ye=new TilingPattern(Le,tt,this.ctx,ft,nt)}else Ye=this._getPattern(Le[1],Le[2]);return Ye}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(Le,Ye,tt){this.ctx.strokeStyle=this.current.strokeColor=Util.makeHexColor(Le,Ye,tt)}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(Le,Ye,tt){this.ctx.fillStyle=this.current.fillColor=Util.makeHexColor(Le,Ye,tt),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(Le,Ye=null){let tt;return this.cachedPatterns.has(Le)?tt=this.cachedPatterns.get(Le):(tt=getShadingPattern(this.getObject(Le)),this.cachedPatterns.set(Le,tt)),Ye&&(tt.matrix=Ye),tt}shadingFill(Le){if(!this.contentVisible)return;const Ye=this.ctx;this.save();const tt=this._getPattern(Le);Ye.fillStyle=tt.getPattern(Ye,this,getCurrentTransformInverse(Ye),PathType.SHADING);const nt=getCurrentTransformInverse(Ye);if(nt){const{width:ft,height:ht}=Ye.canvas,[gt,At,xt,Et]=Util.getAxialAlignedBoundingBox([0,0,ft,ht],nt);this.ctx.fillRect(gt,At,xt-gt,Et-At)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){unreachable$1("Should not call beginInlineImage")}beginImageData(){unreachable$1("Should not call beginImageData")}paintFormXObjectBegin(Le,Ye){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Le&&this.transform(...Le),this.baseTransform=getCurrentTransform(this.ctx),Ye)){const tt=Ye[2]-Ye[0],nt=Ye[3]-Ye[1];this.ctx.rect(Ye[0],Ye[1],tt,nt),this.current.updateRectMinMax(getCurrentTransform(this.ctx),Ye),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(Le){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const Ye=this.ctx;Le.isolated||info("TODO: Support non-isolated groups."),Le.knockout&&warn$1("Knockout groups not supported.");const tt=getCurrentTransform(Ye);if(Le.matrix&&Ye.transform(...Le.matrix),!Le.bbox)throw new Error("Bounding box is required.");let nt=Util.getAxialAlignedBoundingBox(Le.bbox,getCurrentTransform(Ye));const ft=[0,0,Ye.canvas.width,Ye.canvas.height];nt=Util.intersect(nt,ft)||[0,0,0,0];const ht=Math.floor(nt[0]),gt=Math.floor(nt[1]),At=Math.max(Math.ceil(nt[2])-ht,1),xt=Math.max(Math.ceil(nt[3])-gt,1);this.current.startNewPathAndClipBox([0,0,At,xt]);let Et="groupAt"+this.groupLevel;Le.smask&&(Et+="_smask_"+this.smaskCounter++%2);const yt=this.cachedCanvases.getCanvas(Et,At,xt),Ct=yt.context;Ct.translate(-ht,-gt),Ct.transform(...tt),Le.smask?this.smaskStack.push({canvas:yt.canvas,context:Ct,offsetX:ht,offsetY:gt,subtype:Le.smask.subtype,backdrop:Le.smask.backdrop,transferMap:Le.smask.transferMap||null,startTransformInverse:null}):(Ye.setTransform(1,0,0,1,0,0),Ye.translate(ht,gt),Ye.save()),copyCtxState(Ye,Ct),this.ctx=Ct,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(Ye),this.groupLevel++}endGroup(Le){if(!this.contentVisible)return;this.groupLevel--;const Ye=this.ctx,tt=this.groupStack.pop();if(this.ctx=tt,this.ctx.imageSmoothingEnabled=!1,Le.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const nt=getCurrentTransform(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...nt);const ft=Util.getAxialAlignedBoundingBox([0,0,Ye.canvas.width,Ye.canvas.height],nt);this.ctx.drawImage(Ye.canvas,0,0),this.ctx.restore(),this.compose(ft)}}beginAnnotation(Le,Ye,tt,nt,ft){if(y0(this,_o,J9).call(this),resetCtxToDefault(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Ye){const ht=Ye[2]-Ye[0],gt=Ye[3]-Ye[1];if(ft&&this.annotationCanvasMap){tt=tt.slice(),tt[4]-=Ye[0],tt[5]-=Ye[1],Ye=Ye.slice(),Ye[0]=Ye[1]=0,Ye[2]=ht,Ye[3]=gt;const[At,xt]=Util.singularValueDecompose2dScale(getCurrentTransform(this.ctx)),{viewportScale:Et}=this,yt=Math.ceil(ht*this.outputScaleX*Et),Ct=Math.ceil(gt*this.outputScaleY*Et);this.annotationCanvas=this.canvasFactory.create(yt,Ct);const{canvas:kt,context:vt}=this.annotationCanvas;this.annotationCanvasMap.set(Le,kt),this.annotationCanvas.savedCtx=this.ctx,this.ctx=vt,this.ctx.save(),this.ctx.setTransform(At,0,0,-xt,0,gt*xt),resetCtxToDefault(this.ctx)}else resetCtxToDefault(this.ctx),this.endPath(),this.ctx.rect(Ye[0],Ye[1],ht,gt),this.ctx.clip(),this.ctx.beginPath()}this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...tt),this.transform(...nt)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),y0(this,_o,ep).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(Le){if(!this.contentVisible)return;const Ye=Le.count;Le=this.getObject(Le.data,Le),Le.count=Ye;const tt=this.ctx,nt=this.processingType3;if(nt&&(nt.compiled===void 0&&(nt.compiled=compileType3Glyph(Le)),nt.compiled)){nt.compiled(tt);return}const ft=this._createMaskCanvas(Le),ht=ft.canvas;tt.save(),tt.setTransform(1,0,0,1,0,0),tt.drawImage(ht,ft.offsetX,ft.offsetY),tt.restore(),this.compose()}paintImageMaskXObjectRepeat(Le,Ye,tt=0,nt=0,ft,ht){if(!this.contentVisible)return;Le=this.getObject(Le.data,Le);const gt=this.ctx;gt.save();const At=getCurrentTransform(gt);gt.transform(Ye,tt,nt,ft,0,0);const xt=this._createMaskCanvas(Le);gt.setTransform(1,0,0,1,xt.offsetX-At[4],xt.offsetY-At[5]);for(let Et=0,yt=ht.length;Et<yt;Et+=2){const Ct=Util.transform(At,[Ye,tt,nt,ft,ht[Et],ht[Et+1]]),[kt,vt]=Util.applyTransform([0,0],Ct);gt.drawImage(xt.canvas,kt,vt)}gt.restore(),this.compose()}paintImageMaskXObjectGroup(Le){if(!this.contentVisible)return;const Ye=this.ctx,tt=this.current.fillColor,nt=this.current.patternFill;for(const ft of Le){const{data:ht,width:gt,height:At,transform:xt}=ft,Et=this.cachedCanvases.getCanvas("maskCanvas",gt,At),yt=Et.context;yt.save();const Ct=this.getObject(ht,ft);putBinaryImageMask(yt,Ct),yt.globalCompositeOperation="source-in",yt.fillStyle=nt?tt.getPattern(yt,this,getCurrentTransformInverse(Ye),PathType.FILL):tt,yt.fillRect(0,0,gt,At),yt.restore(),Ye.save(),Ye.transform(...xt),Ye.scale(1,-1),drawImageAtIntegerCoords(Ye,Et.canvas,0,0,gt,At,0,-1,1,1),Ye.restore()}this.compose()}paintImageXObject(Le){if(!this.contentVisible)return;const Ye=this.getObject(Le);if(!Ye){warn$1("Dependent image isn't ready yet");return}this.paintInlineImageXObject(Ye)}paintImageXObjectRepeat(Le,Ye,tt,nt){if(!this.contentVisible)return;const ft=this.getObject(Le);if(!ft){warn$1("Dependent image isn't ready yet");return}const ht=ft.width,gt=ft.height,At=[];for(let xt=0,Et=nt.length;xt<Et;xt+=2)At.push({transform:[Ye,0,0,tt,nt[xt],nt[xt+1]],x:0,y:0,w:ht,h:gt});this.paintInlineImageXObjectGroup(ft,At)}applyTransferMapsToCanvas(Le){return this.current.transferMaps!=="none"&&(Le.filter=this.current.transferMaps,Le.drawImage(Le.canvas,0,0),Le.filter="none"),Le.canvas}applyTransferMapsToBitmap(Le){if(this.current.transferMaps==="none")return Le.bitmap;const{bitmap:Ye,width:tt,height:nt}=Le,ft=this.cachedCanvases.getCanvas("inlineImage",tt,nt),ht=ft.context;return ht.filter=this.current.transferMaps,ht.drawImage(Ye,0,0),ht.filter="none",ft.canvas}paintInlineImageXObject(Le){if(!this.contentVisible)return;const Ye=Le.width,tt=Le.height,nt=this.ctx;if(this.save(),!isNodeJS){const{filter:gt}=nt;gt!=="none"&>!==""&&(nt.filter="none")}nt.scale(1/Ye,-1/tt);let ft;if(Le.bitmap)ft=this.applyTransferMapsToBitmap(Le);else if(typeof HTMLElement=="function"&&Le instanceof HTMLElement||!Le.data)ft=Le;else{const At=this.cachedCanvases.getCanvas("inlineImage",Ye,tt).context;putBinaryImageData(At,Le),ft=this.applyTransferMapsToCanvas(At)}const ht=this._scaleImage(ft,getCurrentTransformInverse(nt));nt.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(nt),Le.interpolate),drawImageAtIntegerCoords(nt,ht.img,0,0,ht.paintWidth,ht.paintHeight,0,-tt,Ye,tt),this.compose(),this.restore()}paintInlineImageXObjectGroup(Le,Ye){if(!this.contentVisible)return;const tt=this.ctx;let nt;if(Le.bitmap)nt=Le.bitmap;else{const ft=Le.width,ht=Le.height,At=this.cachedCanvases.getCanvas("inlineImage",ft,ht).context;putBinaryImageData(At,Le),nt=this.applyTransferMapsToCanvas(At)}for(const ft of Ye)tt.save(),tt.transform(...ft.transform),tt.scale(1,-1),drawImageAtIntegerCoords(tt,nt,ft.x,ft.y,ft.w,ft.h,0,-1,1,1),tt.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(Le){}markPointProps(Le,Ye){}beginMarkedContent(Le){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(Le,Ye){Le==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(Ye)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(Le){const Ye=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(Le);const tt=this.ctx;this.pendingClip&&(Ye||(this.pendingClip===EO_CLIP?tt.clip("evenodd"):tt.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),tt.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const Le=getCurrentTransform(this.ctx);if(Le[1]===0&&Le[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(Le[0]),Math.abs(Le[3]));else{const Ye=Math.abs(Le[0]*Le[3]-Le[2]*Le[1]),tt=Math.hypot(Le[0],Le[2]),nt=Math.hypot(Le[1],Le[3]);this._cachedGetSinglePixelWidth=Math.max(tt,nt)/Ye}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:Le}=this.current,{a:Ye,b:tt,c:nt,d:ft}=this.ctx.getTransform();let ht,gt;if(tt===0&&nt===0){const At=Math.abs(Ye),xt=Math.abs(ft);if(At===xt)if(Le===0)ht=gt=1/At;else{const Et=At*Le;ht=gt=Et<1?1/Et:1}else if(Le===0)ht=1/At,gt=1/xt;else{const Et=At*Le,yt=xt*Le;ht=Et<1?1/Et:1,gt=yt<1?1/yt:1}}else{const At=Math.abs(Ye*ft-tt*nt),xt=Math.hypot(Ye,tt),Et=Math.hypot(nt,ft);if(Le===0)ht=Et/At,gt=xt/At;else{const yt=Le*At;ht=Et>yt?Et/yt:1,gt=xt>yt?xt/yt:1}}this._cachedScaleForStroking[0]=ht,this._cachedScaleForStroking[1]=gt}return this._cachedScaleForStroking}rescaleAndStroke(Le){const{ctx:Ye}=this,{lineWidth:tt}=this.current,[nt,ft]=this.getScaleForStroking();if(Ye.lineWidth=tt||1,nt===1&&ft===1){Ye.stroke();return}const ht=Ye.getLineDash();if(Le&&Ye.save(),Ye.scale(nt,ft),ht.length>0){const gt=Math.max(nt,ft);Ye.setLineDash(ht.map(At=>At/gt)),Ye.lineDashOffset/=gt}Ye.stroke(),Le&&Ye.restore()}isContentVisible(){for(let Le=this.markedContentStack.length-1;Le>=0;Le--)if(!this.markedContentStack[Le].visible)return!1;return!0}};_o=new WeakSet,J9=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},ep=function(){if(this.pageColors){const Le=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(Le!=="none"){const Ye=this.ctx.filter;this.ctx.filter=Le,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=Ye}}};let CanvasGraphics=R3;for(const Be in OPS)CanvasGraphics.prototype[Be]!==void 0&&(CanvasGraphics.prototype[OPS[Be]]=CanvasGraphics.prototype[Be]);class GlobalWorkerOptions{static get workerPort(){return Ht(this,yc)}static set workerPort(Le){if(!(typeof Worker<"u"&&Le instanceof Worker)&&Le!==null)throw new Error("Invalid `workerPort` type.");C0(this,yc,Le)}static get workerSrc(){return Ht(this,kc)}static set workerSrc(Le){if(typeof Le!="string")throw new Error("Invalid `workerSrc` type.");C0(this,kc,Le)}}yc=new WeakMap,kc=new WeakMap,v0(GlobalWorkerOptions,yc,null),v0(GlobalWorkerOptions,kc,"");const CallbackKind={DATA:1,ERROR:2},StreamKind={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function wrapReason(Be){switch(Be instanceof Error||typeof Be=="object"&&Be!==null||unreachable$1('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),Be.name){case"AbortException":return new AbortException(Be.message);case"MissingPDFException":return new MissingPDFException(Be.message);case"PasswordException":return new PasswordException(Be.message,Be.code);case"UnexpectedResponseException":return new UnexpectedResponseException(Be.message,Be.status);case"UnknownErrorException":return new UnknownErrorException(Be.message,Be.details);default:return new UnknownErrorException(Be.message,Be.toString())}}class MessageHandler{constructor(Le,Ye,tt){v0(this,yi);v0(this,H1,new AbortController);this.sourceName=Le,this.targetName=Ye,this.comObj=tt,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),tt.addEventListener("message",y0(this,yi,Ch).bind(this),{signal:Ht(this,H1).signal})}on(Le,Ye){const tt=this.actionHandler;if(tt[Le])throw new Error(`There is already an actionName called "${Le}"`);tt[Le]=Ye}send(Le,Ye,tt){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:Le,data:Ye},tt)}sendWithPromise(Le,Ye,tt){const nt=this.callbackId++,ft=Promise.withResolvers();this.callbackCapabilities[nt]=ft;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:Le,callbackId:nt,data:Ye},tt)}catch(ht){ft.reject(ht)}return ft.promise}sendWithStream(Le,Ye,tt,nt){const ft=this.streamId++,ht=this.sourceName,gt=this.targetName,At=this.comObj;return new ReadableStream({start:xt=>{const Et=Promise.withResolvers();return this.streamControllers[ft]={controller:xt,startCall:Et,pullCall:null,cancelCall:null,isClosed:!1},At.postMessage({sourceName:ht,targetName:gt,action:Le,streamId:ft,data:Ye,desiredSize:xt.desiredSize},nt),Et.promise},pull:xt=>{const Et=Promise.withResolvers();return this.streamControllers[ft].pullCall=Et,At.postMessage({sourceName:ht,targetName:gt,stream:StreamKind.PULL,streamId:ft,desiredSize:xt.desiredSize}),Et.promise},cancel:xt=>{assert(xt instanceof Error,"cancel must have a valid reason");const Et=Promise.withResolvers();return this.streamControllers[ft].cancelCall=Et,this.streamControllers[ft].isClosed=!0,At.postMessage({sourceName:ht,targetName:gt,stream:StreamKind.CANCEL,streamId:ft,reason:wrapReason(xt)}),Et.promise}},tt)}destroy(){var Le;(Le=Ht(this,H1))==null||Le.abort(),C0(this,H1,null)}}H1=new WeakMap,yi=new WeakSet,Ch=function({data:Le}){if(Le.targetName!==this.sourceName)return;if(Le.stream){y0(this,yi,kh).call(this,Le);return}if(Le.callback){const tt=Le.callbackId,nt=this.callbackCapabilities[tt];if(!nt)throw new Error(`Cannot resolve callback ${tt}`);if(delete this.callbackCapabilities[tt],Le.callback===CallbackKind.DATA)nt.resolve(Le.data);else if(Le.callback===CallbackKind.ERROR)nt.reject(wrapReason(Le.reason));else throw new Error("Unexpected callback case");return}const Ye=this.actionHandler[Le.action];if(!Ye)throw new Error(`Unknown action from worker: ${Le.action}`);if(Le.callbackId){const tt=this.sourceName,nt=Le.sourceName,ft=this.comObj;new Promise(function(ht){ht(Ye(Le.data))}).then(function(ht){ft.postMessage({sourceName:tt,targetName:nt,callback:CallbackKind.DATA,callbackId:Le.callbackId,data:ht})},function(ht){ft.postMessage({sourceName:tt,targetName:nt,callback:CallbackKind.ERROR,callbackId:Le.callbackId,reason:wrapReason(ht)})});return}if(Le.streamId){y0(this,yi,yh).call(this,Le);return}Ye(Le.data)},yh=function(Le){const Ye=Le.streamId,tt=this.sourceName,nt=Le.sourceName,ft=this.comObj,ht=this,gt=this.actionHandler[Le.action],At={enqueue(xt,Et=1,yt){if(this.isCancelled)return;const Ct=this.desiredSize;this.desiredSize-=Et,Ct>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.ENQUEUE,streamId:Ye,chunk:xt},yt)},close(){this.isCancelled||(this.isCancelled=!0,ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.CLOSE,streamId:Ye}),delete ht.streamSinks[Ye])},error(xt){assert(xt instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.ERROR,streamId:Ye,reason:wrapReason(xt)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:Le.desiredSize,ready:null};At.sinkCapability.resolve(),At.ready=At.sinkCapability.promise,this.streamSinks[Ye]=At,new Promise(function(xt){xt(gt(Le.data,At))}).then(function(){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.START_COMPLETE,streamId:Ye,success:!0})},function(xt){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.START_COMPLETE,streamId:Ye,reason:wrapReason(xt)})})},kh=function(Le){const Ye=Le.streamId,tt=this.sourceName,nt=Le.sourceName,ft=this.comObj,ht=this.streamControllers[Ye],gt=this.streamSinks[Ye];switch(Le.stream){case StreamKind.START_COMPLETE:Le.success?ht.startCall.resolve():ht.startCall.reject(wrapReason(Le.reason));break;case StreamKind.PULL_COMPLETE:Le.success?ht.pullCall.resolve():ht.pullCall.reject(wrapReason(Le.reason));break;case StreamKind.PULL:if(!gt){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.PULL_COMPLETE,streamId:Ye,success:!0});break}gt.desiredSize<=0&&Le.desiredSize>0&>.sinkCapability.resolve(),gt.desiredSize=Le.desiredSize,new Promise(function(At){var xt;At((xt=gt.onPull)==null?void 0:xt.call(gt))}).then(function(){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.PULL_COMPLETE,streamId:Ye,success:!0})},function(At){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.PULL_COMPLETE,streamId:Ye,reason:wrapReason(At)})});break;case StreamKind.ENQUEUE:if(assert(ht,"enqueue should have stream controller"),ht.isClosed)break;ht.controller.enqueue(Le.chunk);break;case StreamKind.CLOSE:if(assert(ht,"close should have stream controller"),ht.isClosed)break;ht.isClosed=!0,ht.controller.close(),y0(this,yi,a3).call(this,ht,Ye);break;case StreamKind.ERROR:assert(ht,"error should have stream controller"),ht.controller.error(wrapReason(Le.reason)),y0(this,yi,a3).call(this,ht,Ye);break;case StreamKind.CANCEL_COMPLETE:Le.success?ht.cancelCall.resolve():ht.cancelCall.reject(wrapReason(Le.reason)),y0(this,yi,a3).call(this,ht,Ye);break;case StreamKind.CANCEL:if(!gt)break;new Promise(function(At){var xt;At((xt=gt.onCancel)==null?void 0:xt.call(gt,wrapReason(Le.reason)))}).then(function(){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.CANCEL_COMPLETE,streamId:Ye,success:!0})},function(At){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.CANCEL_COMPLETE,streamId:Ye,reason:wrapReason(At)})}),gt.sinkCapability.reject(wrapReason(Le.reason)),gt.isCancelled=!0,delete this.streamSinks[Ye];break;default:throw new Error("Unexpected stream case")}},a3=async function(Le,Ye){var tt,nt,ft;await Promise.allSettled([(tt=Le.startCall)==null?void 0:tt.promise,(nt=Le.pullCall)==null?void 0:nt.promise,(ft=Le.cancelCall)==null?void 0:ft.promise]),delete this.streamControllers[Ye]};class Metadata{constructor({parsedData:Le,rawData:Ye}){v0(this,O2);v0(this,vc);C0(this,O2,Le),C0(this,vc,Ye)}getRaw(){return Ht(this,vc)}get(Le){return Ht(this,O2).get(Le)??null}getAll(){return objectFromMap(Ht(this,O2))}has(Le){return Ht(this,O2).has(Le)}}O2=new WeakMap,vc=new WeakMap;const INTERNAL=Symbol("INTERNAL");class OptionalContentGroup{constructor(Le,{name:Ye,intent:tt,usage:nt,rbGroups:ft}){v0(this,bc,!1);v0(this,Ic,!1);v0(this,Sc,!1);v0(this,G1,!0);C0(this,bc,!!(Le&RenderingIntentFlag.DISPLAY)),C0(this,Ic,!!(Le&RenderingIntentFlag.PRINT)),this.name=Ye,this.intent=tt,this.usage=nt,this.rbGroups=ft}get visible(){if(Ht(this,Sc))return Ht(this,G1);if(!Ht(this,G1))return!1;const{print:Le,view:Ye}=this.usage;return Ht(this,bc)?(Ye==null?void 0:Ye.viewState)!=="OFF":Ht(this,Ic)?(Le==null?void 0:Le.printState)!=="OFF":!0}_setVisible(Le,Ye,tt=!1){Le!==INTERNAL&&unreachable$1("Internal method `_setVisible` called."),C0(this,Sc,tt),C0(this,G1,Ye)}}bc=new WeakMap,Ic=new WeakMap,Sc=new WeakMap,G1=new WeakMap;class OptionalContentConfig{constructor(Le,Ye=RenderingIntentFlag.DISPLAY){v0(this,wc);v0(this,Mo,null);v0(this,br,new Map);v0(this,z1,null);v0(this,W1,null);if(this.renderingIntent=Ye,this.name=null,this.creator=null,Le!==null){this.name=Le.name,this.creator=Le.creator,C0(this,W1,Le.order);for(const tt of Le.groups)Ht(this,br).set(tt.id,new OptionalContentGroup(Ye,tt));if(Le.baseState==="OFF")for(const tt of Ht(this,br).values())tt._setVisible(INTERNAL,!1);for(const tt of Le.on)Ht(this,br).get(tt)._setVisible(INTERNAL,!0);for(const tt of Le.off)Ht(this,br).get(tt)._setVisible(INTERNAL,!1);C0(this,z1,this.getHash())}}isVisible(Le){if(Ht(this,br).size===0)return!0;if(!Le)return info("Optional content group not defined."),!0;if(Le.type==="OCG")return Ht(this,br).has(Le.id)?Ht(this,br).get(Le.id).visible:(warn$1(`Optional content group not found: ${Le.id}`),!0);if(Le.type==="OCMD"){if(Le.expression)return y0(this,wc,tp).call(this,Le.expression);if(!Le.policy||Le.policy==="AnyOn"){for(const Ye of Le.ids){if(!Ht(this,br).has(Ye))return warn$1(`Optional content group not found: ${Ye}`),!0;if(Ht(this,br).get(Ye).visible)return!0}return!1}else if(Le.policy==="AllOn"){for(const Ye of Le.ids){if(!Ht(this,br).has(Ye))return warn$1(`Optional content group not found: ${Ye}`),!0;if(!Ht(this,br).get(Ye).visible)return!1}return!0}else if(Le.policy==="AnyOff"){for(const Ye of Le.ids){if(!Ht(this,br).has(Ye))return warn$1(`Optional content group not found: ${Ye}`),!0;if(!Ht(this,br).get(Ye).visible)return!0}return!1}else if(Le.policy==="AllOff"){for(const Ye of Le.ids){if(!Ht(this,br).has(Ye))return warn$1(`Optional content group not found: ${Ye}`),!0;if(Ht(this,br).get(Ye).visible)return!1}return!0}return warn$1(`Unknown optional content policy ${Le.policy}.`),!0}return warn$1(`Unknown group type ${Le.type}.`),!0}setVisibility(Le,Ye=!0,tt=!0){var ft;const nt=Ht(this,br).get(Le);if(!nt){warn$1(`Optional content group not found: ${Le}`);return}if(tt&&Ye&&nt.rbGroups.length)for(const ht of nt.rbGroups)for(const gt of ht)gt!==Le&&((ft=Ht(this,br).get(gt))==null||ft._setVisible(INTERNAL,!1,!0));nt._setVisible(INTERNAL,!!Ye,!0),C0(this,Mo,null)}setOCGState({state:Le,preserveRB:Ye}){let tt;for(const nt of Le){switch(nt){case"ON":case"OFF":case"Toggle":tt=nt;continue}const ft=Ht(this,br).get(nt);if(ft)switch(tt){case"ON":this.setVisibility(nt,!0,Ye);break;case"OFF":this.setVisibility(nt,!1,Ye);break;case"Toggle":this.setVisibility(nt,!ft.visible,Ye);break}}C0(this,Mo,null)}get hasInitialVisibility(){return Ht(this,z1)===null||this.getHash()===Ht(this,z1)}getOrder(){return Ht(this,br).size?Ht(this,W1)?Ht(this,W1).slice():[...Ht(this,br).keys()]:null}getGroups(){return Ht(this,br).size>0?objectFromMap(Ht(this,br)):null}getGroup(Le){return Ht(this,br).get(Le)||null}getHash(){if(Ht(this,Mo)!==null)return Ht(this,Mo);const Le=new MurmurHash3_64;for(const[Ye,tt]of Ht(this,br))Le.update(`${Ye}:${tt.visible}`);return C0(this,Mo,Le.hexdigest())}}Mo=new WeakMap,br=new WeakMap,z1=new WeakMap,W1=new WeakMap,wc=new WeakSet,tp=function(Le){const Ye=Le.length;if(Ye<2)return!0;const tt=Le[0];for(let nt=1;nt<Ye;nt++){const ft=Le[nt];let ht;if(Array.isArray(ft))ht=y0(this,wc,tp).call(this,ft);else if(Ht(this,br).has(ft))ht=Ht(this,br).get(ft).visible;else return warn$1(`Optional content group not found: ${ft}`),!0;switch(tt){case"And":if(!ht)return!1;break;case"Or":if(ht)return!0;break;case"Not":return!ht;default:return!0}}return tt==="And"};class PDFDataTransportStream{constructor(Le,{disableRange:Ye=!1,disableStream:tt=!1}){assert(Le,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:nt,initialData:ft,progressiveDone:ht,contentDispositionFilename:gt}=Le;if(this._queuedChunks=[],this._progressiveDone=ht,this._contentDispositionFilename=gt,(ft==null?void 0:ft.length)>0){const At=ft instanceof Uint8Array&&ft.byteLength===ft.buffer.byteLength?ft.buffer:new Uint8Array(ft).buffer;this._queuedChunks.push(At)}this._pdfDataRangeTransport=Le,this._isStreamingSupported=!tt,this._isRangeSupported=!Ye,this._contentLength=nt,this._fullRequestReader=null,this._rangeReaders=[],Le.addRangeListener((At,xt)=>{this._onReceiveData({begin:At,chunk:xt})}),Le.addProgressListener((At,xt)=>{this._onProgress({loaded:At,total:xt})}),Le.addProgressiveReadListener(At=>{this._onReceiveData({chunk:At})}),Le.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),Le.transportReady()}_onReceiveData({begin:Le,chunk:Ye}){const tt=Ye instanceof Uint8Array&&Ye.byteLength===Ye.buffer.byteLength?Ye.buffer:new Uint8Array(Ye).buffer;if(Le===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(tt):this._queuedChunks.push(tt);else{const nt=this._rangeReaders.some(function(ft){return ft._begin!==Le?!1:(ft._enqueue(tt),!0)});assert(nt,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var Le;return((Le=this._fullRequestReader)==null?void 0:Le._loaded)??0}_onProgress(Le){var Ye,tt,nt,ft;Le.total===void 0?(tt=(Ye=this._rangeReaders[0])==null?void 0:Ye.onProgress)==null||tt.call(Ye,{loaded:Le.loaded}):(ft=(nt=this._fullRequestReader)==null?void 0:nt.onProgress)==null||ft.call(nt,{loaded:Le.loaded,total:Le.total})}_onProgressiveDone(){var Le;(Le=this._fullRequestReader)==null||Le.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(Le){const Ye=this._rangeReaders.indexOf(Le);Ye>=0&&this._rangeReaders.splice(Ye,1)}getFullReader(){assert(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const Le=this._queuedChunks;return this._queuedChunks=null,new PDFDataTransportStreamReader(this,Le,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(Le,Ye){if(Ye<=this._progressiveDataLength)return null;const tt=new PDFDataTransportStreamRangeReader(this,Le,Ye);return this._pdfDataRangeTransport.requestDataRange(Le,Ye),this._rangeReaders.push(tt),tt}cancelAllRequests(Le){var Ye;(Ye=this._fullRequestReader)==null||Ye.cancel(Le);for(const tt of this._rangeReaders.slice(0))tt.cancel(Le);this._pdfDataRangeTransport.abort()}}class PDFDataTransportStreamReader{constructor(Le,Ye,tt=!1,nt=null){this._stream=Le,this._done=tt||!1,this._filename=isPdfFile(nt)?nt:null,this._queuedChunks=Ye||[],this._loaded=0;for(const ft of this._queuedChunks)this._loaded+=ft.byteLength;this._requests=[],this._headersReady=Promise.resolve(),Le._fullRequestReader=this,this.onProgress=null}_enqueue(Le){this._done||(this._requests.length>0?this._requests.shift().resolve({value:Le,done:!1}):this._queuedChunks.push(Le),this._loaded+=Le.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const Le=Promise.withResolvers();return this._requests.push(Le),Le.promise}cancel(Le){this._done=!0;for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class PDFDataTransportStreamRangeReader{constructor(Le,Ye,tt){this._stream=Le,this._begin=Ye,this._end=tt,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(Le){if(!this._done){if(this._requests.length===0)this._queuedChunk=Le;else{this._requests.shift().resolve({value:Le,done:!1});for(const tt of this._requests)tt.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const Ye=this._queuedChunk;return this._queuedChunk=null,{value:Ye,done:!1}}if(this._done)return{value:void 0,done:!0};const Le=Promise.withResolvers();return this._requests.push(Le),Le.promise}cancel(Le){this._done=!0;for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function getFilenameFromContentDispositionHeader(Be){let Le=!0,Ye=tt("filename\\*","i").exec(Be);if(Ye){Ye=Ye[1];let Et=gt(Ye);return Et=unescape(Et),Et=At(Et),Et=xt(Et),ft(Et)}if(Ye=ht(Be),Ye){const Et=xt(Ye);return ft(Et)}if(Ye=tt("filename","i").exec(Be),Ye){Ye=Ye[1];let Et=gt(Ye);return Et=xt(Et),ft(Et)}function tt(Et,yt){return new RegExp("(?:^|;)\\s*"+Et+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',yt)}function nt(Et,yt){if(Et){if(!/^[\x00-\xFF]+$/.test(yt))return yt;try{const Ct=new TextDecoder(Et,{fatal:!0}),kt=stringToBytes(yt);yt=Ct.decode(kt),Le=!1}catch{}}return yt}function ft(Et){return Le&&/[\x80-\xff]/.test(Et)&&(Et=nt("utf-8",Et),Le&&(Et=nt("iso-8859-1",Et))),Et}function ht(Et){const yt=[];let Ct;const kt=tt("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(Ct=kt.exec(Et))!==null;){let[,bt,It,wt]=Ct;if(bt=parseInt(bt,10),bt in yt){if(bt===0)break;continue}yt[bt]=[It,wt]}const vt=[];for(let bt=0;bt<yt.length&&bt in yt;++bt){let[It,wt]=yt[bt];wt=gt(wt),It&&(wt=unescape(wt),bt===0&&(wt=At(wt))),vt.push(wt)}return vt.join("")}function gt(Et){if(Et.startsWith('"')){const yt=Et.slice(1).split('\\"');for(let Ct=0;Ct<yt.length;++Ct){const kt=yt[Ct].indexOf('"');kt!==-1&&(yt[Ct]=yt[Ct].slice(0,kt),yt.length=Ct+1),yt[Ct]=yt[Ct].replaceAll(/\\(.)/g,"$1")}Et=yt.join('"')}return Et}function At(Et){const yt=Et.indexOf("'");if(yt===-1)return Et;const Ct=Et.slice(0,yt),vt=Et.slice(yt+1).replace(/^[^']*'/,"");return nt(Ct,vt)}function xt(Et){return!Et.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(Et)?Et:Et.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(yt,Ct,kt,vt){if(kt==="q"||kt==="Q")return vt=vt.replaceAll("_"," "),vt=vt.replaceAll(/=([0-9a-fA-F]{2})/g,function(bt,It){return String.fromCharCode(parseInt(It,16))}),nt(Ct,vt);try{vt=atob(vt)}catch{}return nt(Ct,vt)})}return""}function createHeaders(Be,Le){const Ye=new Headers;if(!Be||!Le||typeof Le!="object")return Ye;for(const tt in Le){const nt=Le[tt];nt!==void 0&&Ye.append(tt,nt)}return Ye}function validateRangeRequestCapabilities({responseHeaders:Be,isHttp:Le,rangeChunkSize:Ye,disableRange:tt}){const nt={allowRangeRequests:!1,suggestedLength:void 0},ft=parseInt(Be.get("Content-Length"),10);return!Number.isInteger(ft)||(nt.suggestedLength=ft,ft<=2*Ye)||tt||!Le||Be.get("Accept-Ranges")!=="bytes"||(Be.get("Content-Encoding")||"identity")!=="identity"||(nt.allowRangeRequests=!0),nt}function extractFilenameFromHeader(Be){const Le=Be.get("Content-Disposition");if(Le){let Ye=getFilenameFromContentDispositionHeader(Le);if(Ye.includes("%"))try{Ye=decodeURIComponent(Ye)}catch{}if(isPdfFile(Ye))return Ye}return null}function createResponseStatusError(Be,Le){return Be===404||Be===0&&Le.startsWith("file:")?new MissingPDFException('Missing PDF "'+Le+'".'):new UnexpectedResponseException(`Unexpected server response (${Be}) while retrieving PDF "${Le}".`,Be)}function validateResponseStatus(Be){return Be===200||Be===206}function createFetchOptions(Be,Le,Ye){return{method:"GET",headers:Be,signal:Ye.signal,mode:"cors",credentials:Le?"include":"same-origin",redirect:"follow"}}function getArrayBuffer(Be){return Be instanceof Uint8Array?Be.buffer:Be instanceof ArrayBuffer?Be:(warn$1(`getArrayBuffer - unexpected data format: ${Be}`),new Uint8Array(Be).buffer)}class PDFFetchStream{constructor(Le){this.source=Le,this.isHttp=/^https?:/i.test(Le.url),this.headers=createHeaders(this.isHttp,Le.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var Le;return((Le=this._fullRequestReader)==null?void 0:Le._loaded)??0}getFullReader(){return assert(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new PDFFetchStreamReader(this),this._fullRequestReader}getRangeReader(Le,Ye){if(Ye<=this._progressiveDataLength)return null;const tt=new PDFFetchStreamRangeReader(this,Le,Ye);return this._rangeRequestReaders.push(tt),tt}cancelAllRequests(Le){var Ye;(Ye=this._fullRequestReader)==null||Ye.cancel(Le);for(const tt of this._rangeRequestReaders.slice(0))tt.cancel(Le)}}class PDFFetchStreamReader{constructor(Le){this._stream=Le,this._reader=null,this._loaded=0,this._filename=null;const Ye=Le.source;this._withCredentials=Ye.withCredentials||!1,this._contentLength=Ye.length,this._headersCapability=Promise.withResolvers(),this._disableRange=Ye.disableRange||!1,this._rangeChunkSize=Ye.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!Ye.disableStream,this._isRangeSupported=!Ye.disableRange;const tt=new Headers(Le.headers),nt=Ye.url;fetch(nt,createFetchOptions(tt,this._withCredentials,this._abortController)).then(ft=>{if(!validateResponseStatus(ft.status))throw createResponseStatusError(ft.status,nt);this._reader=ft.body.getReader(),this._headersCapability.resolve();const ht=ft.headers,{allowRangeRequests:gt,suggestedLength:At}=validateRangeRequestCapabilities({responseHeaders:ht,isHttp:Le.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=gt,this._contentLength=At||this._contentLength,this._filename=extractFilenameFromHeader(ht),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var tt;await this._headersCapability.promise;const{value:Le,done:Ye}=await this._reader.read();return Ye?{value:Le,done:Ye}:(this._loaded+=Le.byteLength,(tt=this.onProgress)==null||tt.call(this,{loaded:this._loaded,total:this._contentLength}),{value:getArrayBuffer(Le),done:!1})}cancel(Le){var Ye;(Ye=this._reader)==null||Ye.cancel(Le),this._abortController.abort()}}class PDFFetchStreamRangeReader{constructor(Le,Ye,tt){this._stream=Le,this._reader=null,this._loaded=0;const nt=Le.source;this._withCredentials=nt.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!nt.disableStream,this._abortController=new AbortController;const ft=new Headers(Le.headers);ft.append("Range",`bytes=${Ye}-${tt-1}`);const ht=nt.url;fetch(ht,createFetchOptions(ft,this._withCredentials,this._abortController)).then(gt=>{if(!validateResponseStatus(gt.status))throw createResponseStatusError(gt.status,ht);this._readCapability.resolve(),this._reader=gt.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var tt;await this._readCapability.promise;const{value:Le,done:Ye}=await this._reader.read();return Ye?{value:Le,done:Ye}:(this._loaded+=Le.byteLength,(tt=this.onProgress)==null||tt.call(this,{loaded:this._loaded}),{value:getArrayBuffer(Le),done:!1})}cancel(Le){var Ye;(Ye=this._reader)==null||Ye.cancel(Le),this._abortController.abort()}}const OK_RESPONSE=200,PARTIAL_CONTENT_RESPONSE=206;function network_getArrayBuffer(Be){const Le=Be.response;return typeof Le!="string"?Le:stringToBytes(Le).buffer}class NetworkManager{constructor({url:Le,httpHeaders:Ye,withCredentials:tt}){this.url=Le,this.isHttp=/^https?:/i.test(Le),this.headers=createHeaders(this.isHttp,Ye),this.withCredentials=tt||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(Le,Ye,tt){const nt={begin:Le,end:Ye};for(const ft in tt)nt[ft]=tt[ft];return this.request(nt)}requestFull(Le){return this.request(Le)}request(Le){const Ye=new XMLHttpRequest,tt=this.currXhrId++,nt=this.pendingRequests[tt]={xhr:Ye};Ye.open("GET",this.url),Ye.withCredentials=this.withCredentials;for(const[ft,ht]of this.headers)Ye.setRequestHeader(ft,ht);return this.isHttp&&"begin"in Le&&"end"in Le?(Ye.setRequestHeader("Range",`bytes=${Le.begin}-${Le.end-1}`),nt.expectedStatus=PARTIAL_CONTENT_RESPONSE):nt.expectedStatus=OK_RESPONSE,Ye.responseType="arraybuffer",Le.onError&&(Ye.onerror=function(ft){Le.onError(Ye.status)}),Ye.onreadystatechange=this.onStateChange.bind(this,tt),Ye.onprogress=this.onProgress.bind(this,tt),nt.onHeadersReceived=Le.onHeadersReceived,nt.onDone=Le.onDone,nt.onError=Le.onError,nt.onProgress=Le.onProgress,Ye.send(null),tt}onProgress(Le,Ye){var nt;const tt=this.pendingRequests[Le];tt&&((nt=tt.onProgress)==null||nt.call(tt,Ye))}onStateChange(Le,Ye){var At,xt,Et;const tt=this.pendingRequests[Le];if(!tt)return;const nt=tt.xhr;if(nt.readyState>=2&&tt.onHeadersReceived&&(tt.onHeadersReceived(),delete tt.onHeadersReceived),nt.readyState!==4||!(Le in this.pendingRequests))return;if(delete this.pendingRequests[Le],nt.status===0&&this.isHttp){(At=tt.onError)==null||At.call(tt,nt.status);return}const ft=nt.status||OK_RESPONSE;if(!(ft===OK_RESPONSE&&tt.expectedStatus===PARTIAL_CONTENT_RESPONSE)&&ft!==tt.expectedStatus){(xt=tt.onError)==null||xt.call(tt,nt.status);return}const gt=network_getArrayBuffer(nt);if(ft===PARTIAL_CONTENT_RESPONSE){const yt=nt.getResponseHeader("Content-Range"),Ct=/bytes (\d+)-(\d+)\/(\d+)/.exec(yt);tt.onDone({begin:parseInt(Ct[1],10),chunk:gt})}else gt?tt.onDone({begin:0,chunk:gt}):(Et=tt.onError)==null||Et.call(tt,nt.status)}getRequestXhr(Le){return this.pendingRequests[Le].xhr}isPendingRequest(Le){return Le in this.pendingRequests}abortRequest(Le){const Ye=this.pendingRequests[Le].xhr;delete this.pendingRequests[Le],Ye.abort()}}class PDFNetworkStream{constructor(Le){this._source=Le,this._manager=new NetworkManager(Le),this._rangeChunkSize=Le.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(Le){const Ye=this._rangeRequestReaders.indexOf(Le);Ye>=0&&this._rangeRequestReaders.splice(Ye,1)}getFullReader(){return assert(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new PDFNetworkStreamFullRequestReader(this._manager,this._source),this._fullRequestReader}getRangeReader(Le,Ye){const tt=new PDFNetworkStreamRangeRequestReader(this._manager,Le,Ye);return tt.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(tt),tt}cancelAllRequests(Le){var Ye;(Ye=this._fullRequestReader)==null||Ye.cancel(Le);for(const tt of this._rangeRequestReaders.slice(0))tt.cancel(Le)}}class PDFNetworkStreamFullRequestReader{constructor(Le,Ye){this._manager=Le;const tt={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=Ye.url,this._fullRequestId=Le.requestFull(tt),this._headersCapability=Promise.withResolvers(),this._disableRange=Ye.disableRange||!1,this._contentLength=Ye.length,this._rangeChunkSize=Ye.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const Le=this._fullRequestId,Ye=this._manager.getRequestXhr(Le),tt=new Headers(Ye.getAllResponseHeaders().trim().split(/[\r\n]+/).map(ht=>{const[gt,...At]=ht.split(": ");return[gt,At.join(": ")]})),{allowRangeRequests:nt,suggestedLength:ft}=validateRangeRequestCapabilities({responseHeaders:tt,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});nt&&(this._isRangeSupported=!0),this._contentLength=ft||this._contentLength,this._filename=extractFilenameFromHeader(tt),this._isRangeSupported&&this._manager.abortRequest(Le),this._headersCapability.resolve()}_onDone(Le){if(Le&&(this._requests.length>0?this._requests.shift().resolve({value:Le.chunk,done:!1}):this._cachedChunks.push(Le.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(Le){this._storedError=createResponseStatusError(Le,this._url),this._headersCapability.reject(this._storedError);for(const Ye of this._requests)Ye.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(Le){var Ye;(Ye=this.onProgress)==null||Ye.call(this,{loaded:Le.loaded,total:Le.lengthComputable?Le.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const Le=Promise.withResolvers();return this._requests.push(Le),Le.promise}cancel(Le){this._done=!0,this._headersCapability.reject(Le);for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class PDFNetworkStreamRangeRequestReader{constructor(Le,Ye,tt){this._manager=Le;const nt={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=Le.url,this._requestId=Le.requestRange(Ye,tt,nt),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var Le;(Le=this.onClosed)==null||Le.call(this,this)}_onDone(Le){const Ye=Le.chunk;this._requests.length>0?this._requests.shift().resolve({value:Ye,done:!1}):this._queuedChunk=Ye,this._done=!0;for(const tt of this._requests)tt.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(Le){this._storedError=createResponseStatusError(Le,this._url);for(const Ye of this._requests)Ye.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(Le){var Ye;this.isStreamingSupported||(Ye=this.onProgress)==null||Ye.call(this,{loaded:Le.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const Ye=this._queuedChunk;return this._queuedChunk=null,{value:Ye,done:!1}}if(this._done)return{value:void 0,done:!0};const Le=Promise.withResolvers();return this._requests.push(Le),Le.promise}cancel(Le){this._done=!0;for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const urlRegex=/^[a-z][a-z0-9\-+.]+:/i;function parseUrlOrPath(Be){if(urlRegex.test(Be))return new URL(Be);const Le=NodePackages.get("url");return new URL(Le.pathToFileURL(Be))}function createRequest(Be,Le,Ye){return Be.protocol==="http:"?NodePackages.get("http").request(Be,{headers:Le},Ye):NodePackages.get("https").request(Be,{headers:Le},Ye)}class PDFNodeStream{constructor(Le){this.source=Le,this.url=parseUrlOrPath(Le.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.headers=createHeaders(this.isHttp,Le.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var Le;return((Le=this._fullRequestReader)==null?void 0:Le._loaded)??0}getFullReader(){return assert(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new PDFNodeStreamFsFullReader(this):new PDFNodeStreamFullReader(this),this._fullRequestReader}getRangeReader(Le,Ye){if(Ye<=this._progressiveDataLength)return null;const tt=this.isFsUrl?new PDFNodeStreamFsRangeReader(this,Le,Ye):new PDFNodeStreamRangeReader(this,Le,Ye);return this._rangeRequestReaders.push(tt),tt}cancelAllRequests(Le){var Ye;(Ye=this._fullRequestReader)==null||Ye.cancel(Le);for(const tt of this._rangeRequestReaders.slice(0))tt.cancel(Le)}}class BaseFullReader{constructor(Le){this._url=Le.url,this._done=!1,this._storedError=null,this.onProgress=null;const Ye=Le.source;this._contentLength=Ye.length,this._loaded=0,this._filename=null,this._disableRange=Ye.disableRange||!1,this._rangeChunkSize=Ye.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!Ye.disableStream,this._isRangeSupported=!Ye.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var tt;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const Le=this._readableStream.read();return Le===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=Le.length,(tt=this.onProgress)==null||tt.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(Le).buffer,done:!1})}cancel(Le){if(!this._readableStream){this._error(Le);return}this._readableStream.destroy(Le)}_error(Le){this._storedError=Le,this._readCapability.resolve()}_setReadableStream(Le){this._readableStream=Le,Le.on("readable",()=>{this._readCapability.resolve()}),Le.on("end",()=>{Le.destroy(),this._done=!0,this._readCapability.resolve()}),Le.on("error",Ye=>{this._error(Ye)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class BaseRangeReader{constructor(Le){this._url=Le.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const Ye=Le.source;this._isStreamingSupported=!Ye.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var tt;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const Le=this._readableStream.read();return Le===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=Le.length,(tt=this.onProgress)==null||tt.call(this,{loaded:this._loaded}),{value:new Uint8Array(Le).buffer,done:!1})}cancel(Le){if(!this._readableStream){this._error(Le);return}this._readableStream.destroy(Le)}_error(Le){this._storedError=Le,this._readCapability.resolve()}_setReadableStream(Le){this._readableStream=Le,Le.on("readable",()=>{this._readCapability.resolve()}),Le.on("end",()=>{Le.destroy(),this._done=!0,this._readCapability.resolve()}),Le.on("error",Ye=>{this._error(Ye)}),this._storedError&&this._readableStream.destroy(this._storedError)}}class PDFNodeStreamFullReader extends BaseFullReader{constructor(Le){super(Le);const Ye=Object.fromEntries(Le.headers),tt=nt=>{if(nt.statusCode===404){const At=new MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=At,this._headersCapability.reject(At);return}this._headersCapability.resolve(),this._setReadableStream(nt);const ft=new Headers(this._readableStream.headers),{allowRangeRequests:ht,suggestedLength:gt}=validateRangeRequestCapabilities({responseHeaders:ft,isHttp:Le.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=ht,this._contentLength=gt||this._contentLength,this._filename=extractFilenameFromHeader(ft)};this._request=createRequest(this._url,Ye,tt),this._request.on("error",nt=>{this._storedError=nt,this._headersCapability.reject(nt)}),this._request.end()}}class PDFNodeStreamRangeReader extends BaseRangeReader{constructor(Le,Ye,tt){super(Le);const nt=Object.fromEntries(Le.headers);nt.Range=`bytes=${Ye}-${tt-1}`;const ft=ht=>{if(ht.statusCode===404){const gt=new MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=gt;return}this._setReadableStream(ht)};this._request=createRequest(this._url,nt,ft),this._request.on("error",ht=>{this._storedError=ht}),this._request.end()}}class PDFNodeStreamFsFullReader extends BaseFullReader{constructor(Le){super(Le);const Ye=NodePackages.get("fs");Ye.promises.lstat(this._url).then(tt=>{this._contentLength=tt.size,this._setReadableStream(Ye.createReadStream(this._url)),this._headersCapability.resolve()},tt=>{tt.code==="ENOENT"&&(tt=new MissingPDFException(`Missing PDF "${this._url}".`)),this._storedError=tt,this._headersCapability.reject(tt)})}}class PDFNodeStreamFsRangeReader extends BaseRangeReader{constructor(Le,Ye,tt){super(Le);const nt=NodePackages.get("fs");this._setReadableStream(nt.createReadStream(this._url,{start:Ye,end:tt-1}))}}const MAX_TEXT_DIVS_TO_RENDER=1e5,DEFAULT_FONT_SIZE=30,DEFAULT_FONT_ASCENT=.8;let TextLayer$1=(Xr=class{constructor({textContentSource:Le,container:Ye,viewport:tt}){v0(this,Us);v0(this,jo,Promise.withResolvers());v0(this,Wa,null);v0(this,Rc,!1);v0(this,Tc,!!((Lp=globalThis.FontInspector)!=null&&Lp.enabled));v0(this,N2,null);v0(this,Qs,null);v0(this,Bc,0);v0(this,Oc,0);v0(this,D2,null);v0(this,X1,null);v0(this,$1,0);v0(this,Fo,0);v0(this,K1,Object.create(null));v0(this,Nc,[]);v0(this,q1,null);v0(this,P2,[]);v0(this,Dc,new WeakMap);v0(this,Pc,null);var At;if(Le instanceof ReadableStream)C0(this,q1,Le);else if(typeof Le=="object")C0(this,q1,new ReadableStream({start(xt){xt.enqueue(Le),xt.close()}}));else throw new Error('No "textContentSource" parameter specified.');C0(this,Wa,C0(this,X1,Ye)),C0(this,Fo,tt.scale*(globalThis.devicePixelRatio||1)),C0(this,$1,tt.rotation),C0(this,Qs,{div:null,properties:null,ctx:null});const{pageWidth:nt,pageHeight:ft,pageX:ht,pageY:gt}=tt.rawDims;C0(this,Pc,[1,0,0,-1,-ht,gt+ft]),C0(this,Oc,nt),C0(this,Bc,ft),y0(At=Xr,ii,Sh).call(At),setLayerDimensions(Ye,tt),Ht(this,jo).promise.finally(()=>{Ht(Xr,Y1).delete(this),C0(this,Qs,null),C0(this,K1,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:Le,isFirefox:Ye}=util_FeatureTest.platform;return shadow(this,"fontFamilyMap",new Map([["sans-serif",`${Le&&Ye?"Calibri, ":""}sans-serif`],["monospace",`${Le&&Ye?"Lucida Console, ":""}monospace`]]))}render(){const Le=()=>{Ht(this,D2).read().then(({value:Ye,done:tt})=>{if(tt){Ht(this,jo).resolve();return}Ht(this,N2)??C0(this,N2,Ye.lang),Object.assign(Ht(this,K1),Ye.styles),y0(this,Us,bh).call(this,Ye.items),Le()},Ht(this,jo).reject)};return C0(this,D2,Ht(this,q1).getReader()),Ht(Xr,Y1).add(this),Le(),Ht(this,jo).promise}update({viewport:Le,onBefore:Ye=null}){var ft;const tt=Le.scale*(globalThis.devicePixelRatio||1),nt=Le.rotation;if(nt!==Ht(this,$1)&&(Ye==null||Ye(),C0(this,$1,nt),setLayerDimensions(Ht(this,X1),{rotation:nt})),tt!==Ht(this,Fo)){Ye==null||Ye(),C0(this,Fo,tt);const ht={div:null,properties:null,ctx:y0(ft=Xr,ii,i3).call(ft,Ht(this,N2))};for(const gt of Ht(this,P2))ht.properties=Ht(this,Dc).get(gt),ht.div=gt,y0(this,Us,np).call(this,ht)}}cancel(){var Ye;const Le=new AbortException("TextLayer task cancelled.");(Ye=Ht(this,D2))==null||Ye.cancel(Le).catch(()=>{}),C0(this,D2,null),Ht(this,jo).reject(Le)}get textDivs(){return Ht(this,P2)}get textContentItemsStr(){return Ht(this,Nc)}static cleanup(){if(!(Ht(this,Y1).size>0)){Ht(this,L2).clear();for(const{canvas:Le}of Ht(this,_2).values())Le.remove();Ht(this,_2).clear()}}},jo=new WeakMap,Wa=new WeakMap,Rc=new WeakMap,Tc=new WeakMap,N2=new WeakMap,Qs=new WeakMap,Bc=new WeakMap,Oc=new WeakMap,D2=new WeakMap,X1=new WeakMap,$1=new WeakMap,Fo=new WeakMap,K1=new WeakMap,Nc=new WeakMap,q1=new WeakMap,P2=new WeakMap,Dc=new WeakMap,Pc=new WeakMap,L2=new WeakMap,_2=new WeakMap,Lc=new WeakMap,Qo=new WeakMap,Y1=new WeakMap,Us=new WeakSet,bh=function(Le){var nt,ft;if(Ht(this,Rc))return;(ft=Ht(this,Qs)).ctx??(ft.ctx=y0(nt=Xr,ii,i3).call(nt,Ht(this,N2)));const Ye=Ht(this,P2),tt=Ht(this,Nc);for(const ht of Le){if(Ye.length>MAX_TEXT_DIVS_TO_RENDER){warn$1("Ignoring additional textDivs for performance reasons."),C0(this,Rc,!0);return}if(ht.str===void 0){if(ht.type==="beginMarkedContentProps"||ht.type==="beginMarkedContent"){const gt=Ht(this,Wa);C0(this,Wa,document.createElement("span")),Ht(this,Wa).classList.add("markedContent"),ht.id!==null&&Ht(this,Wa).setAttribute("id",`${ht.id}`),gt.append(Ht(this,Wa))}else ht.type==="endMarkedContent"&&C0(this,Wa,Ht(this,Wa).parentNode);continue}tt.push(ht.str),y0(this,Us,Ih).call(this,ht)}},Ih=function(Le){var bt;const Ye=document.createElement("span"),tt={angle:0,canvasWidth:0,hasText:Le.str!=="",hasEOL:Le.hasEOL,fontSize:0};Ht(this,P2).push(Ye);const nt=Util.transform(Ht(this,Pc),Le.transform);let ft=Math.atan2(nt[1],nt[0]);const ht=Ht(this,K1)[Le.fontName];ht.vertical&&(ft+=Math.PI/2);let gt=Ht(this,Tc)&&ht.fontSubstitution||ht.fontFamily;gt=Xr.fontFamilyMap.get(gt)||gt;const At=Math.hypot(nt[2],nt[3]),xt=At*y0(bt=Xr,ii,wh).call(bt,gt,Ht(this,N2));let Et,yt;ft===0?(Et=nt[4],yt=nt[5]-xt):(Et=nt[4]+xt*Math.sin(ft),yt=nt[5]-xt*Math.cos(ft));const Ct="calc(var(--scale-factor)*",kt=Ye.style;Ht(this,Wa)===Ht(this,X1)?(kt.left=`${(100*Et/Ht(this,Oc)).toFixed(2)}%`,kt.top=`${(100*yt/Ht(this,Bc)).toFixed(2)}%`):(kt.left=`${Ct}${Et.toFixed(2)}px)`,kt.top=`${Ct}${yt.toFixed(2)}px)`),kt.fontSize=`${Ct}${(Ht(Xr,Qo)*At).toFixed(2)}px)`,kt.fontFamily=gt,tt.fontSize=At,Ye.setAttribute("role","presentation"),Ye.textContent=Le.str,Ye.dir=Le.dir,Ht(this,Tc)&&(Ye.dataset.fontName=ht.fontSubstitutionLoadedName||Le.fontName),ft!==0&&(tt.angle=ft*(180/Math.PI));let vt=!1;if(Le.str.length>1)vt=!0;else if(Le.str!==" "&&Le.transform[0]!==Le.transform[3]){const It=Math.abs(Le.transform[0]),wt=Math.abs(Le.transform[3]);It!==wt&&Math.max(It,wt)/Math.min(It,wt)>1.5&&(vt=!0)}if(vt&&(tt.canvasWidth=ht.vertical?Le.height:Le.width),Ht(this,Dc).set(Ye,tt),Ht(this,Qs).div=Ye,Ht(this,Qs).properties=tt,y0(this,Us,np).call(this,Ht(this,Qs)),tt.hasText&&Ht(this,Wa).append(Ye),tt.hasEOL){const It=document.createElement("br");It.setAttribute("role","presentation"),Ht(this,Wa).append(It)}},np=function(Le){var gt;const{div:Ye,properties:tt,ctx:nt}=Le,{style:ft}=Ye;let ht="";if(Ht(Xr,Qo)>1&&(ht=`scale(${1/Ht(Xr,Qo)})`),tt.canvasWidth!==0&&tt.hasText){const{fontFamily:At}=ft,{canvasWidth:xt,fontSize:Et}=tt;y0(gt=Xr,ii,rp).call(gt,nt,Et*Ht(this,Fo),At);const{width:yt}=nt.measureText(Ye.textContent);yt>0&&(ht=`scaleX(${xt*Ht(this,Fo)/yt}) ${ht}`)}tt.angle!==0&&(ht=`rotate(${tt.angle}deg) ${ht}`),ht.length>0&&(ft.transform=ht)},ii=new WeakSet,i3=function(Le=null){let Ye=Ht(this,_2).get(Le||(Le=""));if(!Ye){const tt=document.createElement("canvas");tt.className="hiddenCanvasElement",tt.lang=Le,document.body.append(tt),Ye=tt.getContext("2d",{alpha:!1,willReadFrequently:!0}),Ht(this,_2).set(Le,Ye),Ht(this,Lc).set(Ye,{size:0,family:""})}return Ye},rp=function(Le,Ye,tt){const nt=Ht(this,Lc).get(Le);Ye===nt.size&&tt===nt.family||(Le.font=`${Ye}px ${tt}`,nt.size=Ye,nt.family=tt)},Sh=function(){if(Ht(this,Qo)!==null)return;const Le=document.createElement("div");Le.style.opacity=0,Le.style.lineHeight=1,Le.style.fontSize="1px",Le.style.position="absolute",Le.textContent="X",document.body.append(Le),C0(this,Qo,Le.getBoundingClientRect().height),Le.remove()},wh=function(Le,Ye){const tt=Ht(this,L2).get(Le);if(tt)return tt;const nt=y0(this,ii,i3).call(this,Ye);nt.canvas.width=nt.canvas.height=DEFAULT_FONT_SIZE,y0(this,ii,rp).call(this,nt,DEFAULT_FONT_SIZE,Le);const ft=nt.measureText("");let ht=ft.fontBoundingBoxAscent,gt=Math.abs(ft.fontBoundingBoxDescent);if(ht){const Et=ht/(ht+gt);return Ht(this,L2).set(Le,Et),nt.canvas.width=nt.canvas.height=0,Et}nt.strokeStyle="red",nt.clearRect(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE),nt.strokeText("g",0,0);let At=nt.getImageData(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE).data;gt=0;for(let Et=At.length-1-3;Et>=0;Et-=4)if(At[Et]>0){gt=Math.ceil(Et/4/DEFAULT_FONT_SIZE);break}nt.clearRect(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE),nt.strokeText("A",0,DEFAULT_FONT_SIZE),At=nt.getImageData(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE).data,ht=0;for(let Et=0,yt=At.length;Et<yt;Et+=4)if(At[Et]>0){ht=DEFAULT_FONT_SIZE-Math.floor(Et/4/DEFAULT_FONT_SIZE);break}nt.canvas.width=nt.canvas.height=0;const xt=ht?ht/(ht+gt):DEFAULT_FONT_ASCENT;return Ht(this,L2).set(Le,xt),xt},v0(Xr,ii),v0(Xr,L2,new Map),v0(Xr,_2,new Map),v0(Xr,Lc,new WeakMap),v0(Xr,Qo,null),v0(Xr,Y1,new Set),Xr);class XfaText{static textContent(Le){const Ye=[],tt={items:Ye,styles:Object.create(null)};function nt(ft){var At;if(!ft)return;let ht=null;const gt=ft.name;if(gt==="#text")ht=ft.value;else if(XfaText.shouldBuildText(gt))(At=ft==null?void 0:ft.attributes)!=null&&At.textContent?ht=ft.attributes.textContent:ft.value&&(ht=ft.value);else return;if(ht!==null&&Ye.push({str:ht}),!!ft.children)for(const xt of ft.children)nt(xt)}return nt(Le),tt}static shouldBuildText(Le){return!(Le==="textarea"||Le==="input"||Le==="option"||Le==="select")}}const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=isNodeJS?NodeCanvasFactory:DOMCanvasFactory,DefaultCMapReaderFactory=isNodeJS?NodeCMapReaderFactory:DOMCMapReaderFactory,DefaultFilterFactory=isNodeJS?NodeFilterFactory:DOMFilterFactory,DefaultStandardFontDataFactory=isNodeJS?NodeStandardFontDataFactory:DOMStandardFontDataFactory;function getDocument(Be={}){typeof Be=="string"||Be instanceof URL?Be={url:Be}:(Be instanceof ArrayBuffer||ArrayBuffer.isView(Be))&&(Be={data:Be});const Le=new PDFDocumentLoadingTask,{docId:Ye}=Le,tt=Be.url?getUrlProp(Be.url):null,nt=Be.data?getDataProp(Be.data):null,ft=Be.httpHeaders||null,ht=Be.withCredentials===!0,gt=Be.password??null,At=Be.range instanceof PDFDataRangeTransport$1?Be.range:null,xt=Number.isInteger(Be.rangeChunkSize)&&Be.rangeChunkSize>0?Be.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let Et=Be.worker instanceof PDFWorker?Be.worker:null;const yt=Be.verbosity,Ct=typeof Be.docBaseUrl=="string"&&!isDataScheme(Be.docBaseUrl)?Be.docBaseUrl:null,kt=typeof Be.cMapUrl=="string"?Be.cMapUrl:null,vt=Be.cMapPacked!==!1,bt=Be.CMapReaderFactory||DefaultCMapReaderFactory,It=typeof Be.standardFontDataUrl=="string"?Be.standardFontDataUrl:null,wt=Be.StandardFontDataFactory||DefaultStandardFontDataFactory,Rt=Be.stopAtErrors!==!0,Tt=Number.isInteger(Be.maxImageSize)&&Be.maxImageSize>-1?Be.maxImageSize:-1,Bt=Be.isEvalSupported!==!1,Dt=typeof Be.isOffscreenCanvasSupported=="boolean"?Be.isOffscreenCanvasSupported:!isNodeJS,Pt=typeof Be.isChrome=="boolean"?Be.isChrome:!util_FeatureTest.platform.isFirefox&&typeof window<"u"&&!!(window!=null&&window.chrome),Nt=Number.isInteger(Be.canvasMaxAreaInBytes)?Be.canvasMaxAreaInBytes:-1,Lt=typeof Be.disableFontFace=="boolean"?Be.disableFontFace:isNodeJS,Wt=Be.fontExtraProperties===!0,$t=Be.enableXfa===!0,Kt=Be.ownerDocument||globalThis.document,Vt=Be.disableRange===!0,Ut=Be.disableStream===!0,_t=Be.disableAutoFetch===!0,Xt=Be.pdfBug===!0,Qt=Be.CanvasFactory||DefaultCanvasFactory,jt=Be.FilterFactory||DefaultFilterFactory,Gt=Be.enableHWA===!0,qt=At?At.length:Be.length??NaN,zt=typeof Be.useSystemFonts=="boolean"?Be.useSystemFonts:!isNodeJS&&!Lt,e0=typeof Be.useWorkerFetch=="boolean"?Be.useWorkerFetch:bt===DOMCMapReaderFactory&&wt===DOMStandardFontDataFactory&&kt&&It&&isValidFetchUrl(kt,document.baseURI)&&isValidFetchUrl(It,document.baseURI);Be.canvasFactory&&deprecated("`canvasFactory`-instance option, please use `CanvasFactory` instead."),Be.filterFactory&&deprecated("`filterFactory`-instance option, please use `FilterFactory` instead.");const s0=null;setVerbosityLevel(yt);const t0={canvasFactory:new Qt({ownerDocument:Kt,enableHWA:Gt}),filterFactory:new jt({docId:Ye,ownerDocument:Kt}),cMapReaderFactory:e0?null:new bt({baseUrl:kt,isCompressed:vt}),standardFontDataFactory:e0?null:new wt({baseUrl:It})};if(!Et){const n0={verbosity:yt,port:GlobalWorkerOptions.workerPort};Et=n0.port?PDFWorker.fromPort(n0):new PDFWorker(n0),Le._worker=Et}const l0={docId:Ye,apiVersion:"4.8.69",data:nt,password:gt,disableAutoFetch:_t,rangeChunkSize:xt,length:qt,docBaseUrl:Ct,enableXfa:$t,evaluatorOptions:{maxImageSize:Tt,disableFontFace:Lt,ignoreErrors:Rt,isEvalSupported:Bt,isOffscreenCanvasSupported:Dt,isChrome:Pt,canvasMaxAreaInBytes:Nt,fontExtraProperties:Wt,useSystemFonts:zt,cMapUrl:e0?kt:null,standardFontDataUrl:e0?It:null}},d0={disableFontFace:Lt,fontExtraProperties:Wt,ownerDocument:Kt,pdfBug:Xt,styleElement:s0,loadingParams:{disableAutoFetch:_t,enableXfa:$t}};return Et.promise.then(function(){if(Le.destroyed)throw new Error("Loading aborted");if(Et.destroyed)throw new Error("Worker was destroyed");const n0=Et.messageHandler.sendWithPromise("GetDocRequest",l0,nt?[nt.buffer]:null);let g0;if(At)g0=new PDFDataTransportStream(At,{disableRange:Vt,disableStream:Ut});else if(!nt){if(!tt)throw new Error("getDocument - no `url` parameter provided.");let A0;isNodeJS?A0=typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype&&isValidFetchUrl(tt)?PDFFetchStream:PDFNodeStream:A0=isValidFetchUrl(tt)?PDFFetchStream:PDFNetworkStream,g0=new A0({url:tt,length:qt,httpHeaders:ft,withCredentials:ht,rangeChunkSize:xt,disableRange:Vt,disableStream:Ut})}return n0.then(A0=>{if(Le.destroyed)throw new Error("Loading aborted");if(Et.destroyed)throw new Error("Worker was destroyed");const o0=new MessageHandler(Ye,A0,Et.port),r0=new WorkerTransport(o0,Le,g0,d0,t0);Le._transport=r0,o0.send("Ready",null)})}).catch(Le._capability.reject),Le}function getUrlProp(Be){if(Be instanceof URL)return Be.href;try{return new URL(Be,window.location).href}catch{if(isNodeJS&&typeof Be=="string")return Be}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(Be){if(isNodeJS&&typeof Buffer<"u"&&Be instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(Be instanceof Uint8Array&&Be.byteLength===Be.buffer.byteLength)return Be;if(typeof Be=="string")return stringToBytes(Be);if(Be instanceof ArrayBuffer||ArrayBuffer.isView(Be)||typeof Be=="object"&&!isNaN(Be==null?void 0:Be.length))return new Uint8Array(Be);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function isRefProxy(Be){return typeof Be=="object"&&Number.isInteger(Be==null?void 0:Be.num)&&Be.num>=0&&Number.isInteger(Be==null?void 0:Be.gen)&&Be.gen>=0}const od=class od{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${Va(od,sd)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var Le,Ye,tt;this.destroyed=!0;try{(Le=this._worker)!=null&&Le.port&&(this._worker._pendingDestroy=!0),await((Ye=this._transport)==null?void 0:Ye.destroy())}catch(nt){throw(tt=this._worker)!=null&&tt.port&&delete this._worker._pendingDestroy,nt}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};sd=new WeakMap,v0(od,sd,0);let PDFDocumentLoadingTask=od,PDFDataRangeTransport$1=class{constructor(Le,Ye,tt=!1,nt=null){this.length=Le,this.initialData=Ye,this.progressiveDone=tt,this.contentDispositionFilename=nt,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(Le){this._rangeListeners.push(Le)}addProgressListener(Le){this._progressListeners.push(Le)}addProgressiveReadListener(Le){this._progressiveReadListeners.push(Le)}addProgressiveDoneListener(Le){this._progressiveDoneListeners.push(Le)}onDataRange(Le,Ye){for(const tt of this._rangeListeners)tt(Le,Ye)}onDataProgress(Le,Ye){this._readyCapability.promise.then(()=>{for(const tt of this._progressListeners)tt(Le,Ye)})}onDataProgressiveRead(Le){this._readyCapability.promise.then(()=>{for(const Ye of this._progressiveReadListeners)Ye(Le)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const Le of this._progressiveDoneListeners)Le()})}transportReady(){this._readyCapability.resolve()}requestDataRange(Le,Ye){unreachable$1("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}};class PDFDocumentProxy{constructor(Le,Ye){this._pdfInfo=Le,this._transport=Ye}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(Le){return this._transport.getPage(Le)}getPageIndex(Le){return this._transport.getPageIndex(Le)}getDestinations(){return this._transport.getDestinations()}getDestination(Le){return this._transport.getDestination(Le)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:Le="display"}={}){const{renderingIntent:Ye}=this._transport.getRenderingIntent(Le);return this._transport.getOptionalContentConfig(Ye)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(Le=!1){return this._transport.startCleanup(Le||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(Le){return this._transport.cachedPageNumber(Le)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class PDFPageProxy{constructor(Le,Ye,tt,nt=!1){v0(this,ki);v0(this,Uo,null);v0(this,Vs,!1);this._pageIndex=Le,this._pageInfo=Ye,this._transport=tt,this._stats=nt?new StatTimer:null,this._pdfBug=nt,this.commonObjs=tt.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:Le,rotation:Ye=this.rotate,offsetX:tt=0,offsetY:nt=0,dontFlip:ft=!1}={}){return new PageViewport({viewBox:this.view,scale:Le,rotation:Ye,offsetX:tt,offsetY:nt,dontFlip:ft})}getAnnotations({intent:Le="display"}={}){const{renderingIntent:Ye}=this._transport.getRenderingIntent(Le);return this._transport.getAnnotations(this._pageIndex,Ye)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var Le;return((Le=this._transport._htmlForXfa)==null?void 0:Le.children[this._pageIndex])||null}render({canvasContext:Le,viewport:Ye,intent:tt="display",annotationMode:nt=AnnotationMode.ENABLE,transform:ft=null,background:ht=null,optionalContentConfigPromise:gt=null,annotationCanvasMap:At=null,pageColors:xt=null,printAnnotationStorage:Et=null,isEditing:yt=!1}){var Bt,Dt;(Bt=this._stats)==null||Bt.time("Overall");const Ct=this._transport.getRenderingIntent(tt,nt,Et,yt),{renderingIntent:kt,cacheKey:vt}=Ct;C0(this,Vs,!1),y0(this,ki,s3).call(this),gt||(gt=this._transport.getOptionalContentConfig(kt));let bt=this._intentStates.get(vt);bt||(bt=Object.create(null),this._intentStates.set(vt,bt)),bt.streamReaderCancelTimeout&&(clearTimeout(bt.streamReaderCancelTimeout),bt.streamReaderCancelTimeout=null);const It=!!(kt&RenderingIntentFlag.PRINT);bt.displayReadyCapability||(bt.displayReadyCapability=Promise.withResolvers(),bt.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(Dt=this._stats)==null||Dt.time("Page Request"),this._pumpOperatorList(Ct));const wt=Pt=>{var Nt;bt.renderTasks.delete(Rt),(this._maybeCleanupAfterRender||It)&&C0(this,Vs,!0),y0(this,ki,ql).call(this,!It),Pt?(Rt.capability.reject(Pt),this._abortOperatorList({intentState:bt,reason:Pt instanceof Error?Pt:new Error(Pt)})):Rt.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(Nt=globalThis.Stats)!=null&&Nt.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},Rt=new InternalRenderTask({callback:wt,params:{canvasContext:Le,viewport:Ye,transform:ft,background:ht},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:At,operatorList:bt.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!It,pdfBug:this._pdfBug,pageColors:xt});(bt.renderTasks||(bt.renderTasks=new Set)).add(Rt);const Tt=Rt.task;return Promise.all([bt.displayReadyCapability.promise,gt]).then(([Pt,Nt])=>{var Lt;if(this.destroyed){wt();return}if((Lt=this._stats)==null||Lt.time("Rendering"),!(Nt.renderingIntent&kt))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");Rt.initializeGraphics({transparency:Pt,optionalContentConfig:Nt}),Rt.operatorListChanged()}).catch(wt),Tt}getOperatorList({intent:Le="display",annotationMode:Ye=AnnotationMode.ENABLE,printAnnotationStorage:tt=null,isEditing:nt=!1}={}){var xt;function ft(){gt.operatorList.lastChunk&&(gt.opListReadCapability.resolve(gt.operatorList),gt.renderTasks.delete(At))}const ht=this._transport.getRenderingIntent(Le,Ye,tt,nt,!0);let gt=this._intentStates.get(ht.cacheKey);gt||(gt=Object.create(null),this._intentStates.set(ht.cacheKey,gt));let At;return gt.opListReadCapability||(At=Object.create(null),At.operatorListChanged=ft,gt.opListReadCapability=Promise.withResolvers(),(gt.renderTasks||(gt.renderTasks=new Set)).add(At),gt.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(xt=this._stats)==null||xt.time("Page Request"),this._pumpOperatorList(ht)),gt.opListReadCapability.promise}streamTextContent({includeMarkedContent:Le=!1,disableNormalization:Ye=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:Le===!0,disableNormalization:Ye===!0},{highWaterMark:100,size(nt){return nt.items.length}})}getTextContent(Le={}){if(this._transport._htmlForXfa)return this.getXfa().then(tt=>XfaText.textContent(tt));const Ye=this.streamTextContent(Le);return new Promise(function(tt,nt){function ft(){ht.read().then(function({value:At,done:xt}){if(xt){tt(gt);return}gt.lang??(gt.lang=At.lang),Object.assign(gt.styles,At.styles),gt.items.push(...At.items),ft()},nt)}const ht=Ye.getReader(),gt={items:[],styles:Object.create(null),lang:null};ft()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const Le=[];for(const Ye of this._intentStates.values())if(this._abortOperatorList({intentState:Ye,reason:new Error("Page was destroyed."),force:!0}),!Ye.opListReadCapability)for(const tt of Ye.renderTasks)Le.push(tt.completed),tt.cancel();return this.objs.clear(),C0(this,Vs,!1),y0(this,ki,s3).call(this),Promise.all(Le)}cleanup(Le=!1){C0(this,Vs,!0);const Ye=y0(this,ki,ql).call(this,!1);return Le&&Ye&&this._stats&&(this._stats=new StatTimer),Ye}_startRenderPage(Le,Ye){var nt,ft;const tt=this._intentStates.get(Ye);tt&&((nt=this._stats)==null||nt.timeEnd("Page Request"),(ft=tt.displayReadyCapability)==null||ft.resolve(Le))}_renderPageChunk(Le,Ye){for(let tt=0,nt=Le.length;tt<nt;tt++)Ye.operatorList.fnArray.push(Le.fnArray[tt]),Ye.operatorList.argsArray.push(Le.argsArray[tt]);Ye.operatorList.lastChunk=Le.lastChunk,Ye.operatorList.separateAnnots=Le.separateAnnots;for(const tt of Ye.renderTasks)tt.operatorListChanged();Le.lastChunk&&y0(this,ki,ql).call(this,!0)}_pumpOperatorList({renderingIntent:Le,cacheKey:Ye,annotationStorageSerializable:tt,modifiedIds:nt}){const{map:ft,transfer:ht}=tt,At=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:Le,cacheKey:Ye,annotationStorage:ft,modifiedIds:nt},ht).getReader(),xt=this._intentStates.get(Ye);xt.streamReader=At;const Et=()=>{At.read().then(({value:yt,done:Ct})=>{if(Ct){xt.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(yt,xt),Et())},yt=>{if(xt.streamReader=null,!this._transport.destroyed){if(xt.operatorList){xt.operatorList.lastChunk=!0;for(const Ct of xt.renderTasks)Ct.operatorListChanged();y0(this,ki,ql).call(this,!0)}if(xt.displayReadyCapability)xt.displayReadyCapability.reject(yt);else if(xt.opListReadCapability)xt.opListReadCapability.reject(yt);else throw yt}})};Et()}_abortOperatorList({intentState:Le,reason:Ye,force:tt=!1}){if(Le.streamReader){if(Le.streamReaderCancelTimeout&&(clearTimeout(Le.streamReaderCancelTimeout),Le.streamReaderCancelTimeout=null),!tt){if(Le.renderTasks.size>0)return;if(Ye instanceof RenderingCancelledException){let nt=RENDERING_CANCELLED_TIMEOUT;Ye.extraDelay>0&&Ye.extraDelay<1e3&&(nt+=Ye.extraDelay),Le.streamReaderCancelTimeout=setTimeout(()=>{Le.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:Le,reason:Ye,force:!0})},nt);return}}if(Le.streamReader.cancel(new AbortException(Ye.message)).catch(()=>{}),Le.streamReader=null,!this._transport.destroyed){for(const[nt,ft]of this._intentStates)if(ft===Le){this._intentStates.delete(nt);break}this.cleanup()}}}get stats(){return this._stats}}Uo=new WeakMap,Vs=new WeakMap,ki=new WeakSet,ql=function(Le=!1){if(y0(this,ki,s3).call(this),!Ht(this,Vs)||this.destroyed)return!1;if(Le)return C0(this,Uo,setTimeout(()=>{C0(this,Uo,null),y0(this,ki,ql).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:Ye,operatorList:tt}of this._intentStates.values())if(Ye.size>0||!tt.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),C0(this,Vs,!1),!0},s3=function(){Ht(this,Uo)&&(clearTimeout(Ht(this,Uo)),C0(this,Uo,null))};class LoopbackPort{constructor(){v0(this,Hs,new Map);v0(this,ld,Promise.resolve())}postMessage(Le,Ye){const tt={data:structuredClone(Le,Ye?{transfer:Ye}:null)};Ht(this,ld).then(()=>{for(const[nt]of Ht(this,Hs))nt.call(this,tt)})}addEventListener(Le,Ye,tt=null){let nt=null;if((tt==null?void 0:tt.signal)instanceof AbortSignal){const{signal:ft}=tt;if(ft.aborted){warn$1("LoopbackPort - cannot use an `aborted` signal.");return}const ht=()=>this.removeEventListener(Le,Ye);nt=()=>ft.removeEventListener("abort",ht),ft.addEventListener("abort",ht)}Ht(this,Hs).set(Ye,nt)}removeEventListener(Le,Ye){const tt=Ht(this,Hs).get(Ye);tt==null||tt(),Ht(this,Hs).delete(Ye)}terminate(){for(const[,Le]of Ht(this,Hs))Le==null||Le();Ht(this,Hs).clear()}}Hs=new WeakMap,ld=new WeakMap;const jr=class jr{constructor({name:Le=null,port:Ye=null,verbosity:tt=getVerbosityLevel()}={}){v0(this,Z1);var nt;if(this.name=Le,this.destroyed=!1,this.verbosity=tt,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,Ye){if((nt=Ht(jr,j2))!=null&&nt.has(Ye))throw new Error("Cannot use more than one PDFWorker per port.");(Ht(jr,j2)||C0(jr,j2,new WeakMap)).set(Ye,this),this._initializeFromPort(Ye);return}this._initialize()}get promise(){return isNodeJS?Promise.all([NodePackages.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(Le){this._port=Le,this._messageHandler=new MessageHandler("main","worker",Le),this._messageHandler.on("ready",function(){}),y0(this,Z1,o3).call(this)}_initialize(){if(Ht(jr,M2)||Ht(jr,J1,l3)){this._setupFakeWorker();return}let{workerSrc:Le}=jr;try{jr._isSameOrigin(window.location.href,Le)||(Le=jr._createCDNWrapper(new URL(Le,window.location).href));const Ye=new Worker(Le,{type:"module"}),tt=new MessageHandler("main","worker",Ye),nt=()=>{ft.abort(),tt.destroy(),Ye.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},ft=new AbortController;Ye.addEventListener("error",()=>{this._webWorker||nt()},{signal:ft.signal}),tt.on("test",gt=>{if(ft.abort(),this.destroyed||!gt){nt();return}this._messageHandler=tt,this._port=Ye,this._webWorker=Ye,y0(this,Z1,o3).call(this)}),tt.on("ready",gt=>{if(ft.abort(),this.destroyed){nt();return}try{ht()}catch{this._setupFakeWorker()}});const ht=()=>{const gt=new Uint8Array;tt.send("test",gt,[gt.buffer])};ht();return}catch{info("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){Ht(jr,M2)||(warn$1("Setting up fake worker."),C0(jr,M2,!0)),jr._setupFakeWorkerGlobal.then(Le=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const Ye=new LoopbackPort;this._port=Ye;const tt=`fake${Va(jr,cd)._++}`,nt=new MessageHandler(tt+"_worker",tt,Ye);Le.setup(nt,Ye),this._messageHandler=new MessageHandler(tt,tt+"_worker",Ye),y0(this,Z1,o3).call(this)}).catch(Le=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${Le.message}".`))})}destroy(){var Le;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(Le=Ht(jr,j2))==null||Le.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(Le){var tt;if(!(Le!=null&&Le.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const Ye=(tt=Ht(this,j2))==null?void 0:tt.get(Le.port);if(Ye){if(Ye._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return Ye}return new jr(Le)}static get workerSrc(){if(GlobalWorkerOptions.workerSrc)return GlobalWorkerOptions.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return shadow(this,"_setupFakeWorkerGlobal",(async()=>Ht(this,J1,l3)?Ht(this,J1,l3):(await import(this.workerSrc)).WorkerMessageHandler)())}};cd=new WeakMap,M2=new WeakMap,j2=new WeakMap,Z1=new WeakSet,o3=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},J1=new WeakSet,l3=function(){var Le;try{return((Le=globalThis.pdfjsWorker)==null?void 0:Le.WorkerMessageHandler)||null}catch{return null}},v0(jr,J1),v0(jr,cd,0),v0(jr,M2,!1),v0(jr,j2),isNodeJS&&(C0(jr,M2,!0),GlobalWorkerOptions.workerSrc||(GlobalWorkerOptions.workerSrc="./pdf.worker.mjs")),jr._isSameOrigin=(Le,Ye)=>{let tt;try{if(tt=new URL(Le),!tt.origin||tt.origin==="null")return!1}catch{return!1}const nt=new URL(Ye,tt);return tt.origin===nt.origin},jr._createCDNWrapper=Le=>{const Ye=`await import("${Le}");`;return URL.createObjectURL(new Blob([Ye],{type:"text/javascript"}))};let PDFWorker=jr;class WorkerTransport{constructor(Le,Ye,tt,nt,ft){v0(this,F2);v0(this,Gs,new Map);v0(this,gs,new Map);v0(this,el,new Map);v0(this,tl,new Map);v0(this,As,null);this.messageHandler=Le,this.loadingTask=Ye,this.commonObjs=new PDFObjects,this.fontLoader=new FontLoader({ownerDocument:nt.ownerDocument,styleElement:nt.styleElement}),this.loadingParams=nt.loadingParams,this._params=nt,this.canvasFactory=ft.canvasFactory,this.filterFactory=ft.filterFactory,this.cMapReaderFactory=ft.cMapReaderFactory,this.standardFontDataFactory=ft.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=tt,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return shadow(this,"annotationStorage",new AnnotationStorage)}getRenderingIntent(Le,Ye=AnnotationMode.ENABLE,tt=null,nt=!1,ft=!1){let ht=RenderingIntentFlag.DISPLAY,gt=SerializableEmpty;switch(Le){case"any":ht=RenderingIntentFlag.ANY;break;case"display":break;case"print":ht=RenderingIntentFlag.PRINT;break;default:warn$1(`getRenderingIntent - invalid intent: ${Le}`)}const At=ht&RenderingIntentFlag.PRINT&&tt instanceof PrintAnnotationStorage?tt:this.annotationStorage;switch(Ye){case AnnotationMode.DISABLE:ht+=RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case AnnotationMode.ENABLE:break;case AnnotationMode.ENABLE_FORMS:ht+=RenderingIntentFlag.ANNOTATIONS_FORMS;break;case AnnotationMode.ENABLE_STORAGE:ht+=RenderingIntentFlag.ANNOTATIONS_STORAGE,gt=At.serializable;break;default:warn$1(`getRenderingIntent - invalid annotationMode: ${Ye}`)}nt&&(ht+=RenderingIntentFlag.IS_EDITING),ft&&(ht+=RenderingIntentFlag.OPLIST);const{ids:xt,hash:Et}=At.modifiedIds,yt=[ht,gt.hash,Et];return{renderingIntent:ht,cacheKey:yt.join("_"),annotationStorageSerializable:gt,modifiedIds:xt}}destroy(){var tt;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(tt=Ht(this,As))==null||tt.reject(new Error("Worker was destroyed during onPassword callback"));const Le=[];for(const nt of Ht(this,gs).values())Le.push(nt._destroy());Ht(this,gs).clear(),Ht(this,el).clear(),Ht(this,tl).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const Ye=this.messageHandler.sendWithPromise("Terminate",null);return Le.push(Ye),Promise.all(Le).then(()=>{var nt;this.commonObjs.clear(),this.fontLoader.clear(),Ht(this,Gs).clear(),this.filterFactory.destroy(),TextLayer$1.cleanup(),(nt=this._networkStream)==null||nt.cancelAllRequests(new AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:Le,loadingTask:Ye}=this;Le.on("GetReader",(tt,nt)=>{assert(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=ft=>{this._lastProgress={loaded:ft.loaded,total:ft.total}},nt.onPull=()=>{this._fullReader.read().then(function({value:ft,done:ht}){if(ht){nt.close();return}assert(ft instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),nt.enqueue(new Uint8Array(ft),1,[ft])}).catch(ft=>{nt.error(ft)})},nt.onCancel=ft=>{this._fullReader.cancel(ft),nt.ready.catch(ht=>{if(!this.destroyed)throw ht})}}),Le.on("ReaderHeadersReady",async tt=>{var gt;await this._fullReader.headersReady;const{isStreamingSupported:nt,isRangeSupported:ft,contentLength:ht}=this._fullReader;return(!nt||!ft)&&(this._lastProgress&&((gt=Ye.onProgress)==null||gt.call(Ye,this._lastProgress)),this._fullReader.onProgress=At=>{var xt;(xt=Ye.onProgress)==null||xt.call(Ye,{loaded:At.loaded,total:At.total})}),{isStreamingSupported:nt,isRangeSupported:ft,contentLength:ht}}),Le.on("GetRangeReader",(tt,nt)=>{assert(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const ft=this._networkStream.getRangeReader(tt.begin,tt.end);if(!ft){nt.close();return}nt.onPull=()=>{ft.read().then(function({value:ht,done:gt}){if(gt){nt.close();return}assert(ht instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),nt.enqueue(new Uint8Array(ht),1,[ht])}).catch(ht=>{nt.error(ht)})},nt.onCancel=ht=>{ft.cancel(ht),nt.ready.catch(gt=>{if(!this.destroyed)throw gt})}}),Le.on("GetDoc",({pdfInfo:tt})=>{this._numPages=tt.numPages,this._htmlForXfa=tt.htmlForXfa,delete tt.htmlForXfa,Ye._capability.resolve(new PDFDocumentProxy(tt,this))}),Le.on("DocException",function(tt){let nt;switch(tt.name){case"PasswordException":nt=new PasswordException(tt.message,tt.code);break;case"InvalidPDFException":nt=new InvalidPDFException(tt.message);break;case"MissingPDFException":nt=new MissingPDFException(tt.message);break;case"UnexpectedResponseException":nt=new UnexpectedResponseException(tt.message,tt.status);break;case"UnknownErrorException":nt=new UnknownErrorException(tt.message,tt.details);break;default:unreachable$1("DocException - expected a valid Error.")}Ye._capability.reject(nt)}),Le.on("PasswordRequest",tt=>{if(C0(this,As,Promise.withResolvers()),Ye.onPassword){const nt=ft=>{ft instanceof Error?Ht(this,As).reject(ft):Ht(this,As).resolve({password:ft})};try{Ye.onPassword(nt,tt.code)}catch(ft){Ht(this,As).reject(ft)}}else Ht(this,As).reject(new PasswordException(tt.message,tt.code));return Ht(this,As).promise}),Le.on("DataLoaded",tt=>{var nt;(nt=Ye.onProgress)==null||nt.call(Ye,{loaded:tt.length,total:tt.length}),this.downloadInfoCapability.resolve(tt)}),Le.on("StartRenderPage",tt=>{if(this.destroyed)return;Ht(this,gs).get(tt.pageIndex)._startRenderPage(tt.transparency,tt.cacheKey)}),Le.on("commonobj",([tt,nt,ft])=>{var ht;if(this.destroyed||this.commonObjs.has(tt))return null;switch(nt){case"Font":const{disableFontFace:gt,fontExtraProperties:At,pdfBug:xt}=this._params;if("error"in ft){const kt=ft.error;warn$1(`Error during font loading: ${kt}`),this.commonObjs.resolve(tt,kt);break}const Et=xt&&((ht=globalThis.FontInspector)!=null&&ht.enabled)?(kt,vt)=>globalThis.FontInspector.fontAdded(kt,vt):null,yt=new FontFaceObject(ft,{disableFontFace:gt,inspectFont:Et});this.fontLoader.bind(yt).catch(()=>Le.sendWithPromise("FontFallback",{id:tt})).finally(()=>{!At&&yt.data&&(yt.data=null),this.commonObjs.resolve(tt,yt)});break;case"CopyLocalImage":const{imageRef:Ct}=ft;assert(Ct,"The imageRef must be defined.");for(const kt of Ht(this,gs).values())for(const[,vt]of kt.objs)if((vt==null?void 0:vt.ref)===Ct)return vt.dataLen?(this.commonObjs.resolve(tt,structuredClone(vt)),vt.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(tt,ft);break;default:throw new Error(`Got unknown common object type ${nt}`)}return null}),Le.on("obj",([tt,nt,ft,ht])=>{var At;if(this.destroyed)return;const gt=Ht(this,gs).get(nt);if(!gt.objs.has(tt)){if(gt._intentStates.size===0){(At=ht==null?void 0:ht.bitmap)==null||At.close();return}switch(ft){case"Image":gt.objs.resolve(tt,ht),(ht==null?void 0:ht.dataLen)>MAX_IMAGE_SIZE_TO_CACHE&&(gt._maybeCleanupAfterRender=!0);break;case"Pattern":gt.objs.resolve(tt,ht);break;default:throw new Error(`Got unknown object type ${ft}`)}}}),Le.on("DocProgress",tt=>{var nt;this.destroyed||(nt=Ye.onProgress)==null||nt.call(Ye,{loaded:tt.loaded,total:tt.total})}),Le.on("FetchBuiltInCMap",async tt=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(tt)}),Le.on("FetchStandardFontData",async tt=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(tt)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var tt;this.annotationStorage.size<=0&&warn$1("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:Le,transfer:Ye}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:Le,filename:((tt=this._fullReader)==null?void 0:tt.filename)??null},Ye).finally(()=>{this.annotationStorage.resetModified()})}getPage(Le){if(!Number.isInteger(Le)||Le<=0||Le>this._numPages)return Promise.reject(new Error("Invalid page request."));const Ye=Le-1,tt=Ht(this,el).get(Ye);if(tt)return tt;const nt=this.messageHandler.sendWithPromise("GetPage",{pageIndex:Ye}).then(ft=>{if(this.destroyed)throw new Error("Transport destroyed");ft.refStr&&Ht(this,tl).set(ft.refStr,Le);const ht=new PDFPageProxy(Ye,ft,this,this._params.pdfBug);return Ht(this,gs).set(Ye,ht),ht});return Ht(this,el).set(Ye,nt),nt}getPageIndex(Le){return isRefProxy(Le)?this.messageHandler.sendWithPromise("GetPageIndex",{num:Le.num,gen:Le.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(Le,Ye){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:Le,intent:Ye})}getFieldObjects(){return y0(this,F2,Uu).call(this,"GetFieldObjects")}hasJSActions(){return y0(this,F2,Uu).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(Le){return typeof Le!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:Le})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return y0(this,F2,Uu).call(this,"GetDocJSActions")}getPageJSActions(Le){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:Le})}getStructTree(Le){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:Le})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(Le){return y0(this,F2,Uu).call(this,"GetOptionalContentConfig").then(Ye=>new OptionalContentConfig(Ye,Le))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const Le="GetMetadata",Ye=Ht(this,Gs).get(Le);if(Ye)return Ye;const tt=this.messageHandler.sendWithPromise(Le,null).then(nt=>{var ft,ht;return{info:nt[0],metadata:nt[1]?new Metadata(nt[1]):null,contentDispositionFilename:((ft=this._fullReader)==null?void 0:ft.filename)??null,contentLength:((ht=this._fullReader)==null?void 0:ht.contentLength)??null}});return Ht(this,Gs).set(Le,tt),tt}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(Le=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const Ye of Ht(this,gs).values())if(!Ye.cleanup())throw new Error(`startCleanup: Page ${Ye.pageNumber} is currently rendering.`);this.commonObjs.clear(),Le||this.fontLoader.clear(),Ht(this,Gs).clear(),this.filterFactory.destroy(!0),TextLayer$1.cleanup()}}cachedPageNumber(Le){if(!isRefProxy(Le))return null;const Ye=Le.gen===0?`${Le.num}R`:`${Le.num}R${Le.gen}`;return Ht(this,tl).get(Ye)??null}}Gs=new WeakMap,gs=new WeakMap,el=new WeakMap,tl=new WeakMap,As=new WeakMap,F2=new WeakSet,Uu=function(Le,Ye=null){const tt=Ht(this,Gs).get(Le);if(tt)return tt;const nt=this.messageHandler.sendWithPromise(Le,Ye);return Ht(this,Gs).set(Le,nt),nt};const INITIAL_DATA=Symbol("INITIAL_DATA");class PDFObjects{constructor(){v0(this,_c);v0(this,Gi,Object.create(null))}get(Le,Ye=null){if(Ye){const nt=y0(this,_c,ap).call(this,Le);return nt.promise.then(()=>Ye(nt.data)),null}const tt=Ht(this,Gi)[Le];if(!tt||tt.data===INITIAL_DATA)throw new Error(`Requesting object that isn't resolved yet ${Le}.`);return tt.data}has(Le){const Ye=Ht(this,Gi)[Le];return!!Ye&&Ye.data!==INITIAL_DATA}resolve(Le,Ye=null){const tt=y0(this,_c,ap).call(this,Le);tt.data=Ye,tt.resolve()}clear(){var Le;for(const Ye in Ht(this,Gi)){const{data:tt}=Ht(this,Gi)[Ye];(Le=tt==null?void 0:tt.bitmap)==null||Le.close()}C0(this,Gi,Object.create(null))}*[Symbol.iterator](){for(const Le in Ht(this,Gi)){const{data:Ye}=Ht(this,Gi)[Le];Ye!==INITIAL_DATA&&(yield[Le,Ye])}}}Gi=new WeakMap,_c=new WeakSet,ap=function(Le){var Ye;return(Ye=Ht(this,Gi))[Le]||(Ye[Le]={...Promise.withResolvers(),data:INITIAL_DATA})};class RenderTask{constructor(Le){v0(this,Vo,null);C0(this,Vo,Le),this.onContinue=null}get promise(){return Ht(this,Vo).capability.promise}cancel(Le=0){Ht(this,Vo).cancel(null,Le)}get separateAnnots(){const{separateAnnots:Le}=Ht(this,Vo).operatorList;if(!Le)return!1;const{annotationCanvasMap:Ye}=Ht(this,Vo);return Le.form||Le.canvas&&(Ye==null?void 0:Ye.size)>0}}Vo=new WeakMap;const U2=class U2{constructor({callback:Le,params:Ye,objs:tt,commonObjs:nt,annotationCanvasMap:ft,operatorList:ht,pageIndex:gt,canvasFactory:At,filterFactory:xt,useRequestAnimationFrame:Et=!1,pdfBug:yt=!1,pageColors:Ct=null}){v0(this,Ho,null);this.callback=Le,this.params=Ye,this.objs=tt,this.commonObjs=nt,this.annotationCanvasMap=ft,this.operatorListIdx=null,this.operatorList=ht,this._pageIndex=gt,this.canvasFactory=At,this.filterFactory=xt,this._pdfBug=yt,this.pageColors=Ct,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=Et===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=Ye.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:Le=!1,optionalContentConfig:Ye}){var gt,At;if(this.cancelled)return;if(this._canvas){if(Ht(U2,Q2).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Ht(U2,Q2).add(this._canvas)}this._pdfBug&&((gt=globalThis.StepperManager)!=null&>.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:tt,viewport:nt,transform:ft,background:ht}=this.params;this.gfx=new CanvasGraphics(tt,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:Ye},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:ft,viewport:nt,transparency:Le,background:ht}),this.operatorListIdx=0,this.graphicsReady=!0,(At=this.graphicsReadyCallback)==null||At.call(this)}cancel(Le=null,Ye=0){var tt;this.running=!1,this.cancelled=!0,(tt=this.gfx)==null||tt.endDrawing(),Ht(this,Ho)&&(window.cancelAnimationFrame(Ht(this,Ho)),C0(this,Ho,null)),Ht(U2,Q2).delete(this._canvas),this.callback(Le||new RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,Ye))}operatorListChanged(){var Le;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(Le=this.stepper)==null||Le.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?C0(this,Ho,window.requestAnimationFrame(()=>{C0(this,Ho,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Ht(U2,Q2).delete(this._canvas),this.callback())))}};Ho=new WeakMap,Q2=new WeakMap,v0(U2,Q2,new WeakSet);let InternalRenderTask=U2;const version="4.8.69",build="3634dab10";function makeColorComp(Be){return Math.floor(Math.max(0,Math.min(1,Be))*255).toString(16).padStart(2,"0")}function scaleAndClamp(Be){return Math.max(0,Math.min(255,255*Be))}class ColorConverters{static CMYK_G([Le,Ye,tt,nt]){return["G",1-Math.min(1,.3*Le+.59*tt+.11*Ye+nt)]}static G_CMYK([Le]){return["CMYK",0,0,0,1-Le]}static G_RGB([Le]){return["RGB",Le,Le,Le]}static G_rgb([Le]){return Le=scaleAndClamp(Le),[Le,Le,Le]}static G_HTML([Le]){const Ye=makeColorComp(Le);return`#${Ye}${Ye}${Ye}`}static RGB_G([Le,Ye,tt]){return["G",.3*Le+.59*Ye+.11*tt]}static RGB_rgb(Le){return Le.map(scaleAndClamp)}static RGB_HTML(Le){return`#${Le.map(makeColorComp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([Le,Ye,tt,nt]){return["RGB",1-Math.min(1,Le+nt),1-Math.min(1,tt+nt),1-Math.min(1,Ye+nt)]}static CMYK_rgb([Le,Ye,tt,nt]){return[scaleAndClamp(1-Math.min(1,Le+nt)),scaleAndClamp(1-Math.min(1,tt+nt)),scaleAndClamp(1-Math.min(1,Ye+nt))]}static CMYK_HTML(Le){const Ye=this.CMYK_RGB(Le).slice(1);return this.RGB_HTML(Ye)}static RGB_CMYK([Le,Ye,tt]){const nt=1-Le,ft=1-Ye,ht=1-tt,gt=Math.min(nt,ft,ht);return["CMYK",nt,ft,ht,gt]}}class BaseSVGFactory{create(Le,Ye,tt=!1){if(Le<=0||Ye<=0)throw new Error("Invalid SVG dimensions");const nt=this._createSVG("svg:svg");return nt.setAttribute("version","1.1"),tt||(nt.setAttribute("width",`${Le}px`),nt.setAttribute("height",`${Ye}px`)),nt.setAttribute("preserveAspectRatio","none"),nt.setAttribute("viewBox",`0 0 ${Le} ${Ye}`),nt}createElement(Le){if(typeof Le!="string")throw new Error("Invalid SVG element type");return this._createSVG(Le)}_createSVG(Le){unreachable$1("Abstract method `_createSVG` called.")}}class DOMSVGFactory extends BaseSVGFactory{_createSVG(Le){return document.createElementNS(SVG_NS,Le)}}class XfaLayer{static setupStorage(Le,Ye,tt,nt,ft){const ht=nt.getValue(Ye,{value:null});switch(tt.name){case"textarea":if(ht.value!==null&&(Le.textContent=ht.value),ft==="print")break;Le.addEventListener("input",gt=>{nt.setValue(Ye,{value:gt.target.value})});break;case"input":if(tt.attributes.type==="radio"||tt.attributes.type==="checkbox"){if(ht.value===tt.attributes.xfaOn?Le.setAttribute("checked",!0):ht.value===tt.attributes.xfaOff&&Le.removeAttribute("checked"),ft==="print")break;Le.addEventListener("change",gt=>{nt.setValue(Ye,{value:gt.target.checked?gt.target.getAttribute("xfaOn"):gt.target.getAttribute("xfaOff")})})}else{if(ht.value!==null&&Le.setAttribute("value",ht.value),ft==="print")break;Le.addEventListener("input",gt=>{nt.setValue(Ye,{value:gt.target.value})})}break;case"select":if(ht.value!==null){Le.setAttribute("value",ht.value);for(const gt of tt.children)gt.attributes.value===ht.value?gt.attributes.selected=!0:gt.attributes.hasOwnProperty("selected")&&delete gt.attributes.selected}Le.addEventListener("input",gt=>{const At=gt.target.options,xt=At.selectedIndex===-1?"":At[At.selectedIndex].value;nt.setValue(Ye,{value:xt})});break}}static setAttributes({html:Le,element:Ye,storage:tt=null,intent:nt,linkService:ft}){const{attributes:ht}=Ye,gt=Le instanceof HTMLAnchorElement;ht.type==="radio"&&(ht.name=`${ht.name}-${nt}`);for(const[At,xt]of Object.entries(ht))if(xt!=null)switch(At){case"class":xt.length&&Le.setAttribute(At,xt.join(" "));break;case"dataId":break;case"id":Le.setAttribute("data-element-id",xt);break;case"style":Object.assign(Le.style,xt);break;case"textContent":Le.textContent=xt;break;default:(!gt||At!=="href"&&At!=="newWindow")&&Le.setAttribute(At,xt)}gt&&ft.addLinkAttributes(Le,ht.href,ht.newWindow),tt&&ht.dataId&&this.setupStorage(Le,ht.dataId,Ye,tt)}static render(Le){var yt,Ct;const Ye=Le.annotationStorage,tt=Le.linkService,nt=Le.xfaHtml,ft=Le.intent||"display",ht=document.createElement(nt.name);nt.attributes&&this.setAttributes({html:ht,element:nt,intent:ft,linkService:tt});const gt=ft!=="richText",At=Le.div;if(At.append(ht),Le.viewport){const kt=`matrix(${Le.viewport.transform.join(",")})`;At.style.transform=kt}gt&&At.setAttribute("class","xfaLayer xfaFont");const xt=[];if(nt.children.length===0){if(nt.value){const kt=document.createTextNode(nt.value);ht.append(kt),gt&&XfaText.shouldBuildText(nt.name)&&xt.push(kt)}return{textDivs:xt}}const Et=[[nt,-1,ht]];for(;Et.length>0;){const[kt,vt,bt]=Et.at(-1);if(vt+1===kt.children.length){Et.pop();continue}const It=kt.children[++Et.at(-1)[1]];if(It===null)continue;const{name:wt}=It;if(wt==="#text"){const Tt=document.createTextNode(It.value);xt.push(Tt),bt.append(Tt);continue}const Rt=(yt=It==null?void 0:It.attributes)!=null&&yt.xmlns?document.createElementNS(It.attributes.xmlns,wt):document.createElement(wt);if(bt.append(Rt),It.attributes&&this.setAttributes({html:Rt,element:It,storage:Ye,intent:ft,linkService:tt}),((Ct=It.children)==null?void 0:Ct.length)>0)Et.push([It,-1,Rt]);else if(It.value){const Tt=document.createTextNode(It.value);gt&&XfaText.shouldBuildText(wt)&&xt.push(Tt),Rt.append(Tt)}}for(const kt of At.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))kt.setAttribute("readOnly",!0);return{textDivs:xt}}static update(Le){const Ye=`matrix(${Le.viewport.transform.join(",")})`;Le.div.style.transform=Ye,Le.div.hidden=!1}}const DEFAULT_TAB_INDEX=1e3,annotation_layer_DEFAULT_FONT_SIZE=9,GetElementsByNameSet=new WeakSet;function getRectDims(Be){return{width:Be[2]-Be[0],height:Be[3]-Be[1]}}class AnnotationElementFactory{static create(Le){switch(Le.data.annotationType){case AnnotationType.LINK:return new LinkAnnotationElement(Le);case AnnotationType.TEXT:return new TextAnnotationElement(Le);case AnnotationType.WIDGET:switch(Le.data.fieldType){case"Tx":return new TextWidgetAnnotationElement(Le);case"Btn":return Le.data.radioButton?new RadioButtonWidgetAnnotationElement(Le):Le.data.checkBox?new CheckboxWidgetAnnotationElement(Le):new PushButtonWidgetAnnotationElement(Le);case"Ch":return new ChoiceWidgetAnnotationElement(Le);case"Sig":return new SignatureWidgetAnnotationElement(Le)}return new WidgetAnnotationElement(Le);case AnnotationType.POPUP:return new PopupAnnotationElement(Le);case AnnotationType.FREETEXT:return new FreeTextAnnotationElement(Le);case AnnotationType.LINE:return new LineAnnotationElement(Le);case AnnotationType.SQUARE:return new SquareAnnotationElement(Le);case AnnotationType.CIRCLE:return new CircleAnnotationElement(Le);case AnnotationType.POLYLINE:return new PolylineAnnotationElement(Le);case AnnotationType.CARET:return new CaretAnnotationElement(Le);case AnnotationType.INK:return new InkAnnotationElement(Le);case AnnotationType.POLYGON:return new PolygonAnnotationElement(Le);case AnnotationType.HIGHLIGHT:return new HighlightAnnotationElement(Le);case AnnotationType.UNDERLINE:return new UnderlineAnnotationElement(Le);case AnnotationType.SQUIGGLY:return new SquigglyAnnotationElement(Le);case AnnotationType.STRIKEOUT:return new StrikeOutAnnotationElement(Le);case AnnotationType.STAMP:return new StampAnnotationElement(Le);case AnnotationType.FILEATTACHMENT:return new FileAttachmentAnnotationElement(Le);default:return new AnnotationElement(Le)}}}const T3=class T3{constructor(Le,{isRenderable:Ye=!1,ignoreBorder:tt=!1,createQuadrilaterals:nt=!1}={}){v0(this,Mc);v0(this,V2,null);v0(this,nl,!1);v0(this,rl,null);this.isRenderable=Ye,this.data=Le.data,this.layer=Le.layer,this.linkService=Le.linkService,this.downloadManager=Le.downloadManager,this.imageResourcesPath=Le.imageResourcesPath,this.renderForms=Le.renderForms,this.svgFactory=Le.svgFactory,this.annotationStorage=Le.annotationStorage,this.enableScripting=Le.enableScripting,this.hasJSActions=Le.hasJSActions,this._fieldObjects=Le.fieldObjects,this.parent=Le.parent,Ye&&(this.container=this._createContainer(tt)),nt&&this._createQuadrilaterals()}static _hasPopupData({titleObj:Le,contentsObj:Ye,richText:tt}){return!!(Le!=null&&Le.str||Ye!=null&&Ye.str||tt!=null&&tt.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return T3._hasPopupData(this.data)}updateEdited(Le){var tt;if(!this.container)return;Ht(this,V2)||C0(this,V2,{rect:this.data.rect.slice(0)});const{rect:Ye}=Le;Ye&&y0(this,Mc,sp).call(this,Ye),(tt=Ht(this,rl))==null||tt.popup.updateEdited(Le)}resetEdited(){var Le;Ht(this,V2)&&(y0(this,Mc,sp).call(this,Ht(this,V2).rect),(Le=Ht(this,rl))==null||Le.popup.resetEdited(),C0(this,V2,null))}_createContainer(Le){const{data:Ye,parent:{page:tt,viewport:nt}}=this,ft=document.createElement("section");ft.setAttribute("data-annotation-id",Ye.id),this instanceof WidgetAnnotationElement||(ft.tabIndex=DEFAULT_TAB_INDEX);const{style:ht}=ft;if(ht.zIndex=this.parent.zIndex++,Ye.alternativeText&&(ft.title=Ye.alternativeText),Ye.noRotate&&ft.classList.add("norotate"),!Ye.rect||this instanceof PopupAnnotationElement){const{rotation:bt}=Ye;return!Ye.hasOwnCanvas&&bt!==0&&this.setRotation(bt,ft),ft}const{width:gt,height:At}=getRectDims(Ye.rect);if(!Le&&Ye.borderStyle.width>0){ht.borderWidth=`${Ye.borderStyle.width}px`;const bt=Ye.borderStyle.horizontalCornerRadius,It=Ye.borderStyle.verticalCornerRadius;if(bt>0||It>0){const Rt=`calc(${bt}px * var(--scale-factor)) / calc(${It}px * var(--scale-factor))`;ht.borderRadius=Rt}else if(this instanceof RadioButtonWidgetAnnotationElement){const Rt=`calc(${gt}px * var(--scale-factor)) / calc(${At}px * var(--scale-factor))`;ht.borderRadius=Rt}switch(Ye.borderStyle.style){case AnnotationBorderStyleType.SOLID:ht.borderStyle="solid";break;case AnnotationBorderStyleType.DASHED:ht.borderStyle="dashed";break;case AnnotationBorderStyleType.BEVELED:warn$1("Unimplemented border style: beveled");break;case AnnotationBorderStyleType.INSET:warn$1("Unimplemented border style: inset");break;case AnnotationBorderStyleType.UNDERLINE:ht.borderBottomStyle="solid";break}const wt=Ye.borderColor||null;wt?(C0(this,nl,!0),ht.borderColor=Util.makeHexColor(wt[0]|0,wt[1]|0,wt[2]|0)):ht.borderWidth=0}const xt=Util.normalizeRect([Ye.rect[0],tt.view[3]-Ye.rect[1]+tt.view[1],Ye.rect[2],tt.view[3]-Ye.rect[3]+tt.view[1]]),{pageWidth:Et,pageHeight:yt,pageX:Ct,pageY:kt}=nt.rawDims;ht.left=`${100*(xt[0]-Ct)/Et}%`,ht.top=`${100*(xt[1]-kt)/yt}%`;const{rotation:vt}=Ye;return Ye.hasOwnCanvas||vt===0?(ht.width=`${100*gt/Et}%`,ht.height=`${100*At/yt}%`):this.setRotation(vt,ft),ft}setRotation(Le,Ye=this.container){if(!this.data.rect)return;const{pageWidth:tt,pageHeight:nt}=this.parent.viewport.rawDims,{width:ft,height:ht}=getRectDims(this.data.rect);let gt,At;Le%180===0?(gt=100*ft/tt,At=100*ht/nt):(gt=100*ht/tt,At=100*ft/nt),Ye.style.width=`${gt}%`,Ye.style.height=`${At}%`,Ye.setAttribute("data-main-rotation",(360-Le)%360)}get _commonActions(){const Le=(Ye,tt,nt)=>{const ft=nt.detail[Ye],ht=ft[0],gt=ft.slice(1);nt.target.style[tt]=ColorConverters[`${ht}_HTML`](gt),this.annotationStorage.setValue(this.data.id,{[tt]:ColorConverters[`${ht}_rgb`](gt)})};return shadow(this,"_commonActions",{display:Ye=>{const{display:tt}=Ye.detail,nt=tt%2===1;this.container.style.visibility=nt?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:nt,noPrint:tt===1||tt===2})},print:Ye=>{this.annotationStorage.setValue(this.data.id,{noPrint:!Ye.detail.print})},hidden:Ye=>{const{hidden:tt}=Ye.detail;this.container.style.visibility=tt?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:tt,noView:tt})},focus:Ye=>{setTimeout(()=>Ye.target.focus({preventScroll:!1}),0)},userName:Ye=>{Ye.target.title=Ye.detail.userName},readonly:Ye=>{Ye.target.disabled=Ye.detail.readonly},required:Ye=>{this._setRequired(Ye.target,Ye.detail.required)},bgColor:Ye=>{Le("bgColor","backgroundColor",Ye)},fillColor:Ye=>{Le("fillColor","backgroundColor",Ye)},fgColor:Ye=>{Le("fgColor","color",Ye)},textColor:Ye=>{Le("textColor","color",Ye)},borderColor:Ye=>{Le("borderColor","borderColor",Ye)},strokeColor:Ye=>{Le("strokeColor","borderColor",Ye)},rotation:Ye=>{const tt=Ye.detail.rotation;this.setRotation(tt),this.annotationStorage.setValue(this.data.id,{rotation:tt})}})}_dispatchEventFromSandbox(Le,Ye){const tt=this._commonActions;for(const nt of Object.keys(Ye.detail)){const ft=Le[nt]||tt[nt];ft==null||ft(Ye)}}_setDefaultPropertiesFromJS(Le){if(!this.enableScripting)return;const Ye=this.annotationStorage.getRawValue(this.data.id);if(!Ye)return;const tt=this._commonActions;for(const[nt,ft]of Object.entries(Ye)){const ht=tt[nt];if(ht){const gt={detail:{[nt]:ft},target:Le};ht(gt),delete Ye[nt]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:Le}=this.data;if(!Le)return;const[Ye,tt,nt,ft]=this.data.rect.map(bt=>Math.fround(bt));if(Le.length===8){const[bt,It,wt,Rt]=Le.subarray(2,6);if(nt===bt&&ft===It&&Ye===wt&&tt===Rt)return}const{style:ht}=this.container;let gt;if(Ht(this,nl)){const{borderColor:bt,borderWidth:It}=ht;ht.borderWidth=0,gt=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${bt}" stroke-width="${It}">`],this.container.classList.add("hasBorder")}const At=nt-Ye,xt=ft-tt,{svgFactory:Et}=this,yt=Et.createElement("svg");yt.classList.add("quadrilateralsContainer"),yt.setAttribute("width",0),yt.setAttribute("height",0);const Ct=Et.createElement("defs");yt.append(Ct);const kt=Et.createElement("clipPath"),vt=`clippath_${this.data.id}`;kt.setAttribute("id",vt),kt.setAttribute("clipPathUnits","objectBoundingBox"),Ct.append(kt);for(let bt=2,It=Le.length;bt<It;bt+=8){const wt=Le[bt],Rt=Le[bt+1],Tt=Le[bt+2],Bt=Le[bt+3],Dt=Et.createElement("rect"),Pt=(Tt-Ye)/At,Nt=(ft-Rt)/xt,Lt=(wt-Tt)/At,Wt=(Rt-Bt)/xt;Dt.setAttribute("x",Pt),Dt.setAttribute("y",Nt),Dt.setAttribute("width",Lt),Dt.setAttribute("height",Wt),kt.append(Dt),gt==null||gt.push(`<rect vector-effect="non-scaling-stroke" x="${Pt}" y="${Nt}" width="${Lt}" height="${Wt}"/>`)}Ht(this,nl)&&(gt.push("</g></svg>')"),ht.backgroundImage=gt.join("")),this.container.append(yt),this.container.style.clipPath=`url(#${vt})`}_createPopup(){const{data:Le}=this,Ye=C0(this,rl,new PopupAnnotationElement({data:{color:Le.color,titleObj:Le.titleObj,modificationDate:Le.modificationDate,contentsObj:Le.contentsObj,richText:Le.richText,parentRect:Le.rect,borderStyle:0,id:`popup_${Le.id}`,rotation:Le.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(Ye.render())}render(){unreachable$1("Abstract method `AnnotationElement.render` called")}_getElementsByName(Le,Ye=null){const tt=[];if(this._fieldObjects){const nt=this._fieldObjects[Le];if(nt)for(const{page:ft,id:ht,exportValues:gt}of nt){if(ft===-1||ht===Ye)continue;const At=typeof gt=="string"?gt:null,xt=document.querySelector(`[data-element-id="${ht}"]`);if(xt&&!GetElementsByNameSet.has(xt)){warn$1(`_getElementsByName - element not allowed: ${ht}`);continue}tt.push({id:ht,exportValue:At,domElement:xt})}return tt}for(const nt of document.getElementsByName(Le)){const{exportValue:ft}=nt,ht=nt.getAttribute("data-element-id");ht!==Ye&&GetElementsByNameSet.has(nt)&&tt.push({id:ht,exportValue:ft,domElement:nt})}return tt}show(){var Le;this.container&&(this.container.hidden=!1),(Le=this.popup)==null||Le.maybeShow()}hide(){var Le;this.container&&(this.container.hidden=!0),(Le=this.popup)==null||Le.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const Le=this.getElementsToTriggerPopup();if(Array.isArray(Le))for(const Ye of Le)Ye.classList.add("highlightArea");else Le.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:Le,data:{id:Ye}}=this;this.container.addEventListener("dblclick",()=>{var tt;(tt=this.linkService.eventBus)==null||tt.dispatch("switchannotationeditormode",{source:this,mode:Le,editId:Ye})})}};V2=new WeakMap,nl=new WeakMap,rl=new WeakMap,Mc=new WeakSet,sp=function(Le){const{container:{style:Ye},data:{rect:tt,rotation:nt},parent:{viewport:{rawDims:{pageWidth:ft,pageHeight:ht,pageX:gt,pageY:At}}}}=this;tt==null||tt.splice(0,4,...Le);const{width:xt,height:Et}=getRectDims(Le);Ye.left=`${100*(Le[0]-gt)/ft}%`,Ye.top=`${100*(ht-Le[3]+At)/ht}%`,nt===0?(Ye.width=`${100*xt/ft}%`,Ye.height=`${100*Et/ht}%`):this.setRotation(nt)};let AnnotationElement=T3;class LinkAnnotationElement extends AnnotationElement{constructor(Ye,tt=null){super(Ye,{isRenderable:!0,ignoreBorder:!!(tt!=null&&tt.ignoreBorder),createQuadrilaterals:!0});v0(this,si);this.isTooltipOnly=Ye.data.isTooltipOnly}render(){const{data:Ye,linkService:tt}=this,nt=document.createElement("a");nt.setAttribute("data-element-id",Ye.id);let ft=!1;return Ye.url?(tt.addLinkAttributes(nt,Ye.url,Ye.newWindow),ft=!0):Ye.action?(this._bindNamedAction(nt,Ye.action),ft=!0):Ye.attachment?(y0(this,si,Rh).call(this,nt,Ye.attachment,Ye.attachmentDest),ft=!0):Ye.setOCGState?(y0(this,si,Th).call(this,nt,Ye.setOCGState),ft=!0):Ye.dest?(this._bindLink(nt,Ye.dest),ft=!0):(Ye.actions&&(Ye.actions.Action||Ye.actions["Mouse Up"]||Ye.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(nt,Ye),ft=!0),Ye.resetForm?(this._bindResetFormAction(nt,Ye.resetForm),ft=!0):this.isTooltipOnly&&!ft&&(this._bindLink(nt,""),ft=!0)),this.container.classList.add("linkAnnotation"),ft&&this.container.append(nt),this.container}_bindLink(Ye,tt){Ye.href=this.linkService.getDestinationHash(tt),Ye.onclick=()=>(tt&&this.linkService.goToDestination(tt),!1),(tt||tt==="")&&y0(this,si,b1).call(this)}_bindNamedAction(Ye,tt){Ye.href=this.linkService.getAnchorUrl(""),Ye.onclick=()=>(this.linkService.executeNamedAction(tt),!1),y0(this,si,b1).call(this)}_bindJSAction(Ye,tt){Ye.href=this.linkService.getAnchorUrl("");const nt=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const ft of Object.keys(tt.actions)){const ht=nt.get(ft);ht&&(Ye[ht]=()=>{var gt;return(gt=this.linkService.eventBus)==null||gt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:tt.id,name:ft}}),!1})}Ye.onclick||(Ye.onclick=()=>!1),y0(this,si,b1).call(this)}_bindResetFormAction(Ye,tt){const nt=Ye.onclick;if(nt||(Ye.href=this.linkService.getAnchorUrl("")),y0(this,si,b1).call(this),!this._fieldObjects){warn$1('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),nt||(Ye.onclick=()=>!1);return}Ye.onclick=()=>{var yt;nt==null||nt();const{fields:ft,refs:ht,include:gt}=tt,At=[];if(ft.length!==0||ht.length!==0){const Ct=new Set(ht);for(const kt of ft){const vt=this._fieldObjects[kt]||[];for(const{id:bt}of vt)Ct.add(bt)}for(const kt of Object.values(this._fieldObjects))for(const vt of kt)Ct.has(vt.id)===gt&&At.push(vt)}else for(const Ct of Object.values(this._fieldObjects))At.push(...Ct);const xt=this.annotationStorage,Et=[];for(const Ct of At){const{id:kt}=Ct;switch(Et.push(kt),Ct.type){case"text":{const bt=Ct.defaultValue||"";xt.setValue(kt,{value:bt});break}case"checkbox":case"radiobutton":{const bt=Ct.defaultValue===Ct.exportValues;xt.setValue(kt,{value:bt});break}case"combobox":case"listbox":{const bt=Ct.defaultValue||"";xt.setValue(kt,{value:bt});break}default:continue}const vt=document.querySelector(`[data-element-id="${kt}"]`);if(vt){if(!GetElementsByNameSet.has(vt)){warn$1(`_bindResetFormAction - element not allowed: ${kt}`);continue}}else continue;vt.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((yt=this.linkService.eventBus)==null||yt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:Et,name:"ResetForm"}})),!1}}}si=new WeakSet,b1=function(){this.container.setAttribute("data-internal-link","")},Rh=function(Ye,tt,nt=null){Ye.href=this.linkService.getAnchorUrl(""),tt.description&&(Ye.title=tt.description),Ye.onclick=()=>{var ft;return(ft=this.downloadManager)==null||ft.openOrDownloadData(tt.content,tt.filename,nt),!1},y0(this,si,b1).call(this)},Th=function(Ye,tt){Ye.href=this.linkService.getAnchorUrl(""),Ye.onclick=()=>(this.linkService.executeSetOCGState(tt),!1),y0(this,si,b1).call(this)};class TextAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const Le=document.createElement("img");return Le.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",Le.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),Le.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(Le),this.container}}class WidgetAnnotationElement extends AnnotationElement{render(){return this.container}showElementAndHideCanvas(Le){var Ye;this.data.hasOwnCanvas&&(((Ye=Le.previousSibling)==null?void 0:Ye.nodeName)==="CANVAS"&&(Le.previousSibling.hidden=!0),Le.hidden=!1)}_getKeyModifier(Le){return util_FeatureTest.platform.isMac?Le.metaKey:Le.ctrlKey}_setEventListener(Le,Ye,tt,nt,ft){tt.includes("mouse")?Le.addEventListener(tt,ht=>{var gt;(gt=this.linkService.eventBus)==null||gt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:nt,value:ft(ht),shift:ht.shiftKey,modifier:this._getKeyModifier(ht)}})}):Le.addEventListener(tt,ht=>{var gt;if(tt==="blur"){if(!Ye.focused||!ht.relatedTarget)return;Ye.focused=!1}else if(tt==="focus"){if(Ye.focused)return;Ye.focused=!0}ft&&((gt=this.linkService.eventBus)==null||gt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:nt,value:ft(ht)}}))})}_setEventListeners(Le,Ye,tt,nt){var ft,ht,gt;for(const[At,xt]of tt)(xt==="Action"||(ft=this.data.actions)!=null&&ft[xt])&&((xt==="Focus"||xt==="Blur")&&(Ye||(Ye={focused:!1})),this._setEventListener(Le,Ye,At,xt,nt),xt==="Focus"&&!((ht=this.data.actions)!=null&&ht.Blur)?this._setEventListener(Le,Ye,"blur","Blur",null):xt==="Blur"&&!((gt=this.data.actions)!=null&>.Focus)&&this._setEventListener(Le,Ye,"focus","Focus",null))}_setBackgroundColor(Le){const Ye=this.data.backgroundColor||null;Le.style.backgroundColor=Ye===null?"transparent":Util.makeHexColor(Ye[0],Ye[1],Ye[2])}_setTextStyle(Le){const Ye=["left","center","right"],{fontColor:tt}=this.data.defaultAppearanceData,nt=this.data.defaultAppearanceData.fontSize||annotation_layer_DEFAULT_FONT_SIZE,ft=Le.style;let ht;const gt=2,At=xt=>Math.round(10*xt)/10;if(this.data.multiLine){const xt=Math.abs(this.data.rect[3]-this.data.rect[1]-gt),Et=Math.round(xt/(LINE_FACTOR*nt))||1,yt=xt/Et;ht=Math.min(nt,At(yt/LINE_FACTOR))}else{const xt=Math.abs(this.data.rect[3]-this.data.rect[1]-gt);ht=Math.min(nt,At(xt/LINE_FACTOR))}ft.fontSize=`calc(${ht}px * var(--scale-factor))`,ft.color=Util.makeHexColor(tt[0],tt[1],tt[2]),this.data.textAlignment!==null&&(ft.textAlign=Ye[this.data.textAlignment])}_setRequired(Le,Ye){Ye?Le.setAttribute("required",!0):Le.removeAttribute("required"),Le.setAttribute("aria-required",Ye)}}class TextWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){const Ye=Le.renderForms||Le.data.hasOwnCanvas||!Le.data.hasAppearance&&!!Le.data.fieldValue;super(Le,{isRenderable:Ye})}setPropertyOnSiblings(Le,Ye,tt,nt){const ft=this.annotationStorage;for(const ht of this._getElementsByName(Le.name,Le.id))ht.domElement&&(ht.domElement[Ye]=tt),ft.setValue(ht.id,{[nt]:tt})}render(){var nt,ft;const Le=this.annotationStorage,Ye=this.data.id;this.container.classList.add("textWidgetAnnotation");let tt=null;if(this.renderForms){const ht=Le.getValue(Ye,{value:this.data.fieldValue});let gt=ht.value||"";const At=Le.getValue(Ye,{charLimit:this.data.maxLen}).charLimit;At&>.length>At&&(gt=gt.slice(0,At));let xt=ht.formattedValue||((nt=this.data.textContent)==null?void 0:nt.join(`
|
|
4040
4040
|
`))||null;xt&&this.data.comb&&(xt=xt.replaceAll(/\s+/g,""));const Et={userValue:gt,formattedValue:xt,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(tt=document.createElement("textarea"),tt.textContent=xt??gt,this.data.doNotScroll&&(tt.style.overflowY="hidden")):(tt=document.createElement("input"),tt.type="text",tt.setAttribute("value",xt??gt),this.data.doNotScroll&&(tt.style.overflowX="hidden")),this.data.hasOwnCanvas&&(tt.hidden=!0),GetElementsByNameSet.add(tt),tt.setAttribute("data-element-id",Ye),tt.disabled=this.data.readOnly,tt.name=this.data.fieldName,tt.tabIndex=DEFAULT_TAB_INDEX,this._setRequired(tt,this.data.required),At&&(tt.maxLength=At),tt.addEventListener("input",Ct=>{Le.setValue(Ye,{value:Ct.target.value}),this.setPropertyOnSiblings(tt,"value",Ct.target.value,"value"),Et.formattedValue=null}),tt.addEventListener("resetform",Ct=>{const kt=this.data.defaultFieldValue??"";tt.value=Et.userValue=kt,Et.formattedValue=null});let yt=Ct=>{const{formattedValue:kt}=Et;kt!=null&&(Ct.target.value=kt),Ct.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){tt.addEventListener("focus",kt=>{var bt;if(Et.focused)return;const{target:vt}=kt;Et.userValue&&(vt.value=Et.userValue),Et.lastCommittedValue=vt.value,Et.commitKey=1,(bt=this.data.actions)!=null&&bt.Focus||(Et.focused=!0)}),tt.addEventListener("updatefromsandbox",kt=>{this.showElementAndHideCanvas(kt.target);const vt={value(bt){Et.userValue=bt.detail.value??"",Le.setValue(Ye,{value:Et.userValue.toString()}),bt.target.value=Et.userValue},formattedValue(bt){const{formattedValue:It}=bt.detail;Et.formattedValue=It,It!=null&&bt.target!==document.activeElement&&(bt.target.value=It),Le.setValue(Ye,{formattedValue:It})},selRange(bt){bt.target.setSelectionRange(...bt.detail.selRange)},charLimit:bt=>{var Tt;const{charLimit:It}=bt.detail,{target:wt}=bt;if(It===0){wt.removeAttribute("maxLength");return}wt.setAttribute("maxLength",It);let Rt=Et.userValue;!Rt||Rt.length<=It||(Rt=Rt.slice(0,It),wt.value=Et.userValue=Rt,Le.setValue(Ye,{value:Rt}),(Tt=this.linkService.eventBus)==null||Tt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:Rt,willCommit:!0,commitKey:1,selStart:wt.selectionStart,selEnd:wt.selectionEnd}}))}};this._dispatchEventFromSandbox(vt,kt)}),tt.addEventListener("keydown",kt=>{var It;Et.commitKey=1;let vt=-1;if(kt.key==="Escape"?vt=0:kt.key==="Enter"&&!this.data.multiLine?vt=2:kt.key==="Tab"&&(Et.commitKey=3),vt===-1)return;const{value:bt}=kt.target;Et.lastCommittedValue!==bt&&(Et.lastCommittedValue=bt,Et.userValue=bt,(It=this.linkService.eventBus)==null||It.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:bt,willCommit:!0,commitKey:vt,selStart:kt.target.selectionStart,selEnd:kt.target.selectionEnd}}))});const Ct=yt;yt=null,tt.addEventListener("blur",kt=>{var bt,It;if(!Et.focused||!kt.relatedTarget)return;(bt=this.data.actions)!=null&&bt.Blur||(Et.focused=!1);const{value:vt}=kt.target;Et.userValue=vt,Et.lastCommittedValue!==vt&&((It=this.linkService.eventBus)==null||It.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:vt,willCommit:!0,commitKey:Et.commitKey,selStart:kt.target.selectionStart,selEnd:kt.target.selectionEnd}})),Ct(kt)}),(ft=this.data.actions)!=null&&ft.Keystroke&&tt.addEventListener("beforeinput",kt=>{var Dt;Et.lastCommittedValue=null;const{data:vt,target:bt}=kt,{value:It,selectionStart:wt,selectionEnd:Rt}=bt;let Tt=wt,Bt=Rt;switch(kt.inputType){case"deleteWordBackward":{const Pt=It.substring(0,wt).match(/\w*[^\w]*$/);Pt&&(Tt-=Pt[0].length);break}case"deleteWordForward":{const Pt=It.substring(wt).match(/^[^\w]*\w*/);Pt&&(Bt+=Pt[0].length);break}case"deleteContentBackward":wt===Rt&&(Tt-=1);break;case"deleteContentForward":wt===Rt&&(Bt+=1);break}kt.preventDefault(),(Dt=this.linkService.eventBus)==null||Dt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:It,change:vt||"",willCommit:!1,selStart:Tt,selEnd:Bt}})}),this._setEventListeners(tt,Et,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],kt=>kt.target.value)}if(yt&&tt.addEventListener("blur",yt),this.data.comb){const kt=(this.data.rect[2]-this.data.rect[0])/At;tt.classList.add("comb"),tt.style.letterSpacing=`calc(${kt}px * var(--scale-factor) - 1ch)`}}else tt=document.createElement("div"),tt.textContent=this.data.fieldValue,tt.style.verticalAlign="middle",tt.style.display="table-cell",this.data.hasOwnCanvas&&(tt.hidden=!0);return this._setTextStyle(tt),this._setBackgroundColor(tt),this._setDefaultPropertiesFromJS(tt),this.container.append(tt),this.container}}class SignatureWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){super(Le,{isRenderable:!!Le.data.hasOwnCanvas})}}class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){super(Le,{isRenderable:Le.renderForms})}render(){const Le=this.annotationStorage,Ye=this.data,tt=Ye.id;let nt=Le.getValue(tt,{value:Ye.exportValue===Ye.fieldValue}).value;typeof nt=="string"&&(nt=nt!=="Off",Le.setValue(tt,{value:nt})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const ft=document.createElement("input");return GetElementsByNameSet.add(ft),ft.setAttribute("data-element-id",tt),ft.disabled=Ye.readOnly,this._setRequired(ft,this.data.required),ft.type="checkbox",ft.name=Ye.fieldName,nt&&ft.setAttribute("checked",!0),ft.setAttribute("exportValue",Ye.exportValue),ft.tabIndex=DEFAULT_TAB_INDEX,ft.addEventListener("change",ht=>{const{name:gt,checked:At}=ht.target;for(const xt of this._getElementsByName(gt,tt)){const Et=At&&xt.exportValue===Ye.exportValue;xt.domElement&&(xt.domElement.checked=Et),Le.setValue(xt.id,{value:Et})}Le.setValue(tt,{value:At})}),ft.addEventListener("resetform",ht=>{const gt=Ye.defaultFieldValue||"Off";ht.target.checked=gt===Ye.exportValue}),this.enableScripting&&this.hasJSActions&&(ft.addEventListener("updatefromsandbox",ht=>{const gt={value(At){At.target.checked=At.detail.value!=="Off",Le.setValue(tt,{value:At.target.checked})}};this._dispatchEventFromSandbox(gt,ht)}),this._setEventListeners(ft,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],ht=>ht.target.checked)),this._setBackgroundColor(ft),this._setDefaultPropertiesFromJS(ft),this.container.append(ft),this.container}}class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){super(Le,{isRenderable:Le.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const Le=this.annotationStorage,Ye=this.data,tt=Ye.id;let nt=Le.getValue(tt,{value:Ye.fieldValue===Ye.buttonValue}).value;if(typeof nt=="string"&&(nt=nt!==Ye.buttonValue,Le.setValue(tt,{value:nt})),nt)for(const ht of this._getElementsByName(Ye.fieldName,tt))Le.setValue(ht.id,{value:!1});const ft=document.createElement("input");if(GetElementsByNameSet.add(ft),ft.setAttribute("data-element-id",tt),ft.disabled=Ye.readOnly,this._setRequired(ft,this.data.required),ft.type="radio",ft.name=Ye.fieldName,nt&&ft.setAttribute("checked",!0),ft.tabIndex=DEFAULT_TAB_INDEX,ft.addEventListener("change",ht=>{const{name:gt,checked:At}=ht.target;for(const xt of this._getElementsByName(gt,tt))Le.setValue(xt.id,{value:!1});Le.setValue(tt,{value:At})}),ft.addEventListener("resetform",ht=>{const gt=Ye.defaultFieldValue;ht.target.checked=gt!=null&>===Ye.buttonValue}),this.enableScripting&&this.hasJSActions){const ht=Ye.buttonValue;ft.addEventListener("updatefromsandbox",gt=>{const At={value:xt=>{const Et=ht===xt.detail.value;for(const yt of this._getElementsByName(xt.target.name)){const Ct=Et&&yt.id===tt;yt.domElement&&(yt.domElement.checked=Ct),Le.setValue(yt.id,{value:Ct})}}};this._dispatchEventFromSandbox(At,gt)}),this._setEventListeners(ft,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],gt=>gt.target.checked)}return this._setBackgroundColor(ft),this._setDefaultPropertiesFromJS(ft),this.container.append(ft),this.container}}class PushButtonWidgetAnnotationElement extends LinkAnnotationElement{constructor(Le){super(Le,{ignoreBorder:Le.data.hasAppearance})}render(){const Le=super.render();Le.classList.add("buttonWidgetAnnotation","pushButton");const Ye=Le.lastChild;return this.enableScripting&&this.hasJSActions&&Ye&&(this._setDefaultPropertiesFromJS(Ye),Ye.addEventListener("updatefromsandbox",tt=>{this._dispatchEventFromSandbox({},tt)})),Le}}class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){super(Le,{isRenderable:Le.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const Le=this.annotationStorage,Ye=this.data.id,tt=Le.getValue(Ye,{value:this.data.fieldValue}),nt=document.createElement("select");GetElementsByNameSet.add(nt),nt.setAttribute("data-element-id",Ye),nt.disabled=this.data.readOnly,this._setRequired(nt,this.data.required),nt.name=this.data.fieldName,nt.tabIndex=DEFAULT_TAB_INDEX;let ft=this.data.combo&&this.data.options.length>0;this.data.combo||(nt.size=this.data.options.length,this.data.multiSelect&&(nt.multiple=!0)),nt.addEventListener("resetform",Et=>{const yt=this.data.defaultFieldValue;for(const Ct of nt.options)Ct.selected=Ct.value===yt});for(const Et of this.data.options){const yt=document.createElement("option");yt.textContent=Et.displayValue,yt.value=Et.exportValue,tt.value.includes(Et.exportValue)&&(yt.setAttribute("selected",!0),ft=!1),nt.append(yt)}let ht=null;if(ft){const Et=document.createElement("option");Et.value=" ",Et.setAttribute("hidden",!0),Et.setAttribute("selected",!0),nt.prepend(Et),ht=()=>{Et.remove(),nt.removeEventListener("input",ht),ht=null},nt.addEventListener("input",ht)}const gt=Et=>{const yt=Et?"value":"textContent",{options:Ct,multiple:kt}=nt;return kt?Array.prototype.filter.call(Ct,vt=>vt.selected).map(vt=>vt[yt]):Ct.selectedIndex===-1?null:Ct[Ct.selectedIndex][yt]};let At=gt(!1);const xt=Et=>{const yt=Et.target.options;return Array.prototype.map.call(yt,Ct=>({displayValue:Ct.textContent,exportValue:Ct.value}))};return this.enableScripting&&this.hasJSActions?(nt.addEventListener("updatefromsandbox",Et=>{const yt={value(Ct){ht==null||ht();const kt=Ct.detail.value,vt=new Set(Array.isArray(kt)?kt:[kt]);for(const bt of nt.options)bt.selected=vt.has(bt.value);Le.setValue(Ye,{value:gt(!0)}),At=gt(!1)},multipleSelection(Ct){nt.multiple=!0},remove(Ct){const kt=nt.options,vt=Ct.detail.remove;kt[vt].selected=!1,nt.remove(vt),kt.length>0&&Array.prototype.findIndex.call(kt,It=>It.selected)===-1&&(kt[0].selected=!0),Le.setValue(Ye,{value:gt(!0),items:xt(Ct)}),At=gt(!1)},clear(Ct){for(;nt.length!==0;)nt.remove(0);Le.setValue(Ye,{value:null,items:[]}),At=gt(!1)},insert(Ct){const{index:kt,displayValue:vt,exportValue:bt}=Ct.detail.insert,It=nt.children[kt],wt=document.createElement("option");wt.textContent=vt,wt.value=bt,It?It.before(wt):nt.append(wt),Le.setValue(Ye,{value:gt(!0),items:xt(Ct)}),At=gt(!1)},items(Ct){const{items:kt}=Ct.detail;for(;nt.length!==0;)nt.remove(0);for(const vt of kt){const{displayValue:bt,exportValue:It}=vt,wt=document.createElement("option");wt.textContent=bt,wt.value=It,nt.append(wt)}nt.options.length>0&&(nt.options[0].selected=!0),Le.setValue(Ye,{value:gt(!0),items:xt(Ct)}),At=gt(!1)},indices(Ct){const kt=new Set(Ct.detail.indices);for(const vt of Ct.target.options)vt.selected=kt.has(vt.index);Le.setValue(Ye,{value:gt(!0)}),At=gt(!1)},editable(Ct){Ct.target.disabled=!Ct.detail.editable}};this._dispatchEventFromSandbox(yt,Et)}),nt.addEventListener("input",Et=>{var kt;const yt=gt(!0),Ct=gt(!1);Le.setValue(Ye,{value:yt}),Et.preventDefault(),(kt=this.linkService.eventBus)==null||kt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:At,change:Ct,changeEx:yt,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(nt,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Et=>Et.target.value)):nt.addEventListener("input",function(Et){Le.setValue(Ye,{value:gt(!0)})}),this.data.combo&&this._setTextStyle(nt),this._setBackgroundColor(nt),this._setDefaultPropertiesFromJS(nt),this.container.append(nt),this.container}}class PopupAnnotationElement extends AnnotationElement{constructor(Le){const{data:Ye,elements:tt}=Le;super(Le,{isRenderable:AnnotationElement._hasPopupData(Ye)}),this.elements=tt,this.popup=null}render(){this.container.classList.add("popupAnnotation");const Le=this.popup=new PopupElement({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),Ye=[];for(const tt of this.elements)tt.popup=Le,tt.container.ariaHasPopup="dialog",Ye.push(tt.data.id),tt.addHighlightArea();return this.container.setAttribute("aria-controls",Ye.map(tt=>`${AnnotationPrefix}${tt}`).join(",")),this.container}}class PopupElement{constructor({container:Le,color:Ye,elements:tt,titleObj:nt,modificationDate:ft,contentsObj:ht,richText:gt,parent:At,rect:xt,parentRect:Et,open:yt}){v0(this,wr);v0(this,al,y0(this,wr,Nh).bind(this));v0(this,ud,y0(this,wr,cp).bind(this));v0(this,dd,y0(this,wr,d3).bind(this));v0(this,il,y0(this,wr,u3).bind(this));v0(this,H2,null);v0(this,$r,null);v0(this,zs,null);v0(this,sl,null);v0(this,jc,null);v0(this,Fc,null);v0(this,ol,null);v0(this,Ws,!1);v0(this,zi,null);v0(this,Xs,null);v0(this,Qc,null);v0(this,$s,null);v0(this,Uc,null);v0(this,G2,null);v0(this,z2,!1);var Ct;C0(this,$r,Le),C0(this,Uc,nt),C0(this,zs,ht),C0(this,$s,gt),C0(this,Fc,At),C0(this,H2,Ye),C0(this,Qc,xt),C0(this,ol,Et),C0(this,jc,tt),C0(this,sl,PDFDateString.toDateObject(ft)),this.trigger=tt.flatMap(kt=>kt.getElementsToTriggerPopup());for(const kt of this.trigger)kt.addEventListener("click",Ht(this,il)),kt.addEventListener("mouseenter",Ht(this,dd)),kt.addEventListener("mouseleave",Ht(this,ud)),kt.classList.add("popupTriggerArea");for(const kt of tt)(Ct=kt.container)==null||Ct.addEventListener("keydown",Ht(this,al));Ht(this,$r).hidden=!0,yt&&y0(this,wr,u3).call(this)}render(){if(Ht(this,zi))return;const Le=C0(this,zi,document.createElement("div"));if(Le.className="popup",Ht(this,H2)){const ft=Le.style.outlineColor=Util.makeHexColor(...Ht(this,H2));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?Le.style.backgroundColor=`color-mix(in srgb, ${ft} 30%, white)`:Le.style.backgroundColor=Util.makeHexColor(...Ht(this,H2).map(gt=>Math.floor(.7*(255-gt)+gt)))}const Ye=document.createElement("span");Ye.className="header";const tt=document.createElement("h1");if(Ye.append(tt),{dir:tt.dir,str:tt.textContent}=Ht(this,Uc),Le.append(Ye),Ht(this,sl)){const ft=document.createElement("span");ft.classList.add("popupDate"),ft.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),ft.setAttribute("data-l10n-args",JSON.stringify({dateObj:Ht(this,sl).valueOf()})),Ye.append(ft)}const nt=Ht(this,wr,c3);if(nt)XfaLayer.render({xfaHtml:nt,intent:"richText",div:Le}),Le.lastChild.classList.add("richText","popupContent");else{const ft=this._formatContents(Ht(this,zs));Le.append(ft)}Ht(this,$r).append(Le)}_formatContents({str:Le,dir:Ye}){const tt=document.createElement("p");tt.classList.add("popupContent"),tt.dir=Ye;const nt=Le.split(/(?:\r\n?|\n)/);for(let ft=0,ht=nt.length;ft<ht;++ft){const gt=nt[ft];tt.append(document.createTextNode(gt)),ft<ht-1&&tt.append(document.createElement("br"))}return tt}updateEdited({rect:Le,popupContent:Ye}){var tt;Ht(this,G2)||C0(this,G2,{contentsObj:Ht(this,zs),richText:Ht(this,$s)}),Le&&C0(this,Xs,null),Ye&&(C0(this,$s,y0(this,wr,Oh).call(this,Ye)),C0(this,zs,null)),(tt=Ht(this,zi))==null||tt.remove(),C0(this,zi,null)}resetEdited(){var Le;Ht(this,G2)&&({contentsObj:Va(this,zs)._,richText:Va(this,$s)._}=Ht(this,G2),C0(this,G2,null),(Le=Ht(this,zi))==null||Le.remove(),C0(this,zi,null),C0(this,Xs,null))}forceHide(){C0(this,z2,this.isVisible),Ht(this,z2)&&(Ht(this,$r).hidden=!0)}maybeShow(){Ht(this,z2)&&(Ht(this,zi)||y0(this,wr,d3).call(this),C0(this,z2,!1),Ht(this,$r).hidden=!1)}get isVisible(){return Ht(this,$r).hidden===!1}}al=new WeakMap,ud=new WeakMap,dd=new WeakMap,il=new WeakMap,H2=new WeakMap,$r=new WeakMap,zs=new WeakMap,sl=new WeakMap,jc=new WeakMap,Fc=new WeakMap,ol=new WeakMap,Ws=new WeakMap,zi=new WeakMap,Xs=new WeakMap,Qc=new WeakMap,$s=new WeakMap,Uc=new WeakMap,G2=new WeakMap,z2=new WeakMap,wr=new WeakSet,c3=function(){const Le=Ht(this,$s),Ye=Ht(this,zs);return Le!=null&&Le.str&&(!(Ye!=null&&Ye.str)||Ye.str===Le.str)&&Ht(this,$s).html||null},lp=function(){var Le,Ye,tt;return((tt=(Ye=(Le=Ht(this,wr,c3))==null?void 0:Le.attributes)==null?void 0:Ye.style)==null?void 0:tt.fontSize)||0},Bh=function(){var Le,Ye,tt;return((tt=(Ye=(Le=Ht(this,wr,c3))==null?void 0:Le.attributes)==null?void 0:Ye.style)==null?void 0:tt.color)||null},Oh=function(Le){const Ye=[],tt={str:Le,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:Ye}]}},nt={style:{color:Ht(this,wr,Bh),fontSize:Ht(this,wr,lp)?`calc(${Ht(this,wr,lp)}px * var(--scale-factor))`:""}};for(const ft of Le.split(`
|
|
4041
4041
|
`))Ye.push({name:"span",value:ft,attributes:nt});return tt},Nh=function(Le){Le.altKey||Le.shiftKey||Le.ctrlKey||Le.metaKey||(Le.key==="Enter"||Le.key==="Escape"&&Ht(this,Ws))&&y0(this,wr,u3).call(this)},Dh=function(){if(Ht(this,Xs)!==null)return;const{page:{view:Le},viewport:{rawDims:{pageWidth:Ye,pageHeight:tt,pageX:nt,pageY:ft}}}=Ht(this,Fc);let ht=!!Ht(this,ol),gt=ht?Ht(this,ol):Ht(this,Qc);for(const vt of Ht(this,jc))if(!gt||Util.intersect(vt.data.rect,gt)!==null){gt=vt.data.rect,ht=!0;break}const At=Util.normalizeRect([gt[0],Le[3]-gt[1]+Le[1],gt[2],Le[3]-gt[3]+Le[1]]),Et=ht?gt[2]-gt[0]+5:0,yt=At[0]+Et,Ct=At[1];C0(this,Xs,[100*(yt-nt)/Ye,100*(Ct-ft)/tt]);const{style:kt}=Ht(this,$r);kt.left=`${Ht(this,Xs)[0]}%`,kt.top=`${Ht(this,Xs)[1]}%`},u3=function(){C0(this,Ws,!Ht(this,Ws)),Ht(this,Ws)?(y0(this,wr,d3).call(this),Ht(this,$r).addEventListener("click",Ht(this,il)),Ht(this,$r).addEventListener("keydown",Ht(this,al))):(y0(this,wr,cp).call(this),Ht(this,$r).removeEventListener("click",Ht(this,il)),Ht(this,$r).removeEventListener("keydown",Ht(this,al)))},d3=function(){Ht(this,zi)||this.render(),this.isVisible?Ht(this,Ws)&&Ht(this,$r).classList.add("focused"):(y0(this,wr,Dh).call(this),Ht(this,$r).hidden=!1,Ht(this,$r).style.zIndex=parseInt(Ht(this,$r).style.zIndex)+1e3)},cp=function(){Ht(this,$r).classList.remove("focused"),!(Ht(this,Ws)||!this.isVisible)&&(Ht(this,$r).hidden=!0,Ht(this,$r).style.zIndex=parseInt(Ht(this,$r).style.zIndex)-1e3)};class FreeTextAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0}),this.textContent=Le.data.textContent,this.textPosition=Le.data.textPosition,this.annotationEditorType=AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const Le=document.createElement("div");Le.classList.add("annotationTextContent"),Le.setAttribute("role","comment");for(const Ye of this.textContent){const tt=document.createElement("span");tt.textContent=Ye,Le.append(tt)}this.container.append(Le)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class LineAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});v0(this,Vc,null)}render(){this.container.classList.add("lineAnnotation");const Ye=this.data,{width:tt,height:nt}=getRectDims(Ye.rect),ft=this.svgFactory.create(tt,nt,!0),ht=C0(this,Vc,this.svgFactory.createElement("svg:line"));return ht.setAttribute("x1",Ye.rect[2]-Ye.lineCoordinates[0]),ht.setAttribute("y1",Ye.rect[3]-Ye.lineCoordinates[1]),ht.setAttribute("x2",Ye.rect[2]-Ye.lineCoordinates[2]),ht.setAttribute("y2",Ye.rect[3]-Ye.lineCoordinates[3]),ht.setAttribute("stroke-width",Ye.borderStyle.width||1),ht.setAttribute("stroke","transparent"),ht.setAttribute("fill","transparent"),ft.append(ht),this.container.append(ft),!Ye.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Ht(this,Vc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Vc=new WeakMap;class SquareAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});v0(this,Hc,null)}render(){this.container.classList.add("squareAnnotation");const Ye=this.data,{width:tt,height:nt}=getRectDims(Ye.rect),ft=this.svgFactory.create(tt,nt,!0),ht=Ye.borderStyle.width,gt=C0(this,Hc,this.svgFactory.createElement("svg:rect"));return gt.setAttribute("x",ht/2),gt.setAttribute("y",ht/2),gt.setAttribute("width",tt-ht),gt.setAttribute("height",nt-ht),gt.setAttribute("stroke-width",ht||1),gt.setAttribute("stroke","transparent"),gt.setAttribute("fill","transparent"),ft.append(gt),this.container.append(ft),!Ye.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Ht(this,Hc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Hc=new WeakMap;class CircleAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});v0(this,Gc,null)}render(){this.container.classList.add("circleAnnotation");const Ye=this.data,{width:tt,height:nt}=getRectDims(Ye.rect),ft=this.svgFactory.create(tt,nt,!0),ht=Ye.borderStyle.width,gt=C0(this,Gc,this.svgFactory.createElement("svg:ellipse"));return gt.setAttribute("cx",tt/2),gt.setAttribute("cy",nt/2),gt.setAttribute("rx",tt/2-ht/2),gt.setAttribute("ry",nt/2-ht/2),gt.setAttribute("stroke-width",ht||1),gt.setAttribute("stroke","transparent"),gt.setAttribute("fill","transparent"),ft.append(gt),this.container.append(ft),!Ye.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Ht(this,Gc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Gc=new WeakMap;class PolylineAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});v0(this,zc,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:Ye,vertices:tt,borderStyle:nt,popupRef:ft}}=this;if(!tt)return this.container;const{width:ht,height:gt}=getRectDims(Ye),At=this.svgFactory.create(ht,gt,!0);let xt=[];for(let yt=0,Ct=tt.length;yt<Ct;yt+=2){const kt=tt[yt]-Ye[0],vt=Ye[3]-tt[yt+1];xt.push(`${kt},${vt}`)}xt=xt.join(" ");const Et=C0(this,zc,this.svgFactory.createElement(this.svgElementName));return Et.setAttribute("points",xt),Et.setAttribute("stroke-width",nt.width||1),Et.setAttribute("stroke","transparent"),Et.setAttribute("fill","transparent"),At.append(Et),this.container.append(At),!ft&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Ht(this,zc)}addHighlightArea(){this.container.classList.add("highlightArea")}}zc=new WeakMap;class PolygonAnnotationElement extends PolylineAnnotationElement{constructor(Le){super(Le),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class CaretAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class InkAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});v0(this,Wc,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?AnnotationEditorType.HIGHLIGHT:AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:Ye,inkLists:tt,borderStyle:nt,popupRef:ft}}=this,{width:ht,height:gt}=getRectDims(Ye),At=this.svgFactory.create(ht,gt,!0);for(const xt of tt){let Et=[];for(let Ct=0,kt=xt.length;Ct<kt;Ct+=2){const vt=xt[Ct]-Ye[0],bt=Ye[3]-xt[Ct+1];Et.push(`${vt},${bt}`)}Et=Et.join(" ");const yt=this.svgFactory.createElement(this.svgElementName);Ht(this,Wc).push(yt),yt.setAttribute("points",Et),yt.setAttribute("stroke-width",nt.width||1),yt.setAttribute("stroke","transparent"),yt.setAttribute("fill","transparent"),At.append(yt)}return!ft&&this.hasPopupData&&this._createPopup(),this.container.append(At),this._editOnDoubleClick(),this.container}getElementsToTriggerPopup(){return Ht(this,Wc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Wc=new WeakMap;class HighlightAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=AnnotationEditorType.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),this.container}}class UnderlineAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class SquigglyAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class StrikeOutAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class StampAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=AnnotationEditorType.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class FileAttachmentAnnotationElement extends AnnotationElement{constructor(Ye){var nt;super(Ye,{isRenderable:!0});v0(this,$c);v0(this,Xc,null);const{file:tt}=this.data;this.filename=tt.filename,this.content=tt.content,(nt=this.linkService.eventBus)==null||nt.dispatch("fileattachmentannotation",{source:this,...tt})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:Ye,data:tt}=this;let nt;tt.hasAppearance||tt.fillAlpha===0?nt=document.createElement("div"):(nt=document.createElement("img"),nt.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(tt.name)?"paperclip":"pushpin"}.svg`,tt.fillAlpha&&tt.fillAlpha<1&&(nt.style=`filter: opacity(${Math.round(tt.fillAlpha*100)}%);`)),nt.addEventListener("dblclick",y0(this,$c,up).bind(this)),C0(this,Xc,nt);const{isMac:ft}=util_FeatureTest.platform;return Ye.addEventListener("keydown",ht=>{ht.key==="Enter"&&(ft?ht.metaKey:ht.ctrlKey)&&y0(this,$c,up).call(this)}),!tt.popupRef&&this.hasPopupData?this._createPopup():nt.classList.add("popupTriggerArea"),Ye.append(nt),Ye}getElementsToTriggerPopup(){return Ht(this,Xc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Xc=new WeakMap,$c=new WeakSet,up=function(){var Ye;(Ye=this.downloadManager)==null||Ye.openOrDownloadData(this.content,this.filename)};let AnnotationLayer$1=(_p=class{constructor({div:Le,accessibilityManager:Ye,annotationCanvasMap:tt,annotationEditorUIManager:nt,page:ft,viewport:ht,structTreeLayer:gt}){v0(this,$2);v0(this,Kc,null);v0(this,W2,null);v0(this,X2,new Map);v0(this,qc,null);this.div=Le,C0(this,Kc,Ye),C0(this,W2,tt),C0(this,qc,gt||null),this.page=ft,this.viewport=ht,this.zIndex=0,this._annotationEditorUIManager=nt}hasEditableAnnotations(){return Ht(this,X2).size>0}async render(Le){var ht;const{annotations:Ye}=Le,tt=this.div;setLayerDimensions(tt,this.viewport);const nt=new Map,ft={data:null,layer:tt,linkService:Le.linkService,downloadManager:Le.downloadManager,imageResourcesPath:Le.imageResourcesPath||"",renderForms:Le.renderForms!==!1,svgFactory:new DOMSVGFactory,annotationStorage:Le.annotationStorage||new AnnotationStorage,enableScripting:Le.enableScripting===!0,hasJSActions:Le.hasJSActions,fieldObjects:Le.fieldObjects,parent:this,elements:null};for(const gt of Ye){if(gt.noHTML)continue;const At=gt.annotationType===AnnotationType.POPUP;if(At){const yt=nt.get(gt.id);if(!yt)continue;ft.elements=yt}else{const{width:yt,height:Ct}=getRectDims(gt.rect);if(yt<=0||Ct<=0)continue}ft.data=gt;const xt=AnnotationElementFactory.create(ft);if(!xt.isRenderable)continue;if(!At&>.popupRef){const yt=nt.get(gt.popupRef);yt?yt.push(xt):nt.set(gt.popupRef,[xt])}const Et=xt.render();gt.hidden&&(Et.style.visibility="hidden"),await y0(this,$2,Ph).call(this,Et,gt.id),xt._isEditable&&(Ht(this,X2).set(xt.data.id,xt),(ht=this._annotationEditorUIManager)==null||ht.renderAnnotationElement(xt))}y0(this,$2,dp).call(this)}update({viewport:Le}){const Ye=this.div;this.viewport=Le,setLayerDimensions(Ye,{rotation:Le.rotation}),y0(this,$2,dp).call(this),Ye.hidden=!1}getEditableAnnotations(){return Array.from(Ht(this,X2).values())}getEditableAnnotation(Le){return Ht(this,X2).get(Le)}},Kc=new WeakMap,W2=new WeakMap,X2=new WeakMap,qc=new WeakMap,$2=new WeakSet,Ph=async function(Le,Ye){var ht,gt;const tt=Le.firstChild||Le,nt=tt.id=`${AnnotationPrefix}${Ye}`,ft=await((ht=Ht(this,qc))==null?void 0:ht.getAriaAttributes(nt));if(ft)for(const[At,xt]of ft)tt.setAttribute(At,xt);this.div.append(Le),(gt=Ht(this,Kc))==null||gt.moveElementInDOM(this.div,Le,tt,!1)},dp=function(){if(!Ht(this,W2))return;const Le=this.div;for(const[Ye,tt]of Ht(this,W2)){const nt=Le.querySelector(`[data-annotation-id="${Ye}"]`);if(!nt)continue;tt.className="annotationContent";const{firstChild:ft}=nt;ft?ft.nodeName==="CANVAS"?ft.replaceWith(tt):ft.classList.contains("annotationContent")?ft.after(tt):ft.before(tt):nt.append(tt)}Ht(this,W2).clear()},_p);const EOL_PATTERN=/\r\n?|\n/g,Or=class Or extends AnnotationEditor{constructor(Ye){super({...Ye,name:"freeTextEditor"});v0(this,Jr);v0(this,Wi);v0(this,oi,"");v0(this,Yc,`${this.id}-editor`);v0(this,K2,null);v0(this,li);C0(this,Wi,Ye.color||Or._defaultColor||AnnotationEditor._defaultLineColor),C0(this,li,Ye.fontSize||Or._defaultFontSize)}static get _keyboardManager(){const Ye=Or.prototype,tt=ht=>ht.isEmpty(),nt=AnnotationEditorUIManager.TRANSLATE_SMALL,ft=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],Ye.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],Ye.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],Ye._translateEmpty,{args:[-nt,0],checker:tt}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Ye._translateEmpty,{args:[-ft,0],checker:tt}],[["ArrowRight","mac+ArrowRight"],Ye._translateEmpty,{args:[nt,0],checker:tt}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Ye._translateEmpty,{args:[ft,0],checker:tt}],[["ArrowUp","mac+ArrowUp"],Ye._translateEmpty,{args:[0,-nt],checker:tt}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Ye._translateEmpty,{args:[0,-ft],checker:tt}],[["ArrowDown","mac+ArrowDown"],Ye._translateEmpty,{args:[0,nt],checker:tt}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Ye._translateEmpty,{args:[0,ft],checker:tt}]]))}static initialize(Ye,tt){AnnotationEditor.initialize(Ye,tt);const nt=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(nt.getPropertyValue("--freetext-padding"))}static updateDefaultParams(Ye,tt){switch(Ye){case AnnotationEditorParamsType.FREETEXT_SIZE:Or._defaultFontSize=tt;break;case AnnotationEditorParamsType.FREETEXT_COLOR:Or._defaultColor=tt;break}}updateParams(Ye,tt){switch(Ye){case AnnotationEditorParamsType.FREETEXT_SIZE:y0(this,Jr,Lh).call(this,tt);break;case AnnotationEditorParamsType.FREETEXT_COLOR:y0(this,Jr,_h).call(this,tt);break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,Or._defaultFontSize],[AnnotationEditorParamsType.FREETEXT_COLOR,Or._defaultColor||AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,Ht(this,li)],[AnnotationEditorParamsType.FREETEXT_COLOR,Ht(this,Wi)]]}_translateEmpty(Ye,tt){this._uiManager.translateSelectedEditors(Ye,tt,!0)}getInitialTranslation(){const Ye=this.parentScale;return[-Or._internalPadding*Ye,-(Or._internalPadding+Ht(this,li))*Ye]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),C0(this,K2,new AbortController);const Ye=this._uiManager.combinedSignal(Ht(this,K2));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:Ye}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:Ye}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:Ye}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:Ye}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:Ye})}disableEditMode(){var Ye;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",Ht(this,Yc)),this._isDraggable=!0,(Ye=Ht(this,K2))==null||Ye.abort(),C0(this,K2,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(Ye){this._focusEventsAllowed&&(super.focusin(Ye),Ye.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var Ye;this.width||(this.enableEditMode(),this.editorDiv.focus(),(Ye=this._initialOptions)!=null&&Ye.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const Ye=Ht(this,oi),tt=C0(this,oi,y0(this,Jr,Mh).call(this).trimEnd());if(Ye===tt)return;const nt=ft=>{if(C0(this,oi,ft),!ft){this.remove();return}y0(this,Jr,h3).call(this),this._uiManager.rebuild(this),y0(this,Jr,p3).call(this)};this.addCommands({cmd:()=>{nt(tt)},undo:()=>{nt(Ye)},mustExec:!1}),y0(this,Jr,p3).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(Ye){this.enterInEditMode()}keydown(Ye){Ye.target===this.div&&Ye.key==="Enter"&&(this.enterInEditMode(),Ye.preventDefault())}editorDivKeydown(Ye){Or._keyboardManager.exec(this,Ye)}editorDivFocus(Ye){this.isEditing=!0}editorDivBlur(Ye){this.isEditing=!1}editorDivInput(Ye){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let Ye,tt;this.width&&(Ye=this.x,tt=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",Ht(this,Yc)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:nt}=this.editorDiv;if(nt.fontSize=`calc(${Ht(this,li)}px * var(--scale-factor))`,nt.color=Ht(this,Wi),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),bindEvents(this,this.div,["dblclick","keydown"]),this.width){const[ft,ht]=this.parentDimensions;if(this.annotationElementId){const{position:gt}=this._initialData;let[At,xt]=this.getInitialTranslation();[At,xt]=this.pageTranslationToScreen(At,xt);const[Et,yt]=this.pageDimensions,[Ct,kt]=this.pageTranslation;let vt,bt;switch(this.rotation){case 0:vt=Ye+(gt[0]-Ct)/Et,bt=tt+this.height-(gt[1]-kt)/yt;break;case 90:vt=Ye+(gt[0]-Ct)/Et,bt=tt-(gt[1]-kt)/yt,[At,xt]=[xt,-At];break;case 180:vt=Ye-this.width+(gt[0]-Ct)/Et,bt=tt-(gt[1]-kt)/yt,[At,xt]=[-At,-xt];break;case 270:vt=Ye+(gt[0]-Ct-this.height*yt)/Et,bt=tt+(gt[1]-kt-this.width*Et)/yt,[At,xt]=[-xt,At];break}this.setAt(vt*ft,bt*ht,At,xt)}else this.setAt(Ye*ft,tt*ht,this.width*ft,this.height*ht);y0(this,Jr,h3).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(Ye){var vt,bt,It;const tt=Ye.clipboardData||window.clipboardData,{types:nt}=tt;if(nt.length===1&&nt[0]==="text/plain")return;Ye.preventDefault();const ft=y0(vt=Or,Ks,pp).call(vt,tt.getData("text")||"").replaceAll(EOL_PATTERN,`
|
|
@@ -10220,7 +10220,7 @@ Private-Lines: `+(Bt=Math.floor(Dt.length/66)+1)+`\r
|
|
|
10220
10220
|
Private-MAC: `+_t.digest().toHex()+`\r
|
|
10221
10221
|
`},At.publicKeyToOpenSSH=function(Ct,kt){var vt="ssh-rsa";kt=kt||"";var bt=gt.util.createBuffer();return Et(bt,vt),xt(bt,Ct.e),xt(bt,Ct.n),vt+" "+gt.util.encode64(bt.bytes())+" "+kt},At.privateKeyToOpenSSH=function(Ct,kt){return kt?gt.pki.encryptRsaPrivateKey(Ct,kt,{legacy:!0,algorithm:"aes128"}):gt.pki.privateKeyToPem(Ct)},At.getPublicKeyFingerprint=function(Ct,kt){var vt=(kt=kt||{}).md||gt.md.md5.create(),bt=gt.util.createBuffer();Et(bt,"ssh-rsa"),xt(bt,Ct.e),xt(bt,Ct.n),vt.start(),vt.update(bt.getBytes());var It=vt.digest();if(kt.encoding==="hex"){var wt=It.toHex();return kt.delimiter?wt.match(/.{2}/g).join(kt.delimiter):wt}if(kt.encoding==="binary")return It.getBytes();if(kt.encoding)throw new Error('Unknown encoding "'+kt.encoding+'".');return It}},8472:(nt,ft,ht)=>{var gt=ht(7768);ht(2624),ht(7461),ht(4581),ht(5477),ht(4885),ht(4097),ht(2936),ht(3103);var At=function(Mt,Jt,a0,i0){var f0=gt.util.createBuffer(),u0=Mt.length>>1,x0=u0+(1&Mt.length),p0=Mt.substr(0,x0),D0=Mt.substr(u0,x0),P0=gt.util.createBuffer(),z0=gt.hmac.create();a0=Jt+a0;var J0=Math.ceil(i0/16),Y0=Math.ceil(i0/20);z0.start("MD5",p0);var X0=gt.util.createBuffer();P0.putBytes(a0);for(var T0=0;T0<J0;++T0)z0.start(null,null),z0.update(P0.getBytes()),P0.putBuffer(z0.digest()),z0.start(null,null),z0.update(P0.bytes()+a0),X0.putBuffer(z0.digest());z0.start("SHA1",D0);var L0=gt.util.createBuffer();for(P0.clear(),P0.putBytes(a0),T0=0;T0<Y0;++T0)z0.start(null,null),z0.update(P0.getBytes()),P0.putBuffer(z0.digest()),z0.start(null,null),z0.update(P0.bytes()+a0),L0.putBuffer(z0.digest());return f0.putBytes(gt.util.xorBytes(X0.getBytes(),L0.getBytes(),i0)),f0},xt=function(Mt,Jt,a0){var i0=!1;try{var f0=Mt.deflate(Jt.fragment.getBytes());Jt.fragment=gt.util.createBuffer(f0),Jt.length=f0.length,i0=!0}catch{}return i0},Et=function(Mt,Jt,a0){var i0=!1;try{var f0=Mt.inflate(Jt.fragment.getBytes());Jt.fragment=gt.util.createBuffer(f0),Jt.length=f0.length,i0=!0}catch{}return i0},yt=function(Mt,Jt){var a0=0;switch(Jt){case 1:a0=Mt.getByte();break;case 2:a0=Mt.getInt16();break;case 3:a0=Mt.getInt24();break;case 4:a0=Mt.getInt32()}return gt.util.createBuffer(Mt.getBytes(a0))},Ct=function(Mt,Jt,a0){Mt.putInt(a0.length(),Jt<<3),Mt.putBuffer(a0)},kt={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}}};kt.SupportedVersions=[kt.Versions.TLS_1_1,kt.Versions.TLS_1_0],kt.Version=kt.SupportedVersions[0],kt.MaxFragment=15360,kt.ConnectionEnd={server:0,client:1},kt.PRFAlgorithm={tls_prf_sha256:0},kt.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},kt.CipherType={stream:0,block:1,aead:2},kt.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},kt.CompressionMethod={none:0,deflate:1},kt.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},kt.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},kt.Alert={},kt.Alert.Level={warning:1,fatal:2},kt.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},kt.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},kt.CipherSuites={},kt.getCipherSuite=function(Mt){var Jt=null;for(var a0 in kt.CipherSuites){var i0=kt.CipherSuites[a0];if(i0.id[0]===Mt.charCodeAt(0)&&i0.id[1]===Mt.charCodeAt(1)){Jt=i0;break}}return Jt},kt.handleUnexpected=function(Mt,Jt){!Mt.open&&Mt.entity===kt.ConnectionEnd.client||Mt.error(Mt,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.unexpected_message}})},kt.handleHelloRequest=function(Mt,Jt,a0){!Mt.handshaking&&Mt.handshakes>0&&(kt.queue(Mt,kt.createAlert(Mt,{level:kt.Alert.Level.warning,description:kt.Alert.Description.no_renegotiation})),kt.flush(Mt)),Mt.process()},kt.parseHelloMessage=function(Mt,Jt,a0){var i0=null,f0=Mt.entity===kt.ConnectionEnd.client;if(a0<38)Mt.error(Mt,{message:f0?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.illegal_parameter}});else{var u0=Jt.fragment,x0=u0.length();if(i0={version:{major:u0.getByte(),minor:u0.getByte()},random:gt.util.createBuffer(u0.getBytes(32)),session_id:yt(u0,1),extensions:[]},f0?(i0.cipher_suite=u0.getBytes(2),i0.compression_method=u0.getByte()):(i0.cipher_suites=yt(u0,2),i0.compression_methods=yt(u0,1)),(x0=a0-(x0-u0.length()))>0){for(var p0=yt(u0,2);p0.length()>0;)i0.extensions.push({type:[p0.getByte(),p0.getByte()],data:yt(p0,2)});if(!f0)for(var D0=0;D0<i0.extensions.length;++D0){var P0=i0.extensions[D0];if(P0.type[0]===0&&P0.type[1]===0)for(var z0=yt(P0.data,2);z0.length()>0&&z0.getByte()===0;)Mt.session.extensions.server_name.serverNameList.push(yt(z0,2).getBytes())}}if(Mt.session.version&&(i0.version.major!==Mt.session.version.major||i0.version.minor!==Mt.session.version.minor))return Mt.error(Mt,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.protocol_version}});if(f0)Mt.session.cipherSuite=kt.getCipherSuite(i0.cipher_suite);else for(var J0=gt.util.createBuffer(i0.cipher_suites.bytes());J0.length()>0&&(Mt.session.cipherSuite=kt.getCipherSuite(J0.getBytes(2)),Mt.session.cipherSuite===null););if(Mt.session.cipherSuite===null)return Mt.error(Mt,{message:"No cipher suites in common.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.handshake_failure},cipherSuite:gt.util.bytesToHex(i0.cipher_suite)});Mt.session.compressionMethod=f0?i0.compression_method:kt.CompressionMethod.none}return i0},kt.createSecurityParameters=function(Mt,Jt){var a0=Mt.entity===kt.ConnectionEnd.client,i0=Jt.random.bytes(),f0=a0?Mt.session.sp.client_random:i0,u0=a0?i0:kt.createRandom().getBytes();Mt.session.sp={entity:Mt.entity,prf_algorithm:kt.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:Mt.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:f0,server_random:u0}},kt.handleServerHello=function(Mt,Jt,a0){var i0=kt.parseHelloMessage(Mt,Jt,a0);if(!Mt.fail){if(!(i0.version.minor<=Mt.version.minor))return Mt.error(Mt,{message:"Incompatible TLS version.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.protocol_version}});Mt.version.minor=i0.version.minor,Mt.session.version=Mt.version;var f0=i0.session_id.bytes();f0.length>0&&f0===Mt.session.id?(Mt.expect=Rt,Mt.session.resuming=!0,Mt.session.sp.server_random=i0.random.bytes()):(Mt.expect=vt,Mt.session.resuming=!1,kt.createSecurityParameters(Mt,i0)),Mt.session.id=f0,Mt.process()}},kt.handleClientHello=function(Mt,Jt,a0){var i0=kt.parseHelloMessage(Mt,Jt,a0);if(!Mt.fail){var f0=i0.session_id.bytes(),u0=null;if(Mt.sessionCache&&((u0=Mt.sessionCache.getSession(f0))===null?f0="":(u0.version.major!==i0.version.major||u0.version.minor>i0.version.minor)&&(u0=null,f0="")),f0.length===0&&(f0=gt.random.getBytes(32)),Mt.session.id=f0,Mt.session.clientHelloVersion=i0.version,Mt.session.sp={},u0)Mt.version=Mt.session.version=u0.version,Mt.session.sp=u0.sp;else{for(var x0,p0=1;p0<kt.SupportedVersions.length&&!((x0=kt.SupportedVersions[p0]).minor<=i0.version.minor);++p0);Mt.version={major:x0.major,minor:x0.minor},Mt.session.version=Mt.version}u0!==null?(Mt.expect=Wt,Mt.session.resuming=!0,Mt.session.sp.client_random=i0.random.bytes()):(Mt.expect=Mt.verifyClient!==!1?Pt:Nt,Mt.session.resuming=!1,kt.createSecurityParameters(Mt,i0)),Mt.open=!0,kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createServerHello(Mt)})),Mt.session.resuming?(kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.change_cipher_spec,data:kt.createChangeCipherSpec()})),Mt.state.pending=kt.createConnectionState(Mt),Mt.state.current.write=Mt.state.pending.write,kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createFinished(Mt)}))):(kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createCertificate(Mt)})),Mt.fail||(kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createServerKeyExchange(Mt)})),Mt.verifyClient!==!1&&kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createCertificateRequest(Mt)})),kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createServerHelloDone(Mt)})))),kt.flush(Mt),Mt.process()}},kt.handleCertificate=function(Mt,Jt,a0){if(a0<3)return Mt.error(Mt,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.illegal_parameter}});var i0,f0,u0=Jt.fragment,x0={certificate_list:yt(u0,3)},p0=[];try{for(;x0.certificate_list.length()>0;)i0=yt(x0.certificate_list,3),f0=gt.asn1.fromDer(i0),i0=gt.pki.certificateFromAsn1(f0,!0),p0.push(i0)}catch(P0){return Mt.error(Mt,{message:"Could not parse certificate list.",cause:P0,send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.bad_certificate}})}var D0=Mt.entity===kt.ConnectionEnd.client;!D0&&Mt.verifyClient!==!0||p0.length!==0?p0.length===0?Mt.expect=D0?bt:Nt:(D0?Mt.session.serverCertificate=p0[0]:Mt.session.clientCertificate=p0[0],kt.verifyCertificateChain(Mt,p0)&&(Mt.expect=D0?bt:Nt)):Mt.error(Mt,{message:D0?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.illegal_parameter}}),Mt.process()},kt.handleServerKeyExchange=function(Mt,Jt,a0){if(a0>0)return Mt.error(Mt,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.unsupported_certificate}});Mt.expect=It,Mt.process()},kt.handleClientKeyExchange=function(Mt,Jt,a0){if(a0<48)return Mt.error(Mt,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.unsupported_certificate}});var i0=Jt.fragment,f0={enc_pre_master_secret:yt(i0,2).getBytes()},u0=null;if(Mt.getPrivateKey)try{u0=Mt.getPrivateKey(Mt,Mt.session.serverCertificate),u0=gt.pki.privateKeyFromPem(u0)}catch(D0){Mt.error(Mt,{message:"Could not get private key.",cause:D0,send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.internal_error}})}if(u0===null)return Mt.error(Mt,{message:"No private key set.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.internal_error}});try{var x0=Mt.session.sp;x0.pre_master_secret=u0.decrypt(f0.enc_pre_master_secret);var p0=Mt.session.clientHelloVersion;if(p0.major!==x0.pre_master_secret.charCodeAt(0)||p0.minor!==x0.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{x0.pre_master_secret=gt.random.getBytes(48)}Mt.expect=Wt,Mt.session.clientCertificate!==null&&(Mt.expect=Lt),Mt.process()},kt.handleCertificateRequest=function(Mt,Jt,a0){if(a0<3)return Mt.error(Mt,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.illegal_parameter}});var i0=Jt.fragment,f0={certificate_types:yt(i0,1),certificate_authorities:yt(i0,2)};Mt.session.certificateRequest=f0,Mt.expect=wt,Mt.process()},kt.handleCertificateVerify=function(Mt,Jt,a0){if(a0<2)return Mt.error(Mt,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.illegal_parameter}});var i0=Jt.fragment;i0.read-=4;var f0=i0.bytes();i0.read+=4;var u0={signature:yt(i0,2).getBytes()},x0=gt.util.createBuffer();x0.putBuffer(Mt.session.md5.digest()),x0.putBuffer(Mt.session.sha1.digest()),x0=x0.getBytes();try{if(!Mt.session.clientCertificate.publicKey.verify(x0,u0.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");Mt.session.md5.update(f0),Mt.session.sha1.update(f0)}catch{return Mt.error(Mt,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.handshake_failure}})}Mt.expect=Wt,Mt.process()},kt.handleServerHelloDone=function(Mt,Jt,a0){if(a0>0)return Mt.error(Mt,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.record_overflow}});if(Mt.serverCertificate===null){var i0={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.insufficient_security}},f0=Mt.verify(Mt,i0.alert.description,0,[]);if(f0!==!0)return(f0||f0===0)&&(typeof f0!="object"||gt.util.isArray(f0)?typeof f0=="number"&&(i0.alert.description=f0):(f0.message&&(i0.message=f0.message),f0.alert&&(i0.alert.description=f0.alert))),Mt.error(Mt,i0)}Mt.session.certificateRequest!==null&&(Jt=kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createCertificate(Mt)}),kt.queue(Mt,Jt)),Jt=kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createClientKeyExchange(Mt)}),kt.queue(Mt,Jt),Mt.expect=Dt;var u0=function(x0,p0){x0.session.certificateRequest!==null&&x0.session.clientCertificate!==null&&kt.queue(x0,kt.createRecord(x0,{type:kt.ContentType.handshake,data:kt.createCertificateVerify(x0,p0)})),kt.queue(x0,kt.createRecord(x0,{type:kt.ContentType.change_cipher_spec,data:kt.createChangeCipherSpec()})),x0.state.pending=kt.createConnectionState(x0),x0.state.current.write=x0.state.pending.write,kt.queue(x0,kt.createRecord(x0,{type:kt.ContentType.handshake,data:kt.createFinished(x0)})),x0.expect=Rt,kt.flush(x0),x0.process()};if(Mt.session.certificateRequest===null||Mt.session.clientCertificate===null)return u0(Mt,null);kt.getClientSignature(Mt,u0)},kt.handleChangeCipherSpec=function(Mt,Jt){if(Jt.fragment.getByte()!==1)return Mt.error(Mt,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.illegal_parameter}});var a0=Mt.entity===kt.ConnectionEnd.client;(Mt.session.resuming&&a0||!Mt.session.resuming&&!a0)&&(Mt.state.pending=kt.createConnectionState(Mt)),Mt.state.current.read=Mt.state.pending.read,(!Mt.session.resuming&&a0||Mt.session.resuming&&!a0)&&(Mt.state.pending=null),Mt.expect=a0?Tt:$t,Mt.process()},kt.handleFinished=function(Mt,Jt,a0){var i0=Jt.fragment;i0.read-=4;var f0=i0.bytes();i0.read+=4;var u0=Jt.fragment.getBytes();(i0=gt.util.createBuffer()).putBuffer(Mt.session.md5.digest()),i0.putBuffer(Mt.session.sha1.digest());var x0=Mt.entity===kt.ConnectionEnd.client,p0=x0?"server finished":"client finished",D0=Mt.session.sp;if((i0=At(D0.master_secret,p0,i0.getBytes(),12)).getBytes()!==u0)return Mt.error(Mt,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.decrypt_error}});Mt.session.md5.update(f0),Mt.session.sha1.update(f0),(Mt.session.resuming&&x0||!Mt.session.resuming&&!x0)&&(kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.change_cipher_spec,data:kt.createChangeCipherSpec()})),Mt.state.current.write=Mt.state.pending.write,Mt.state.pending=null,kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.handshake,data:kt.createFinished(Mt)}))),Mt.expect=x0?Bt:Kt,Mt.handshaking=!1,++Mt.handshakes,Mt.peerCertificate=x0?Mt.session.serverCertificate:Mt.session.clientCertificate,kt.flush(Mt),Mt.isConnected=!0,Mt.connected(Mt),Mt.process()},kt.handleAlert=function(Mt,Jt){var a0,i0=Jt.fragment,f0={level:i0.getByte(),description:i0.getByte()};switch(f0.description){case kt.Alert.Description.close_notify:a0="Connection closed.";break;case kt.Alert.Description.unexpected_message:a0="Unexpected message.";break;case kt.Alert.Description.bad_record_mac:a0="Bad record MAC.";break;case kt.Alert.Description.decryption_failed:a0="Decryption failed.";break;case kt.Alert.Description.record_overflow:a0="Record overflow.";break;case kt.Alert.Description.decompression_failure:a0="Decompression failed.";break;case kt.Alert.Description.handshake_failure:a0="Handshake failure.";break;case kt.Alert.Description.bad_certificate:a0="Bad certificate.";break;case kt.Alert.Description.unsupported_certificate:a0="Unsupported certificate.";break;case kt.Alert.Description.certificate_revoked:a0="Certificate revoked.";break;case kt.Alert.Description.certificate_expired:a0="Certificate expired.";break;case kt.Alert.Description.certificate_unknown:a0="Certificate unknown.";break;case kt.Alert.Description.illegal_parameter:a0="Illegal parameter.";break;case kt.Alert.Description.unknown_ca:a0="Unknown certificate authority.";break;case kt.Alert.Description.access_denied:a0="Access denied.";break;case kt.Alert.Description.decode_error:a0="Decode error.";break;case kt.Alert.Description.decrypt_error:a0="Decrypt error.";break;case kt.Alert.Description.export_restriction:a0="Export restriction.";break;case kt.Alert.Description.protocol_version:a0="Unsupported protocol version.";break;case kt.Alert.Description.insufficient_security:a0="Insufficient security.";break;case kt.Alert.Description.internal_error:a0="Internal error.";break;case kt.Alert.Description.user_canceled:a0="User canceled.";break;case kt.Alert.Description.no_renegotiation:a0="Renegotiation not supported.";break;default:a0="Unknown error."}if(f0.description===kt.Alert.Description.close_notify)return Mt.close();Mt.error(Mt,{message:a0,send:!1,origin:Mt.entity===kt.ConnectionEnd.client?"server":"client",alert:f0}),Mt.process()},kt.handleHandshake=function(Mt,Jt){var a0=Jt.fragment,i0=a0.getByte(),f0=a0.getInt24();if(f0>a0.length())return Mt.fragmented=Jt,Jt.fragment=gt.util.createBuffer(),a0.read-=4,Mt.process();Mt.fragmented=null,a0.read-=4;var u0=a0.bytes(f0+4);a0.read+=4,i0 in n0[Mt.entity][Mt.expect]?(Mt.entity!==kt.ConnectionEnd.server||Mt.open||Mt.fail||(Mt.handshaking=!0,Mt.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:gt.md.md5.create(),sha1:gt.md.sha1.create()}),i0!==kt.HandshakeType.hello_request&&i0!==kt.HandshakeType.certificate_verify&&i0!==kt.HandshakeType.finished&&(Mt.session.md5.update(u0),Mt.session.sha1.update(u0)),n0[Mt.entity][Mt.expect][i0](Mt,Jt,f0)):kt.handleUnexpected(Mt,Jt)},kt.handleApplicationData=function(Mt,Jt){Mt.data.putBuffer(Jt.fragment),Mt.dataReady(Mt),Mt.process()},kt.handleHeartbeat=function(Mt,Jt){var a0=Jt.fragment,i0=a0.getByte(),f0=a0.getInt16(),u0=a0.getBytes(f0);if(i0===kt.HeartbeatMessageType.heartbeat_request){if(Mt.handshaking||f0>u0.length)return Mt.process();kt.queue(Mt,kt.createRecord(Mt,{type:kt.ContentType.heartbeat,data:kt.createHeartbeat(kt.HeartbeatMessageType.heartbeat_response,u0)})),kt.flush(Mt)}else if(i0===kt.HeartbeatMessageType.heartbeat_response){if(u0!==Mt.expectedHeartbeatPayload)return Mt.process();Mt.heartbeatReceived&&Mt.heartbeatReceived(Mt,gt.util.createBuffer(u0))}Mt.process()};var vt=1,bt=2,It=3,wt=4,Rt=5,Tt=6,Bt=7,Dt=8,Pt=1,Nt=2,Lt=3,Wt=4,$t=5,Kt=6,Vt=kt.handleUnexpected,Ut=kt.handleChangeCipherSpec,_t=kt.handleAlert,Xt=kt.handleHandshake,Qt=kt.handleApplicationData,jt=kt.handleHeartbeat,Gt=[];Gt[kt.ConnectionEnd.client]=[[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Ut,_t,Vt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Qt,jt],[Vt,_t,Xt,Vt,jt]],Gt[kt.ConnectionEnd.server]=[[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Ut,_t,Vt,Vt,jt],[Vt,_t,Xt,Vt,jt],[Vt,_t,Xt,Qt,jt],[Vt,_t,Xt,Vt,jt]];var qt=kt.handleHelloRequest,zt=kt.handleServerHello,e0=kt.handleCertificate,s0=kt.handleServerKeyExchange,t0=kt.handleCertificateRequest,l0=kt.handleServerHelloDone,d0=kt.handleFinished,n0=[];n0[kt.ConnectionEnd.client]=[[Vt,Vt,zt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt],[qt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,e0,s0,t0,l0,Vt,Vt,Vt,Vt,Vt,Vt],[qt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,s0,t0,l0,Vt,Vt,Vt,Vt,Vt,Vt],[qt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,t0,l0,Vt,Vt,Vt,Vt,Vt,Vt],[qt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,l0,Vt,Vt,Vt,Vt,Vt,Vt],[qt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt],[qt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,d0],[qt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt],[qt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt]];var g0=kt.handleClientHello,A0=kt.handleClientKeyExchange,o0=kt.handleCertificateVerify;n0[kt.ConnectionEnd.server]=[[Vt,g0,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt],[Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,e0,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt],[Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,A0,Vt,Vt,Vt,Vt],[Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,o0,Vt,Vt,Vt,Vt,Vt],[Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt],[Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,d0],[Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt],[Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt,Vt]],kt.generateKeys=function(Mt,Jt){var a0=At,i0=Jt.client_random+Jt.server_random;Mt.session.resuming||(Jt.master_secret=a0(Jt.pre_master_secret,"master secret",i0,48).bytes(),Jt.pre_master_secret=null),i0=Jt.server_random+Jt.client_random;var f0=2*Jt.mac_key_length+2*Jt.enc_key_length,u0=Mt.version.major===kt.Versions.TLS_1_0.major&&Mt.version.minor===kt.Versions.TLS_1_0.minor;u0&&(f0+=2*Jt.fixed_iv_length);var x0=a0(Jt.master_secret,"key expansion",i0,f0),p0={client_write_MAC_key:x0.getBytes(Jt.mac_key_length),server_write_MAC_key:x0.getBytes(Jt.mac_key_length),client_write_key:x0.getBytes(Jt.enc_key_length),server_write_key:x0.getBytes(Jt.enc_key_length)};return u0&&(p0.client_write_IV=x0.getBytes(Jt.fixed_iv_length),p0.server_write_IV=x0.getBytes(Jt.fixed_iv_length)),p0},kt.createConnectionState=function(Mt){var Jt=Mt.entity===kt.ConnectionEnd.client,a0=function(){var u0={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(x0){return!0},compressionState:null,compressFunction:function(x0){return!0},updateSequenceNumber:function(){u0.sequenceNumber[1]===4294967295?(u0.sequenceNumber[1]=0,++u0.sequenceNumber[0]):++u0.sequenceNumber[1]}};return u0},i0={read:a0(),write:a0()};if(i0.read.update=function(u0,x0){return i0.read.cipherFunction(x0,i0.read)?i0.read.compressFunction(u0,x0,i0.read)||u0.error(u0,{message:"Could not decompress record.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.decompression_failure}}):u0.error(u0,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.bad_record_mac}}),!u0.fail},i0.write.update=function(u0,x0){return i0.write.compressFunction(u0,x0,i0.write)?i0.write.cipherFunction(x0,i0.write)||u0.error(u0,{message:"Could not encrypt record.",send:!1,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.internal_error}}):u0.error(u0,{message:"Could not compress record.",send:!1,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.internal_error}}),!u0.fail},Mt.session){var f0=Mt.session.sp;switch(Mt.session.cipherSuite.initSecurityParameters(f0),f0.keys=kt.generateKeys(Mt,f0),i0.read.macKey=Jt?f0.keys.server_write_MAC_key:f0.keys.client_write_MAC_key,i0.write.macKey=Jt?f0.keys.client_write_MAC_key:f0.keys.server_write_MAC_key,Mt.session.cipherSuite.initConnectionState(i0,Mt,f0),f0.compression_algorithm){case kt.CompressionMethod.none:break;case kt.CompressionMethod.deflate:i0.read.compressFunction=Et,i0.write.compressFunction=xt;break;default:throw new Error("Unsupported compression algorithm.")}}return i0},kt.createRandom=function(){var Mt=new Date,Jt=+Mt+6e4*Mt.getTimezoneOffset(),a0=gt.util.createBuffer();return a0.putInt32(Jt),a0.putBytes(gt.random.getBytes(28)),a0},kt.createRecord=function(Mt,Jt){return Jt.data?{type:Jt.type,version:{major:Mt.version.major,minor:Mt.version.minor},length:Jt.data.length(),fragment:Jt.data}:null},kt.createAlert=function(Mt,Jt){var a0=gt.util.createBuffer();return a0.putByte(Jt.level),a0.putByte(Jt.description),kt.createRecord(Mt,{type:kt.ContentType.alert,data:a0})},kt.createClientHello=function(Mt){Mt.session.clientHelloVersion={major:Mt.version.major,minor:Mt.version.minor};for(var Jt=gt.util.createBuffer(),a0=0;a0<Mt.cipherSuites.length;++a0){var i0=Mt.cipherSuites[a0];Jt.putByte(i0.id[0]),Jt.putByte(i0.id[1])}var f0=Jt.length(),u0=gt.util.createBuffer();u0.putByte(kt.CompressionMethod.none);var x0=u0.length(),p0=gt.util.createBuffer();if(Mt.virtualHost){var D0=gt.util.createBuffer();D0.putByte(0),D0.putByte(0);var P0=gt.util.createBuffer();P0.putByte(0),Ct(P0,2,gt.util.createBuffer(Mt.virtualHost));var z0=gt.util.createBuffer();Ct(z0,2,P0),Ct(D0,2,z0),p0.putBuffer(D0)}var J0=p0.length();J0>0&&(J0+=2);var Y0=Mt.session.id,X0=Y0.length+1+2+4+28+2+f0+1+x0+J0,T0=gt.util.createBuffer();return T0.putByte(kt.HandshakeType.client_hello),T0.putInt24(X0),T0.putByte(Mt.version.major),T0.putByte(Mt.version.minor),T0.putBytes(Mt.session.sp.client_random),Ct(T0,1,gt.util.createBuffer(Y0)),Ct(T0,2,Jt),Ct(T0,1,u0),J0>0&&Ct(T0,2,p0),T0},kt.createServerHello=function(Mt){var Jt=Mt.session.id,a0=Jt.length+1+2+4+28+2+1,i0=gt.util.createBuffer();return i0.putByte(kt.HandshakeType.server_hello),i0.putInt24(a0),i0.putByte(Mt.version.major),i0.putByte(Mt.version.minor),i0.putBytes(Mt.session.sp.server_random),Ct(i0,1,gt.util.createBuffer(Jt)),i0.putByte(Mt.session.cipherSuite.id[0]),i0.putByte(Mt.session.cipherSuite.id[1]),i0.putByte(Mt.session.compressionMethod),i0},kt.createCertificate=function(Mt){var Jt,a0=Mt.entity===kt.ConnectionEnd.client,i0=null;Mt.getCertificate&&(Jt=a0?Mt.session.certificateRequest:Mt.session.extensions.server_name.serverNameList,i0=Mt.getCertificate(Mt,Jt));var f0=gt.util.createBuffer();if(i0!==null)try{gt.util.isArray(i0)||(i0=[i0]);for(var u0=null,x0=0;x0<i0.length;++x0){var p0=gt.pem.decode(i0[x0])[0];if(p0.type!=="CERTIFICATE"&&p0.type!=="X509 CERTIFICATE"&&p0.type!=="TRUSTED CERTIFICATE"){var D0=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw D0.headerType=p0.type,D0}if(p0.procType&&p0.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var P0=gt.util.createBuffer(p0.body);u0===null&&(u0=gt.asn1.fromDer(P0.bytes(),!1));var z0=gt.util.createBuffer();Ct(z0,3,P0),f0.putBuffer(z0)}i0=gt.pki.certificateFromAsn1(u0),a0?Mt.session.clientCertificate=i0:Mt.session.serverCertificate=i0}catch(X0){return Mt.error(Mt,{message:"Could not send certificate list.",cause:X0,send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.bad_certificate}})}var J0=3+f0.length(),Y0=gt.util.createBuffer();return Y0.putByte(kt.HandshakeType.certificate),Y0.putInt24(J0),Ct(Y0,3,f0),Y0},kt.createClientKeyExchange=function(Mt){var Jt=gt.util.createBuffer();Jt.putByte(Mt.session.clientHelloVersion.major),Jt.putByte(Mt.session.clientHelloVersion.minor),Jt.putBytes(gt.random.getBytes(46));var a0=Mt.session.sp;a0.pre_master_secret=Jt.getBytes();var i0=(Jt=Mt.session.serverCertificate.publicKey.encrypt(a0.pre_master_secret)).length+2,f0=gt.util.createBuffer();return f0.putByte(kt.HandshakeType.client_key_exchange),f0.putInt24(i0),f0.putInt16(Jt.length),f0.putBytes(Jt),f0},kt.createServerKeyExchange=function(Mt){return gt.util.createBuffer()},kt.getClientSignature=function(Mt,Jt){var a0=gt.util.createBuffer();a0.putBuffer(Mt.session.md5.digest()),a0.putBuffer(Mt.session.sha1.digest()),a0=a0.getBytes(),Mt.getSignature=Mt.getSignature||function(i0,f0,u0){var x0=null;if(i0.getPrivateKey)try{x0=i0.getPrivateKey(i0,i0.session.clientCertificate),x0=gt.pki.privateKeyFromPem(x0)}catch(p0){i0.error(i0,{message:"Could not get private key.",cause:p0,send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.internal_error}})}x0===null?i0.error(i0,{message:"No private key set.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.internal_error}}):f0=x0.sign(f0,null),u0(i0,f0)},Mt.getSignature(Mt,a0,Jt)},kt.createCertificateVerify=function(Mt,Jt){var a0=Jt.length+2,i0=gt.util.createBuffer();return i0.putByte(kt.HandshakeType.certificate_verify),i0.putInt24(a0),i0.putInt16(Jt.length),i0.putBytes(Jt),i0},kt.createCertificateRequest=function(Mt){var Jt=gt.util.createBuffer();Jt.putByte(1);var a0=gt.util.createBuffer();for(var i0 in Mt.caStore.certs){var f0=Mt.caStore.certs[i0],u0=gt.pki.distinguishedNameToAsn1(f0.subject),x0=gt.asn1.toDer(u0);a0.putInt16(x0.length()),a0.putBuffer(x0)}var p0=1+Jt.length()+2+a0.length(),D0=gt.util.createBuffer();return D0.putByte(kt.HandshakeType.certificate_request),D0.putInt24(p0),Ct(D0,1,Jt),Ct(D0,2,a0),D0},kt.createServerHelloDone=function(Mt){var Jt=gt.util.createBuffer();return Jt.putByte(kt.HandshakeType.server_hello_done),Jt.putInt24(0),Jt},kt.createChangeCipherSpec=function(){var Mt=gt.util.createBuffer();return Mt.putByte(1),Mt},kt.createFinished=function(Mt){var Jt=gt.util.createBuffer();Jt.putBuffer(Mt.session.md5.digest()),Jt.putBuffer(Mt.session.sha1.digest());var a0=Mt.entity===kt.ConnectionEnd.client,i0=Mt.session.sp,f0=a0?"client finished":"server finished";Jt=At(i0.master_secret,f0,Jt.getBytes(),12);var u0=gt.util.createBuffer();return u0.putByte(kt.HandshakeType.finished),u0.putInt24(Jt.length()),u0.putBuffer(Jt),u0},kt.createHeartbeat=function(Mt,Jt,a0){a0===void 0&&(a0=Jt.length);var i0=gt.util.createBuffer();i0.putByte(Mt),i0.putInt16(a0),i0.putBytes(Jt);var f0=i0.length(),u0=Math.max(16,f0-a0-3);return i0.putBytes(gt.random.getBytes(u0)),i0},kt.queue=function(Mt,Jt){if(Jt&&(Jt.fragment.length()!==0||Jt.type!==kt.ContentType.handshake&&Jt.type!==kt.ContentType.alert&&Jt.type!==kt.ContentType.change_cipher_spec)){if(Jt.type===kt.ContentType.handshake){var a0=Jt.fragment.bytes();Mt.session.md5.update(a0),Mt.session.sha1.update(a0),a0=null}var i0;if(Jt.fragment.length()<=kt.MaxFragment)i0=[Jt];else{i0=[];for(var f0=Jt.fragment.bytes();f0.length>kt.MaxFragment;)i0.push(kt.createRecord(Mt,{type:Jt.type,data:gt.util.createBuffer(f0.slice(0,kt.MaxFragment))})),f0=f0.slice(kt.MaxFragment);f0.length>0&&i0.push(kt.createRecord(Mt,{type:Jt.type,data:gt.util.createBuffer(f0)}))}for(var u0=0;u0<i0.length&&!Mt.fail;++u0){var x0=i0[u0];Mt.state.current.write.update(Mt,x0)&&Mt.records.push(x0)}}},kt.flush=function(Mt){for(var Jt=0;Jt<Mt.records.length;++Jt){var a0=Mt.records[Jt];Mt.tlsData.putByte(a0.type),Mt.tlsData.putByte(a0.version.major),Mt.tlsData.putByte(a0.version.minor),Mt.tlsData.putInt16(a0.fragment.length()),Mt.tlsData.putBuffer(Mt.records[Jt].fragment)}return Mt.records=[],Mt.tlsDataReady(Mt)};var r0=function(Mt){switch(Mt){case!0:return!0;case gt.pki.certificateError.bad_certificate:return kt.Alert.Description.bad_certificate;case gt.pki.certificateError.unsupported_certificate:return kt.Alert.Description.unsupported_certificate;case gt.pki.certificateError.certificate_revoked:return kt.Alert.Description.certificate_revoked;case gt.pki.certificateError.certificate_expired:return kt.Alert.Description.certificate_expired;case gt.pki.certificateError.certificate_unknown:return kt.Alert.Description.certificate_unknown;case gt.pki.certificateError.unknown_ca:return kt.Alert.Description.unknown_ca;default:return kt.Alert.Description.bad_certificate}};for(var Yt in kt.verifyCertificateChain=function(Mt,Jt){try{var a0={};for(var i0 in Mt.verifyOptions)a0[i0]=Mt.verifyOptions[i0];a0.verify=function(u0,x0,p0){r0(u0);var D0=Mt.verify(Mt,u0,x0,p0);if(D0!==!0){if(typeof D0=="object"&&!gt.util.isArray(D0)){var P0=new Error("The application rejected the certificate.");throw P0.send=!0,P0.alert={level:kt.Alert.Level.fatal,description:kt.Alert.Description.bad_certificate},D0.message&&(P0.message=D0.message),D0.alert&&(P0.alert.description=D0.alert),P0}D0!==u0&&(D0=function(z0){switch(z0){case!0:return!0;case kt.Alert.Description.bad_certificate:return gt.pki.certificateError.bad_certificate;case kt.Alert.Description.unsupported_certificate:return gt.pki.certificateError.unsupported_certificate;case kt.Alert.Description.certificate_revoked:return gt.pki.certificateError.certificate_revoked;case kt.Alert.Description.certificate_expired:return gt.pki.certificateError.certificate_expired;case kt.Alert.Description.certificate_unknown:return gt.pki.certificateError.certificate_unknown;case kt.Alert.Description.unknown_ca:return gt.pki.certificateError.unknown_ca;default:return gt.pki.certificateError.bad_certificate}}(D0))}return D0},gt.pki.verifyCertificateChain(Mt.caStore,Jt,a0)}catch(u0){var f0=u0;(typeof f0!="object"||gt.util.isArray(f0))&&(f0={send:!0,alert:{level:kt.Alert.Level.fatal,description:r0(u0)}}),"send"in f0||(f0.send=!0),"alert"in f0||(f0.alert={level:kt.Alert.Level.fatal,description:r0(f0.error)}),Mt.error(Mt,f0)}return!Mt.fail},kt.createSessionCache=function(Mt,Jt){var a0=null;if(Mt&&Mt.getSession&&Mt.setSession&&Mt.order)a0=Mt;else{for(var i0 in(a0={}).cache=Mt||{},a0.capacity=Math.max(Jt||100,1),a0.order=[],Mt)a0.order.length<=Jt?a0.order.push(i0):delete Mt[i0];a0.getSession=function(f0){var u0=null,x0=null;if(f0?x0=gt.util.bytesToHex(f0):a0.order.length>0&&(x0=a0.order[0]),x0!==null&&x0 in a0.cache){for(var p0 in u0=a0.cache[x0],delete a0.cache[x0],a0.order)if(a0.order[p0]===x0){a0.order.splice(p0,1);break}}return u0},a0.setSession=function(f0,u0){if(a0.order.length===a0.capacity){var x0=a0.order.shift();delete a0.cache[x0]}x0=gt.util.bytesToHex(f0),a0.order.push(x0),a0.cache[x0]=u0}}return a0},kt.createConnection=function(Mt){var Jt;Jt=Mt.caStore?gt.util.isArray(Mt.caStore)?gt.pki.createCaStore(Mt.caStore):Mt.caStore:gt.pki.createCaStore();var a0=Mt.cipherSuites||null;if(a0===null)for(var i0 in a0=[],kt.CipherSuites)a0.push(kt.CipherSuites[i0]);var f0=Mt.server?kt.ConnectionEnd.server:kt.ConnectionEnd.client,u0=Mt.sessionCache?kt.createSessionCache(Mt.sessionCache):null,x0={version:{major:kt.Version.major,minor:kt.Version.minor},entity:f0,sessionId:Mt.sessionId,caStore:Jt,sessionCache:u0,cipherSuites:a0,connected:Mt.connected,virtualHost:Mt.virtualHost||null,verifyClient:Mt.verifyClient||!1,verify:Mt.verify||function(p0,D0,P0,z0){return D0},verifyOptions:Mt.verifyOptions||{},getCertificate:Mt.getCertificate||null,getPrivateKey:Mt.getPrivateKey||null,getSignature:Mt.getSignature||null,input:gt.util.createBuffer(),tlsData:gt.util.createBuffer(),data:gt.util.createBuffer(),tlsDataReady:Mt.tlsDataReady,dataReady:Mt.dataReady,heartbeatReceived:Mt.heartbeatReceived,closed:Mt.closed,error:function(p0,D0){D0.origin=D0.origin||(p0.entity===kt.ConnectionEnd.client?"client":"server"),D0.send&&(kt.queue(p0,kt.createAlert(p0,D0.alert)),kt.flush(p0));var P0=D0.fatal!==!1;P0&&(p0.fail=!0),Mt.error(p0,D0),P0&&p0.close(!1)},deflate:Mt.deflate||null,inflate:Mt.inflate||null,reset:function(p0){x0.version={major:kt.Version.major,minor:kt.Version.minor},x0.record=null,x0.session=null,x0.peerCertificate=null,x0.state={pending:null,current:null},x0.expect=(x0.entity,kt.ConnectionEnd.client,0),x0.fragmented=null,x0.records=[],x0.open=!1,x0.handshakes=0,x0.handshaking=!1,x0.isConnected=!1,x0.fail=!(p0||p0===void 0),x0.input.clear(),x0.tlsData.clear(),x0.data.clear(),x0.state.current=kt.createConnectionState(x0)}};return x0.reset(),x0.handshake=function(p0){if(x0.entity!==kt.ConnectionEnd.client)x0.error(x0,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(x0.handshaking)x0.error(x0,{message:"Handshake already in progress.",fatal:!1});else{x0.fail&&!x0.open&&x0.handshakes===0&&(x0.fail=!1),x0.handshaking=!0;var D0=null;(p0=p0||"").length>0&&(x0.sessionCache&&(D0=x0.sessionCache.getSession(p0)),D0===null&&(p0="")),p0.length===0&&x0.sessionCache&&(D0=x0.sessionCache.getSession())!==null&&(p0=D0.id),x0.session={id:p0,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:gt.md.md5.create(),sha1:gt.md.sha1.create()},D0&&(x0.version=D0.version,x0.session.sp=D0.sp),x0.session.sp.client_random=kt.createRandom().getBytes(),x0.open=!0,kt.queue(x0,kt.createRecord(x0,{type:kt.ContentType.handshake,data:kt.createClientHello(x0)})),kt.flush(x0)}},x0.process=function(p0){var D0=0;return p0&&x0.input.putBytes(p0),x0.fail||(x0.record!==null&&x0.record.ready&&x0.record.fragment.isEmpty()&&(x0.record=null),x0.record===null&&(D0=function(P0){var z0=0,J0=P0.input,Y0=J0.length();if(Y0<5)z0=5-Y0;else{P0.record={type:J0.getByte(),version:{major:J0.getByte(),minor:J0.getByte()},length:J0.getInt16(),fragment:gt.util.createBuffer(),ready:!1};var X0=P0.record.version.major===P0.version.major;X0&&P0.session&&P0.session.version&&(X0=P0.record.version.minor===P0.version.minor),X0||P0.error(P0,{message:"Incompatible TLS version.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.protocol_version}})}return z0}(x0)),x0.fail||x0.record===null||x0.record.ready||(D0=function(P0){var z0=0,J0=P0.input,Y0=J0.length();return Y0<P0.record.length?z0=P0.record.length-Y0:(P0.record.fragment.putBytes(J0.getBytes(P0.record.length)),J0.compact(),P0.state.current.read.update(P0,P0.record)&&(P0.fragmented!==null&&(P0.fragmented.type===P0.record.type?(P0.fragmented.fragment.putBuffer(P0.record.fragment),P0.record=P0.fragmented):P0.error(P0,{message:"Invalid fragmented record.",send:!0,alert:{level:kt.Alert.Level.fatal,description:kt.Alert.Description.unexpected_message}})),P0.record.ready=!0)),z0}(x0)),!x0.fail&&x0.record!==null&&x0.record.ready&&function(P0,z0){var J0=z0.type-kt.ContentType.change_cipher_spec,Y0=Gt[P0.entity][P0.expect];J0 in Y0?Y0[J0](P0,z0):kt.handleUnexpected(P0,z0)}(x0,x0.record)),D0},x0.prepare=function(p0){return kt.queue(x0,kt.createRecord(x0,{type:kt.ContentType.application_data,data:gt.util.createBuffer(p0)})),kt.flush(x0)},x0.prepareHeartbeatRequest=function(p0,D0){return p0 instanceof gt.util.ByteBuffer&&(p0=p0.bytes()),D0===void 0&&(D0=p0.length),x0.expectedHeartbeatPayload=p0,kt.queue(x0,kt.createRecord(x0,{type:kt.ContentType.heartbeat,data:kt.createHeartbeat(kt.HeartbeatMessageType.heartbeat_request,p0,D0)})),kt.flush(x0)},x0.close=function(p0){if(!x0.fail&&x0.sessionCache&&x0.session){var D0={id:x0.session.id,version:x0.session.version,sp:x0.session.sp};D0.sp.keys=null,x0.sessionCache.setSession(D0.id,D0)}x0.open&&(x0.open=!1,x0.input.clear(),(x0.isConnected||x0.handshaking)&&(x0.isConnected=x0.handshaking=!1,kt.queue(x0,kt.createAlert(x0,{level:kt.Alert.Level.warning,description:kt.Alert.Description.close_notify})),kt.flush(x0)),x0.closed(x0)),x0.reset(p0)},x0},nt.exports=gt.tls=gt.tls||{},kt)typeof kt[Yt]!="function"&&(gt.tls[Yt]=kt[Yt]);gt.tls.prf_tls1=At,gt.tls.hmac_sha1=function(Mt,Jt,a0){var i0=gt.hmac.create();i0.start("SHA1",Mt);var f0=gt.util.createBuffer();return f0.putInt32(Jt[0]),f0.putInt32(Jt[1]),f0.putByte(a0.type),f0.putByte(a0.version.major),f0.putByte(a0.version.minor),f0.putInt16(a0.length),f0.putBytes(a0.fragment.bytes()),i0.update(f0.getBytes()),i0.digest().getBytes()},gt.tls.createSessionCache=kt.createSessionCache,gt.tls.createConnection=kt.createConnection},3103:(nt,ft,ht)=>{var gt=ht(7573).Buffer,At=ht(7768),xt=ht(7858),Et=nt.exports=At.util=At.util||{};function yt(Nt){if(Nt!==8&&Nt!==16&&Nt!==24&&Nt!==32)throw new Error("Only 8, 16, 24, or 32 bits supported: "+Nt)}function Ct(Nt){if(this.data="",this.read=0,typeof Nt=="string")this.data=Nt;else if(Et.isArrayBuffer(Nt)||Et.isArrayBufferView(Nt))if(gt!==void 0&&Nt instanceof gt)this.data=Nt.toString("binary");else{var Lt=new Uint8Array(Nt);try{this.data=String.fromCharCode.apply(null,Lt)}catch{for(var Wt=0;Wt<Lt.length;++Wt)this.putByte(Lt[Wt])}}else(Nt instanceof Ct||typeof Nt=="object"&&typeof Nt.data=="string"&&typeof Nt.read=="number")&&(this.data=Nt.data,this.read=Nt.read);this._constructedStringLength=0}(function(){if(typeof process<"u"&&process.nextTick&&!process.browser)return Et.nextTick=process.nextTick,void(typeof setImmediate=="function"?Et.setImmediate=setImmediate:Et.setImmediate=Et.nextTick);if(typeof setImmediate=="function")return Et.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(Et.nextTick=function(Ut){return setImmediate(Ut)});if(Et.setImmediate=function(Ut){setTimeout(Ut,0)},typeof window<"u"&&typeof window.postMessage=="function"){var Nt="forge.setImmediate",Lt=[];Et.setImmediate=function(Ut){Lt.push(Ut),Lt.length===1&&window.postMessage(Nt,"*")},window.addEventListener("message",function(Ut){if(Ut.source===window&&Ut.data===Nt){Ut.stopPropagation();var _t=Lt.slice();Lt.length=0,_t.forEach(function(Xt){Xt()})}},!0)}if(typeof MutationObserver<"u"){var Wt=Date.now(),$t=!0,Kt=document.createElement("div");Lt=[],new MutationObserver(function(){var Ut=Lt.slice();Lt.length=0,Ut.forEach(function(_t){_t()})}).observe(Kt,{attributes:!0});var Vt=Et.setImmediate;Et.setImmediate=function(Ut){Date.now()-Wt>15?(Wt=Date.now(),Vt(Ut)):(Lt.push(Ut),Lt.length===1&&Kt.setAttribute("a",$t=!$t))}}Et.nextTick=Et.setImmediate})(),Et.isNodejs=typeof process<"u"&&process.versions&&process.versions.node,Et.globalScope=Et.isNodejs?ht.g:typeof self>"u"?window:self,Et.isArray=Array.isArray||function(Nt){return Object.prototype.toString.call(Nt)==="[object Array]"},Et.isArrayBuffer=function(Nt){return typeof ArrayBuffer<"u"&&Nt instanceof ArrayBuffer},Et.isArrayBufferView=function(Nt){return Nt&&Et.isArrayBuffer(Nt.buffer)&&Nt.byteLength!==void 0},Et.ByteBuffer=Ct,Et.ByteStringBuffer=Ct,Et.ByteStringBuffer.prototype._optimizeConstructedString=function(Nt){this._constructedStringLength+=Nt,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},Et.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},Et.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},Et.ByteStringBuffer.prototype.putByte=function(Nt){return this.putBytes(String.fromCharCode(Nt))},Et.ByteStringBuffer.prototype.fillWithByte=function(Nt,Lt){Nt=String.fromCharCode(Nt);for(var Wt=this.data;Lt>0;)1&Lt&&(Wt+=Nt),(Lt>>>=1)>0&&(Nt+=Nt);return this.data=Wt,this._optimizeConstructedString(Lt),this},Et.ByteStringBuffer.prototype.putBytes=function(Nt){return this.data+=Nt,this._optimizeConstructedString(Nt.length),this},Et.ByteStringBuffer.prototype.putString=function(Nt){return this.putBytes(Et.encodeUtf8(Nt))},Et.ByteStringBuffer.prototype.putInt16=function(Nt){return this.putBytes(String.fromCharCode(Nt>>8&255)+String.fromCharCode(255&Nt))},Et.ByteStringBuffer.prototype.putInt24=function(Nt){return this.putBytes(String.fromCharCode(Nt>>16&255)+String.fromCharCode(Nt>>8&255)+String.fromCharCode(255&Nt))},Et.ByteStringBuffer.prototype.putInt32=function(Nt){return this.putBytes(String.fromCharCode(Nt>>24&255)+String.fromCharCode(Nt>>16&255)+String.fromCharCode(Nt>>8&255)+String.fromCharCode(255&Nt))},Et.ByteStringBuffer.prototype.putInt16Le=function(Nt){return this.putBytes(String.fromCharCode(255&Nt)+String.fromCharCode(Nt>>8&255))},Et.ByteStringBuffer.prototype.putInt24Le=function(Nt){return this.putBytes(String.fromCharCode(255&Nt)+String.fromCharCode(Nt>>8&255)+String.fromCharCode(Nt>>16&255))},Et.ByteStringBuffer.prototype.putInt32Le=function(Nt){return this.putBytes(String.fromCharCode(255&Nt)+String.fromCharCode(Nt>>8&255)+String.fromCharCode(Nt>>16&255)+String.fromCharCode(Nt>>24&255))},Et.ByteStringBuffer.prototype.putInt=function(Nt,Lt){yt(Lt);var Wt="";do Lt-=8,Wt+=String.fromCharCode(Nt>>Lt&255);while(Lt>0);return this.putBytes(Wt)},Et.ByteStringBuffer.prototype.putSignedInt=function(Nt,Lt){return Nt<0&&(Nt+=2<<Lt-1),this.putInt(Nt,Lt)},Et.ByteStringBuffer.prototype.putBuffer=function(Nt){return this.putBytes(Nt.getBytes())},Et.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},Et.ByteStringBuffer.prototype.getInt16=function(){var Nt=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,Nt},Et.ByteStringBuffer.prototype.getInt24=function(){var Nt=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,Nt},Et.ByteStringBuffer.prototype.getInt32=function(){var Nt=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,Nt},Et.ByteStringBuffer.prototype.getInt16Le=function(){var Nt=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,Nt},Et.ByteStringBuffer.prototype.getInt24Le=function(){var Nt=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,Nt},Et.ByteStringBuffer.prototype.getInt32Le=function(){var Nt=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,Nt},Et.ByteStringBuffer.prototype.getInt=function(Nt){yt(Nt);var Lt=0;do Lt=(Lt<<8)+this.data.charCodeAt(this.read++),Nt-=8;while(Nt>0);return Lt},Et.ByteStringBuffer.prototype.getSignedInt=function(Nt){var Lt=this.getInt(Nt),Wt=2<<Nt-2;return Lt>=Wt&&(Lt-=Wt<<1),Lt},Et.ByteStringBuffer.prototype.getBytes=function(Nt){var Lt;return Nt?(Nt=Math.min(this.length(),Nt),Lt=this.data.slice(this.read,this.read+Nt),this.read+=Nt):Nt===0?Lt="":(Lt=this.read===0?this.data:this.data.slice(this.read),this.clear()),Lt},Et.ByteStringBuffer.prototype.bytes=function(Nt){return Nt===void 0?this.data.slice(this.read):this.data.slice(this.read,this.read+Nt)},Et.ByteStringBuffer.prototype.at=function(Nt){return this.data.charCodeAt(this.read+Nt)},Et.ByteStringBuffer.prototype.setAt=function(Nt,Lt){return this.data=this.data.substr(0,this.read+Nt)+String.fromCharCode(Lt)+this.data.substr(this.read+Nt+1),this},Et.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},Et.ByteStringBuffer.prototype.copy=function(){var Nt=Et.createBuffer(this.data);return Nt.read=this.read,Nt},Et.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},Et.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},Et.ByteStringBuffer.prototype.truncate=function(Nt){var Lt=Math.max(0,this.length()-Nt);return this.data=this.data.substr(this.read,Lt),this.read=0,this},Et.ByteStringBuffer.prototype.toHex=function(){for(var Nt="",Lt=this.read;Lt<this.data.length;++Lt){var Wt=this.data.charCodeAt(Lt);Wt<16&&(Nt+="0"),Nt+=Wt.toString(16)}return Nt},Et.ByteStringBuffer.prototype.toString=function(){return Et.decodeUtf8(this.bytes())},Et.DataBuffer=function(Nt,Lt){Lt=Lt||{},this.read=Lt.readOffset||0,this.growSize=Lt.growSize||1024;var Wt=Et.isArrayBuffer(Nt),$t=Et.isArrayBufferView(Nt);if(Wt||$t)return this.data=Wt?new DataView(Nt):new DataView(Nt.buffer,Nt.byteOffset,Nt.byteLength),void(this.write="writeOffset"in Lt?Lt.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,Nt!=null&&this.putBytes(Nt),"writeOffset"in Lt&&(this.write=Lt.writeOffset)},Et.DataBuffer.prototype.length=function(){return this.write-this.read},Et.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},Et.DataBuffer.prototype.accommodate=function(Nt,Lt){if(this.length()>=Nt)return this;Lt=Math.max(Lt||this.growSize,Nt);var Wt=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),$t=new Uint8Array(this.length()+Lt);return $t.set(Wt),this.data=new DataView($t.buffer),this},Et.DataBuffer.prototype.putByte=function(Nt){return this.accommodate(1),this.data.setUint8(this.write++,Nt),this},Et.DataBuffer.prototype.fillWithByte=function(Nt,Lt){this.accommodate(Lt);for(var Wt=0;Wt<Lt;++Wt)this.data.setUint8(Nt);return this},Et.DataBuffer.prototype.putBytes=function(Nt,Lt){if(Et.isArrayBufferView(Nt)){var Wt=($t=new Uint8Array(Nt.buffer,Nt.byteOffset,Nt.byteLength)).byteLength-$t.byteOffset;return this.accommodate(Wt),new Uint8Array(this.data.buffer,this.write).set($t),this.write+=Wt,this}if(Et.isArrayBuffer(Nt)){var $t=new Uint8Array(Nt);return this.accommodate($t.byteLength),new Uint8Array(this.data.buffer).set($t,this.write),this.write+=$t.byteLength,this}if(Nt instanceof Et.DataBuffer||typeof Nt=="object"&&typeof Nt.read=="number"&&typeof Nt.write=="number"&&Et.isArrayBufferView(Nt.data))return $t=new Uint8Array(Nt.data.byteLength,Nt.read,Nt.length()),this.accommodate($t.byteLength),new Uint8Array(Nt.data.byteLength,this.write).set($t),this.write+=$t.byteLength,this;if(Nt instanceof Et.ByteStringBuffer&&(Nt=Nt.data,Lt="binary"),Lt=Lt||"binary",typeof Nt=="string"){var Kt;if(Lt==="hex")return this.accommodate(Math.ceil(Nt.length/2)),Kt=new Uint8Array(this.data.buffer,this.write),this.write+=Et.binary.hex.decode(Nt,Kt,this.write),this;if(Lt==="base64")return this.accommodate(3*Math.ceil(Nt.length/4)),Kt=new Uint8Array(this.data.buffer,this.write),this.write+=Et.binary.base64.decode(Nt,Kt,this.write),this;if(Lt==="utf8"&&(Nt=Et.encodeUtf8(Nt),Lt="binary"),Lt==="binary"||Lt==="raw")return this.accommodate(Nt.length),Kt=new Uint8Array(this.data.buffer,this.write),this.write+=Et.binary.raw.decode(Kt),this;if(Lt==="utf16")return this.accommodate(2*Nt.length),Kt=new Uint16Array(this.data.buffer,this.write),this.write+=Et.text.utf16.encode(Kt),this;throw new Error("Invalid encoding: "+Lt)}throw Error("Invalid parameter: "+Nt)},Et.DataBuffer.prototype.putBuffer=function(Nt){return this.putBytes(Nt),Nt.clear(),this},Et.DataBuffer.prototype.putString=function(Nt){return this.putBytes(Nt,"utf16")},Et.DataBuffer.prototype.putInt16=function(Nt){return this.accommodate(2),this.data.setInt16(this.write,Nt),this.write+=2,this},Et.DataBuffer.prototype.putInt24=function(Nt){return this.accommodate(3),this.data.setInt16(this.write,Nt>>8&65535),this.data.setInt8(this.write,Nt>>16&255),this.write+=3,this},Et.DataBuffer.prototype.putInt32=function(Nt){return this.accommodate(4),this.data.setInt32(this.write,Nt),this.write+=4,this},Et.DataBuffer.prototype.putInt16Le=function(Nt){return this.accommodate(2),this.data.setInt16(this.write,Nt,!0),this.write+=2,this},Et.DataBuffer.prototype.putInt24Le=function(Nt){return this.accommodate(3),this.data.setInt8(this.write,Nt>>16&255),this.data.setInt16(this.write,Nt>>8&65535,!0),this.write+=3,this},Et.DataBuffer.prototype.putInt32Le=function(Nt){return this.accommodate(4),this.data.setInt32(this.write,Nt,!0),this.write+=4,this},Et.DataBuffer.prototype.putInt=function(Nt,Lt){yt(Lt),this.accommodate(Lt/8);do Lt-=8,this.data.setInt8(this.write++,Nt>>Lt&255);while(Lt>0);return this},Et.DataBuffer.prototype.putSignedInt=function(Nt,Lt){return yt(Lt),this.accommodate(Lt/8),Nt<0&&(Nt+=2<<Lt-1),this.putInt(Nt,Lt)},Et.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},Et.DataBuffer.prototype.getInt16=function(){var Nt=this.data.getInt16(this.read);return this.read+=2,Nt},Et.DataBuffer.prototype.getInt24=function(){var Nt=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,Nt},Et.DataBuffer.prototype.getInt32=function(){var Nt=this.data.getInt32(this.read);return this.read+=4,Nt},Et.DataBuffer.prototype.getInt16Le=function(){var Nt=this.data.getInt16(this.read,!0);return this.read+=2,Nt},Et.DataBuffer.prototype.getInt24Le=function(){var Nt=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,Nt},Et.DataBuffer.prototype.getInt32Le=function(){var Nt=this.data.getInt32(this.read,!0);return this.read+=4,Nt},Et.DataBuffer.prototype.getInt=function(Nt){yt(Nt);var Lt=0;do Lt=(Lt<<8)+this.data.getInt8(this.read++),Nt-=8;while(Nt>0);return Lt},Et.DataBuffer.prototype.getSignedInt=function(Nt){var Lt=this.getInt(Nt),Wt=2<<Nt-2;return Lt>=Wt&&(Lt-=Wt<<1),Lt},Et.DataBuffer.prototype.getBytes=function(Nt){var Lt;return Nt?(Nt=Math.min(this.length(),Nt),Lt=this.data.slice(this.read,this.read+Nt),this.read+=Nt):Nt===0?Lt="":(Lt=this.read===0?this.data:this.data.slice(this.read),this.clear()),Lt},Et.DataBuffer.prototype.bytes=function(Nt){return Nt===void 0?this.data.slice(this.read):this.data.slice(this.read,this.read+Nt)},Et.DataBuffer.prototype.at=function(Nt){return this.data.getUint8(this.read+Nt)},Et.DataBuffer.prototype.setAt=function(Nt,Lt){return this.data.setUint8(Nt,Lt),this},Et.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},Et.DataBuffer.prototype.copy=function(){return new Et.DataBuffer(this)},Et.DataBuffer.prototype.compact=function(){if(this.read>0){var Nt=new Uint8Array(this.data.buffer,this.read),Lt=new Uint8Array(Nt.byteLength);Lt.set(Nt),this.data=new DataView(Lt),this.write-=this.read,this.read=0}return this},Et.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},Et.DataBuffer.prototype.truncate=function(Nt){return this.write=Math.max(0,this.length()-Nt),this.read=Math.min(this.read,this.write),this},Et.DataBuffer.prototype.toHex=function(){for(var Nt="",Lt=this.read;Lt<this.data.byteLength;++Lt){var Wt=this.data.getUint8(Lt);Wt<16&&(Nt+="0"),Nt+=Wt.toString(16)}return Nt},Et.DataBuffer.prototype.toString=function(Nt){var Lt=new Uint8Array(this.data,this.read,this.length());if((Nt=Nt||"utf8")==="binary"||Nt==="raw")return Et.binary.raw.encode(Lt);if(Nt==="hex")return Et.binary.hex.encode(Lt);if(Nt==="base64")return Et.binary.base64.encode(Lt);if(Nt==="utf8")return Et.text.utf8.decode(Lt);if(Nt==="utf16")return Et.text.utf16.decode(Lt);throw new Error("Invalid encoding: "+Nt)},Et.createBuffer=function(Nt,Lt){return Lt=Lt||"raw",Nt!==void 0&&Lt==="utf8"&&(Nt=Et.encodeUtf8(Nt)),new Et.ByteBuffer(Nt)},Et.fillString=function(Nt,Lt){for(var Wt="";Lt>0;)1&Lt&&(Wt+=Nt),(Lt>>>=1)>0&&(Nt+=Nt);return Wt},Et.xorBytes=function(Nt,Lt,Wt){for(var $t="",Kt="",Vt="",Ut=0,_t=0;Wt>0;--Wt,++Ut)Kt=Nt.charCodeAt(Ut)^Lt.charCodeAt(Ut),_t>=10&&($t+=Vt,Vt="",_t=0),Vt+=String.fromCharCode(Kt),++_t;return $t+Vt},Et.hexToBytes=function(Nt){var Lt="",Wt=0;for(!0&Nt.length&&(Wt=1,Lt+=String.fromCharCode(parseInt(Nt[0],16)));Wt<Nt.length;Wt+=2)Lt+=String.fromCharCode(parseInt(Nt.substr(Wt,2),16));return Lt},Et.bytesToHex=function(Nt){return Et.createBuffer(Nt).toHex()},Et.int32ToBytes=function(Nt){return String.fromCharCode(Nt>>24&255)+String.fromCharCode(Nt>>16&255)+String.fromCharCode(Nt>>8&255)+String.fromCharCode(255&Nt)};var kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",vt=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],bt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Et.encode64=function(Nt,Lt){for(var Wt,$t,Kt,Vt="",Ut="",_t=0;_t<Nt.length;)Wt=Nt.charCodeAt(_t++),$t=Nt.charCodeAt(_t++),Kt=Nt.charCodeAt(_t++),Vt+=kt.charAt(Wt>>2),Vt+=kt.charAt((3&Wt)<<4|$t>>4),isNaN($t)?Vt+="==":(Vt+=kt.charAt((15&$t)<<2|Kt>>6),Vt+=isNaN(Kt)?"=":kt.charAt(63&Kt)),Lt&&Vt.length>Lt&&(Ut+=Vt.substr(0,Lt)+`\r
|
|
10222
10222
|
`,Vt=Vt.substr(Lt));return Ut+Vt},Et.decode64=function(Nt){Nt=Nt.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var Lt,Wt,$t,Kt,Vt="",Ut=0;Ut<Nt.length;)Lt=vt[Nt.charCodeAt(Ut++)-43],Wt=vt[Nt.charCodeAt(Ut++)-43],$t=vt[Nt.charCodeAt(Ut++)-43],Kt=vt[Nt.charCodeAt(Ut++)-43],Vt+=String.fromCharCode(Lt<<2|Wt>>4),$t!==64&&(Vt+=String.fromCharCode((15&Wt)<<4|$t>>2),Kt!==64&&(Vt+=String.fromCharCode((3&$t)<<6|Kt)));return Vt},Et.encodeUtf8=function(Nt){return unescape(encodeURIComponent(Nt))},Et.decodeUtf8=function(Nt){return decodeURIComponent(escape(Nt))},Et.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:xt.encode,decode:xt.decode}},Et.binary.raw.encode=function(Nt){return String.fromCharCode.apply(null,Nt)},Et.binary.raw.decode=function(Nt,Lt,Wt){var $t=Lt;$t||($t=new Uint8Array(Nt.length));for(var Kt=Wt=Wt||0,Vt=0;Vt<Nt.length;++Vt)$t[Kt++]=Nt.charCodeAt(Vt);return Lt?Kt-Wt:$t},Et.binary.hex.encode=Et.bytesToHex,Et.binary.hex.decode=function(Nt,Lt,Wt){var $t=Lt;$t||($t=new Uint8Array(Math.ceil(Nt.length/2)));var Kt=0,Vt=Wt=Wt||0;for(1&Nt.length&&(Kt=1,$t[Vt++]=parseInt(Nt[0],16));Kt<Nt.length;Kt+=2)$t[Vt++]=parseInt(Nt.substr(Kt,2),16);return Lt?Vt-Wt:$t},Et.binary.base64.encode=function(Nt,Lt){for(var Wt,$t,Kt,Vt="",Ut="",_t=0;_t<Nt.byteLength;)Wt=Nt[_t++],$t=Nt[_t++],Kt=Nt[_t++],Vt+=kt.charAt(Wt>>2),Vt+=kt.charAt((3&Wt)<<4|$t>>4),isNaN($t)?Vt+="==":(Vt+=kt.charAt((15&$t)<<2|Kt>>6),Vt+=isNaN(Kt)?"=":kt.charAt(63&Kt)),Lt&&Vt.length>Lt&&(Ut+=Vt.substr(0,Lt)+`\r
|
|
10223
|
-
`,Vt=Vt.substr(Lt));return Ut+Vt},Et.binary.base64.decode=function(Nt,Lt,Wt){var $t,Kt,Vt,Ut,_t=Lt;_t||(_t=new Uint8Array(3*Math.ceil(Nt.length/4))),Nt=Nt.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var Xt=0,Qt=Wt=Wt||0;Xt<Nt.length;)$t=vt[Nt.charCodeAt(Xt++)-43],Kt=vt[Nt.charCodeAt(Xt++)-43],Vt=vt[Nt.charCodeAt(Xt++)-43],Ut=vt[Nt.charCodeAt(Xt++)-43],_t[Qt++]=$t<<2|Kt>>4,Vt!==64&&(_t[Qt++]=(15&Kt)<<4|Vt>>2,Ut!==64&&(_t[Qt++]=(3&Vt)<<6|Ut));return Lt?Qt-Wt:_t.subarray(0,Qt)},Et.binary.base58.encode=function(Nt,Lt){return Et.binary.baseN.encode(Nt,bt,Lt)},Et.binary.base58.decode=function(Nt,Lt){return Et.binary.baseN.decode(Nt,bt,Lt)},Et.text={utf8:{},utf16:{}},Et.text.utf8.encode=function(Nt,Lt,Wt){Nt=Et.encodeUtf8(Nt);var $t=Lt;$t||($t=new Uint8Array(Nt.length));for(var Kt=Wt=Wt||0,Vt=0;Vt<Nt.length;++Vt)$t[Kt++]=Nt.charCodeAt(Vt);return Lt?Kt-Wt:$t},Et.text.utf8.decode=function(Nt){return Et.decodeUtf8(String.fromCharCode.apply(null,Nt))},Et.text.utf16.encode=function(Nt,Lt,Wt){var $t=Lt;$t||($t=new Uint8Array(2*Nt.length));for(var Kt=new Uint16Array($t.buffer),Vt=Wt=Wt||0,Ut=Wt,_t=0;_t<Nt.length;++_t)Kt[Ut++]=Nt.charCodeAt(_t),Vt+=2;return Lt?Vt-Wt:$t},Et.text.utf16.decode=function(Nt){return String.fromCharCode.apply(null,new Uint16Array(Nt.buffer))},Et.deflate=function(Nt,Lt,Wt){if(Lt=Et.decode64(Nt.deflate(Et.encode64(Lt)).rval),Wt){var $t=2;32&Lt.charCodeAt(1)&&($t=6),Lt=Lt.substring($t,Lt.length-4)}return Lt},Et.inflate=function(Nt,Lt,Wt){var $t=Nt.inflate(Et.encode64(Lt)).rval;return $t===null?null:Et.decode64($t)};var It=function(Nt,Lt,Wt){if(!Nt)throw new Error("WebStorage not available.");var $t;if(Wt===null?$t=Nt.removeItem(Lt):(Wt=Et.encode64(JSON.stringify(Wt)),$t=Nt.setItem(Lt,Wt)),$t!==void 0&&$t.rval!==!0){var Kt=new Error($t.error.message);throw Kt.id=$t.error.id,Kt.name=$t.error.name,Kt}},wt=function(Nt,Lt){if(!Nt)throw new Error("WebStorage not available.");var Wt=Nt.getItem(Lt);if(Nt.init)if(Wt.rval===null){if(Wt.error){var $t=new Error(Wt.error.message);throw $t.id=Wt.error.id,$t.name=Wt.error.name,$t}Wt=null}else Wt=Wt.rval;return Wt!==null&&(Wt=JSON.parse(Et.decode64(Wt))),Wt},Rt=function(Nt,Lt,Wt,$t){var Kt=wt(Nt,Lt);Kt===null&&(Kt={}),Kt[Wt]=$t,It(Nt,Lt,Kt)},Tt=function(Nt,Lt,Wt){var $t=wt(Nt,Lt);return $t!==null&&($t=Wt in $t?$t[Wt]:null),$t},Bt=function(Nt,Lt,Wt){var $t=wt(Nt,Lt);if($t!==null&&Wt in $t){delete $t[Wt];var Kt=!0;for(var Vt in $t){Kt=!1;break}Kt&&($t=null),It(Nt,Lt,$t)}},Dt=function(Nt,Lt){It(Nt,Lt,null)},Pt=function(Nt,Lt,Wt){var $t,Kt=null;Wt===void 0&&(Wt=["web","flash"]);var Vt=!1,Ut=null;for(var _t in Wt){$t=Wt[_t];try{if($t==="flash"||$t==="both"){if(Lt[0]===null)throw new Error("Flash local storage not available.");Kt=Nt.apply(this,Lt),Vt=$t==="flash"}$t!=="web"&&$t!=="both"||(Lt[0]=localStorage,Kt=Nt.apply(this,Lt),Vt=!0)}catch(Xt){Ut=Xt}if(Vt)break}if(!Vt)throw Ut;return Kt};Et.setItem=function(Nt,Lt,Wt,$t,Kt){Pt(Rt,arguments,Kt)},Et.getItem=function(Nt,Lt,Wt,$t){return Pt(Tt,arguments,$t)},Et.removeItem=function(Nt,Lt,Wt,$t){Pt(Bt,arguments,$t)},Et.clearItems=function(Nt,Lt,Wt){Pt(Dt,arguments,Wt)},Et.isEmpty=function(Nt){for(var Lt in Nt)if(Nt.hasOwnProperty(Lt))return!1;return!0},Et.format=function(Nt){for(var Lt,Wt,$t=/%./g,Kt=0,Vt=[],Ut=0;Lt=$t.exec(Nt);){(Wt=Nt.substring(Ut,$t.lastIndex-2)).length>0&&Vt.push(Wt),Ut=$t.lastIndex;var _t=Lt[0][1];switch(_t){case"s":case"o":Kt<arguments.length?Vt.push(arguments[1+Kt++]):Vt.push("<?>");break;case"%":Vt.push("%");break;default:Vt.push("<%"+_t+"?>")}}return Vt.push(Nt.substring(Ut)),Vt.join("")},Et.formatNumber=function(Nt,Lt,Wt,$t){var Kt=Nt,Vt=isNaN(Lt=Math.abs(Lt))?2:Lt,Ut=Wt===void 0?",":Wt,_t=$t===void 0?".":$t,Xt=Kt<0?"-":"",Qt=parseInt(Kt=Math.abs(+Kt||0).toFixed(Vt),10)+"",jt=Qt.length>3?Qt.length%3:0;return Xt+(jt?Qt.substr(0,jt)+_t:"")+Qt.substr(jt).replace(/(\d{3})(?=\d)/g,"$1"+_t)+(Vt?Ut+Math.abs(Kt-Qt).toFixed(Vt).slice(2):"")},Et.formatSize=function(Nt){return Nt>=1073741824?Et.formatNumber(Nt/1073741824,2,".","")+" GiB":Nt>=1048576?Et.formatNumber(Nt/1048576,2,".","")+" MiB":Nt>=1024?Et.formatNumber(Nt/1024,0)+" KiB":Et.formatNumber(Nt,0)+" bytes"},Et.bytesFromIP=function(Nt){return Nt.indexOf(".")!==-1?Et.bytesFromIPv4(Nt):Nt.indexOf(":")!==-1?Et.bytesFromIPv6(Nt):null},Et.bytesFromIPv4=function(Nt){if((Nt=Nt.split(".")).length!==4)return null;for(var Lt=Et.createBuffer(),Wt=0;Wt<Nt.length;++Wt){var $t=parseInt(Nt[Wt],10);if(isNaN($t))return null;Lt.putByte($t)}return Lt.getBytes()},Et.bytesFromIPv6=function(Nt){for(var Lt=0,Wt=2*(8-(Nt=Nt.split(":").filter(function(Ut){return Ut.length===0&&++Lt,!0})).length+Lt),$t=Et.createBuffer(),Kt=0;Kt<8;++Kt)if(Nt[Kt]&&Nt[Kt].length!==0){var Vt=Et.hexToBytes(Nt[Kt]);Vt.length<2&&$t.putByte(0),$t.putBytes(Vt)}else $t.fillWithByte(0,Wt),Wt=0;return $t.getBytes()},Et.bytesToIP=function(Nt){return Nt.length===4?Et.bytesToIPv4(Nt):Nt.length===16?Et.bytesToIPv6(Nt):null},Et.bytesToIPv4=function(Nt){if(Nt.length!==4)return null;for(var Lt=[],Wt=0;Wt<Nt.length;++Wt)Lt.push(Nt.charCodeAt(Wt));return Lt.join(".")},Et.bytesToIPv6=function(Nt){if(Nt.length!==16)return null;for(var Lt=[],Wt=[],$t=0,Kt=0;Kt<Nt.length;Kt+=2){for(var Vt=Et.bytesToHex(Nt[Kt]+Nt[Kt+1]);Vt[0]==="0"&&Vt!=="0";)Vt=Vt.substr(1);if(Vt==="0"){var Ut=Wt[Wt.length-1],_t=Lt.length;Ut&&_t===Ut.end+1?(Ut.end=_t,Ut.end-Ut.start>Wt[$t].end-Wt[$t].start&&($t=Wt.length-1)):Wt.push({start:_t,end:_t})}Lt.push(Vt)}if(Wt.length>0){var Xt=Wt[$t];Xt.end-Xt.start>0&&(Lt.splice(Xt.start,Xt.end-Xt.start+1,""),Xt.start===0&&Lt.unshift(""),Xt.end===7&&Lt.push(""))}return Lt.join(":")},Et.estimateCores=function(Nt,Lt){if(typeof Nt=="function"&&(Lt=Nt,Nt={}),Nt=Nt||{},"cores"in Et&&!Nt.update)return Lt(null,Et.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return Et.cores=navigator.hardwareConcurrency,Lt(null,Et.cores);if(typeof Worker>"u")return Et.cores=1,Lt(null,Et.cores);if(typeof Blob>"u")return Et.cores=2,Lt(null,Et.cores);var Wt=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function($t){for(var Kt=Date.now(),Vt=Kt+4;Date.now()<Vt;);self.postMessage({st:Kt,et:Vt})})}).toString(),")()"],{type:"application/javascript"}));(function $t(Kt,Vt,Ut){if(Vt===0){var _t=Math.floor(Kt.reduce(function(Xt,Qt){return Xt+Qt},0)/Kt.length);return Et.cores=Math.max(1,_t),URL.revokeObjectURL(Wt),Lt(null,Et.cores)}(function(Xt,Qt){for(var jt=[],Gt=[],qt=0;qt<Xt;++qt){var zt=new Worker(Wt);zt.addEventListener("message",function(e0){if(Gt.push(e0.data),Gt.length===Xt){for(var s0=0;s0<Xt;++s0)jt[s0].terminate();Qt(0,Gt)}}),jt.push(zt)}for(qt=0;qt<Xt;++qt)jt[qt].postMessage(qt)})(Ut,function(Xt,Qt){Kt.push(function(jt,Gt){for(var qt=[],zt=0;zt<jt;++zt)for(var e0=Gt[zt],s0=qt[zt]=[],t0=0;t0<jt;++t0)if(zt!==t0){var l0=Gt[t0];(e0.st>l0.st&&e0.st<l0.et||l0.st>e0.st&&l0.st<e0.et)&&s0.push(t0)}return qt.reduce(function(d0,n0){return Math.max(d0,n0.length)},0)}(Ut,Qt)),$t(Kt,Vt-1,Ut)})})([],5,16)}},6446:(nt,ft,ht)=>{var gt=ht(7768);ht(1482),ht(2624),ht(2023),ht(6067),ht(826),ht(2884),ht(5477),ht(665),ht(144),ht(3103);var At=gt.asn1,xt=nt.exports=gt.pki=gt.pki||{},Et=xt.oids,yt={};yt.CN=Et.commonName,yt.commonName="CN",yt.C=Et.countryName,yt.countryName="C",yt.L=Et.localityName,yt.localityName="L",yt.ST=Et.stateOrProvinceName,yt.stateOrProvinceName="ST",yt.O=Et.organizationName,yt.organizationName="O",yt.OU=Et.organizationalUnitName,yt.organizationalUnitName="OU",yt.E=Et.emailAddress,yt.emailAddress="E";var Ct=gt.pki.rsa.publicKeyValidator,kt={name:"Certificate",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:At.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:At.Class.UNIVERSAL,type:At.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:At.Class.UNIVERSAL,type:At.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:At.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:At.Class.UNIVERSAL,type:At.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:At.Class.UNIVERSAL,type:At.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:At.Class.UNIVERSAL,type:At.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:At.Class.UNIVERSAL,type:At.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},Ct,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:At.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:At.Class.UNIVERSAL,type:At.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:At.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:At.Class.UNIVERSAL,type:At.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:At.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:At.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:At.Class.UNIVERSAL,type:At.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},vt={name:"rsapss",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:At.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:At.Class.UNIVERSAL,type:At.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:At.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:At.Class.UNIVERSAL,type:At.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:At.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:At.Class.UNIVERSAL,type:At.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:At.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:At.Class.UNIVERSAL,type:At.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},bt={name:"CertificationRequestInfo",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:At.Class.UNIVERSAL,type:At.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},Ct,{name:"CertificationRequestInfo.attributes",tagClass:At.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:At.Class.UNIVERSAL,type:At.Type.SET,constructed:!0}]}]}]},It={name:"CertificationRequest",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[bt,{name:"CertificationRequest.signatureAlgorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:At.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:At.Class.UNIVERSAL,type:At.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function wt(Ut,_t){typeof _t=="string"&&(_t={shortName:_t});for(var Xt,Qt=null,jt=0;Qt===null&&jt<Ut.attributes.length;++jt)Xt=Ut.attributes[jt],(_t.type&&_t.type===Xt.type||_t.name&&_t.name===Xt.name||_t.shortName&&_t.shortName===Xt.shortName)&&(Qt=Xt);return Qt}xt.RDNAttributesAsArray=function(Ut,_t){for(var Xt,Qt,jt,Gt=[],qt=0;qt<Ut.value.length;++qt){Xt=Ut.value[qt];for(var zt=0;zt<Xt.value.length;++zt)jt={},Qt=Xt.value[zt],jt.type=At.derToOid(Qt.value[0].value),jt.value=Qt.value[1].value,jt.valueTagClass=Qt.value[1].type,jt.type in Et&&(jt.name=Et[jt.type],jt.name in yt&&(jt.shortName=yt[jt.name])),_t&&(_t.update(jt.type),_t.update(jt.value)),Gt.push(jt)}return Gt},xt.CRIAttributesAsArray=function(Ut){for(var _t=[],Xt=0;Xt<Ut.length;++Xt)for(var Qt=Ut[Xt],jt=At.derToOid(Qt.value[0].value),Gt=Qt.value[1].value,qt=0;qt<Gt.length;++qt){var zt={};if(zt.type=jt,zt.value=Gt[qt].value,zt.valueTagClass=Gt[qt].type,zt.type in Et&&(zt.name=Et[zt.type],zt.name in yt&&(zt.shortName=yt[zt.name])),zt.type===Et.extensionRequest){zt.extensions=[];for(var e0=0;e0<zt.value.length;++e0)zt.extensions.push(xt.certificateExtensionFromAsn1(zt.value[e0]))}_t.push(zt)}return _t};var Rt=function(Ut,_t,Xt){var Qt={};if(Ut!==Et["RSASSA-PSS"])return Qt;Xt&&(Qt={hash:{algorithmOid:Et.sha1},mgf:{algorithmOid:Et.mgf1,hash:{algorithmOid:Et.sha1}},saltLength:20});var jt={},Gt=[];if(!At.validate(_t,vt,jt,Gt)){var qt=new Error("Cannot read RSASSA-PSS parameter block.");throw qt.errors=Gt,qt}return jt.hashOid!==void 0&&(Qt.hash=Qt.hash||{},Qt.hash.algorithmOid=At.derToOid(jt.hashOid)),jt.maskGenOid!==void 0&&(Qt.mgf=Qt.mgf||{},Qt.mgf.algorithmOid=At.derToOid(jt.maskGenOid),Qt.mgf.hash=Qt.mgf.hash||{},Qt.mgf.hash.algorithmOid=At.derToOid(jt.maskGenHashOid)),jt.saltLength!==void 0&&(Qt.saltLength=jt.saltLength.charCodeAt(0)),Qt},Tt=function(Ut){switch(Et[Ut.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return gt.md.sha1.create();case"md5WithRSAEncryption":return gt.md.md5.create();case"sha256WithRSAEncryption":case"RSASSA-PSS":return gt.md.sha256.create();case"sha384WithRSAEncryption":return gt.md.sha384.create();case"sha512WithRSAEncryption":return gt.md.sha512.create();default:var _t=new Error("Could not compute "+Ut.type+" digest. Unknown signature OID.");throw _t.signatureOid=Ut.signatureOid,_t}},Bt=function(Ut){var _t,Xt=Ut.certificate;switch(Xt.signatureOid){case Et.sha1WithRSAEncryption:case Et.sha1WithRSASignature:break;case Et["RSASSA-PSS"]:var Qt,jt,Gt;if((Qt=Et[Xt.signatureParameters.mgf.hash.algorithmOid])===void 0||gt.md[Qt]===void 0)throw(Gt=new Error("Unsupported MGF hash function.")).oid=Xt.signatureParameters.mgf.hash.algorithmOid,Gt.name=Qt,Gt;if((jt=Et[Xt.signatureParameters.mgf.algorithmOid])===void 0||gt.mgf[jt]===void 0)throw(Gt=new Error("Unsupported MGF function.")).oid=Xt.signatureParameters.mgf.algorithmOid,Gt.name=jt,Gt;if(jt=gt.mgf[jt].create(gt.md[Qt].create()),(Qt=Et[Xt.signatureParameters.hash.algorithmOid])===void 0||gt.md[Qt]===void 0)throw(Gt=new Error("Unsupported RSASSA-PSS hash function.")).oid=Xt.signatureParameters.hash.algorithmOid,Gt.name=Qt,Gt;_t=gt.pss.create(gt.md[Qt].create(),jt,Xt.signatureParameters.saltLength)}return Xt.publicKey.verify(Ut.md.digest().getBytes(),Ut.signature,_t)};function Dt(Ut){for(var _t,Xt,Qt=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),jt=Ut.attributes,Gt=0;Gt<jt.length;++Gt){var qt=(_t=jt[Gt]).value,zt=At.Type.PRINTABLESTRING;"valueTagClass"in _t&&(zt=_t.valueTagClass)===At.Type.UTF8&&(qt=gt.util.encodeUtf8(qt)),Xt=At.create(At.Class.UNIVERSAL,At.Type.SET,!0,[At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(_t.type).getBytes()),At.create(At.Class.UNIVERSAL,zt,!1,qt)])]),Qt.value.push(Xt)}return Qt}function Pt(Ut){for(var _t,Xt=0;Xt<Ut.length;++Xt){if((_t=Ut[Xt]).name===void 0&&(_t.type&&_t.type in xt.oids?_t.name=xt.oids[_t.type]:_t.shortName&&_t.shortName in yt&&(_t.name=xt.oids[yt[_t.shortName]])),_t.type===void 0){if(!_t.name||!(_t.name in xt.oids))throw(jt=new Error("Attribute type not specified.")).attribute=_t,jt;_t.type=xt.oids[_t.name]}if(_t.shortName===void 0&&_t.name&&_t.name in yt&&(_t.shortName=yt[_t.name]),_t.type===Et.extensionRequest&&(_t.valueConstructed=!0,_t.valueTagClass=At.Type.SEQUENCE,!_t.value&&_t.extensions)){_t.value=[];for(var Qt=0;Qt<_t.extensions.length;++Qt)_t.value.push(xt.certificateExtensionToAsn1(Nt(_t.extensions[Qt])))}var jt;if(_t.value===void 0)throw(jt=new Error("Attribute value not specified.")).attribute=_t,jt}}function Nt(Ut,_t){if(_t=_t||{},Ut.name===void 0&&Ut.id&&Ut.id in xt.oids&&(Ut.name=xt.oids[Ut.id]),Ut.id===void 0){if(!Ut.name||!(Ut.name in xt.oids))throw(o0=new Error("Extension ID not specified.")).extension=Ut,o0;Ut.id=xt.oids[Ut.name]}if(Ut.value!==void 0)return Ut;if(Ut.name==="keyUsage"){var Xt=0,Qt=0,jt=0;Ut.digitalSignature&&(Qt|=128,Xt=7),Ut.nonRepudiation&&(Qt|=64,Xt=6),Ut.keyEncipherment&&(Qt|=32,Xt=5),Ut.dataEncipherment&&(Qt|=16,Xt=4),Ut.keyAgreement&&(Qt|=8,Xt=3),Ut.keyCertSign&&(Qt|=4,Xt=2),Ut.cRLSign&&(Qt|=2,Xt=1),Ut.encipherOnly&&(Qt|=1,Xt=0),Ut.decipherOnly&&(jt|=128,Xt=7);var Gt=String.fromCharCode(Xt);jt!==0?Gt+=String.fromCharCode(Qt)+String.fromCharCode(jt):Qt!==0&&(Gt+=String.fromCharCode(Qt)),Ut.value=At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,Gt)}else if(Ut.name==="basicConstraints")Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),Ut.cA&&Ut.value.value.push(At.create(At.Class.UNIVERSAL,At.Type.BOOLEAN,!1,"ÿ")),"pathLenConstraint"in Ut&&Ut.value.value.push(At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,At.integerToDer(Ut.pathLenConstraint).getBytes()));else if(Ut.name==="extKeyUsage"){Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]);var qt=Ut.value.value;for(var zt in Ut)Ut[zt]===!0&&(zt in Et?qt.push(At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Et[zt]).getBytes())):zt.indexOf(".")!==-1&&qt.push(At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(zt).getBytes())))}else if(Ut.name==="nsCertType")Xt=0,Qt=0,Ut.client&&(Qt|=128,Xt=7),Ut.server&&(Qt|=64,Xt=6),Ut.email&&(Qt|=32,Xt=5),Ut.objsign&&(Qt|=16,Xt=4),Ut.reserved&&(Qt|=8,Xt=3),Ut.sslCA&&(Qt|=4,Xt=2),Ut.emailCA&&(Qt|=2,Xt=1),Ut.objCA&&(Qt|=1,Xt=0),Gt=String.fromCharCode(Xt),Qt!==0&&(Gt+=String.fromCharCode(Qt)),Ut.value=At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,Gt);else if(Ut.name==="subjectAltName"||Ut.name==="issuerAltName"){Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]);for(var e0=0;e0<Ut.altNames.length;++e0){if(Gt=(n0=Ut.altNames[e0]).value,n0.type===7&&n0.ip){if((Gt=gt.util.bytesFromIP(n0.ip))===null)throw(o0=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=Ut,o0}else n0.type===8&&(Gt=n0.oid?At.oidToDer(At.oidToDer(n0.oid)):At.oidToDer(Gt));Ut.value.value.push(At.create(At.Class.CONTEXT_SPECIFIC,n0.type,!1,Gt))}}else if(Ut.name==="nsComment"&&_t.cert){if(!/^[\x00-\x7F]*$/.test(Ut.comment)||Ut.comment.length<1||Ut.comment.length>128)throw new Error('Invalid "nsComment" content.');Ut.value=At.create(At.Class.UNIVERSAL,At.Type.IA5STRING,!1,Ut.comment)}else if(Ut.name==="subjectKeyIdentifier"&&_t.cert){var s0=_t.cert.generateSubjectKeyIdentifier();Ut.subjectKeyIdentifier=s0.toHex(),Ut.value=At.create(At.Class.UNIVERSAL,At.Type.OCTETSTRING,!1,s0.getBytes())}else if(Ut.name==="authorityKeyIdentifier"&&_t.cert){if(Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),qt=Ut.value.value,Ut.keyIdentifier){var t0=Ut.keyIdentifier===!0?_t.cert.generateSubjectKeyIdentifier().getBytes():Ut.keyIdentifier;qt.push(At.create(At.Class.CONTEXT_SPECIFIC,0,!1,t0))}if(Ut.authorityCertIssuer){var l0=[At.create(At.Class.CONTEXT_SPECIFIC,4,!0,[Dt(Ut.authorityCertIssuer===!0?_t.cert.issuer:Ut.authorityCertIssuer)])];qt.push(At.create(At.Class.CONTEXT_SPECIFIC,1,!0,l0))}if(Ut.serialNumber){var d0=gt.util.hexToBytes(Ut.serialNumber===!0?_t.cert.serialNumber:Ut.serialNumber);qt.push(At.create(At.Class.CONTEXT_SPECIFIC,2,!1,d0))}}else if(Ut.name==="cRLDistributionPoints"){Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),qt=Ut.value.value;var n0,g0=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),A0=At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[]);for(e0=0;e0<Ut.altNames.length;++e0){if(Gt=(n0=Ut.altNames[e0]).value,n0.type===7&&n0.ip){if((Gt=gt.util.bytesFromIP(n0.ip))===null)throw(o0=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=Ut,o0}else n0.type===8&&(Gt=n0.oid?At.oidToDer(At.oidToDer(n0.oid)):At.oidToDer(Gt));A0.value.push(At.create(At.Class.CONTEXT_SPECIFIC,n0.type,!1,Gt))}g0.value.push(At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[A0])),qt.push(g0)}var o0;if(Ut.value===void 0)throw(o0=new Error("Extension value not specified.")).extension=Ut,o0;return Ut}function Lt(Ut,_t){if(Ut===Et["RSASSA-PSS"]){var Xt=[];return _t.hash.algorithmOid!==void 0&&Xt.push(At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(_t.hash.algorithmOid).getBytes()),At.create(At.Class.UNIVERSAL,At.Type.NULL,!1,"")])])),_t.mgf.algorithmOid!==void 0&&Xt.push(At.create(At.Class.CONTEXT_SPECIFIC,1,!0,[At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(_t.mgf.algorithmOid).getBytes()),At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(_t.mgf.hash.algorithmOid).getBytes()),At.create(At.Class.UNIVERSAL,At.Type.NULL,!1,"")])])])),_t.saltLength!==void 0&&Xt.push(At.create(At.Class.CONTEXT_SPECIFIC,2,!0,[At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,At.integerToDer(_t.saltLength).getBytes())])),At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,Xt)}return At.create(At.Class.UNIVERSAL,At.Type.NULL,!1,"")}function Wt(Ut){var _t=At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[]);if(Ut.attributes.length===0)return _t;for(var Xt=Ut.attributes,Qt=0;Qt<Xt.length;++Qt){var jt=Xt[Qt],Gt=jt.value,qt=At.Type.UTF8;"valueTagClass"in jt&&(qt=jt.valueTagClass),qt===At.Type.UTF8&&(Gt=gt.util.encodeUtf8(Gt));var zt=!1;"valueConstructed"in jt&&(zt=jt.valueConstructed);var e0=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(jt.type).getBytes()),At.create(At.Class.UNIVERSAL,At.Type.SET,!0,[At.create(At.Class.UNIVERSAL,qt,zt,Gt)])]);_t.value.push(e0)}return _t}xt.certificateFromPem=function(Ut,_t,Xt){var Qt=gt.pem.decode(Ut)[0];if(Qt.type!=="CERTIFICATE"&&Qt.type!=="X509 CERTIFICATE"&&Qt.type!=="TRUSTED CERTIFICATE"){var jt=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw jt.headerType=Qt.type,jt}if(Qt.procType&&Qt.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var Gt=At.fromDer(Qt.body,Xt);return xt.certificateFromAsn1(Gt,_t)},xt.certificateToPem=function(Ut,_t){var Xt={type:"CERTIFICATE",body:At.toDer(xt.certificateToAsn1(Ut)).getBytes()};return gt.pem.encode(Xt,{maxline:_t})},xt.publicKeyFromPem=function(Ut){var _t=gt.pem.decode(Ut)[0];if(_t.type!=="PUBLIC KEY"&&_t.type!=="RSA PUBLIC KEY"){var Xt=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw Xt.headerType=_t.type,Xt}if(_t.procType&&_t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var Qt=At.fromDer(_t.body);return xt.publicKeyFromAsn1(Qt)},xt.publicKeyToPem=function(Ut,_t){var Xt={type:"PUBLIC KEY",body:At.toDer(xt.publicKeyToAsn1(Ut)).getBytes()};return gt.pem.encode(Xt,{maxline:_t})},xt.publicKeyToRSAPublicKeyPem=function(Ut,_t){var Xt={type:"RSA PUBLIC KEY",body:At.toDer(xt.publicKeyToRSAPublicKey(Ut)).getBytes()};return gt.pem.encode(Xt,{maxline:_t})},xt.getPublicKeyFingerprint=function(Ut,_t){var Xt,Qt=(_t=_t||{}).md||gt.md.sha1.create();switch(_t.type||"RSAPublicKey"){case"RSAPublicKey":Xt=At.toDer(xt.publicKeyToRSAPublicKey(Ut)).getBytes();break;case"SubjectPublicKeyInfo":Xt=At.toDer(xt.publicKeyToAsn1(Ut)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+_t.type+'".')}Qt.start(),Qt.update(Xt);var jt=Qt.digest();if(_t.encoding==="hex"){var Gt=jt.toHex();return _t.delimiter?Gt.match(/.{2}/g).join(_t.delimiter):Gt}if(_t.encoding==="binary")return jt.getBytes();if(_t.encoding)throw new Error('Unknown encoding "'+_t.encoding+'".');return jt},xt.certificationRequestFromPem=function(Ut,_t,Xt){var Qt=gt.pem.decode(Ut)[0];if(Qt.type!=="CERTIFICATE REQUEST"){var jt=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw jt.headerType=Qt.type,jt}if(Qt.procType&&Qt.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var Gt=At.fromDer(Qt.body,Xt);return xt.certificationRequestFromAsn1(Gt,_t)},xt.certificationRequestToPem=function(Ut,_t){var Xt={type:"CERTIFICATE REQUEST",body:At.toDer(xt.certificationRequestToAsn1(Ut)).getBytes()};return gt.pem.encode(Xt,{maxline:_t})},xt.createCertificate=function(){var Ut={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return Ut.siginfo.algorithmOid=null,Ut.validity={},Ut.validity.notBefore=new Date,Ut.validity.notAfter=new Date,Ut.issuer={},Ut.issuer.getField=function(_t){return wt(Ut.issuer,_t)},Ut.issuer.addField=function(_t){Pt([_t]),Ut.issuer.attributes.push(_t)},Ut.issuer.attributes=[],Ut.issuer.hash=null,Ut.subject={},Ut.subject.getField=function(_t){return wt(Ut.subject,_t)},Ut.subject.addField=function(_t){Pt([_t]),Ut.subject.attributes.push(_t)},Ut.subject.attributes=[],Ut.subject.hash=null,Ut.extensions=[],Ut.publicKey=null,Ut.md=null,Ut.setSubject=function(_t,Xt){Pt(_t),Ut.subject.attributes=_t,delete Ut.subject.uniqueId,Xt&&(Ut.subject.uniqueId=Xt),Ut.subject.hash=null},Ut.setIssuer=function(_t,Xt){Pt(_t),Ut.issuer.attributes=_t,delete Ut.issuer.uniqueId,Xt&&(Ut.issuer.uniqueId=Xt),Ut.issuer.hash=null},Ut.setExtensions=function(_t){for(var Xt=0;Xt<_t.length;++Xt)Nt(_t[Xt],{cert:Ut});Ut.extensions=_t},Ut.getExtension=function(_t){typeof _t=="string"&&(_t={name:_t});for(var Xt,Qt=null,jt=0;Qt===null&&jt<Ut.extensions.length;++jt)Xt=Ut.extensions[jt],(_t.id&&Xt.id===_t.id||_t.name&&Xt.name===_t.name)&&(Qt=Xt);return Qt},Ut.sign=function(_t,Xt){Ut.md=Xt||gt.md.sha1.create();var Qt=Et[Ut.md.algorithm+"WithRSAEncryption"];if(!Qt){var jt=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw jt.algorithm=Ut.md.algorithm,jt}Ut.signatureOid=Ut.siginfo.algorithmOid=Qt,Ut.tbsCertificate=xt.getTBSCertificate(Ut);var Gt=At.toDer(Ut.tbsCertificate);Ut.md.update(Gt.getBytes()),Ut.signature=_t.sign(Ut.md)},Ut.verify=function(_t){var Xt=!1;if(!Ut.issued(_t)){var Qt=_t.issuer,jt=Ut.subject,Gt=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw Gt.expectedIssuer=jt.attributes,Gt.actualIssuer=Qt.attributes,Gt}var qt=_t.md;if(qt===null){qt=Tt({signatureOid:_t.signatureOid,type:"certificate"});var zt=_t.tbsCertificate||xt.getTBSCertificate(_t),e0=At.toDer(zt);qt.update(e0.getBytes())}return qt!==null&&(Xt=Bt({certificate:Ut,md:qt,signature:_t.signature})),Xt},Ut.isIssuer=function(_t){var Xt=!1,Qt=Ut.issuer,jt=_t.subject;if(Qt.hash&&jt.hash)Xt=Qt.hash===jt.hash;else if(Qt.attributes.length===jt.attributes.length){var Gt,qt;Xt=!0;for(var zt=0;Xt&&zt<Qt.attributes.length;++zt)Gt=Qt.attributes[zt],qt=jt.attributes[zt],Gt.type===qt.type&&Gt.value===qt.value||(Xt=!1)}return Xt},Ut.issued=function(_t){return _t.isIssuer(Ut)},Ut.generateSubjectKeyIdentifier=function(){return xt.getPublicKeyFingerprint(Ut.publicKey,{type:"RSAPublicKey"})},Ut.verifySubjectKeyIdentifier=function(){for(var _t=Et.subjectKeyIdentifier,Xt=0;Xt<Ut.extensions.length;++Xt){var Qt=Ut.extensions[Xt];if(Qt.id===_t){var jt=Ut.generateSubjectKeyIdentifier().getBytes();return gt.util.hexToBytes(Qt.subjectKeyIdentifier)===jt}}return!1},Ut},xt.certificateFromAsn1=function(Ut,_t){var Xt={},Qt=[];if(!At.validate(Ut,kt,Xt,Qt)){var jt=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw jt.errors=Qt,jt}if(At.derToOid(Xt.publicKeyOid)!==xt.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var Gt=xt.createCertificate();Gt.version=Xt.certVersion?Xt.certVersion.charCodeAt(0):0;var qt=gt.util.createBuffer(Xt.certSerialNumber);Gt.serialNumber=qt.toHex(),Gt.signatureOid=gt.asn1.derToOid(Xt.certSignatureOid),Gt.signatureParameters=Rt(Gt.signatureOid,Xt.certSignatureParams,!0),Gt.siginfo.algorithmOid=gt.asn1.derToOid(Xt.certinfoSignatureOid),Gt.siginfo.parameters=Rt(Gt.siginfo.algorithmOid,Xt.certinfoSignatureParams,!1),Gt.signature=Xt.certSignature;var zt=[];if(Xt.certValidity1UTCTime!==void 0&&zt.push(At.utcTimeToDate(Xt.certValidity1UTCTime)),Xt.certValidity2GeneralizedTime!==void 0&&zt.push(At.generalizedTimeToDate(Xt.certValidity2GeneralizedTime)),Xt.certValidity3UTCTime!==void 0&&zt.push(At.utcTimeToDate(Xt.certValidity3UTCTime)),Xt.certValidity4GeneralizedTime!==void 0&&zt.push(At.generalizedTimeToDate(Xt.certValidity4GeneralizedTime)),zt.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(zt.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(Gt.validity.notBefore=zt[0],Gt.validity.notAfter=zt[1],Gt.tbsCertificate=Xt.tbsCertificate,_t){Gt.md=Tt({signatureOid:Gt.signatureOid,type:"certificate"});var e0=At.toDer(Gt.tbsCertificate);Gt.md.update(e0.getBytes())}var s0=gt.md.sha1.create(),t0=At.toDer(Xt.certIssuer);s0.update(t0.getBytes()),Gt.issuer.getField=function(n0){return wt(Gt.issuer,n0)},Gt.issuer.addField=function(n0){Pt([n0]),Gt.issuer.attributes.push(n0)},Gt.issuer.attributes=xt.RDNAttributesAsArray(Xt.certIssuer),Xt.certIssuerUniqueId&&(Gt.issuer.uniqueId=Xt.certIssuerUniqueId),Gt.issuer.hash=s0.digest().toHex();var l0=gt.md.sha1.create(),d0=At.toDer(Xt.certSubject);return l0.update(d0.getBytes()),Gt.subject.getField=function(n0){return wt(Gt.subject,n0)},Gt.subject.addField=function(n0){Pt([n0]),Gt.subject.attributes.push(n0)},Gt.subject.attributes=xt.RDNAttributesAsArray(Xt.certSubject),Xt.certSubjectUniqueId&&(Gt.subject.uniqueId=Xt.certSubjectUniqueId),Gt.subject.hash=l0.digest().toHex(),Xt.certExtensions?Gt.extensions=xt.certificateExtensionsFromAsn1(Xt.certExtensions):Gt.extensions=[],Gt.publicKey=xt.publicKeyFromAsn1(Xt.subjectPublicKeyInfo),Gt},xt.certificateExtensionsFromAsn1=function(Ut){for(var _t=[],Xt=0;Xt<Ut.value.length;++Xt)for(var Qt=Ut.value[Xt],jt=0;jt<Qt.value.length;++jt)_t.push(xt.certificateExtensionFromAsn1(Qt.value[jt]));return _t},xt.certificateExtensionFromAsn1=function(Ut){var _t={};if(_t.id=At.derToOid(Ut.value[0].value),_t.critical=!1,Ut.value[1].type===At.Type.BOOLEAN?(_t.critical=Ut.value[1].value.charCodeAt(0)!==0,_t.value=Ut.value[2].value):_t.value=Ut.value[1].value,_t.id in Et)if(_t.name=Et[_t.id],_t.name==="keyUsage"){var Xt=0,Qt=0;(Gt=At.fromDer(_t.value)).value.length>1&&(Xt=Gt.value.charCodeAt(1),Qt=Gt.value.length>2?Gt.value.charCodeAt(2):0),_t.digitalSignature=(128&Xt)==128,_t.nonRepudiation=(64&Xt)==64,_t.keyEncipherment=(32&Xt)==32,_t.dataEncipherment=(16&Xt)==16,_t.keyAgreement=(8&Xt)==8,_t.keyCertSign=(4&Xt)==4,_t.cRLSign=(2&Xt)==2,_t.encipherOnly=(1&Xt)==1,_t.decipherOnly=(128&Qt)==128}else if(_t.name==="basicConstraints"){(Gt=At.fromDer(_t.value)).value.length>0&&Gt.value[0].type===At.Type.BOOLEAN?_t.cA=Gt.value[0].value.charCodeAt(0)!==0:_t.cA=!1;var jt=null;Gt.value.length>0&&Gt.value[0].type===At.Type.INTEGER?jt=Gt.value[0].value:Gt.value.length>1&&(jt=Gt.value[1].value),jt!==null&&(_t.pathLenConstraint=At.derToInteger(jt))}else if(_t.name==="extKeyUsage")for(var Gt=At.fromDer(_t.value),qt=0;qt<Gt.value.length;++qt){var zt=At.derToOid(Gt.value[qt].value);zt in Et?_t[Et[zt]]=!0:_t[zt]=!0}else if(_t.name==="nsCertType")Xt=0,(Gt=At.fromDer(_t.value)).value.length>1&&(Xt=Gt.value.charCodeAt(1)),_t.client=(128&Xt)==128,_t.server=(64&Xt)==64,_t.email=(32&Xt)==32,_t.objsign=(16&Xt)==16,_t.reserved=(8&Xt)==8,_t.sslCA=(4&Xt)==4,_t.emailCA=(2&Xt)==2,_t.objCA=(1&Xt)==1;else if(_t.name==="subjectAltName"||_t.name==="issuerAltName"){var e0;_t.altNames=[],Gt=At.fromDer(_t.value);for(var s0=0;s0<Gt.value.length;++s0){var t0={type:(e0=Gt.value[s0]).type,value:e0.value};switch(_t.altNames.push(t0),e0.type){case 1:case 2:case 6:break;case 7:t0.ip=gt.util.bytesToIP(e0.value);break;case 8:t0.oid=At.derToOid(e0.value)}}}else _t.name==="subjectKeyIdentifier"&&(Gt=At.fromDer(_t.value),_t.subjectKeyIdentifier=gt.util.bytesToHex(Gt.value));return _t},xt.certificationRequestFromAsn1=function(Ut,_t){var Xt={},Qt=[];if(!At.validate(Ut,It,Xt,Qt)){var jt=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw jt.errors=Qt,jt}if(At.derToOid(Xt.publicKeyOid)!==xt.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var Gt=xt.createCertificationRequest();if(Gt.version=Xt.csrVersion?Xt.csrVersion.charCodeAt(0):0,Gt.signatureOid=gt.asn1.derToOid(Xt.csrSignatureOid),Gt.signatureParameters=Rt(Gt.signatureOid,Xt.csrSignatureParams,!0),Gt.siginfo.algorithmOid=gt.asn1.derToOid(Xt.csrSignatureOid),Gt.siginfo.parameters=Rt(Gt.siginfo.algorithmOid,Xt.csrSignatureParams,!1),Gt.signature=Xt.csrSignature,Gt.certificationRequestInfo=Xt.certificationRequestInfo,_t){Gt.md=Tt({signatureOid:Gt.signatureOid,type:"certification request"});var qt=At.toDer(Gt.certificationRequestInfo);Gt.md.update(qt.getBytes())}var zt=gt.md.sha1.create();return Gt.subject.getField=function(e0){return wt(Gt.subject,e0)},Gt.subject.addField=function(e0){Pt([e0]),Gt.subject.attributes.push(e0)},Gt.subject.attributes=xt.RDNAttributesAsArray(Xt.certificationRequestInfoSubject,zt),Gt.subject.hash=zt.digest().toHex(),Gt.publicKey=xt.publicKeyFromAsn1(Xt.subjectPublicKeyInfo),Gt.getAttribute=function(e0){return wt(Gt,e0)},Gt.addAttribute=function(e0){Pt([e0]),Gt.attributes.push(e0)},Gt.attributes=xt.CRIAttributesAsArray(Xt.certificationRequestInfoAttributes||[]),Gt},xt.createCertificationRequest=function(){var Ut={version:0,signatureOid:null,signature:null,siginfo:{}};return Ut.siginfo.algorithmOid=null,Ut.subject={},Ut.subject.getField=function(_t){return wt(Ut.subject,_t)},Ut.subject.addField=function(_t){Pt([_t]),Ut.subject.attributes.push(_t)},Ut.subject.attributes=[],Ut.subject.hash=null,Ut.publicKey=null,Ut.attributes=[],Ut.getAttribute=function(_t){return wt(Ut,_t)},Ut.addAttribute=function(_t){Pt([_t]),Ut.attributes.push(_t)},Ut.md=null,Ut.setSubject=function(_t){Pt(_t),Ut.subject.attributes=_t,Ut.subject.hash=null},Ut.setAttributes=function(_t){Pt(_t),Ut.attributes=_t},Ut.sign=function(_t,Xt){Ut.md=Xt||gt.md.sha1.create();var Qt=Et[Ut.md.algorithm+"WithRSAEncryption"];if(!Qt){var jt=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw jt.algorithm=Ut.md.algorithm,jt}Ut.signatureOid=Ut.siginfo.algorithmOid=Qt,Ut.certificationRequestInfo=xt.getCertificationRequestInfo(Ut);var Gt=At.toDer(Ut.certificationRequestInfo);Ut.md.update(Gt.getBytes()),Ut.signature=_t.sign(Ut.md)},Ut.verify=function(){var _t=!1,Xt=Ut.md;if(Xt===null){Xt=Tt({signatureOid:Ut.signatureOid,type:"certification request"});var Qt=Ut.certificationRequestInfo||xt.getCertificationRequestInfo(Ut),jt=At.toDer(Qt);Xt.update(jt.getBytes())}return Xt!==null&&(_t=Bt({certificate:Ut,md:Xt,signature:Ut.signature})),_t},Ut};var $t=new Date("1950-01-01T00:00:00Z"),Kt=new Date("2050-01-01T00:00:00Z");function Vt(Ut){return Ut>=$t&&Ut<Kt?At.create(At.Class.UNIVERSAL,At.Type.UTCTIME,!1,At.dateToUtcTime(Ut)):At.create(At.Class.UNIVERSAL,At.Type.GENERALIZEDTIME,!1,At.dateToGeneralizedTime(Ut))}xt.getTBSCertificate=function(Ut){var _t=Vt(Ut.validity.notBefore),Xt=Vt(Ut.validity.notAfter),Qt=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,At.integerToDer(Ut.version).getBytes())]),At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,gt.util.hexToBytes(Ut.serialNumber)),At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Ut.siginfo.algorithmOid).getBytes()),Lt(Ut.siginfo.algorithmOid,Ut.siginfo.parameters)]),Dt(Ut.issuer),At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[_t,Xt]),Dt(Ut.subject),xt.publicKeyToAsn1(Ut.publicKey)]);return Ut.issuer.uniqueId&&Qt.value.push(At.create(At.Class.CONTEXT_SPECIFIC,1,!0,[At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,"\0"+Ut.issuer.uniqueId)])),Ut.subject.uniqueId&&Qt.value.push(At.create(At.Class.CONTEXT_SPECIFIC,2,!0,[At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,"\0"+Ut.subject.uniqueId)])),Ut.extensions.length>0&&Qt.value.push(xt.certificateExtensionsToAsn1(Ut.extensions)),Qt},xt.getCertificationRequestInfo=function(Ut){return At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,At.integerToDer(Ut.version).getBytes()),Dt(Ut.subject),xt.publicKeyToAsn1(Ut.publicKey),Wt(Ut)])},xt.distinguishedNameToAsn1=function(Ut){return Dt(Ut)},xt.certificateToAsn1=function(Ut){var _t=Ut.tbsCertificate||xt.getTBSCertificate(Ut);return At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[_t,At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Ut.signatureOid).getBytes()),Lt(Ut.signatureOid,Ut.signatureParameters)]),At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,"\0"+Ut.signature)])},xt.certificateExtensionsToAsn1=function(Ut){var _t=At.create(At.Class.CONTEXT_SPECIFIC,3,!0,[]),Xt=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]);_t.value.push(Xt);for(var Qt=0;Qt<Ut.length;++Qt)Xt.value.push(xt.certificateExtensionToAsn1(Ut[Qt]));return _t},xt.certificateExtensionToAsn1=function(Ut){var _t=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]);_t.value.push(At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Ut.id).getBytes())),Ut.critical&&_t.value.push(At.create(At.Class.UNIVERSAL,At.Type.BOOLEAN,!1,"ÿ"));var Xt=Ut.value;return typeof Ut.value!="string"&&(Xt=At.toDer(Xt).getBytes()),_t.value.push(At.create(At.Class.UNIVERSAL,At.Type.OCTETSTRING,!1,Xt)),_t},xt.certificationRequestToAsn1=function(Ut){var _t=Ut.certificationRequestInfo||xt.getCertificationRequestInfo(Ut);return At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[_t,At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Ut.signatureOid).getBytes()),Lt(Ut.signatureOid,Ut.signatureParameters)]),At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,"\0"+Ut.signature)])},xt.createCaStore=function(Ut){var _t={certs:{}};function Xt(qt){return Qt(qt),_t.certs[qt.hash]||null}function Qt(qt){if(!qt.hash){var zt=gt.md.sha1.create();qt.attributes=xt.RDNAttributesAsArray(Dt(qt),zt),qt.hash=zt.digest().toHex()}}if(_t.getIssuer=function(qt){return Xt(qt.issuer)},_t.addCertificate=function(qt){if(typeof qt=="string"&&(qt=gt.pki.certificateFromPem(qt)),Qt(qt.subject),!_t.hasCertificate(qt))if(qt.subject.hash in _t.certs){var zt=_t.certs[qt.subject.hash];gt.util.isArray(zt)||(zt=[zt]),zt.push(qt),_t.certs[qt.subject.hash]=zt}else _t.certs[qt.subject.hash]=qt},_t.hasCertificate=function(qt){typeof qt=="string"&&(qt=gt.pki.certificateFromPem(qt));var zt=Xt(qt.subject);if(!zt)return!1;gt.util.isArray(zt)||(zt=[zt]);for(var e0=At.toDer(xt.certificateToAsn1(qt)).getBytes(),s0=0;s0<zt.length;++s0)if(e0===At.toDer(xt.certificateToAsn1(zt[s0])).getBytes())return!0;return!1},_t.listAllCertificates=function(){var qt=[];for(var zt in _t.certs)if(_t.certs.hasOwnProperty(zt)){var e0=_t.certs[zt];if(gt.util.isArray(e0))for(var s0=0;s0<e0.length;++s0)qt.push(e0[s0]);else qt.push(e0)}return qt},_t.removeCertificate=function(qt){var zt;if(typeof qt=="string"&&(qt=gt.pki.certificateFromPem(qt)),Qt(qt.subject),!_t.hasCertificate(qt))return null;var e0=Xt(qt.subject);if(!gt.util.isArray(e0))return zt=_t.certs[qt.subject.hash],delete _t.certs[qt.subject.hash],zt;for(var s0=At.toDer(xt.certificateToAsn1(qt)).getBytes(),t0=0;t0<e0.length;++t0)s0===At.toDer(xt.certificateToAsn1(e0[t0])).getBytes()&&(zt=e0[t0],e0.splice(t0,1));return e0.length===0&&delete _t.certs[qt.subject.hash],zt},Ut)for(var jt=0;jt<Ut.length;++jt){var Gt=Ut[jt];_t.addCertificate(Gt)}return _t},xt.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},xt.verifyCertificateChain=function(Ut,_t,Xt){typeof Xt=="function"&&(Xt={verify:Xt}),Xt=Xt||{};var Qt=(_t=_t.slice(0)).slice(0),jt=Xt.validityCheckDate;jt===void 0&&(jt=new Date);var Gt=!0,qt=null,zt=0;do{var e0=_t.shift(),s0=null,t0=!1;if(jt&&(jt<e0.validity.notBefore||jt>e0.validity.notAfter)&&(qt={message:"Certificate is not valid yet or has expired.",error:xt.certificateError.certificate_expired,notBefore:e0.validity.notBefore,notAfter:e0.validity.notAfter,now:jt}),qt===null){if((s0=_t[0]||Ut.getIssuer(e0))===null&&e0.isIssuer(e0)&&(t0=!0,s0=e0),s0){var l0=s0;gt.util.isArray(l0)||(l0=[l0]);for(var d0=!1;!d0&&l0.length>0;){s0=l0.shift();try{d0=s0.verify(e0)}catch{}}d0||(qt={message:"Certificate signature is invalid.",error:xt.certificateError.bad_certificate})}qt!==null||s0&&!t0||Ut.hasCertificate(e0)||(qt={message:"Certificate is not trusted.",error:xt.certificateError.unknown_ca})}if(qt===null&&s0&&!e0.isIssuer(s0)&&(qt={message:"Certificate issuer is invalid.",error:xt.certificateError.bad_certificate}),qt===null)for(var n0={keyUsage:!0,basicConstraints:!0},g0=0;qt===null&&g0<e0.extensions.length;++g0){var A0=e0.extensions[g0];A0.critical&&!(A0.name in n0)&&(qt={message:"Certificate has an unsupported critical extension.",error:xt.certificateError.unsupported_certificate})}if(qt===null&&(!Gt||_t.length===0&&(!s0||t0))){var o0=e0.getExtension("basicConstraints"),r0=e0.getExtension("keyUsage");r0!==null&&(r0.keyCertSign&&o0!==null||(qt={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:xt.certificateError.bad_certificate})),qt!==null||o0===null||o0.cA||(qt={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:xt.certificateError.bad_certificate}),qt===null&&r0!==null&&"pathLenConstraint"in o0&&zt-1>o0.pathLenConstraint&&(qt={message:"Certificate basicConstraints pathLenConstraint violated.",error:xt.certificateError.bad_certificate})}var Yt=qt===null||qt.error,Mt=Xt.verify?Xt.verify(Yt,zt,Qt):Yt;if(Mt!==!0)throw Yt===!0&&(qt={message:"The application rejected the certificate.",error:xt.certificateError.bad_certificate}),(Mt||Mt===0)&&(typeof Mt!="object"||gt.util.isArray(Mt)?typeof Mt=="string"&&(qt.error=Mt):(Mt.message&&(qt.message=Mt.message),Mt.error&&(qt.error=Mt.error))),qt;qt=null,Gt=!1,++zt}while(_t.length>0);return!0}},4406:nt=>{var ft,ht,gt=nt.exports={};function At(){throw new Error("setTimeout has not been defined")}function xt(){throw new Error("clearTimeout has not been defined")}function Et(Tt){if(ft===setTimeout)return setTimeout(Tt,0);if((ft===At||!ft)&&setTimeout)return ft=setTimeout,setTimeout(Tt,0);try{return ft(Tt,0)}catch{try{return ft.call(null,Tt,0)}catch{return ft.call(this,Tt,0)}}}(function(){try{ft=typeof setTimeout=="function"?setTimeout:At}catch{ft=At}try{ht=typeof clearTimeout=="function"?clearTimeout:xt}catch{ht=xt}})();var yt,Ct=[],kt=!1,vt=-1;function bt(){kt&&yt&&(kt=!1,yt.length?Ct=yt.concat(Ct):vt=-1,Ct.length&&It())}function It(){if(!kt){var Tt=Et(bt);kt=!0;for(var Bt=Ct.length;Bt;){for(yt=Ct,Ct=[];++vt<Bt;)yt&&yt[vt].run();vt=-1,Bt=Ct.length}yt=null,kt=!1,function(Dt){if(ht===clearTimeout)return clearTimeout(Dt);if((ht===xt||!ht)&&clearTimeout)return ht=clearTimeout,clearTimeout(Dt);try{ht(Dt)}catch{try{return ht.call(null,Dt)}catch{return ht.call(this,Dt)}}}(Tt)}}function wt(Tt,Bt){this.fun=Tt,this.array=Bt}function Rt(){}gt.nextTick=function(Tt){var Bt=new Array(arguments.length-1);if(arguments.length>1)for(var Dt=1;Dt<arguments.length;Dt++)Bt[Dt-1]=arguments[Dt];Ct.push(new wt(Tt,Bt)),Ct.length!==1||kt||Et(It)},wt.prototype.run=function(){this.fun.apply(null,this.array)},gt.title="browser",gt.browser=!0,gt.env={},gt.argv=[],gt.version="",gt.versions={},gt.on=Rt,gt.addListener=Rt,gt.once=Rt,gt.off=Rt,gt.removeListener=Rt,gt.removeAllListeners=Rt,gt.emit=Rt,gt.prependListener=Rt,gt.prependOnceListener=Rt,gt.listeners=function(Tt){return[]},gt.binding=function(Tt){throw new Error("process.binding is not supported")},gt.cwd=function(){return"/"},gt.chdir=function(Tt){throw new Error("process.chdir is not supported")},gt.umask=function(){return 0}},4452:nt=>{var ft={};function ht(At,xt,Et){Et||(Et=Error);var yt=function(Ct){var kt,vt;function bt(It,wt,Rt){return Ct.call(this,function(Tt,Bt,Dt){return typeof xt=="string"?xt:xt(Tt,Bt,Dt)}(It,wt,Rt))||this}return vt=Ct,(kt=bt).prototype=Object.create(vt.prototype),kt.prototype.constructor=kt,kt.__proto__=vt,bt}(Et);yt.prototype.name=Et.name,yt.prototype.code=At,ft[At]=yt}function gt(At,xt){if(Array.isArray(At)){var Et=At.length;return At=At.map(function(yt){return String(yt)}),Et>2?"one of ".concat(xt," ").concat(At.slice(0,Et-1).join(", "),", or ")+At[Et-1]:Et===2?"one of ".concat(xt," ").concat(At[0]," or ").concat(At[1]):"of ".concat(xt," ").concat(At[0])}return"of ".concat(xt," ").concat(String(At))}ht("ERR_INVALID_OPT_VALUE",function(At,xt){return'The value "'+xt+'" is invalid for option "'+At+'"'},TypeError),ht("ERR_INVALID_ARG_TYPE",function(At,xt,Et){var yt,Ct,kt,vt,bt;if(typeof xt=="string"&&(Ct="not ",xt.substr(0,Ct.length)===Ct)?(yt="must not be",xt=xt.replace(/^not /,"")):yt="must be",function(wt,Rt,Tt){return(Tt===void 0||Tt>wt.length)&&(Tt=wt.length),wt.substring(Tt-Rt.length,Tt)===Rt}(At," argument"))kt="The ".concat(At," ").concat(yt," ").concat(gt(xt,"type"));else{var It=(typeof bt!="number"&&(bt=0),bt+1>(vt=At).length||vt.indexOf(".",bt)===-1?"argument":"property");kt='The "'.concat(At,'" ').concat(It," ").concat(yt," ").concat(gt(xt,"type"))}return kt+". Received type ".concat(typeof Et)},TypeError),ht("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ht("ERR_METHOD_NOT_IMPLEMENTED",function(At){return"The "+At+" method is not implemented"}),ht("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ht("ERR_STREAM_DESTROYED",function(At){return"Cannot call "+At+" after a stream was destroyed"}),ht("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ht("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ht("ERR_STREAM_WRITE_AFTER_END","write after end"),ht("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ht("ERR_UNKNOWN_ENCODING",function(At){return"Unknown encoding: "+At},TypeError),ht("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),nt.exports.q=ft},7073:(nt,ft,ht)=>{var gt=Object.keys||function(It){var wt=[];for(var Rt in It)wt.push(Rt);return wt};nt.exports=kt;var At=ht(8051),xt=ht(2557);ht(1285)(kt,At);for(var Et=gt(xt.prototype),yt=0;yt<Et.length;yt++){var Ct=Et[yt];kt.prototype[Ct]||(kt.prototype[Ct]=xt.prototype[Ct])}function kt(It){if(!(this instanceof kt))return new kt(It);At.call(this,It),xt.call(this,It),this.allowHalfOpen=!0,It&&(It.readable===!1&&(this.readable=!1),It.writable===!1&&(this.writable=!1),It.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",vt)))}function vt(){this._writableState.ended||process.nextTick(bt,this)}function bt(It){It.end()}Object.defineProperty(kt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(kt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(kt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(kt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(It){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=It,this._writableState.destroyed=It)}})},5163:(nt,ft,ht)=>{nt.exports=At;var gt=ht(7640);function At(xt){if(!(this instanceof At))return new At(xt);gt.call(this,xt)}ht(1285)(At,gt),At.prototype._transform=function(xt,Et,yt){yt(null,xt)}},8051:(nt,ft,ht)=>{var gt;nt.exports=Vt,Vt.ReadableState=Kt,ht(2699).EventEmitter;var At,xt=function(o0,r0){return o0.listeners(r0).length},Et=ht(5010),yt=ht(8834).Buffer,Ct=ht.g.Uint8Array||function(){},kt=ht(6602);At=kt&&kt.debuglog?kt.debuglog("stream"):function(){};var vt,bt,It,wt=ht(6637),Rt=ht(2262),Tt=ht(7605).getHighWaterMark,Bt=ht(4452).q,Dt=Bt.ERR_INVALID_ARG_TYPE,Pt=Bt.ERR_STREAM_PUSH_AFTER_EOF,Nt=Bt.ERR_METHOD_NOT_IMPLEMENTED,Lt=Bt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;ht(1285)(Vt,Et);var Wt=Rt.errorOrDestroy,$t=["error","close","destroy","pause","resume"];function Kt(o0,r0,Yt){gt=gt||ht(7073),o0=o0||{},typeof Yt!="boolean"&&(Yt=r0 instanceof gt),this.objectMode=!!o0.objectMode,Yt&&(this.objectMode=this.objectMode||!!o0.readableObjectMode),this.highWaterMark=Tt(this,o0,"readableHighWaterMark",Yt),this.buffer=new wt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=o0.emitClose!==!1,this.autoDestroy=!!o0.autoDestroy,this.destroyed=!1,this.defaultEncoding=o0.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o0.encoding&&(vt||(vt=ht(214).s),this.decoder=new vt(o0.encoding),this.encoding=o0.encoding)}function Vt(o0){if(gt=gt||ht(7073),!(this instanceof Vt))return new Vt(o0);var r0=this instanceof gt;this._readableState=new Kt(o0,this,r0),this.readable=!0,o0&&(typeof o0.read=="function"&&(this._read=o0.read),typeof o0.destroy=="function"&&(this._destroy=o0.destroy)),Et.call(this)}function Ut(o0,r0,Yt,Mt,Jt){At("readableAddChunk",r0);var a0,i0=o0._readableState;if(r0===null)i0.reading=!1,function(f0,u0){if(At("onEofChunk"),!u0.ended){if(u0.decoder){var x0=u0.decoder.end();x0&&x0.length&&(u0.buffer.push(x0),u0.length+=u0.objectMode?1:x0.length)}u0.ended=!0,u0.sync?jt(f0):(u0.needReadable=!1,u0.emittedReadable||(u0.emittedReadable=!0,Gt(f0)))}}(o0,i0);else if(Jt||(a0=function(f0,u0){var x0,p0;return p0=u0,yt.isBuffer(p0)||p0 instanceof Ct||typeof u0=="string"||u0===void 0||f0.objectMode||(x0=new Dt("chunk",["string","Buffer","Uint8Array"],u0)),x0}(i0,r0)),a0)Wt(o0,a0);else if(i0.objectMode||r0&&r0.length>0)if(typeof r0=="string"||i0.objectMode||Object.getPrototypeOf(r0)===yt.prototype||(r0=function(f0){return yt.from(f0)}(r0)),Mt)i0.endEmitted?Wt(o0,new Lt):_t(o0,i0,r0,!0);else if(i0.ended)Wt(o0,new Pt);else{if(i0.destroyed)return!1;i0.reading=!1,i0.decoder&&!Yt?(r0=i0.decoder.write(r0),i0.objectMode||r0.length!==0?_t(o0,i0,r0,!1):qt(o0,i0)):_t(o0,i0,r0,!1)}else Mt||(i0.reading=!1,qt(o0,i0));return!i0.ended&&(i0.length<i0.highWaterMark||i0.length===0)}function _t(o0,r0,Yt,Mt){r0.flowing&&r0.length===0&&!r0.sync?(r0.awaitDrain=0,o0.emit("data",Yt)):(r0.length+=r0.objectMode?1:Yt.length,Mt?r0.buffer.unshift(Yt):r0.buffer.push(Yt),r0.needReadable&&jt(o0)),qt(o0,r0)}Object.defineProperty(Vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(o0){this._readableState&&(this._readableState.destroyed=o0)}}),Vt.prototype.destroy=Rt.destroy,Vt.prototype._undestroy=Rt.undestroy,Vt.prototype._destroy=function(o0,r0){r0(o0)},Vt.prototype.push=function(o0,r0){var Yt,Mt=this._readableState;return Mt.objectMode?Yt=!0:typeof o0=="string"&&((r0=r0||Mt.defaultEncoding)!==Mt.encoding&&(o0=yt.from(o0,r0),r0=""),Yt=!0),Ut(this,o0,r0,!1,Yt)},Vt.prototype.unshift=function(o0){return Ut(this,o0,null,!0,!1)},Vt.prototype.isPaused=function(){return this._readableState.flowing===!1},Vt.prototype.setEncoding=function(o0){vt||(vt=ht(214).s);var r0=new vt(o0);this._readableState.decoder=r0,this._readableState.encoding=this._readableState.decoder.encoding;for(var Yt=this._readableState.buffer.head,Mt="";Yt!==null;)Mt+=r0.write(Yt.data),Yt=Yt.next;return this._readableState.buffer.clear(),Mt!==""&&this._readableState.buffer.push(Mt),this._readableState.length=Mt.length,this};var Xt=1073741824;function Qt(o0,r0){return o0<=0||r0.length===0&&r0.ended?0:r0.objectMode?1:o0!=o0?r0.flowing&&r0.length?r0.buffer.head.data.length:r0.length:(o0>r0.highWaterMark&&(r0.highWaterMark=function(Yt){return Yt>=Xt?Yt=Xt:(Yt--,Yt|=Yt>>>1,Yt|=Yt>>>2,Yt|=Yt>>>4,Yt|=Yt>>>8,Yt|=Yt>>>16,Yt++),Yt}(o0)),o0<=r0.length?o0:r0.ended?r0.length:(r0.needReadable=!0,0))}function jt(o0){var r0=o0._readableState;At("emitReadable",r0.needReadable,r0.emittedReadable),r0.needReadable=!1,r0.emittedReadable||(At("emitReadable",r0.flowing),r0.emittedReadable=!0,process.nextTick(Gt,o0))}function Gt(o0){var r0=o0._readableState;At("emitReadable_",r0.destroyed,r0.length,r0.ended),r0.destroyed||!r0.length&&!r0.ended||(o0.emit("readable"),r0.emittedReadable=!1),r0.needReadable=!r0.flowing&&!r0.ended&&r0.length<=r0.highWaterMark,l0(o0)}function qt(o0,r0){r0.readingMore||(r0.readingMore=!0,process.nextTick(zt,o0,r0))}function zt(o0,r0){for(;!r0.reading&&!r0.ended&&(r0.length<r0.highWaterMark||r0.flowing&&r0.length===0);){var Yt=r0.length;if(At("maybeReadMore read 0"),o0.read(0),Yt===r0.length)break}r0.readingMore=!1}function e0(o0){var r0=o0._readableState;r0.readableListening=o0.listenerCount("readable")>0,r0.resumeScheduled&&!r0.paused?r0.flowing=!0:o0.listenerCount("data")>0&&o0.resume()}function s0(o0){At("readable nexttick read 0"),o0.read(0)}function t0(o0,r0){At("resume",r0.reading),r0.reading||o0.read(0),r0.resumeScheduled=!1,o0.emit("resume"),l0(o0),r0.flowing&&!r0.reading&&o0.read(0)}function l0(o0){var r0=o0._readableState;for(At("flow",r0.flowing);r0.flowing&&o0.read()!==null;);}function d0(o0,r0){return r0.length===0?null:(r0.objectMode?Yt=r0.buffer.shift():!o0||o0>=r0.length?(Yt=r0.decoder?r0.buffer.join(""):r0.buffer.length===1?r0.buffer.first():r0.buffer.concat(r0.length),r0.buffer.clear()):Yt=r0.buffer.consume(o0,r0.decoder),Yt);var Yt}function n0(o0){var r0=o0._readableState;At("endReadable",r0.endEmitted),r0.endEmitted||(r0.ended=!0,process.nextTick(g0,r0,o0))}function g0(o0,r0){if(At("endReadableNT",o0.endEmitted,o0.length),!o0.endEmitted&&o0.length===0&&(o0.endEmitted=!0,r0.readable=!1,r0.emit("end"),o0.autoDestroy)){var Yt=r0._writableState;(!Yt||Yt.autoDestroy&&Yt.finished)&&r0.destroy()}}function A0(o0,r0){for(var Yt=0,Mt=o0.length;Yt<Mt;Yt++)if(o0[Yt]===r0)return Yt;return-1}Vt.prototype.read=function(o0){At("read",o0),o0=parseInt(o0,10);var r0=this._readableState,Yt=o0;if(o0!==0&&(r0.emittedReadable=!1),o0===0&&r0.needReadable&&((r0.highWaterMark!==0?r0.length>=r0.highWaterMark:r0.length>0)||r0.ended))return At("read: emitReadable",r0.length,r0.ended),r0.length===0&&r0.ended?n0(this):jt(this),null;if((o0=Qt(o0,r0))===0&&r0.ended)return r0.length===0&&n0(this),null;var Mt,Jt=r0.needReadable;return At("need readable",Jt),(r0.length===0||r0.length-o0<r0.highWaterMark)&&At("length less than watermark",Jt=!0),r0.ended||r0.reading?At("reading or ended",Jt=!1):Jt&&(At("do read"),r0.reading=!0,r0.sync=!0,r0.length===0&&(r0.needReadable=!0),this._read(r0.highWaterMark),r0.sync=!1,r0.reading||(o0=Qt(Yt,r0))),(Mt=o0>0?d0(o0,r0):null)===null?(r0.needReadable=r0.length<=r0.highWaterMark,o0=0):(r0.length-=o0,r0.awaitDrain=0),r0.length===0&&(r0.ended||(r0.needReadable=!0),Yt!==o0&&r0.ended&&n0(this)),Mt!==null&&this.emit("data",Mt),Mt},Vt.prototype._read=function(o0){Wt(this,new Nt("_read()"))},Vt.prototype.pipe=function(o0,r0){var Yt=this,Mt=this._readableState;switch(Mt.pipesCount){case 0:Mt.pipes=o0;break;case 1:Mt.pipes=[Mt.pipes,o0];break;default:Mt.pipes.push(o0)}Mt.pipesCount+=1,At("pipe count=%d opts=%j",Mt.pipesCount,r0);var Jt=r0&&r0.end===!1||o0===process.stdout||o0===process.stderr?P0:a0;function a0(){At("onend"),o0.end()}Mt.endEmitted?process.nextTick(Jt):Yt.once("end",Jt),o0.on("unpipe",function z0(J0,Y0){At("onunpipe"),J0===Yt&&Y0&&Y0.hasUnpiped===!1&&(Y0.hasUnpiped=!0,At("cleanup"),o0.removeListener("close",p0),o0.removeListener("finish",D0),o0.removeListener("drain",i0),o0.removeListener("error",x0),o0.removeListener("unpipe",z0),Yt.removeListener("end",a0),Yt.removeListener("end",P0),Yt.removeListener("data",u0),f0=!0,!Mt.awaitDrain||o0._writableState&&!o0._writableState.needDrain||i0())});var i0=function(z0){return function(){var J0=z0._readableState;At("pipeOnDrain",J0.awaitDrain),J0.awaitDrain&&J0.awaitDrain--,J0.awaitDrain===0&&xt(z0,"data")&&(J0.flowing=!0,l0(z0))}}(Yt);o0.on("drain",i0);var f0=!1;function u0(z0){At("ondata");var J0=o0.write(z0);At("dest.write",J0),J0===!1&&((Mt.pipesCount===1&&Mt.pipes===o0||Mt.pipesCount>1&&A0(Mt.pipes,o0)!==-1)&&!f0&&(At("false write response, pause",Mt.awaitDrain),Mt.awaitDrain++),Yt.pause())}function x0(z0){At("onerror",z0),P0(),o0.removeListener("error",x0),xt(o0,"error")===0&&Wt(o0,z0)}function p0(){o0.removeListener("finish",D0),P0()}function D0(){At("onfinish"),o0.removeListener("close",p0),P0()}function P0(){At("unpipe"),Yt.unpipe(o0)}return Yt.on("data",u0),function(z0,J0,Y0){if(typeof z0.prependListener=="function")return z0.prependListener(J0,Y0);z0._events&&z0._events.error?Array.isArray(z0._events.error)?z0._events.error.unshift(Y0):z0._events.error=[Y0,z0._events.error]:z0.on(J0,Y0)}(o0,"error",x0),o0.once("close",p0),o0.once("finish",D0),o0.emit("pipe",Yt),Mt.flowing||(At("pipe resume"),Yt.resume()),o0},Vt.prototype.unpipe=function(o0){var r0=this._readableState,Yt={hasUnpiped:!1};if(r0.pipesCount===0)return this;if(r0.pipesCount===1)return o0&&o0!==r0.pipes||(o0||(o0=r0.pipes),r0.pipes=null,r0.pipesCount=0,r0.flowing=!1,o0&&o0.emit("unpipe",this,Yt)),this;if(!o0){var Mt=r0.pipes,Jt=r0.pipesCount;r0.pipes=null,r0.pipesCount=0,r0.flowing=!1;for(var a0=0;a0<Jt;a0++)Mt[a0].emit("unpipe",this,{hasUnpiped:!1});return this}var i0=A0(r0.pipes,o0);return i0===-1||(r0.pipes.splice(i0,1),r0.pipesCount-=1,r0.pipesCount===1&&(r0.pipes=r0.pipes[0]),o0.emit("unpipe",this,Yt)),this},Vt.prototype.on=function(o0,r0){var Yt=Et.prototype.on.call(this,o0,r0),Mt=this._readableState;return o0==="data"?(Mt.readableListening=this.listenerCount("readable")>0,Mt.flowing!==!1&&this.resume()):o0==="readable"&&(Mt.endEmitted||Mt.readableListening||(Mt.readableListening=Mt.needReadable=!0,Mt.flowing=!1,Mt.emittedReadable=!1,At("on readable",Mt.length,Mt.reading),Mt.length?jt(this):Mt.reading||process.nextTick(s0,this))),Yt},Vt.prototype.addListener=Vt.prototype.on,Vt.prototype.removeListener=function(o0,r0){var Yt=Et.prototype.removeListener.call(this,o0,r0);return o0==="readable"&&process.nextTick(e0,this),Yt},Vt.prototype.removeAllListeners=function(o0){var r0=Et.prototype.removeAllListeners.apply(this,arguments);return o0!=="readable"&&o0!==void 0||process.nextTick(e0,this),r0},Vt.prototype.resume=function(){var o0=this._readableState;return o0.flowing||(At("resume"),o0.flowing=!o0.readableListening,function(r0,Yt){Yt.resumeScheduled||(Yt.resumeScheduled=!0,process.nextTick(t0,r0,Yt))}(this,o0)),o0.paused=!1,this},Vt.prototype.pause=function(){return At("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(At("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Vt.prototype.wrap=function(o0){var r0=this,Yt=this._readableState,Mt=!1;for(var Jt in o0.on("end",function(){if(At("wrapped end"),Yt.decoder&&!Yt.ended){var i0=Yt.decoder.end();i0&&i0.length&&r0.push(i0)}r0.push(null)}),o0.on("data",function(i0){At("wrapped data"),Yt.decoder&&(i0=Yt.decoder.write(i0)),Yt.objectMode&&i0==null||(Yt.objectMode||i0&&i0.length)&&(r0.push(i0)||(Mt=!0,o0.pause()))}),o0)this[Jt]===void 0&&typeof o0[Jt]=="function"&&(this[Jt]=function(i0){return function(){return o0[i0].apply(o0,arguments)}}(Jt));for(var a0=0;a0<$t.length;a0++)o0.on($t[a0],this.emit.bind(this,$t[a0]));return this._read=function(i0){At("wrapped _read",i0),Mt&&(Mt=!1,o0.resume())},this},typeof Symbol=="function"&&(Vt.prototype[Symbol.asyncIterator]=function(){return bt===void 0&&(bt=ht(1029)),bt(this)}),Object.defineProperty(Vt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Vt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Vt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(o0){this._readableState&&(this._readableState.flowing=o0)}}),Vt._fromList=d0,Object.defineProperty(Vt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(Vt.from=function(o0,r0){return It===void 0&&(It=ht(352)),It(Vt,o0,r0)})},7640:(nt,ft,ht)=>{nt.exports=vt;var gt=ht(4452).q,At=gt.ERR_METHOD_NOT_IMPLEMENTED,xt=gt.ERR_MULTIPLE_CALLBACK,Et=gt.ERR_TRANSFORM_ALREADY_TRANSFORMING,yt=gt.ERR_TRANSFORM_WITH_LENGTH_0,Ct=ht(7073);function kt(wt,Rt){var Tt=this._transformState;Tt.transforming=!1;var Bt=Tt.writecb;if(Bt===null)return this.emit("error",new xt);Tt.writechunk=null,Tt.writecb=null,Rt!=null&&this.push(Rt),Bt(wt);var Dt=this._readableState;Dt.reading=!1,(Dt.needReadable||Dt.length<Dt.highWaterMark)&&this._read(Dt.highWaterMark)}function vt(wt){if(!(this instanceof vt))return new vt(wt);Ct.call(this,wt),this._transformState={afterTransform:kt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,wt&&(typeof wt.transform=="function"&&(this._transform=wt.transform),typeof wt.flush=="function"&&(this._flush=wt.flush)),this.on("prefinish",bt)}function bt(){var wt=this;typeof this._flush!="function"||this._readableState.destroyed?It(this,null,null):this._flush(function(Rt,Tt){It(wt,Rt,Tt)})}function It(wt,Rt,Tt){if(Rt)return wt.emit("error",Rt);if(Tt!=null&&wt.push(Tt),wt._writableState.length)throw new yt;if(wt._transformState.transforming)throw new Et;return wt.push(null)}ht(1285)(vt,Ct),vt.prototype.push=function(wt,Rt){return this._transformState.needTransform=!1,Ct.prototype.push.call(this,wt,Rt)},vt.prototype._transform=function(wt,Rt,Tt){Tt(new At("_transform()"))},vt.prototype._write=function(wt,Rt,Tt){var Bt=this._transformState;if(Bt.writecb=Tt,Bt.writechunk=wt,Bt.writeencoding=Rt,!Bt.transforming){var Dt=this._readableState;(Bt.needTransform||Dt.needReadable||Dt.length<Dt.highWaterMark)&&this._read(Dt.highWaterMark)}},vt.prototype._read=function(wt){var Rt=this._transformState;Rt.writechunk===null||Rt.transforming?Rt.needTransform=!0:(Rt.transforming=!0,this._transform(Rt.writechunk,Rt.writeencoding,Rt.afterTransform))},vt.prototype._destroy=function(wt,Rt){Ct.prototype._destroy.call(this,wt,function(Tt){Rt(Tt)})}},2557:(nt,ft,ht)=>{function gt(qt){var zt=this;this.next=null,this.entry=null,this.finish=function(){(function(e0,s0,t0){var l0=e0.entry;for(e0.entry=null;l0;){var d0=l0.callback;s0.pendingcb--,d0(void 0),l0=l0.next}s0.corkedRequestsFree.next=e0})(zt,qt)}}var At;nt.exports=Vt,Vt.WritableState=Kt;var xt,Et={deprecate:ht(5803)},yt=ht(5010),Ct=ht(8834).Buffer,kt=ht.g.Uint8Array||function(){},vt=ht(2262),bt=ht(7605).getHighWaterMark,It=ht(4452).q,wt=It.ERR_INVALID_ARG_TYPE,Rt=It.ERR_METHOD_NOT_IMPLEMENTED,Tt=It.ERR_MULTIPLE_CALLBACK,Bt=It.ERR_STREAM_CANNOT_PIPE,Dt=It.ERR_STREAM_DESTROYED,Pt=It.ERR_STREAM_NULL_VALUES,Nt=It.ERR_STREAM_WRITE_AFTER_END,Lt=It.ERR_UNKNOWN_ENCODING,Wt=vt.errorOrDestroy;function $t(){}function Kt(qt,zt,e0){At=At||ht(7073),qt=qt||{},typeof e0!="boolean"&&(e0=zt instanceof At),this.objectMode=!!qt.objectMode,e0&&(this.objectMode=this.objectMode||!!qt.writableObjectMode),this.highWaterMark=bt(this,qt,"writableHighWaterMark",e0),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s0=qt.decodeStrings===!1;this.decodeStrings=!s0,this.defaultEncoding=qt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t0){(function(l0,d0){var n0=l0._writableState,g0=n0.sync,A0=n0.writecb;if(typeof A0!="function")throw new Tt;if(function(r0){r0.writing=!1,r0.writecb=null,r0.length-=r0.writelen,r0.writelen=0}(n0),d0)(function(r0,Yt,Mt,Jt,a0){--Yt.pendingcb,Mt?(process.nextTick(a0,Jt),process.nextTick(Gt,r0,Yt),r0._writableState.errorEmitted=!0,Wt(r0,Jt)):(a0(Jt),r0._writableState.errorEmitted=!0,Wt(r0,Jt),Gt(r0,Yt))})(l0,n0,g0,d0,A0);else{var o0=Qt(n0)||l0.destroyed;o0||n0.corked||n0.bufferProcessing||!n0.bufferedRequest||Xt(l0,n0),g0?process.nextTick(_t,l0,n0,o0,A0):_t(l0,n0,o0,A0)}})(zt,t0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=qt.emitClose!==!1,this.autoDestroy=!!qt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new gt(this)}function Vt(qt){var zt=this instanceof(At=At||ht(7073));if(!zt&&!xt.call(Vt,this))return new Vt(qt);this._writableState=new Kt(qt,this,zt),this.writable=!0,qt&&(typeof qt.write=="function"&&(this._write=qt.write),typeof qt.writev=="function"&&(this._writev=qt.writev),typeof qt.destroy=="function"&&(this._destroy=qt.destroy),typeof qt.final=="function"&&(this._final=qt.final)),yt.call(this)}function Ut(qt,zt,e0,s0,t0,l0,d0){zt.writelen=s0,zt.writecb=d0,zt.writing=!0,zt.sync=!0,zt.destroyed?zt.onwrite(new Dt("write")):e0?qt._writev(t0,zt.onwrite):qt._write(t0,l0,zt.onwrite),zt.sync=!1}function _t(qt,zt,e0,s0){e0||function(t0,l0){l0.length===0&&l0.needDrain&&(l0.needDrain=!1,t0.emit("drain"))}(qt,zt),zt.pendingcb--,s0(),Gt(qt,zt)}function Xt(qt,zt){zt.bufferProcessing=!0;var e0=zt.bufferedRequest;if(qt._writev&&e0&&e0.next){var s0=zt.bufferedRequestCount,t0=new Array(s0),l0=zt.corkedRequestsFree;l0.entry=e0;for(var d0=0,n0=!0;e0;)t0[d0]=e0,e0.isBuf||(n0=!1),e0=e0.next,d0+=1;t0.allBuffers=n0,Ut(qt,zt,!0,zt.length,t0,"",l0.finish),zt.pendingcb++,zt.lastBufferedRequest=null,l0.next?(zt.corkedRequestsFree=l0.next,l0.next=null):zt.corkedRequestsFree=new gt(zt),zt.bufferedRequestCount=0}else{for(;e0;){var g0=e0.chunk,A0=e0.encoding,o0=e0.callback;if(Ut(qt,zt,!1,zt.objectMode?1:g0.length,g0,A0,o0),e0=e0.next,zt.bufferedRequestCount--,zt.writing)break}e0===null&&(zt.lastBufferedRequest=null)}zt.bufferedRequest=e0,zt.bufferProcessing=!1}function Qt(qt){return qt.ending&&qt.length===0&&qt.bufferedRequest===null&&!qt.finished&&!qt.writing}function jt(qt,zt){qt._final(function(e0){zt.pendingcb--,e0&&Wt(qt,e0),zt.prefinished=!0,qt.emit("prefinish"),Gt(qt,zt)})}function Gt(qt,zt){var e0=Qt(zt);if(e0&&(function(t0,l0){l0.prefinished||l0.finalCalled||(typeof t0._final!="function"||l0.destroyed?(l0.prefinished=!0,t0.emit("prefinish")):(l0.pendingcb++,l0.finalCalled=!0,process.nextTick(jt,t0,l0)))}(qt,zt),zt.pendingcb===0&&(zt.finished=!0,qt.emit("finish"),zt.autoDestroy))){var s0=qt._readableState;(!s0||s0.autoDestroy&&s0.endEmitted)&&qt.destroy()}return e0}ht(1285)(Vt,yt),Kt.prototype.getBuffer=function(){for(var qt=this.bufferedRequest,zt=[];qt;)zt.push(qt),qt=qt.next;return zt},function(){try{Object.defineProperty(Kt.prototype,"buffer",{get:Et.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(xt=Function.prototype[Symbol.hasInstance],Object.defineProperty(Vt,Symbol.hasInstance,{value:function(qt){return!!xt.call(this,qt)||this===Vt&&qt&&qt._writableState instanceof Kt}})):xt=function(qt){return qt instanceof this},Vt.prototype.pipe=function(){Wt(this,new Bt)},Vt.prototype.write=function(qt,zt,e0){var s0,t0=this._writableState,l0=!1,d0=!t0.objectMode&&(s0=qt,Ct.isBuffer(s0)||s0 instanceof kt);return d0&&!Ct.isBuffer(qt)&&(qt=function(n0){return Ct.from(n0)}(qt)),typeof zt=="function"&&(e0=zt,zt=null),d0?zt="buffer":zt||(zt=t0.defaultEncoding),typeof e0!="function"&&(e0=$t),t0.ending?function(n0,g0){var A0=new Nt;Wt(n0,A0),process.nextTick(g0,A0)}(this,e0):(d0||function(n0,g0,A0,o0){var r0;return A0===null?r0=new Pt:typeof A0=="string"||g0.objectMode||(r0=new wt("chunk",["string","Buffer"],A0)),!r0||(Wt(n0,r0),process.nextTick(o0,r0),!1)}(this,t0,qt,e0))&&(t0.pendingcb++,l0=function(n0,g0,A0,o0,r0,Yt){if(!A0){var Mt=function(f0,u0,x0){return f0.objectMode||f0.decodeStrings===!1||typeof u0!="string"||(u0=Ct.from(u0,x0)),u0}(g0,o0,r0);o0!==Mt&&(A0=!0,r0="buffer",o0=Mt)}var Jt=g0.objectMode?1:o0.length;g0.length+=Jt;var a0=g0.length<g0.highWaterMark;if(a0||(g0.needDrain=!0),g0.writing||g0.corked){var i0=g0.lastBufferedRequest;g0.lastBufferedRequest={chunk:o0,encoding:r0,isBuf:A0,callback:Yt,next:null},i0?i0.next=g0.lastBufferedRequest:g0.bufferedRequest=g0.lastBufferedRequest,g0.bufferedRequestCount+=1}else Ut(n0,g0,!1,Jt,o0,r0,Yt);return a0}(this,t0,d0,qt,zt,e0)),l0},Vt.prototype.cork=function(){this._writableState.corked++},Vt.prototype.uncork=function(){var qt=this._writableState;qt.corked&&(qt.corked--,qt.writing||qt.corked||qt.bufferProcessing||!qt.bufferedRequest||Xt(this,qt))},Vt.prototype.setDefaultEncoding=function(qt){if(typeof qt=="string"&&(qt=qt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((qt+"").toLowerCase())>-1))throw new Lt(qt);return this._writableState.defaultEncoding=qt,this},Object.defineProperty(Vt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Vt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Vt.prototype._write=function(qt,zt,e0){e0(new Rt("_write()"))},Vt.prototype._writev=null,Vt.prototype.end=function(qt,zt,e0){var s0=this._writableState;return typeof qt=="function"?(e0=qt,qt=null,zt=null):typeof zt=="function"&&(e0=zt,zt=null),qt!=null&&this.write(qt,zt),s0.corked&&(s0.corked=1,this.uncork()),s0.ending||function(t0,l0,d0){l0.ending=!0,Gt(t0,l0),d0&&(l0.finished?process.nextTick(d0):t0.once("finish",d0)),l0.ended=!0,t0.writable=!1}(this,s0,e0),this},Object.defineProperty(Vt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(qt){this._writableState&&(this._writableState.destroyed=qt)}}),Vt.prototype.destroy=vt.destroy,Vt.prototype._undestroy=vt.undestroy,Vt.prototype._destroy=function(qt,zt){zt(qt)}},1029:(nt,ft,ht)=>{var gt;function At(Pt,Nt,Lt){return Nt in Pt?Object.defineProperty(Pt,Nt,{value:Lt,enumerable:!0,configurable:!0,writable:!0}):Pt[Nt]=Lt,Pt}var xt=ht(9885),Et=Symbol("lastResolve"),yt=Symbol("lastReject"),Ct=Symbol("error"),kt=Symbol("ended"),vt=Symbol("lastPromise"),bt=Symbol("handlePromise"),It=Symbol("stream");function wt(Pt,Nt){return{value:Pt,done:Nt}}function Rt(Pt){var Nt=Pt[Et];if(Nt!==null){var Lt=Pt[It].read();Lt!==null&&(Pt[vt]=null,Pt[Et]=null,Pt[yt]=null,Nt(wt(Lt,!1)))}}function Tt(Pt){process.nextTick(Rt,Pt)}var Bt=Object.getPrototypeOf(function(){}),Dt=Object.setPrototypeOf((At(gt={get stream(){return this[It]},next:function(){var Pt=this,Nt=this[Ct];if(Nt!==null)return Promise.reject(Nt);if(this[kt])return Promise.resolve(wt(void 0,!0));if(this[It].destroyed)return new Promise(function(Kt,Vt){process.nextTick(function(){Pt[Ct]?Vt(Pt[Ct]):Kt(wt(void 0,!0))})});var Lt,Wt=this[vt];if(Wt)Lt=new Promise(function(Kt,Vt){return function(Ut,_t){Kt.then(function(){Vt[kt]?Ut(wt(void 0,!0)):Vt[bt](Ut,_t)},_t)}}(Wt,this));else{var $t=this[It].read();if($t!==null)return Promise.resolve(wt($t,!1));Lt=new Promise(this[bt])}return this[vt]=Lt,Lt}},Symbol.asyncIterator,function(){return this}),At(gt,"return",function(){var Pt=this;return new Promise(function(Nt,Lt){Pt[It].destroy(null,function(Wt){Wt?Lt(Wt):Nt(wt(void 0,!0))})})}),gt),Bt);nt.exports=function(Pt){var Nt,Lt=Object.create(Dt,(At(Nt={},It,{value:Pt,writable:!0}),At(Nt,Et,{value:null,writable:!0}),At(Nt,yt,{value:null,writable:!0}),At(Nt,Ct,{value:null,writable:!0}),At(Nt,kt,{value:Pt._readableState.endEmitted,writable:!0}),At(Nt,bt,{value:function(Wt,$t){var Kt=Lt[It].read();Kt?(Lt[vt]=null,Lt[Et]=null,Lt[yt]=null,Wt(wt(Kt,!1))):(Lt[Et]=Wt,Lt[yt]=$t)},writable:!0}),Nt));return Lt[vt]=null,xt(Pt,function(Wt){if(Wt&&Wt.code!=="ERR_STREAM_PREMATURE_CLOSE"){var $t=Lt[yt];return $t!==null&&(Lt[vt]=null,Lt[Et]=null,Lt[yt]=null,$t(Wt)),void(Lt[Ct]=Wt)}var Kt=Lt[Et];Kt!==null&&(Lt[vt]=null,Lt[Et]=null,Lt[yt]=null,Kt(wt(void 0,!0))),Lt[kt]=!0}),Pt.on("readable",Tt.bind(null,Lt)),Lt}},6637:(nt,ft,ht)=>{function gt(kt,vt){var bt=Object.keys(kt);if(Object.getOwnPropertySymbols){var It=Object.getOwnPropertySymbols(kt);vt&&(It=It.filter(function(wt){return Object.getOwnPropertyDescriptor(kt,wt).enumerable})),bt.push.apply(bt,It)}return bt}function At(kt,vt,bt){return vt in kt?Object.defineProperty(kt,vt,{value:bt,enumerable:!0,configurable:!0,writable:!0}):kt[vt]=bt,kt}function xt(kt,vt){for(var bt=0;bt<vt.length;bt++){var It=vt[bt];It.enumerable=It.enumerable||!1,It.configurable=!0,"value"in It&&(It.writable=!0),Object.defineProperty(kt,It.key,It)}}var Et=ht(8834).Buffer,yt=ht(4854).inspect,Ct=yt&&yt.custom||"inspect";nt.exports=function(){function kt(){(function(It,wt){if(!(It instanceof wt))throw new TypeError("Cannot call a class as a function")})(this,kt),this.head=null,this.tail=null,this.length=0}var vt,bt;return vt=kt,bt=[{key:"push",value:function(It){var wt={data:It,next:null};this.length>0?this.tail.next=wt:this.head=wt,this.tail=wt,++this.length}},{key:"unshift",value:function(It){var wt={data:It,next:this.head};this.length===0&&(this.tail=wt),this.head=wt,++this.length}},{key:"shift",value:function(){if(this.length!==0){var It=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,It}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(It){if(this.length===0)return"";for(var wt=this.head,Rt=""+wt.data;wt=wt.next;)Rt+=It+wt.data;return Rt}},{key:"concat",value:function(It){if(this.length===0)return Et.alloc(0);for(var wt,Rt,Tt,Bt=Et.allocUnsafe(It>>>0),Dt=this.head,Pt=0;Dt;)wt=Dt.data,Rt=Bt,Tt=Pt,Et.prototype.copy.call(wt,Rt,Tt),Pt+=Dt.data.length,Dt=Dt.next;return Bt}},{key:"consume",value:function(It,wt){var Rt;return It<this.head.data.length?(Rt=this.head.data.slice(0,It),this.head.data=this.head.data.slice(It)):Rt=It===this.head.data.length?this.shift():wt?this._getString(It):this._getBuffer(It),Rt}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(It){var wt=this.head,Rt=1,Tt=wt.data;for(It-=Tt.length;wt=wt.next;){var Bt=wt.data,Dt=It>Bt.length?Bt.length:It;if(Dt===Bt.length?Tt+=Bt:Tt+=Bt.slice(0,It),(It-=Dt)==0){Dt===Bt.length?(++Rt,wt.next?this.head=wt.next:this.head=this.tail=null):(this.head=wt,wt.data=Bt.slice(Dt));break}++Rt}return this.length-=Rt,Tt}},{key:"_getBuffer",value:function(It){var wt=Et.allocUnsafe(It),Rt=this.head,Tt=1;for(Rt.data.copy(wt),It-=Rt.data.length;Rt=Rt.next;){var Bt=Rt.data,Dt=It>Bt.length?Bt.length:It;if(Bt.copy(wt,wt.length-It,0,Dt),(It-=Dt)==0){Dt===Bt.length?(++Tt,Rt.next?this.head=Rt.next:this.head=this.tail=null):(this.head=Rt,Rt.data=Bt.slice(Dt));break}++Tt}return this.length-=Tt,wt}},{key:Ct,value:function(It,wt){return yt(this,function(Rt){for(var Tt=1;Tt<arguments.length;Tt++){var Bt=arguments[Tt]!=null?arguments[Tt]:{};Tt%2?gt(Object(Bt),!0).forEach(function(Dt){At(Rt,Dt,Bt[Dt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rt,Object.getOwnPropertyDescriptors(Bt)):gt(Object(Bt)).forEach(function(Dt){Object.defineProperty(Rt,Dt,Object.getOwnPropertyDescriptor(Bt,Dt))})}return Rt}({},wt,{depth:0,customInspect:!1}))}}],bt&&xt(vt.prototype,bt),kt}()},2262:nt=>{function ft(At,xt){gt(At,xt),ht(At)}function ht(At){At._writableState&&!At._writableState.emitClose||At._readableState&&!At._readableState.emitClose||At.emit("close")}function gt(At,xt){At.emit("error",xt)}nt.exports={destroy:function(At,xt){var Et=this,yt=this._readableState&&this._readableState.destroyed,Ct=this._writableState&&this._writableState.destroyed;return yt||Ct?(xt?xt(At):At&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(gt,this,At)):process.nextTick(gt,this,At)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(At||null,function(kt){!xt&&kt?Et._writableState?Et._writableState.errorEmitted?process.nextTick(ht,Et):(Et._writableState.errorEmitted=!0,process.nextTick(ft,Et,kt)):process.nextTick(ft,Et,kt):xt?(process.nextTick(ht,Et),xt(kt)):process.nextTick(ht,Et)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(At,xt){var Et=At._readableState,yt=At._writableState;Et&&Et.autoDestroy||yt&&yt.autoDestroy?At.destroy(xt):At.emit("error",xt)}}},9885:(nt,ft,ht)=>{var gt=ht(4452).q.ERR_STREAM_PREMATURE_CLOSE;function At(){}nt.exports=function xt(Et,yt,Ct){if(typeof yt=="function")return xt(Et,null,yt);yt||(yt={}),Ct=function(Nt){var Lt=!1;return function(){if(!Lt){Lt=!0;for(var Wt=arguments.length,$t=new Array(Wt),Kt=0;Kt<Wt;Kt++)$t[Kt]=arguments[Kt];Nt.apply(this,$t)}}}(Ct||At);var kt=yt.readable||yt.readable!==!1&&Et.readable,vt=yt.writable||yt.writable!==!1&&Et.writable,bt=function(){Et.writable||wt()},It=Et._writableState&&Et._writableState.finished,wt=function(){vt=!1,It=!0,kt||Ct.call(Et)},Rt=Et._readableState&&Et._readableState.endEmitted,Tt=function(){kt=!1,Rt=!0,vt||Ct.call(Et)},Bt=function(Nt){Ct.call(Et,Nt)},Dt=function(){var Nt;return kt&&!Rt?(Et._readableState&&Et._readableState.ended||(Nt=new gt),Ct.call(Et,Nt)):vt&&!It?(Et._writableState&&Et._writableState.ended||(Nt=new gt),Ct.call(Et,Nt)):void 0},Pt=function(){Et.req.on("finish",wt)};return function(Nt){return Nt.setHeader&&typeof Nt.abort=="function"}(Et)?(Et.on("complete",wt),Et.on("abort",Dt),Et.req?Pt():Et.on("request",Pt)):vt&&!Et._writableState&&(Et.on("end",bt),Et.on("close",bt)),Et.on("end",Tt),Et.on("finish",wt),yt.error!==!1&&Et.on("error",Bt),Et.on("close",Dt),function(){Et.removeListener("complete",wt),Et.removeListener("abort",Dt),Et.removeListener("request",Pt),Et.req&&Et.req.removeListener("finish",wt),Et.removeListener("end",bt),Et.removeListener("close",bt),Et.removeListener("finish",wt),Et.removeListener("end",Tt),Et.removeListener("error",Bt),Et.removeListener("close",Dt)}}},352:nt=>{nt.exports=function(){throw new Error("Readable.from is not available in the browser")}},3495:(nt,ft,ht)=>{var gt,At=ht(4452).q,xt=At.ERR_MISSING_ARGS,Et=At.ERR_STREAM_DESTROYED;function yt(It){if(It)throw It}function Ct(It,wt,Rt,Tt){Tt=function(Pt){var Nt=!1;return function(){Nt||(Nt=!0,Pt.apply(void 0,arguments))}}(Tt);var Bt=!1;It.on("close",function(){Bt=!0}),gt===void 0&&(gt=ht(9885)),gt(It,{readable:wt,writable:Rt},function(Pt){if(Pt)return Tt(Pt);Bt=!0,Tt()});var Dt=!1;return function(Pt){if(!Bt&&!Dt)return Dt=!0,function(Nt){return Nt.setHeader&&typeof Nt.abort=="function"}(It)?It.abort():typeof It.destroy=="function"?It.destroy():void Tt(Pt||new Et("pipe"))}}function kt(It){It()}function vt(It,wt){return It.pipe(wt)}function bt(It){return It.length?typeof It[It.length-1]!="function"?yt:It.pop():yt}nt.exports=function(){for(var It=arguments.length,wt=new Array(It),Rt=0;Rt<It;Rt++)wt[Rt]=arguments[Rt];var Tt,Bt=bt(wt);if(Array.isArray(wt[0])&&(wt=wt[0]),wt.length<2)throw new xt("streams");var Dt=wt.map(function(Pt,Nt){var Lt=Nt<wt.length-1;return Ct(Pt,Lt,Nt>0,function(Wt){Tt||(Tt=Wt),Wt&&Dt.forEach(kt),Lt||(Dt.forEach(kt),Bt(Tt))})});return wt.reduce(vt)}},7605:(nt,ft,ht)=>{var gt=ht(4452).q.ERR_INVALID_OPT_VALUE;nt.exports={getHighWaterMark:function(At,xt,Et,yt){var Ct=function(kt,vt,bt){return kt.highWaterMark!=null?kt.highWaterMark:vt?kt[bt]:null}(xt,yt,Et);if(Ct!=null){if(!isFinite(Ct)||Math.floor(Ct)!==Ct||Ct<0)throw new gt(yt?Et:"highWaterMark",Ct);return Math.floor(Ct)}return At.objectMode?16:16384}}},5010:(nt,ft,ht)=>{nt.exports=ht(2699).EventEmitter},7525:(nt,ft,ht)=>{(ft=nt.exports=ht(8051)).Stream=ft,ft.Readable=ft,ft.Writable=ht(2557),ft.Duplex=ht(7073),ft.Transform=ht(7640),ft.PassThrough=ht(5163),ft.finished=ht(9885),ft.pipeline=ht(3495)},1445:(nt,ft,ht)=>{var gt=ht(8834).Buffer,At=ht(1285),xt=ht(4485),Et=new Array(16),yt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Ct=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],kt=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],vt=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],bt=[0,1518500249,1859775393,2400959708,2840853838],It=[1352829926,1548603684,1836072691,2053994217,0];function wt(){xt.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function Rt(Lt,Wt){return Lt<<Wt|Lt>>>32-Wt}function Tt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+(Wt^$t^Kt)+Ut+_t|0,Xt)+Vt|0}function Bt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+(Wt&$t|~Wt&Kt)+Ut+_t|0,Xt)+Vt|0}function Dt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+((Wt|~$t)^Kt)+Ut+_t|0,Xt)+Vt|0}function Pt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+(Wt&Kt|$t&~Kt)+Ut+_t|0,Xt)+Vt|0}function Nt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+(Wt^($t|~Kt))+Ut+_t|0,Xt)+Vt|0}At(wt,xt),wt.prototype._update=function(){for(var Lt=Et,Wt=0;Wt<16;++Wt)Lt[Wt]=this._block.readInt32LE(4*Wt);for(var $t=0|this._a,Kt=0|this._b,Vt=0|this._c,Ut=0|this._d,_t=0|this._e,Xt=0|this._a,Qt=0|this._b,jt=0|this._c,Gt=0|this._d,qt=0|this._e,zt=0;zt<80;zt+=1){var e0,s0;zt<16?(e0=Tt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[0],kt[zt]),s0=Nt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[0],vt[zt])):zt<32?(e0=Bt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[1],kt[zt]),s0=Pt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[1],vt[zt])):zt<48?(e0=Dt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[2],kt[zt]),s0=Dt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[2],vt[zt])):zt<64?(e0=Pt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[3],kt[zt]),s0=Bt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[3],vt[zt])):(e0=Nt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[4],kt[zt]),s0=Tt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[4],vt[zt])),$t=_t,_t=Ut,Ut=Rt(Vt,10),Vt=Kt,Kt=e0,Xt=qt,qt=Gt,Gt=Rt(jt,10),jt=Qt,Qt=s0}var t0=this._b+Vt+Gt|0;this._b=this._c+Ut+qt|0,this._c=this._d+_t+Xt|0,this._d=this._e+$t+Qt|0,this._e=this._a+Kt+jt|0,this._a=t0},wt.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var Lt=gt.alloc?gt.alloc(20):new gt(20);return Lt.writeInt32LE(this._a,0),Lt.writeInt32LE(this._b,4),Lt.writeInt32LE(this._c,8),Lt.writeInt32LE(this._d,12),Lt.writeInt32LE(this._e,16),Lt},nt.exports=wt},7834:(nt,ft,ht)=>{var gt=ht(8834),At=gt.Buffer;function xt(yt,Ct){for(var kt in yt)Ct[kt]=yt[kt]}function Et(yt,Ct,kt){return At(yt,Ct,kt)}At.from&&At.alloc&&At.allocUnsafe&&At.allocUnsafeSlow?nt.exports=gt:(xt(gt,ft),ft.Buffer=Et),Et.prototype=Object.create(At.prototype),xt(At,Et),Et.from=function(yt,Ct,kt){if(typeof yt=="number")throw new TypeError("Argument must not be a number");return At(yt,Ct,kt)},Et.alloc=function(yt,Ct,kt){if(typeof yt!="number")throw new TypeError("Argument must be a number");var vt=At(yt);return Ct!==void 0?typeof kt=="string"?vt.fill(Ct,kt):vt.fill(Ct):vt.fill(0),vt},Et.allocUnsafe=function(yt){if(typeof yt!="number")throw new TypeError("Argument must be a number");return At(yt)},Et.allocUnsafeSlow=function(yt){if(typeof yt!="number")throw new TypeError("Argument must be a number");return gt.SlowBuffer(yt)}},3327:(nt,ft,ht)=>{var gt=ht(7834).Buffer;function At(xt,Et){this._block=gt.alloc(xt),this._finalSize=Et,this._blockSize=xt,this._len=0}At.prototype.update=function(xt,Et){typeof xt=="string"&&(Et=Et||"utf8",xt=gt.from(xt,Et));for(var yt=this._block,Ct=this._blockSize,kt=xt.length,vt=this._len,bt=0;bt<kt;){for(var It=vt%Ct,wt=Math.min(kt-bt,Ct-It),Rt=0;Rt<wt;Rt++)yt[It+Rt]=xt[bt+Rt];bt+=wt,(vt+=wt)%Ct==0&&this._update(yt)}return this._len+=kt,this},At.prototype.digest=function(xt){var Et=this._len%this._blockSize;this._block[Et]=128,this._block.fill(0,Et+1),Et>=this._finalSize&&(this._update(this._block),this._block.fill(0));var yt=8*this._len;if(yt<=4294967295)this._block.writeUInt32BE(yt,this._blockSize-4);else{var Ct=(4294967295&yt)>>>0,kt=(yt-Ct)/4294967296;this._block.writeUInt32BE(kt,this._blockSize-8),this._block.writeUInt32BE(Ct,this._blockSize-4)}this._update(this._block);var vt=this._hash();return xt?vt.toString(xt):vt},At.prototype._update=function(){throw new Error("_update must be implemented by subclass")},nt.exports=At},9065:(nt,ft,ht)=>{var gt=nt.exports=function(At){At=At.toLowerCase();var xt=gt[At];if(!xt)throw new Error(At+" is not supported (we accept pull requests)");return new xt};gt.sha=ht(8820),gt.sha1=ht(7885),gt.sha224=ht(8321),gt.sha256=ht(4424),gt.sha384=ht(213),gt.sha512=ht(5596)},8820:(nt,ft,ht)=>{var gt=ht(1285),At=ht(3327),xt=ht(7834).Buffer,Et=[1518500249,1859775393,-1894007588,-899497514],yt=new Array(80);function Ct(){this.init(),this._w=yt,At.call(this,64,56)}function kt(bt){return bt<<30|bt>>>2}function vt(bt,It,wt,Rt){return bt===0?It&wt|~It&Rt:bt===2?It&wt|It&Rt|wt&Rt:It^wt^Rt}gt(Ct,At),Ct.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Ct.prototype._update=function(bt){for(var It,wt=this._w,Rt=0|this._a,Tt=0|this._b,Bt=0|this._c,Dt=0|this._d,Pt=0|this._e,Nt=0;Nt<16;++Nt)wt[Nt]=bt.readInt32BE(4*Nt);for(;Nt<80;++Nt)wt[Nt]=wt[Nt-3]^wt[Nt-8]^wt[Nt-14]^wt[Nt-16];for(var Lt=0;Lt<80;++Lt){var Wt=~~(Lt/20),$t=0|((It=Rt)<<5|It>>>27)+vt(Wt,Tt,Bt,Dt)+Pt+wt[Lt]+Et[Wt];Pt=Dt,Dt=Bt,Bt=kt(Tt),Tt=Rt,Rt=$t}this._a=Rt+this._a|0,this._b=Tt+this._b|0,this._c=Bt+this._c|0,this._d=Dt+this._d|0,this._e=Pt+this._e|0},Ct.prototype._hash=function(){var bt=xt.allocUnsafe(20);return bt.writeInt32BE(0|this._a,0),bt.writeInt32BE(0|this._b,4),bt.writeInt32BE(0|this._c,8),bt.writeInt32BE(0|this._d,12),bt.writeInt32BE(0|this._e,16),bt},nt.exports=Ct},7885:(nt,ft,ht)=>{var gt=ht(1285),At=ht(3327),xt=ht(7834).Buffer,Et=[1518500249,1859775393,-1894007588,-899497514],yt=new Array(80);function Ct(){this.init(),this._w=yt,At.call(this,64,56)}function kt(It){return It<<5|It>>>27}function vt(It){return It<<30|It>>>2}function bt(It,wt,Rt,Tt){return It===0?wt&Rt|~wt&Tt:It===2?wt&Rt|wt&Tt|Rt&Tt:wt^Rt^Tt}gt(Ct,At),Ct.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Ct.prototype._update=function(It){for(var wt,Rt=this._w,Tt=0|this._a,Bt=0|this._b,Dt=0|this._c,Pt=0|this._d,Nt=0|this._e,Lt=0;Lt<16;++Lt)Rt[Lt]=It.readInt32BE(4*Lt);for(;Lt<80;++Lt)Rt[Lt]=(wt=Rt[Lt-3]^Rt[Lt-8]^Rt[Lt-14]^Rt[Lt-16])<<1|wt>>>31;for(var Wt=0;Wt<80;++Wt){var $t=~~(Wt/20),Kt=kt(Tt)+bt($t,Bt,Dt,Pt)+Nt+Rt[Wt]+Et[$t]|0;Nt=Pt,Pt=Dt,Dt=vt(Bt),Bt=Tt,Tt=Kt}this._a=Tt+this._a|0,this._b=Bt+this._b|0,this._c=Dt+this._c|0,this._d=Pt+this._d|0,this._e=Nt+this._e|0},Ct.prototype._hash=function(){var It=xt.allocUnsafe(20);return It.writeInt32BE(0|this._a,0),It.writeInt32BE(0|this._b,4),It.writeInt32BE(0|this._c,8),It.writeInt32BE(0|this._d,12),It.writeInt32BE(0|this._e,16),It},nt.exports=Ct},8321:(nt,ft,ht)=>{var gt=ht(1285),At=ht(4424),xt=ht(3327),Et=ht(7834).Buffer,yt=new Array(64);function Ct(){this.init(),this._w=yt,xt.call(this,64,56)}gt(Ct,At),Ct.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Ct.prototype._hash=function(){var kt=Et.allocUnsafe(28);return kt.writeInt32BE(this._a,0),kt.writeInt32BE(this._b,4),kt.writeInt32BE(this._c,8),kt.writeInt32BE(this._d,12),kt.writeInt32BE(this._e,16),kt.writeInt32BE(this._f,20),kt.writeInt32BE(this._g,24),kt},nt.exports=Ct},4424:(nt,ft,ht)=>{var gt=ht(1285),At=ht(3327),xt=ht(7834).Buffer,Et=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],yt=new Array(64);function Ct(){this.init(),this._w=yt,At.call(this,64,56)}function kt(Rt,Tt,Bt){return Bt^Rt&(Tt^Bt)}function vt(Rt,Tt,Bt){return Rt&Tt|Bt&(Rt|Tt)}function bt(Rt){return(Rt>>>2|Rt<<30)^(Rt>>>13|Rt<<19)^(Rt>>>22|Rt<<10)}function It(Rt){return(Rt>>>6|Rt<<26)^(Rt>>>11|Rt<<21)^(Rt>>>25|Rt<<7)}function wt(Rt){return(Rt>>>7|Rt<<25)^(Rt>>>18|Rt<<14)^Rt>>>3}gt(Ct,At),Ct.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Ct.prototype._update=function(Rt){for(var Tt,Bt=this._w,Dt=0|this._a,Pt=0|this._b,Nt=0|this._c,Lt=0|this._d,Wt=0|this._e,$t=0|this._f,Kt=0|this._g,Vt=0|this._h,Ut=0;Ut<16;++Ut)Bt[Ut]=Rt.readInt32BE(4*Ut);for(;Ut<64;++Ut)Bt[Ut]=0|(((Tt=Bt[Ut-2])>>>17|Tt<<15)^(Tt>>>19|Tt<<13)^Tt>>>10)+Bt[Ut-7]+wt(Bt[Ut-15])+Bt[Ut-16];for(var _t=0;_t<64;++_t){var Xt=Vt+It(Wt)+kt(Wt,$t,Kt)+Et[_t]+Bt[_t]|0,Qt=bt(Dt)+vt(Dt,Pt,Nt)|0;Vt=Kt,Kt=$t,$t=Wt,Wt=Lt+Xt|0,Lt=Nt,Nt=Pt,Pt=Dt,Dt=Xt+Qt|0}this._a=Dt+this._a|0,this._b=Pt+this._b|0,this._c=Nt+this._c|0,this._d=Lt+this._d|0,this._e=Wt+this._e|0,this._f=$t+this._f|0,this._g=Kt+this._g|0,this._h=Vt+this._h|0},Ct.prototype._hash=function(){var Rt=xt.allocUnsafe(32);return Rt.writeInt32BE(this._a,0),Rt.writeInt32BE(this._b,4),Rt.writeInt32BE(this._c,8),Rt.writeInt32BE(this._d,12),Rt.writeInt32BE(this._e,16),Rt.writeInt32BE(this._f,20),Rt.writeInt32BE(this._g,24),Rt.writeInt32BE(this._h,28),Rt},nt.exports=Ct},213:(nt,ft,ht)=>{var gt=ht(1285),At=ht(5596),xt=ht(3327),Et=ht(7834).Buffer,yt=new Array(160);function Ct(){this.init(),this._w=yt,xt.call(this,128,112)}gt(Ct,At),Ct.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Ct.prototype._hash=function(){var kt=Et.allocUnsafe(48);function vt(bt,It,wt){kt.writeInt32BE(bt,wt),kt.writeInt32BE(It,wt+4)}return vt(this._ah,this._al,0),vt(this._bh,this._bl,8),vt(this._ch,this._cl,16),vt(this._dh,this._dl,24),vt(this._eh,this._el,32),vt(this._fh,this._fl,40),kt},nt.exports=Ct},5596:(nt,ft,ht)=>{var gt=ht(1285),At=ht(3327),xt=ht(7834).Buffer,Et=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],yt=new Array(160);function Ct(){this.init(),this._w=yt,At.call(this,128,112)}function kt(Pt,Nt,Lt){return Lt^Pt&(Nt^Lt)}function vt(Pt,Nt,Lt){return Pt&Nt|Lt&(Pt|Nt)}function bt(Pt,Nt){return(Pt>>>28|Nt<<4)^(Nt>>>2|Pt<<30)^(Nt>>>7|Pt<<25)}function It(Pt,Nt){return(Pt>>>14|Nt<<18)^(Pt>>>18|Nt<<14)^(Nt>>>9|Pt<<23)}function wt(Pt,Nt){return(Pt>>>1|Nt<<31)^(Pt>>>8|Nt<<24)^Pt>>>7}function Rt(Pt,Nt){return(Pt>>>1|Nt<<31)^(Pt>>>8|Nt<<24)^(Pt>>>7|Nt<<25)}function Tt(Pt,Nt){return(Pt>>>19|Nt<<13)^(Nt>>>29|Pt<<3)^Pt>>>6}function Bt(Pt,Nt){return(Pt>>>19|Nt<<13)^(Nt>>>29|Pt<<3)^(Pt>>>6|Nt<<26)}function Dt(Pt,Nt){return Pt>>>0<Nt>>>0?1:0}gt(Ct,At),Ct.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Ct.prototype._update=function(Pt){for(var Nt=this._w,Lt=0|this._ah,Wt=0|this._bh,$t=0|this._ch,Kt=0|this._dh,Vt=0|this._eh,Ut=0|this._fh,_t=0|this._gh,Xt=0|this._hh,Qt=0|this._al,jt=0|this._bl,Gt=0|this._cl,qt=0|this._dl,zt=0|this._el,e0=0|this._fl,s0=0|this._gl,t0=0|this._hl,l0=0;l0<32;l0+=2)Nt[l0]=Pt.readInt32BE(4*l0),Nt[l0+1]=Pt.readInt32BE(4*l0+4);for(;l0<160;l0+=2){var d0=Nt[l0-30],n0=Nt[l0-30+1],g0=wt(d0,n0),A0=Rt(n0,d0),o0=Tt(d0=Nt[l0-4],n0=Nt[l0-4+1]),r0=Bt(n0,d0),Yt=Nt[l0-14],Mt=Nt[l0-14+1],Jt=Nt[l0-32],a0=Nt[l0-32+1],i0=A0+Mt|0,f0=g0+Yt+Dt(i0,A0)|0;f0=(f0=f0+o0+Dt(i0=i0+r0|0,r0)|0)+Jt+Dt(i0=i0+a0|0,a0)|0,Nt[l0]=f0,Nt[l0+1]=i0}for(var u0=0;u0<160;u0+=2){f0=Nt[u0],i0=Nt[u0+1];var x0=vt(Lt,Wt,$t),p0=vt(Qt,jt,Gt),D0=bt(Lt,Qt),P0=bt(Qt,Lt),z0=It(Vt,zt),J0=It(zt,Vt),Y0=Et[u0],X0=Et[u0+1],T0=kt(Vt,Ut,_t),L0=kt(zt,e0,s0),j0=t0+J0|0,Q0=Xt+z0+Dt(j0,t0)|0;Q0=(Q0=(Q0=Q0+T0+Dt(j0=j0+L0|0,L0)|0)+Y0+Dt(j0=j0+X0|0,X0)|0)+f0+Dt(j0=j0+i0|0,i0)|0;var q0=P0+p0|0,en=D0+x0+Dt(q0,P0)|0;Xt=_t,t0=s0,_t=Ut,s0=e0,Ut=Vt,e0=zt,Vt=Kt+Q0+Dt(zt=qt+j0|0,qt)|0,Kt=$t,qt=Gt,$t=Wt,Gt=jt,Wt=Lt,jt=Qt,Lt=Q0+en+Dt(Qt=j0+q0|0,j0)|0}this._al=this._al+Qt|0,this._bl=this._bl+jt|0,this._cl=this._cl+Gt|0,this._dl=this._dl+qt|0,this._el=this._el+zt|0,this._fl=this._fl+e0|0,this._gl=this._gl+s0|0,this._hl=this._hl+t0|0,this._ah=this._ah+Lt+Dt(this._al,Qt)|0,this._bh=this._bh+Wt+Dt(this._bl,jt)|0,this._ch=this._ch+$t+Dt(this._cl,Gt)|0,this._dh=this._dh+Kt+Dt(this._dl,qt)|0,this._eh=this._eh+Vt+Dt(this._el,zt)|0,this._fh=this._fh+Ut+Dt(this._fl,e0)|0,this._gh=this._gh+_t+Dt(this._gl,s0)|0,this._hh=this._hh+Xt+Dt(this._hl,t0)|0},Ct.prototype._hash=function(){var Pt=xt.allocUnsafe(64);function Nt(Lt,Wt,$t){Pt.writeInt32BE(Lt,$t),Pt.writeInt32BE(Wt,$t+4)}return Nt(this._ah,this._al,0),Nt(this._bh,this._bl,8),Nt(this._ch,this._cl,16),Nt(this._dh,this._dl,24),Nt(this._eh,this._el,32),Nt(this._fh,this._fl,40),Nt(this._gh,this._gl,48),Nt(this._hh,this._hl,56),Pt},nt.exports=Ct},4851:(nt,ft,ht)=>{nt.exports=At;var gt=ht(2699).EventEmitter;function At(){gt.call(this)}ht(1285)(At,gt),At.Readable=ht(8051),At.Writable=ht(2557),At.Duplex=ht(7073),At.Transform=ht(7640),At.PassThrough=ht(5163),At.finished=ht(9885),At.pipeline=ht(3495),At.Stream=At,At.prototype.pipe=function(xt,Et){var yt=this;function Ct(Tt){xt.writable&&xt.write(Tt)===!1&&yt.pause&&yt.pause()}function kt(){yt.readable&&yt.resume&&yt.resume()}yt.on("data",Ct),xt.on("drain",kt),xt._isStdio||Et&&Et.end===!1||(yt.on("end",bt),yt.on("close",It));var vt=!1;function bt(){vt||(vt=!0,xt.end())}function It(){vt||(vt=!0,typeof xt.destroy=="function"&&xt.destroy())}function wt(Tt){if(Rt(),gt.listenerCount(this,"error")===0)throw Tt}function Rt(){yt.removeListener("data",Ct),xt.removeListener("drain",kt),yt.removeListener("end",bt),yt.removeListener("close",It),yt.removeListener("error",wt),xt.removeListener("error",wt),yt.removeListener("end",Rt),yt.removeListener("close",Rt),xt.removeListener("close",Rt)}return yt.on("error",wt),xt.on("error",wt),yt.on("end",Rt),yt.on("close",Rt),xt.on("close",Rt),xt.emit("pipe",yt),xt}},214:(nt,ft,ht)=>{var gt=ht(7834).Buffer,At=gt.isEncoding||function(Rt){switch((Rt=""+Rt)&&Rt.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function xt(Rt){var Tt;switch(this.encoding=function(Bt){var Dt=function(Pt){if(!Pt)return"utf8";for(var Nt;;)switch(Pt){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return Pt;default:if(Nt)return;Pt=(""+Pt).toLowerCase(),Nt=!0}}(Bt);if(typeof Dt!="string"&&(gt.isEncoding===At||!At(Bt)))throw new Error("Unknown encoding: "+Bt);return Dt||Bt}(Rt),this.encoding){case"utf16le":this.text=Ct,this.end=kt,Tt=4;break;case"utf8":this.fillLast=yt,Tt=4;break;case"base64":this.text=vt,this.end=bt,Tt=3;break;default:return this.write=It,void(this.end=wt)}this.lastNeed=0,this.lastTotal=0,this.lastChar=gt.allocUnsafe(Tt)}function Et(Rt){return Rt<=127?0:Rt>>5==6?2:Rt>>4==14?3:Rt>>3==30?4:Rt>>6==2?-1:-2}function yt(Rt){var Tt=this.lastTotal-this.lastNeed,Bt=function(Dt,Pt,Nt){if((192&Pt[0])!=128)return Dt.lastNeed=0,"�";if(Dt.lastNeed>1&&Pt.length>1){if((192&Pt[1])!=128)return Dt.lastNeed=1,"�";if(Dt.lastNeed>2&&Pt.length>2&&(192&Pt[2])!=128)return Dt.lastNeed=2,"�"}}(this,Rt);return Bt!==void 0?Bt:this.lastNeed<=Rt.length?(Rt.copy(this.lastChar,Tt,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(Rt.copy(this.lastChar,Tt,0,Rt.length),void(this.lastNeed-=Rt.length))}function Ct(Rt,Tt){if((Rt.length-Tt)%2==0){var Bt=Rt.toString("utf16le",Tt);if(Bt){var Dt=Bt.charCodeAt(Bt.length-1);if(Dt>=55296&&Dt<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=Rt[Rt.length-2],this.lastChar[1]=Rt[Rt.length-1],Bt.slice(0,-1)}return Bt}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=Rt[Rt.length-1],Rt.toString("utf16le",Tt,Rt.length-1)}function kt(Rt){var Tt=Rt&&Rt.length?this.write(Rt):"";if(this.lastNeed){var Bt=this.lastTotal-this.lastNeed;return Tt+this.lastChar.toString("utf16le",0,Bt)}return Tt}function vt(Rt,Tt){var Bt=(Rt.length-Tt)%3;return Bt===0?Rt.toString("base64",Tt):(this.lastNeed=3-Bt,this.lastTotal=3,Bt===1?this.lastChar[0]=Rt[Rt.length-1]:(this.lastChar[0]=Rt[Rt.length-2],this.lastChar[1]=Rt[Rt.length-1]),Rt.toString("base64",Tt,Rt.length-Bt))}function bt(Rt){var Tt=Rt&&Rt.length?this.write(Rt):"";return this.lastNeed?Tt+this.lastChar.toString("base64",0,3-this.lastNeed):Tt}function It(Rt){return Rt.toString(this.encoding)}function wt(Rt){return Rt&&Rt.length?this.write(Rt):""}ft.s=xt,xt.prototype.write=function(Rt){if(Rt.length===0)return"";var Tt,Bt;if(this.lastNeed){if((Tt=this.fillLast(Rt))===void 0)return"";Bt=this.lastNeed,this.lastNeed=0}else Bt=0;return Bt<Rt.length?Tt?Tt+this.text(Rt,Bt):this.text(Rt,Bt):Tt||""},xt.prototype.end=function(Rt){var Tt=Rt&&Rt.length?this.write(Rt):"";return this.lastNeed?Tt+"�":Tt},xt.prototype.text=function(Rt,Tt){var Bt=function(Pt,Nt,Lt){var Wt=Nt.length-1;if(Wt<Lt)return 0;var $t=Et(Nt[Wt]);return $t>=0?($t>0&&(Pt.lastNeed=$t-1),$t):--Wt<Lt||$t===-2?0:($t=Et(Nt[Wt]))>=0?($t>0&&(Pt.lastNeed=$t-2),$t):--Wt<Lt||$t===-2?0:($t=Et(Nt[Wt]))>=0?($t>0&&($t===2?$t=0:Pt.lastNeed=$t-3),$t):0}(this,Rt,Tt);if(!this.lastNeed)return Rt.toString("utf8",Tt);this.lastTotal=Bt;var Dt=Rt.length-(Bt-this.lastNeed);return Rt.copy(this.lastChar,0,Dt),Rt.toString("utf8",Tt,Dt)},xt.prototype.fillLast=function(Rt){if(this.lastNeed<=Rt.length)return Rt.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Rt.copy(this.lastChar,this.lastTotal-this.lastNeed,0,Rt.length),this.lastNeed-=Rt.length}},5803:(nt,ft,ht)=>{function gt(At){try{if(!ht.g.localStorage)return!1}catch{return!1}var xt=ht.g.localStorage[At];return xt!=null&&String(xt).toLowerCase()==="true"}nt.exports=function(At,xt){if(gt("noDeprecation"))return At;var Et=!1;return function(){if(!Et){if(gt("throwDeprecation"))throw new Error(xt);gt("traceDeprecation")?console.trace(xt):console.warn(xt),Et=!0}return At.apply(this,arguments)}}},7573:()=>{},5942:()=>{},4854:()=>{},6602:()=>{}},Le={};function Ye(nt){var ft=Le[nt];if(ft!==void 0)return ft.exports;var ht=Le[nt]={exports:{}};return Be[nt](ht,ht.exports,Ye),ht.exports}Ye.n=nt=>{var ft=nt&&nt.__esModule?()=>nt.default:()=>nt;return Ye.d(ft,{a:ft}),ft},Ye.d=(nt,ft)=>{for(var ht in ft)Ye.o(ft,ht)&&!Ye.o(nt,ht)&&Object.defineProperty(nt,ht,{enumerable:!0,get:ft[ht]})},Ye.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),Ye.o=(nt,ft)=>Object.prototype.hasOwnProperty.call(nt,ft),Ye.r=nt=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(nt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(nt,"__esModule",{value:!0})};var tt={};(()=>{Ye.r(tt),Ye.d(tt,{encryptImage:()=>xt,forge:()=>Ct()});var nt=Ye(11),ft=Ye.n(nt),ht=Ye(4406),gt=Ye.n(ht);function At(kt){return new Promise(function(vt){var bt=ft()("","");bt.on("readable",function(){var It=bt.read();It&&vt(It.toString("hex"))}),bt.write(kt),bt.end()})}function xt(kt){return vt=this,bt=void 0,wt=function(){var Rt;return function(Tt,Bt){var Dt,Pt,Nt,Lt,Wt={label:0,sent:function(){if(1&Nt[0])throw Nt[1];return Nt[1]},trys:[],ops:[]};return Lt={next:$t(0),throw:$t(1),return:$t(2)},typeof Symbol=="function"&&(Lt[Symbol.iterator]=function(){return this}),Lt;function $t(Kt){return function(Vt){return function(Ut){if(Dt)throw new TypeError("Generator is already executing.");for(;Wt;)try{if(Dt=1,Pt&&(Nt=2&Ut[0]?Pt.return:Ut[0]?Pt.throw||((Nt=Pt.return)&&Nt.call(Pt),0):Pt.next)&&!(Nt=Nt.call(Pt,Ut[1])).done)return Nt;switch(Pt=0,Nt&&(Ut=[2&Ut[0],Nt.value]),Ut[0]){case 0:case 1:Nt=Ut;break;case 4:return Wt.label++,{value:Ut[1],done:!1};case 5:Wt.label++,Pt=Ut[1],Ut=[0];continue;case 7:Ut=Wt.ops.pop(),Wt.trys.pop();continue;default:if(!((Nt=(Nt=Wt.trys).length>0&&Nt[Nt.length-1])||Ut[0]!==6&&Ut[0]!==2)){Wt=0;continue}if(Ut[0]===3&&(!Nt||Ut[1]>Nt[0]&&Ut[1]<Nt[3])){Wt.label=Ut[1];break}if(Ut[0]===6&&Wt.label<Nt[1]){Wt.label=Nt[1],Nt=Ut;break}if(Nt&&Wt.label<Nt[2]){Wt.label=Nt[2],Wt.ops.push(Ut);break}Nt[2]&&Wt.ops.pop(),Wt.trys.pop();continue}Ut=Bt.call(Tt,Wt)}catch(_t){Ut=[6,_t],Pt=0}finally{Dt=Nt=0}if(5&Ut[0])throw Ut[1];return{value:Ut[0]?Ut[1]:void 0,done:!0}}([Kt,Vt])}}}(this,function(Tt){switch(Tt.label){case 0:return[4,At(kt)];case 1:return Rt=Tt.sent(),[2,Et(kt,Rt)]}})},new((It=void 0)||(It=Promise))(function(Rt,Tt){function Bt(Nt){try{Pt(wt.next(Nt))}catch(Lt){Tt(Lt)}}function Dt(Nt){try{Pt(wt.throw(Nt))}catch(Lt){Tt(Lt)}}function Pt(Nt){var Lt;Nt.done?Rt(Nt.value):(Lt=Nt.value,Lt instanceof It?Lt:new It(function(Wt){Wt(Lt)})).then(Bt,Dt)}Pt((wt=wt.apply(vt,bt||[])).next())});var vt,bt,It,wt}function Et(kt,vt){for(var bt,It,wt,Rt=kt,Tt=0;Tt<vt.length;Tt++)bt=Rt,It=Tt+64*(Tt+1),wt=vt.charAt(Tt),Rt="".concat(bt.substring(0,It)).concat(wt).concat(bt.substring(It));return Rt}Ye.g.process=gt();var yt=Ye(6432),Ct=Ye.n(yt)})(),window.__MODULE_DEFAULT_EXPORT__=tt})();const __MODULE_DEFAULT_EXPORT__=window.__MODULE_DEFAULT_EXPORT__;delete window.__MODULE_DEFAULT_EXPORT__;const{forge}=__MODULE_DEFAULT_EXPORT__,publicKeyUrl="/e2ee/key/v2",postPublicKeyUrl="/e2ee/key";function getPublicKey(){return exports.api.get(publicKeyUrl).then(Be=>Be.data).catch(emptyFunc)}function encryptRsaOaepSha1Mgf1(Be,Le){const Ye=Be.encrypt(Le,"RSA-OAEP",{md:forge.md.sha256.create(),mgf1:{md:forge.md.sha1.create()}});return forge.util.bytesToHex(Ye)}function encryptRsaOaepSha256(Be,Le){const Ye=Be.encrypt(Le,"RSA-OAEP",{md:forge.md.sha256.create(),mgf1:{md:forge.md.sha256.create()}});return forge.util.bytesToHex(Ye)}function encryptAesGcm(Be,Le,Ye){try{const tt=forge.random.getBytesSync(12),nt=forge.cipher.createCipher("AES-GCM",Be);nt.start({iv:tt}),nt.update(forge.util.createBuffer(JSON.stringify(Le),"utf8")),nt.finish();const ft=nt.output.toHex(),ht=nt.mode.tag.toHex(),gt=forge.util.bytesToHex(tt);return{encryptedData:ft+ht,iv:gt,encryptedKey:Ye}}catch(tt){throw new Error(tt)}}function decryptAesGcm(Be,Le){try{const Ye=forge.util.hexToBytes(Le.iv),tt=forge.util.hexToBytes(Le.encryptedData.slice(-32)),nt=forge.cipher.createDecipher("AES-GCM",Be);nt.start({iv:Ye,tag:tt}),nt.update(forge.util.createBuffer(forge.util.hexToBytes(Le.encryptedData.slice(0,-32)))),nt.finish();const ft=nt.output.getBytes();return forge.util.decodeUtf8(ft)}catch(Ye){throw new Error(Ye)}}function postPublicKey(Be,Le,Ye,tt){return exports.api.post(postPublicKeyUrl,{encryptedKey:Be,encryptedIv:Le},{headers:{sessionId:Ye,"X-Incode-Hardware-Id":tt}}).then(nt=>nt.data)}async function publishKeys(Be){const Le=forge.random.getBytesSync(32),Ye=forge.random.getBytesSync(16),tt=await getPublicKey(),nt=`-----BEGIN PUBLIC KEY-----
|
|
10223
|
+
`,Vt=Vt.substr(Lt));return Ut+Vt},Et.binary.base64.decode=function(Nt,Lt,Wt){var $t,Kt,Vt,Ut,_t=Lt;_t||(_t=new Uint8Array(3*Math.ceil(Nt.length/4))),Nt=Nt.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var Xt=0,Qt=Wt=Wt||0;Xt<Nt.length;)$t=vt[Nt.charCodeAt(Xt++)-43],Kt=vt[Nt.charCodeAt(Xt++)-43],Vt=vt[Nt.charCodeAt(Xt++)-43],Ut=vt[Nt.charCodeAt(Xt++)-43],_t[Qt++]=$t<<2|Kt>>4,Vt!==64&&(_t[Qt++]=(15&Kt)<<4|Vt>>2,Ut!==64&&(_t[Qt++]=(3&Vt)<<6|Ut));return Lt?Qt-Wt:_t.subarray(0,Qt)},Et.binary.base58.encode=function(Nt,Lt){return Et.binary.baseN.encode(Nt,bt,Lt)},Et.binary.base58.decode=function(Nt,Lt){return Et.binary.baseN.decode(Nt,bt,Lt)},Et.text={utf8:{},utf16:{}},Et.text.utf8.encode=function(Nt,Lt,Wt){Nt=Et.encodeUtf8(Nt);var $t=Lt;$t||($t=new Uint8Array(Nt.length));for(var Kt=Wt=Wt||0,Vt=0;Vt<Nt.length;++Vt)$t[Kt++]=Nt.charCodeAt(Vt);return Lt?Kt-Wt:$t},Et.text.utf8.decode=function(Nt){return Et.decodeUtf8(String.fromCharCode.apply(null,Nt))},Et.text.utf16.encode=function(Nt,Lt,Wt){var $t=Lt;$t||($t=new Uint8Array(2*Nt.length));for(var Kt=new Uint16Array($t.buffer),Vt=Wt=Wt||0,Ut=Wt,_t=0;_t<Nt.length;++_t)Kt[Ut++]=Nt.charCodeAt(_t),Vt+=2;return Lt?Vt-Wt:$t},Et.text.utf16.decode=function(Nt){return String.fromCharCode.apply(null,new Uint16Array(Nt.buffer))},Et.deflate=function(Nt,Lt,Wt){if(Lt=Et.decode64(Nt.deflate(Et.encode64(Lt)).rval),Wt){var $t=2;32&Lt.charCodeAt(1)&&($t=6),Lt=Lt.substring($t,Lt.length-4)}return Lt},Et.inflate=function(Nt,Lt,Wt){var $t=Nt.inflate(Et.encode64(Lt)).rval;return $t===null?null:Et.decode64($t)};var It=function(Nt,Lt,Wt){if(!Nt)throw new Error("WebStorage not available.");var $t;if(Wt===null?$t=Nt.removeItem(Lt):(Wt=Et.encode64(JSON.stringify(Wt)),$t=Nt.setItem(Lt,Wt)),$t!==void 0&&$t.rval!==!0){var Kt=new Error($t.error.message);throw Kt.id=$t.error.id,Kt.name=$t.error.name,Kt}},wt=function(Nt,Lt){if(!Nt)throw new Error("WebStorage not available.");var Wt=Nt.getItem(Lt);if(Nt.init)if(Wt.rval===null){if(Wt.error){var $t=new Error(Wt.error.message);throw $t.id=Wt.error.id,$t.name=Wt.error.name,$t}Wt=null}else Wt=Wt.rval;return Wt!==null&&(Wt=JSON.parse(Et.decode64(Wt))),Wt},Rt=function(Nt,Lt,Wt,$t){var Kt=wt(Nt,Lt);Kt===null&&(Kt={}),Kt[Wt]=$t,It(Nt,Lt,Kt)},Tt=function(Nt,Lt,Wt){var $t=wt(Nt,Lt);return $t!==null&&($t=Wt in $t?$t[Wt]:null),$t},Bt=function(Nt,Lt,Wt){var $t=wt(Nt,Lt);if($t!==null&&Wt in $t){delete $t[Wt];var Kt=!0;for(var Vt in $t){Kt=!1;break}Kt&&($t=null),It(Nt,Lt,$t)}},Dt=function(Nt,Lt){It(Nt,Lt,null)},Pt=function(Nt,Lt,Wt){var $t,Kt=null;Wt===void 0&&(Wt=["web","flash"]);var Vt=!1,Ut=null;for(var _t in Wt){$t=Wt[_t];try{if($t==="flash"||$t==="both"){if(Lt[0]===null)throw new Error("Flash local storage not available.");Kt=Nt.apply(this,Lt),Vt=$t==="flash"}$t!=="web"&&$t!=="both"||(Lt[0]=localStorage,Kt=Nt.apply(this,Lt),Vt=!0)}catch(Xt){Ut=Xt}if(Vt)break}if(!Vt)throw Ut;return Kt};Et.setItem=function(Nt,Lt,Wt,$t,Kt){Pt(Rt,arguments,Kt)},Et.getItem=function(Nt,Lt,Wt,$t){return Pt(Tt,arguments,$t)},Et.removeItem=function(Nt,Lt,Wt,$t){Pt(Bt,arguments,$t)},Et.clearItems=function(Nt,Lt,Wt){Pt(Dt,arguments,Wt)},Et.isEmpty=function(Nt){for(var Lt in Nt)if(Nt.hasOwnProperty(Lt))return!1;return!0},Et.format=function(Nt){for(var Lt,Wt,$t=/%./g,Kt=0,Vt=[],Ut=0;Lt=$t.exec(Nt);){(Wt=Nt.substring(Ut,$t.lastIndex-2)).length>0&&Vt.push(Wt),Ut=$t.lastIndex;var _t=Lt[0][1];switch(_t){case"s":case"o":Kt<arguments.length?Vt.push(arguments[1+Kt++]):Vt.push("<?>");break;case"%":Vt.push("%");break;default:Vt.push("<%"+_t+"?>")}}return Vt.push(Nt.substring(Ut)),Vt.join("")},Et.formatNumber=function(Nt,Lt,Wt,$t){var Kt=Nt,Vt=isNaN(Lt=Math.abs(Lt))?2:Lt,Ut=Wt===void 0?",":Wt,_t=$t===void 0?".":$t,Xt=Kt<0?"-":"",Qt=parseInt(Kt=Math.abs(+Kt||0).toFixed(Vt),10)+"",jt=Qt.length>3?Qt.length%3:0;return Xt+(jt?Qt.substr(0,jt)+_t:"")+Qt.substr(jt).replace(/(\d{3})(?=\d)/g,"$1"+_t)+(Vt?Ut+Math.abs(Kt-Qt).toFixed(Vt).slice(2):"")},Et.formatSize=function(Nt){return Nt>=1073741824?Et.formatNumber(Nt/1073741824,2,".","")+" GiB":Nt>=1048576?Et.formatNumber(Nt/1048576,2,".","")+" MiB":Nt>=1024?Et.formatNumber(Nt/1024,0)+" KiB":Et.formatNumber(Nt,0)+" bytes"},Et.bytesFromIP=function(Nt){return Nt.indexOf(".")!==-1?Et.bytesFromIPv4(Nt):Nt.indexOf(":")!==-1?Et.bytesFromIPv6(Nt):null},Et.bytesFromIPv4=function(Nt){if((Nt=Nt.split(".")).length!==4)return null;for(var Lt=Et.createBuffer(),Wt=0;Wt<Nt.length;++Wt){var $t=parseInt(Nt[Wt],10);if(isNaN($t))return null;Lt.putByte($t)}return Lt.getBytes()},Et.bytesFromIPv6=function(Nt){for(var Lt=0,Wt=2*(8-(Nt=Nt.split(":").filter(function(Ut){return Ut.length===0&&++Lt,!0})).length+Lt),$t=Et.createBuffer(),Kt=0;Kt<8;++Kt)if(Nt[Kt]&&Nt[Kt].length!==0){var Vt=Et.hexToBytes(Nt[Kt]);Vt.length<2&&$t.putByte(0),$t.putBytes(Vt)}else $t.fillWithByte(0,Wt),Wt=0;return $t.getBytes()},Et.bytesToIP=function(Nt){return Nt.length===4?Et.bytesToIPv4(Nt):Nt.length===16?Et.bytesToIPv6(Nt):null},Et.bytesToIPv4=function(Nt){if(Nt.length!==4)return null;for(var Lt=[],Wt=0;Wt<Nt.length;++Wt)Lt.push(Nt.charCodeAt(Wt));return Lt.join(".")},Et.bytesToIPv6=function(Nt){if(Nt.length!==16)return null;for(var Lt=[],Wt=[],$t=0,Kt=0;Kt<Nt.length;Kt+=2){for(var Vt=Et.bytesToHex(Nt[Kt]+Nt[Kt+1]);Vt[0]==="0"&&Vt!=="0";)Vt=Vt.substr(1);if(Vt==="0"){var Ut=Wt[Wt.length-1],_t=Lt.length;Ut&&_t===Ut.end+1?(Ut.end=_t,Ut.end-Ut.start>Wt[$t].end-Wt[$t].start&&($t=Wt.length-1)):Wt.push({start:_t,end:_t})}Lt.push(Vt)}if(Wt.length>0){var Xt=Wt[$t];Xt.end-Xt.start>0&&(Lt.splice(Xt.start,Xt.end-Xt.start+1,""),Xt.start===0&&Lt.unshift(""),Xt.end===7&&Lt.push(""))}return Lt.join(":")},Et.estimateCores=function(Nt,Lt){if(typeof Nt=="function"&&(Lt=Nt,Nt={}),Nt=Nt||{},"cores"in Et&&!Nt.update)return Lt(null,Et.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return Et.cores=navigator.hardwareConcurrency,Lt(null,Et.cores);if(typeof Worker>"u")return Et.cores=1,Lt(null,Et.cores);if(typeof Blob>"u")return Et.cores=2,Lt(null,Et.cores);var Wt=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function($t){for(var Kt=Date.now(),Vt=Kt+4;Date.now()<Vt;);self.postMessage({st:Kt,et:Vt})})}).toString(),")()"],{type:"application/javascript"}));(function $t(Kt,Vt,Ut){if(Vt===0){var _t=Math.floor(Kt.reduce(function(Xt,Qt){return Xt+Qt},0)/Kt.length);return Et.cores=Math.max(1,_t),URL.revokeObjectURL(Wt),Lt(null,Et.cores)}(function(Xt,Qt){for(var jt=[],Gt=[],qt=0;qt<Xt;++qt){var zt=new Worker(Wt);zt.addEventListener("message",function(e0){if(Gt.push(e0.data),Gt.length===Xt){for(var s0=0;s0<Xt;++s0)jt[s0].terminate();Qt(0,Gt)}}),jt.push(zt)}for(qt=0;qt<Xt;++qt)jt[qt].postMessage(qt)})(Ut,function(Xt,Qt){Kt.push(function(jt,Gt){for(var qt=[],zt=0;zt<jt;++zt)for(var e0=Gt[zt],s0=qt[zt]=[],t0=0;t0<jt;++t0)if(zt!==t0){var l0=Gt[t0];(e0.st>l0.st&&e0.st<l0.et||l0.st>e0.st&&l0.st<e0.et)&&s0.push(t0)}return qt.reduce(function(d0,n0){return Math.max(d0,n0.length)},0)}(Ut,Qt)),$t(Kt,Vt-1,Ut)})})([],5,16)}},6446:(nt,ft,ht)=>{var gt=ht(7768);ht(1482),ht(2624),ht(2023),ht(6067),ht(826),ht(2884),ht(5477),ht(665),ht(144),ht(3103);var At=gt.asn1,xt=nt.exports=gt.pki=gt.pki||{},Et=xt.oids,yt={};yt.CN=Et.commonName,yt.commonName="CN",yt.C=Et.countryName,yt.countryName="C",yt.L=Et.localityName,yt.localityName="L",yt.ST=Et.stateOrProvinceName,yt.stateOrProvinceName="ST",yt.O=Et.organizationName,yt.organizationName="O",yt.OU=Et.organizationalUnitName,yt.organizationalUnitName="OU",yt.E=Et.emailAddress,yt.emailAddress="E";var Ct=gt.pki.rsa.publicKeyValidator,kt={name:"Certificate",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:At.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:At.Class.UNIVERSAL,type:At.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:At.Class.UNIVERSAL,type:At.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:At.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:At.Class.UNIVERSAL,type:At.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:At.Class.UNIVERSAL,type:At.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:At.Class.UNIVERSAL,type:At.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:At.Class.UNIVERSAL,type:At.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},Ct,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:At.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:At.Class.UNIVERSAL,type:At.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:At.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:At.Class.UNIVERSAL,type:At.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:At.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:At.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:At.Class.UNIVERSAL,type:At.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},vt={name:"rsapss",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:At.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:At.Class.UNIVERSAL,type:At.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:At.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:At.Class.UNIVERSAL,type:At.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:At.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:At.Class.UNIVERSAL,type:At.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:At.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:At.Class.UNIVERSAL,type:At.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},bt={name:"CertificationRequestInfo",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:At.Class.UNIVERSAL,type:At.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},Ct,{name:"CertificationRequestInfo.attributes",tagClass:At.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:At.Class.UNIVERSAL,type:At.Type.SET,constructed:!0}]}]}]},It={name:"CertificationRequest",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[bt,{name:"CertificationRequest.signatureAlgorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:At.Class.UNIVERSAL,type:At.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:At.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:At.Class.UNIVERSAL,type:At.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function wt(Ut,_t){typeof _t=="string"&&(_t={shortName:_t});for(var Xt,Qt=null,jt=0;Qt===null&&jt<Ut.attributes.length;++jt)Xt=Ut.attributes[jt],(_t.type&&_t.type===Xt.type||_t.name&&_t.name===Xt.name||_t.shortName&&_t.shortName===Xt.shortName)&&(Qt=Xt);return Qt}xt.RDNAttributesAsArray=function(Ut,_t){for(var Xt,Qt,jt,Gt=[],qt=0;qt<Ut.value.length;++qt){Xt=Ut.value[qt];for(var zt=0;zt<Xt.value.length;++zt)jt={},Qt=Xt.value[zt],jt.type=At.derToOid(Qt.value[0].value),jt.value=Qt.value[1].value,jt.valueTagClass=Qt.value[1].type,jt.type in Et&&(jt.name=Et[jt.type],jt.name in yt&&(jt.shortName=yt[jt.name])),_t&&(_t.update(jt.type),_t.update(jt.value)),Gt.push(jt)}return Gt},xt.CRIAttributesAsArray=function(Ut){for(var _t=[],Xt=0;Xt<Ut.length;++Xt)for(var Qt=Ut[Xt],jt=At.derToOid(Qt.value[0].value),Gt=Qt.value[1].value,qt=0;qt<Gt.length;++qt){var zt={};if(zt.type=jt,zt.value=Gt[qt].value,zt.valueTagClass=Gt[qt].type,zt.type in Et&&(zt.name=Et[zt.type],zt.name in yt&&(zt.shortName=yt[zt.name])),zt.type===Et.extensionRequest){zt.extensions=[];for(var e0=0;e0<zt.value.length;++e0)zt.extensions.push(xt.certificateExtensionFromAsn1(zt.value[e0]))}_t.push(zt)}return _t};var Rt=function(Ut,_t,Xt){var Qt={};if(Ut!==Et["RSASSA-PSS"])return Qt;Xt&&(Qt={hash:{algorithmOid:Et.sha1},mgf:{algorithmOid:Et.mgf1,hash:{algorithmOid:Et.sha1}},saltLength:20});var jt={},Gt=[];if(!At.validate(_t,vt,jt,Gt)){var qt=new Error("Cannot read RSASSA-PSS parameter block.");throw qt.errors=Gt,qt}return jt.hashOid!==void 0&&(Qt.hash=Qt.hash||{},Qt.hash.algorithmOid=At.derToOid(jt.hashOid)),jt.maskGenOid!==void 0&&(Qt.mgf=Qt.mgf||{},Qt.mgf.algorithmOid=At.derToOid(jt.maskGenOid),Qt.mgf.hash=Qt.mgf.hash||{},Qt.mgf.hash.algorithmOid=At.derToOid(jt.maskGenHashOid)),jt.saltLength!==void 0&&(Qt.saltLength=jt.saltLength.charCodeAt(0)),Qt},Tt=function(Ut){switch(Et[Ut.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return gt.md.sha1.create();case"md5WithRSAEncryption":return gt.md.md5.create();case"sha256WithRSAEncryption":case"RSASSA-PSS":return gt.md.sha256.create();case"sha384WithRSAEncryption":return gt.md.sha384.create();case"sha512WithRSAEncryption":return gt.md.sha512.create();default:var _t=new Error("Could not compute "+Ut.type+" digest. Unknown signature OID.");throw _t.signatureOid=Ut.signatureOid,_t}},Bt=function(Ut){var _t,Xt=Ut.certificate;switch(Xt.signatureOid){case Et.sha1WithRSAEncryption:case Et.sha1WithRSASignature:break;case Et["RSASSA-PSS"]:var Qt,jt,Gt;if((Qt=Et[Xt.signatureParameters.mgf.hash.algorithmOid])===void 0||gt.md[Qt]===void 0)throw(Gt=new Error("Unsupported MGF hash function.")).oid=Xt.signatureParameters.mgf.hash.algorithmOid,Gt.name=Qt,Gt;if((jt=Et[Xt.signatureParameters.mgf.algorithmOid])===void 0||gt.mgf[jt]===void 0)throw(Gt=new Error("Unsupported MGF function.")).oid=Xt.signatureParameters.mgf.algorithmOid,Gt.name=jt,Gt;if(jt=gt.mgf[jt].create(gt.md[Qt].create()),(Qt=Et[Xt.signatureParameters.hash.algorithmOid])===void 0||gt.md[Qt]===void 0)throw(Gt=new Error("Unsupported RSASSA-PSS hash function.")).oid=Xt.signatureParameters.hash.algorithmOid,Gt.name=Qt,Gt;_t=gt.pss.create(gt.md[Qt].create(),jt,Xt.signatureParameters.saltLength)}return Xt.publicKey.verify(Ut.md.digest().getBytes(),Ut.signature,_t)};function Dt(Ut){for(var _t,Xt,Qt=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),jt=Ut.attributes,Gt=0;Gt<jt.length;++Gt){var qt=(_t=jt[Gt]).value,zt=At.Type.PRINTABLESTRING;"valueTagClass"in _t&&(zt=_t.valueTagClass)===At.Type.UTF8&&(qt=gt.util.encodeUtf8(qt)),Xt=At.create(At.Class.UNIVERSAL,At.Type.SET,!0,[At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(_t.type).getBytes()),At.create(At.Class.UNIVERSAL,zt,!1,qt)])]),Qt.value.push(Xt)}return Qt}function Pt(Ut){for(var _t,Xt=0;Xt<Ut.length;++Xt){if((_t=Ut[Xt]).name===void 0&&(_t.type&&_t.type in xt.oids?_t.name=xt.oids[_t.type]:_t.shortName&&_t.shortName in yt&&(_t.name=xt.oids[yt[_t.shortName]])),_t.type===void 0){if(!_t.name||!(_t.name in xt.oids))throw(jt=new Error("Attribute type not specified.")).attribute=_t,jt;_t.type=xt.oids[_t.name]}if(_t.shortName===void 0&&_t.name&&_t.name in yt&&(_t.shortName=yt[_t.name]),_t.type===Et.extensionRequest&&(_t.valueConstructed=!0,_t.valueTagClass=At.Type.SEQUENCE,!_t.value&&_t.extensions)){_t.value=[];for(var Qt=0;Qt<_t.extensions.length;++Qt)_t.value.push(xt.certificateExtensionToAsn1(Nt(_t.extensions[Qt])))}var jt;if(_t.value===void 0)throw(jt=new Error("Attribute value not specified.")).attribute=_t,jt}}function Nt(Ut,_t){if(_t=_t||{},Ut.name===void 0&&Ut.id&&Ut.id in xt.oids&&(Ut.name=xt.oids[Ut.id]),Ut.id===void 0){if(!Ut.name||!(Ut.name in xt.oids))throw(o0=new Error("Extension ID not specified.")).extension=Ut,o0;Ut.id=xt.oids[Ut.name]}if(Ut.value!==void 0)return Ut;if(Ut.name==="keyUsage"){var Xt=0,Qt=0,jt=0;Ut.digitalSignature&&(Qt|=128,Xt=7),Ut.nonRepudiation&&(Qt|=64,Xt=6),Ut.keyEncipherment&&(Qt|=32,Xt=5),Ut.dataEncipherment&&(Qt|=16,Xt=4),Ut.keyAgreement&&(Qt|=8,Xt=3),Ut.keyCertSign&&(Qt|=4,Xt=2),Ut.cRLSign&&(Qt|=2,Xt=1),Ut.encipherOnly&&(Qt|=1,Xt=0),Ut.decipherOnly&&(jt|=128,Xt=7);var Gt=String.fromCharCode(Xt);jt!==0?Gt+=String.fromCharCode(Qt)+String.fromCharCode(jt):Qt!==0&&(Gt+=String.fromCharCode(Qt)),Ut.value=At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,Gt)}else if(Ut.name==="basicConstraints")Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),Ut.cA&&Ut.value.value.push(At.create(At.Class.UNIVERSAL,At.Type.BOOLEAN,!1,"ÿ")),"pathLenConstraint"in Ut&&Ut.value.value.push(At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,At.integerToDer(Ut.pathLenConstraint).getBytes()));else if(Ut.name==="extKeyUsage"){Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]);var qt=Ut.value.value;for(var zt in Ut)Ut[zt]===!0&&(zt in Et?qt.push(At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Et[zt]).getBytes())):zt.indexOf(".")!==-1&&qt.push(At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(zt).getBytes())))}else if(Ut.name==="nsCertType")Xt=0,Qt=0,Ut.client&&(Qt|=128,Xt=7),Ut.server&&(Qt|=64,Xt=6),Ut.email&&(Qt|=32,Xt=5),Ut.objsign&&(Qt|=16,Xt=4),Ut.reserved&&(Qt|=8,Xt=3),Ut.sslCA&&(Qt|=4,Xt=2),Ut.emailCA&&(Qt|=2,Xt=1),Ut.objCA&&(Qt|=1,Xt=0),Gt=String.fromCharCode(Xt),Qt!==0&&(Gt+=String.fromCharCode(Qt)),Ut.value=At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,Gt);else if(Ut.name==="subjectAltName"||Ut.name==="issuerAltName"){Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]);for(var e0=0;e0<Ut.altNames.length;++e0){if(Gt=(n0=Ut.altNames[e0]).value,n0.type===7&&n0.ip){if((Gt=gt.util.bytesFromIP(n0.ip))===null)throw(o0=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=Ut,o0}else n0.type===8&&(Gt=n0.oid?At.oidToDer(At.oidToDer(n0.oid)):At.oidToDer(Gt));Ut.value.value.push(At.create(At.Class.CONTEXT_SPECIFIC,n0.type,!1,Gt))}}else if(Ut.name==="nsComment"&&_t.cert){if(!/^[\x00-\x7F]*$/.test(Ut.comment)||Ut.comment.length<1||Ut.comment.length>128)throw new Error('Invalid "nsComment" content.');Ut.value=At.create(At.Class.UNIVERSAL,At.Type.IA5STRING,!1,Ut.comment)}else if(Ut.name==="subjectKeyIdentifier"&&_t.cert){var s0=_t.cert.generateSubjectKeyIdentifier();Ut.subjectKeyIdentifier=s0.toHex(),Ut.value=At.create(At.Class.UNIVERSAL,At.Type.OCTETSTRING,!1,s0.getBytes())}else if(Ut.name==="authorityKeyIdentifier"&&_t.cert){if(Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),qt=Ut.value.value,Ut.keyIdentifier){var t0=Ut.keyIdentifier===!0?_t.cert.generateSubjectKeyIdentifier().getBytes():Ut.keyIdentifier;qt.push(At.create(At.Class.CONTEXT_SPECIFIC,0,!1,t0))}if(Ut.authorityCertIssuer){var l0=[At.create(At.Class.CONTEXT_SPECIFIC,4,!0,[Dt(Ut.authorityCertIssuer===!0?_t.cert.issuer:Ut.authorityCertIssuer)])];qt.push(At.create(At.Class.CONTEXT_SPECIFIC,1,!0,l0))}if(Ut.serialNumber){var d0=gt.util.hexToBytes(Ut.serialNumber===!0?_t.cert.serialNumber:Ut.serialNumber);qt.push(At.create(At.Class.CONTEXT_SPECIFIC,2,!1,d0))}}else if(Ut.name==="cRLDistributionPoints"){Ut.value=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),qt=Ut.value.value;var n0,g0=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]),A0=At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[]);for(e0=0;e0<Ut.altNames.length;++e0){if(Gt=(n0=Ut.altNames[e0]).value,n0.type===7&&n0.ip){if((Gt=gt.util.bytesFromIP(n0.ip))===null)throw(o0=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=Ut,o0}else n0.type===8&&(Gt=n0.oid?At.oidToDer(At.oidToDer(n0.oid)):At.oidToDer(Gt));A0.value.push(At.create(At.Class.CONTEXT_SPECIFIC,n0.type,!1,Gt))}g0.value.push(At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[A0])),qt.push(g0)}var o0;if(Ut.value===void 0)throw(o0=new Error("Extension value not specified.")).extension=Ut,o0;return Ut}function Lt(Ut,_t){if(Ut===Et["RSASSA-PSS"]){var Xt=[];return _t.hash.algorithmOid!==void 0&&Xt.push(At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(_t.hash.algorithmOid).getBytes()),At.create(At.Class.UNIVERSAL,At.Type.NULL,!1,"")])])),_t.mgf.algorithmOid!==void 0&&Xt.push(At.create(At.Class.CONTEXT_SPECIFIC,1,!0,[At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(_t.mgf.algorithmOid).getBytes()),At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(_t.mgf.hash.algorithmOid).getBytes()),At.create(At.Class.UNIVERSAL,At.Type.NULL,!1,"")])])])),_t.saltLength!==void 0&&Xt.push(At.create(At.Class.CONTEXT_SPECIFIC,2,!0,[At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,At.integerToDer(_t.saltLength).getBytes())])),At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,Xt)}return At.create(At.Class.UNIVERSAL,At.Type.NULL,!1,"")}function Wt(Ut){var _t=At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[]);if(Ut.attributes.length===0)return _t;for(var Xt=Ut.attributes,Qt=0;Qt<Xt.length;++Qt){var jt=Xt[Qt],Gt=jt.value,qt=At.Type.UTF8;"valueTagClass"in jt&&(qt=jt.valueTagClass),qt===At.Type.UTF8&&(Gt=gt.util.encodeUtf8(Gt));var zt=!1;"valueConstructed"in jt&&(zt=jt.valueConstructed);var e0=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(jt.type).getBytes()),At.create(At.Class.UNIVERSAL,At.Type.SET,!0,[At.create(At.Class.UNIVERSAL,qt,zt,Gt)])]);_t.value.push(e0)}return _t}xt.certificateFromPem=function(Ut,_t,Xt){var Qt=gt.pem.decode(Ut)[0];if(Qt.type!=="CERTIFICATE"&&Qt.type!=="X509 CERTIFICATE"&&Qt.type!=="TRUSTED CERTIFICATE"){var jt=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw jt.headerType=Qt.type,jt}if(Qt.procType&&Qt.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var Gt=At.fromDer(Qt.body,Xt);return xt.certificateFromAsn1(Gt,_t)},xt.certificateToPem=function(Ut,_t){var Xt={type:"CERTIFICATE",body:At.toDer(xt.certificateToAsn1(Ut)).getBytes()};return gt.pem.encode(Xt,{maxline:_t})},xt.publicKeyFromPem=function(Ut){var _t=gt.pem.decode(Ut)[0];if(_t.type!=="PUBLIC KEY"&&_t.type!=="RSA PUBLIC KEY"){var Xt=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw Xt.headerType=_t.type,Xt}if(_t.procType&&_t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var Qt=At.fromDer(_t.body);return xt.publicKeyFromAsn1(Qt)},xt.publicKeyToPem=function(Ut,_t){var Xt={type:"PUBLIC KEY",body:At.toDer(xt.publicKeyToAsn1(Ut)).getBytes()};return gt.pem.encode(Xt,{maxline:_t})},xt.publicKeyToRSAPublicKeyPem=function(Ut,_t){var Xt={type:"RSA PUBLIC KEY",body:At.toDer(xt.publicKeyToRSAPublicKey(Ut)).getBytes()};return gt.pem.encode(Xt,{maxline:_t})},xt.getPublicKeyFingerprint=function(Ut,_t){var Xt,Qt=(_t=_t||{}).md||gt.md.sha1.create();switch(_t.type||"RSAPublicKey"){case"RSAPublicKey":Xt=At.toDer(xt.publicKeyToRSAPublicKey(Ut)).getBytes();break;case"SubjectPublicKeyInfo":Xt=At.toDer(xt.publicKeyToAsn1(Ut)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+_t.type+'".')}Qt.start(),Qt.update(Xt);var jt=Qt.digest();if(_t.encoding==="hex"){var Gt=jt.toHex();return _t.delimiter?Gt.match(/.{2}/g).join(_t.delimiter):Gt}if(_t.encoding==="binary")return jt.getBytes();if(_t.encoding)throw new Error('Unknown encoding "'+_t.encoding+'".');return jt},xt.certificationRequestFromPem=function(Ut,_t,Xt){var Qt=gt.pem.decode(Ut)[0];if(Qt.type!=="CERTIFICATE REQUEST"){var jt=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw jt.headerType=Qt.type,jt}if(Qt.procType&&Qt.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var Gt=At.fromDer(Qt.body,Xt);return xt.certificationRequestFromAsn1(Gt,_t)},xt.certificationRequestToPem=function(Ut,_t){var Xt={type:"CERTIFICATE REQUEST",body:At.toDer(xt.certificationRequestToAsn1(Ut)).getBytes()};return gt.pem.encode(Xt,{maxline:_t})},xt.createCertificate=function(){var Ut={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return Ut.siginfo.algorithmOid=null,Ut.validity={},Ut.validity.notBefore=new Date,Ut.validity.notAfter=new Date,Ut.issuer={},Ut.issuer.getField=function(_t){return wt(Ut.issuer,_t)},Ut.issuer.addField=function(_t){Pt([_t]),Ut.issuer.attributes.push(_t)},Ut.issuer.attributes=[],Ut.issuer.hash=null,Ut.subject={},Ut.subject.getField=function(_t){return wt(Ut.subject,_t)},Ut.subject.addField=function(_t){Pt([_t]),Ut.subject.attributes.push(_t)},Ut.subject.attributes=[],Ut.subject.hash=null,Ut.extensions=[],Ut.publicKey=null,Ut.md=null,Ut.setSubject=function(_t,Xt){Pt(_t),Ut.subject.attributes=_t,delete Ut.subject.uniqueId,Xt&&(Ut.subject.uniqueId=Xt),Ut.subject.hash=null},Ut.setIssuer=function(_t,Xt){Pt(_t),Ut.issuer.attributes=_t,delete Ut.issuer.uniqueId,Xt&&(Ut.issuer.uniqueId=Xt),Ut.issuer.hash=null},Ut.setExtensions=function(_t){for(var Xt=0;Xt<_t.length;++Xt)Nt(_t[Xt],{cert:Ut});Ut.extensions=_t},Ut.getExtension=function(_t){typeof _t=="string"&&(_t={name:_t});for(var Xt,Qt=null,jt=0;Qt===null&&jt<Ut.extensions.length;++jt)Xt=Ut.extensions[jt],(_t.id&&Xt.id===_t.id||_t.name&&Xt.name===_t.name)&&(Qt=Xt);return Qt},Ut.sign=function(_t,Xt){Ut.md=Xt||gt.md.sha1.create();var Qt=Et[Ut.md.algorithm+"WithRSAEncryption"];if(!Qt){var jt=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw jt.algorithm=Ut.md.algorithm,jt}Ut.signatureOid=Ut.siginfo.algorithmOid=Qt,Ut.tbsCertificate=xt.getTBSCertificate(Ut);var Gt=At.toDer(Ut.tbsCertificate);Ut.md.update(Gt.getBytes()),Ut.signature=_t.sign(Ut.md)},Ut.verify=function(_t){var Xt=!1;if(!Ut.issued(_t)){var Qt=_t.issuer,jt=Ut.subject,Gt=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw Gt.expectedIssuer=jt.attributes,Gt.actualIssuer=Qt.attributes,Gt}var qt=_t.md;if(qt===null){qt=Tt({signatureOid:_t.signatureOid,type:"certificate"});var zt=_t.tbsCertificate||xt.getTBSCertificate(_t),e0=At.toDer(zt);qt.update(e0.getBytes())}return qt!==null&&(Xt=Bt({certificate:Ut,md:qt,signature:_t.signature})),Xt},Ut.isIssuer=function(_t){var Xt=!1,Qt=Ut.issuer,jt=_t.subject;if(Qt.hash&&jt.hash)Xt=Qt.hash===jt.hash;else if(Qt.attributes.length===jt.attributes.length){var Gt,qt;Xt=!0;for(var zt=0;Xt&&zt<Qt.attributes.length;++zt)Gt=Qt.attributes[zt],qt=jt.attributes[zt],Gt.type===qt.type&&Gt.value===qt.value||(Xt=!1)}return Xt},Ut.issued=function(_t){return _t.isIssuer(Ut)},Ut.generateSubjectKeyIdentifier=function(){return xt.getPublicKeyFingerprint(Ut.publicKey,{type:"RSAPublicKey"})},Ut.verifySubjectKeyIdentifier=function(){for(var _t=Et.subjectKeyIdentifier,Xt=0;Xt<Ut.extensions.length;++Xt){var Qt=Ut.extensions[Xt];if(Qt.id===_t){var jt=Ut.generateSubjectKeyIdentifier().getBytes();return gt.util.hexToBytes(Qt.subjectKeyIdentifier)===jt}}return!1},Ut},xt.certificateFromAsn1=function(Ut,_t){var Xt={},Qt=[];if(!At.validate(Ut,kt,Xt,Qt)){var jt=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw jt.errors=Qt,jt}if(At.derToOid(Xt.publicKeyOid)!==xt.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var Gt=xt.createCertificate();Gt.version=Xt.certVersion?Xt.certVersion.charCodeAt(0):0;var qt=gt.util.createBuffer(Xt.certSerialNumber);Gt.serialNumber=qt.toHex(),Gt.signatureOid=gt.asn1.derToOid(Xt.certSignatureOid),Gt.signatureParameters=Rt(Gt.signatureOid,Xt.certSignatureParams,!0),Gt.siginfo.algorithmOid=gt.asn1.derToOid(Xt.certinfoSignatureOid),Gt.siginfo.parameters=Rt(Gt.siginfo.algorithmOid,Xt.certinfoSignatureParams,!1),Gt.signature=Xt.certSignature;var zt=[];if(Xt.certValidity1UTCTime!==void 0&&zt.push(At.utcTimeToDate(Xt.certValidity1UTCTime)),Xt.certValidity2GeneralizedTime!==void 0&&zt.push(At.generalizedTimeToDate(Xt.certValidity2GeneralizedTime)),Xt.certValidity3UTCTime!==void 0&&zt.push(At.utcTimeToDate(Xt.certValidity3UTCTime)),Xt.certValidity4GeneralizedTime!==void 0&&zt.push(At.generalizedTimeToDate(Xt.certValidity4GeneralizedTime)),zt.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(zt.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(Gt.validity.notBefore=zt[0],Gt.validity.notAfter=zt[1],Gt.tbsCertificate=Xt.tbsCertificate,_t){Gt.md=Tt({signatureOid:Gt.signatureOid,type:"certificate"});var e0=At.toDer(Gt.tbsCertificate);Gt.md.update(e0.getBytes())}var s0=gt.md.sha1.create(),t0=At.toDer(Xt.certIssuer);s0.update(t0.getBytes()),Gt.issuer.getField=function(n0){return wt(Gt.issuer,n0)},Gt.issuer.addField=function(n0){Pt([n0]),Gt.issuer.attributes.push(n0)},Gt.issuer.attributes=xt.RDNAttributesAsArray(Xt.certIssuer),Xt.certIssuerUniqueId&&(Gt.issuer.uniqueId=Xt.certIssuerUniqueId),Gt.issuer.hash=s0.digest().toHex();var l0=gt.md.sha1.create(),d0=At.toDer(Xt.certSubject);return l0.update(d0.getBytes()),Gt.subject.getField=function(n0){return wt(Gt.subject,n0)},Gt.subject.addField=function(n0){Pt([n0]),Gt.subject.attributes.push(n0)},Gt.subject.attributes=xt.RDNAttributesAsArray(Xt.certSubject),Xt.certSubjectUniqueId&&(Gt.subject.uniqueId=Xt.certSubjectUniqueId),Gt.subject.hash=l0.digest().toHex(),Xt.certExtensions?Gt.extensions=xt.certificateExtensionsFromAsn1(Xt.certExtensions):Gt.extensions=[],Gt.publicKey=xt.publicKeyFromAsn1(Xt.subjectPublicKeyInfo),Gt},xt.certificateExtensionsFromAsn1=function(Ut){for(var _t=[],Xt=0;Xt<Ut.value.length;++Xt)for(var Qt=Ut.value[Xt],jt=0;jt<Qt.value.length;++jt)_t.push(xt.certificateExtensionFromAsn1(Qt.value[jt]));return _t},xt.certificateExtensionFromAsn1=function(Ut){var _t={};if(_t.id=At.derToOid(Ut.value[0].value),_t.critical=!1,Ut.value[1].type===At.Type.BOOLEAN?(_t.critical=Ut.value[1].value.charCodeAt(0)!==0,_t.value=Ut.value[2].value):_t.value=Ut.value[1].value,_t.id in Et)if(_t.name=Et[_t.id],_t.name==="keyUsage"){var Xt=0,Qt=0;(Gt=At.fromDer(_t.value)).value.length>1&&(Xt=Gt.value.charCodeAt(1),Qt=Gt.value.length>2?Gt.value.charCodeAt(2):0),_t.digitalSignature=(128&Xt)==128,_t.nonRepudiation=(64&Xt)==64,_t.keyEncipherment=(32&Xt)==32,_t.dataEncipherment=(16&Xt)==16,_t.keyAgreement=(8&Xt)==8,_t.keyCertSign=(4&Xt)==4,_t.cRLSign=(2&Xt)==2,_t.encipherOnly=(1&Xt)==1,_t.decipherOnly=(128&Qt)==128}else if(_t.name==="basicConstraints"){(Gt=At.fromDer(_t.value)).value.length>0&&Gt.value[0].type===At.Type.BOOLEAN?_t.cA=Gt.value[0].value.charCodeAt(0)!==0:_t.cA=!1;var jt=null;Gt.value.length>0&&Gt.value[0].type===At.Type.INTEGER?jt=Gt.value[0].value:Gt.value.length>1&&(jt=Gt.value[1].value),jt!==null&&(_t.pathLenConstraint=At.derToInteger(jt))}else if(_t.name==="extKeyUsage")for(var Gt=At.fromDer(_t.value),qt=0;qt<Gt.value.length;++qt){var zt=At.derToOid(Gt.value[qt].value);zt in Et?_t[Et[zt]]=!0:_t[zt]=!0}else if(_t.name==="nsCertType")Xt=0,(Gt=At.fromDer(_t.value)).value.length>1&&(Xt=Gt.value.charCodeAt(1)),_t.client=(128&Xt)==128,_t.server=(64&Xt)==64,_t.email=(32&Xt)==32,_t.objsign=(16&Xt)==16,_t.reserved=(8&Xt)==8,_t.sslCA=(4&Xt)==4,_t.emailCA=(2&Xt)==2,_t.objCA=(1&Xt)==1;else if(_t.name==="subjectAltName"||_t.name==="issuerAltName"){var e0;_t.altNames=[],Gt=At.fromDer(_t.value);for(var s0=0;s0<Gt.value.length;++s0){var t0={type:(e0=Gt.value[s0]).type,value:e0.value};switch(_t.altNames.push(t0),e0.type){case 1:case 2:case 6:break;case 7:t0.ip=gt.util.bytesToIP(e0.value);break;case 8:t0.oid=At.derToOid(e0.value)}}}else _t.name==="subjectKeyIdentifier"&&(Gt=At.fromDer(_t.value),_t.subjectKeyIdentifier=gt.util.bytesToHex(Gt.value));return _t},xt.certificationRequestFromAsn1=function(Ut,_t){var Xt={},Qt=[];if(!At.validate(Ut,It,Xt,Qt)){var jt=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw jt.errors=Qt,jt}if(At.derToOid(Xt.publicKeyOid)!==xt.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var Gt=xt.createCertificationRequest();if(Gt.version=Xt.csrVersion?Xt.csrVersion.charCodeAt(0):0,Gt.signatureOid=gt.asn1.derToOid(Xt.csrSignatureOid),Gt.signatureParameters=Rt(Gt.signatureOid,Xt.csrSignatureParams,!0),Gt.siginfo.algorithmOid=gt.asn1.derToOid(Xt.csrSignatureOid),Gt.siginfo.parameters=Rt(Gt.siginfo.algorithmOid,Xt.csrSignatureParams,!1),Gt.signature=Xt.csrSignature,Gt.certificationRequestInfo=Xt.certificationRequestInfo,_t){Gt.md=Tt({signatureOid:Gt.signatureOid,type:"certification request"});var qt=At.toDer(Gt.certificationRequestInfo);Gt.md.update(qt.getBytes())}var zt=gt.md.sha1.create();return Gt.subject.getField=function(e0){return wt(Gt.subject,e0)},Gt.subject.addField=function(e0){Pt([e0]),Gt.subject.attributes.push(e0)},Gt.subject.attributes=xt.RDNAttributesAsArray(Xt.certificationRequestInfoSubject,zt),Gt.subject.hash=zt.digest().toHex(),Gt.publicKey=xt.publicKeyFromAsn1(Xt.subjectPublicKeyInfo),Gt.getAttribute=function(e0){return wt(Gt,e0)},Gt.addAttribute=function(e0){Pt([e0]),Gt.attributes.push(e0)},Gt.attributes=xt.CRIAttributesAsArray(Xt.certificationRequestInfoAttributes||[]),Gt},xt.createCertificationRequest=function(){var Ut={version:0,signatureOid:null,signature:null,siginfo:{}};return Ut.siginfo.algorithmOid=null,Ut.subject={},Ut.subject.getField=function(_t){return wt(Ut.subject,_t)},Ut.subject.addField=function(_t){Pt([_t]),Ut.subject.attributes.push(_t)},Ut.subject.attributes=[],Ut.subject.hash=null,Ut.publicKey=null,Ut.attributes=[],Ut.getAttribute=function(_t){return wt(Ut,_t)},Ut.addAttribute=function(_t){Pt([_t]),Ut.attributes.push(_t)},Ut.md=null,Ut.setSubject=function(_t){Pt(_t),Ut.subject.attributes=_t,Ut.subject.hash=null},Ut.setAttributes=function(_t){Pt(_t),Ut.attributes=_t},Ut.sign=function(_t,Xt){Ut.md=Xt||gt.md.sha1.create();var Qt=Et[Ut.md.algorithm+"WithRSAEncryption"];if(!Qt){var jt=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw jt.algorithm=Ut.md.algorithm,jt}Ut.signatureOid=Ut.siginfo.algorithmOid=Qt,Ut.certificationRequestInfo=xt.getCertificationRequestInfo(Ut);var Gt=At.toDer(Ut.certificationRequestInfo);Ut.md.update(Gt.getBytes()),Ut.signature=_t.sign(Ut.md)},Ut.verify=function(){var _t=!1,Xt=Ut.md;if(Xt===null){Xt=Tt({signatureOid:Ut.signatureOid,type:"certification request"});var Qt=Ut.certificationRequestInfo||xt.getCertificationRequestInfo(Ut),jt=At.toDer(Qt);Xt.update(jt.getBytes())}return Xt!==null&&(_t=Bt({certificate:Ut,md:Xt,signature:Ut.signature})),_t},Ut};var $t=new Date("1950-01-01T00:00:00Z"),Kt=new Date("2050-01-01T00:00:00Z");function Vt(Ut){return Ut>=$t&&Ut<Kt?At.create(At.Class.UNIVERSAL,At.Type.UTCTIME,!1,At.dateToUtcTime(Ut)):At.create(At.Class.UNIVERSAL,At.Type.GENERALIZEDTIME,!1,At.dateToGeneralizedTime(Ut))}xt.getTBSCertificate=function(Ut){var _t=Vt(Ut.validity.notBefore),Xt=Vt(Ut.validity.notAfter),Qt=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.CONTEXT_SPECIFIC,0,!0,[At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,At.integerToDer(Ut.version).getBytes())]),At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,gt.util.hexToBytes(Ut.serialNumber)),At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Ut.siginfo.algorithmOid).getBytes()),Lt(Ut.siginfo.algorithmOid,Ut.siginfo.parameters)]),Dt(Ut.issuer),At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[_t,Xt]),Dt(Ut.subject),xt.publicKeyToAsn1(Ut.publicKey)]);return Ut.issuer.uniqueId&&Qt.value.push(At.create(At.Class.CONTEXT_SPECIFIC,1,!0,[At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,"\0"+Ut.issuer.uniqueId)])),Ut.subject.uniqueId&&Qt.value.push(At.create(At.Class.CONTEXT_SPECIFIC,2,!0,[At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,"\0"+Ut.subject.uniqueId)])),Ut.extensions.length>0&&Qt.value.push(xt.certificateExtensionsToAsn1(Ut.extensions)),Qt},xt.getCertificationRequestInfo=function(Ut){return At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.INTEGER,!1,At.integerToDer(Ut.version).getBytes()),Dt(Ut.subject),xt.publicKeyToAsn1(Ut.publicKey),Wt(Ut)])},xt.distinguishedNameToAsn1=function(Ut){return Dt(Ut)},xt.certificateToAsn1=function(Ut){var _t=Ut.tbsCertificate||xt.getTBSCertificate(Ut);return At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[_t,At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Ut.signatureOid).getBytes()),Lt(Ut.signatureOid,Ut.signatureParameters)]),At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,"\0"+Ut.signature)])},xt.certificateExtensionsToAsn1=function(Ut){var _t=At.create(At.Class.CONTEXT_SPECIFIC,3,!0,[]),Xt=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]);_t.value.push(Xt);for(var Qt=0;Qt<Ut.length;++Qt)Xt.value.push(xt.certificateExtensionToAsn1(Ut[Qt]));return _t},xt.certificateExtensionToAsn1=function(Ut){var _t=At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[]);_t.value.push(At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Ut.id).getBytes())),Ut.critical&&_t.value.push(At.create(At.Class.UNIVERSAL,At.Type.BOOLEAN,!1,"ÿ"));var Xt=Ut.value;return typeof Ut.value!="string"&&(Xt=At.toDer(Xt).getBytes()),_t.value.push(At.create(At.Class.UNIVERSAL,At.Type.OCTETSTRING,!1,Xt)),_t},xt.certificationRequestToAsn1=function(Ut){var _t=Ut.certificationRequestInfo||xt.getCertificationRequestInfo(Ut);return At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[_t,At.create(At.Class.UNIVERSAL,At.Type.SEQUENCE,!0,[At.create(At.Class.UNIVERSAL,At.Type.OID,!1,At.oidToDer(Ut.signatureOid).getBytes()),Lt(Ut.signatureOid,Ut.signatureParameters)]),At.create(At.Class.UNIVERSAL,At.Type.BITSTRING,!1,"\0"+Ut.signature)])},xt.createCaStore=function(Ut){var _t={certs:{}};function Xt(qt){return Qt(qt),_t.certs[qt.hash]||null}function Qt(qt){if(!qt.hash){var zt=gt.md.sha1.create();qt.attributes=xt.RDNAttributesAsArray(Dt(qt),zt),qt.hash=zt.digest().toHex()}}if(_t.getIssuer=function(qt){return Xt(qt.issuer)},_t.addCertificate=function(qt){if(typeof qt=="string"&&(qt=gt.pki.certificateFromPem(qt)),Qt(qt.subject),!_t.hasCertificate(qt))if(qt.subject.hash in _t.certs){var zt=_t.certs[qt.subject.hash];gt.util.isArray(zt)||(zt=[zt]),zt.push(qt),_t.certs[qt.subject.hash]=zt}else _t.certs[qt.subject.hash]=qt},_t.hasCertificate=function(qt){typeof qt=="string"&&(qt=gt.pki.certificateFromPem(qt));var zt=Xt(qt.subject);if(!zt)return!1;gt.util.isArray(zt)||(zt=[zt]);for(var e0=At.toDer(xt.certificateToAsn1(qt)).getBytes(),s0=0;s0<zt.length;++s0)if(e0===At.toDer(xt.certificateToAsn1(zt[s0])).getBytes())return!0;return!1},_t.listAllCertificates=function(){var qt=[];for(var zt in _t.certs)if(_t.certs.hasOwnProperty(zt)){var e0=_t.certs[zt];if(gt.util.isArray(e0))for(var s0=0;s0<e0.length;++s0)qt.push(e0[s0]);else qt.push(e0)}return qt},_t.removeCertificate=function(qt){var zt;if(typeof qt=="string"&&(qt=gt.pki.certificateFromPem(qt)),Qt(qt.subject),!_t.hasCertificate(qt))return null;var e0=Xt(qt.subject);if(!gt.util.isArray(e0))return zt=_t.certs[qt.subject.hash],delete _t.certs[qt.subject.hash],zt;for(var s0=At.toDer(xt.certificateToAsn1(qt)).getBytes(),t0=0;t0<e0.length;++t0)s0===At.toDer(xt.certificateToAsn1(e0[t0])).getBytes()&&(zt=e0[t0],e0.splice(t0,1));return e0.length===0&&delete _t.certs[qt.subject.hash],zt},Ut)for(var jt=0;jt<Ut.length;++jt){var Gt=Ut[jt];_t.addCertificate(Gt)}return _t},xt.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},xt.verifyCertificateChain=function(Ut,_t,Xt){typeof Xt=="function"&&(Xt={verify:Xt}),Xt=Xt||{};var Qt=(_t=_t.slice(0)).slice(0),jt=Xt.validityCheckDate;jt===void 0&&(jt=new Date);var Gt=!0,qt=null,zt=0;do{var e0=_t.shift(),s0=null,t0=!1;if(jt&&(jt<e0.validity.notBefore||jt>e0.validity.notAfter)&&(qt={message:"Certificate is not valid yet or has expired.",error:xt.certificateError.certificate_expired,notBefore:e0.validity.notBefore,notAfter:e0.validity.notAfter,now:jt}),qt===null){if((s0=_t[0]||Ut.getIssuer(e0))===null&&e0.isIssuer(e0)&&(t0=!0,s0=e0),s0){var l0=s0;gt.util.isArray(l0)||(l0=[l0]);for(var d0=!1;!d0&&l0.length>0;){s0=l0.shift();try{d0=s0.verify(e0)}catch{}}d0||(qt={message:"Certificate signature is invalid.",error:xt.certificateError.bad_certificate})}qt!==null||s0&&!t0||Ut.hasCertificate(e0)||(qt={message:"Certificate is not trusted.",error:xt.certificateError.unknown_ca})}if(qt===null&&s0&&!e0.isIssuer(s0)&&(qt={message:"Certificate issuer is invalid.",error:xt.certificateError.bad_certificate}),qt===null)for(var n0={keyUsage:!0,basicConstraints:!0},g0=0;qt===null&&g0<e0.extensions.length;++g0){var A0=e0.extensions[g0];A0.critical&&!(A0.name in n0)&&(qt={message:"Certificate has an unsupported critical extension.",error:xt.certificateError.unsupported_certificate})}if(qt===null&&(!Gt||_t.length===0&&(!s0||t0))){var o0=e0.getExtension("basicConstraints"),r0=e0.getExtension("keyUsage");r0!==null&&(r0.keyCertSign&&o0!==null||(qt={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:xt.certificateError.bad_certificate})),qt!==null||o0===null||o0.cA||(qt={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:xt.certificateError.bad_certificate}),qt===null&&r0!==null&&"pathLenConstraint"in o0&&zt-1>o0.pathLenConstraint&&(qt={message:"Certificate basicConstraints pathLenConstraint violated.",error:xt.certificateError.bad_certificate})}var Yt=qt===null||qt.error,Mt=Xt.verify?Xt.verify(Yt,zt,Qt):Yt;if(Mt!==!0)throw Yt===!0&&(qt={message:"The application rejected the certificate.",error:xt.certificateError.bad_certificate}),(Mt||Mt===0)&&(typeof Mt!="object"||gt.util.isArray(Mt)?typeof Mt=="string"&&(qt.error=Mt):(Mt.message&&(qt.message=Mt.message),Mt.error&&(qt.error=Mt.error))),qt;qt=null,Gt=!1,++zt}while(_t.length>0);return!0}},4406:nt=>{var ft,ht,gt=nt.exports={};function At(){throw new Error("setTimeout has not been defined")}function xt(){throw new Error("clearTimeout has not been defined")}function Et(Tt){if(ft===setTimeout)return setTimeout(Tt,0);if((ft===At||!ft)&&setTimeout)return ft=setTimeout,setTimeout(Tt,0);try{return ft(Tt,0)}catch{try{return ft.call(null,Tt,0)}catch{return ft.call(this,Tt,0)}}}(function(){try{ft=typeof setTimeout=="function"?setTimeout:At}catch{ft=At}try{ht=typeof clearTimeout=="function"?clearTimeout:xt}catch{ht=xt}})();var yt,Ct=[],kt=!1,vt=-1;function bt(){kt&&yt&&(kt=!1,yt.length?Ct=yt.concat(Ct):vt=-1,Ct.length&&It())}function It(){if(!kt){var Tt=Et(bt);kt=!0;for(var Bt=Ct.length;Bt;){for(yt=Ct,Ct=[];++vt<Bt;)yt&&yt[vt].run();vt=-1,Bt=Ct.length}yt=null,kt=!1,function(Dt){if(ht===clearTimeout)return clearTimeout(Dt);if((ht===xt||!ht)&&clearTimeout)return ht=clearTimeout,clearTimeout(Dt);try{ht(Dt)}catch{try{return ht.call(null,Dt)}catch{return ht.call(this,Dt)}}}(Tt)}}function wt(Tt,Bt){this.fun=Tt,this.array=Bt}function Rt(){}gt.nextTick=function(Tt){var Bt=new Array(arguments.length-1);if(arguments.length>1)for(var Dt=1;Dt<arguments.length;Dt++)Bt[Dt-1]=arguments[Dt];Ct.push(new wt(Tt,Bt)),Ct.length!==1||kt||Et(It)},wt.prototype.run=function(){this.fun.apply(null,this.array)},gt.title="browser",gt.browser=!0,gt.env={},gt.argv=[],gt.version="",gt.versions={},gt.on=Rt,gt.addListener=Rt,gt.once=Rt,gt.off=Rt,gt.removeListener=Rt,gt.removeAllListeners=Rt,gt.emit=Rt,gt.prependListener=Rt,gt.prependOnceListener=Rt,gt.listeners=function(Tt){return[]},gt.binding=function(Tt){throw new Error("process.binding is not supported")},gt.cwd=function(){return"/"},gt.chdir=function(Tt){throw new Error("process.chdir is not supported")},gt.umask=function(){return 0}},4452:nt=>{var ft={};function ht(At,xt,Et){Et||(Et=Error);var yt=function(Ct){var kt,vt;function bt(It,wt,Rt){return Ct.call(this,function(Tt,Bt,Dt){return typeof xt=="string"?xt:xt(Tt,Bt,Dt)}(It,wt,Rt))||this}return vt=Ct,(kt=bt).prototype=Object.create(vt.prototype),kt.prototype.constructor=kt,kt.__proto__=vt,bt}(Et);yt.prototype.name=Et.name,yt.prototype.code=At,ft[At]=yt}function gt(At,xt){if(Array.isArray(At)){var Et=At.length;return At=At.map(function(yt){return String(yt)}),Et>2?"one of ".concat(xt," ").concat(At.slice(0,Et-1).join(", "),", or ")+At[Et-1]:Et===2?"one of ".concat(xt," ").concat(At[0]," or ").concat(At[1]):"of ".concat(xt," ").concat(At[0])}return"of ".concat(xt," ").concat(String(At))}ht("ERR_INVALID_OPT_VALUE",function(At,xt){return'The value "'+xt+'" is invalid for option "'+At+'"'},TypeError),ht("ERR_INVALID_ARG_TYPE",function(At,xt,Et){var yt,Ct,kt,vt,bt;if(typeof xt=="string"&&(Ct="not ",xt.substr(0,Ct.length)===Ct)?(yt="must not be",xt=xt.replace(/^not /,"")):yt="must be",function(wt,Rt,Tt){return(Tt===void 0||Tt>wt.length)&&(Tt=wt.length),wt.substring(Tt-Rt.length,Tt)===Rt}(At," argument"))kt="The ".concat(At," ").concat(yt," ").concat(gt(xt,"type"));else{var It=(typeof bt!="number"&&(bt=0),bt+1>(vt=At).length||vt.indexOf(".",bt)===-1?"argument":"property");kt='The "'.concat(At,'" ').concat(It," ").concat(yt," ").concat(gt(xt,"type"))}return kt+". Received type ".concat(typeof Et)},TypeError),ht("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ht("ERR_METHOD_NOT_IMPLEMENTED",function(At){return"The "+At+" method is not implemented"}),ht("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ht("ERR_STREAM_DESTROYED",function(At){return"Cannot call "+At+" after a stream was destroyed"}),ht("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ht("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ht("ERR_STREAM_WRITE_AFTER_END","write after end"),ht("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ht("ERR_UNKNOWN_ENCODING",function(At){return"Unknown encoding: "+At},TypeError),ht("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),nt.exports.q=ft},7073:(nt,ft,ht)=>{var gt=Object.keys||function(It){var wt=[];for(var Rt in It)wt.push(Rt);return wt};nt.exports=kt;var At=ht(8051),xt=ht(2557);ht(1285)(kt,At);for(var Et=gt(xt.prototype),yt=0;yt<Et.length;yt++){var Ct=Et[yt];kt.prototype[Ct]||(kt.prototype[Ct]=xt.prototype[Ct])}function kt(It){if(!(this instanceof kt))return new kt(It);At.call(this,It),xt.call(this,It),this.allowHalfOpen=!0,It&&(It.readable===!1&&(this.readable=!1),It.writable===!1&&(this.writable=!1),It.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",vt)))}function vt(){this._writableState.ended||process.nextTick(bt,this)}function bt(It){It.end()}Object.defineProperty(kt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(kt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(kt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(kt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(It){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=It,this._writableState.destroyed=It)}})},5163:(nt,ft,ht)=>{nt.exports=At;var gt=ht(7640);function At(xt){if(!(this instanceof At))return new At(xt);gt.call(this,xt)}ht(1285)(At,gt),At.prototype._transform=function(xt,Et,yt){yt(null,xt)}},8051:(nt,ft,ht)=>{var gt;nt.exports=Vt,Vt.ReadableState=Kt,ht(2699).EventEmitter;var At,xt=function(o0,r0){return o0.listeners(r0).length},Et=ht(5010),yt=ht(8834).Buffer,Ct=ht.g.Uint8Array||function(){},kt=ht(6602);At=kt&&kt.debuglog?kt.debuglog("stream"):function(){};var vt,bt,It,wt=ht(6637),Rt=ht(2262),Tt=ht(7605).getHighWaterMark,Bt=ht(4452).q,Dt=Bt.ERR_INVALID_ARG_TYPE,Pt=Bt.ERR_STREAM_PUSH_AFTER_EOF,Nt=Bt.ERR_METHOD_NOT_IMPLEMENTED,Lt=Bt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;ht(1285)(Vt,Et);var Wt=Rt.errorOrDestroy,$t=["error","close","destroy","pause","resume"];function Kt(o0,r0,Yt){gt=gt||ht(7073),o0=o0||{},typeof Yt!="boolean"&&(Yt=r0 instanceof gt),this.objectMode=!!o0.objectMode,Yt&&(this.objectMode=this.objectMode||!!o0.readableObjectMode),this.highWaterMark=Tt(this,o0,"readableHighWaterMark",Yt),this.buffer=new wt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=o0.emitClose!==!1,this.autoDestroy=!!o0.autoDestroy,this.destroyed=!1,this.defaultEncoding=o0.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o0.encoding&&(vt||(vt=ht(214).s),this.decoder=new vt(o0.encoding),this.encoding=o0.encoding)}function Vt(o0){if(gt=gt||ht(7073),!(this instanceof Vt))return new Vt(o0);var r0=this instanceof gt;this._readableState=new Kt(o0,this,r0),this.readable=!0,o0&&(typeof o0.read=="function"&&(this._read=o0.read),typeof o0.destroy=="function"&&(this._destroy=o0.destroy)),Et.call(this)}function Ut(o0,r0,Yt,Mt,Jt){At("readableAddChunk",r0);var a0,i0=o0._readableState;if(r0===null)i0.reading=!1,function(f0,u0){if(At("onEofChunk"),!u0.ended){if(u0.decoder){var x0=u0.decoder.end();x0&&x0.length&&(u0.buffer.push(x0),u0.length+=u0.objectMode?1:x0.length)}u0.ended=!0,u0.sync?jt(f0):(u0.needReadable=!1,u0.emittedReadable||(u0.emittedReadable=!0,Gt(f0)))}}(o0,i0);else if(Jt||(a0=function(f0,u0){var x0,p0;return p0=u0,yt.isBuffer(p0)||p0 instanceof Ct||typeof u0=="string"||u0===void 0||f0.objectMode||(x0=new Dt("chunk",["string","Buffer","Uint8Array"],u0)),x0}(i0,r0)),a0)Wt(o0,a0);else if(i0.objectMode||r0&&r0.length>0)if(typeof r0=="string"||i0.objectMode||Object.getPrototypeOf(r0)===yt.prototype||(r0=function(f0){return yt.from(f0)}(r0)),Mt)i0.endEmitted?Wt(o0,new Lt):_t(o0,i0,r0,!0);else if(i0.ended)Wt(o0,new Pt);else{if(i0.destroyed)return!1;i0.reading=!1,i0.decoder&&!Yt?(r0=i0.decoder.write(r0),i0.objectMode||r0.length!==0?_t(o0,i0,r0,!1):qt(o0,i0)):_t(o0,i0,r0,!1)}else Mt||(i0.reading=!1,qt(o0,i0));return!i0.ended&&(i0.length<i0.highWaterMark||i0.length===0)}function _t(o0,r0,Yt,Mt){r0.flowing&&r0.length===0&&!r0.sync?(r0.awaitDrain=0,o0.emit("data",Yt)):(r0.length+=r0.objectMode?1:Yt.length,Mt?r0.buffer.unshift(Yt):r0.buffer.push(Yt),r0.needReadable&&jt(o0)),qt(o0,r0)}Object.defineProperty(Vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(o0){this._readableState&&(this._readableState.destroyed=o0)}}),Vt.prototype.destroy=Rt.destroy,Vt.prototype._undestroy=Rt.undestroy,Vt.prototype._destroy=function(o0,r0){r0(o0)},Vt.prototype.push=function(o0,r0){var Yt,Mt=this._readableState;return Mt.objectMode?Yt=!0:typeof o0=="string"&&((r0=r0||Mt.defaultEncoding)!==Mt.encoding&&(o0=yt.from(o0,r0),r0=""),Yt=!0),Ut(this,o0,r0,!1,Yt)},Vt.prototype.unshift=function(o0){return Ut(this,o0,null,!0,!1)},Vt.prototype.isPaused=function(){return this._readableState.flowing===!1},Vt.prototype.setEncoding=function(o0){vt||(vt=ht(214).s);var r0=new vt(o0);this._readableState.decoder=r0,this._readableState.encoding=this._readableState.decoder.encoding;for(var Yt=this._readableState.buffer.head,Mt="";Yt!==null;)Mt+=r0.write(Yt.data),Yt=Yt.next;return this._readableState.buffer.clear(),Mt!==""&&this._readableState.buffer.push(Mt),this._readableState.length=Mt.length,this};var Xt=1073741824;function Qt(o0,r0){return o0<=0||r0.length===0&&r0.ended?0:r0.objectMode?1:o0!=o0?r0.flowing&&r0.length?r0.buffer.head.data.length:r0.length:(o0>r0.highWaterMark&&(r0.highWaterMark=function(Yt){return Yt>=Xt?Yt=Xt:(Yt--,Yt|=Yt>>>1,Yt|=Yt>>>2,Yt|=Yt>>>4,Yt|=Yt>>>8,Yt|=Yt>>>16,Yt++),Yt}(o0)),o0<=r0.length?o0:r0.ended?r0.length:(r0.needReadable=!0,0))}function jt(o0){var r0=o0._readableState;At("emitReadable",r0.needReadable,r0.emittedReadable),r0.needReadable=!1,r0.emittedReadable||(At("emitReadable",r0.flowing),r0.emittedReadable=!0,process.nextTick(Gt,o0))}function Gt(o0){var r0=o0._readableState;At("emitReadable_",r0.destroyed,r0.length,r0.ended),r0.destroyed||!r0.length&&!r0.ended||(o0.emit("readable"),r0.emittedReadable=!1),r0.needReadable=!r0.flowing&&!r0.ended&&r0.length<=r0.highWaterMark,l0(o0)}function qt(o0,r0){r0.readingMore||(r0.readingMore=!0,process.nextTick(zt,o0,r0))}function zt(o0,r0){for(;!r0.reading&&!r0.ended&&(r0.length<r0.highWaterMark||r0.flowing&&r0.length===0);){var Yt=r0.length;if(At("maybeReadMore read 0"),o0.read(0),Yt===r0.length)break}r0.readingMore=!1}function e0(o0){var r0=o0._readableState;r0.readableListening=o0.listenerCount("readable")>0,r0.resumeScheduled&&!r0.paused?r0.flowing=!0:o0.listenerCount("data")>0&&o0.resume()}function s0(o0){At("readable nexttick read 0"),o0.read(0)}function t0(o0,r0){At("resume",r0.reading),r0.reading||o0.read(0),r0.resumeScheduled=!1,o0.emit("resume"),l0(o0),r0.flowing&&!r0.reading&&o0.read(0)}function l0(o0){var r0=o0._readableState;for(At("flow",r0.flowing);r0.flowing&&o0.read()!==null;);}function d0(o0,r0){return r0.length===0?null:(r0.objectMode?Yt=r0.buffer.shift():!o0||o0>=r0.length?(Yt=r0.decoder?r0.buffer.join(""):r0.buffer.length===1?r0.buffer.first():r0.buffer.concat(r0.length),r0.buffer.clear()):Yt=r0.buffer.consume(o0,r0.decoder),Yt);var Yt}function n0(o0){var r0=o0._readableState;At("endReadable",r0.endEmitted),r0.endEmitted||(r0.ended=!0,process.nextTick(g0,r0,o0))}function g0(o0,r0){if(At("endReadableNT",o0.endEmitted,o0.length),!o0.endEmitted&&o0.length===0&&(o0.endEmitted=!0,r0.readable=!1,r0.emit("end"),o0.autoDestroy)){var Yt=r0._writableState;(!Yt||Yt.autoDestroy&&Yt.finished)&&r0.destroy()}}function A0(o0,r0){for(var Yt=0,Mt=o0.length;Yt<Mt;Yt++)if(o0[Yt]===r0)return Yt;return-1}Vt.prototype.read=function(o0){At("read",o0),o0=parseInt(o0,10);var r0=this._readableState,Yt=o0;if(o0!==0&&(r0.emittedReadable=!1),o0===0&&r0.needReadable&&((r0.highWaterMark!==0?r0.length>=r0.highWaterMark:r0.length>0)||r0.ended))return At("read: emitReadable",r0.length,r0.ended),r0.length===0&&r0.ended?n0(this):jt(this),null;if((o0=Qt(o0,r0))===0&&r0.ended)return r0.length===0&&n0(this),null;var Mt,Jt=r0.needReadable;return At("need readable",Jt),(r0.length===0||r0.length-o0<r0.highWaterMark)&&At("length less than watermark",Jt=!0),r0.ended||r0.reading?At("reading or ended",Jt=!1):Jt&&(At("do read"),r0.reading=!0,r0.sync=!0,r0.length===0&&(r0.needReadable=!0),this._read(r0.highWaterMark),r0.sync=!1,r0.reading||(o0=Qt(Yt,r0))),(Mt=o0>0?d0(o0,r0):null)===null?(r0.needReadable=r0.length<=r0.highWaterMark,o0=0):(r0.length-=o0,r0.awaitDrain=0),r0.length===0&&(r0.ended||(r0.needReadable=!0),Yt!==o0&&r0.ended&&n0(this)),Mt!==null&&this.emit("data",Mt),Mt},Vt.prototype._read=function(o0){Wt(this,new Nt("_read()"))},Vt.prototype.pipe=function(o0,r0){var Yt=this,Mt=this._readableState;switch(Mt.pipesCount){case 0:Mt.pipes=o0;break;case 1:Mt.pipes=[Mt.pipes,o0];break;default:Mt.pipes.push(o0)}Mt.pipesCount+=1,At("pipe count=%d opts=%j",Mt.pipesCount,r0);var Jt=r0&&r0.end===!1||o0===process.stdout||o0===process.stderr?P0:a0;function a0(){At("onend"),o0.end()}Mt.endEmitted?process.nextTick(Jt):Yt.once("end",Jt),o0.on("unpipe",function z0(J0,Y0){At("onunpipe"),J0===Yt&&Y0&&Y0.hasUnpiped===!1&&(Y0.hasUnpiped=!0,At("cleanup"),o0.removeListener("close",p0),o0.removeListener("finish",D0),o0.removeListener("drain",i0),o0.removeListener("error",x0),o0.removeListener("unpipe",z0),Yt.removeListener("end",a0),Yt.removeListener("end",P0),Yt.removeListener("data",u0),f0=!0,!Mt.awaitDrain||o0._writableState&&!o0._writableState.needDrain||i0())});var i0=function(z0){return function(){var J0=z0._readableState;At("pipeOnDrain",J0.awaitDrain),J0.awaitDrain&&J0.awaitDrain--,J0.awaitDrain===0&&xt(z0,"data")&&(J0.flowing=!0,l0(z0))}}(Yt);o0.on("drain",i0);var f0=!1;function u0(z0){At("ondata");var J0=o0.write(z0);At("dest.write",J0),J0===!1&&((Mt.pipesCount===1&&Mt.pipes===o0||Mt.pipesCount>1&&A0(Mt.pipes,o0)!==-1)&&!f0&&(At("false write response, pause",Mt.awaitDrain),Mt.awaitDrain++),Yt.pause())}function x0(z0){At("onerror",z0),P0(),o0.removeListener("error",x0),xt(o0,"error")===0&&Wt(o0,z0)}function p0(){o0.removeListener("finish",D0),P0()}function D0(){At("onfinish"),o0.removeListener("close",p0),P0()}function P0(){At("unpipe"),Yt.unpipe(o0)}return Yt.on("data",u0),function(z0,J0,Y0){if(typeof z0.prependListener=="function")return z0.prependListener(J0,Y0);z0._events&&z0._events.error?Array.isArray(z0._events.error)?z0._events.error.unshift(Y0):z0._events.error=[Y0,z0._events.error]:z0.on(J0,Y0)}(o0,"error",x0),o0.once("close",p0),o0.once("finish",D0),o0.emit("pipe",Yt),Mt.flowing||(At("pipe resume"),Yt.resume()),o0},Vt.prototype.unpipe=function(o0){var r0=this._readableState,Yt={hasUnpiped:!1};if(r0.pipesCount===0)return this;if(r0.pipesCount===1)return o0&&o0!==r0.pipes||(o0||(o0=r0.pipes),r0.pipes=null,r0.pipesCount=0,r0.flowing=!1,o0&&o0.emit("unpipe",this,Yt)),this;if(!o0){var Mt=r0.pipes,Jt=r0.pipesCount;r0.pipes=null,r0.pipesCount=0,r0.flowing=!1;for(var a0=0;a0<Jt;a0++)Mt[a0].emit("unpipe",this,{hasUnpiped:!1});return this}var i0=A0(r0.pipes,o0);return i0===-1||(r0.pipes.splice(i0,1),r0.pipesCount-=1,r0.pipesCount===1&&(r0.pipes=r0.pipes[0]),o0.emit("unpipe",this,Yt)),this},Vt.prototype.on=function(o0,r0){var Yt=Et.prototype.on.call(this,o0,r0),Mt=this._readableState;return o0==="data"?(Mt.readableListening=this.listenerCount("readable")>0,Mt.flowing!==!1&&this.resume()):o0==="readable"&&(Mt.endEmitted||Mt.readableListening||(Mt.readableListening=Mt.needReadable=!0,Mt.flowing=!1,Mt.emittedReadable=!1,At("on readable",Mt.length,Mt.reading),Mt.length?jt(this):Mt.reading||process.nextTick(s0,this))),Yt},Vt.prototype.addListener=Vt.prototype.on,Vt.prototype.removeListener=function(o0,r0){var Yt=Et.prototype.removeListener.call(this,o0,r0);return o0==="readable"&&process.nextTick(e0,this),Yt},Vt.prototype.removeAllListeners=function(o0){var r0=Et.prototype.removeAllListeners.apply(this,arguments);return o0!=="readable"&&o0!==void 0||process.nextTick(e0,this),r0},Vt.prototype.resume=function(){var o0=this._readableState;return o0.flowing||(At("resume"),o0.flowing=!o0.readableListening,function(r0,Yt){Yt.resumeScheduled||(Yt.resumeScheduled=!0,process.nextTick(t0,r0,Yt))}(this,o0)),o0.paused=!1,this},Vt.prototype.pause=function(){return At("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(At("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Vt.prototype.wrap=function(o0){var r0=this,Yt=this._readableState,Mt=!1;for(var Jt in o0.on("end",function(){if(At("wrapped end"),Yt.decoder&&!Yt.ended){var i0=Yt.decoder.end();i0&&i0.length&&r0.push(i0)}r0.push(null)}),o0.on("data",function(i0){At("wrapped data"),Yt.decoder&&(i0=Yt.decoder.write(i0)),Yt.objectMode&&i0==null||(Yt.objectMode||i0&&i0.length)&&(r0.push(i0)||(Mt=!0,o0.pause()))}),o0)this[Jt]===void 0&&typeof o0[Jt]=="function"&&(this[Jt]=function(i0){return function(){return o0[i0].apply(o0,arguments)}}(Jt));for(var a0=0;a0<$t.length;a0++)o0.on($t[a0],this.emit.bind(this,$t[a0]));return this._read=function(i0){At("wrapped _read",i0),Mt&&(Mt=!1,o0.resume())},this},typeof Symbol=="function"&&(Vt.prototype[Symbol.asyncIterator]=function(){return bt===void 0&&(bt=ht(1029)),bt(this)}),Object.defineProperty(Vt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Vt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Vt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(o0){this._readableState&&(this._readableState.flowing=o0)}}),Vt._fromList=d0,Object.defineProperty(Vt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(Vt.from=function(o0,r0){return It===void 0&&(It=ht(352)),It(Vt,o0,r0)})},7640:(nt,ft,ht)=>{nt.exports=vt;var gt=ht(4452).q,At=gt.ERR_METHOD_NOT_IMPLEMENTED,xt=gt.ERR_MULTIPLE_CALLBACK,Et=gt.ERR_TRANSFORM_ALREADY_TRANSFORMING,yt=gt.ERR_TRANSFORM_WITH_LENGTH_0,Ct=ht(7073);function kt(wt,Rt){var Tt=this._transformState;Tt.transforming=!1;var Bt=Tt.writecb;if(Bt===null)return this.emit("error",new xt);Tt.writechunk=null,Tt.writecb=null,Rt!=null&&this.push(Rt),Bt(wt);var Dt=this._readableState;Dt.reading=!1,(Dt.needReadable||Dt.length<Dt.highWaterMark)&&this._read(Dt.highWaterMark)}function vt(wt){if(!(this instanceof vt))return new vt(wt);Ct.call(this,wt),this._transformState={afterTransform:kt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,wt&&(typeof wt.transform=="function"&&(this._transform=wt.transform),typeof wt.flush=="function"&&(this._flush=wt.flush)),this.on("prefinish",bt)}function bt(){var wt=this;typeof this._flush!="function"||this._readableState.destroyed?It(this,null,null):this._flush(function(Rt,Tt){It(wt,Rt,Tt)})}function It(wt,Rt,Tt){if(Rt)return wt.emit("error",Rt);if(Tt!=null&&wt.push(Tt),wt._writableState.length)throw new yt;if(wt._transformState.transforming)throw new Et;return wt.push(null)}ht(1285)(vt,Ct),vt.prototype.push=function(wt,Rt){return this._transformState.needTransform=!1,Ct.prototype.push.call(this,wt,Rt)},vt.prototype._transform=function(wt,Rt,Tt){Tt(new At("_transform()"))},vt.prototype._write=function(wt,Rt,Tt){var Bt=this._transformState;if(Bt.writecb=Tt,Bt.writechunk=wt,Bt.writeencoding=Rt,!Bt.transforming){var Dt=this._readableState;(Bt.needTransform||Dt.needReadable||Dt.length<Dt.highWaterMark)&&this._read(Dt.highWaterMark)}},vt.prototype._read=function(wt){var Rt=this._transformState;Rt.writechunk===null||Rt.transforming?Rt.needTransform=!0:(Rt.transforming=!0,this._transform(Rt.writechunk,Rt.writeencoding,Rt.afterTransform))},vt.prototype._destroy=function(wt,Rt){Ct.prototype._destroy.call(this,wt,function(Tt){Rt(Tt)})}},2557:(nt,ft,ht)=>{function gt(qt){var zt=this;this.next=null,this.entry=null,this.finish=function(){(function(e0,s0,t0){var l0=e0.entry;for(e0.entry=null;l0;){var d0=l0.callback;s0.pendingcb--,d0(void 0),l0=l0.next}s0.corkedRequestsFree.next=e0})(zt,qt)}}var At;nt.exports=Vt,Vt.WritableState=Kt;var xt,Et={deprecate:ht(5803)},yt=ht(5010),Ct=ht(8834).Buffer,kt=ht.g.Uint8Array||function(){},vt=ht(2262),bt=ht(7605).getHighWaterMark,It=ht(4452).q,wt=It.ERR_INVALID_ARG_TYPE,Rt=It.ERR_METHOD_NOT_IMPLEMENTED,Tt=It.ERR_MULTIPLE_CALLBACK,Bt=It.ERR_STREAM_CANNOT_PIPE,Dt=It.ERR_STREAM_DESTROYED,Pt=It.ERR_STREAM_NULL_VALUES,Nt=It.ERR_STREAM_WRITE_AFTER_END,Lt=It.ERR_UNKNOWN_ENCODING,Wt=vt.errorOrDestroy;function $t(){}function Kt(qt,zt,e0){At=At||ht(7073),qt=qt||{},typeof e0!="boolean"&&(e0=zt instanceof At),this.objectMode=!!qt.objectMode,e0&&(this.objectMode=this.objectMode||!!qt.writableObjectMode),this.highWaterMark=bt(this,qt,"writableHighWaterMark",e0),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s0=qt.decodeStrings===!1;this.decodeStrings=!s0,this.defaultEncoding=qt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t0){(function(l0,d0){var n0=l0._writableState,g0=n0.sync,A0=n0.writecb;if(typeof A0!="function")throw new Tt;if(function(r0){r0.writing=!1,r0.writecb=null,r0.length-=r0.writelen,r0.writelen=0}(n0),d0)(function(r0,Yt,Mt,Jt,a0){--Yt.pendingcb,Mt?(process.nextTick(a0,Jt),process.nextTick(Gt,r0,Yt),r0._writableState.errorEmitted=!0,Wt(r0,Jt)):(a0(Jt),r0._writableState.errorEmitted=!0,Wt(r0,Jt),Gt(r0,Yt))})(l0,n0,g0,d0,A0);else{var o0=Qt(n0)||l0.destroyed;o0||n0.corked||n0.bufferProcessing||!n0.bufferedRequest||Xt(l0,n0),g0?process.nextTick(_t,l0,n0,o0,A0):_t(l0,n0,o0,A0)}})(zt,t0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=qt.emitClose!==!1,this.autoDestroy=!!qt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new gt(this)}function Vt(qt){var zt=this instanceof(At=At||ht(7073));if(!zt&&!xt.call(Vt,this))return new Vt(qt);this._writableState=new Kt(qt,this,zt),this.writable=!0,qt&&(typeof qt.write=="function"&&(this._write=qt.write),typeof qt.writev=="function"&&(this._writev=qt.writev),typeof qt.destroy=="function"&&(this._destroy=qt.destroy),typeof qt.final=="function"&&(this._final=qt.final)),yt.call(this)}function Ut(qt,zt,e0,s0,t0,l0,d0){zt.writelen=s0,zt.writecb=d0,zt.writing=!0,zt.sync=!0,zt.destroyed?zt.onwrite(new Dt("write")):e0?qt._writev(t0,zt.onwrite):qt._write(t0,l0,zt.onwrite),zt.sync=!1}function _t(qt,zt,e0,s0){e0||function(t0,l0){l0.length===0&&l0.needDrain&&(l0.needDrain=!1,t0.emit("drain"))}(qt,zt),zt.pendingcb--,s0(),Gt(qt,zt)}function Xt(qt,zt){zt.bufferProcessing=!0;var e0=zt.bufferedRequest;if(qt._writev&&e0&&e0.next){var s0=zt.bufferedRequestCount,t0=new Array(s0),l0=zt.corkedRequestsFree;l0.entry=e0;for(var d0=0,n0=!0;e0;)t0[d0]=e0,e0.isBuf||(n0=!1),e0=e0.next,d0+=1;t0.allBuffers=n0,Ut(qt,zt,!0,zt.length,t0,"",l0.finish),zt.pendingcb++,zt.lastBufferedRequest=null,l0.next?(zt.corkedRequestsFree=l0.next,l0.next=null):zt.corkedRequestsFree=new gt(zt),zt.bufferedRequestCount=0}else{for(;e0;){var g0=e0.chunk,A0=e0.encoding,o0=e0.callback;if(Ut(qt,zt,!1,zt.objectMode?1:g0.length,g0,A0,o0),e0=e0.next,zt.bufferedRequestCount--,zt.writing)break}e0===null&&(zt.lastBufferedRequest=null)}zt.bufferedRequest=e0,zt.bufferProcessing=!1}function Qt(qt){return qt.ending&&qt.length===0&&qt.bufferedRequest===null&&!qt.finished&&!qt.writing}function jt(qt,zt){qt._final(function(e0){zt.pendingcb--,e0&&Wt(qt,e0),zt.prefinished=!0,qt.emit("prefinish"),Gt(qt,zt)})}function Gt(qt,zt){var e0=Qt(zt);if(e0&&(function(t0,l0){l0.prefinished||l0.finalCalled||(typeof t0._final!="function"||l0.destroyed?(l0.prefinished=!0,t0.emit("prefinish")):(l0.pendingcb++,l0.finalCalled=!0,process.nextTick(jt,t0,l0)))}(qt,zt),zt.pendingcb===0&&(zt.finished=!0,qt.emit("finish"),zt.autoDestroy))){var s0=qt._readableState;(!s0||s0.autoDestroy&&s0.endEmitted)&&qt.destroy()}return e0}ht(1285)(Vt,yt),Kt.prototype.getBuffer=function(){for(var qt=this.bufferedRequest,zt=[];qt;)zt.push(qt),qt=qt.next;return zt},function(){try{Object.defineProperty(Kt.prototype,"buffer",{get:Et.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(xt=Function.prototype[Symbol.hasInstance],Object.defineProperty(Vt,Symbol.hasInstance,{value:function(qt){return!!xt.call(this,qt)||this===Vt&&qt&&qt._writableState instanceof Kt}})):xt=function(qt){return qt instanceof this},Vt.prototype.pipe=function(){Wt(this,new Bt)},Vt.prototype.write=function(qt,zt,e0){var s0,t0=this._writableState,l0=!1,d0=!t0.objectMode&&(s0=qt,Ct.isBuffer(s0)||s0 instanceof kt);return d0&&!Ct.isBuffer(qt)&&(qt=function(n0){return Ct.from(n0)}(qt)),typeof zt=="function"&&(e0=zt,zt=null),d0?zt="buffer":zt||(zt=t0.defaultEncoding),typeof e0!="function"&&(e0=$t),t0.ending?function(n0,g0){var A0=new Nt;Wt(n0,A0),process.nextTick(g0,A0)}(this,e0):(d0||function(n0,g0,A0,o0){var r0;return A0===null?r0=new Pt:typeof A0=="string"||g0.objectMode||(r0=new wt("chunk",["string","Buffer"],A0)),!r0||(Wt(n0,r0),process.nextTick(o0,r0),!1)}(this,t0,qt,e0))&&(t0.pendingcb++,l0=function(n0,g0,A0,o0,r0,Yt){if(!A0){var Mt=function(f0,u0,x0){return f0.objectMode||f0.decodeStrings===!1||typeof u0!="string"||(u0=Ct.from(u0,x0)),u0}(g0,o0,r0);o0!==Mt&&(A0=!0,r0="buffer",o0=Mt)}var Jt=g0.objectMode?1:o0.length;g0.length+=Jt;var a0=g0.length<g0.highWaterMark;if(a0||(g0.needDrain=!0),g0.writing||g0.corked){var i0=g0.lastBufferedRequest;g0.lastBufferedRequest={chunk:o0,encoding:r0,isBuf:A0,callback:Yt,next:null},i0?i0.next=g0.lastBufferedRequest:g0.bufferedRequest=g0.lastBufferedRequest,g0.bufferedRequestCount+=1}else Ut(n0,g0,!1,Jt,o0,r0,Yt);return a0}(this,t0,d0,qt,zt,e0)),l0},Vt.prototype.cork=function(){this._writableState.corked++},Vt.prototype.uncork=function(){var qt=this._writableState;qt.corked&&(qt.corked--,qt.writing||qt.corked||qt.bufferProcessing||!qt.bufferedRequest||Xt(this,qt))},Vt.prototype.setDefaultEncoding=function(qt){if(typeof qt=="string"&&(qt=qt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((qt+"").toLowerCase())>-1))throw new Lt(qt);return this._writableState.defaultEncoding=qt,this},Object.defineProperty(Vt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Vt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Vt.prototype._write=function(qt,zt,e0){e0(new Rt("_write()"))},Vt.prototype._writev=null,Vt.prototype.end=function(qt,zt,e0){var s0=this._writableState;return typeof qt=="function"?(e0=qt,qt=null,zt=null):typeof zt=="function"&&(e0=zt,zt=null),qt!=null&&this.write(qt,zt),s0.corked&&(s0.corked=1,this.uncork()),s0.ending||function(t0,l0,d0){l0.ending=!0,Gt(t0,l0),d0&&(l0.finished?process.nextTick(d0):t0.once("finish",d0)),l0.ended=!0,t0.writable=!1}(this,s0,e0),this},Object.defineProperty(Vt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(qt){this._writableState&&(this._writableState.destroyed=qt)}}),Vt.prototype.destroy=vt.destroy,Vt.prototype._undestroy=vt.undestroy,Vt.prototype._destroy=function(qt,zt){zt(qt)}},1029:(nt,ft,ht)=>{var gt;function At(Pt,Nt,Lt){return Nt in Pt?Object.defineProperty(Pt,Nt,{value:Lt,enumerable:!0,configurable:!0,writable:!0}):Pt[Nt]=Lt,Pt}var xt=ht(9885),Et=Symbol("lastResolve"),yt=Symbol("lastReject"),Ct=Symbol("error"),kt=Symbol("ended"),vt=Symbol("lastPromise"),bt=Symbol("handlePromise"),It=Symbol("stream");function wt(Pt,Nt){return{value:Pt,done:Nt}}function Rt(Pt){var Nt=Pt[Et];if(Nt!==null){var Lt=Pt[It].read();Lt!==null&&(Pt[vt]=null,Pt[Et]=null,Pt[yt]=null,Nt(wt(Lt,!1)))}}function Tt(Pt){process.nextTick(Rt,Pt)}var Bt=Object.getPrototypeOf(function(){}),Dt=Object.setPrototypeOf((At(gt={get stream(){return this[It]},next:function(){var Pt=this,Nt=this[Ct];if(Nt!==null)return Promise.reject(Nt);if(this[kt])return Promise.resolve(wt(void 0,!0));if(this[It].destroyed)return new Promise(function(Kt,Vt){process.nextTick(function(){Pt[Ct]?Vt(Pt[Ct]):Kt(wt(void 0,!0))})});var Lt,Wt=this[vt];if(Wt)Lt=new Promise(function(Kt,Vt){return function(Ut,_t){Kt.then(function(){Vt[kt]?Ut(wt(void 0,!0)):Vt[bt](Ut,_t)},_t)}}(Wt,this));else{var $t=this[It].read();if($t!==null)return Promise.resolve(wt($t,!1));Lt=new Promise(this[bt])}return this[vt]=Lt,Lt}},Symbol.asyncIterator,function(){return this}),At(gt,"return",function(){var Pt=this;return new Promise(function(Nt,Lt){Pt[It].destroy(null,function(Wt){Wt?Lt(Wt):Nt(wt(void 0,!0))})})}),gt),Bt);nt.exports=function(Pt){var Nt,Lt=Object.create(Dt,(At(Nt={},It,{value:Pt,writable:!0}),At(Nt,Et,{value:null,writable:!0}),At(Nt,yt,{value:null,writable:!0}),At(Nt,Ct,{value:null,writable:!0}),At(Nt,kt,{value:Pt._readableState.endEmitted,writable:!0}),At(Nt,bt,{value:function(Wt,$t){var Kt=Lt[It].read();Kt?(Lt[vt]=null,Lt[Et]=null,Lt[yt]=null,Wt(wt(Kt,!1))):(Lt[Et]=Wt,Lt[yt]=$t)},writable:!0}),Nt));return Lt[vt]=null,xt(Pt,function(Wt){if(Wt&&Wt.code!=="ERR_STREAM_PREMATURE_CLOSE"){var $t=Lt[yt];return $t!==null&&(Lt[vt]=null,Lt[Et]=null,Lt[yt]=null,$t(Wt)),void(Lt[Ct]=Wt)}var Kt=Lt[Et];Kt!==null&&(Lt[vt]=null,Lt[Et]=null,Lt[yt]=null,Kt(wt(void 0,!0))),Lt[kt]=!0}),Pt.on("readable",Tt.bind(null,Lt)),Lt}},6637:(nt,ft,ht)=>{function gt(kt,vt){var bt=Object.keys(kt);if(Object.getOwnPropertySymbols){var It=Object.getOwnPropertySymbols(kt);vt&&(It=It.filter(function(wt){return Object.getOwnPropertyDescriptor(kt,wt).enumerable})),bt.push.apply(bt,It)}return bt}function At(kt,vt,bt){return vt in kt?Object.defineProperty(kt,vt,{value:bt,enumerable:!0,configurable:!0,writable:!0}):kt[vt]=bt,kt}function xt(kt,vt){for(var bt=0;bt<vt.length;bt++){var It=vt[bt];It.enumerable=It.enumerable||!1,It.configurable=!0,"value"in It&&(It.writable=!0),Object.defineProperty(kt,It.key,It)}}var Et=ht(8834).Buffer,yt=ht(4854).inspect,Ct=yt&&yt.custom||"inspect";nt.exports=function(){function kt(){(function(It,wt){if(!(It instanceof wt))throw new TypeError("Cannot call a class as a function")})(this,kt),this.head=null,this.tail=null,this.length=0}var vt,bt;return vt=kt,bt=[{key:"push",value:function(It){var wt={data:It,next:null};this.length>0?this.tail.next=wt:this.head=wt,this.tail=wt,++this.length}},{key:"unshift",value:function(It){var wt={data:It,next:this.head};this.length===0&&(this.tail=wt),this.head=wt,++this.length}},{key:"shift",value:function(){if(this.length!==0){var It=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,It}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(It){if(this.length===0)return"";for(var wt=this.head,Rt=""+wt.data;wt=wt.next;)Rt+=It+wt.data;return Rt}},{key:"concat",value:function(It){if(this.length===0)return Et.alloc(0);for(var wt,Rt,Tt,Bt=Et.allocUnsafe(It>>>0),Dt=this.head,Pt=0;Dt;)wt=Dt.data,Rt=Bt,Tt=Pt,Et.prototype.copy.call(wt,Rt,Tt),Pt+=Dt.data.length,Dt=Dt.next;return Bt}},{key:"consume",value:function(It,wt){var Rt;return It<this.head.data.length?(Rt=this.head.data.slice(0,It),this.head.data=this.head.data.slice(It)):Rt=It===this.head.data.length?this.shift():wt?this._getString(It):this._getBuffer(It),Rt}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(It){var wt=this.head,Rt=1,Tt=wt.data;for(It-=Tt.length;wt=wt.next;){var Bt=wt.data,Dt=It>Bt.length?Bt.length:It;if(Dt===Bt.length?Tt+=Bt:Tt+=Bt.slice(0,It),(It-=Dt)==0){Dt===Bt.length?(++Rt,wt.next?this.head=wt.next:this.head=this.tail=null):(this.head=wt,wt.data=Bt.slice(Dt));break}++Rt}return this.length-=Rt,Tt}},{key:"_getBuffer",value:function(It){var wt=Et.allocUnsafe(It),Rt=this.head,Tt=1;for(Rt.data.copy(wt),It-=Rt.data.length;Rt=Rt.next;){var Bt=Rt.data,Dt=It>Bt.length?Bt.length:It;if(Bt.copy(wt,wt.length-It,0,Dt),(It-=Dt)==0){Dt===Bt.length?(++Tt,Rt.next?this.head=Rt.next:this.head=this.tail=null):(this.head=Rt,Rt.data=Bt.slice(Dt));break}++Tt}return this.length-=Tt,wt}},{key:Ct,value:function(It,wt){return yt(this,function(Rt){for(var Tt=1;Tt<arguments.length;Tt++){var Bt=arguments[Tt]!=null?arguments[Tt]:{};Tt%2?gt(Object(Bt),!0).forEach(function(Dt){At(Rt,Dt,Bt[Dt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rt,Object.getOwnPropertyDescriptors(Bt)):gt(Object(Bt)).forEach(function(Dt){Object.defineProperty(Rt,Dt,Object.getOwnPropertyDescriptor(Bt,Dt))})}return Rt}({},wt,{depth:0,customInspect:!1}))}}],bt&&xt(vt.prototype,bt),kt}()},2262:nt=>{function ft(At,xt){gt(At,xt),ht(At)}function ht(At){At._writableState&&!At._writableState.emitClose||At._readableState&&!At._readableState.emitClose||At.emit("close")}function gt(At,xt){At.emit("error",xt)}nt.exports={destroy:function(At,xt){var Et=this,yt=this._readableState&&this._readableState.destroyed,Ct=this._writableState&&this._writableState.destroyed;return yt||Ct?(xt?xt(At):At&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(gt,this,At)):process.nextTick(gt,this,At)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(At||null,function(kt){!xt&&kt?Et._writableState?Et._writableState.errorEmitted?process.nextTick(ht,Et):(Et._writableState.errorEmitted=!0,process.nextTick(ft,Et,kt)):process.nextTick(ft,Et,kt):xt?(process.nextTick(ht,Et),xt(kt)):process.nextTick(ht,Et)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(At,xt){var Et=At._readableState,yt=At._writableState;Et&&Et.autoDestroy||yt&&yt.autoDestroy?At.destroy(xt):At.emit("error",xt)}}},9885:(nt,ft,ht)=>{var gt=ht(4452).q.ERR_STREAM_PREMATURE_CLOSE;function At(){}nt.exports=function xt(Et,yt,Ct){if(typeof yt=="function")return xt(Et,null,yt);yt||(yt={}),Ct=function(Nt){var Lt=!1;return function(){if(!Lt){Lt=!0;for(var Wt=arguments.length,$t=new Array(Wt),Kt=0;Kt<Wt;Kt++)$t[Kt]=arguments[Kt];Nt.apply(this,$t)}}}(Ct||At);var kt=yt.readable||yt.readable!==!1&&Et.readable,vt=yt.writable||yt.writable!==!1&&Et.writable,bt=function(){Et.writable||wt()},It=Et._writableState&&Et._writableState.finished,wt=function(){vt=!1,It=!0,kt||Ct.call(Et)},Rt=Et._readableState&&Et._readableState.endEmitted,Tt=function(){kt=!1,Rt=!0,vt||Ct.call(Et)},Bt=function(Nt){Ct.call(Et,Nt)},Dt=function(){var Nt;return kt&&!Rt?(Et._readableState&&Et._readableState.ended||(Nt=new gt),Ct.call(Et,Nt)):vt&&!It?(Et._writableState&&Et._writableState.ended||(Nt=new gt),Ct.call(Et,Nt)):void 0},Pt=function(){Et.req.on("finish",wt)};return function(Nt){return Nt.setHeader&&typeof Nt.abort=="function"}(Et)?(Et.on("complete",wt),Et.on("abort",Dt),Et.req?Pt():Et.on("request",Pt)):vt&&!Et._writableState&&(Et.on("end",bt),Et.on("close",bt)),Et.on("end",Tt),Et.on("finish",wt),yt.error!==!1&&Et.on("error",Bt),Et.on("close",Dt),function(){Et.removeListener("complete",wt),Et.removeListener("abort",Dt),Et.removeListener("request",Pt),Et.req&&Et.req.removeListener("finish",wt),Et.removeListener("end",bt),Et.removeListener("close",bt),Et.removeListener("finish",wt),Et.removeListener("end",Tt),Et.removeListener("error",Bt),Et.removeListener("close",Dt)}}},352:nt=>{nt.exports=function(){throw new Error("Readable.from is not available in the browser")}},3495:(nt,ft,ht)=>{var gt,At=ht(4452).q,xt=At.ERR_MISSING_ARGS,Et=At.ERR_STREAM_DESTROYED;function yt(It){if(It)throw It}function Ct(It,wt,Rt,Tt){Tt=function(Pt){var Nt=!1;return function(){Nt||(Nt=!0,Pt.apply(void 0,arguments))}}(Tt);var Bt=!1;It.on("close",function(){Bt=!0}),gt===void 0&&(gt=ht(9885)),gt(It,{readable:wt,writable:Rt},function(Pt){if(Pt)return Tt(Pt);Bt=!0,Tt()});var Dt=!1;return function(Pt){if(!Bt&&!Dt)return Dt=!0,function(Nt){return Nt.setHeader&&typeof Nt.abort=="function"}(It)?It.abort():typeof It.destroy=="function"?It.destroy():void Tt(Pt||new Et("pipe"))}}function kt(It){It()}function vt(It,wt){return It.pipe(wt)}function bt(It){return It.length?typeof It[It.length-1]!="function"?yt:It.pop():yt}nt.exports=function(){for(var It=arguments.length,wt=new Array(It),Rt=0;Rt<It;Rt++)wt[Rt]=arguments[Rt];var Tt,Bt=bt(wt);if(Array.isArray(wt[0])&&(wt=wt[0]),wt.length<2)throw new xt("streams");var Dt=wt.map(function(Pt,Nt){var Lt=Nt<wt.length-1;return Ct(Pt,Lt,Nt>0,function(Wt){Tt||(Tt=Wt),Wt&&Dt.forEach(kt),Lt||(Dt.forEach(kt),Bt(Tt))})});return wt.reduce(vt)}},7605:(nt,ft,ht)=>{var gt=ht(4452).q.ERR_INVALID_OPT_VALUE;nt.exports={getHighWaterMark:function(At,xt,Et,yt){var Ct=function(kt,vt,bt){return kt.highWaterMark!=null?kt.highWaterMark:vt?kt[bt]:null}(xt,yt,Et);if(Ct!=null){if(!isFinite(Ct)||Math.floor(Ct)!==Ct||Ct<0)throw new gt(yt?Et:"highWaterMark",Ct);return Math.floor(Ct)}return At.objectMode?16:16384}}},5010:(nt,ft,ht)=>{nt.exports=ht(2699).EventEmitter},7525:(nt,ft,ht)=>{(ft=nt.exports=ht(8051)).Stream=ft,ft.Readable=ft,ft.Writable=ht(2557),ft.Duplex=ht(7073),ft.Transform=ht(7640),ft.PassThrough=ht(5163),ft.finished=ht(9885),ft.pipeline=ht(3495)},1445:(nt,ft,ht)=>{var gt=ht(8834).Buffer,At=ht(1285),xt=ht(4485),Et=new Array(16),yt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Ct=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],kt=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],vt=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],bt=[0,1518500249,1859775393,2400959708,2840853838],It=[1352829926,1548603684,1836072691,2053994217,0];function wt(){xt.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function Rt(Lt,Wt){return Lt<<Wt|Lt>>>32-Wt}function Tt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+(Wt^$t^Kt)+Ut+_t|0,Xt)+Vt|0}function Bt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+(Wt&$t|~Wt&Kt)+Ut+_t|0,Xt)+Vt|0}function Dt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+((Wt|~$t)^Kt)+Ut+_t|0,Xt)+Vt|0}function Pt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+(Wt&Kt|$t&~Kt)+Ut+_t|0,Xt)+Vt|0}function Nt(Lt,Wt,$t,Kt,Vt,Ut,_t,Xt){return Rt(Lt+(Wt^($t|~Kt))+Ut+_t|0,Xt)+Vt|0}At(wt,xt),wt.prototype._update=function(){for(var Lt=Et,Wt=0;Wt<16;++Wt)Lt[Wt]=this._block.readInt32LE(4*Wt);for(var $t=0|this._a,Kt=0|this._b,Vt=0|this._c,Ut=0|this._d,_t=0|this._e,Xt=0|this._a,Qt=0|this._b,jt=0|this._c,Gt=0|this._d,qt=0|this._e,zt=0;zt<80;zt+=1){var e0,s0;zt<16?(e0=Tt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[0],kt[zt]),s0=Nt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[0],vt[zt])):zt<32?(e0=Bt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[1],kt[zt]),s0=Pt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[1],vt[zt])):zt<48?(e0=Dt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[2],kt[zt]),s0=Dt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[2],vt[zt])):zt<64?(e0=Pt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[3],kt[zt]),s0=Bt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[3],vt[zt])):(e0=Nt($t,Kt,Vt,Ut,_t,Lt[yt[zt]],bt[4],kt[zt]),s0=Tt(Xt,Qt,jt,Gt,qt,Lt[Ct[zt]],It[4],vt[zt])),$t=_t,_t=Ut,Ut=Rt(Vt,10),Vt=Kt,Kt=e0,Xt=qt,qt=Gt,Gt=Rt(jt,10),jt=Qt,Qt=s0}var t0=this._b+Vt+Gt|0;this._b=this._c+Ut+qt|0,this._c=this._d+_t+Xt|0,this._d=this._e+$t+Qt|0,this._e=this._a+Kt+jt|0,this._a=t0},wt.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var Lt=gt.alloc?gt.alloc(20):new gt(20);return Lt.writeInt32LE(this._a,0),Lt.writeInt32LE(this._b,4),Lt.writeInt32LE(this._c,8),Lt.writeInt32LE(this._d,12),Lt.writeInt32LE(this._e,16),Lt},nt.exports=wt},7834:(nt,ft,ht)=>{var gt=ht(8834),At=gt.Buffer;function xt(yt,Ct){for(var kt in yt)Ct[kt]=yt[kt]}function Et(yt,Ct,kt){return At(yt,Ct,kt)}At.from&&At.alloc&&At.allocUnsafe&&At.allocUnsafeSlow?nt.exports=gt:(xt(gt,ft),ft.Buffer=Et),Et.prototype=Object.create(At.prototype),xt(At,Et),Et.from=function(yt,Ct,kt){if(typeof yt=="number")throw new TypeError("Argument must not be a number");return At(yt,Ct,kt)},Et.alloc=function(yt,Ct,kt){if(typeof yt!="number")throw new TypeError("Argument must be a number");var vt=At(yt);return Ct!==void 0?typeof kt=="string"?vt.fill(Ct,kt):vt.fill(Ct):vt.fill(0),vt},Et.allocUnsafe=function(yt){if(typeof yt!="number")throw new TypeError("Argument must be a number");return At(yt)},Et.allocUnsafeSlow=function(yt){if(typeof yt!="number")throw new TypeError("Argument must be a number");return gt.SlowBuffer(yt)}},3327:(nt,ft,ht)=>{var gt=ht(7834).Buffer;function At(xt,Et){this._block=gt.alloc(xt),this._finalSize=Et,this._blockSize=xt,this._len=0}At.prototype.update=function(xt,Et){typeof xt=="string"&&(Et=Et||"utf8",xt=gt.from(xt,Et));for(var yt=this._block,Ct=this._blockSize,kt=xt.length,vt=this._len,bt=0;bt<kt;){for(var It=vt%Ct,wt=Math.min(kt-bt,Ct-It),Rt=0;Rt<wt;Rt++)yt[It+Rt]=xt[bt+Rt];bt+=wt,(vt+=wt)%Ct==0&&this._update(yt)}return this._len+=kt,this},At.prototype.digest=function(xt){var Et=this._len%this._blockSize;this._block[Et]=128,this._block.fill(0,Et+1),Et>=this._finalSize&&(this._update(this._block),this._block.fill(0));var yt=8*this._len;if(yt<=4294967295)this._block.writeUInt32BE(yt,this._blockSize-4);else{var Ct=(4294967295&yt)>>>0,kt=(yt-Ct)/4294967296;this._block.writeUInt32BE(kt,this._blockSize-8),this._block.writeUInt32BE(Ct,this._blockSize-4)}this._update(this._block);var vt=this._hash();return xt?vt.toString(xt):vt},At.prototype._update=function(){throw new Error("_update must be implemented by subclass")},nt.exports=At},9065:(nt,ft,ht)=>{var gt=nt.exports=function(At){At=At.toLowerCase();var xt=gt[At];if(!xt)throw new Error(At+" is not supported (we accept pull requests)");return new xt};gt.sha=ht(8820),gt.sha1=ht(7885),gt.sha224=ht(8321),gt.sha256=ht(4424),gt.sha384=ht(213),gt.sha512=ht(5596)},8820:(nt,ft,ht)=>{var gt=ht(1285),At=ht(3327),xt=ht(7834).Buffer,Et=[1518500249,1859775393,-1894007588,-899497514],yt=new Array(80);function Ct(){this.init(),this._w=yt,At.call(this,64,56)}function kt(bt){return bt<<30|bt>>>2}function vt(bt,It,wt,Rt){return bt===0?It&wt|~It&Rt:bt===2?It&wt|It&Rt|wt&Rt:It^wt^Rt}gt(Ct,At),Ct.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Ct.prototype._update=function(bt){for(var It,wt=this._w,Rt=0|this._a,Tt=0|this._b,Bt=0|this._c,Dt=0|this._d,Pt=0|this._e,Nt=0;Nt<16;++Nt)wt[Nt]=bt.readInt32BE(4*Nt);for(;Nt<80;++Nt)wt[Nt]=wt[Nt-3]^wt[Nt-8]^wt[Nt-14]^wt[Nt-16];for(var Lt=0;Lt<80;++Lt){var Wt=~~(Lt/20),$t=0|((It=Rt)<<5|It>>>27)+vt(Wt,Tt,Bt,Dt)+Pt+wt[Lt]+Et[Wt];Pt=Dt,Dt=Bt,Bt=kt(Tt),Tt=Rt,Rt=$t}this._a=Rt+this._a|0,this._b=Tt+this._b|0,this._c=Bt+this._c|0,this._d=Dt+this._d|0,this._e=Pt+this._e|0},Ct.prototype._hash=function(){var bt=xt.allocUnsafe(20);return bt.writeInt32BE(0|this._a,0),bt.writeInt32BE(0|this._b,4),bt.writeInt32BE(0|this._c,8),bt.writeInt32BE(0|this._d,12),bt.writeInt32BE(0|this._e,16),bt},nt.exports=Ct},7885:(nt,ft,ht)=>{var gt=ht(1285),At=ht(3327),xt=ht(7834).Buffer,Et=[1518500249,1859775393,-1894007588,-899497514],yt=new Array(80);function Ct(){this.init(),this._w=yt,At.call(this,64,56)}function kt(It){return It<<5|It>>>27}function vt(It){return It<<30|It>>>2}function bt(It,wt,Rt,Tt){return It===0?wt&Rt|~wt&Tt:It===2?wt&Rt|wt&Tt|Rt&Tt:wt^Rt^Tt}gt(Ct,At),Ct.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Ct.prototype._update=function(It){for(var wt,Rt=this._w,Tt=0|this._a,Bt=0|this._b,Dt=0|this._c,Pt=0|this._d,Nt=0|this._e,Lt=0;Lt<16;++Lt)Rt[Lt]=It.readInt32BE(4*Lt);for(;Lt<80;++Lt)Rt[Lt]=(wt=Rt[Lt-3]^Rt[Lt-8]^Rt[Lt-14]^Rt[Lt-16])<<1|wt>>>31;for(var Wt=0;Wt<80;++Wt){var $t=~~(Wt/20),Kt=kt(Tt)+bt($t,Bt,Dt,Pt)+Nt+Rt[Wt]+Et[$t]|0;Nt=Pt,Pt=Dt,Dt=vt(Bt),Bt=Tt,Tt=Kt}this._a=Tt+this._a|0,this._b=Bt+this._b|0,this._c=Dt+this._c|0,this._d=Pt+this._d|0,this._e=Nt+this._e|0},Ct.prototype._hash=function(){var It=xt.allocUnsafe(20);return It.writeInt32BE(0|this._a,0),It.writeInt32BE(0|this._b,4),It.writeInt32BE(0|this._c,8),It.writeInt32BE(0|this._d,12),It.writeInt32BE(0|this._e,16),It},nt.exports=Ct},8321:(nt,ft,ht)=>{var gt=ht(1285),At=ht(4424),xt=ht(3327),Et=ht(7834).Buffer,yt=new Array(64);function Ct(){this.init(),this._w=yt,xt.call(this,64,56)}gt(Ct,At),Ct.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Ct.prototype._hash=function(){var kt=Et.allocUnsafe(28);return kt.writeInt32BE(this._a,0),kt.writeInt32BE(this._b,4),kt.writeInt32BE(this._c,8),kt.writeInt32BE(this._d,12),kt.writeInt32BE(this._e,16),kt.writeInt32BE(this._f,20),kt.writeInt32BE(this._g,24),kt},nt.exports=Ct},4424:(nt,ft,ht)=>{var gt=ht(1285),At=ht(3327),xt=ht(7834).Buffer,Et=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],yt=new Array(64);function Ct(){this.init(),this._w=yt,At.call(this,64,56)}function kt(Rt,Tt,Bt){return Bt^Rt&(Tt^Bt)}function vt(Rt,Tt,Bt){return Rt&Tt|Bt&(Rt|Tt)}function bt(Rt){return(Rt>>>2|Rt<<30)^(Rt>>>13|Rt<<19)^(Rt>>>22|Rt<<10)}function It(Rt){return(Rt>>>6|Rt<<26)^(Rt>>>11|Rt<<21)^(Rt>>>25|Rt<<7)}function wt(Rt){return(Rt>>>7|Rt<<25)^(Rt>>>18|Rt<<14)^Rt>>>3}gt(Ct,At),Ct.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Ct.prototype._update=function(Rt){for(var Tt,Bt=this._w,Dt=0|this._a,Pt=0|this._b,Nt=0|this._c,Lt=0|this._d,Wt=0|this._e,$t=0|this._f,Kt=0|this._g,Vt=0|this._h,Ut=0;Ut<16;++Ut)Bt[Ut]=Rt.readInt32BE(4*Ut);for(;Ut<64;++Ut)Bt[Ut]=0|(((Tt=Bt[Ut-2])>>>17|Tt<<15)^(Tt>>>19|Tt<<13)^Tt>>>10)+Bt[Ut-7]+wt(Bt[Ut-15])+Bt[Ut-16];for(var _t=0;_t<64;++_t){var Xt=Vt+It(Wt)+kt(Wt,$t,Kt)+Et[_t]+Bt[_t]|0,Qt=bt(Dt)+vt(Dt,Pt,Nt)|0;Vt=Kt,Kt=$t,$t=Wt,Wt=Lt+Xt|0,Lt=Nt,Nt=Pt,Pt=Dt,Dt=Xt+Qt|0}this._a=Dt+this._a|0,this._b=Pt+this._b|0,this._c=Nt+this._c|0,this._d=Lt+this._d|0,this._e=Wt+this._e|0,this._f=$t+this._f|0,this._g=Kt+this._g|0,this._h=Vt+this._h|0},Ct.prototype._hash=function(){var Rt=xt.allocUnsafe(32);return Rt.writeInt32BE(this._a,0),Rt.writeInt32BE(this._b,4),Rt.writeInt32BE(this._c,8),Rt.writeInt32BE(this._d,12),Rt.writeInt32BE(this._e,16),Rt.writeInt32BE(this._f,20),Rt.writeInt32BE(this._g,24),Rt.writeInt32BE(this._h,28),Rt},nt.exports=Ct},213:(nt,ft,ht)=>{var gt=ht(1285),At=ht(5596),xt=ht(3327),Et=ht(7834).Buffer,yt=new Array(160);function Ct(){this.init(),this._w=yt,xt.call(this,128,112)}gt(Ct,At),Ct.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Ct.prototype._hash=function(){var kt=Et.allocUnsafe(48);function vt(bt,It,wt){kt.writeInt32BE(bt,wt),kt.writeInt32BE(It,wt+4)}return vt(this._ah,this._al,0),vt(this._bh,this._bl,8),vt(this._ch,this._cl,16),vt(this._dh,this._dl,24),vt(this._eh,this._el,32),vt(this._fh,this._fl,40),kt},nt.exports=Ct},5596:(nt,ft,ht)=>{var gt=ht(1285),At=ht(3327),xt=ht(7834).Buffer,Et=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],yt=new Array(160);function Ct(){this.init(),this._w=yt,At.call(this,128,112)}function kt(Pt,Nt,Lt){return Lt^Pt&(Nt^Lt)}function vt(Pt,Nt,Lt){return Pt&Nt|Lt&(Pt|Nt)}function bt(Pt,Nt){return(Pt>>>28|Nt<<4)^(Nt>>>2|Pt<<30)^(Nt>>>7|Pt<<25)}function It(Pt,Nt){return(Pt>>>14|Nt<<18)^(Pt>>>18|Nt<<14)^(Nt>>>9|Pt<<23)}function wt(Pt,Nt){return(Pt>>>1|Nt<<31)^(Pt>>>8|Nt<<24)^Pt>>>7}function Rt(Pt,Nt){return(Pt>>>1|Nt<<31)^(Pt>>>8|Nt<<24)^(Pt>>>7|Nt<<25)}function Tt(Pt,Nt){return(Pt>>>19|Nt<<13)^(Nt>>>29|Pt<<3)^Pt>>>6}function Bt(Pt,Nt){return(Pt>>>19|Nt<<13)^(Nt>>>29|Pt<<3)^(Pt>>>6|Nt<<26)}function Dt(Pt,Nt){return Pt>>>0<Nt>>>0?1:0}gt(Ct,At),Ct.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Ct.prototype._update=function(Pt){for(var Nt=this._w,Lt=0|this._ah,Wt=0|this._bh,$t=0|this._ch,Kt=0|this._dh,Vt=0|this._eh,Ut=0|this._fh,_t=0|this._gh,Xt=0|this._hh,Qt=0|this._al,jt=0|this._bl,Gt=0|this._cl,qt=0|this._dl,zt=0|this._el,e0=0|this._fl,s0=0|this._gl,t0=0|this._hl,l0=0;l0<32;l0+=2)Nt[l0]=Pt.readInt32BE(4*l0),Nt[l0+1]=Pt.readInt32BE(4*l0+4);for(;l0<160;l0+=2){var d0=Nt[l0-30],n0=Nt[l0-30+1],g0=wt(d0,n0),A0=Rt(n0,d0),o0=Tt(d0=Nt[l0-4],n0=Nt[l0-4+1]),r0=Bt(n0,d0),Yt=Nt[l0-14],Mt=Nt[l0-14+1],Jt=Nt[l0-32],a0=Nt[l0-32+1],i0=A0+Mt|0,f0=g0+Yt+Dt(i0,A0)|0;f0=(f0=f0+o0+Dt(i0=i0+r0|0,r0)|0)+Jt+Dt(i0=i0+a0|0,a0)|0,Nt[l0]=f0,Nt[l0+1]=i0}for(var u0=0;u0<160;u0+=2){f0=Nt[u0],i0=Nt[u0+1];var x0=vt(Lt,Wt,$t),p0=vt(Qt,jt,Gt),D0=bt(Lt,Qt),P0=bt(Qt,Lt),z0=It(Vt,zt),J0=It(zt,Vt),Y0=Et[u0],X0=Et[u0+1],T0=kt(Vt,Ut,_t),L0=kt(zt,e0,s0),j0=t0+J0|0,Q0=Xt+z0+Dt(j0,t0)|0;Q0=(Q0=(Q0=Q0+T0+Dt(j0=j0+L0|0,L0)|0)+Y0+Dt(j0=j0+X0|0,X0)|0)+f0+Dt(j0=j0+i0|0,i0)|0;var q0=P0+p0|0,en=D0+x0+Dt(q0,P0)|0;Xt=_t,t0=s0,_t=Ut,s0=e0,Ut=Vt,e0=zt,Vt=Kt+Q0+Dt(zt=qt+j0|0,qt)|0,Kt=$t,qt=Gt,$t=Wt,Gt=jt,Wt=Lt,jt=Qt,Lt=Q0+en+Dt(Qt=j0+q0|0,j0)|0}this._al=this._al+Qt|0,this._bl=this._bl+jt|0,this._cl=this._cl+Gt|0,this._dl=this._dl+qt|0,this._el=this._el+zt|0,this._fl=this._fl+e0|0,this._gl=this._gl+s0|0,this._hl=this._hl+t0|0,this._ah=this._ah+Lt+Dt(this._al,Qt)|0,this._bh=this._bh+Wt+Dt(this._bl,jt)|0,this._ch=this._ch+$t+Dt(this._cl,Gt)|0,this._dh=this._dh+Kt+Dt(this._dl,qt)|0,this._eh=this._eh+Vt+Dt(this._el,zt)|0,this._fh=this._fh+Ut+Dt(this._fl,e0)|0,this._gh=this._gh+_t+Dt(this._gl,s0)|0,this._hh=this._hh+Xt+Dt(this._hl,t0)|0},Ct.prototype._hash=function(){var Pt=xt.allocUnsafe(64);function Nt(Lt,Wt,$t){Pt.writeInt32BE(Lt,$t),Pt.writeInt32BE(Wt,$t+4)}return Nt(this._ah,this._al,0),Nt(this._bh,this._bl,8),Nt(this._ch,this._cl,16),Nt(this._dh,this._dl,24),Nt(this._eh,this._el,32),Nt(this._fh,this._fl,40),Nt(this._gh,this._gl,48),Nt(this._hh,this._hl,56),Pt},nt.exports=Ct},4851:(nt,ft,ht)=>{nt.exports=At;var gt=ht(2699).EventEmitter;function At(){gt.call(this)}ht(1285)(At,gt),At.Readable=ht(8051),At.Writable=ht(2557),At.Duplex=ht(7073),At.Transform=ht(7640),At.PassThrough=ht(5163),At.finished=ht(9885),At.pipeline=ht(3495),At.Stream=At,At.prototype.pipe=function(xt,Et){var yt=this;function Ct(Tt){xt.writable&&xt.write(Tt)===!1&&yt.pause&&yt.pause()}function kt(){yt.readable&&yt.resume&&yt.resume()}yt.on("data",Ct),xt.on("drain",kt),xt._isStdio||Et&&Et.end===!1||(yt.on("end",bt),yt.on("close",It));var vt=!1;function bt(){vt||(vt=!0,xt.end())}function It(){vt||(vt=!0,typeof xt.destroy=="function"&&xt.destroy())}function wt(Tt){if(Rt(),gt.listenerCount(this,"error")===0)throw Tt}function Rt(){yt.removeListener("data",Ct),xt.removeListener("drain",kt),yt.removeListener("end",bt),yt.removeListener("close",It),yt.removeListener("error",wt),xt.removeListener("error",wt),yt.removeListener("end",Rt),yt.removeListener("close",Rt),xt.removeListener("close",Rt)}return yt.on("error",wt),xt.on("error",wt),yt.on("end",Rt),yt.on("close",Rt),xt.on("close",Rt),xt.emit("pipe",yt),xt}},214:(nt,ft,ht)=>{var gt=ht(7834).Buffer,At=gt.isEncoding||function(Rt){switch((Rt=""+Rt)&&Rt.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function xt(Rt){var Tt;switch(this.encoding=function(Bt){var Dt=function(Pt){if(!Pt)return"utf8";for(var Nt;;)switch(Pt){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return Pt;default:if(Nt)return;Pt=(""+Pt).toLowerCase(),Nt=!0}}(Bt);if(typeof Dt!="string"&&(gt.isEncoding===At||!At(Bt)))throw new Error("Unknown encoding: "+Bt);return Dt||Bt}(Rt),this.encoding){case"utf16le":this.text=Ct,this.end=kt,Tt=4;break;case"utf8":this.fillLast=yt,Tt=4;break;case"base64":this.text=vt,this.end=bt,Tt=3;break;default:return this.write=It,void(this.end=wt)}this.lastNeed=0,this.lastTotal=0,this.lastChar=gt.allocUnsafe(Tt)}function Et(Rt){return Rt<=127?0:Rt>>5==6?2:Rt>>4==14?3:Rt>>3==30?4:Rt>>6==2?-1:-2}function yt(Rt){var Tt=this.lastTotal-this.lastNeed,Bt=function(Dt,Pt,Nt){if((192&Pt[0])!=128)return Dt.lastNeed=0,"�";if(Dt.lastNeed>1&&Pt.length>1){if((192&Pt[1])!=128)return Dt.lastNeed=1,"�";if(Dt.lastNeed>2&&Pt.length>2&&(192&Pt[2])!=128)return Dt.lastNeed=2,"�"}}(this,Rt);return Bt!==void 0?Bt:this.lastNeed<=Rt.length?(Rt.copy(this.lastChar,Tt,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(Rt.copy(this.lastChar,Tt,0,Rt.length),void(this.lastNeed-=Rt.length))}function Ct(Rt,Tt){if((Rt.length-Tt)%2==0){var Bt=Rt.toString("utf16le",Tt);if(Bt){var Dt=Bt.charCodeAt(Bt.length-1);if(Dt>=55296&&Dt<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=Rt[Rt.length-2],this.lastChar[1]=Rt[Rt.length-1],Bt.slice(0,-1)}return Bt}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=Rt[Rt.length-1],Rt.toString("utf16le",Tt,Rt.length-1)}function kt(Rt){var Tt=Rt&&Rt.length?this.write(Rt):"";if(this.lastNeed){var Bt=this.lastTotal-this.lastNeed;return Tt+this.lastChar.toString("utf16le",0,Bt)}return Tt}function vt(Rt,Tt){var Bt=(Rt.length-Tt)%3;return Bt===0?Rt.toString("base64",Tt):(this.lastNeed=3-Bt,this.lastTotal=3,Bt===1?this.lastChar[0]=Rt[Rt.length-1]:(this.lastChar[0]=Rt[Rt.length-2],this.lastChar[1]=Rt[Rt.length-1]),Rt.toString("base64",Tt,Rt.length-Bt))}function bt(Rt){var Tt=Rt&&Rt.length?this.write(Rt):"";return this.lastNeed?Tt+this.lastChar.toString("base64",0,3-this.lastNeed):Tt}function It(Rt){return Rt.toString(this.encoding)}function wt(Rt){return Rt&&Rt.length?this.write(Rt):""}ft.s=xt,xt.prototype.write=function(Rt){if(Rt.length===0)return"";var Tt,Bt;if(this.lastNeed){if((Tt=this.fillLast(Rt))===void 0)return"";Bt=this.lastNeed,this.lastNeed=0}else Bt=0;return Bt<Rt.length?Tt?Tt+this.text(Rt,Bt):this.text(Rt,Bt):Tt||""},xt.prototype.end=function(Rt){var Tt=Rt&&Rt.length?this.write(Rt):"";return this.lastNeed?Tt+"�":Tt},xt.prototype.text=function(Rt,Tt){var Bt=function(Pt,Nt,Lt){var Wt=Nt.length-1;if(Wt<Lt)return 0;var $t=Et(Nt[Wt]);return $t>=0?($t>0&&(Pt.lastNeed=$t-1),$t):--Wt<Lt||$t===-2?0:($t=Et(Nt[Wt]))>=0?($t>0&&(Pt.lastNeed=$t-2),$t):--Wt<Lt||$t===-2?0:($t=Et(Nt[Wt]))>=0?($t>0&&($t===2?$t=0:Pt.lastNeed=$t-3),$t):0}(this,Rt,Tt);if(!this.lastNeed)return Rt.toString("utf8",Tt);this.lastTotal=Bt;var Dt=Rt.length-(Bt-this.lastNeed);return Rt.copy(this.lastChar,0,Dt),Rt.toString("utf8",Tt,Dt)},xt.prototype.fillLast=function(Rt){if(this.lastNeed<=Rt.length)return Rt.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Rt.copy(this.lastChar,this.lastTotal-this.lastNeed,0,Rt.length),this.lastNeed-=Rt.length}},5803:(nt,ft,ht)=>{function gt(At){try{if(!ht.g.localStorage)return!1}catch{return!1}var xt=ht.g.localStorage[At];return xt!=null&&String(xt).toLowerCase()==="true"}nt.exports=function(At,xt){if(gt("noDeprecation"))return At;var Et=!1;return function(){if(!Et){if(gt("throwDeprecation"))throw new Error(xt);gt("traceDeprecation")?console.trace(xt):console.warn(xt),Et=!0}return At.apply(this,arguments)}}},7573:()=>{},5942:()=>{},4854:()=>{},6602:()=>{}},Le={};function Ye(nt){var ft=Le[nt];if(ft!==void 0)return ft.exports;var ht=Le[nt]={exports:{}};return Be[nt](ht,ht.exports,Ye),ht.exports}Ye.n=nt=>{var ft=nt&&nt.__esModule?()=>nt.default:()=>nt;return Ye.d(ft,{a:ft}),ft},Ye.d=(nt,ft)=>{for(var ht in ft)Ye.o(ft,ht)&&!Ye.o(nt,ht)&&Object.defineProperty(nt,ht,{enumerable:!0,get:ft[ht]})},Ye.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),Ye.o=(nt,ft)=>Object.prototype.hasOwnProperty.call(nt,ft),Ye.r=nt=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(nt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(nt,"__esModule",{value:!0})};var tt={};(()=>{Ye.r(tt),Ye.d(tt,{ens:()=>xt,forge:()=>Ct()});var nt=Ye(11),ft=Ye.n(nt),ht=Ye(4406),gt=Ye.n(ht);function At(kt){return new Promise(function(vt){var bt=ft()("","");bt.on("readable",function(){var It=bt.read();It&&vt(It.toString("hex"))}),bt.write(kt),bt.end()})}function xt(kt){return vt=this,bt=void 0,wt=function(){var Rt;return function(Tt,Bt){var Dt,Pt,Nt,Lt,Wt={label:0,sent:function(){if(1&Nt[0])throw Nt[1];return Nt[1]},trys:[],ops:[]};return Lt={next:$t(0),throw:$t(1),return:$t(2)},typeof Symbol=="function"&&(Lt[Symbol.iterator]=function(){return this}),Lt;function $t(Kt){return function(Vt){return function(Ut){if(Dt)throw new TypeError("Generator is already executing.");for(;Wt;)try{if(Dt=1,Pt&&(Nt=2&Ut[0]?Pt.return:Ut[0]?Pt.throw||((Nt=Pt.return)&&Nt.call(Pt),0):Pt.next)&&!(Nt=Nt.call(Pt,Ut[1])).done)return Nt;switch(Pt=0,Nt&&(Ut=[2&Ut[0],Nt.value]),Ut[0]){case 0:case 1:Nt=Ut;break;case 4:return Wt.label++,{value:Ut[1],done:!1};case 5:Wt.label++,Pt=Ut[1],Ut=[0];continue;case 7:Ut=Wt.ops.pop(),Wt.trys.pop();continue;default:if(!((Nt=(Nt=Wt.trys).length>0&&Nt[Nt.length-1])||Ut[0]!==6&&Ut[0]!==2)){Wt=0;continue}if(Ut[0]===3&&(!Nt||Ut[1]>Nt[0]&&Ut[1]<Nt[3])){Wt.label=Ut[1];break}if(Ut[0]===6&&Wt.label<Nt[1]){Wt.label=Nt[1],Nt=Ut;break}if(Nt&&Wt.label<Nt[2]){Wt.label=Nt[2],Wt.ops.push(Ut);break}Nt[2]&&Wt.ops.pop(),Wt.trys.pop();continue}Ut=Bt.call(Tt,Wt)}catch(_t){Ut=[6,_t],Pt=0}finally{Dt=Nt=0}if(5&Ut[0])throw Ut[1];return{value:Ut[0]?Ut[1]:void 0,done:!0}}([Kt,Vt])}}}(this,function(Tt){switch(Tt.label){case 0:return[4,At(kt)];case 1:return Rt=Tt.sent(),[2,Et(kt,Rt)]}})},new((It=void 0)||(It=Promise))(function(Rt,Tt){function Bt(Nt){try{Pt(wt.next(Nt))}catch(Lt){Tt(Lt)}}function Dt(Nt){try{Pt(wt.throw(Nt))}catch(Lt){Tt(Lt)}}function Pt(Nt){var Lt;Nt.done?Rt(Nt.value):(Lt=Nt.value,Lt instanceof It?Lt:new It(function(Wt){Wt(Lt)})).then(Bt,Dt)}Pt((wt=wt.apply(vt,bt||[])).next())});var vt,bt,It,wt}function Et(kt,vt){for(var bt,It,wt,Rt=kt,Tt=0;Tt<vt.length;Tt++)bt=Rt,It=Tt+64*(Tt+1),wt=vt.charAt(Tt),Rt="".concat(bt.substring(0,It)).concat(wt).concat(bt.substring(It));return Rt}Ye.g.process=gt();var yt=Ye(6432),Ct=Ye.n(yt)})(),window.__MODULE_DEFAULT_EXPORT__=tt})();const __MODULE_DEFAULT_EXPORT__=window.__MODULE_DEFAULT_EXPORT__;delete window.__MODULE_DEFAULT_EXPORT__;const{forge}=__MODULE_DEFAULT_EXPORT__,publicKeyUrl="/e2ee/key/v2",postPublicKeyUrl="/e2ee/key";function getPublicKey(){return exports.api.get(publicKeyUrl).then(Be=>Be.data).catch(emptyFunc)}function encryptRsaOaepSha1Mgf1(Be,Le){const Ye=Be.encrypt(Le,"RSA-OAEP",{md:forge.md.sha256.create(),mgf1:{md:forge.md.sha1.create()}});return forge.util.bytesToHex(Ye)}function encryptRsaOaepSha256(Be,Le){const Ye=Be.encrypt(Le,"RSA-OAEP",{md:forge.md.sha256.create(),mgf1:{md:forge.md.sha256.create()}});return forge.util.bytesToHex(Ye)}function encryptAesGcm(Be,Le,Ye){try{const tt=forge.random.getBytesSync(12),nt=forge.cipher.createCipher("AES-GCM",Be);nt.start({iv:tt}),nt.update(forge.util.createBuffer(JSON.stringify(Le),"utf8")),nt.finish();const ft=nt.output.toHex(),ht=nt.mode.tag.toHex(),gt=forge.util.bytesToHex(tt);return{encryptedData:ft+ht,iv:gt,encryptedKey:Ye}}catch(tt){throw new Error(tt)}}function decryptAesGcm(Be,Le){try{const Ye=forge.util.hexToBytes(Le.iv),tt=forge.util.hexToBytes(Le.encryptedData.slice(-32)),nt=forge.cipher.createDecipher("AES-GCM",Be);nt.start({iv:Ye,tag:tt}),nt.update(forge.util.createBuffer(forge.util.hexToBytes(Le.encryptedData.slice(0,-32)))),nt.finish();const ft=nt.output.getBytes();return forge.util.decodeUtf8(ft)}catch(Ye){throw new Error(Ye)}}function postPublicKey(Be,Le,Ye,tt){return exports.api.post(postPublicKeyUrl,{encryptedKey:Be,encryptedIv:Le},{headers:{sessionId:Ye,"X-Incode-Hardware-Id":tt}}).then(nt=>nt.data)}async function publishKeys(Be){const Le=forge.random.getBytesSync(32),Ye=forge.random.getBytesSync(16),tt=await getPublicKey(),nt=`-----BEGIN PUBLIC KEY-----
|
|
10224
10224
|
${tt.publicKey}
|
|
10225
10225
|
-----END PUBLIC KEY-----`,ft=forge.pki.publicKeyFromPem(nt),ht=options.useSha256?encryptRsaOaepSha256(ft,Le):encryptRsaOaepSha1Mgf1(ft,Le),gt=options.useSha256?encryptRsaOaepSha256(ft,Ye):encryptRsaOaepSha1Mgf1(ft,Ye),At=tt.sessionId;return await postPublicKey(ht,gt,At,Be),exports.api.interceptors.request.use(xt=>{xt.headers.sessionid=At;const Et=encryptAesGcm(Le,xt.data,ht);return xt.data=Et,xt},xt=>Promise.reject(xt)),exports.api.interceptors.response.use(xt=>{const Et=decryptAesGcm(Le,xt.data);return xt.data=JSON.parse(Et),xt},xt=>Promise.reject(xt)),ht}const overlayImg="data:image/svg+xml,%3csvg%20width='229'%20height='229'%20viewBox='0%200%20229%20229'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.4'%3e%3cpath%20d='M130.324%20136.69V130.324C130.324%20129.445%20131.036%20128.732%20131.915%20128.732H138.281C140.039%20128.732%20141.465%20130.158%20141.465%20131.916V138.282C141.465%20140.04%20140.039%20141.465%20138.281%20141.465H133.507C131.749%20141.465%20130.324%20142.89%20130.324%20144.648V147.831C130.324%20149.589%20131.749%20151.014%20133.507%20151.014H138.281C140.039%20151.014%20141.465%20152.439%20141.465%20154.197V158.972C141.465%20160.73%20140.039%20162.155%20138.281%20162.155H123.958C122.2%20162.155%20120.774%20160.73%20120.774%20158.972V143.056C120.774%20141.298%20122.2%20139.873%20123.958%20139.873H127.141C128.899%20139.873%20130.324%20138.448%20130.324%20136.69Z'%20fill='%23BCBCBC'/%3e%3cpath%20d='M216.268%20117.592V112.817C216.268%20111.059%20217.693%20109.634%20219.451%20109.634H224.225C225.983%20109.634%20227.408%20111.059%20227.408%20112.817V117.592C227.408%20119.35%20225.983%20120.775%20224.225%20120.775H219.451C217.693%20120.775%20216.268%20119.35%20216.268%20117.592Z'%20fill='%23BCBCBC'/%3e%3cpath%20d='M205.127%2095.3103V90.5356C205.127%2088.7777%20206.552%2087.3525%20208.31%2087.3525H224.226C225.984%2087.3525%20227.409%2088.7777%20227.409%2090.5356V95.3103C227.409%2097.0683%20225.984%2098.4934%20224.226%2098.4934H208.31C206.552%2098.4934%20205.127%2097.0683%20205.127%2095.3103Z'%20fill='%23BCBCBC'/%3e%3cpath%20d='M111.226%2041.1968V34.8306C111.226%2033.0726%20109.8%2031.6475%20108.042%2031.6475H95.3101C93.5521%2031.6475%2092.127%2033.0726%2092.127%2034.8306V41.1968C92.127%2042.9547%2093.5521%2044.3799%2095.3101%2044.3799H108.042C109.8%2044.3799%20111.226%2042.9547%20111.226%2041.1968Z'%20fill='%23BCBCBC'/%3e%3cpath%20d='M23.6904%20104.86V90.5356C23.6904%2088.7777%2025.1156%2087.3525%2026.8735%2087.3525H42.789C44.547%2087.3525%2045.9721%2088.7777%2045.9721%2090.5356V95.3103C45.9721%2097.0683%2044.547%2098.4934%2042.789%2098.4934H41.1975C39.4395%2098.4934%2038.0144%2099.9185%2038.0144%20101.676V104.86C38.0144%20106.618%2039.4395%20108.043%2041.1975%20108.043H53.9299C55.6878%20108.043%2057.113%20109.468%2057.113%20111.226V116C57.113%20117.758%2058.5381%20119.184%2060.2961%20119.184H63.4792C65.2371%20119.184%2066.6623%20117.758%2066.6623%20116V111.226C66.6623%20109.468%2068.0874%20108.043%2069.8454%20108.043H74.62C76.378%20108.043%2077.8031%20109.468%2077.8031%20111.226V119.184C77.8031%20120.942%2076.378%20122.367%2074.62%20122.367H69.8454C68.0874%20122.367%2066.6623%20123.792%2066.6623%20125.55C66.6623%20127.308%2068.0874%20128.733%2069.8454%20128.733H73.0285C74.7864%20128.733%2076.2116%20130.158%2076.2116%20131.916V136.691C76.2116%20138.449%2074.7864%20139.874%2073.0285%20139.874H26.8735C25.1156%20139.874%2023.6904%20138.449%2023.6904%20136.691V131.916C23.6904%20130.158%2025.1156%20128.733%2026.8735%20128.733H31.6482C33.4062%20128.733%2034.8313%20127.308%2034.8313%20125.55V111.226C34.8313%20109.468%2033.4062%20108.043%2031.6482%20108.043H26.8735C25.1156%20108.043%2023.6904%20106.618%2023.6904%20104.86Z'%20fill='%23BCBCBC'/%3e%3cpath%20d='M10.9577%2087.3525H6.1831C4.42512%2087.3525%203%2088.7777%203%2090.5356V136.691C3%20138.449%204.42512%20139.874%206.1831%20139.874H10.9577C12.7157%20139.874%2014.1408%20138.449%2014.1408%20136.691V90.5356C14.1408%2088.7777%2012.7157%2087.3525%2010.9577%2087.3525Z'%20fill='%23BCBCBC'/%3e%3crect%20x='6.18262'%20y='6.18262'%20width='66.8451'%20height='66.8451'%20rx='3.1831'%20stroke='%23BCBCBC'%20stroke-width='11.1408'/%3e%3crect%20x='155.789'%20y='6.18262'%20width='66.8451'%20height='66.8451'%20rx='3.1831'%20stroke='%23BCBCBC'%20stroke-width='11.1408'/%3e%3cpath%20d='M95.3095%2023.6901H92.1264C90.3684%2023.6901%2088.9433%2022.265%2088.9433%2020.507V6.1831C88.9433%204.42512%2090.3684%203%2092.1264%203H117.591C119.349%203%20120.774%204.42512%20120.774%206.1831V20.507C120.774%2022.265%20122.199%2023.6901%20123.957%2023.6901H128.732C130.49%2023.6901%20131.915%2022.265%20131.915%2020.507V6.1831C131.915%204.42512%20133.34%203%20135.098%203H136.69C138.448%203%20139.873%204.42512%20139.873%206.1831V28.4648C139.873%2030.2228%20138.448%2031.6479%20136.69%2031.6479H135.098C133.34%2031.6479%20131.915%2033.073%20131.915%2034.831V53.9296C131.915%2055.6876%20133.34%2057.1127%20135.098%2057.1127H136.69C138.448%2057.1127%20139.873%2058.5378%20139.873%2060.2958V95.3099C139.873%2097.0678%20141.298%2098.493%20143.056%2098.493H149.422C151.18%2098.493%20152.605%2097.0678%20152.605%2095.3099V88.9437C152.605%2087.1857%20154.03%2085.7606%20155.788%2085.7606H158.971C160.729%2085.7606%20162.155%2087.1857%20162.155%2088.9437V103.268C162.155%20105.026%20160.729%20106.451%20158.971%20106.451H131.915C130.157%20106.451%20128.732%20107.876%20128.732%20109.634V125.549C128.732%20127.307%20127.307%20128.732%20125.549%20128.732H123.957C122.199%20128.732%20120.774%20130.158%20120.774%20131.915V136.69C120.774%20138.448%20119.349%20139.873%20117.591%20139.873H112.817C111.059%20139.873%20109.633%20141.298%20109.633%20143.056V147.831C109.633%20149.589%20108.208%20151.014%20106.45%20151.014H101.676C99.9177%20151.014%2098.4926%20152.439%2098.4926%20154.197V158.972C98.4926%20160.73%2099.9177%20162.155%20101.676%20162.155H108.042C109.8%20162.155%20111.225%20163.58%20111.225%20165.338V170.113C111.225%20171.871%20112.65%20173.296%20114.408%20173.296H117.591C119.349%20173.296%20120.774%20174.721%20120.774%20176.479V182.845C120.774%20184.603%20122.199%20186.028%20123.957%20186.028H128.732C130.49%20186.028%20131.915%20187.453%20131.915%20189.211V192.394C131.915%20194.152%20133.34%20195.577%20135.098%20195.577H138.281C140.039%20195.577%20141.464%20197.003%20141.464%20198.761C141.464%20200.519%20142.89%20201.944%20144.648%20201.944H149.422C151.18%20201.944%20152.605%20200.519%20152.605%20198.761V186.028C152.605%20184.27%20151.18%20182.845%20149.422%20182.845H135.098C133.34%20182.845%20131.915%20181.42%20131.915%20179.662V176.479C131.915%20174.721%20133.34%20173.296%20135.098%20173.296H160.563C162.321%20173.296%20163.746%20171.871%20163.746%20170.113V154.197C163.746%20152.439%20165.171%20151.014%20166.929%20151.014H170.112C171.87%20151.014%20173.295%20152.439%20173.295%20154.197V162.155C173.295%20163.913%20174.721%20165.338%20176.479%20165.338H179.662C181.42%20165.338%20182.845%20166.763%20182.845%20168.521V179.662C182.845%20181.42%20184.27%20182.845%20186.028%20182.845H209.901C211.659%20182.845%20213.084%20181.42%20213.084%20179.662V176.479C213.084%20174.721%20211.659%20173.296%20209.901%20173.296H195.577C193.819%20173.296%20192.394%20171.871%20192.394%20170.113V165.338C192.394%20163.58%20190.969%20162.155%20189.211%20162.155H186.028C184.27%20162.155%20182.845%20160.73%20182.845%20158.972V143.056C182.845%20141.298%20184.27%20139.873%20186.028%20139.873H190.802C192.56%20139.873%20193.986%20138.448%20193.986%20136.69V131.915C193.986%20130.158%20192.56%20128.732%20190.802%20128.732H176.479C174.721%20128.732%20173.295%20130.158%20173.295%20131.915V136.69C173.295%20138.448%20171.87%20139.873%20170.112%20139.873H166.929C165.171%20139.873%20163.746%20138.448%20163.746%20136.69V131.915C163.746%20130.158%20162.321%20128.732%20160.563%20128.732H155.788C154.03%20128.732%20152.605%20127.307%20152.605%20125.549V122.366C152.605%20120.608%20154.03%20119.183%20155.788%20119.183H179.662C181.42%20119.183%20182.845%20117.758%20182.845%20116V88.9437C182.845%2087.1857%20184.27%2085.7606%20186.028%2085.7606H190.802C192.56%2085.7606%20193.986%2087.1857%20193.986%2088.9437V106.451C193.986%20108.209%20195.411%20109.634%20197.169%20109.634H203.535C205.293%20109.634%20206.718%20111.059%20206.718%20112.817V136.69C206.718%20138.448%20205.293%20139.873%20203.535%20139.873H200.352C198.594%20139.873%20197.169%20141.298%20197.169%20143.056V158.972C197.169%20160.73%20198.594%20162.155%20200.352%20162.155H213.084C214.842%20162.155%20216.267%20163.58%20216.267%20165.338V170.113C216.267%20171.871%20217.692%20173.296%20219.45%20173.296H225.817C227.575%20173.296%20229%20174.721%20229%20176.479V179.662C229%20181.42%20227.575%20182.845%20225.817%20182.845H219.45C217.692%20182.845%20216.267%20184.27%20216.267%20186.028V192.394C216.267%20194.152%20214.842%20195.577%20213.084%20195.577H176.479C174.721%20195.577%20173.295%20197.003%20173.295%20198.761V209.901C173.295%20211.659%20174.721%20213.085%20176.479%20213.085H182.845C184.603%20213.085%20186.028%20214.51%20186.028%20216.268V224.225C186.028%20225.983%20184.603%20227.408%20182.845%20227.408H176.479C174.721%20227.408%20173.295%20225.983%20173.295%20224.225V219.451C173.295%20217.693%20171.87%20216.268%20170.112%20216.268H165.338C163.58%20216.268%20162.155%20214.842%20162.155%20213.085V208.31C162.155%20206.552%20160.729%20205.127%20158.971%20205.127H157.38C155.622%20205.127%20154.197%20206.552%20154.197%20208.31V225.817C154.197%20227.575%20152.772%20229%20151.014%20229H143.056C141.298%20229%20139.873%20227.575%20139.873%20225.817V208.31C139.873%20206.552%20138.448%20205.127%20136.69%20205.127H131.915C130.157%20205.127%20128.732%20203.702%20128.732%20201.944V198.761C128.732%20197.003%20127.307%20195.577%20125.549%20195.577H123.957C122.199%20195.577%20120.774%20197.003%20120.774%20198.761V213.085C120.774%20214.842%20119.349%20216.268%20117.591%20216.268H112.817C111.059%20216.268%20109.633%20217.693%20109.633%20219.451V224.225C109.633%20225.983%20108.208%20227.408%20106.45%20227.408H88.9433C87.1853%20227.408%2085.7602%20225.983%2085.7602%20224.225V216.268C85.7602%20214.51%2087.1853%20213.085%2088.9433%20213.085H106.45C108.208%20213.085%20109.633%20211.659%20109.633%20209.901V208.31C109.633%20206.552%20108.208%20205.127%20106.45%20205.127H95.3095C93.5515%20205.127%2092.1264%20203.702%2092.1264%20201.944V186.028C92.1264%20184.27%2093.5515%20182.845%2095.3095%20182.845H106.45C108.208%20182.845%20109.633%20181.42%20109.633%20179.662V176.479C109.633%20174.721%20108.208%20173.296%20106.45%20173.296H92.1264C90.3684%20173.296%2088.9433%20171.871%2088.9433%20170.113V143.056C88.9433%20141.298%2090.3684%20139.873%2092.1264%20139.873H96.901C98.659%20139.873%20100.084%20138.448%20100.084%20136.69V131.915C100.084%20130.158%20101.509%20128.732%20103.267%20128.732H106.45C108.208%20128.732%20109.633%20127.307%20109.633%20125.549V109.634C109.633%20107.876%20108.208%20106.451%20106.45%20106.451H101.676C99.9177%20106.451%2098.4926%20107.876%2098.4926%20109.634V125.549C98.4926%20127.307%2097.0675%20128.732%2095.3095%20128.732C93.5515%20128.732%2092.1264%20127.307%2092.1264%20125.549V101.676C92.1264%2099.9181%2093.5515%2098.493%2095.3095%2098.493C97.0675%2098.493%2098.4926%2097.0678%2098.4926%2095.3099V92.1268C98.4926%2090.3688%2097.0675%2088.9437%2095.3095%2088.9437H92.1264C90.3684%2088.9437%2088.9433%2090.3688%2088.9433%2092.1268V95.3099C88.9433%2097.0678%2087.5182%2098.493%2085.7602%2098.493H60.2954C58.5374%2098.493%2057.1123%2097.0678%2057.1123%2095.3099V88.9437C57.1123%2087.1857%2058.5374%2085.7606%2060.2954%2085.7606H85.7602C87.5182%2085.7606%2088.9433%2084.3354%2088.9433%2082.5775V69.8451C88.9433%2068.0871%2090.3684%2066.662%2092.1264%2066.662H95.3095C97.0675%2066.662%2098.4926%2068.0871%2098.4926%2069.8451V74.6197C98.4926%2076.3777%2099.9177%2077.8028%20101.676%2077.8028H106.45C108.208%2077.8028%20109.633%2076.3777%20109.633%2074.6197V69.8451C109.633%2068.0871%20111.059%2066.662%20112.817%2066.662H114.408C116.166%2066.662%20117.591%2068.0871%20117.591%2069.8451V76.2113C117.591%2077.9692%20116.166%2079.3944%20114.408%2079.3944H112.817C111.059%2079.3944%20109.633%2080.8195%20109.633%2082.5775V95.3099C109.633%2097.0678%20111.059%2098.493%20112.817%2098.493H117.591C119.349%2098.493%20120.774%2097.0678%20120.774%2095.3099V80.9859C120.774%2079.2279%20122.199%2077.8028%20123.957%2077.8028H128.732C130.49%2077.8028%20131.915%2076.3777%20131.915%2074.6197V66.662C131.915%2064.904%20130.49%2063.4789%20128.732%2063.4789H123.957C122.199%2063.4789%20120.774%2062.0538%20120.774%2060.2958V34.831C120.774%2033.073%20119.349%2031.6479%20117.591%2031.6479H114.408C112.65%2031.6479%20111.225%2030.2228%20111.225%2028.4648V15.7324C111.225%2013.9744%20109.8%2012.5493%20108.042%2012.5493H101.676C99.9177%2012.5493%2098.4926%2013.9744%2098.4926%2015.7324V20.507C98.4926%2022.265%2097.0675%2023.6901%2095.3095%2023.6901Z'%20fill='%23BCBCBC'/%3e%3crect%20x='6.18262'%20y='155.789'%20width='66.8451'%20height='66.8451'%20rx='3.1831'%20stroke='%23BCBCBC'%20stroke-width='11.1408'/%3e%3crect%20x='25.2812'%20y='25.2812'%20width='28.6479'%20height='28.6479'%20rx='3.1831'%20fill='%23BCBCBC'/%3e%3crect%20x='174.888'%20y='25.2812'%20width='28.6479'%20height='28.6479'%20rx='3.1831'%20fill='%23BCBCBC'/%3e%3crect%20x='25.2812'%20y='174.888'%20width='28.6479'%20height='28.6479'%20rx='3.1831'%20fill='%23BCBCBC'/%3e%3c/g%3e%3c/svg%3e",tutorial="data:image/svg+xml,%3csvg%20width='285'%20height='279'%20viewBox='0%200%20285%20279'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='285'%20height='279'%20fill='url(%23pattern0)'/%3e%3cdefs%3e%3cpattern%20id='pattern0'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_1167_27543'%20transform='matrix(0.001%200%200%200.00102151%200%20-0.000537634)'/%3e%3c/pattern%3e%3cimage%20id='image0_1167_27543'%20width='1000'%20height='980'%20xlink:href='data:image/png;base64,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'/%3e%3c/defs%3e%3c/svg%3e",codeReader=new BrowserMultiFormatReader,QrScannerTutorialContainer=dt.div`
|
|
10226
10226
|
display: flex;
|