@transmitsecurity/platform-web-sdk 1.15.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +479 -0
  2. package/README.md +72 -0
  3. package/VITE_CONFIG.md +107 -0
  4. package/build/drs-entry.d.ts +20 -0
  5. package/build/drs-entry.js +19 -0
  6. package/build/drs-only.d.ts +22 -0
  7. package/build/drs-only.js +25 -0
  8. package/build/drs.d.ts +13 -0
  9. package/build/drs.js +45 -0
  10. package/build/ido-entry.d.ts +17 -0
  11. package/build/ido-entry.js +19 -0
  12. package/build/ido.d.ts +8 -0
  13. package/build/ido.js +27 -0
  14. package/build/idv-entry.d.ts +17 -0
  15. package/build/idv-entry.js +19 -0
  16. package/build/idv.d.ts +8 -0
  17. package/build/idv.js +27 -0
  18. package/build/initialize-only.d.ts +7 -0
  19. package/build/initialize-only.js +40 -0
  20. package/build/initialize.d.ts +1 -0
  21. package/build/initialize.js +2 -0
  22. package/build/mainExport.d.ts +16 -0
  23. package/build/mainExport.js +43 -0
  24. package/build/sdk-factory.d.ts +109 -0
  25. package/build/sdk-factory.js +108 -0
  26. package/build/shared-state.d.ts +4 -0
  27. package/build/shared-state.js +32 -0
  28. package/build/webauthn-entry.d.ts +19 -0
  29. package/build/webauthn-entry.js +19 -0
  30. package/build/webauthn.d.ts +12 -0
  31. package/build/webauthn.js +44 -0
  32. package/bundler-config.json +15 -0
  33. package/dist/docs/.nojekyll +1 -0
  34. package/dist/docs/README.md +72 -0
  35. package/dist/docs/enums/ErrorCode.md +113 -0
  36. package/dist/docs/interfaces/ActionEventOptions.md +44 -0
  37. package/dist/docs/interfaces/ActionResponse.md +9 -0
  38. package/dist/docs/interfaces/AuthenticationAutofillActivateHandlers.md +61 -0
  39. package/dist/docs/interfaces/AutofillHandlers.md +50 -0
  40. package/dist/docs/interfaces/CrossDeviceController.md +27 -0
  41. package/dist/docs/interfaces/SdkError.md +28 -0
  42. package/dist/docs/interfaces/WebauthnApis.md +73 -0
  43. package/dist/docs/interfaces/WebauthnAuthenticationFlows.md +52 -0
  44. package/dist/docs/interfaces/WebauthnCrossDeviceFlows.md +107 -0
  45. package/dist/docs/interfaces/WebauthnCrossDeviceRegistrationOptions.md +23 -0
  46. package/dist/docs/interfaces/WebauthnRegistrationOptions.md +55 -0
  47. package/dist/docs/interfaces/initConfigParams.md +7 -0
  48. package/dist/docs/modules/drs.md +92 -0
  49. package/dist/docs/modules/idv.md +106 -0
  50. package/dist/docs/modules/webauthn.md +197 -0
  51. package/dist/docs/modules.md +146 -0
  52. package/dist/drs.cjs +1 -0
  53. package/dist/drs.d.ts +241 -0
  54. package/dist/drs.js +1 -0
  55. package/dist/ido.cjs +1 -0
  56. package/dist/ido.d.ts +8 -0
  57. package/dist/ido.js +1 -0
  58. package/dist/idv.cjs +1 -0
  59. package/dist/idv.d.ts +68 -0
  60. package/dist/idv.js +1 -0
  61. package/dist/index.cjs +1 -0
  62. package/dist/index.esm.js +1 -0
  63. package/dist/index.umd.js +1 -0
  64. package/dist/ts-platform-websdk.js +1 -0
  65. package/dist/web-sdk-drs+idv+webauthn+ido.js +1 -0
  66. package/dist/web-sdk.d.ts +1737 -0
  67. package/dist/webauthn.cjs +1 -0
  68. package/dist/webauthn.d.ts +461 -0
  69. package/dist/webauthn.js +1 -0
  70. package/package.json +98 -0
  71. package/scripts/make-semver-aliases.sh +11 -0
  72. package/scripts/upload-dist.sh +6 -0
  73. package/src/mainExport.ts +75 -0
  74. package/src/tsconfig.json +14 -0
package/dist/idv.js ADDED
@@ -0,0 +1 @@
1
+ "undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));const e=Symbol("MODULE_INITIALIZED"),t=new Map;function i(e,i){var n,r;null===(n=t.get(e))||void 0===n||n.forEach((r=e=>e(i),function(){try{return r(...arguments)}catch(e){console.log(e)}}))}let n=null;function r(e){n=e}var a=Object.freeze({__proto__:null,getInitConfig:function(){return n},get initConfig(){return n},setInitConfig:r});function o(t){r(t),i(e,void 0)}var s=Object.freeze({__proto__:null,initialize:o});function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach((function(t){d(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function d(e,t,i){return(t=c(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function h(e,t){if(null==e)return{};var i,n,r=function(e,t){if(null==e)return{};var i,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function p(e,t){return Object.entries(t).reduce(((t,i)=>{let[n,r]=i;return u(u({},t),{},{[n]:g.isPrototypeOf(r)?new r(e.slug):"function"==typeof r?r.bind(e):"object"==typeof r&&!Array.isArray(r)&&r?p(e,r):r})}),{})}class g{constructor(e){this.slug=e}static create(e){return class extends g{constructor(t){super(t),Object.assign(this,p(this,e(this)))}}}}var f=Object.freeze({__proto__:null,Agent:g}),m=Object.freeze({__proto__:null,MODULE_INITIALIZED:e,emit:i,off:function(e,i){const n=t.get(e);if(!n)return;const r=n.indexOf(i);-1!==r&&n.splice(r,1)},on:function(e,i){var n;t.has(e)?null===(n=t.get(e))||void 0===n||n.push(i):t.set(e,[i])}});function _(e,t){const i=!e||"object"!=typeof e||Array.isArray(e)?{}:e;return[t.reduce(((e,t)=>{if(t in e){const i=e[t];if(null!==i&&"object"==typeof i&&!Array.isArray(i))return i}const i={};return e[t]=i,i}),i),i]}function x(e,t){let i=e;return t.every((e=>!(!i||"object"!=typeof i||Array.isArray(i)||!(e in i))&&(i=i[e],!0)),e)}const v="tsec",b="general";function y(e){return e?b:n.clientId}function w(e){return function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}((e?sessionStorage:localStorage).getItem(v))}function E(e,t){const i=e?sessionStorage:localStorage,n=t(w(e));i.setItem(v,JSON.stringify(n))}var k=Object.freeze({__proto__:null,COMMON_STORAGE_KEY:v,GENERAL_ID_KEY:b,getValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral),n=w(!!t.sessionOnly),[r]=_(n,[this.slug.toString(),i]);return r[e]},hasValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral),n=w(!!t.sessionOnly);return x(n,[this.slug.toString(),i,e])},removeValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral);E(!!t.sessionOnly,(t=>{const[n,r]=_(t,[this.slug.toString(),i]);return delete n[e],r}))},setValue:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=y(!!i.isGeneral);E(!!i.sessionOnly,(i=>{const[r,a]=_(i,[this.slug.toString(),n]);return r[e]=t,a}))}});const A="RSA-OAEP",C="RSA-PSS",D=async(e,t)=>await window.crypto.subtle.generateKey({name:e,modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!1,t),S=async()=>await D(A,["encrypt","decrypt"]),T=async()=>await D(C,["sign"]),I=async(e,t)=>await window.crypto.subtle.encrypt({name:A},t,e),M=async(e,t)=>{const i=(new TextEncoder).encode(t);return await window.crypto.subtle.sign({name:C,saltLength:32},e,i)};class B{constructor(e,t,i){this.slug=e,this.dbName=t,this.dbVersion=i}queryObjectStore(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.shimIndexedDB).open(`${this.slug}:${this.dbName}`,this.dbVersion||1);n.onupgradeneeded=()=>{var t;const i=n.result;(null===(t=null==i?void 0:i.objectStoreNames)||void 0===t?void 0:t.contains)&&!i.objectStoreNames.contains(e)&&i.createObjectStore(e,{keyPath:"key"})},n.onsuccess=()=>{const r=n.result,a=r.transaction(e,(null==i?void 0:i.operation)||"readwrite"),o=a.objectStore(e);t(o),a.oncomplete=()=>{r.close()}}}put(e,t,i){return new Promise(((n,r)=>{this.queryObjectStore(e,(e=>{const a=e.put({key:t,value:i});a.onsuccess=()=>{n(a.result)},a.onerror=e=>{r("Failed adding item to objectStore, err: "+e)}}))}))}get(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.get(t);r.onsuccess=()=>{var e;r.result?i(null===(e=r.result)||void 0===e?void 0:e.value):i(void 0)},r.onerror=e=>{n("Failed adding item to objectStore, err: "+e)}}))}))}getAll(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.getAll(null,t);r.onsuccess=()=>{if(r.result){const e=r.result;(null==e?void 0:e.length)?i(e.map((e=>null==e?void 0:e.value))):i(e)}else i([])},r.onerror=e=>{n("Failed getting items, err: "+e)}}))}))}delete(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.delete(t);r.onsuccess=()=>{i()},r.onerror=e=>{n(`Failed deleting key: '${t}' from objectStore, err: `+e)}}))}))}clear(e){return new Promise(((t,i)=>{this.queryObjectStore(e,(e=>{const n=e.clear();n.onsuccess=()=>{t()},n.onerror=e=>{i("Failed clearing objectStore, err: "+e)}}))}))}}const F="platform";class z{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sign",i=arguments.length>2?arguments[2]:void 0;var r,a,o,s;this.agent=e,this.keysType=t,this.options=i;const l=!(null===(r=this.options)||void 0===r?void 0:r.productScope);this.keysDatabaseName=l||!(null===(a=this.options)||void 0===a?void 0:a.indexedDBName)?"ts_crypto_binding":this.options.indexedDBName,this.dbVersion=l?1:(null===(o=this.options)||void 0===o?void 0:o.dbVersion)||1,this.keysStoreName=l||!(null===(s=this.options)||void 0===s?void 0:s.keysStoreName)?"identifiers_store":this.options.keysStoreName,this.indexedDBClient=new B(l?F:e.slug,this.keysDatabaseName,this.dbVersion),this.indexedDBClientFallback=new B((l?F:e.slug)+`:${n.clientId}`,this.keysDatabaseName,this.dbVersion)}getKeysRecordKey(){return`${this.keysType}_keys`}arrayBufferToBase64(e){return window.btoa(String.fromCharCode(...new Uint8Array(e)))}async getPKRepresentations(e){const t=await crypto.subtle.exportKey("spki",e);return{arrayBufferKey:t,base64Key:this.arrayBufferToBase64(t)}}async generateKeyPair(){return"sign"==this.keysType?await T():await S()}async calcKeyIdentifier(e){const t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}async extractKeysData(){const e=this.getKeysRecordKey();let t=await this.indexedDBClient.get(this.keysStoreName,e);if(!t){if(t=await this.indexedDBClientFallback.get(this.keysStoreName,e),!t){const e=await this.generateKeyPair(),{arrayBufferKey:i,base64Key:n}=await this.getPKRepresentations(e.publicKey);this.publicKeyBase64=n,this.keyIdentifier=await this.calcKeyIdentifier(i),t=u(u({},e),{},{keyIdentifier:this.keyIdentifier})}await this.indexedDBClient.put(this.keysStoreName,e,t)}if(!this.publicKeyBase64){const{base64Key:e}=await this.getPKRepresentations(t.publicKey);this.publicKeyBase64=e,this.keyIdentifier=t.keyIdentifier}return t}async getPublicData(){return this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData(),{publicKey:this.publicKeyBase64,keyIdentifier:this.keyIdentifier}}async sign(e){if("sign"==this.keysType){const{privateKey:t}=await this.extractKeysData(),i=await M(t,e);return this.arrayBufferToBase64(i)}throw new Error("keysType must be 'sign' in order to use sign keys")}async encrypt(e){if("encrypt"==this.keysType){const{privateKey:t}=await this.extractKeysData();return await I(e,t)}throw new Error("keysType must be 'encrypt' in order to use encryption keys")}async clearKeys(){const e=this.getKeysRecordKey();await this.indexedDBClient.delete(this.keysStoreName,e)}}var R=Object.freeze({__proto__:null,createCryptoBinding:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sign",t=arguments.length>1?arguments[1]:void 0;return new z(this,e,t)},decryptAssymetric:async(e,t)=>new Uint8Array(await window.crypto.subtle.decrypt({name:A},t,e)),encryptAssymetric:I,generateRSAKeyPair:S,generateRSASignKeyPair:T,signAssymetric:M,verifyAssymetric:async(e,t,i)=>{const n=(new TextEncoder).encode(t);return await window.crypto.subtle.verify(C,e,i,n)}}),O=Object.freeze({__proto__:null});const P=g.create((e=>{class t extends Error{constructor(t,i){super(`${e.slug}-${t} ${i}`)}}return{TsError:t,TsInternalError:class extends t{constructor(e){super(e,"Internal error")}}}}));var N=g.create((()=>u({exceptions:P},f)));class L{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.agent=e,this.middlewares=t,this.logs=[]}info(e,t){this.pushLog(3,e,t)}warn(e,t){this.pushLog(4,e,t)}error(e,t){this.pushLog(5,e,t)}pushLog(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.logs.push({timestamp:Date.now(),module:this.agent.slug,severity:e,fields:i,message:t});const n=this.middlewares.map((e=>e(this)));Promise.all(n).catch((()=>{}))}}var U=Object.freeze({__proto__:null,consoleMiddleware:function(e){const t=e.logs[e.logs.length-1];console.log(`${t.severity} ${t.message}`,t.fields)},createSdkLogger:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new L(this,e)}});function j(e,t){if(!(null==e?void 0:e.trim()))return"";if(function(e){try{return new URL(e),!0}catch(e){return!1}}(e))return e;const i="http://mock.com",n=new URL(i);n.search=(null==t?void 0:t.toString())||"",n.pathname=e;return n.href.replace(i,"")}const q={"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent};function $(e,t,i){var n;const r=(a=t||{},encodeURI(JSON.stringify(a)).split(/%..|./).length-1);var a;return{method:e,headers:u(u(u({},{"X-TS-body-size":String(r)}),q),i||{}),body:null!==(n=t&&JSON.stringify(t||{}))&&void 0!==n?n:void 0}}function V(e,t,i,n,r){const a=j(e,n),o=$(t,i,r);return fetch(a,o)}async function H(e,t,i,n,r){let a;if(a=await V(e,t,i,n,r),!a.ok)throw new Error("Request failed");return a}var G=Object.freeze({__proto__:null,httpDelete:async function(e,t){const i=await H(e,"DELETE",void 0,void 0,t);return u(u({data:await i.json()},i),{},{headers:i.headers})},httpGet:async function(e,t,i){const n=await H(e,"GET",void 0,t,i);return u(u({data:await n.json()},n),{},{headers:n.headers})},httpPost:async function(e,t,i,n){const r=await H(e,"POST",t,i,n);return u(u({data:await r.json()},r),{},{headers:r.headers})},httpPut:async function(e,t,i,n){const r=await H(e,"PUT",t,i,n);return u(u({data:await r.json()},r),{},{headers:r.headers})},init:$}),K=g.create((()=>({events:m,moduleMetadata:a,mainEntry:s,utils:N,storage:k,crypto:R,indexedDB:O,logger:U,http:G})));function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y,W,J,X,Q,ee,te,ie,ne,re,ae={},oe={},se={};function le(){if(Y)return se;Y=1;function e(e){let t=e.length;for(;--t>=0;)e[t]=0}const t=256,i=286,n=30,r=15,a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),l=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);e(u);const c=new Array(60);e(c);const d=new Array(512);e(d);const h=new Array(256);e(h);const p=new Array(29);e(p);const g=new Array(n);function f(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let m,_,x;function v(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}e(g);const b=e=>e<256?d[e]:d[256+(e>>>7)],y=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},w=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,y(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},E=(e,t,i)=>{w(e,i[2*t],i[2*t+1])},k=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},A=(e,t,i)=>{const n=new Array(16);let a,o,s=0;for(a=1;a<=r;a++)n[a]=s=s+i[a-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=k(n[t]++,t))}},C=e=>{let t;for(t=0;t<i;t++)e.dyn_ltree[2*t]=0;for(t=0;t<n;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},D=e=>{e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},S=(e,t,i,n)=>{const r=2*t,a=2*i;return e[r]<e[a]||e[r]===e[a]&&n[t]<=n[i]},T=(e,t,i)=>{const n=e.heap[i];let r=i<<1;for(;r<=e.heap_len&&(r<e.heap_len&&S(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!S(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n},I=(e,i,n)=>{let r,s,l,u,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],s=e.pending_buf[e.l_buf+c],c++,0===r?E(e,s,i):(l=h[s],E(e,l+t+1,i),u=a[l],0!==u&&(s-=p[l],w(e,s,u)),r--,l=b(r),E(e,l,n),u=o[l],0!==u&&(r-=g[l],w(e,r,u)))}while(c<e.last_lit);E(e,256,i)},M=(e,t)=>{const i=t.dyn_tree,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let s,l,u,c=-1;for(e.heap_len=0,e.heap_max=573,s=0;s<o;s++)0!==i[2*s]?(e.heap[++e.heap_len]=c=s,e.depth[s]=0):i[2*s+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=c<2?++c:0,i[2*u]=1,e.depth[u]=0,e.opt_len--,a&&(e.static_len-=n[2*u+1]);for(t.max_code=c,s=e.heap_len>>1;s>=1;s--)T(e,i,s);u=o;do{s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,i,1),l=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=l,i[2*u]=i[2*s]+i[2*l],e.depth[u]=(e.depth[s]>=e.depth[l]?e.depth[s]:e.depth[l])+1,i[2*s+1]=i[2*l+1]=u,e.heap[1]=u++,T(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,u=t.stat_desc.max_length;let c,d,h,p,g,f,m=0;for(p=0;p<=r;p++)e.bl_count[p]=0;for(i[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)d=e.heap[c],p=i[2*i[2*d+1]+1]+1,p>u&&(p=u,m++),i[2*d+1]=p,d>n||(e.bl_count[p]++,g=0,d>=l&&(g=s[d-l]),f=i[2*d],e.opt_len+=f*(p+g),o&&(e.static_len+=f*(a[2*d+1]+g)));if(0!==m){do{for(p=u-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(p=u;0!==p;p--)for(d=e.bl_count[p];0!==d;)h=e.heap[--c],h>n||(i[2*h+1]!==p&&(e.opt_len+=(p-i[2*h+1])*i[2*h],i[2*h+1]=p),d--)}})(e,t),A(i,c,e.bl_count)},B=(e,t,i)=>{let n,r,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)r=o,o=t[2*(n+1)+1],++s<l&&r===o||(s<u?e.bl_tree[2*r]+=s:0!==r?(r!==a&&e.bl_tree[2*r]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=r,0===o?(l=138,u=3):r===o?(l=6,u=3):(l=7,u=4))},F=(e,t,i)=>{let n,r,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),n=0;n<=i;n++)if(r=o,o=t[2*(n+1)+1],!(++s<l&&r===o)){if(s<u)do{E(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==a&&(E(e,r,e.bl_tree),s--),E(e,16,e.bl_tree),w(e,s-3,2)):s<=10?(E(e,17,e.bl_tree),w(e,s-3,3)):(E(e,18,e.bl_tree),w(e,s-11,7));s=0,a=r,0===o?(l=138,u=3):r===o?(l=6,u=3):(l=7,u=4)}};let z=!1;const R=(e,t,i,n)=>{w(e,0+(n?1:0),3),((e,t,i,n)=>{D(e),n&&(y(e,i),y(e,~i)),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i,!0)};return se._tr_init=e=>{z||((()=>{let e,t,l,v,b;const y=new Array(16);for(l=0,v=0;v<28;v++)for(p[v]=l,e=0;e<1<<a[v];e++)h[l++]=v;for(h[l-1]=v,b=0,v=0;v<16;v++)for(g[v]=b,e=0;e<1<<o[v];e++)d[b++]=v;for(b>>=7;v<n;v++)for(g[v]=b<<7,e=0;e<1<<o[v]-7;e++)d[256+b++]=v;for(t=0;t<=r;t++)y[t]=0;for(e=0;e<=143;)u[2*e+1]=8,e++,y[8]++;for(;e<=255;)u[2*e+1]=9,e++,y[9]++;for(;e<=279;)u[2*e+1]=7,e++,y[7]++;for(;e<=287;)u[2*e+1]=8,e++,y[8]++;for(A(u,287,y),e=0;e<n;e++)c[2*e+1]=5,c[2*e]=k(e,5);m=new f(u,a,257,i,r),_=new f(c,o,0,n,r),x=new f(new Array(0),s,0,19,7)})(),z=!0),e.l_desc=new v(e.dyn_ltree,m),e.d_desc=new v(e.dyn_dtree,_),e.bl_desc=new v(e.bl_tree,x),e.bi_buf=0,e.bi_valid=0,C(e)},se._tr_stored_block=R,se._tr_flush_block=(e,i,n,r)=>{let a,o,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let i,n=4093624447;for(i=0;i<=31;i++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*i])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(i=32;i<t;i++)if(0!==e.dyn_ltree[2*i])return 1;return 0})(e)),M(e,e.l_desc),M(e,e.d_desc),s=(e=>{let t;for(B(e,e.dyn_ltree,e.l_desc.max_code),B(e,e.dyn_dtree,e.d_desc.max_code),M(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==i?R(e,i,n,r):4===e.strategy||o===a?(w(e,2+(r?1:0),3),I(e,u,c)):(w(e,4+(r?1:0),3),((e,t,i,n)=>{let r;for(w(e,t-257,5),w(e,i-1,5),w(e,n-4,4),r=0;r<n;r++)w(e,e.bl_tree[2*l[r]+1],3);F(e,e.dyn_ltree,t-1),F(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),I(e,e.dyn_ltree,e.dyn_dtree)),C(e),r&&D(e)},se._tr_tally=(e,i,n)=>(e.pending_buf[e.d_buf+2*e.last_lit]=i>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&i,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===i?e.dyn_ltree[2*n]++:(e.matches++,i--,e.dyn_ltree[2*(h[n]+t+1)]++,e.dyn_dtree[2*b(i)]++),e.last_lit===e.lit_bufsize-1),se._tr_align=e=>{w(e,2,3),E(e,256,u),(e=>{16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)},se}function ue(){return te?ee:(te=1,ee={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"})}function ce(){return ne?ie:(ne=1,ie={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8})}function de(){if(re)return oe;re=1;const{_tr_init:e,_tr_stored_block:t,_tr_flush_block:i,_tr_tally:n,_tr_align:r}=le(),a=(J||(J=1,W=(e,t,i,n)=>{let r=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{r=r+t[n++]|0,a=a+r|0}while(--o);r%=65521,a%=65521}return r|a<<16|0}),W),o=function(){if(Q)return X;Q=1;const e=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());return X=(t,i,n,r)=>{const a=e,o=r+n;t^=-1;for(let e=r;e<o;e++)t=t>>>8^a[255&(t^i[e])];return-1^t},X}(),s=ue(),{Z_NO_FLUSH:l,Z_PARTIAL_FLUSH:u,Z_FULL_FLUSH:c,Z_FINISH:d,Z_BLOCK:h,Z_OK:p,Z_STREAM_END:g,Z_STREAM_ERROR:f,Z_DATA_ERROR:m,Z_BUF_ERROR:_,Z_DEFAULT_COMPRESSION:x,Z_FILTERED:v,Z_HUFFMAN_ONLY:b,Z_RLE:y,Z_FIXED:w,Z_DEFAULT_STRATEGY:E,Z_UNKNOWN:k,Z_DEFLATED:A}=ce(),C=258,D=262,S=103,T=113,I=666,M=(e,t)=>(e.msg=s[t],t),B=e=>(e<<1)-(e>4?9:0),F=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let z=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const R=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},O=(e,t)=>{i(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,R(e.strm)},P=(e,t)=>{e.pending_buf[e.pending++]=t},N=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},L=(e,t,i,n)=>{let r=e.avail_in;return r>n&&(r=n),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),i),1===e.state.wrap?e.adler=a(e.adler,t,r,i):2===e.state.wrap&&(e.adler=o(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)},U=(e,t)=>{let i,n,r=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-D?e.strstart-(e.w_size-D):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+C;let p=u[a+o-1],g=u[a+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,u[i+o]===g&&u[i+o-1]===p&&u[i]===u[a]&&u[++i]===u[a+1]){a+=2,i++;do{}while(u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&a<h);if(n=C-(h-a),a=h-C,n>o){if(e.match_start=t,o=n,n>=s)break;p=u[a+o-1],g=u[a+o]}}}while((t=d[t&c])>l&&0!=--r);return o<=e.lookahead?o:e.lookahead},j=e=>{const t=e.w_size;let i,n,r,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-D)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,i=n;do{r=e.head[--i],e.head[i]=r>=t?r-t:0}while(--n);n=t,i=n;do{r=e.prev[--i],e.prev[i]=r>=t?r-t:0}while(--n);a+=t}if(0===e.strm.avail_in)break;if(n=L(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=z(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=z(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<D&&0!==e.strm.avail_in)},q=(e,t)=>{let i,r;for(;;){if(e.lookahead<D){if(j(e),e.lookahead<D&&t===l)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=z(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-D&&(e.match_length=U(e,i)),e.match_length>=3)if(r=n(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=z(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=z(e,e.ins_h,e.window[e.strstart+1]);else r=n(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(O(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===d?(O(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?1:2},$=(e,t)=>{let i,r,a;for(;;){if(e.lookahead<D){if(j(e),e.lookahead<D&&t===l)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=z(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-D&&(e.match_length=U(e,i),e.match_length<=5&&(e.strategy===v||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=n(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=z(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(O(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=n(e,0,e.window[e.strstart-1]),r&&O(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=n(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===d?(O(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?1:2};function V(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}const H=[new V(0,0,0,0,((e,t)=>{let i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+i;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,O(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-D&&(O(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===d?(O(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(O(e,!1),e.strm.avail_out),1)})),new V(4,4,8,4,q),new V(4,5,16,8,q),new V(4,6,32,32,q),new V(4,4,16,16,$),new V(8,16,32,32,$),new V(8,16,128,128,$),new V(8,32,128,256,$),new V(32,128,258,1024,$),new V(32,258,258,4096,$)];function G(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=A,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),F(this.dyn_ltree),F(this.dyn_dtree),F(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),F(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),F(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const K=t=>{if(!t||!t.state)return M(t,f);t.total_in=t.total_out=0,t.data_type=k;const i=t.state;return i.pending=0,i.pending_out=0,i.wrap<0&&(i.wrap=-i.wrap),i.status=i.wrap?42:T,t.adler=2===i.wrap?0:1,i.last_flush=l,e(i),p},Z=e=>{const t=K(e);return t===p&&(e=>{e.window_size=2*e.w_size,F(e.head),e.max_lazy_match=H[e.level].max_lazy,e.good_match=H[e.level].good_length,e.nice_match=H[e.level].nice_length,e.max_chain_length=H[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},Y=(e,t,i,n,r,a)=>{if(!e)return f;let o=1;if(t===x&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>9||i!==A||n<8||n>15||t<0||t>9||a<0||a>w)return M(e,f);8===n&&(n=9);const s=new G;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<r+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=i,Z(e)};return oe.deflateInit=(e,t)=>Y(e,t,A,15,8,E),oe.deflateInit2=Y,oe.deflateReset=Z,oe.deflateResetKeep=K,oe.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?f:(e.state.gzhead=t,p):f,oe.deflate=(e,i)=>{let a,s;if(!e||!e.state||i>h||i<0)return e?M(e,f):f;const m=e.state;if(!e.output||!e.input&&0!==e.avail_in||m.status===I&&i!==d)return M(e,0===e.avail_out?_:f);m.strm=e;const x=m.last_flush;if(m.last_flush=i,42===m.status)if(2===m.wrap)e.adler=0,P(m,31),P(m,139),P(m,8),m.gzhead?(P(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),P(m,255&m.gzhead.time),P(m,m.gzhead.time>>8&255),P(m,m.gzhead.time>>16&255),P(m,m.gzhead.time>>24&255),P(m,9===m.level?2:m.strategy>=b||m.level<2?4:0),P(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(P(m,255&m.gzhead.extra.length),P(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(e.adler=o(e.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(P(m,0),P(m,0),P(m,0),P(m,0),P(m,0),P(m,9===m.level?2:m.strategy>=b||m.level<2?4:0),P(m,3),m.status=T);else{let t=A+(m.w_bits-8<<4)<<8,i=-1;i=m.strategy>=b||m.level<2?0:m.level<6?1:6===m.level?2:3,t|=i<<6,0!==m.strstart&&(t|=32),t+=31-t%31,m.status=T,N(m,t),0!==m.strstart&&(N(m,e.adler>>>16),N(m,65535&e.adler)),e.adler=1}if(69===m.status)if(m.gzhead.extra){for(a=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),R(e),a=m.pending,m.pending!==m.pending_buf_size));)P(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){a=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),R(e),a=m.pending,m.pending===m.pending_buf_size)){s=1;break}s=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0,P(m,s)}while(0!==s);m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),0===s&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){a=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),R(e),a=m.pending,m.pending===m.pending_buf_size)){s=1;break}s=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0,P(m,s)}while(0!==s);m.gzhead.hcrc&&m.pending>a&&(e.adler=o(e.adler,m.pending_buf,m.pending-a,a)),0===s&&(m.status=S)}else m.status=S;if(m.status===S&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&R(e),m.pending+2<=m.pending_buf_size&&(P(m,255&e.adler),P(m,e.adler>>8&255),e.adler=0,m.status=T)):m.status=T),0!==m.pending){if(R(e),0===e.avail_out)return m.last_flush=-1,p}else if(0===e.avail_in&&B(i)<=B(x)&&i!==d)return M(e,_);if(m.status===I&&0!==e.avail_in)return M(e,_);if(0!==e.avail_in||0!==m.lookahead||i!==l&&m.status!==I){let a=m.strategy===b?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return 1;break}if(e.match_length=0,i=n(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(O(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===d?(O(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?1:2})(m,i):m.strategy===y?((e,t)=>{let i,r,a,o;const s=e.window;for(;;){if(e.lookahead<=C){if(j(e),e.lookahead<=C&&t===l)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,r=s[a],r===s[++a]&&r===s[++a]&&r===s[++a])){o=e.strstart+C;do{}while(r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&a<o);e.match_length=C-(o-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=n(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=n(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(O(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===d?(O(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?1:2})(m,i):H[m.level].func(m,i);if(3!==a&&4!==a||(m.status=I),1===a||3===a)return 0===e.avail_out&&(m.last_flush=-1),p;if(2===a&&(i===u?r(m):i!==h&&(t(m,0,0,!1),i===c&&(F(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),R(e),0===e.avail_out))return m.last_flush=-1,p}return i!==d?p:m.wrap<=0?g:(2===m.wrap?(P(m,255&e.adler),P(m,e.adler>>8&255),P(m,e.adler>>16&255),P(m,e.adler>>24&255),P(m,255&e.total_in),P(m,e.total_in>>8&255),P(m,e.total_in>>16&255),P(m,e.total_in>>24&255)):(N(m,e.adler>>>16),N(m,65535&e.adler)),R(e),m.wrap>0&&(m.wrap=-m.wrap),0!==m.pending?p:g)},oe.deflateEnd=e=>{if(!e||!e.state)return f;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==S&&t!==T&&t!==I?M(e,f):(e.state=null,t===T?M(e,m):p)},oe.deflateSetDictionary=(e,t)=>{let i=t.length;if(!e||!e.state)return f;const n=e.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return f;if(1===r&&(e.adler=a(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===r&&(F(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.w_size}const o=e.avail_in,s=e.next_in,l=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,j(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=z(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,j(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=s,e.input=l,e.avail_in=o,n.wrap=r,p},oe.deflateInfo="pako deflate (from Nodeca project)",oe}var he,pe={};var ge,fe,me,_e,xe={};function ve(){if(ge)return xe;ge=1;let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){e=!1}const t=new Uint8Array(256);for(let e=0;e<256;e++)t[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;t[254]=t[254]=1,xe.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,r,a,o=e.length,s=0;for(r=0;r<o;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),a=0,r=0;a<s;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t};return xe.buf2string=(i,n)=>{const r=n||i.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(i.subarray(0,n));let a,o;const s=new Array(2*r);for(o=0,a=0;a<r;){let e=i[a++];if(e<128){s[o++]=e;continue}let n=t[e];if(n>4)s[o++]=65533,a+=n-1;else{for(e&=2===n?31:3===n?15:7;n>1&&a<r;)e=e<<6|63&i[a++],n--;n>1?s[o++]=65533:e<65536?s[o++]=e:(e-=65536,s[o++]=55296|e>>10&1023,s[o++]=56320|1023&e)}}return((t,i)=>{if(i<65534&&t.subarray&&e)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let n="";for(let e=0;e<i;e++)n+=String.fromCharCode(t[e]);return n})(s,o)},xe.utf8border=(e,i)=>{(i=i||e.length)>e.length&&(i=e.length);let n=i-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?i:n+t[e[n]]>i?n:i},xe}var be=function(){if(_e)return ae;_e=1;const e=de(),t=function(){if(he)return pe;he=1;const e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);return pe.assign=function(t){const i=Array.prototype.slice.call(arguments,1);for(;i.length;){const n=i.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const i in n)e(n,i)&&(t[i]=n[i])}}return t},pe.flattenChunks=e=>{let t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,n=0,r=e.length;t<r;t++){let r=e[t];i.set(r,n),n+=r.length}return i},pe}(),i=ve(),n=ue(),r=me?fe:(me=1,fe=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}),a=Object.prototype.toString,{Z_NO_FLUSH:o,Z_SYNC_FLUSH:s,Z_FULL_FLUSH:l,Z_FINISH:u,Z_OK:c,Z_STREAM_END:d,Z_DEFAULT_COMPRESSION:h,Z_DEFAULT_STRATEGY:p,Z_DEFLATED:g}=ce();function f(o){this.options=t.assign({level:h,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:p},o||{});let s=this.options;s.raw&&s.windowBits>0?s.windowBits=-s.windowBits:s.gzip&&s.windowBits>0&&s.windowBits<16&&(s.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;let l=e.deflateInit2(this.strm,s.level,s.method,s.windowBits,s.memLevel,s.strategy);if(l!==c)throw new Error(n[l]);if(s.header&&e.deflateSetHeader(this.strm,s.header),s.dictionary){let t;if(t="string"==typeof s.dictionary?i.string2buf(s.dictionary):"[object ArrayBuffer]"===a.call(s.dictionary)?new Uint8Array(s.dictionary):s.dictionary,l=e.deflateSetDictionary(this.strm,t),l!==c)throw new Error(n[l]);this._dict_set=!0}}function m(e,t){const i=new f(t);if(i.push(e,!0),i.err)throw i.msg||n[i.err];return i.result}return f.prototype.push=function(t,n){const r=this.strm,h=this.options.chunkSize;let p,g;if(this.ended)return!1;for(g=n===~~n?n:!0===n?u:o,"string"==typeof t?r.input=i.string2buf(t):"[object ArrayBuffer]"===a.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(h),r.next_out=0,r.avail_out=h),(g===s||g===l)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(p=e.deflate(r,g),p===d)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),p=e.deflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===c;if(0!==r.avail_out){if(g>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===c&&(this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},ae.Deflate=f,ae.deflate=m,ae.deflateRaw=function(e,t){return(t=t||{}).raw=!0,m(e,t)},ae.gzip=function(e,t){return(t=t||{}).gzip=!0,m(e,t)},ae.constants=ce(),ae}();const ye=["enabled","userId"];var we,Ee,ke=["drs"];we=ke,Ee=143,function(e){for(;--e;)we.push(we.shift())}(++Ee);var Ae,Ce,De,Se=new K((Ae="0x0",ke[Ae-=0])),Te=["removeItemSessionStorageSafe","getItemLocalStorageSafe","setItemLocalStorageSafe","localStorage","removeItem","FALLBACK_SESSION_STORAGE","FALLBACK_LOCAL_STORAGE","clientId","getClientId","setClientId","getFullStorageKey","getItemSessionStorageSafe","sessionStorage","setItem"];Ce=Te,De=215,function(e){for(;--e;)Ce.push(Ce.shift())}(++De);var Ie=function(e,t){return Te[e-=0]};class Me{constructor(e){this[Ie("0x0")]={},this[Ie("0x1")]={},this[Ie("0x2")]=e}[Ie("0x3")](){return this[Ie("0x2")]}[Ie("0x4")](e){this[Ie("0x2")]=e}[Ie("0x5")](e){return this[Ie("0x2")]+"_"+e}[Ie("0x6")](e){const t=this[Ie("0x5")](e);try{return window[Ie("0x7")].getItem(t)}catch(e){return this[Ie("0x0")][t]}}setItemSessionStorageSafe(e,t){const i=this.getFullStorageKey(e);try{window[Ie("0x7")][Ie("0x8")](i,t)}catch(e){this[Ie("0x0")][i]=t}}[Ie("0x9")](e){const t=this.getFullStorageKey(e);try{window[Ie("0x7")].removeItem(t)}catch(e){this[Ie("0x0")][t]=void 0}}[Ie("0xa")](e){const t=this[Ie("0x5")](e);try{return window.localStorage.getItem(t)}catch(e){return this[Ie("0x1")][t]}}[Ie("0xb")](e,t){const i=this[Ie("0x5")](e);try{window[Ie("0xc")][Ie("0x8")](i,t)}catch(e){this[Ie("0x1")][i]=t}}removeItemLocalStorageSafe(e){const t=this[Ie("0x5")](e);try{window[Ie("0xc")][Ie("0xd")](t)}catch(e){this[Ie("0x1")][t]=void 0}}}var Be,Fe,ze=["enabled","[AccountProtection SDK]","logsLimit","logs","middlewares","info","pushLog","warn","error","log","%s %s %s","logPrefix","stringify","push","now","formatter","unshift","map","all","catch"];Be=ze,Fe=100,function(e){for(;--e;)Be.push(Be.shift())}(++Fe);var Re=function(e,t){return ze[e-=0]};class Oe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[Re("0x0")]=e,this.logPrefix=Re("0x1"),this[Re("0x2")]=1e4,this[Re("0x3")]=[],this[Re("0x4")]=[]}[Re("0x5")](e,t){this[Re("0x6")](3,e,t)}[Re("0x7")](e,t){this.pushLog(4,e,t)}[Re("0x8")](e,t){this[Re("0x6")](5,e,t)}flush(){const e=this[Re("0x3")];return this[Re("0x3")]=[],e}pushLog(e,t,i){this.enabled&&console[Re("0x9")](Re("0xa"),this[Re("0xb")],t,JSON[Re("0xc")](i)),this[Re("0x3")][Re("0xd")]({timestamp:Date[Re("0xe")](),severity:e,text:JSON[Re("0xc")](u(u({},i),{},{message:t}),this[Re("0xf")])}),this[Re("0x3")].length>this.logsLimit&&this.logs[Re("0x10")]();const n=this.middlewares[Re("0x11")]((e=>e()));Promise[Re("0x12")](n)[Re("0x13")]((()=>{}))}formatter(e,t){if(t instanceof Error){const{name:e,stack:i,message:n}=t;return{name:e,stack:i,message:n}}return t}}const Pe=new Oe;var Ne,Le,Ue=["ric","requestsManager","loadConf","fetchConf","getData","error","storageManager","getItemLocalStorageSafe","parse","error loading config","shouldUpdateConf","getConfValue","now","refreshConf","length","setItemLocalStorageSafe","stringify","conf","timestamp"];Ne=Ue,Le=417,function(e){for(;--e;)Ne.push(Ne.shift())}(++Le);var je=function(e,t){return Ue[e-=0]};const qe=je("0x0"),$e=je("0x1");class Ve{constructor(e,t){this.storageManager=e,this[je("0x2")]=t,this.conf=this[je("0x3")]()}async[je("0x4")](e){try{const t="device/conf?tenantId="+e,i=await this[je("0x2")][je("0x5")](t);return null!=i?i:{}}catch(t){return Pe[je("0x6")]("error fetching config",{clientId:e,error:t}),{}}}[je("0x3")](){const e=this[je("0x7")][je("0x8")]($e);if(null!=e)try{return JSON[je("0x9")](e)}catch(e){Pe[je("0x6")](je("0xa"),{error:e})}return{}}[je("0xb")](){const e=this[je("0xc")](qe,0);return Date[je("0xd")]()-e>36e5}async[je("0xe")](e){if(!this.shouldUpdateConf())return!1;let t=await this.fetchConf(e);return 0==Object.keys(t)[je("0xf")]?t=this[je("0x3")]():this[je("0x7")][je("0x10")]($e,JSON[je("0x11")](t)),this[je("0x12")]=t,!0}getConfValue(e,t){const i=void 0!==this[je("0x12")]?this.conf[e]:void 0;return null!=i?i:t}}var He,Ge,Ke=["EVENT_TYPE_IDENTIFICATION","identification","EVENT_TYPE_ACTION","EVENT_TYPE_DEVICE","device","EVENT_TYPE_INTERACTION"];He=Ke,Ge=116,function(e){for(;--e;)He.push(He.shift())}(++Ge);var Ze,Ye,We=function(e,t){return Ke[e-=0]};(Ye=Ze||(Ze={}))[We("0x0")]="action",Ye[We("0x1")]=We("0x2"),Ye[We("0x3")]="interaction",Ye[We("0x4")]=We("0x5");var Je,Xe,Qe=["length","push","maintainLastXItems"];Je=Qe,Xe=332,function(e){for(;--e;)Je.push(Je.shift())}(++Xe);var et=function(e,t){return Qe[e-=0]};class tt{static[et("0x0")](e,t,i){return e[et("0x1")]>=t&&e.splice(0,1),e[et("0x2")](i),e}}var it,nt,rt=["bufferSize","isTrusted","cancelable","composed","view","shiftKey","metaKey","location","inputType","data","buffer","collect","extractEventData","maintainLastXItems","getData","extractButtonsPressedData","ctrlKey","buttons","now","detail","offsetY","sourceCapabilities","firesTouchEvents","target"];it=rt,nt=273,function(e){for(;--e;)it.push(it.shift())}(++nt);var at=function(e,t){return rt[e-=0]};class ot{constructor(e){this[at("0x0")]=[],this[at("0x1")]=e}[at("0x2")](e){const t=this[at("0x3")](e);tt[at("0x4")](this[at("0x0")],this.buffer,t)}[at("0x5")](){return this.data}extractEventData(e){return u({x:e.x,y:e.y,tspl:Date.now()},this[at("0x6")](e))}extractButtonsPressedData(e){return u(u(u(u({},e[at("0x7")]&&{ctrlKey:!0}),e.altKey&&{altKey:!0}),e.shiftKey&&{shiftKey:!0}),0!=e[at("0x8")]&&{buttons:e[at("0x8")]})}}class st{constructor(e){this.data=[],this[at("0x1")]=e}collect(e){var t;const i={x:e.x,y:e.y,timestamp:Date[at("0x9")](),mouseButtonType:e[at("0xa")],offsetX:e.offsetX,offsetY:e[at("0xb")],isPressed:null==(null===(t=e[at("0xc")])||void 0===t?void 0:t[at("0xd")])?null:!e.sourceCapabilities[at("0xd")],target_id:e[at("0xe")].id};tt[at("0x4")](this.data,this.buffer,i)}[at("0x5")](){const e=[...this[at("0x0")]];return this[at("0x0")]=[],e}}class lt{constructor(e){this[at("0x0")]=[],this[at("0xf")]=e}[at("0x2")](e){var t;const i={isTrusted:e[at("0x10")],cancelable:e[at("0x11")],composed:e[at("0x12")],isView:!!e[at("0x13")],shiftKey:e[at("0x14")],metaKey:e[at("0x15")],firesTouchEvents:null===(t=e[at("0xc")])||void 0===t?void 0:t[at("0xd")],timestamp:Date[at("0x9")]()};tt[at("0x4")](this[at("0x0")],this[at("0xf")],i)}[at("0x5")](){const e=[...this[at("0x0")]];return this[at("0x0")]=[],e}}class ut{constructor(e){this[at("0x0")]=[],this[at("0xf")]=e}[at("0x2")](e){var t;const i={isTrusted:e[at("0x10")],cancelable:e[at("0x11")],composed:e[at("0x12")],isView:!!e[at("0x13")],location:e[at("0x16")],shiftKey:e.shiftKey,firesTouchEvents:null===(t=e[at("0xc")])||void 0===t?void 0:t.firesTouchEvents,timestamp:Date[at("0x9")]()};tt[at("0x4")](this[at("0x0")],this[at("0xf")],i)}getData(){const e=this[at("0x0")];return this[at("0x0")]=[],e}}class ct{constructor(e){this[at("0x0")]=[],this[at("0xf")]=e}[at("0x2")](e){const t={isTrusted:e[at("0x10")],cancelable:e[at("0x11")],composed:e[at("0x12")],inputType:e[at("0x17")],isView:!!e[at("0x13")],timestamp:Date.now()};tt[at("0x4")](this.data,this[at("0xf")],t)}getData(){const e=this[at("0x0")];return this[at("0x0")]=[],e}}class dt{constructor(e){this[at("0x0")]=[],this.bufferSize=e}[at("0x2")](e){const t={isTrusted:e[at("0x10")],cancelable:e[at("0x11")],composed:e[at("0x12")],timestamp:Date[at("0x9")]()};tt[at("0x4")](this[at("0x0")],this[at("0xf")],t)}getData(){const e=this[at("0x0")];return this[at("0x0")]=[],e}}var ht,pt,gt=["keyup","keydown","input","focusout","INPUT","SELECT","TEXTAREA","deviceEventDataCollectionIgnoreList","mouseEventsCollectionBuffer","detail","sourceCapabilities","offsetX","target","cancelable","dropEffect","inputTypeFilter","virtualKeyboard","includes","registerEventListeners","entries","interactionEventsCollectorsData","addSafeInteractionListener","error","Error while adding listener","filter","forEach","getGenericAttributes","getAttachedData","addEventListener","handleEvent","eventTypesToAttach","getData","location","href","change","click","paste","mousemove","mouseup","mousedown","submit"];ht=gt,pt=321,function(e){for(;--e;)ht.push(ht.shift())}(++pt);var ft=function(e,t){return gt[e-=0]};const mt=ft("0x0"),_t=ft("0x1"),xt=ft("0x2"),vt=ft("0x3"),bt=ft("0x4"),yt=ft("0x5"),wt=ft("0x6"),Et=ft("0x7"),kt=ft("0x8"),At=ft("0x9"),Ct=ft("0xa"),Dt=[ft("0xb"),ft("0xc"),ft("0xd")];class St{constructor(e,t,i){this[ft("0xe")]=e,this[ft("0xf")]=t,this.safeEventCallback=i,this.interactionEventsCollectorsData={[_t]:{eventTypesToAttach:[vt,bt,yt],attributesMapper:e=>{var t;return{x:e.x,y:e.y,mouseButtonType:e[ft("0x10")],isPressed:null==(null===(t=e[ft("0x11")])||void 0===t?void 0:t.firesTouchEvents)?null:!e[ft("0x11")].firesTouchEvents,offsetX:e[ft("0x12")],offsetY:e.offsetY,target_id:e[ft("0x13")].id}}},[xt]:{attributesMapper:e=>({target_id:e[ft("0x13")].id,isTrusted:e.isTrusted,cancelable:e[ft("0x14")],composed:e.composed,dropEffect:e.clipboardData[ft("0x15")],effectAllowed:e.clipboardData.effectAllowed})},[wt]:{attributesMapper:e=>({target_id:e[ft("0x13")].id})},[vt]:{continousCollectors:[new ot(this[ft("0xf")])]},[bt]:{continousCollectors:[new st(1)]},[yt]:{continousCollectors:[new st(1)]},[Ct]:{eventTypesToAttach:[At,Et,kt,mt],filter:this[ft("0x16")],attributesMapper:e=>{const{target:t,isTrusted:i,cancelable:n,composed:r}=e;return u({target_id:t.id,dataset_keys:Object.keys(t.dataset||{}),isTrusted:i,cancelable:n,composed:r},navigator[ft("0x17")]&&{navigator_virtualKeyboard:navigator[ft("0x17")].overlaysContent})}},[At]:{filter:this.inputTypeFilter,continousCollectors:[new ct(50)]},[Et]:{filter:this.inputTypeFilter,continousCollectors:[new ut(50)]},[kt]:{filter:this[ft("0x16")],continousCollectors:[new lt(50)]},[mt]:{continousCollectors:[new dt(50)]}}}[ft("0x16")](e){var t;const i=null===(t=e[ft("0x13")])||void 0===t?void 0:t.tagName;return Dt[ft("0x18")](i)}[ft("0x19")](){for(const[e,t]of Object[ft("0x1a")](this[ft("0x1b")]))if(!this[ft("0xe")][ft("0x18")](e))try{this[ft("0x1c")](e,t)}catch(t){Pe[ft("0x1d")](ft("0x1e"),{error:t,eventType:e})}}[ft("0x1f")](e,t){return!e[ft("0x1f")]||e[ft("0x1f")](t)}async handleEvent(e,t,i){const{attributesMapper:n,continousCollectors:r}=e;if(!this[ft("0x1f")](e,t))return!1;if(r)r[ft("0x20")]((e=>{e.collect(t)}));else{const e=this[ft("0x21")](),r=this[ft("0x22")](i),a=u(u(u({},e),n(t)),r&&{attachedEventsData:r});await this.safeEventCallback(i,a)}return!0}[ft("0x1c")](e,t){window[ft("0x23")](e,(async i=>{try{await this[ft("0x24")](t,i,e)}catch(e){Pe[ft("0x1d")]("error adding interaction listener",{error:e})}}))}[ft("0x22")](e){let t;const i=this[ft("0x1b")][e][ft("0x25")];return i&&(t={},i[ft("0x20")]((e=>{const{continousCollectors:i}=this[ft("0x1b")][e];i&&i.forEach((i=>t[e]=i[ft("0x26")]()))}))),t}getGenericAttributes(){return{location:window[ft("0x27")][ft("0x28")]}}}var Tt,It,Mt=["executor reached timeout","name","getHighEntropyValues","architecture","model","platform","fullVersionList","bitness","mobile","wow64","uaFullVersion","resolve","catch","setTimeout","race"];Tt=Mt,It=167,function(e){for(;--e;)Tt.push(Tt.shift())}(++It);var Bt=function(e,t){return Mt[e-=0]};function Ft(){var e;return null===(e=navigator.userAgentData)||void 0===e?void 0:e[Bt("0x0")]([Bt("0x1"),Bt("0x2"),Bt("0x3"),"platformVersion",Bt("0x4"),Bt("0x5"),Bt("0x6"),Bt("0x7"),Bt("0x8")])}function zt(e,t){let i;const n=[Promise[Bt("0x9")](e())[Bt("0xa")]((()=>{})),new Promise(((e,n)=>i=window[Bt("0xb")](n,t)))];return Promise[Bt("0xc")](n)[Bt("0xa")]((()=>Pe.warn(Bt("0xd"),{fnName:e[Bt("0xe")]}))).finally((()=>clearTimeout(i)))}var Rt,Ot,Pt=["absolute","left","fontSize","10px","textContent","some","offsetWidth","offsetHeight","body","removeChild","language","deviceMemory","__webdriver_script_func","DateTimeFormat","timeZone","vendor","buildID","textBaseline","alphabetic","#f60","font","Cwm fjordbank gly ","fromCharCode","fillText","fillStyle","rgba(102, 204, 0, 0.2)","18pt Arial","toDataURL","multiply","#f2f","#2ff","#ff2","beginPath","arc","closePath","fill","#f9c","evenodd","rect","isPointInPath","canvas","getContext","charging","chargingTime","dischargingTime","level","getBrave","brave","isBrave","webgl-experimental","getExtension","getParameter","UNMASKED_RENDERER_WEBGL","video","canPlayType",'video/mp4; codecs="avc1.42E01E"',"video/mp4;;Codecs =avc1.42E01E","getCryptoBindingData","cryptoBinding","getPublicData","isMobile","userAgent","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","abs","storageManager","configManager","calculate","getConfValue","dataPointsExtractor","lastDeviceData","setItemLocalStorageSafe","getItemLocalStorageSafe","now","dataPoints","getBattery","getCanvasFingerprint","getCodesTests","getConnection","getDeviceMemory","getDocumentBasedKeys","getHardwareConcurrency","getFIDOEnabled","getLanguages","getLanguage","getTimezoneOffset","getNavigatorBasedKeys","getNavigatorProduct","getNavigatorUAData","getNavigatorHighEntropyData","navigatorStorageEstimation","navigatorIsUserActive","getMathFingerprint","getMediaMatch","getOpenDatabase","getWindowOrientation","getCpuClass","getOsCpu","getAddBehavior","getProductSub","getMediaDevices","getAudioFingerprint","getAudioFingerprintExtended","getFonts","getPerformanceTiming","getPerformanceMemory","getScreen","hasSequentum","getReferrer","getTimezone","getTouchSupport","getVendor","getBuildID","getWebGlRenderer","getWindowOuter","webRTCDisabled","bind","getNavigatorPermissionsState","notifications","geolocation","isGeoLocationExists","isSendBeaconFunction","getNavigatorPrototype","getInstalledRelatedApps","CDPRuntimeDomainTest","Error","Object","defineProperty","stack","console","getOwnPropertyNames","document","$chrome_asyncScriptInfo","test","values","getOwnPropertyDescriptors","value","cache_","getPrototypeOf","storeItem","sort","Array","Promise","Symbol","name","token","getAsyncToken","collectPromisesData","startPromisesLoop","entries","includes","worker throw error","warn","worker promise rejected","getCookieEnabled","cookieEnabled","resolve","credentials","isUserVerifyingPlatformAuthenticatorAvailable","getCryptoRandomValues","crypto","getRandomValues","from","getWindowBasedKeys","chrome","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","ucweb","UCShellJava","puffinDevice","_phantom","__phantomas","callPhantom","Buffer","emit","spawn","domAutomationController","domAutomation","__nightmare","_selenium","calledSelenium","callSelenium","_Selenium_IDE_Recorder","__$webdriverAsyncExecutor","__fxdriver_evaluate","__lastWatirAlert","__lastWatirConfirm","__webdriver__chr","__webdriver_evaluate","__webdriver_script_function","__webdriver_unwrapped","__webdriverFuncgeb","calledPhantom","cdc_adoQpoasnfa76pfcZLmcfl_Array","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","fmget_targets","geb","OSMJIF","spynner_additional_js_loaded","watinExpressionError","watinExpressionResult","push","high","standard","reduce","no-preference","low","more","less","100","active","none","replace","matchMedia","matches","sqrt","log","exp","acos","acosh","asin","asinh","atanh","atan","sin","sinh","cos","cosh","tanh","expm1","hashCodeString","getSessionStorage","sessionStorage","getLocalStorage","localStorage","toString","indexOf","Sequentum","webdriver","__driver_evaluate","__selenium_evaluate","__driver_unwrapped","__selenium_unwrapped","__fxdriver_unwrapped","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","driver-evaluate","selenium-evaluate","webdriver-evaluate-response","__webdriverFunc","__webdriver_script_fn","__lastWatirPrompt","$cdc_asdjflasutopfhvcZLmcfl_","serviceWorker","filter","product","estimate","navigatorOnLine","onLine","userActivation","isActive","state","sendBeacon","function","getOwnPropertyDescriptor","hardwareConcurrency","languages","get","isArray","map","url","referrer","timing","getIndexedDB","indexedDB","DocumentTouch","maxTouchPoints","msMaxTouchPoints","ontouchstart","length","type","plugins","description","screen","availHeight","availWidth","height","width","pixelDepth","orientation","angle","charCodeAt","outerWidth","outerHeight","getWebDriver","getPlatform","platform","oscpu","prototype","addBehavior","productSub","mediaDevices","kind","label","deviceId","groupId","webkitOfflineAudioContext","createOscillator","triangle","createDynamicsCompressor","threshold","knee","ratio","release","connect","destination","start","oncomplete","startRendering","subarray","OfflineAudioContext","frequency","attack","disconnect","frequencyBinCount","fftSize","getFloatTimeDomainData","reduction","getHash","mmMwWLliI0O&1","monospace","sans-serif","serif","sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","BankGothic Md BT","Batang","Century Gothic","Clarendon","EUROSTILE","Futura Bk BT","Futura Md BT","Gill Sans","HELV","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","MS Mincho","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Pristina","SCRIPTINA","Segoe UI Light","Serifa","Small Fonts","Staccato222 BT","Univers CE 55 Medium","Vrinda","createElement","div","style","visibility","hidden","span","position"];Rt=Pt,Ot=447,function(e){for(;--e;)Rt.push(Rt.shift())}(++Ot);var Nt=function(e,t){return Pt[e-=0]};const Lt=Nt("0x0"),Ut=Nt("0x1"),jt=e=>e?[...e].reduce(((e,t)=>e+Math[Nt("0x2")](t)),0):0;class qt{constructor(e,t,i){this[Nt("0x3")]=e,this[Nt("0x4")]=t,this.cryptoBinding=i}async[Nt("0x5")](){const e=this[Nt("0x4")][Nt("0x6")](Lt,[]),t=this.configManager[Nt("0x6")](Ut,36e5),i=await new $t(e,this.cryptoBinding)[Nt("0x7")]();return this[Nt("0x8")]=i,this[Nt("0x3")][Nt("0x9")](Ut,Date.now()+t),i}async getDeviceData(){return Number(this[Nt("0x3")][Nt("0xa")](Ut))<Date[Nt("0xb")]()||!this[Nt("0x8")]?await this.calculate():this[Nt("0x8")]}}class $t{constructor(e,t){this[Nt("0x0")]=e,this.cryptoBinding=t,this[Nt("0xc")]={battery:this[Nt("0xd")],brave:this.getBrave,canvas:this[Nt("0xe")],codecs:this[Nt("0xf")],connection:this[Nt("0x10")],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this.getCryptoRandomValues,deviceMemory:this[Nt("0x11")],documentBasedKeys:this[Nt("0x12")],hardwareConcurrency:this[Nt("0x13")],indexedDB:this.getIndexedDB,fidoEnabled:this[Nt("0x14")],languages:this[Nt("0x15")],language:this[Nt("0x16")],timezoneOffset:this[Nt("0x17")],localStorage:this.getLocalStorage,navigatorBasedKeys:this[Nt("0x18")],navigatorProduct:this[Nt("0x19")],navigatorUserAgent:this.getNavigatorUserAgent,navigatorUAData:this[Nt("0x1a")],navigatorHighEntropyData:this[Nt("0x1b")],navigatorStorageEstimation:this[Nt("0x1c")],navigatorOnLine:this.navigatorOnLine,navigatorIsUserActive:this[Nt("0x1d")],math:this[Nt("0x1e")],mediaMatch:this[Nt("0x1f")],openDatabase:this[Nt("0x20")],windowOrientation:this[Nt("0x21")],platform:this.getPlatform,cpuClass:this[Nt("0x22")],osClass:this[Nt("0x23")],addBehavior:this[Nt("0x24")],productSub:this[Nt("0x25")],mediaDevices:this[Nt("0x26")],audioFingerprint:this[Nt("0x27")],audioFingerprintExtended:this[Nt("0x28")],fonts:this[Nt("0x29")],performanceTiming:this[Nt("0x2a")],performanceMemory:this[Nt("0x2b")],plugins:this.getPlugins,screen:this[Nt("0x2c")],sequentum:this[Nt("0x2d")],sessionStorage:this.getSessionStorage,referrer:this[Nt("0x2e")],timezone:this[Nt("0x2f")],touchSupport:this[Nt("0x30")],vendor:this[Nt("0x31")],buildID:this[Nt("0x32")],webdriver:this.getWebDriver,webGlRenderer:this[Nt("0x33")],windowBasedKeys:this.getWindowBasedKeys,windowOuter:this[Nt("0x34")],webRTCDisabled:this[Nt("0x35")],cryptoBindingData:this.getCryptoBindingData[Nt("0x36")](this),notificationState:this[Nt("0x37")][Nt("0x36")](this,Nt("0x38")),geolocationState:this.getNavigatorPermissionsState[Nt("0x36")](this,Nt("0x39")),isGeoLocationExists:this[Nt("0x3a")],isSendBeaconExists:this[Nt("0x3b")],navigatorPrototype:this[Nt("0x3c")],installedRelatedApps:this[Nt("0x3d")],windowConstructorAliasTest:this.windowConstructorAliasTest,windowDocumentAuxVarsTest:this.windowDocumentAuxVarsTest,CDPRuntimeDomainTest:this[Nt("0x3e")]}}[Nt("0x3e")](){let e=!1;const t=new(window[Nt("0x3f")]);return window[Nt("0x40")][Nt("0x41")](t,Nt("0x42"),{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window[Nt("0x43")].debug(t[Nt("0x42")]),e}windowDocumentAuxVarsTest(){for(const e of window[Nt("0x40")][Nt("0x44")](window[Nt("0x45")]))if(e==Nt("0x46")||/^\$cdc_[a-zA-Z0-9]{22}_$/[Nt("0x47")](e))return!0;for(const e of window[Nt("0x40")][Nt("0x48")](window[Nt("0x40")][Nt("0x49")](window.document))){if(!e[Nt("0x4a")]||void 0===e.value[Nt("0x4b")])continue;const t=window[Nt("0x40")].getOwnPropertyNames(window[Nt("0x40")][Nt("0x4c")](e[Nt("0x4a")])),i=[Nt("0x4d"),"retrieveItem","isNodeReachable_"];if(t[Nt("0x4e")](),i.sort(),t.every(((e,t)=>e==i[t])))return!0}return!1}windowConstructorAliasTest(){const e=window[Nt("0x40")][Nt("0x44")](window);for(const t of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/[Nt("0x47")](t))return!0;for(const e of[window[Nt("0x4f")],window[Nt("0x50")],window[Nt("0x51")]])if(t!=(null==e?void 0:e[Nt("0x52")])&&t!=Nt("0x53")&&t!=Nt("0x54")&&window[t]===e)return!0}return!1}async[Nt("0x7")](){const e=this.startPromisesLoop();return await this[Nt("0x55")](e)}[Nt("0x56")](){const e={};for(const[t,i]of Object[Nt("0x57")](this.dataPoints))if(!this[Nt("0x0")][Nt("0x58")](t))try{e[t]=zt(i,100)}catch(i){Pe.warn(Nt("0x59"),{e:i,key:t}),e[t]=Promise.resolve()}return e}async[Nt("0x55")](e){const t={};for(const[i,n]of Object[Nt("0x57")](e))try{t[i]=await n}catch(e){Pe[Nt("0x5a")](Nt("0x5b"),{e:e,key:i}),t[i]=void 0}return t}[Nt("0x5c")](){const e=navigator[Nt("0x5d")];return Promise[Nt("0x5e")](e)}async getFIDOEnabled(){return!!navigator[Nt("0x5f")]&&await window.PublicKeyCredential[Nt("0x60")]()}[Nt("0x61")](){const e=window[Nt("0x62")][Nt("0x63")](new Uint8Array(16));return Array[Nt("0x64")](e)}[Nt("0x35")](){const e=null==window.RTCPeerConnection;return Promise[Nt("0x5e")](e)}[Nt("0x65")](){const e=[Nt("0x66"),"safari","__crWeb",Nt("0x67"),Nt("0x68"),Nt("0x69"),Nt("0x6a"),Nt("0x6b"),Nt("0x6c"),Nt("0x6d"),Nt("0x6e"),"samsungAr",Nt("0x6f"),Nt("0x70"),Nt("0x71"),Nt("0x72"),Nt("0x73"),Nt("0x74"),Nt("0x75"),Nt("0x76"),Nt("0x77"),Nt("0x78"),Nt("0x79"),Nt("0x7a"),Nt("0x7b"),Nt("0x7c"),Nt("0x7d"),Nt("0x7e"),Nt("0x7f"),"__driver_evaluate","__driver_unwrapped",Nt("0x80"),"__fxdriver_unwrapped",Nt("0x81"),Nt("0x82"),"__lastWatirPrompt","__selenium_evaluate","__selenium_unwrapped",Nt("0x83"),Nt("0x84"),"__webdriver_script_fn","__webdriver_script_func",Nt("0x85"),Nt("0x86"),Nt("0x87"),"awesomium",Nt("0x88"),Nt("0x89"),"cdc_adoQpoasnfa76pfcZLmcfl_Promise",Nt("0x8a"),"chrome_asyncScriptInfo",Nt("0x8b"),Nt("0x8c"),Nt("0x8d"),Nt("0x8e"),Nt("0x8f"),Nt("0x90")],t=[];for(const i of e){const e=window[i];void 0!==e&&null!=e&&t[Nt("0x91")](i)}return Promise[Nt("0x5e")](t)}[Nt("0x1f")](){const e={"dynamic-range":[Nt("0x92"),Nt("0x93")],"prefers-reduced-motion":["no-preference",Nt("0x94")],"prefers-contrast":[Nt("0x95"),Nt("0x92"),Nt("0x96"),Nt("0x97"),Nt("0x98"),"forced"],"max-monochrome":["0","10",Nt("0x99"),"1000"],"forced-colors":[Nt("0x9a"),Nt("0x9b")],"inverted-colors":["inverted",Nt("0x9b")],"color-gamut":["rec2020","p3","srgb"]},t={};for(const[i,n]of Object.entries(e))for(const e of n)t[i[Nt("0x9c")](/-/g,"_")+"_"+e[Nt("0x9c")](/-/g,"_")]=window[Nt("0x9d")]("("+i+": "+e+")")[Nt("0x9e")];return Promise[Nt("0x5e")](t)}[Nt("0x1e")](){const e=[Math[Nt("0xa2")](.12312423423423424),Math[Nt("0xa3")](1e308),(t=1e154,Math.log(t+Math[Nt("0x9f")](t*t-1))),Math[Nt("0xa4")](.12312423423423424),Math[Nt("0xa5")](1),Math[Nt("0xa0")](1+Math[Nt("0x9f")](2)),Math[Nt("0xa6")](.5),Math.log(3)/2,Math[Nt("0xa7")](.5),Math[Nt("0xa8")](-1e300),Math[Nt("0xa9")](1),Math[Nt("0xa1")](1)-1/Math[Nt("0xa1")](1)/2,Math[Nt("0xaa")](10.000000000123),Math[Nt("0xab")](1),(Math[Nt("0xa1")](1)+1/Math.exp(1))/2,Math.tan(-1e300),Math[Nt("0xac")](1),(Math[Nt("0xa1")](2)-1)/(Math[Nt("0xa1")](2)+1),Math[Nt("0xa1")](1),Math[Nt("0xad")](1),Math[Nt("0xa1")](1)-1,Math.log1p(10),Math[Nt("0xa0")](11),Math.PI**-100];var t;let i="";for(let t=0;t<e.length;t++)i+=e[t].toString();return Promise.resolve($t[Nt("0xae")](i))}[Nt("0x10")](){const{connection:e}=navigator,t=(e=>{let{downlink:t,effectiveType:i,rtt:n,saveData:r}=e;return{downlink:t,effectiveType:i,rtt:n,saveData:r}})(e);return Promise[Nt("0x5e")](t)}[Nt("0xaf")](){return Promise[Nt("0x5e")](!!window[Nt("0xb0")])}[Nt("0xb1")](){return Promise[Nt("0x5e")](!!window[Nt("0xb2")])}hasSequentum(){return-1!==window.external[Nt("0xb3")]()[Nt("0xb4")](Nt("0xb5"))}[Nt("0x18")](){return[Nt("0xb6"),Nt("0xb7"),Nt("0x84"),Nt("0xb8"),Nt("0x80"),Nt("0xb9"),"__webdriver_unwrapped",Nt("0xba"),Nt("0xbb"),Nt("0x7e"),Nt("0x7b"),Nt("0x7c"),Nt("0xbc"),Nt("0xbd"),Nt("0xbe"),"webdriver-evaluate",Nt("0xbf"),"webdriverCommand",Nt("0xc0"),Nt("0xc1"),Nt("0xc2"),"__$webdriverAsyncExecutor",Nt("0x81"),"__lastWatirConfirm",Nt("0xc3"),Nt("0x46"),Nt("0xc4"),Nt("0xc5")][Nt("0xc6")]((e=>navigator[e]))}getNavigatorProduct(){const e=navigator[Nt("0xc7")];return Promise.resolve(e)}getNavigatorUserAgent(){return navigator.userAgent}[Nt("0x1a")](){return navigator.userAgentData}getNavigatorHighEntropyData(){return Ft()}[Nt("0x1c")](){return navigator.storage[Nt("0xc8")]()}[Nt("0xc9")](){return navigator[Nt("0xca")]}[Nt("0x1d")](){return navigator[Nt("0xcb")][Nt("0xcc")]}async getNavigatorPermissionsState(e){try{const t=await navigator.permissions.query({name:e});return null==t?void 0:t[Nt("0xcd")]}catch(e){}}[Nt("0x3a")](){return!!navigator[Nt("0x39")]}[Nt("0x3b")](){return typeof navigator[Nt("0xce")]===Nt("0xcf")}getNavigatorPrototype(){return{hardwareConcurrency:Object[Nt("0xd0")](Object[Nt("0x4c")](navigator),Nt("0xd1")).get[Nt("0xb3")](),languages:Object.getOwnPropertyDescriptor(Object.getPrototypeOf(navigator),Nt("0xd2"))[Nt("0xd3")].toString()}}async getInstalledRelatedApps(){if(typeof navigator[Nt("0x3d")]===Nt("0xcf"))try{const{related_applications:e}=await navigator[Nt("0x3d")]();if(e&&Array[Nt("0xd4")](e))return e[Nt("0xd5")]((e=>({platform:e.platform,url:e[Nt("0xd6")]})))}catch(e){}}[Nt("0x2e")](){return document[Nt("0xd7")]}getPerformanceTiming(){return performance[Nt("0xd8")]}[Nt("0x2b")](){const{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}=performance.memory;return{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}}[Nt("0xd9")](){return Promise[Nt("0x5e")](!!window[Nt("0xda")])}[Nt("0x20")](){const{openDatabase:e}=window;return Promise[Nt("0x5e")](!!e)}[Nt("0x30")](){const e=window[Nt("0xdb")]&&document instanceof DocumentTouch,t={maxTouchPoints:navigator[Nt("0xdc")]||navigator[Nt("0xdd")]||0,documentTouch:e,ontouchstart:Nt("0xde")in window};return Promise[Nt("0x5e")](t)}getPlugins(){function e(e){const t=[];for(let i=0;i<e[Nt("0xdf")];++i)t[Nt("0x91")]({type:e[i][Nt("0xe0")],suffixes:e[i].suffixes});return t}const t=[];for(let i=0;i<navigator.plugins.length;++i){const n=navigator[Nt("0xe1")][i];n&&t.push({name:n.name,description:n[Nt("0xe2")],mimeTypes:e(n)})}return Promise[Nt("0x5e")](t)}[Nt("0x2c")](){const e=window[Nt("0xe3")]||screen,{availLeft:t}=e,{availTop:i}=e,n={availHeight:e[Nt("0xe4")],availLeft:t,availTop:i,availWidth:e[Nt("0xe5")],colorDepth:e.colorDepth,height:e[Nt("0xe6")],width:e[Nt("0xe7")],pixelDepth:e[Nt("0xe8")],orientationAngle:e[Nt("0xe9")]&&e.orientation[Nt("0xea")],orientationType:e.orientation&&e[Nt("0xe9")].type,devicePixelRatio:window.devicePixelRatio};return Promise[Nt("0x5e")](n)}static[Nt("0xae")](e){if(null==e)return;let t=0,i=0;const n=e[Nt("0xdf")];for(;i<n;)t=(t<<5)-t+e[Nt("0xeb")](i++)|0;return t}[Nt("0x34")](){const e={outerWidth:window[Nt("0xec")],outerHeight:window[Nt("0xed")]};return Promise[Nt("0x5e")](e)}[Nt("0xee")](){const e=navigator.webdriver;return Promise.resolve(e)}[Nt("0x21")](){const e=window[Nt("0xe9")];return Promise[Nt("0x5e")](e)}[Nt("0xef")](){const e=navigator[Nt("0xf0")];return Promise[Nt("0x5e")](e)}[Nt("0x22")](){const e=navigator.cpuClass;return Promise[Nt("0x5e")](e)}[Nt("0x23")](){const e=navigator[Nt("0xf1")];return Promise[Nt("0x5e")](e)}[Nt("0x24")](){const e=!!window.HTMLElement[Nt("0xf2")][Nt("0xf3")];return Promise[Nt("0x5e")](e)}[Nt("0x25")](){const e=navigator[Nt("0xf4")];return Promise[Nt("0x5e")](e)}async getMediaDevices(){const e=await navigator[Nt("0xf5")].enumerateDevices(),t=[];for(const i of e)t[Nt("0x91")]({kind:i[Nt("0xf6")],label:i[Nt("0xf7")],deviceId:i[Nt("0xf8")],groupId:i[Nt("0xf9")]});return t}async[Nt("0x27")](){const e=window.OfflineAudioContext||window[Nt("0xfa")];if(!e)return-1;const t=new e(1,5e3,44100),i=t[Nt("0xfb")]();i.type=Nt("0xfc"),i.frequency[Nt("0x4a")]=1e4;const n=t[Nt("0xfd")]();n[Nt("0xfe")][Nt("0x4a")]=-50,n[Nt("0xff")][Nt("0x4a")]=40,n[Nt("0x100")].value=12,n.attack.value=0,n[Nt("0x101")].value=.25,i[Nt("0x102")](n),n[Nt("0x102")](t[Nt("0x103")]),i[Nt("0x104")](0);const r=new Promise((async(e,i)=>{t[Nt("0x105")]=t=>e(t.renderedBuffer);try{await t[Nt("0x106")]()}catch(e){i(e)}})),a=(await r).getChannelData(0)[Nt("0x107")](4500);return $t.getHash(a)}async[Nt("0x28")](){var e;const t=window[Nt("0x108")]||window[Nt("0xfa")];if(!t)return{};const i=new t(1,5e3,44100),n=i[Nt("0xfb")]();n[Nt("0xe0")]=Nt("0xfc"),n[Nt("0x109")][Nt("0x4a")]=1e4;const r=i[Nt("0xfd")]();r[Nt("0xfe")][Nt("0x4a")]=-50,r.knee[Nt("0x4a")]=40,r[Nt("0x10a")][Nt("0x4a")]=0;const a=i.createAnalyser();n[Nt("0x102")](r),r[Nt("0x102")](a),r[Nt("0x102")](i[Nt("0x103")]),n[Nt("0x104")](0);try{await i[Nt("0x106")](),r.disconnect(),n[Nt("0x10b")]();const t=new Float32Array(a[Nt("0x10c")]);null===(e=a.getFloatFrequencyData)||void 0===e||e.call(a,t);const o=new Float32Array(a[Nt("0x10d")]);return Nt("0x10e")in a&&a[Nt("0x10e")](o),{gain:r[Nt("0x10f")].value||r[Nt("0x10f")],freq:jt(t),time:jt(o)}}catch(e){return{}}}static[Nt("0x110")](e){let t=0;for(let i=0;i<e.length;++i)t+=Math[Nt("0x2")](e[i]);return t}[Nt("0x29")](){const e=Nt("0x111"),t=[Nt("0x112"),Nt("0x113"),Nt("0x114")],i=[Nt("0x115"),Nt("0x116"),Nt("0x117"),Nt("0x118"),Nt("0x119"),"AvantGarde Bk BT",Nt("0x11a"),Nt("0x11b"),"Bitstream Vera Sans Mono","Calibri","Century",Nt("0x11c"),Nt("0x11d"),Nt("0x11e"),"Franklin Gothic",Nt("0x11f"),Nt("0x120"),"GOTHAM",Nt("0x121"),Nt("0x122"),"Haettenschweiler",Nt("0x123"),Nt("0x124"),Nt("0x125"),Nt("0x126"),Nt("0x127"),Nt("0x128"),Nt("0x129"),"Menlo",Nt("0x12a"),"MS Outlook",Nt("0x12b"),Nt("0x12c"),Nt("0x12d"),Nt("0x12e"),Nt("0x12f"),Nt("0x130"),Nt("0x131"),"Minion Pro","Monotype Corsiva","PMingLiU",Nt("0x132"),Nt("0x133"),Nt("0x134"),Nt("0x135"),"SimHei",Nt("0x136"),Nt("0x137"),"TRAJAN PRO",Nt("0x138"),Nt("0x139"),"ZWAdobeF"],n=document[Nt("0x13a")](Nt("0x13b"));n[Nt("0x13c")][Nt("0x13d")]=Nt("0x13e");const r={},a={},o=t=>{const i=document[Nt("0x13a")](Nt("0x13f")),{style:r}=i;return r[Nt("0x140")]=Nt("0x141"),r.top="0",r[Nt("0x142")]="0",r.fontFamily=t,r[Nt("0x143")]=Nt("0x144"),i[Nt("0x145")]=e,n.appendChild(i),i},s=(e,t)=>o("'"+e+"',"+t),l=t[Nt("0xd5")](o),u=(()=>{const e={};for(const n of i)e[n]=t[Nt("0xd5")]((e=>s(n,e)));return e})();document[Nt("0x149")].appendChild(n);try{for(let e=0;e<t.length;e++)r[t[e]]=l[e][Nt("0x147")],a[t[e]]=l[e].offsetHeight;const e=i[Nt("0xc6")]((e=>{return i=u[e],t[Nt("0x146")](((e,t)=>i[t][Nt("0x147")]!==r[e]||i[t][Nt("0x148")]!==a[e]));var i}));return Promise[Nt("0x5e")](e)}finally{document.body[Nt("0x14a")](n)}}[Nt("0x17")](){const e=(new Date)[Nt("0x17")]();return Promise[Nt("0x5e")](e)}[Nt("0x16")](){const e=navigator[Nt("0x14b")];return Promise[Nt("0x5e")](e)}[Nt("0x15")](){const e=navigator[Nt("0xd2")];return Promise[Nt("0x5e")](e)}[Nt("0x13")](){const e=navigator.hardwareConcurrency;return Promise[Nt("0x5e")](e)}[Nt("0x11")](){const e=navigator[Nt("0x14c")];return Promise[Nt("0x5e")](e)}[Nt("0x12")](){return["__webdriver_evaluate","__selenium_evaluate",Nt("0x85"),Nt("0x14d"),Nt("0xc2"),Nt("0x80"),Nt("0xb9"),Nt("0x86"),"__driver_evaluate","__selenium_unwrapped","__fxdriver_unwrapped"][Nt("0xc6")]((e=>document[e]))}[Nt("0x2f")](){const e=Intl[Nt("0x14e")]().resolvedOptions()[Nt("0x14f")];return Promise[Nt("0x5e")](e)}[Nt("0x31")](){const e=navigator[Nt("0x150")];return Promise[Nt("0x5e")](e)}[Nt("0x32")](){const e=navigator[Nt("0x151")];return Promise[Nt("0x5e")](e)}async getCanvasFingerprint(){const e=document[Nt("0x13a")](Nt("0x169"));e[Nt("0xe7")]=1,e[Nt("0xe6")]=1;const t=e[Nt("0x16a")]("2d"),i={winding:function(e){return e[Nt("0x167")](0,0,10,10),e[Nt("0x167")](2,2,6,6),!e[Nt("0x168")](5,5,"evenodd")}(t),geometry:function(e,t){e[Nt("0xe7")]=122,e[Nt("0xe6")]=110,t.globalCompositeOperation=Nt("0x15d");const i=[[Nt("0x15e"),40,40],[Nt("0x15f"),80,40],[Nt("0x160"),60,80]];for(const[e,n,r]of i)t[Nt("0x159")]=e,t[Nt("0x161")](),t[Nt("0x162")](n,r,40,0,2*Math.PI,!0),t[Nt("0x163")](),t[Nt("0x164")]();return t[Nt("0x159")]=Nt("0x165"),t[Nt("0x162")](60,60,60,0,2*Math.PI,!0),t[Nt("0x162")](60,60,20,0,2*Math.PI,!0),t[Nt("0x164")](Nt("0x166")),$t[Nt("0xae")](e.toDataURL())}(e,t),text:function(e,t){e.width=240,e[Nt("0xe6")]=60,t[Nt("0x152")]=Nt("0x153"),t.fillStyle=Nt("0x154"),t.fillRect(100,1,62,20),t.fillStyle="#069",t[Nt("0x155")]='11pt "Times New Roman"';const i=Nt("0x156")+String[Nt("0x157")](55357,56835);return t[Nt("0x158")](i,2,15),t[Nt("0x159")]=Nt("0x15a"),t[Nt("0x155")]=Nt("0x15b"),t.fillText(i,4,45),$t.hashCodeString(e[Nt("0x15c")]())}(e,t)};return Promise[Nt("0x5e")](i)}async[Nt("0xd")](){const e=await navigator[Nt("0xd")]();return{charging:e[Nt("0x16b")],chargingTime:e[Nt("0x16c")],dischargingTime:e[Nt("0x16d")],level:e[Nt("0x16e")]}}async[Nt("0x16f")](){return!!navigator.brave&&await navigator[Nt("0x170")][Nt("0x171")]()}async getWebGlRenderer(){const e=document.createElement(Nt("0x169")),t=e[Nt("0x16a")]("webgl")||e[Nt("0x16a")](Nt("0x172")),i=t[Nt("0x173")]("WEBGL_debug_renderer_info");return Promise[Nt("0x5e")](t[Nt("0x174")](i[Nt("0x175")]))}async[Nt("0xf")](){const e=document[Nt("0x13a")](Nt("0x176")),t={basic:""===e[Nt("0x177")](Nt("0x178")),advanced:""===e.canPlayType(Nt("0x179"))};return Promise.resolve(t)}async[Nt("0x17a")](){const{publicKey:e,keyIdentifier:t}=await this[Nt("0x17b")][Nt("0x17c")]();return{publicKey:e,keyIdentifier:t}}static[Nt("0x17d")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i[Nt("0x47")](navigator[Nt("0x17e")])||null!=window[Nt("0xe9")]||window[Nt("0x9d")](Nt("0x17f"))[Nt("0x9e")]}}var Vt,Ht,Gt=["compress","uncompressed","ALLOW","CHALLENGE","DENY","TRUST"];Vt=Gt,Ht=474,function(e){for(;--e;)Vt.push(Vt.shift())}(++Ht);var Kt,Zt,Yt,Wt,Jt=function(e,t){return Gt[e-=0]};(Zt=Kt||(Kt={}))[Jt("0x0")]="compressed",Zt[Jt("0x1")]="uncompressed",(Wt=Yt||(Yt={}))[Jt("0x2")]=Jt("0x2"),Wt[Jt("0x3")]=Jt("0x3"),Wt[Jt("0x4")]="DENY",Wt[Jt("0x5")]="TRUST";var Xt,Qt,ei=["encryptPayload","string","encode","crypto","getRandomValues","subtle","arrayBufferToBase64","stringify","RSA-OAEP","byteLength","fromCharCode","btoa","importPublicKey","importKey","jwk","parse","crypto is not supported","encryptSymKeyBundle","configManager","generateSymKey","generateKey","AES-GCM","encrypt","decrypt"];Xt=ei,Qt=162,function(e){for(;--e;)Xt.push(Xt.shift())}(++Qt);var ti=function(e,t){return ei[e-=0]};class ii{constructor(e){this[ti("0x0")]=e}[ti("0x1")](){return window.crypto.subtle[ti("0x2")]({name:ti("0x3"),length:256},!0,[ti("0x4"),ti("0x5")])}async[ti("0x6")](e,t){const i=typeof e===ti("0x7")?(new TextEncoder)[ti("0x8")](e):e,n=window[ti("0x9")][ti("0xa")](new Uint8Array(12)),r={name:ti("0x3"),iv:n},a=await window[ti("0x9")][ti("0xb")][ti("0x4")](r,t,i);return{payloadCipherText:this.arrayBufferToBase64(a),iv:n}}async encryptSymKeyBundle(e,t,i){const n=await window[ti("0x9")][ti("0xb")].exportKey("raw",e),r=this[ti("0xc")](n),a=this[ti("0xc")](t),o=(new TextEncoder)[ti("0x8")](JSON[ti("0xd")]({symKey:r,iv:a})),s=await window.crypto[ti("0xb")][ti("0x4")]({name:ti("0xe")},i,o);return this.arrayBufferToBase64(s)}arrayBufferToBase64(e){let t="";const i=new Uint8Array(e),n=i[ti("0xf")];for(let e=0;e<n;e++)t+=String[ti("0x10")](i[e]);return window[ti("0x11")](t)}[ti("0x12")](e){return window.crypto[ti("0xb")][ti("0x13")](ti("0x14"),JSON[ti("0x15")](e),{name:ti("0xe"),hash:"SHA-256"},!0,[ti("0x4")])}async[ti("0x4")](e,t){if(!window[ti("0x9")]||!window[ti("0x9")].subtle)throw new Error(ti("0x16"));const i=await this[ti("0x1")](),{payloadCipherText:n,iv:r}=await this[ti("0x6")](t,i),a=await this[ti("0x12")](e);return{encryptedData:n,encryptedKey:await this[ti("0x17")](i,r,a)}}}var ni,ri,ai=[", errorSpace: ",", errorCode: ","CLIENT","client","server","COMMUNICATION","communication","error","errorCode","message","name","toString","SDKError: ","errorSpace"];ni=ai,ri=436,function(e){for(;--e;)ni.push(ni.shift())}(++ri);var oi,si,li=function(e,t){return ai[e-=0]};(si=oi||(oi={}))[li("0x0")]=li("0x1"),si.SERVER=li("0x2"),si[li("0x3")]=li("0x4");class ui extends Error{constructor(e,t,i){var n,r;super(),this[li("0x5")]=e,this.errorSpace=t,this[li("0x6")]=i,this.message=(null===(n=this[li("0x5")])||void 0===n?void 0:n[li("0x7")])||this[li("0x5")].toString(),this[li("0x8")]=(null===(r=this[li("0x5")])||void 0===r?void 0:r.name)||ui[li("0x8")]}[li("0x9")](){return li("0xa")+this[li("0x7")]+(this[li("0xb")]?li("0xc")+this[li("0xb")]:"")+(this[li("0x6")]?li("0xd")+this.errorCode:"")}toLog(){return u(u({name:this[li("0x8")],message:this.message},this[li("0xb")]&&{errorSpace:this[li("0xb")]}),this.errorCode&&{errorCode:this[li("0x6")]})}}var ci,di,hi=["name","registerEventListeners","parse","maintainLastXItems","removeItemLocalStorageSafe","ddls","lastDeviceInDeviceEvent","rei","lse","deviceEventDataCollectionIgnoreList","bufferSize","bufferInterval","EVENT_TYPE_ACTION","EVENT_TYPE_IDENTIFICATION","localStoredEventTypes","maxLocalStoredEvents","configManager","storageManager","deviceDataManager","identityManager","cryptoBinding","serverPath","enableSessionToken","flushTimeoutHandle","EVENT_TYPE_INTERACTION","crypto","interactionEventsManager","getConfValue","safeEventCallback","isMobile","maxEventStored","pollingInterval","pollingSessionToken","emitEvent","toString","platform","tabId","getTabId","timestamp","now","enrichUADataIfDoesNotExist","eventTypesToStore","includes","type","addEventToLocalStorage","eventsQueue","push","error","Error while emitting event","getClientId","errorCode","length","min","flush","catch","Error while emitting event (delayed flush)","toLog","Failed to refresh data","isTokenExpired","refreshSessionToken","Failed to polling data","attributes","navigatorHighEntropyData","fetchEventsFromLocalStorage","pop","sort","popAllEvents","clientId","deviceId","getDeviceId","getUserId","sdkPlatform","events","warn","Crypto-binding is not supported. ","sessionToken","buildEncryptedRequestBody","requestsManager","postData","device/events","setDeviceId","setSessionToken","userId","setUserId","refreshConf","Encryption error - missing public key","COMMUNICATION","stringify","encrypt","compress","uncompressed","CLIENT","increaseEventIndex","eventIndex","getItemLocalStorageSafe","parseInt","isNaN","setItemLocalStorageSafe","sendDeviceDataEvent","shouldSendDeviceEvent","info","no need to send device event","getDeviceData","EVENT_TYPE_DEVICE","sendPageLoadEvent","page_load","extractWindowRespurces","location","referrer","performance","resources","isArray","map"];ci=hi,di=457,function(e){for(;--e;)ci.push(ci.shift())}(++di);var pi=function(e,t){return hi[e-=0]};const gi=pi("0x0"),fi=pi("0x1"),mi=pi("0x2"),_i=pi("0x3"),xi=pi("0x4"),vi=pi("0x5"),bi=pi("0x6"),yi=[Ze[pi("0x7")],Ze[pi("0x8")]],wi=pi("0x9"),Ei=pi("0xa");class ki{constructor(e,t,i,n,r,a,o,s){this[pi("0xb")]=e,this[pi("0xc")]=t,this[pi("0xd")]=i,this.requestsManager=n,this[pi("0xe")]=r,this[pi("0xf")]=a,this[pi("0x10")]=o,this[pi("0x11")]=s,this.eventIndex=null,this[pi("0x12")]=null,this.safeEventCallback=async(e,t)=>{try{const i=u({},u({interaction_type:e},t)),n={type:Ze[pi("0x13")],attributes:i};return await this.emitEvent(n)}catch(e){}},this[pi("0x11")]=s,this.eventsQueue=[],this[pi("0x14")]=new ii(e),this[pi("0x15")]=new St(this[pi("0xb")][pi("0x16")](xi,[]),this.configManager[pi("0x16")]("mouseEventsCollectionBuffer",100),this[pi("0x17")]),this[pi("0x18")]=$t[pi("0x18")](),this.eventTypesToStore=this[pi("0xb")][pi("0x16")](wi,[Ze[pi("0x7")]]),this[pi("0x19")]=this[pi("0xb")][pi("0x16")](Ei,4),this[pi("0x1a")]=36e4,this[pi("0x1b")]()}async[pi("0x1c")](e){e.index=this.increaseEventIndex(),e.location=location[pi("0x1d")](),e[pi("0x1e")]=navigator[pi("0x1e")],e.sdkVersion="1.51.0",e[pi("0x10")]=this.serverPath,e[pi("0x1f")]=this[pi("0xe")][pi("0x20")](),e[pi("0x21")]=Date[pi("0x22")](),await this[pi("0x23")](e);let t=0;this[pi("0x24")][pi("0x25")](e[pi("0x26")])?t=this[pi("0x27")](e):this[pi("0x28")][pi("0x29")](e);const i=this[pi("0xb")][pi("0x16")](vi,2);if(this[pi("0x28")].length+t>=i||yi[pi("0x25")](e.type)){this.flushTimeoutHandle&&(clearTimeout(this[pi("0x12")]),this.flushTimeoutHandle=null);try{return await this.flush()}catch(t){throw Pe[pi("0x2a")](pi("0x2b"),{clientId:this.identityManager[pi("0x2c")](),eventType:e.type,error:t[pi("0x2d")]?t.toLog():t}),t}}if(!this.flushTimeoutHandle&&this[pi("0x28")][pi("0x2e")]>0){const t=this[pi("0xb")][pi("0x16")](bi,2),i=Math[pi("0x2f")](t,30);this[pi("0x12")]=setTimeout((()=>{this[pi("0x12")]=null,this[pi("0x30")]()[pi("0x31")]((t=>{Pe[pi("0x2a")](pi("0x32"),{clientId:this.identityManager.getClientId(),eventType:e.type,error:t.errorCode?t[pi("0x33")]():t})}))}),1e3*i)}return{}}async refreshSessionToken(){try{return this.eventsQueue[pi("0x2e")]>0?await this[pi("0x30")]():(await this.sendDeviceDataEvent(!0),await this.flush())}catch(e){Pe[pi("0x2a")](pi("0x34"),{e:e})}}async[pi("0x1b")](){try{this[pi("0xe")][pi("0x35")]()&&await this[pi("0x36")]()}catch(e){Pe[pi("0x2a")](pi("0x37"),{e:e})}finally{setTimeout((async()=>{await this[pi("0x1b")]()}),this[pi("0x1a")])}}async[pi("0x23")](e){var t;if(!(null===(t=e[pi("0x38")])||void 0===t?void 0:t[pi("0x39")]))try{e[pi("0x38")].navigatorHighEntropyData=await Ft()}catch(e){}}popAllEvents(){const e=[],t=this[pi("0x3a")]();for(;this[pi("0x28")][pi("0x2e")];)e.push(this[pi("0x28")][pi("0x3b")]());return(null==t?void 0:t[pi("0x2e")])&&e[pi("0x29")](...t),e[pi("0x3c")](((e,t)=>e[pi("0x21")]-t[pi("0x21")]))}async[pi("0x30")](){const e=this[pi("0x3d")]();if(0===e[pi("0x2e")])return{};const t={};t[pi("0x3e")]=this.identityManager[pi("0x2c")](),t[pi("0x3f")]=this[pi("0xe")][pi("0x40")](),t.userId=this[pi("0xe")][pi("0x41")](),t[pi("0x42")]=this.isMobile?"mobile_web":"desktop_web",t[pi("0x43")]=e;try{const{keyIdentifier:e}=await this[pi("0xf")].getPublicData();t.keyIdentifier=e}catch(e){Pe[pi("0x44")](pi("0x45")+e)}this[pi("0x11")]&&(t[pi("0x46")]=!0);const i=await this[pi("0x47")](t),n=await this[pi("0x48")][pi("0x49")](pi("0x4a"),i);return n[pi("0x3f")]&&this[pi("0xe")][pi("0x4b")](n.deviceId),n[pi("0x46")]&&this[pi("0xe")][pi("0x4c")](n.sessionToken),n[pi("0x4d")]&&this[pi("0xe")][pi("0x4e")](n.userId),this.cleanLocalStorageEvents(),n}async[pi("0x47")](e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.configManager[pi("0x16")]("publicKey",null);if(null===i&&t)return await this[pi("0xb")][pi("0x4f")](this[pi("0xe")][pi("0x2c")]()),await this[pi("0x47")](e);if(null===i)throw new ui(new Error(pi("0x50")),oi[pi("0x51")]);try{const t=JSON[pi("0x52")](e),n=this.compressData(t),r=n||t,{encryptedData:a,encryptedKey:o}=await this[pi("0x14")][pi("0x53")](i,r);return{data:a,key:o,dataType:n?Kt[pi("0x54")]:Kt[pi("0x55")]}}catch(e){throw new ui(e,oi[pi("0x56")])}}compressData(e){try{return be.gzip(e)}catch(e){Pe[pi("0x2a")]("Failed to compress data, sending the data to the service uncompressed",{clientId:this[pi("0xe")][pi("0x2c")](),error:e})}}[pi("0x57")](){if(null===this[pi("0x58")]){const e=this[pi("0xc")][pi("0x59")](mi),t=Number[pi("0x5a")](e);this[pi("0x58")]=Number[pi("0x5b")](t)?-1:t}return this[pi("0x58")]++,this[pi("0xc")][pi("0x5c")](mi,this[pi("0x58")][pi("0x1d")]()),this[pi("0x58")]}shouldSendDeviceEvent(){const e=this[pi("0xc")].getItemLocalStorageSafe(gi),t=this.storageManager[pi("0x59")](fi);return!e||!t||Date[pi("0x22")]()-e>864e5||t!=this.identityManager[pi("0x40")]()}async[pi("0x5d")](e){if(!e&&!this[pi("0x5e")]())return Pe[pi("0x5f")](pi("0x60")),!1;const t=await this[pi("0xd")][pi("0x61")](),i={type:Ze[pi("0x62")],attributes:t},n=await this[pi("0x1c")](i);return n&&(this[pi("0xc")][pi("0x5c")](gi,Date[pi("0x22")]()),this[pi("0xc")].setItemLocalStorageSafe(fi,this.identityManager[pi("0x40")]())),n}async[pi("0x63")](){const e=pi("0x64");if(this[pi("0xb")].getConfValue(xi,[]).includes(e))return!1;const t=this[pi("0x65")]();return await this[pi("0x1c")]({type:Ze[pi("0x13")],attributes:u(u({interaction_type:e,location:window[pi("0x66")].href,referrer:document[pi("0x67")]},window.history&&{window_historyLength:window.history[pi("0x2e")]}),t&&{windowResources:t})}),!0}extractWindowRespurces(){try{const e=window[pi("0x68")].getEntriesByType(pi("0x69"));return e&&Array[pi("0x6a")](e)?e[pi("0x6b")]((e=>({name:e[pi("0x6c")],initiatorType:e.initiatorType}))):void 0}catch(e){}}[pi("0x6d")](){this[pi("0x15")][pi("0x6d")](),this[pi("0xe")][pi("0x6d")]()}[pi("0x3a")](){const e=this[pi("0xc")][pi("0x59")](_i);return e?JSON[pi("0x6e")](e):[]}[pi("0x27")](e){const t=this[pi("0x3a")]();return tt[pi("0x6f")](t,this[pi("0x19")],e),this[pi("0xc")][pi("0x5c")](_i,JSON[pi("0x52")](t)),t[pi("0x2e")]}cleanLocalStorageEvents(){this[pi("0xc")][pi("0x70")](_i)}}var Ai,Ci,Di=["Invalid JWT:","rui","rdi","rst","userIdStorageExpiry","storageManager","configManager","clientId","load","loadDeviceId","loadTabId","registerEventListeners","addEventListener","beforeunload","saveTabIdOnUnload","getDeviceId","setDeviceId","deviceId","info","Updating DeviceId","setItemSessionStorageSafe","getItemSessionStorageSafe","setClientId","getItemLocalStorageSafe","getConfValue","now","setUserId","userId","setItemLocalStorageSafe","removeUserId","removeItemSessionStorageSafe","removeItemLocalStorageSafe","tabId","floor","random","MAX_SAFE_INTEGER","toString","getTabId","setSessionToken","isTokenExpired","getSessionToken","parse","split","exp","error"];Ai=Di,Ci=226,function(e){for(;--e;)Ai.push(Ai.shift())}(++Ci);var Si=function(e,t){return Di[e-=0]};const Ti=Si("0x0"),Ii=Si("0x1"),Mi="rdit",Bi="rti",Fi=Si("0x2"),zi=Si("0x3");class Ri{constructor(e,t,i){this[Si("0x4")]=e,this[Si("0x5")]=t,this[Si("0x6")]=i,this.setClientId(this[Si("0x6")])}[Si("0x7")](){this[Si("0x8")](),this[Si("0x9")]()}[Si("0xa")](){window[Si("0xb")](Si("0xc"),(async()=>this[Si("0xd")]()))}[Si("0xe")](){return this.deviceId}[Si("0xf")](e){this[Si("0x10")]!==e&&(Pe[Si("0x11")](Si("0x12"),{deviceId:e}),this.deviceId=e,this[Si("0x4")][Si("0x13")](Ii,e),this[Si("0x4")].setItemLocalStorageSafe(Ii,e))}[Si("0x8")](){const e=this[Si("0x4")][Si("0x14")](Ii)||this[Si("0x4")].getItemLocalStorageSafe(Ii);return null!=e&&this[Si("0xf")](e),e}getClientId(){return this[Si("0x6")]}[Si("0x15")](e){this[Si("0x4")].getClientId()!=e&&this[Si("0x4")].setClientId(e),this[Si("0x4")][Si("0x13")]("rci",e)}getUserId(){if(Number(this[Si("0x4")][Si("0x16")](Mi))+this[Si("0x5")][Si("0x17")](zi,864e5)<Date[Si("0x18")]())return this.removeUserId(),null;const e=this[Si("0x4")].getItemSessionStorageSafe(Ti);return null!=e?e:this[Si("0x4")][Si("0x16")](Ti)}[Si("0x19")](e){this[Si("0x1a")]=e,this[Si("0x4")].setItemSessionStorageSafe(Ti,e),this[Si("0x4")][Si("0x1b")](Ti,e),this[Si("0x4")].setItemLocalStorageSafe(Mi,Date[Si("0x18")]())}[Si("0x1c")](){this.storageManager[Si("0x1d")](Ti),this[Si("0x4")][Si("0x1e")](Ti),this.storageManager[Si("0x1e")](Mi)}loadTabId(){const e=this.storageManager[Si("0x14")](Bi);e?(this[Si("0x4")][Si("0x1d")](Bi),this.tabId=e):this[Si("0x1f")]=Math[Si("0x20")](Math[Si("0x21")]()*Number[Si("0x22")])[Si("0x23")]()}[Si("0x24")](){return this[Si("0x1f")]}[Si("0xd")](){this.storageManager[Si("0x13")](Bi,this[Si("0x1f")])}[Si("0x25")](e){this.storageManager.setItemLocalStorageSafe(Fi,e)}getSessionToken(){return this[Si("0x4")][Si("0x16")](Fi)||this.storageManager[Si("0x14")](Fi)}[Si("0x26")](){var e;const t=this[Si("0x27")]();if(!t)return!0;try{const i=JSON[Si("0x28")](atob(t[Si("0x29")](".")[1]));let n=(null!==(e=i[Si("0x2a")])&&void 0!==e?e:i.iat)*(i.exp&&i[Si("0x2a")]<1e12?1e3:1);return i[Si("0x2a")]||(n+=9e5),Date[Si("0x18")]()>=n}catch(e){return Pe[Si("0x2b")](Si("0x2c"),{error:e}),!0}}}var Oi,Pi,Ni=["COMMUNICATION","serverPath","postData","postDataFromURL","include","application/json","stringify","getData","GET","callServer","fetch","fetch-api is not supported","CLIENT","json","SERVER","status","message"];Oi=Ni,Pi=154,function(e){for(;--e;)Oi.push(Oi.shift())}(++Pi);var Li=function(e,t){return Ni[e-=0]};class Ui{constructor(e){this[Li("0x0")]=e}async[Li("0x1")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this[Li("0x2")](this[Li("0x0")]+e,t,i)}async[Li("0x2")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:"POST",credentials:Li("0x3"),headers:new Headers(u({"Content-Type":Li("0x4")},i)),body:JSON[Li("0x5")](t)};return await this.callServer(e,n)}async[Li("0x6")](e){const t=this[Li("0x0")]+e,i={method:Li("0x7"),credentials:Li("0x3")};return await this[Li("0x8")](t,i)}async callServer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(Li("0x9")in window))throw new ui(new Error(Li("0xa")),oi[Li("0xb")]);try{const i=await fetch(e,t),n=await i[Li("0xc")]();if(i.ok)return n;throw new ui(new Error(n.message||i.statusText),oi[Li("0xd")],i[Li("0xe")])}catch(e){if(!(e instanceof ui))throw new ui(new Error(e[Li("0xf")]),oi[Li("0x10")]);throw e}}}var ji,qi,$i=["Invalid SDK params was provided: ","REQUIRED_SDK_PARAMS","throwOrReturnResult","logIfInvalid","throwError","filter"];ji=$i,qi=403,function(e){for(;--e;)ji.push(ji.shift())}(++qi);var Vi=function(e,t){return $i[e-=0]};class Hi{constructor(){this[Vi("0x0")]={clientId:"string"}}[Vi("0x1")](e,t,i){if(!e&&((null==t?void 0:t[Vi("0x2")])&&Pe.info(i),null==t?void 0:t[Vi("0x3")]))throw new Error(i);return e}validateSDKParams(e,t){const i=Object.keys(this[Vi("0x0")])[Vi("0x4")]((t=>typeof e[t]!=this[Vi("0x0")][t]));return this[Vi("0x1")](0==i.length,t,Vi("0x5")+JSON.stringify(i))}}var Gi,Ki,Zi=["platform","postData","device/logs","requestsManager","identityManager","configManager","lastTimeLogsSent","logMiddleware","push","reportLogs","getConfValue","logsMinimumDelay","length","now","flush","getClientId","floor"];Gi=Zi,Ki=326,function(e){for(;--e;)Gi.push(Gi.shift())}(++Ki);var Yi=function(e,t){return Zi[e-=0]};class Wi{constructor(e,t,i){this[Yi("0x0")]=e,this[Yi("0x1")]=t,this[Yi("0x2")]=i,this[Yi("0x3")]=0,this[Yi("0x4")]=async()=>{try{await this.reportLogs()}catch(e){}},Pe.middlewares[Yi("0x5")](this.logMiddleware)}async[Yi("0x6")](){if(!this.configManager.getConfValue("enableLogsReporting",!1))return;const e=this[Yi("0x2")][Yi("0x7")]("logsMinimumBatch",6),t=this[Yi("0x2")][Yi("0x7")](Yi("0x8"),12e4);if(Pe.logs[Yi("0x9")]<e||this[Yi("0x3")]+t>Date[Yi("0xa")]())return;this[Yi("0x3")]=Date[Yi("0xa")]();const i=Pe[Yi("0xb")](),n=this.identityManager[Yi("0xc")](),r=Math[Yi("0xd")](Date[Yi("0xa")]()/1e3),a={sdkVersion:"1.51.0",platform:navigator[Yi("0xe")],clientId:n,timestamp:r,logEntries:i};await this.requestsManager[Yi("0xf")](Yi("0x10"),a)}}var Ji,Xi,Qi=["migrateIdentifiers","true","endsWith","device/migrate-identifiers","requestsManager","postDataFromURL","deviceId","rimd","identityManager","storageManager"];Ji=Qi,Xi=417,function(e){for(;--e;)Ji.push(Ji.shift())}(++Xi);var en=function(e,t){return Qi[e-=0]};const tn=en("0x0");class nn{constructor(e,t,i){this[en("0x1")]=e,this.requestsManager=t,this[en("0x2")]=i}async[en("0x3")](e){if(this[en("0x2")].getItemLocalStorageSafe(tn)!=en("0x4")){const t=this[en("0x1")].getDeviceId(),i=this[en("0x1")].getClientId(),n=(e[en("0x5")]("/")?e:e+"/")+en("0x6"),r=await this[en("0x7")][en("0x8")](n,{deviceId:t,clientId:i});r[en("0x9")]&&r.deviceId==t&&this[en("0x2")].setItemLocalStorageSafe(tn,"true")}}}var rn,an,on=["setAuthenticatedUser","setUser","clearUser","RiskID","TSAccountProtection","dispatchEvent","RiskIDReady","TSAccountProtectionReady","undefined","sdkEnabled","enableIdentifiersMigration","verbose","email","national_id","other","initializationPromise","enableSessionToken","identifiersMigrationEnabled","firstPartyMigrationUrl","validationManager","initializedInstance","SDK already initialized","clientId","options","serverPath","toString","enabled","mainEntry","initialize","storageManager","cryptoBinding","createCryptoBinding","sign","requestsManager","identityManager","configManager","deviceDataManager","load","logsReporter","getConfValue","getSessionToken","Session token is not enabled","now","info","SDK disabled","isTokenExpired","eventsManager","init","userId","refreshConf","getClientId","isSDKDisabled","migrateIdentifiers","sendDeviceDataEvent","catch","updateUserId","registerEventListeners","isInitialized","triggerActionEvent","includes","warn","_error_'invalid action type - ","Invalid claimedUserIdType","invalid_claimed_user_id_type_","EVENT_TYPE_ACTION","correlationId","claimedUserId","publicKey","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","suspiciousContext","downloadFile","uploadFile","transactionData","customAttributes","Unhandled SDK error. recieved eventResponse: ","object","stringify","slice","CLIENT","SERVER","errorSpace","errorCode","message","unexpected_error_","identifyUser","identifyUser called without a valid userid","setUserId","emitEvent","EVENT_TYPE_IDENTIFICATION","deviceId","unidentifiedUser","getUserId","removeUserId"];rn=on,an=483,function(e){for(;--e;)rn.push(rn.shift())}(++an);var sn=function(e,t){return on[e-=0]};const ln=[null,void 0,sn("0x0"),"",0],un=sn("0x1"),cn=sn("0x2"),dn=sn("0x3"),hn=[sn("0x4"),"phone_number","account_id","ssn",sn("0x5"),"passport_number","drivers_license_number",sn("0x6")];class pn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;if(this[sn("0x7")]=null,this.isSDKDisabled=!1,this[sn("0x8")]=!1,this[sn("0x9")]=!1,this[sn("0xa")]=null,this[sn("0xb")]=new Hi,pn[sn("0xc")])throw new Error(sn("0xd"));pn[sn("0xc")]=!0;const n="string"==typeof t;this[sn("0xe")]=n?t:e,this[sn("0xf")]=n?{serverPath:e}:t,(i=this[sn("0xf")])[sn("0x10")]||(i[sn("0x10")]="https://collect.riskid.security/"),this.options.serverPath=new URL(this[sn("0xf")][sn("0x10")])[sn("0x11")](),this[sn("0xa")]=this.options.firstPartyMigrationUrl||null,Pe[sn("0x12")]=!!this[sn("0xf")][sn("0x3")],this[sn("0xb")].validateSDKParams(this,{throwError:!0,logIfInvalid:!0})||(this.isSDKDisabled=!0),this[sn("0x15")]=new Me(this[sn("0xe")]),this[sn("0x16")]=Se.crypto[sn("0x17")](sn("0x18")),this[sn("0x19")]=new Ui(this[sn("0xf")][sn("0x10")]),this.configManager=new Ve(this.storageManager,this[sn("0x19")]),this[sn("0x1a")]=new Ri(this.storageManager,this[sn("0x1b")],this[sn("0xe")]),this[sn("0x1c")]=new qt(this.storageManager,this[sn("0x1b")],this.cryptoBinding),this[sn("0x1a")][sn("0x1d")](),this.migrationsManager=new nn(this.identityManager,this[sn("0x19")],this.storageManager),this[sn("0x8")]=this[sn("0xf")][sn("0x8")]||!1,this.eventsManager=new ki(this[sn("0x1b")],this.storageManager,this[sn("0x1c")],this[sn("0x19")],this[sn("0x1a")],this[sn("0x16")],this[sn("0xf")][sn("0x10")],this[sn("0x8")]),this[sn("0x1e")]=new Wi(this[sn("0x19")],this.identityManager,this.configManager)}get actions(){return this.configManager[sn("0x1f")]("actions",[])}async getActions(){return await this.isInitialized(),this.actions}async[sn("0x20")](){if(!this[sn("0x8")])throw new Error(sn("0x21"));if(!await this.isInitialized()){const e=Date[sn("0x22")]();return Pe[sn("0x23")](sn("0x24")),{actionToken:"disabled_sdk_"+e}}return this[sn("0x1a")][sn("0x25")]()&&await this[sn("0x26")].refreshSessionToken(),this[sn("0x1a")][sn("0x20")]()}async[sn("0x27")](e){const t="object"!=typeof e?e:null==e?void 0:e[sn("0x28")];return Pe[sn("0x23")]("sdk init started"),this[sn("0x7")]=(async()=>(await this[sn("0x1b")][sn("0x29")](this[sn("0x1a")][sn("0x2a")]()),this[sn("0x2b")]=this[sn("0x2b")]||!this[sn("0x1b")][sn("0x1f")](un,!1),!this[sn("0x2b")]&&(this[sn("0x9")]=this[sn("0x9")]||this[sn("0x1b")].getConfValue(cn,!1),this[sn("0x9")]&&this[sn("0xa")]&&await this.migrationsManager[sn("0x2c")](this[sn("0xa")]),Pe[sn("0x12")]=Pe[sn("0x12")]||!!this[sn("0x1b")][sn("0x1f")](dn,!1),await this[sn("0x26")][sn("0x2d")]()[sn("0x2e")]((()=>{})),await this[sn("0x26")].sendPageLoadEvent().catch((()=>{})),await this[sn("0x2f")](t).catch((()=>{})),this[sn("0x26")][sn("0x30")](),await this[sn("0x26")].flush()[sn("0x2e")]((()=>{})),Pe.info("sdk init done"),!0)))(),await this[sn("0x7")]}async[sn("0x31")](){return null!==this[sn("0x7")]&&await this.initializationPromise}async[sn("0x32")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Date[sn("0x22")]();if(!await this[sn("0x31")]())return Pe[sn("0x23")](sn("0x24")),{actionToken:"disabled_sdk_"+i};if(!this.actions[sn("0x33")](e))return Pe[sn("0x34")]("Invalid action type",{actionType:e}),{actionToken:oi.CLIENT+sn("0x35")+e+"'_"+i};const n=null==t?void 0:t.claimedUserIdType;if(n&&!hn[sn("0x33")](n))return Pe.warn(sn("0x36"),{claimedUserIdType:n}),{actionToken:sn("0x37")+n+"_"+i};let r;this[sn("0x1b")][sn("0x1f")]("enableDeviceAttributesInActions",!1)&&(r=await this.deviceDataManager.getDeviceData());const a=u({type:Ze[sn("0x38")],attributes:u(u(u(u(u(u(u(u(u(u(u(u({action_type:e},(null==t?void 0:t[sn("0x39")])&&{correlation_id:t[sn("0x39")]}),(null==t?void 0:t[sn("0x3a")])&&{claimed_user_id:t[sn("0x3a")]}),n&&{claimed_user_id_type:n}),(null==t?void 0:t[sn("0x3b")])&&{public_key:t.publicKey}),(null==t?void 0:t[sn("0x3c")])&&{extension_metadata:t[sn("0x3c")]}),(null==t?void 0:t[sn("0x3d")])&&{extension_device_attributes:t.extensionDeviceAttributes}),(null==t?void 0:t[sn("0x3e")])&&{suspicious_signals:t[sn("0x3e")]}),(null==t?void 0:t[sn("0x3f")])&&{suspicious_context:t.suspiciousContext}),(null==t?void 0:t.downloadFile)&&{download_file:t[sn("0x40")]}),(null==t?void 0:t.uploadFile)&&{upload_file:t[sn("0x41")]}),(null==t?void 0:t[sn("0x42")])&&{transactionData:t[sn("0x42")]}),r)},(null==t?void 0:t[sn("0x43")])&&{customAttributes:t[sn("0x43")]});try{const e=await this[sn("0x26")].emitEvent(a),{actionToken:t}=e;if(!t)throw new ui(new Error(sn("0x44")+(typeof e==sn("0x45")?JSON[sn("0x46")](e)[sn("0x47")](15):e)),oi[sn("0x48")]);return e}catch(t){return{actionToken:t instanceof ui?t.errorSpace===oi[sn("0x49")]?t[sn("0x4a")]+"_error_"+e+"_"+t[sn("0x4b")]+"_'"+t[sn("0x4c")]+"'_"+i:t[sn("0x4a")]+"_error_"+e+"_'"+t[sn("0x4c")]+"'_"+i:sn("0x4d")+e+"_"+i}}}async[sn("0x4e")](e){return await this[sn("0x31")]()?this.updateUserId(e):(Pe[sn("0x23")](sn("0x24")),!1)}async[sn("0x2f")](e){if(ln.includes(e))return Pe.info(sn("0x4f"),{userId:e}),!1;e=e[sn("0x11")](),Pe.info("identifyUser",{userId:e});const t=this[sn("0x1a")].getUserId();return t===e||(this.identityManager[sn("0x50")](e),!!(await this.eventsManager[sn("0x51")]({type:Ze[sn("0x52")],attributes:{previous_user_id:t,user_id:e}}))[sn("0x53")])}async[sn("0x54")](){if(!await this[sn("0x31")]())return Pe[sn("0x23")](sn("0x24")),!1;const e=this[sn("0x1a")][sn("0x55")]();return null!=e&&this[sn("0x1a")][sn("0x56")](),!!(await this[sn("0x26")][sn("0x51")]({type:Ze[sn("0x52")],attributes:{previous_user_id:e}})).deviceId}async[sn("0x57")](e){return await this.identifyUser(e)}async[sn("0x58")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this[sn("0x57")](e,t)}async[sn("0x59")](){return await this[sn("0x54")]()}}pn[sn("0xc")]=!1,document[sn("0x5c")](new CustomEvent(sn("0x5e")));var gn,fn,mn=["flush","events","MODULE_INITIALIZED","moduleMetadata","getInitConfig","init","utils","exceptions","TsError","setUser","setAuthenticatedUser","clearUser","identifyUser","unidentifiedUser","getSessionToken","identityManager","getDeviceId","getClientId","eventsManager"];gn=mn,fn=400,function(e){for(;--e;)gn.push(gn.shift())}(++fn);var _n=function(e,t){return mn[e-=0]};let xn=null;Se[_n("0x0")].on(Se[_n("0x0")][_n("0x1")],(()=>{const{clientId:e,drs:t}=Se[_n("0x2")][_n("0x3")](),i=t||{},{enabled:n,userId:r}=i,a=h(i,ye);!1!==n&&(xn=new pn(e,a),xn[_n("0x4")]({userId:r}))}));const vn=function(){return function(e){if(!e)throw new(Se[_n("0x5")][_n("0x6")][_n("0x7")])("not_initialized","tsPlatform not initialized")}(xn),xn[_n("0xd")]()};class bn extends Error{constructor(e,t,i){super(i),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}}const yn={BASE:window.location.origin,VERSION:"",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var wn,En,kn,An;!function(e){var t;(t=e.feedback||(e.feedback={})).OK="ok",t.OTHER="other",t.DOCUMENT_NOT_FOUND="document_not_found",t.FACE_NOT_FOUND="face_not_found",t.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",t.OBSTRUCTED="obstructed",t.BLUR="blur",t.GLARE="glare",t.DOCUMENT_NOT_SUPPORTED="document_not_supported",t.DOCUMENT_NOT_MATCHING="document_not_matching",t.WRONG_DOCUMENT_SIDE="wrong_document_side",t.MULTI_FACE="multi_face",t.FACE_ROTATED="face_rotated",t.FACE_TOO_SMALL="face_too_small",t.FACE_TOO_CLOSE="face_too_close",t.CLOSED_EYES="closed_eyes",t.FACE_ANGLE_TOO_LARGE="face_angle_too_large",t.FACE_CLOSE_TO_BORDER="face_close_to_border",t.FACE_OCCLUDED="face_occluded",t.FACE_CROPPED="face_cropped",t.BARCODE_NOT_FOUND="barcode_not_found",t.GLARE_SELFIE="glare_selfie",t.BLUR_SELFIE="blur_selfie",t.RESTRICTED_CRITERIA="restricted_criteria"}(wn||(wn={})),function(e){var t;(t=e.image_type||(e.image_type={})).DOCUMENT_FRONT="document_front",t.DOCUMENT_BACK="document_back",t.SELFIE="selfie"}(En||(En={})),function(e){var t,i;(t=e.status||(e.status={})).PENDING="pending",t.CAPTURING="capturing",t.PROCESSING="processing",t.RECAPTURE="recapture",t.COMPLETE="complete",t.ERROR="error",t.EXPIRED="expired",(i=e.recapture_reason||(e.recapture_reason={})).IMAGE_MISSING="image_missing",i.DOCUMENT_EXPIRED="document_expired",i.DOCUMENT_NOT_SUPPORTED="document_not_supported",i.DOCUMENT_DAMAGED="document_damaged",i.POOR_IMAGE_QUALITY="poor_image_quality",i.DOCUMENT_NOT_FOUND="document_not_found",i.OBSTRUCTED="obstructed",i.BLUR="blur",i.GLARE="glare",i.DOCUMENT_NOT_MATCHING="document_not_matching",i.WRONG_DOCUMENT_SIDE="wrong_document_side",i.FACE_NOT_FOUND="face_not_found",i.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",i.INVALID_INPUT="invalid_input",i.MULTI_FACE="multi_face",i.FACE_ROTATED="face_rotated",i.FACE_TOO_SMALL="face_too_small",i.FACE_TOO_CLOSE="face_too_close",i.CLOSED_EYES="closed_eyes",i.FACE_ANGLE_TOO_LARGE="face_angle_too_large",i.FACE_CLOSE_TO_BORDER="face_close_to_border",i.FACE_OCCLUDED="face_occluded",i.FACE_CROPPED="face_cropped",i.BARCODE_NOT_FOUND="barcode_not_found",i.GLARE_SELFIE="glare_selfie",i.BLUR_SELFIE="blur_selfie",i.NO_FACE="no_face",i.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(kn||(kn={})),function(e){var t;(t=e.client_type||(e.client_type={})).HOSTED_APP="hosted_app",t.MOBILE_SDK="mobile_sdk"}(An||(An={}));var Cn,Dn={exports:{}};var Sn,Tn,In=(Cn||(Cn=1,Sn=Dn,Tn=Dn.exports,function(e,t){var i="function",n="undefined",r="object",a="string",o="major",s="model",l="name",u="type",c="vendor",d="version",h="architecture",p="console",g="mobile",f="tablet",m="smarttv",_="wearable",x="embedded",v="Amazon",b="Apple",y="ASUS",w="BlackBerry",E="Browser",k="Chrome",A="Firefox",C="Google",D="Huawei",S="LG",T="Microsoft",I="Motorola",M="Opera",B="Samsung",F="Sharp",z="Sony",R="Xiaomi",O="Zebra",P="Facebook",N="Chromium OS",L="Mac OS",U=" Browser",j=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},q=function(e,t){return typeof e===a&&-1!==$(t).indexOf($(e))},$=function(e){return e.toLowerCase()},V=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===n?e:e.substring(0,500)},H=function(e,n){for(var a,o,s,l,u,c,d=0;d<n.length&&!u;){var h=n[d],p=n[d+1];for(a=o=0;a<h.length&&!u&&h[a];)if(u=h[a++].exec(e))for(s=0;s<p.length;s++)c=u[++o],typeof(l=p[s])===r&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):t:this[l[0]]=c?l[1].call(this,c,l[2]):t:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):t):this[l]=c||t;d+=2}},G=function(e,i){for(var n in i)if(typeof i[n]===r&&i[n].length>0){for(var a=0;a<i[n].length;a++)if(q(i[n][a],e))return"?"===n?t:n}else if(q(i[n],e))return"?"===n?t:n;return i.hasOwnProperty("*")?i["*"]:e},K={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,d],[/opios[\/ ]+([\w\.]+)/i],[d,[l,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[d,[l,M+" GX"]],[/\bopr\/([\w\.]+)/i],[d,[l,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[d,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,d],[/quark(?:pc)?\/([-\w\.]+)/i],[d,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[d,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[l,"UC"+E]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[d,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[d,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[d,[l,"Smart Lenovo "+E]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+E],d],[/\bfocus\/([\w\.]+)/i],[d,[l,A+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[l,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[l,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[l,"MIUI "+E]],[/fxios\/([-\w\.]+)/i],[d,[l,A]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360"+U]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],d],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+U],d],[/samsungbrowser\/([\w\.]+)/i],[d,[l,B+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],d],[/metasr[\/ ]?([\d\.]+)/i],[d,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,d],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,P],d],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[d,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[l,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,k+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[l,"Android "+E]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[d,G,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],d],[/(wolvic)\/([\w\.]+)/i],[l,d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[l,A+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,[d,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[d,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,$]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",$]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,$]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[c,B],[u,f]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[c,B],[u,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[c,b],[u,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[c,b],[u,f]],[/(macintosh);/i],[s,[c,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[c,F],[u,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[c,D],[u,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[c,D],[u,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[s,/_/g," "],[c,R],[u,g]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[c,R],[u,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[c,"OPPO"],[u,g]],[/\b(opd2\d{3}a?) bui/i],[s,[c,"OPPO"],[u,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[c,"Vivo"],[u,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[c,"Realme"],[u,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[c,I],[u,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[c,I],[u,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[c,S],[u,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[c,S],[u,g]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[c,"Lenovo"],[u,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[c,"Nokia"],[u,g]],[/(pixel c)\b/i],[s,[c,C],[u,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[c,C],[u,g]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[c,z],[u,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[c,z],[u,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[c,"OnePlus"],[u,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[c,v],[u,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[c,v],[u,g]],[/(playbook);[-\w\),; ]+(rim)/i],[s,c,[u,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[c,w],[u,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[c,y],[u,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[c,y],[u,g]],[/(nexus 9)/i],[s,[c,"HTC"],[u,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[c,[s,/_/g," "],[u,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[c,"TCL"],[u,f]],[/(itel) ((\w+))/i],[[c,$],s,[u,G,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[c,"Acer"],[u,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[c,"Meizu"],[u,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[c,"Ulefone"],[u,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[c,"Nothing"],[u,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[c,s,[u,g]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[c,s,[u,f]],[/(surface duo)/i],[s,[c,T],[u,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[c,"Fairphone"],[u,g]],[/(u304aa)/i],[s,[c,"AT&T"],[u,g]],[/\bsie-(\w*)/i],[s,[c,"Siemens"],[u,g]],[/\b(rct\w+) b/i],[s,[c,"RCA"],[u,f]],[/\b(venue[\d ]{2,7}) b/i],[s,[c,"Dell"],[u,f]],[/\b(q(?:mv|ta)\w+) b/i],[s,[c,"Verizon"],[u,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[c,"Barnes & Noble"],[u,f]],[/\b(tm\d{3}\w+) b/i],[s,[c,"NuVision"],[u,f]],[/\b(k88) b/i],[s,[c,"ZTE"],[u,f]],[/\b(nx\d{3}j) b/i],[s,[c,"ZTE"],[u,g]],[/\b(gen\d{3}) b.+49h/i],[s,[c,"Swiss"],[u,g]],[/\b(zur\d{3}) b/i],[s,[c,"Swiss"],[u,f]],[/\b((zeki)?tb.*\b) b/i],[s,[c,"Zeki"],[u,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],s,[u,f]],[/\b(ns-?\w{0,9}) b/i],[s,[c,"Insignia"],[u,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[c,"NextBook"],[u,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],s,[u,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],s,[u,g]],[/\b(ph-1) /i],[s,[c,"Essential"],[u,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[c,"Envizen"],[u,f]],[/\b(trio[-\w\. ]+) b/i],[s,[c,"MachSpeed"],[u,f]],[/\btu_(1491) b/i],[s,[c,"Rotor"],[u,f]],[/(shield[\w ]+) b/i],[s,[c,"Nvidia"],[u,f]],[/(sprint) (\w+)/i],[c,s,[u,g]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[c,T],[u,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[c,O],[u,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[c,O],[u,g]],[/smart-tv.+(samsung)/i],[c,[u,m]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[c,B],[u,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,S],[u,m]],[/(apple) ?tv/i],[c,[s,b+" TV"],[u,m]],[/crkey/i],[[s,k+"cast"],[c,C],[u,m]],[/droid.+aft(\w+)( bui|\))/i],[s,[c,v],[u,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[c,F],[u,m]],[/(bravia[\w ]+)( bui|\))/i],[s,[c,z],[u,m]],[/(mitv-\w{5}) bui/i],[s,[c,R],[u,m]],[/Hbbtv.*(technisat) (.*);/i],[c,s,[u,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[c,V],[s,V],[u,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,s,[u,p]],[/droid.+; (shield) bui/i],[s,[c,"Nvidia"],[u,p]],[/(playstation [345portablevi]+)/i],[s,[c,z],[u,p]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[c,T],[u,p]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[s,[c,B],[u,_]],[/((pebble))app/i],[c,s,[u,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[c,b],[u,_]],[/droid.+; (glass) \d/i],[s,[c,C],[u,_]],[/droid.+; (wt63?0{2,3})\)/i],[s,[c,O],[u,_]],[/(quest( \d| pro)?)/i],[s,[c,P],[u,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,x]],[/(aeobc)\b/i],[s,[c,v],[u,x]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[u,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[u,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,g]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,d],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[d,G,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,G,K],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,L],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,d],[/\(bb(10);/i],[d,[l,w]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[l,A+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[d,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[d,[l,k+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,N],d],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,d],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,d]]},Y=function p(m,_){if(typeof m===r&&(_=m,m=t),!(this instanceof p))return new p(m,_).getResult();var x=typeof e!==n&&e.navigator?e.navigator:t,v=m||(x&&x.userAgent?x.userAgent:""),b=x&&x.userAgentData?x.userAgentData:t,y=_?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(Z,_):Z,w=x&&x.userAgent==v;return this.getBrowser=function(){var e={};return e[l]=t,e[d]=t,H.call(e,v,y.browser),e[o]=function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:t}(e[d]),w&&x&&x.brave&&typeof x.brave.isBrave==i&&(e[l]="Brave"),e},this.getCPU=function(){var e={};return e[h]=t,H.call(e,v,y.cpu),e},this.getDevice=function(){var e={};return e[c]=t,e[s]=t,e[u]=t,H.call(e,v,y.device),w&&!e[u]&&b&&b.mobile&&(e[u]=g),w&&"Macintosh"==e[s]&&x&&typeof x.standalone!==n&&x.maxTouchPoints&&x.maxTouchPoints>2&&(e[s]="iPad",e[u]=f),e},this.getEngine=function(){var e={};return e[l]=t,e[d]=t,H.call(e,v,y.engine),e},this.getOS=function(){var e={};return e[l]=t,e[d]=t,H.call(e,v,y.os),w&&!e[l]&&b&&b.platform&&"Unknown"!=b.platform&&(e[l]=b.platform.replace(/chrome os/i,N).replace(/macos/i,L)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===a&&e.length>500?V(e,500):e,this},this.setUA(v),this};Y.VERSION="1.0.39",Y.BROWSER=j([l,d,o]),Y.CPU=j([h]),Y.DEVICE=j([s,c,u,p,g,m,f,_,x]),Y.ENGINE=Y.OS=j([l,d]),Sn.exports&&(Tn=Sn.exports=Y),Tn.UAParser=Y;var W=typeof e!==n&&(e.jQuery||e.Zepto);if(W&&!W.ua){var J=new Y;W.ua=J.getResult(),W.ua.get=function(){return J.getUA()},W.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var i in t)W.ua[i]=t[i]}}}("object"==typeof window?window:Dn.exports)),Dn.exports);const Mn="1.4.8",Bn=In.UAParser(),Fn=Mn;function zn(e,t){var i,n,r,a,o;return{Authorization:`Bearer ${t}`,"ts-sdk-version":Fn,"ts-client-id":e,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(i=null==Bn?void 0:Bn.os)||void 0===i?void 0:i.name,"ts-os-version":null===(n=null==Bn?void 0:Bn.os)||void 0===n?void 0:n.version,"ts-device-model":null===(r=null==Bn?void 0:Bn.device)||void 0===r?void 0:r.model,"ts-manufacturer":null===(a=null==Bn?void 0:Bn.device)||void 0===a?void 0:a.vendor,"ts-browser":null===(o=null==Bn?void 0:Bn.browser)||void 0===o?void 0:o.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var Rn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},On=[],Pn=[],Nn="undefined"!=typeof Uint8Array?Uint8Array:Array,Ln=!1;function Un(){Ln=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,i=e.length;t<i;++t)On[t]=e[t],Pn[e.charCodeAt(t)]=t;Pn["-".charCodeAt(0)]=62,Pn["_".charCodeAt(0)]=63}function jn(e,t,i){for(var n,r,a=[],o=t;o<i;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(On[(r=n)>>18&63]+On[r>>12&63]+On[r>>6&63]+On[63&r]);return a.join("")}function qn(e){var t;Ln||Un();for(var i=e.length,n=i%3,r="",a=[],o=16383,s=0,l=i-n;s<l;s+=o)a.push(jn(e,s,s+o>l?l:s+o));return 1===n?(t=e[i-1],r+=On[t>>2],r+=On[t<<4&63],r+="=="):2===n&&(t=(e[i-2]<<8)+e[i-1],r+=On[t>>10],r+=On[t>>4&63],r+=On[t<<2&63],r+="="),a.push(r),a.join("")}function $n(e,t,i,n,r){var a,o,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,d=i?r-1:0,h=i?-1:1,p=e[t+d];for(d+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)}function Vn(e,t,i,n,r,a){var o,s,l,u=8*a-r-1,c=(1<<u)-1,d=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,g=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,r),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;e[i+p]=255&s,p+=g,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[i+p]=255&o,p+=g,o/=256,u-=8);e[i+p-g]|=128*f}var Hn={}.toString,Gn=Array.isArray||function(e){return"[object Array]"==Hn.call(e)};function Kn(){return Yn.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Zn(e,t){if(Kn()<t)throw new RangeError("Invalid typed array length");return Yn.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Yn.prototype:(null===e&&(e=new Yn(t)),e.length=t),e}function Yn(e,t,i){if(!(Yn.TYPED_ARRAY_SUPPORT||this instanceof Yn))return new Yn(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Xn(this,e)}return Wn(this,e,t,i)}function Wn(e,t,i,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n);Yn.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Yn.prototype:e=Qn(e,t);return e}(e,t,i,n):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!Yn.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|ir(t,i);e=Zn(e,n);var r=e.write(t,i);r!==n&&(e=e.slice(0,r));return e}(e,t,i):function(e,t){if(tr(t)){var i=0|er(t.length);return 0===(e=Zn(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?Zn(e,0):Qn(e,t);if("Buffer"===t.type&&Gn(t.data))return Qn(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Jn(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Xn(e,t){if(Jn(t),e=Zn(e,t<0?0:0|er(t)),!Yn.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function Qn(e,t){var i=t.length<0?0:0|er(t.length);e=Zn(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function er(e){if(e>=Kn())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Kn().toString(16)+" bytes");return 0|e}function tr(e){return!(null==e||!e._isBuffer)}function ir(e,t){if(tr(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return Tr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Ir(e).length;default:if(n)return Tr(e).length;t=(""+t).toLowerCase(),n=!0}}function nr(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return xr(this,t,i);case"utf8":case"utf-8":return gr(this,t,i);case"ascii":return mr(this,t,i);case"latin1":case"binary":return _r(this,t,i);case"base64":return pr(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vr(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function rr(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function ar(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=Yn.from(t,n)),tr(t))return 0===t.length?-1:or(e,t,i,n,r);if("number"==typeof t)return t&=255,Yn.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):or(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function or(e,t,i,n,r){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,i/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){var c=-1;for(a=i;a<s;a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(i+l>s&&(i=s-l),a=i;a>=0;a--){for(var d=!0,h=0;h<l;h++)if(u(e,a+h)!==u(t,h)){d=!1;break}if(d)return a}return-1}function sr(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function lr(e,t,i,n){return Mr(Tr(t,e.length-i),e,i,n)}function ur(e,t,i,n){return Mr(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function cr(e,t,i,n){return ur(e,t,i,n)}function dr(e,t,i,n){return Mr(Ir(t),e,i,n)}function hr(e,t,i,n){return Mr(function(e,t){for(var i,n,r,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(i=e.charCodeAt(o))>>8,r=i%256,a.push(r),a.push(n);return a}(t,e.length-i),e,i,n)}function pr(e,t,i){return 0===t&&i===e.length?qn(e):qn(e.slice(t,i))}function gr(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r<i;){var a,o,s,l,u=e[r],c=null,d=u>239?4:u>223?3:u>191?2:1;if(r+d<=i)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[r+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[r+1],o=e[r+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[r+1],o=e[r+2],s=e[r+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=d}return function(e){var t=e.length;if(t<=fr)return String.fromCharCode.apply(String,e);var i="",n=0;for(;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=fr));return i}(n)}Yn.TYPED_ARRAY_SUPPORT=void 0===Rn.TYPED_ARRAY_SUPPORT||Rn.TYPED_ARRAY_SUPPORT,Kn(),Yn.poolSize=8192,Yn._augment=function(e){return e.__proto__=Yn.prototype,e},Yn.from=function(e,t,i){return Wn(null,e,t,i)},Yn.TYPED_ARRAY_SUPPORT&&(Yn.prototype.__proto__=Uint8Array.prototype,Yn.__proto__=Uint8Array),Yn.alloc=function(e,t,i){return function(e,t,i,n){return Jn(t),t<=0?Zn(e,t):void 0!==i?"string"==typeof n?Zn(e,t).fill(i,n):Zn(e,t).fill(i):Zn(e,t)}(null,e,t,i)},Yn.allocUnsafe=function(e){return Xn(null,e)},Yn.allocUnsafeSlow=function(e){return Xn(null,e)},Yn.isBuffer=function(e){return null!=e&&(!!e._isBuffer||Br(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Br(e.slice(0,0))}(e))},Yn.compare=function(e,t){if(!tr(e)||!tr(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,a=Math.min(i,n);r<a;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},Yn.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Yn.concat=function(e,t){if(!Gn(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Yn.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=Yn.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var a=e[i];if(!tr(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},Yn.byteLength=ir,Yn.prototype._isBuffer=!0,Yn.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)rr(this,t,t+1);return this},Yn.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)rr(this,t,t+3),rr(this,t+1,t+2);return this},Yn.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)rr(this,t,t+7),rr(this,t+1,t+6),rr(this,t+2,t+5),rr(this,t+3,t+4);return this},Yn.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?gr(this,0,e):nr.apply(this,arguments)},Yn.prototype.equals=function(e){if(!tr(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Yn.compare(this,e)},Yn.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Yn.prototype.compare=function(e,t,i,n,r){if(!tr(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(r>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(n,r),u=e.slice(t,i),c=0;c<s;++c)if(l[c]!==u[c]){a=l[c],o=u[c];break}return a<o?-1:o<a?1:0},Yn.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},Yn.prototype.indexOf=function(e,t,i){return ar(this,e,t,i,!0)},Yn.prototype.lastIndexOf=function(e,t,i){return ar(this,e,t,i,!1)},Yn.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return sr(this,e,t,i);case"utf8":case"utf-8":return lr(this,e,t,i);case"ascii":return ur(this,e,t,i);case"latin1":case"binary":return cr(this,e,t,i);case"base64":return dr(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return hr(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Yn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var fr=4096;function mr(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function _r(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function xr(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",a=t;a<i;++a)r+=Sr(e[a]);return r}function vr(e,t,i){for(var n=e.slice(t,i),r="",a=0;a<n.length;a+=2)r+=String.fromCharCode(n[a]+256*n[a+1]);return r}function br(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function yr(e,t,i,n,r,a){if(!tr(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function wr(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-i,2);r<a;++r)e[i+r]=(t&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function Er(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-i,4);r<a;++r)e[i+r]=t>>>8*(n?r:3-r)&255}function kr(e,t,i,n,r,a){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Ar(e,t,i,n,r){return r||kr(e,0,i,4),Vn(e,t,i,n,23,4),i+4}function Cr(e,t,i,n,r){return r||kr(e,0,i,8),Vn(e,t,i,n,52,8),i+8}Yn.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Yn.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=Yn.prototype;else{var r=t-e;i=new Yn(r,void 0);for(var a=0;a<r;++a)i[a]=this[a+e]}return i},Yn.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||br(e,t,this.length);for(var n=this[e],r=1,a=0;++a<t&&(r*=256);)n+=this[e+a]*r;return n},Yn.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||br(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},Yn.prototype.readUInt8=function(e,t){return t||br(e,1,this.length),this[e]},Yn.prototype.readUInt16LE=function(e,t){return t||br(e,2,this.length),this[e]|this[e+1]<<8},Yn.prototype.readUInt16BE=function(e,t){return t||br(e,2,this.length),this[e]<<8|this[e+1]},Yn.prototype.readUInt32LE=function(e,t){return t||br(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Yn.prototype.readUInt32BE=function(e,t){return t||br(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Yn.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||br(e,t,this.length);for(var n=this[e],r=1,a=0;++a<t&&(r*=256);)n+=this[e+a]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},Yn.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||br(e,t,this.length);for(var n=t,r=1,a=this[e+--n];n>0&&(r*=256);)a+=this[e+--n]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*t)),a},Yn.prototype.readInt8=function(e,t){return t||br(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Yn.prototype.readInt16LE=function(e,t){t||br(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},Yn.prototype.readInt16BE=function(e,t){t||br(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},Yn.prototype.readInt32LE=function(e,t){return t||br(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Yn.prototype.readInt32BE=function(e,t){return t||br(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Yn.prototype.readFloatLE=function(e,t){return t||br(e,4,this.length),$n(this,e,!0,23,4)},Yn.prototype.readFloatBE=function(e,t){return t||br(e,4,this.length),$n(this,e,!1,23,4)},Yn.prototype.readDoubleLE=function(e,t){return t||br(e,8,this.length),$n(this,e,!0,52,8)},Yn.prototype.readDoubleBE=function(e,t){return t||br(e,8,this.length),$n(this,e,!1,52,8)},Yn.prototype.writeUIntLE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||yr(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,a=0;for(this[t]=255&e;++a<i&&(r*=256);)this[t+a]=e/r&255;return t+i},Yn.prototype.writeUIntBE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||yr(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+i},Yn.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,1,255,0),Yn.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Yn.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,2,65535,0),Yn.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):wr(this,e,t,!0),t+2},Yn.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,2,65535,0),Yn.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):wr(this,e,t,!1),t+2},Yn.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,4,4294967295,0),Yn.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Er(this,e,t,!0),t+4},Yn.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,4,4294967295,0),Yn.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Er(this,e,t,!1),t+4},Yn.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);yr(this,e,t,i,r-1,-r)}var a=0,o=1,s=0;for(this[t]=255&e;++a<i&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},Yn.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);yr(this,e,t,i,r-1,-r)}var a=i-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},Yn.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,1,127,-128),Yn.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Yn.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,2,32767,-32768),Yn.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):wr(this,e,t,!0),t+2},Yn.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,2,32767,-32768),Yn.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):wr(this,e,t,!1),t+2},Yn.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,4,2147483647,-2147483648),Yn.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Er(this,e,t,!0),t+4},Yn.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||yr(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Yn.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Er(this,e,t,!1),t+4},Yn.prototype.writeFloatLE=function(e,t,i){return Ar(this,e,t,!0,i)},Yn.prototype.writeFloatBE=function(e,t,i){return Ar(this,e,t,!1,i)},Yn.prototype.writeDoubleLE=function(e,t,i){return Cr(this,e,t,!0,i)},Yn.prototype.writeDoubleBE=function(e,t,i){return Cr(this,e,t,!1,i)},Yn.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var r,a=n-i;if(this===e&&i<t&&t<n)for(r=a-1;r>=0;--r)e[r+t]=this[r+i];else if(a<1e3||!Yn.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},Yn.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Yn.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var o=tr(e)?e:Tr(new Yn(e,n).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var Dr=/[^+\/0-9A-Za-z-_]/g;function Sr(e){return e<16?"0"+e.toString(16):e.toString(16)}function Tr(e,t){var i;t=t||1/0;for(var n=e.length,r=null,a=[],o=0;o<n;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function Ir(e){return function(e){var t,i,n,r,a,o;Ln||Un();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new Nn(3*s/4-a),n=a>0?s-4:s;var l=0;for(t=0,i=0;t<n;t+=4,i+=3)r=Pn[e.charCodeAt(t)]<<18|Pn[e.charCodeAt(t+1)]<<12|Pn[e.charCodeAt(t+2)]<<6|Pn[e.charCodeAt(t+3)],o[l++]=r>>16&255,o[l++]=r>>8&255,o[l++]=255&r;return 2===a?(r=Pn[e.charCodeAt(t)]<<2|Pn[e.charCodeAt(t+1)]>>4,o[l++]=255&r):1===a&&(r=Pn[e.charCodeAt(t)]<<10|Pn[e.charCodeAt(t+1)]<<4|Pn[e.charCodeAt(t+2)]>>2,o[l++]=r>>8&255,o[l++]=255&r),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Dr,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Mr(e,t,i,n){for(var r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function Br(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}const Fr=e=>null!=e,zr=e=>"string"==typeof e,Rr=e=>zr(e)&&""!==e,Or=e=>"object"==typeof e&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.arrayBuffer&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),Pr=e=>e instanceof FormData,Nr=e=>{const t=[],i=(e,n)=>{Fr(n)&&(Array.isArray(n)?n.forEach((t=>{i(e,t)})):"object"==typeof n?Object.entries(n).forEach((t=>{let[n,r]=t;i(`${e}[${n}]`,r)})):((e,i)=>{t.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(i))}`)})(e,n))};return Object.entries(e).forEach((e=>{let[t,n]=e;i(t,n)})),t.length>0?`?${t.join("&")}`:""},Lr=async(e,t)=>"function"==typeof t?t(e):t,Ur=async(e,t)=>{const i=await Lr(t,e.TOKEN),n=await Lr(t,e.USERNAME),r=await Lr(t,e.PASSWORD),a=await Lr(t,e.HEADERS),o=Object.entries(u(u({Accept:"application/json"},a),t.headers)).filter((e=>{let[t,i]=e;return Fr(i)})).reduce(((e,t)=>{let[i,n]=t;return u(u({},e),{},{[i]:String(n)})}),{});if(Rr(i)&&(o.Authorization=`Bearer ${i}`),Rr(n)&&Rr(r)){const e=(e=>{try{return btoa(e)}catch(t){return Yn.from(e).toString("base64")}})(`${n}:${r}`);o.Authorization=`Basic ${e}`}return t.body&&(t.mediaType?o["Content-Type"]=t.mediaType:Or(t.body)?o["Content-Type"]=t.body.type||"application/octet-stream":zr(t.body)?o["Content-Type"]="text/plain":Pr(t.body)||(o["Content-Type"]="application/json")),new Headers(o)},jr=(e,t)=>new Promise((async(i,n)=>{try{const n=((e,t)=>{const i=e.ENCODE_PATH||encodeURI,n=null==t?void 0:t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,((e,n)=>{var r;return(null===(r=null==t?void 0:t.path)||void 0===r?void 0:r.hasOwnProperty(n))?i(String(t.path[n])):e})),r=`${e.BASE}${n}`;return t.query?`${r}${Nr(t.query)}`:r})(e,t),r=(e=>{if(e.formData){const t=new FormData,i=(e,i)=>{zr(i)||Or(i)?t.append(e,i):t.append(e,JSON.stringify(i))};return Object.entries(e.formData).filter((e=>{let[t,i]=e;return Fr(i)})).forEach((e=>{let[t,n]=e;Array.isArray(n)?n.forEach((e=>i(t,e))):i(t,n)})),t}})(t),a=(e=>{var t;if(void 0!==e.body)return(null===(t=e.mediaType)||void 0===t?void 0:t.includes("/json"))?JSON.stringify(e.body):zr(e.body)||Or(e.body)||Pr(e.body)?e.body:JSON.stringify(e.body)})(t),o=await Ur(e,t),s=await(async(e,t,i,n,r,a)=>{const o=new AbortController,s={headers:a,body:null!=n?n:r,method:t.method,signal:o.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),await fetch(i,s)})(e,t,n,a,r,o),l=await(async e=>{if(204!==e.status)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some((e=>t.toLowerCase().startsWith(e)))?await e.json():await e.text()}catch(e){console.error(e)}})(s),c=((e,t)=>{if(t){const i=e.headers.get(t);if(zr(i))return i}})(s,t.responseHeader),d={url:n,ok:s.ok,status:s.status,statusText:s.statusText,headers:s.headers,body:null!=c?c:l};((e,t)=>{var i,n;const r=u({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[t.status];if(r)throw new bn(e,t,r);if(!t.ok){const r=null!==(i=t.status)&&void 0!==i?i:"unknown",a=null!==(n=t.statusText)&&void 0!==n?n:"unknown",o=(()=>{try{return JSON.stringify(t.body,null,2)}catch(e){return}})();throw new bn(e,t,`Generic Error: status: ${r}; status text: ${a}; body: ${o}`)}})(t,d),i(d)}catch(e){n(e)}})),qr=new K("idv"),$r=Symbol(),Vr=Symbol(),Hr="verify-id-sdk";function Gr(e){return sessionStorage.getItem(e)}const Kr=new Map;function Zr(e,t){const i=Kr.get(e);qr.events.emit(i,t)}function Yr(e){Zr($r,e)}function Wr(e,t,i,n,r){Yr({type:"verification-result",status:t,step:e,state:n,callbackUrl:r,sessionId:i})}function Jr(e,t){Yr({type:"capture-error",errorCode:t,step:e})}function Xr(e,t,i){Yr({type:"api-request-error",errorCode:t,step:e,error:i})}function Qr(e,t){return jr(yn,e).catch((i=>(e.url.endsWith("/events")||Xr(t,"request-error",i.message),Promise.reject(i))))}async function ea(e){var t;yn.HEADERS=zn(e);const i=await function(e){return Qr({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${e}`},"init")}(e);return{autocapture_settings:null!==(t=i.body.autocapture_settings)&&void 0!==t?t:void 0,autocapture_enabled:i.body.autocapture_enabled}}Kr.set($r,$r),Kr.set(Vr,Vr);var ta={setStep(e,t){e.commit("setStep",t)},setSessionId(e,t){e.commit("setSessionId",t)},setIsCapturingProcessStarted(e,t){e.commit("setIsCapturingProcessStarted",t)},setServerPath(e,t){e.commit("setServerPath",t)},setStartToken(e,t){e.commit("setStartToken",t)},setRootElement(e,t){e.commit("setRootElement",t)},setLanguage(e,t){e.commit("setLanguage",t)},setCallback(e,t){e.commit("setCallback",t)},setUserToken(e,t){e.commit("setUserToken",t)},setConsentVersion(e,t){e.commit("setConsentVersion",t)},setMissingImages(e,t){e.commit("setMissingImages",t)},setClientId(e,t){e.commit("setClientId",t)},setStatus(e,t){e.commit("setStatus",t)},setMarkdownSupportText(e,t){e.commit("setMarkdownSupportText",t)},setVideoCaptureSettings(e,t){e.commit("setVideoCaptureSettings",t)},setCdnHost(e,t){e.commit("setCdnHost",t)},setIsImageSigningEnabled(e,t){e.commit("setIsImageSigningEnabled",t)},setAutoCaptureSettings(e,t){e.commit("setAutoCaptureSettings",t)}},ia={setStep:(e,t)=>(e.step=t,e),setSessionId:(e,t)=>(e.sessionId=t,e),setIsCapturingProcessStarted:(e,t)=>(e.isCapturingProcessStarted=t,e),setServerPath:(e,t)=>(e.serverPath=t,e),setStartToken:(e,t)=>(e.startToken=t,e),setRootElement:(e,t)=>(e.rootElementId=t,e),setLanguage:(e,t)=>(e.language=t,e),setCallback:(e,t)=>(e.callback=t,e),setUserToken:(e,t)=>(e.userToken=t,e),setConsentVersion:(e,t)=>(e.consentVersion=t,e),setMissingImages:(e,t)=>(e.missingImages=t,e),setClientId:(e,t)=>(e.clientId=t,e),setStatus:(e,t)=>(e.verificationStatus=t,e),setMarkdownSupportText:(e,t)=>(e.markdownSupportText=t,e),setVideoCaptureSettings:(e,t)=>(e.videoCaptureSettings=t,e),setCdnHost:(e,t)=>(e.cdnHost=t,e),setIsImageSigningEnabled:(e,t)=>(e.isImageSigningEnabled=t,e),setAutoCaptureSettings:(e,t)=>(e.autoCaptureSettings=t,e)};const na=new class{constructor(e){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(e,"actions")&&(this.actions=e.actions),Object.prototype.hasOwnProperty.call(e,"mutations")&&(this.mutations=e.mutations);const t=this;this.state=new Proxy(e.state||{},{get:function(e,t){return e[t]},set:function(e,i,n){return e[i]=n,Zr(Vr,{key:i,state:e}),"mutation"!==t.status&&console.warn(`You should use a mutation to set ${String(i)}`),t.status="resting",!0}})}dispatch(e,t){return"function"!=typeof this.actions[e]?(console.error(`Action "${e} doesn't exist.`),!1):(this.status="action",this.actions[e](this,t),!0)}commit(e,t){if("function"!=typeof this.mutations[e])return console.info(`Mutation "${e}" doesn't exist`),!1;this.status="mutation";const i=this.mutations[e](this.state,t);return this.state=i,!0}}({actions:ta,mutations:ia,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var ra;function aa(e){const t=[],i=function(e){var t,i,n,r;const a=e.stats.get(ra.BLUR_DETECTION),o=e.stats.get(ra.GLARE_DETECTION);if(!a&&!o||0===(null==a?void 0:a.durations.length)&&0===(null==o?void 0:o.durations.length))return;const s=la(null!==(t=null==a?void 0:a.durations)&&void 0!==t?t:null==o?void 0:o.durations),l=a&&o?Math.min(a.countSuccess,o.countSuccess):null!==(i=null==a?void 0:a.countSuccess)&&void 0!==i?i:null==o?void 0:o.countSuccess;return{name:sa(ra.BLUR_DETECTION),count_success:l,count_failure_glare:null!==(n=null==o?void 0:o.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(r=null==a?void 0:a.countFailed)&&void 0!==r?r:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(e);i&&t.push(i);for(const[i,n]of e.stats.entries())i!==ra.BLUR_DETECTION&&i!==ra.GLARE_DETECTION&&n.durations.length>0&&t.push(oa(n,i));return e.frameHandleDurations.length>0&&t.push(function(e){const t=la(e.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(e.stableCounts.reduce(((e,t)=>e+t),0)/e.stableCounts.length),avg_duration:t.duration_avg,std_duration:t.duration_std}}(e)),t}function oa(e,t){const i=la(e.durations);return{name:sa(t),count_success:e.countSuccess,count_failure:e.countFailed,avg_duration:i.duration_avg,std_duration:i.duration_std}}function sa(e){switch(e){case ra.BLUR_DETECTION:case ra.GLARE_DETECTION:return"blur_glare_detector";case ra.DOCUMENT_DETECTION:return"doc_detector";case ra.DOCUMENT_POSITION:return"doc_frame_detector";case ra.BARCODE_DETECTION:return"barcode_detector";case ra.FACE_DETECTION:return"face_detector";case ra.FACE_POSITION:return"face_frame_detector";default:return e}}function la(e){var t;if(e.length<2)return{duration_avg:null!==(t=e[0])&&void 0!==t?t:0,duration_std:0};const i=e.length,n=e.reduce(((e,t)=>e+t),0)/i;let r=0;for(let t=0;t<i;t++){const i=e[t];r+=Math.pow(i-n,2)}const a=Math.sqrt(r/(i-1));return{duration_avg:Math.round(n),duration_std:Math.round(a)}}!function(e){e.DOCUMENT_DETECTION="document_detection",e.DOCUMENT_POSITION="document_position",e.GLARE_DETECTION="glare_detection",e.BLUR_DETECTION="blur_detection",e.BARCODE_DETECTION="barcode_detection",e.FACE_DETECTION="face_detection",e.FACE_POSITION="face_position"}(ra||(ra={}));const ua=new class{createUploadImageEvent(e,t,i,n){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:e,request_total_time_ms:String(t),request_processing_time_ms:String(i),request_build_time_ms:String(n)}}}createPageViewEvent(e){return{event_type:"page_view",page_view_req:{page_name:e}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(e,t){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(e),model_stats:this.convertModelStats(t)}}}convertModelStats(e){return e.map((e=>({model_name:e.modelName,init_duration:Math.round(e.initDuration),download_duration:Math.round(e.downloadDuration)})))}createUserActionEvent(e,t,i){var n,r,a;const o={user_action_type:e,page_name:t,autocapture:!!i,autocapture_enabled:null!==(a=null===(r=null===(n=na.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&void 0!==a&&a};if(i){const e=aa(i);o.stats=e}return{event_type:"user_action",user_action_req:o}}createErrorEvent(e,t,i){return{event_type:"error",error_req:{error_name:t,error_description:e,step:i}}}createCameraNotAllowedEvent(e,t){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:e,step:t}}}createDrsInitFailureEvent(e,t){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:e,step:t}}}};async function ca(e,t,i,n,r){i?(yn.HEADERS=zn(n,t),await function(e,t,i){return Qr({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${e}/events`,path:{sid:e},body:t},i)}(i,r,e)):console.error("cannot send event, sessionId or startToken is not set")}const da=new class{handelEventData(e){if("session-id-acquired"===e.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const e=`${yn.BASE}/verify/api/v1/verification/${na.state.sessionId}/risk-session-token`,t=na.state.clientId,i=zn(t,na.state.userToken);vn().then((t=>{qr.http.httpPost(e,{session_token:t},null,i).catch((t=>{throw console.log("unable to send session token to IDV",e),console.error(t),t}))})).catch((t=>{var i,n,r,a;console.log("unable to get session token from DRS",e),console.error(t);const o=(null==t?void 0:t.message)||"failed to initialize DRS",s=ua.createDrsInitFailureEvent(o,"init");ca(null===(i=na.state)||void 0===i?void 0:i.step,null===(n=na.state)||void 0===n?void 0:n.userToken,null===(r=na.state)||void 0===r?void 0:r.sessionId,null===(a=na.state)||void 0===a?void 0:a.clientId,s).then((()=>{Yr({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(e){throw console.log("Error sending risk session token"),console.error(e),e}}};async function ha(e,t,i){const n=ua.createErrorEvent(e,t,i);await pa(i,n)}async function pa(e,t){var i,n,r,a,o;const s=null===(i=na.state)||void 0===i?void 0:i.userToken,l=(null===(n=na.state)||void 0===n?void 0:n.sessionId)||(null===(r=na.state)||void 0===r?void 0:r.startToken),u=null===(a=na.state)||void 0===a?void 0:a.clientId,c=(null===(o=na.state)||void 0===o?void 0:o.step)||e;await ca(c,s,l,u,t)}const ga=function(){var e,t;(null===(t=null===(e=na.state.autoCaptureSettings)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.debug)&&console.log(...arguments)};var fa;!function(e){e.DOCUMENT_DETECTOR="document_detector",e.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",e.FACE_LANDMARK="face_landmark"}(fa||(fa={}));const ma=["pdf417","qr_code"];class _a{constructor(){this.model=new BarcodeDetector({formats:ma})}async detect(e){const t=await this.model.detect(e);return ga("detectedBarcodes:",t),t.map((e=>({class:e.format,score:1,x:e.boundingBox.x,y:e.boundingBox.y,width:e.boundingBox.width,height:e.boundingBox.height,extra:e.rawValue})))}}var xa;!function(e){e.NOT_AVAILABLE="notAvailable",e.LOADING="loading",e.LOADED="loaded"}(xa||(xa={}));const va={[fa.DOCUMENT_DETECTOR]:{status:xa.LOADING},[fa.BLUR_GLARE_CLASSIFIER]:{status:xa.LOADING},[fa.FACE_LANDMARK]:{status:xa.LOADING}};const ba=[fa.DOCUMENT_DETECTOR,fa.BLUR_GLARE_CLASSIFIER],ya=async()=>{let e=!1;for(;!e;){const t=Object.values(va).filter((e=>e.status===xa.NOT_AVAILABLE));if(t.length>0)throw new Error(`Model not available: ${t.join(", ")}`);if(e=ba.every((e=>va[e].status===xa.LOADED)),e)return!0;await new Promise((e=>setTimeout(e,100)))}},wa=e=>"function"==typeof e,Ea=function(e){};qr.events.on(qr.events.MODULE_INITIALIZED,(function(){const{clientId:e,IDV:t}=qr.moduleMetadata.getInitConfig();if(!e||!t)return!1;const i=(null==t?void 0:t.serverPath)&&(n=null==t?void 0:t.serverPath,r="/verify",(null==n?void 0:n.endsWith(r))?n.slice(0,n.length-r.length):n);var n,r;yn.BASE=i||window.location.origin,na.dispatch("setClientId",e),na.dispatch("setRootElement",(null==t?void 0:t.rootElement)||"root-element"),na.dispatch("setServerPath",null==t?void 0:t.serverPath),na.dispatch("setLanguage",null==t?void 0:t.language),na.dispatch("setCallback",null==t?void 0:t.callback),na.dispatch("setConsentVersion",null==t?void 0:t.consentVersion),na.dispatch("setMarkdownSupportText",null==t?void 0:t.markdownSupportText),na.dispatch("setVideoCaptureSettings",null==t?void 0:t.videoCaptureSettings),na.dispatch("setCdnHost",null==t?void 0:t.cdnHost),na.dispatch("setIsImageSigningEnabled",null==t?void 0:t.isImageSigningEnabled),(null==t?void 0:t.callbacks)&&(e=>{let{callbacks:t,callback:i}=e;wa(t.sessionGranted)&&(ka=t.sessionGranted);wa(t.sessionStarted)&&(Aa=t.sessionStarted);wa(t.imageSubmitted)&&(Ca=t.imageSubmitted);wa(t.processing)&&(Da=t.processing);wa(t.completed)&&(Sa=t.completed);wa(t.recapture)&&(Ta=t.recapture);wa(t.error)&&(Ia=t.error);wa(i)&&(Ma=i)})(t);return na.dispatch("setStartToken",null==t?void 0:t.startToken),ea(na.state.clientId).then((e=>{!async function(e){if(null==e?void 0:e.autocapture_enabled){if("serviceWorker"in navigator)return na.dispatch("setAutoCaptureSettings",{enabled:!0,settings:e.autocapture_settings}),ga("service worker available"),void navigator.serviceWorker.addEventListener("message",(e=>{if(e.data&&"MODEL_READY"===e.data.type){const t=e.data.modelName;va[t]={status:xa.LOADED,imageDimensions:e.data.imageDimensions,loadingStats:u(u({},e.data.stats),{},{modelName:t})}}else if(e.data&&"MODEL_LOAD_ERROR"===e.data.type){const t=e.data.modelName;va[t].status=xa.NOT_AVAILABLE,ha(`${e.data.modelName} error: ${e.data.error}`,"model_load_error","init")}}));ha("service worker not available","service_worker_not_available","init")}na.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:e.autocapture_settings})}(e)})),function(e){Yr({type:"init",step:e})}("init"),!0})),qr.events.on($r,(function(e){switch(da.handelEventData(e),Ma(e),e.type){case"session-granted":ka({session:na.state.sessionId});break;case"session-id-acquired":Aa({session:na.state.sessionId});break;case"capture-image-result":Ca({session:na.state.sessionId},e.imageType);break;case"start-verification-processing":Da({session:na.state.sessionId});break;case"verification-complete":Sa({session:na.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":Ia({session:na.state.sessionId},e.errorCode,e.error);break;case"verification-recapture":Ta({session:na.state.sessionId},e.reason)}}));let ka=Ea,Aa=Ea,Ca=Ea,Da=Ea,Sa=Ea,Ta=Ea,Ia=Ea,Ma=e=>{};async function Ba(e,t,i){yn.HEADERS=zn(i,t);var n;return(await(n=e,Qr({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}function Fa(e){try{return JSON.parse(e)}catch(e){return console.error(e),null}}async function za(e,t,i,n){yn.HEADERS=zn(t);const r=await(a={start_token:e,accessed_from_desktop:!1,client_type:An.client_type.MOBILE_SDK,consent:{granted:!0,document_id:i},image_signing_public_key:n},Qr({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:a,mediaType:"application/json"},"init"));var a;return{sessionId:r.body.session_id,userToken:r.body.user_token,requiredImages:r.body.required_images}}async function Ra(e,t,i){let n,r,a;if(n)try{n=Gr(Hr);const e=JSON.parse(n);r=e.sessionId,a=e.userToken}catch(e){}try{let l;if(a){l=(await Ba(r,a,i)).missing_images}else{const u=qr.crypto.createCryptoBinding("sign"),c=await u.getPublicData(),d=await za(e,i,t,c.publicKey);r=d.sessionId,a=d.userToken,l=d.requiredImages,n=JSON.stringify({sessionId:r,userToken:a}),o=Hr,s=n,sessionStorage.setItem(o,s)}return{requiredImages:l,sessionId:r.toString(),userToken:a.toString()}}catch(e){throw console.log("Error starting session"),console.error(e),e}var o,s}function Oa(e){let{tagName:t,style:i,id:n="",className:r="",testid:a,options:o}=e;const s=document.createElement(t,o);return s.id=n,s.className=r,s.setAttribute("data-auto",a+"-auto"),Object.keys(i).forEach((e=>{s.style[e]=i[e]})),s}function Pa(e,t){Array.isArray(t)?t.forEach((t=>{e.appendChild(t)})):e.appendChild(t)}const Na={blur_message:"Please focus camera on the document before capturing",blur_title:"Blurred image",document_incorrect_position_message:"Please make sure the document is fully within the frame, and nothing covers it",document_incorrect_position_title:"Incorrect document position",document_not_found_message:"Make sure you capture a valid government issued ID",document_not_found_title:"Document not detected",document_not_matching_message:"Please make sure to capture the back side of the document",document_not_matching_title:"Back image mismatch",document_not_supported_message:"Please use a different government issued ID instead",document_not_supported_title:"Document not supported",capturing_in_progress_message:"Capturing, stay steady",capturing_in_progress_title:"Capturing in progress",face_not_found_message:"Ensure your face is not covered and fully visible",face_not_found_title:"Face not detected",glare_message:"Avoid any direct light reflecting with glare",glare_title:"Glare detected",main_title_document_back:"Back side",main_title_document_face:"Selfie",main_title_document_front:"Front side",obstructed_message:"Some of the document parts are covered or missing",obstructed_title:"Missing information",other_error_code_message:"Please try again",other_error_code_title:"An error occurred",page_header_document:"Scan document",loading_screen_small_title:"Preparing...",page_header_face:"Face Recognition",second_title_document_back:"Please place your document on a solid surface, back side up.",second_title_document_face:"Please position your face in the center of the oval below.",second_title_document_front:"Please place your document on a solid surface, photo side up.",wrong_document_side_message:"The wrong document side has been detected",wrong_document_side_title:"Wrong document side detected",face_angle_too_large_title:"your face is not directly aligned with the camera",face_angle_too_large_message:"Please take another photo with your face fully visible for accurate detection",face_close_to_border_title:"Your face is too close to the edge",face_close_to_border_message:"Please adjust your position and make sure your entire face is within the frame",face_too_small_title:"Your face is too distant from the edge",face_too_small_message:"Please move closer to the camera so your face is clearer and easier to detect",face_too_close_title:"Your face is too close ",face_too_close_message:"Please adjust your position and make sure your entire face is within the frame",face_cropped_title:"Your face is partially cropped",face_cropped_message:"Please adjust your position and make sure your entire face is within the frame for optimal",no_face_title:"Face not found",no_face_message:"Please move closer to the camera or adjust your position so your face is clearer and easier to detect",multi_face_title:"Multiple faces detected",multi_face_message:"Please make sure only one face is visible in the frame to proceed",blur_selfie_title:"The selfie is out of focus",blur_selfie_message:"Please try taking another one with clearer focus for better detection",glare_selfie_title:"Too much reflection in your selfie",glare_selfie_message:"Please try taking another photo with better lighting and without glare for accurate detection",closed_eyes_title:"It looks like your eyes are closed",closed_eyes_message:"Please retake the photo with your eyes open",face_occluded_title:"Your face is partially hidden",face_occluded_message:"Please take another photo with your face fully visible for accurate detection",face_rotated_title:"Your face is not directly aligned with the camera",face_rotated_message:"Please take another photo with your face fully visible for accurate detection",barcode_not_found_title:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",barcode_not_found_message:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",searching_document_autocapture:"Searching for document",capturing_document_autocapture:"Capturing, please hold steady",click_manual_autocapture:"Click to capture manually",glare_blur_issues_autocapture:"Please make sure there are no light reflections, and try again",doc_not_in_frame_issues_autocapture:"Please bring the document closer and ensure it is fully within the capture frame for a clear image.",doc_not_found_autocapture:"Looking for document",capturing_face_issue_closer:"Please move closer to the frame",second_title_face_autocapture:"Get ready! Your selfie will be auto-captured, or tap to capture it manually",capturing_face_autocapture3:"Capturing... please, hold steady for 3",capturing_face_autocapture2:"Capturing... please, hold steady for 2",capturing_face_autocapture1:"Capturing... please, hold steady for 1",selfie_approval_autocapture:"Great job! Approve your selfie to continue"};const La=new class{constructor(e){this.translations=e,this.translations=new Proxy(this.translations,{get:function(e,t){return e[t]},set:function(e,t,i){return e[t]=i,!0}})}overrideLanguage(e){Object.assign(this.translations,e)}translate(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];let r=this.translations[e];return r||(r=e),r.replace(/{(\d+)}/g,(function(e,t){return void 0!==i[t]?i[t]:e}))}}(Na),Ua={en:Na,es:{blur_message:"Favor enfoca la cámara en tú cédula antes de la captura",blur_title:"Imagen borrosa",document_incorrect_position_message:"Asegúrate de que la cédula esté completamente dentro del marco y nada la cubra",document_incorrect_position_title:"Posición incorrecta del documento",capturing_in_progress_title:"Capturando en progreso",capturing_in_progress_message:"Capturando, mantente estable",document_not_found_message:"Asegúrate de utilizar una cédula valida",document_not_found_title:"Cédula no detectada",document_not_matching_message:"Favor Asegúrate de capturar la parte trasera de tu cédula",document_not_matching_title:"Parte trasera no corresponde",document_not_supported_message:"Favor utliza tu cédula",document_not_supported_title:"Cédula no compatible",face_not_found_message:"Asegurase de no tapar su rostro",face_not_found_title:"Selfie no detectada",glare_message:"Evite luz directa que pueda generar brillo",glare_title:"Demasiado brillo",main_title_document_back:"Parte trasera de tu cédula",main_title_document_face:"Tómate un Selfie",main_title_document_front:"Parte frontal de tu cédula",obstructed_message:"Parte de la cédula documento no está visible o falta información",obstructed_title:"Falta información",other_error_code_message:"Intenta nuevamente",other_error_code_title:"Ha ocurrido un error",page_header_document:"Escanéa tu cédula",page_header_face:"Reconocimiento Facial",second_title_document_back:"Asegúrate de poner su cédula en una superfice plana con la parte trasera visible.",second_title_document_face:"Asegúrate de posicionar tu rostro en el centro del circulo.",second_title_document_front:"Asegúrate de poner su cédula en una superfice plana con la parte frontal visible.",wrong_document_side_message:"Lado incorrecto de tu cédula ha sido detectado",wrong_document_side_title:"Lado de tu cédula incorrecto",face_angle_too_large_title:"Tu rostro no está directamente alineado con la cámara.",face_angle_too_large_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_close_to_border_title:"Tu rostro está demasiado cerca del borde.",face_close_to_border_message:"Por favor, cambia la posicion de tu rostro y asegúrate de que todo tu rostro esté dentro del marco.",face_too_small_title:"Tu rostro está demasiado lejos del borde.",face_too_small_message:"Por favor, acércate más a la cámara para que tu rostro esté más claro y sea más fácil de detectar.",face_too_close_title:"Tu rostro está demasiado cerca",face_too_close_message:"Acomode la posición y asegúrese de que toda su rostro esté dentro del marco.",face_cropped_title:"Tu rostro está parcialmente recortado.",face_cropped_message:"Por favor, cambia tu posición y asegúrate de que todo tu rostro esté dentro del marco para una detección óptima.",no_face_title:"Rostro no encontrado.",no_face_message:"Por favor, acércate más a la cámara o ajusta tu posición para que tu rostro esté más claro y sea más fácil de detectar.",multi_face_title:"Se detectaron múltiples rostros.",multi_face_message:"Por favor, asegúrate de que solo haya un rostro visible en el marco para continuar.",blur_selfie_title:"El autorretrato está fuera de foco.",blur_selfie_message:"Por favor, intenta tomar una nueva imagen con un enfoque más claro para una mejor detección.",glare_selfie_title:"Demasiado reflejo en tu autorretrato.",glare_selfie_message:"Por favor, intenta tomar otra foto con una mejor iluminación y sin brillos para una detección precisa.",closed_eyes_title:"Parece que tienes los ojos cerrados.",closed_eyes_message:"Por favor, vuelve a tomar la foto con los ojos abiertos.",face_occluded_title:"Tu rostro está parcialmente oculto.",face_occluded_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_rotated_title:"Tu rostro está fuera de foco.",face_rotated_message:"Por favor, intenta tomar otro con un enfoque más claro para una mejor detección.",barcode_not_found_title:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",barcode_not_found_message:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar más despejado.",searching_document_autocapture:"Buscando la cedula",capturing_document_autocapture:"Capturando, por favor mantente quieto",click_manual_autocapture:"Haz clic para capturar manualmente",glare_blur_issues_autocapture:"Por favor, asegúrate de que no haya reflejos de luz antes de intentarlo de nuevo",doc_not_in_frame_issues_autocapture:"Por favor, acerque la cedula y asegúrese de que esté completamente dentro del marco de captura para obtener una imagen clara",second_title_face_autocapture:"¡Prepárate! Tu selfie se capturará automáticamente, o toca para capturarla manualmente",capturing_face_autocapture3:"Capturando... por favor, mantente quieto durante 3",capturing_face_autocapture2:"Capturando... por favor, mantente quieto durante 2",capturing_face_autocapture1:"Capturando... por favor, mantente quieto durante 1",selfie_approval_autocapture:"¡Buen trabajo! Aprueba tu selfie para continuar"},pt:{blur_message:"Por favor, foque a câmera no documento antes de capturar",blur_title:"Imagem borrada",document_incorrect_position_message:"Certifique-se de que o documento esteja totalmente dentro do quadro e nada o cubra",document_incorrect_position_title:"Posição incorreta do documento",document_not_found_message:"Certifique-se de capturar um documento válido emitido pelo governo",document_not_found_title:"Documento não detectado",document_not_matching_message:"Por favor, certifique-se de capturar o verso do documento",document_not_matching_title:"Imagem do verso incorreta",document_not_supported_message:"Por favor, utilize um documento diferente emitido pelo governo",document_not_supported_title:"Documento não suportado",capturing_in_progress_message:"Capturando, mantenha-se firme",capturing_in_progress_title:"Captura em andamento",face_not_found_message:"Certifique-se de que seu rosto não esteja coberto e esteja totalmente visível",face_not_found_title:"Rosto não detectado",glare_message:"Evite qualquer luz direta refletindo com brilho",glare_title:"Brilho detectado",main_title_document_back:"Verso",main_title_document_face:"Selfie",main_title_document_front:"Frente",obstructed_message:"Algumas partes do documento estão encobertas ou ausentes",obstructed_title:"Informações incompletas",other_error_code_message:"Por favor, tente novamente",other_error_code_title:"Ocorreu um eprro",page_header_document:"Digitalizar o documento",page_header_face:"Reconhecimento facial",second_title_document_back:"Coloque o documento em uma superfície sólida, com o verso voltado para cima.",second_title_document_face:"Por favor, posicione seu rosto no centro do oval abaixo.",second_title_document_front:"Coloque o documento em uma superfície sólida, com a foto voltada para cima.",wrong_document_side_message:"O lado errado do documento foi detectado",wrong_document_side_title:"Lado incorreto do documento identificado",face_angle_too_large_title:"Seu rosto não está diretamente alinhado com a câmera.",face_angle_too_large_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_close_to_border_title:"Seu rosto está muito próximo da borda.",face_close_to_border_message:"Por favor, reposicione seu rosto e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_too_small_title:"Seu rosto está muito longe da borda.",face_too_small_message:"Aproxime-se da câmera para que seu rosto fique mais claro e fácil de detectar.",face_too_close_title:"Seu rosto está muito perto",face_too_close_message:"Ajuste a posição e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_cropped_title:"Seu rosto está parcialmente cortado.",face_cropped_message:"Mude sua posição e certifique-se de que todo o seu rosto esteja dentro do enquadramento para uma detecção ideal.",no_face_title:"Rosto não encontrado..",no_face_message:"Aproxime-se da câmera ou ajuste sua posição para que seu rosto fique mais claro e fácil de detectar.",multi_face_title:"Vários rostos foram detectados.",multi_face_message:"Certifique-se de que haja apenas um rosto visível no quadro para continuar.",blur_selfie_title:"O autorretrato está fora de foco.",blur_selfie_message:"Tente tirar uma nova imagem com foco mais claro para melhor detecção.",glare_selfie_title:"Muita reflexão em seu autorretrato.",glare_selfie_message:"Tente tirar outra foto com melhor iluminação e sem brilho para uma detecção precisa.",closed_eyes_title:"Parece que seus olhos estão fechados.",closed_eyes_message:"Por favor, tire a foto novamente com os olhos abertos.",face_occluded_title:"Seu rosto está parcialmente oculto.",face_occluded_message:"Tire outra foto com seu rosto totalmente visível para uma detecção precisa.",face_rotated_title:"Seu rosto está fora de foco.",face_rotated_message:"Por favor, tente pegar outro com foco mais claro para melhor detecção.",barcode_not_found_title:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",barcode_not_found_message:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocá-lo em um local mais claro.",searching_document_autocapture:"Buscando o documento",capturing_document_autocapture:"Capturando, por favor mantenha-se imóvel",click_manual_autocapture:"Clique para capturar manualmente.",glare_blur_issues_autocapture:"Por favor, certifique-se de que não há reflexos de luz antes de tentar novamente",doc_not_in_frame_issues_autocapture:"Por favor, aproxime o documento e certifique-se de que está totalmente dentro da moldura de captura para uma imagem nítida",second_title_face_autocapture:"Prepare-se! Sua selfie será capturada automaticamente, ou toque para capturá-la manualmente",capturing_face_autocapture3:"Capturando... por favor, fique parado por 3",capturing_face_autocapture2:"Capturando... por favor, fique parado por 2",capturing_face_autocapture1:"Capturando... por favor, fique parado por 1",selfie_approval_autocapture:"Ótimo trabalho! Aprove sua selfie para continuar"},frCa:{blur_message:"Veuillez faire la mise au point de l’appareil photo sur le document avant de le capturer",blur_title:"Image floue",document_not_found_message:"Munissez-vous d’une pièce d’identité valide délivrée par le gouvernement",document_not_found_title:"Document non détecté",document_not_matching_message:"Veillez à capturer le verso du document",document_not_matching_title:"Non-concordance entre les images du recto et du verso",document_not_supported_message:"Veuillez utiliser une autre pièce d’identité délivrée par le gouvernement",document_not_supported_title:"Document non pris en charge",face_not_found_message:"Assurez-vous que votre visage n’est pas couvert et qu’il est entièrement visible",face_not_found_title:"Visage non détecté",glare_message:"Évitez la lumière directe qui pourrait se refléter sur le document",glare_title:"Reflet détecté",main_title_document_back:"Verso",main_title_document_face:"Égoportrait",main_title_document_front:"Face avant",obstructed_message:"Le document comporte des parties manquantes ou couvertes",obstructed_title:"Informations manquantes",other_error_code_message:"Veuillez réessayer",other_error_code_title:"Une erreur s’est produite",page_header_document:"Numériser le document",page_header_face:"Reconnaissance faciale",second_title_document_back:"Veuillez placer votre document sur une surface solide, le verso vers le haut.",second_title_document_face:"Veuillez positionner votre visage au centre de l’ovale ci-dessous.",second_title_document_front:"Veuillez placer votre document sur une surface solide, photo vers le haut.",wrong_document_side_message:"Le mauvais côté du document a été détecté",wrong_document_side_title:"Mauvais côté du document détecté",face_angle_too_large_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_angle_too_large_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_close_to_border_title:"Votre visage est trop près du bord",face_close_to_border_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_too_small_title:"Votre visage est trop éloigné du bord",face_too_small_message:"Veuillez vous rapprocher de la caméra pour que votre visage soit plus clair et plus facile à détecter",face_too_close_title:"Votre visage est trop proche",face_too_close_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_cropped_title:"Votre visage est partiellement rogné",face_cropped_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre pour optimiser",no_face_title:"Visage introuvable",no_face_message:"Veuillez vous rapprocher de la caméra ou ajuster votre position pour que votre visage soit plus clair et plus facile à détecter",multi_face_title:"Plusieurs visages détectés",multi_face_message:"Veuillez vous assurer qu’un seul visage est visible dans le cadre pour continuer",blur_selfie_title:"L’égoportrait n’est pas net",blur_selfie_message:"Essayez d’en prendre un autre avec une mise au point plus claire pour une meilleure détection",glare_selfie_title:"Trop de reflets sur votre égoportrait",glare_selfie_message:"Veuillez essayer de prendre une autre photo avec un meilleur éclairage et sans reflet pour une détection précise",closed_eyes_title:"Il semble que vos yeux soient fermés.",closed_eyes_message:"Veuillez reprendre la photo avec les yeux ouverts",face_occluded_title:"Votre visage est partiellement caché.",face_occluded_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",face_rotated_title:"votre visage n’est pas directement aligné avec l’appareil photo",face_rotated_message:"Veuillez prendre une autre photo avec votre visage entièrement visible pour une détection précise",barcode_not_found_title:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",barcode_not_found_message:"Nous avons des difficultés à capturer certains éléments importants de votre document. Veuillez essayer de le placer à un endroit plus clair",searching_document_autocapture:"Recherche du document",capturing_document_autocapture:"Capture en cours, veuillez rester immobile",click_manual_autocapture:"Cliquez pour capturer manuellement",glare_blur_issues_autocapture:"Veuillez vous assurer qu’il n’y a pas de reflets de lumière avant de réessayer",doc_not_in_frame_issues_autocapture:"Veuillez rapprocher le document et assurez-vous qu’il soit entièrement dans le cadre de capture pour une image claire",second_title_face_autocapture:"Préparez-vous! Votre selfie sera capturé automatiquement, ou appuyez pour le capturer manuellement",capturing_face_autocapture3:"Capture... en cours, veuillez rester immobile pendant 3",capturing_face_autocapture2:"Capture... en cours, veuillez rester immobile pendant 2",capturing_face_autocapture1:"Capture... en cours, veuillez rester immobile pendant 1",selfie_approval_autocapture:"Bon travail! Approuvez votre selfie pour continuer"}};const ja=async(e,t,i,n,r,a)=>{var o,s,l,u,c,d,h;yn.HEADERS=zn(i,t);const p=In.UAParser();let g;if(na.state.isImageSigningEnabled){const e=qr.crypto.createCryptoBinding("sign");g=await e.sign(n.data)}const f=await(m=e,_={image:{format:n.format,image_type:a,content:n.data,capture_margins:n.captureMargins,signature:g},device_info:{model:null===(o=null==p?void 0:p.device)||void 0===o?void 0:o.model,type:null===(s=null==p?void 0:p.device)||void 0===s?void 0:s.type,manufacturer:null===(l=null==p?void 0:p.device)||void 0===l?void 0:l.vendor,os:null===(u=null==p?void 0:p.os)||void 0===u?void 0:u.name,os_version:null===(c=null==p?void 0:p.os)||void 0===c?void 0:c.version,browser:null===(d=null==p?void 0:p.browser)||void 0===d?void 0:d.name,browser_version:null===(h=null==p?void 0:p.browser)||void 0===h?void 0:h.version,used_camera:null==r?void 0:r.selectedCamera,cameras:null==r?void 0:r.camerasInfo}},Qr({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:m},body:_,mediaType:"application/json",errors:{400:"Request is malformed or missing required fields",401:"Access token is malformed, missing data, or expired",404:"Session not found",409:"All required images were successfully submitted"}},_.image.image_type));var m,_;const x=function(e,t){const i=[...e].find((e=>e.includes(t)));return void 0!==i?i[1]:void 0}(f.headers,"x-ts-processing-time-ms");return"ok"!==f.body.feedback&&console.error("Error",f),{missing_images:f.body.missing_images,feedback:f.body.feedback,custom_feedback:f.body.custom_feedback,has_barcode:f.body.has_barcode,serverProcessingTime:x}},qa=()=>{const e=document.getElementById("overlay-frame");if(e){const t=e.getBoundingClientRect(),i=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+t.top,bottom:n+t.bottom,right:i+t.right,left:i+t.left}}},$a=e=>["document_front","document_back"].includes(e)?"environment":"user";function Va(e){switch(e){case"document_front":return En.image_type.DOCUMENT_FRONT;case"document_back":return En.image_type.DOCUMENT_BACK;case"selfie":return En.image_type.SELFIE}}var Ha,Ga={exports:{}};var Ka=(Ha||(Ha=1,Ga.exports=function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,i){i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return o}));var n=i(1),r=i(7);i.d(t,"a",(function(){return r.a})),i.d(t,"d",(function(){return n.b}));var a=n.a.FACING_MODES,o=n.a.IMAGE_TYPES},function(e,t,i){var n=i(6);i.d(t,"a",(function(){return n.a}));var r=i(2);i.d(t,"b",(function(){return r.a}))},function(e,t,i){function n(e,t){if(!(t>=0&&t<=1))throw new Error(t+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(e))throw new Error(e+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function r(e,t){var i={};try{n(e,t),i.imageType=e,i.imageCompression=t}catch(e){console.error(e),console.error("default value of "+h.c.PNG+" is used"),i.imageType=h.c.PNG,i.imageCompression=null}return i}function a(){var e=window.navigator.platform,t=window.navigator.userAgent;return e||t}function o(){return"ontouchend"in document}function s(e,t,i){var n=e*parseFloat(i);return{imageWidth:n,imageHeight:t/(e/n)}}function l(e,t,i){return r(t,i).imageType===h.c.JPG?i?e.toDataURL(h.b[h.c.JPG],i):e.toDataURL(h.b[h.c.JPG]):e.toDataURL(h.b[t])}function u(e,t){return e||t}function c(){var e=a();if(/iPad|iPhone|iPod/.test(e))return!0;var t=o();return!(!/Mac/.test(e)||!t)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:a(),_getHasTouchEvents:o(),getIsIOS:c()}}t.c=s,t.b=l,t.e=u,t.d=c,t.a=d;var h=i(3)},function(e,t,i){function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,"e",(function(){return a})),i.d(t,"a",(function(){return o})),i.d(t,"f",(function(){return s})),i.d(t,"c",(function(){return l})),i.d(t,"b",(function(){return u})),i.d(t,"d",(function(){return c}));var r,a=["user","environment"],o={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],l={PNG:"png",JPG:"jpg"},u=(n(r={},"jpg","image/jpeg"),n(r,"png","image/png"),r),c={audio:!1,video:!0}},function(e,t,i){e.exports=i(5)},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(0);i.d(t,"FACING_MODES",(function(){return n.b})),i.d(t,"IMAGE_TYPES",(function(){return n.c})),i.d(t,"_getDebugPlatformInfo",(function(){return n.d}));var r=i(9);i.d(t,"downloadPhoto",(function(){return r.a})),t.default=n.a},function(e,t,i){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return s}));var r=i(2),a=i(3),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=function(){function e(){n(this,e)}return o(e,null,[{key:"getDataUri",value:function(e,t){var i=t.sizeFactor,n=t.imageType,a=t.imageCompression,o=t.isImageMirror,s=e.videoWidth,l=e.videoHeight,u=Object(r.c)(s,l,i),c=u.imageWidth,d=u.imageHeight,h=document.createElement("canvas");h.width=c,h.height=d;var p=h.getContext("2d");return o&&p.setTransform(-1,0,0,1,h.width,0),p.drawImage(e,0,0,c,d),Object(r.b)(h,n,a)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var e=null,t=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),i=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(t)e=navigator.mediaDevices;else if(i){var n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,r={getUserMedia:function(e){return new Promise((function(t,i){n.call(navigator,e,t,i)}))}};e=Object.assign(n,r)}return e}},{key:"isSupportedFacingMode",value:function(){return e.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(t,i){if(!Object(r.e)(t,i))return a.d;var n=e.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.height)return console.error("Constraint width or height not supported! fallback to default resolution"),a.d;var o=void 0,s=void 0;return t&&(a.e.includes(t)?o=t:s={exact:t}),{audio:!1,video:{facingMode:o,deviceId:s,width:i&&i.width,height:i&&i.height}}}},{key:"getMaxResolutionConstraints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",i);var n=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],a=e.getIdealConstraints(t,{});if(0===i)return Object(r.d)()?(console.warn("fallback to iOS constraints"),e.getIdealConstraints(t,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(a.video.advanced=n,a);if(i<n.length){var o=n.slice(0,-i);return a.video.advanced=o,a}return null}},{key:"FACING_MODES",get:function(){return a.a}},{key:"IMAGE_TYPES",get:function(){return a.c}}]),e}()},function(e,t,i){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return l}));var r=i(1),a=i(8),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=r.a.IMAGE_TYPES.PNG,l=function(){function e(t){n(this,e),this.videoElement=t,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=r.a.getWindowURL(),this.mediaDevices=r.a.getNavigatorMediaDevices()}return o(e,[{key:"_getStreamDevice",value:function(e,t){var i=this;return new Promise((function(n,a){var o=r.a.getIdealConstraints(e,t);i.mediaDevices.getUserMedia(o).then((function(e){i._gotStream(e),n(e)})).catch((function(e){a(e)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(e){var t=this,i=r.a.getMaxResolutionConstraints(e,this.numberOfMaxResolutionTry);if(null==i){var n={};return this._getStreamDevice(e,n)}return new Promise((function(n,r){t.mediaDevices.getUserMedia(i).then((function(e){t._gotStream(e),n(e)})).catch((function(i){setTimeout((function(){t.numberOfMaxResolutionTry+=1,t._getStreamDeviceMaxResolution(e).catch((function(){r(i)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(e){if("srcObject"in this.videoElement)this.videoElement.srcObject=e;else{var t=this.windowURL.createObjectURL(e);this.videoElement.src=t}}},{key:"_setSettings",value:function(e){this.settings=null;var t=e&&e.getTracks?e.getTracks():[];t.length>0&&t[0].getSettings&&(this.settings=t[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var e=this;return new Promise((function(t,i){var n=[];e.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){"videoinput"===e.kind&&e.deviceId&&n.push(e)})),t(n)})).catch((function(e){i(e)}))}))}},{key:"_gotStream",value:function(e){this.stream=e,this._setSettings(e),this._setVideoSrc(e)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var e=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var t={video:!0};return e.mediaDevices.getUserMedia(t).then((function(e){setTimeout((function(){e.getTracks().forEach((function(e){e.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return e._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(e,t){var i=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return i._getStreamDevice(e,t)}))}},{key:"startCameraMaxResolution",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return e._getStreamDeviceMaxResolution(t)}))}},{key:"getDataUri",value:function(e){var t={sizeFactor:void 0===e.sizeFactor?a.c:e.sizeFactor,imageType:void 0===e.imageType?s:e.imageType,imageCompression:void 0===e.imageCompression?a.a:e.imageCompression,isImageMirror:void 0===e.isImageMirror?a.b:e.isImageMirror};return r.a.getDataUri(this.videoElement,t)}},{key:"stopCamera",value:function(){var e=this;return new Promise((function(t,i){e.stream&&(e.stream.getTracks().forEach((function(e){e.stop()})),e.videoElement.src="",e.stream=null,e._setSettings(null),t()),i(Error("no stream to stop!"))}))}}]),e}()},function(e,t,i){i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return a}));var n=1,r=null,a=!1},function(e,t,i){var n=i(10);i.d(t,"a",(function(){return n.a}))},function(e,t,i){function n(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),r=new Uint8Array(n),a=0;a<t.length;a++)r[a]=t.charCodeAt(a);return new Blob([n],{type:i})}function r(e,t){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function a(e){var t=u.c.PNG;return"image/jpeg"===e&&(t=u.c.JPG),t}function o(e,t,i){return e+"-"+r(t,4)+"."+a(i)}function s(e,t,i){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=o(t,i,e.type),n.href=window.URL.createObjectURL(e);var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(n(e),t,i)}t.a=l;var u=i(0)}])),Ga.exports),Za=Z(Ka);class Ya{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return Ya.instance||(Ya.instance=new Ya),Ya.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((e=>"live"===e.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((e=>e.stop())),this.currentStream=null)}areConstraintsEqual(e){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(e)}async startNewStream(e){this.isStreaming()&&this.areConstraintsEqual(e)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(e),this.currentConstraints=e)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(e){throw console.error("Failed to enumerate devices:",e),e}}}const Wa=[{os:{name:"Android"},label:"2 0"}];async function Ja(){const e=(await async function(){const e=Ya.getInstance();let t=await e.enumerateDevices();return t.filter((e=>"videoinput"===e.kind)).every((e=>""===e.label))&&(await e.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),t=await e.enumerateDevices(),e.stopStream()),t}()).filter((e=>{if(!(null==e?void 0:e.label)||"videoinput"!==e.kind||""===e.label)return!1;const t=e.label.toLowerCase();return Xa.some((e=>t.includes(e)))})),t=In.UAParser(),i=e.find((e=>Wa.find((i=>i.os.name===t.os.name&&e.label.includes(i.label)))));return i?{optionalCameras:e,selectedCamera:i}:{optionalCameras:e}}const Xa=["rear","back","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक","camera2 0, facing back"],Qa={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},eo={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},to=async e=>{var t,i;let n;return"environment"==e&&(n=await Ja()),null!==(i=null===(t=null==n?void 0:n.selectedCamera)||void 0===t?void 0:t.deviceId)&&void 0!==i?i:e},io=(e,t)=>{var i,n;return"user"===e?null!==(i=null==t?void 0:t.selfieVideoConstraints)&&void 0!==i?i:eo:null!==(n=null==t?void 0:t.environmentVideoConstraints)&&void 0!==n?n:Qa},no=e=>{const t=Oa({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return t.style.transform="user"===e?"scaleX(-1)":"",t.autoplay=!0,t.muted=!0,t.setAttribute("playsinline","true"),t},ro={title:"other_error_code_title",message:"other_error_code_message"},ao={ok:ro,document_face_not_found:ro,restricted_criteria:ro,other:ro,glare:{title:"glare_title",message:"glare_message"},document_not_found:{title:"document_not_found_title",message:"document_not_found_message"},blur:{title:"blur_title",message:"blur_message"},document_not_supported:{title:"document_not_supported_title",message:"document_not_supported_message"},obstructed:{title:"obstructed_title",message:"obstructed_message"},document_not_matching:{title:"document_not_matching_title",message:"document_not_matching_message"},face_not_found:{title:"face_not_found_title",message:"face_not_found_message"},wrong_document_side:{title:"wrong_document_side_title",message:"wrong_document_side_message"},glare_selfie:{title:"glare_selfie_title",message:"glare_selfie_message"},blur_selfie:{title:"blur_selfie_title",message:"blur_selfie_message"},multi_face:{title:"multi_face_title",message:"multi_face_message"},face_rotated:{title:"face_rotated_title",message:"face_rotated_message"},face_too_small:{title:"face_too_small_title",message:"face_too_small_message"},face_too_close:{title:"face_too_close_title",message:"face_too_close_message"},closed_eyes:{title:"closed_eyes_title",message:"closed_eyes_message"},face_angle_too_large:{title:"face_angle_too_large_title",message:"face_angle_too_large_message"},face_close_to_border:{title:"face_close_to_border_title",message:"face_close_to_border_message"},face_occluded:{title:"face_occluded_title",message:"face_occluded_message"},face_cropped:{title:"face_cropped_title",message:"face_cropped_message"},barcode_not_found:{title:"barcode_not_found_title",message:"barcode_not_found_message"}},oo={loading_screen:{page:"page_header_document",title:"main_title_document_front",instructions:"loading_screen_small_title"},document_front:{page:"page_header_document",title:"main_title_document_front",instructions:"second_title_document_front"},document_back:{page:"page_header_document",title:"main_title_document_back",instructions:"second_title_document_back"},selfie:{page:"page_header_face",title:"main_title_document_face",instructions:"second_title_document_face"}},so=(e,t)=>{const i=Oa({tagName:"div",style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",position:"relative",zIndex:"1",background:"transparent",boxShadow:"0 0 0 1000px rgb(0 0 0 / 50%)",borderStyle:"solid",borderWidth:"1px",borderColor:"white"},id:`overlay-frame ${e}`,testid:`overlay-frame ${e}`});if("environment"===e){!function(e){Pa(e,Oa({tagName:"div",style:{position:"absolute",top:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"none",borderBottomStyle:"none",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-left",testid:"overlay-frame__top-left"})),Pa(e,Oa({tagName:"div",style:{position:"absolute",top:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-right",testid:"overlay-frame__top-right"})),Pa(e,Oa({tagName:"div",style:{position:"absolute",bottom:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-right",testid:"overlay-frame__bottom-right"})),Pa(e,Oa({tagName:"div",style:{position:"absolute",bottom:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"solid",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-left",testid:"overlay-frame__bottom-left"}))}(i);const e=.85*t.clientWidth;i.style.width=`${e}px`,i.style.height=.65*e+"px",i.style.maxHeight=.5*window.innerHeight+"px"}else{const e=t.clientWidth*(t.clientHeight<700?.8:.85);i.style.width=.8*e+"px",i.style.height=`${e}px`,i.style.minHeight=.8*e+"px",i.style.maxHeight=.5*window.innerHeight+"px",i.style.borderRadius="50%"}return i};const lo=e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("viewBox","0 0 68 68"),t.innerHTML=`<style>.spinner-autocapture circle {animation: rotate 1.5s linear infinite;} @keyframes rotate { 50% {stroke-dashoffset: 94; stroke-dasharray: 6 57; } 100% { stroke-dashoffset: 188; stroke-dasharray: 51 12; }} </style> <g class="spinner-autocapture"> <circle cx="34" cy="34" fill="none" r="30" stroke-width="4" stroke="${null!=e?e:"#fff"}" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>`,t};function uo(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","16px"),e.setAttribute("height","16px"),e.innerHTML='\n <path d="M8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16ZM8 4C8.41562 4 8.75 4.33437 8.75 4.75V8.25C8.75 8.66562 8.41562 9 8 9C7.58437 9 7.25 8.66562 7.25 8.25V4.75C7.25 4.33437 7.58437 4 8 4ZM9 11C9 11.5531 8.55313 12 8 12C7.44688 12 7 11.5531 7 11C7 10.4469 7.44688 10 8 10C8.55313 10 9 10.4469 9 11Z" fill="#F2F2F2"/>\n ',e}const co={all:{color:"black",margin:"0"},1:{color:"white",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-bold)"},2:{color:"white",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)"},3:{color:"white",fontSize:"var(--font-size-xl)",fontWeight:"var(--font-weight-medium)"},4:{fontSize:"var(--font-size-lg)",fontWeight:"var(--font-weight-regular)"},5:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-light)"},6:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-light)"}},ho=e=>{let{text:t,level:i=1,style:n={},id:r,testid:a}=e;const o=Oa({tagName:`h${i}`,style:u(u(u({},co.all),co[i]),n),id:r,testid:a});return o.textContent=t,o.id=r,o};var po,go={exports:{}};let fo=null;try{fo=(po||(po=1,function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const n={exec:()=>null};function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="string"==typeof e?e:e.source;const n={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(a.caret,"$1"),i=i.replace(e,r),n},getRegex:()=>new RegExp(i,t)};return n}const a={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E96}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},o=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s=/(?:[*+-]|\d{1,9}[.)])/,l=r(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,s).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,p=r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),g=r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,s).getRegex(),f="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_=r("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",f).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x=r(c).replace("hr",o).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex(),v={blockquote:r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",x).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:p,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:o,html:_,lheading:l,list:g,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:x,table:n,text:/^[^\n]+/},b=r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",o).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex(),y=u(u({},v),{},{table:b,paragraph:r(c).replace("hr",o).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",b).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex()}),w=u(u({},v),{},{html:r("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:r(c).replace("hr",o).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),E=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,k=/^( {2,}|\\)\n(?!\s*$)/,A="\\p{P}\\p{S}",C=r(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,A).getRegex(),D=r(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,A).getRegex(),S=r("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,A).getRegex(),T=r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,A).getRegex(),I=r(/\\([punct])/,"gu").replace(/punct/g,A).getRegex(),M=r(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),B=r(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),F=r("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",B).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),z=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,R=r(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O=r(/^!?\[(label)\]\[(ref)\]/).replace("label",z).replace("ref",h).getRegex(),P=r(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),N={_backpedal:n,anyPunctuation:I,autolink:M,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:k,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n,emStrongLDelim:D,emStrongRDelimAst:S,emStrongRDelimUnd:T,escape:E,link:R,nolink:P,punctuation:C,reflink:O,reflinkSearch:r("reflink|nolink(?!\\()","g").replace("reflink",O).replace("nolink",P).getRegex(),tag:F,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:n},L=u(u({},N),{},{link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",z).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z).getRegex()}),U=u(u({},N),{},{escape:r(E).replace("])","~|])").getRegex(),url:r(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),j=u(u({},U),{},{br:r(k).replace("{2,}","*").getRegex(),text:r(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),q={normal:v,gfm:y,pedantic:w},$={normal:N,gfm:U,breaks:j,pedantic:L},V={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},H=e=>V[e];function G(e,t){if(t){if(a.escapeTest.test(e))return e.replace(a.escapeReplace,H)}else if(a.escapeTestNoEncode.test(e))return e.replace(a.escapeReplaceNoEncode,H);return e}function K(e){try{e=encodeURI(e).replace(a.percentDecode,"%")}catch(e){return null}return e}function Z(e,t){const i=e.replace(a.findPipe,((e,t,i)=>{let n=!1,r=t;for(;--r>=0&&"\\"===i[r];)n=!n;return n?"|":" |"})).split(a.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(a.slashPipe,"|");return i}function Y(e,t,i){const n=e.length;if(0===n)return"";let r=0;for(;r<n;){const a=e.charAt(n-r-1);if(a!==t||i){if(a===t||!i)break;r++}else r++}return e.slice(0,n-r)}function W(e,t,i,n,r){const a=t.href,o=t.title||null,s=e[1].replace(r.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:i,href:a,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:a,title:o,text:s}}class J{constructor(t){d(this,"options",void 0),d(this,"rules",void 0),d(this,"lexer",void 0),this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Y(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t,i){const n=e.match(i.other.indentCodeCompensation);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(i.other.beginningSpace);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=Y(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Y(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=Y(t[0],"\n").split("\n"),i="",n="";const r=[];for(;e.length>0;){let t=!1;const a=[];let o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else{if(t)break;a.push(e[o])}e=e.slice(o);const s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}\n${s}`:s,n=n?`${n}\n${l}`:l;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,r,!0),this.lexer.state.top=u,0===e.length)break;const c=r[r.length-1];if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){const t=c,a=t.raw+"\n"+e.join("\n"),o=this.blockquote(a);r[r.length-1]=o,i=i.substring(0,i.length-t.raw.length)+o.raw,n=n.substring(0,n.length-t.text.length)+o.text;break}if("list"!==(null==c?void 0:c.type));else{const t=c,a=t.raw+"\n"+e.join("\n"),o=this.list(a);r[r.length-1]=o,i=i.substring(0,i.length-c.raw.length)+o.raw,n=n.substring(0,n.length-t.raw.length)+o.raw,e=a.substring(r[r.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:r,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,r={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const a=this.rules.other.listItemRegex(i);let o=!1;for(;e;){let i=!1,n="",s="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),c&&this.rules.other.blankLine.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),i=!0),!i){const t=this.rules.other.nextBulletRegex(d),i=this.rules.other.hrRegex(d),r=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){const h=e.split("\n",1)[0];let p;if(u=h,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),p=u):p=u.replace(this.rules.other.tabCharGlobal," "),r.test(u))break;if(a.test(u))break;if(o.test(u))break;if(t.test(u))break;if(i.test(u))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+="\n"+p.slice(d);else{if(c)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(r.test(l))break;if(a.test(l))break;if(i.test(l))break;s+="\n"+u}c||u.trim()||(c=!0),n+=h+"\n",e=e.substring(h.length+1),l=p.slice(d)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(o=!0));let h,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(h="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:n,task:!!p,checked:h,loose:!1,text:s,tokens:[]}),r.raw+=n}r.items[r.items.length-1].raw=r.items[r.items.length-1].raw.trimEnd(),r.items[r.items.length-1].text=r.items[r.items.length-1].text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter((e=>"space"===e.type)),i=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));r.loose=i}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const i=Z(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]&&t[3].trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const e of n)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<i.length;e++)a.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:a.align[e]});for(const e of r)a.rows.push(Z(e,a.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=Y(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])i++;else if(e[n]===t[1]&&(i--,i<0))return n;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i.slice(1):i.slice(1,-1)),W(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer,this.rules)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=t[(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return W(i,e,i[0],this.lexer,this.rules)}}emStrong(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(e);if(n&&(!n[3]||!i.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...n[0]].length-1;let r,a,o=i,s=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(a=[...r].length,n[3]||n[4]){o+=a;continue}if((n[5]||n[6])&&i%3&&!((i+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+a);if(Math.min(i,a)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const u=l.slice(2,-2);return{type:"strong",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=t[0],r="mailto:"+e;else{let a;do{var i,n;a=t[0],t[0]=null!==(i=null===(n=this.rules.inline._backpedal.exec(t[0]))||void 0===n?void 0:n[0])&&void 0!==i?i:""}while(a!==t[0]);e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class X{constructor(t){d(this,"tokens",void 0),d(this,"options",void 0),d(this,"state",void 0),d(this,"tokenizer",void 0),d(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new J,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:a,block:q.normal,inline:$.normal};this.options.pedantic?(i.block=q.pedantic,i.inline=$.pedantic):this.options.gfm&&(i.block=q.gfm,this.options.breaks?i.inline=$.breaks:i.inline=$.gfm),this.tokenizer.rules=i}static get rules(){return{block:q,inline:$}}static lex(e,t){return new X(t).lex(e)}static lexInline(e,t){return new X(t).inlineTokens(e)}lex(e){e=e.replace(a.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e){let t,i,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(a.tabCharGlobal," ").replace(a.spaceLine,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(t=i.call({lexer:this},e,r))&&(e=e.substring(t.raw.length),r.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&r.length>0?r[r.length-1].raw+="\n":r.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),i=r[r.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?r.push(t):(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),i=r[r.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(i.raw+="\n"+t.raw,i.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),r.push(t);else{var s;if(n=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(n)))i=r[r.length-1],o&&"paragraph"===(null===(s=i)||void 0===s?void 0:s.type)?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(t),o=n.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),i=r[r.length-1],i&&"text"===i.type?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,r}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,i,n,r,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,r.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(o=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(t=i.call({lexer:this},e,s))&&(e=e.substring(t.raw.length),s.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),i=s[s.length-1],s.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),i=s[s.length-1],i&&"text"===t.type&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(t=this.tokenizer.emStrong(e,l,o))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),s.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(n=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(n))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(o=t.raw.slice(-1)),a=!0,i=s[s.length-1],i&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),s.push(t);return s}}class Q{constructor(t){d(this,"options",void 0),d(this,"parser",void 0),this.options=t||e.defaults}space(e){return""}code(e){var t;let{text:i,lang:n,escaped:r}=e;const o=null===(t=(n||"").match(a.notSpaceStart))||void 0===t?void 0:t[0],s=i.replace(a.endingNewline,"")+"\n";return o?'<pre><code class="language-'+G(o)+'">'+(r?s:G(s,!0))+"</code></pre>\n":"<pre><code>"+(r?s:G(s,!0))+"</code></pre>\n"}blockquote(e){let{tokens:t}=e;return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:i}=e;return`<h${i}>${this.parser.parseInline(t)}</h${i}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,i=e.start;let n="";for(let t=0;t<e.items.length;t++){const i=e.items[t];n+=this.listitem(i)}const r=t?"ol":"ul";return"<"+r+(t&&1!==i?' start="'+i+'"':"")+">\n"+n+"</"+r+">\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+G(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox(e){let{checked:t}=e;return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){let{tokens:t}=e;return`<p>${this.parser.parseInline(t)}</p>\n`}table(e){let t="",i="";for(let t=0;t<e.header.length;t++)i+=this.tablecell(e.header[t]);t+=this.tablerow({text:i});let n="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];i="";for(let e=0;e<r.length;e++)i+=this.tablecell(r[e]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow(e){let{text:t}=e;return`<tr>\n${t}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>\n`}strong(e){let{tokens:t}=e;return`<strong>${this.parser.parseInline(t)}</strong>`}em(e){let{tokens:t}=e;return`<em>${this.parser.parseInline(t)}</em>`}codespan(e){let{text:t}=e;return`<code>${G(t,!0)}</code>`}br(e){return"<br>"}del(e){let{tokens:t}=e;return`<del>${this.parser.parseInline(t)}</del>`}link(e){let{href:t,title:i,tokens:n}=e;const r=this.parser.parseInline(n),a=K(t);if(null===a)return r;let o='<a href="'+(t=a)+'"';return i&&(o+=' title="'+G(i)+'"'),o+=">"+r+"</a>",o}image(e){let{href:t,title:i,text:n}=e;const r=K(t);if(null===r)return G(n);let a=`<img src="${t=r}" alt="${n}"`;return i&&(a+=` title="${G(i)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:G(e.text)}}class ee{strong(e){let{text:t}=e;return t}em(e){let{text:t}=e;return t}codespan(e){let{text:t}=e;return t}del(e){let{text:t}=e;return t}html(e){let{text:t}=e;return t}text(e){let{text:t}=e;return t}link(e){let{text:t}=e;return""+t}image(e){let{text:t}=e;return""+t}br(){return""}}class te{constructor(t){d(this,"options",void 0),d(this,"renderer",void 0),d(this,"textRenderer",void 0),this.options=t||e.defaults,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ee}static parse(e,t){return new te(t).parse(e)}static parseInline(e,t){return new te(t).parseInline(e)}parse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i="";for(let n=0;n<e.length;n++){const r=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){i+=t||"";continue}}const a=r;switch(a.type){case"space":i+=this.renderer.space(a);continue;case"hr":i+=this.renderer.hr(a);continue;case"heading":i+=this.renderer.heading(a);continue;case"code":i+=this.renderer.code(a);continue;case"table":i+=this.renderer.table(a);continue;case"blockquote":i+=this.renderer.blockquote(a);continue;case"list":i+=this.renderer.list(a);continue;case"html":i+=this.renderer.html(a);continue;case"paragraph":i+=this.renderer.paragraph(a);continue;case"text":{let r=a,o=this.renderer.text(r);for(;n+1<e.length&&"text"===e[n+1].type;)r=e[++n],o+="\n"+this.renderer.text(r);i+=t?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}parseInline(e,t){t=t||this.renderer;let i="";for(let n=0;n<e.length;n++){const r=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=e||"";continue}}const a=r;switch(a.type){case"escape":case"text":i+=t.text(a);break;case"html":i+=t.html(a);break;case"link":i+=t.link(a);break;case"image":i+=t.image(a);break;case"strong":i+=t.strong(a);break;case"em":i+=t.em(a);break;case"codespan":i+=t.codespan(a);break;case"br":i+=t.br(a);break;case"del":i+=t.del(a);break;default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}}class ie{constructor(t){d(this,"options",void 0),d(this,"block",void 0),this.options=t||e.defaults}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?X.lex:X.lexInline}provideParser(){return this.block?te.parse:te.parseInline}}d(ie,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class ne{constructor(){d(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),d(this,"options",this.setOptions),d(this,"parse",this.parseMarkdown(!0)),d(this,"parseInline",this.parseMarkdown(!1)),d(this,"Parser",te),d(this,"Renderer",Q),d(this,"TextRenderer",ee),d(this,"Lexer",X),d(this,"Tokenizer",J),d(this,"Hooks",ie),this.use(...arguments)}walkTokens(e,t){let i=[];for(const r of e)switch(i=i.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const n of e.header)i=i.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;i=i.concat(this.walkTokens(e.items,t));break}default:{var n;const e=r;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[e.type]?this.defaults.extensions.childTokens[e.type].forEach((n=>{const r=e[n].flat(1/0);i=i.concat(this.walkTokens(r,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((t=>{const i=u({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const i=e.renderers[t.name];e.renderers[t.name]=i?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let a=t.renderer.apply(this,n);return!1===a&&(a=i.apply(this,n)),a}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const i=e[t.level];i?i.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),i.extensions=e),t.renderer){const e=this.defaults.renderer||new Q(this.defaults);for(const i in t.renderer){if(!(i in e))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const n=i,r=t.renderer[n],a=e[n];e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o||""}}i.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new J(this.defaults);for(const i in t.tokenizer){if(!(i in e))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const n=i,r=t.tokenizer[n],a=e[n];e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}i.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new ie;for(const i in t.hooks){if(!(i in e))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const n=i,r=t.hooks[n],a=e[n];ie.passThroughHooks.has(i)?e[n]=t=>{if(this.defaults.async)return Promise.resolve(r.call(e,t)).then((t=>a.call(e,t)));const i=r.call(e,t);return a.call(e,i)}:e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}i.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,n=t.walkTokens;i.walkTokens=function(t){let i=[];return i.push(n.call(this,t)),e&&(i=i.concat(e.call(this,t))),i}}this.defaults=u(u({},this.defaults),i)})),this}setOptions(e){return this.defaults=u(u({},this.defaults),e),this}lexer(e,t){return X.lex(e,null!=t?t:this.defaults)}parser(e,t){return te.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(t,i)=>{const n=u({},i),r=u(u({},this.defaults),n),a=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===n.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const o=r.hooks?r.hooks.provideLexer():e?X.lex:X.lexInline,s=r.hooks?r.hooks.provideParser():e?te.parse:te.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then((e=>o(e,r))).then((e=>r.hooks?r.hooks.processAllTokens(e):e)).then((e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>s(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(a);try{r.hooks&&(t=r.hooks.preprocess(t));let e=o(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let i=s(e,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(e){return a(e)}}}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+G(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const re=new ne;function ae(e,t){return re.parse(e,t)}ae.options=ae.setOptions=function(e){return re.setOptions(e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.getDefaults=t,ae.defaults=e.defaults,ae.use=function(){return re.use(...arguments),ae.defaults=re.defaults,i(ae.defaults),ae},ae.walkTokens=function(e,t){return re.walkTokens(e,t)},ae.parseInline=re.parseInline,ae.Parser=te,ae.parser=te.parse,ae.Renderer=Q,ae.TextRenderer=ee,ae.Lexer=X,ae.lexer=X.lex,ae.Tokenizer=J,ae.Hooks=ie,ae.parse=ae;const oe=ae.options,se=ae.setOptions,le=ae.use,ue=ae.walkTokens,ce=ae.parseInline,de=ae,he=te.parse,pe=X.lex;e.Hooks=ie,e.Lexer=X,e.Marked=ne,e.Parser=te,e.Renderer=Q,e.TextRenderer=ee,e.Tokenizer=J,e.getDefaults=t,e.lexer=pe,e.marked=ae,e.options=oe,e.parse=de,e.parseInline=ce,e.parser=he,e.setOptions=se,e.use=le,e.walkTokens=ue}(go.exports)),go.exports).marked}catch(e){console.log("marked is not supported",e)}const mo=fo,_o=e=>{let{text:t,id:i,testid:n,clientHeight:r}=e;const a=!!r&&r<700,o=Oa({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:a?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:i,testid:n});return Pa(o,ho({text:t,level:a?6:5,style:{color:"white"}})),o};const xo=e=>{const t=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","270"),e.setAttribute("height","175"),e.setAttribute("viewBox","40 60 250 140"),e.innerHTML='\n <g transform="matrix(1,0,0,1,0,0)"><g id="12" opacity="1" style="mix-blend-mode:normal"><g><defs><clipPath id="12_clipPath" x="-50%" y="-50%" width="200%" height="200%"><path d="M0,260v-260h333v260z" fill="white" clip-rule="nonzero"></path></clipPath></defs><g clip-path="url(#12_clipPath)"><g transform="matrix(1,0,0,1,48,60)"><g id="83287" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83288" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83288_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij3rlyasnggflf" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83288_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij3rlyasnggflf)"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116.5)"><g id="83289" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83289_fill_path" d="M135,0l-135,23.5h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,2)"><g id="83290" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83290_fill_path" d="M0,2c0,-1 1,-2 2,-2h228c1,0 2,1 2,2v18h-232z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,228.54000000000002,62.99940000000001)"><g id="83291" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83291_fill_path" d="M227,-0.00002l-227,60.99934l226.99998,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,42)"><g id="83292" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83292_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h109c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,143,42)"><g id="83293" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83293_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h65c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,58)"><g id="83294" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83294_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,58)"><g id="83295" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83295_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,194,58)"><g id="83296" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83296_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h14c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,74)"><g id="83297" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83297_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h83c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,117,74)"><g id="83298" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83298_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,165,74)"><g id="83299" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83299_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h43c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,68,92)"><g id="83300" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83300_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,74,92)"><g id="83301" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83301_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,80,92)"><g id="83302" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83302_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,86,92)"><g id="83303" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83303_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,92,92)"><g id="83304" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83304_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,98,92)"><g id="83305" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83305_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,104,92)"><g id="83306" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83306_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,110,92)"><g id="83307" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83307_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,116,92)"><g id="83308" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83308_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,122,92)"><g id="83309" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83309_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,128,92)"><g id="83310" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83310_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,134,92)"><g id="83311" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83311_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,140,92)"><g id="83312" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83312_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,146,92)"><g id="83313" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83313_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,152,92)"><g id="83314" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83314_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,158,92)"><g id="83315" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83315_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,164,92)"><g id="83316" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83316_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,170,92)"><g id="83317" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83317_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116)"><g id="83318" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83318_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,21)"><g id="83320" opacity="0.2" style="mix-blend-mode:normal"><g><g><path id="83320_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g><g transform="matrix(1,0,0,1,48,60)"><g id="83268" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83269" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83269_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij4hmxrv43iz67" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83269_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4hmxrv43iz67)"></path></g></g></g></g><g transform="matrix(1,0,0,1,196,100)"><g id="83270" opacity="0.4" style="mix-blend-mode:normal"><g><g><defs><clipPath id="ligziij4roiiqcgytn" clipPathUnits="userSpaceOnUse"><path d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z"></path></clipPath></defs><path id="83270_stroke_path" d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="10" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4roiiqcgytn)"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,98)"><g id="83271" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83271_fill_path" d="M135,0l-135,40h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,1,1)"><g id="83272" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83272_fill_path" d="M0,2c0,-1 1,-2 2,-2h229c1,0 2,1 2,2v18h-233z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,42,74.4508)"><g id="83273" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83273_fill_path" d="M18.00001,0h-8c-5.5225,0 -10.00001,4.47496 -10.00001,9.99992c0,1.09999 0.895,1.99998 2,1.99998h24.00002c1.1045,0 2,-0.89549 2,-1.99998c0,-5.52496 -4.475,-9.99992 -10.00001,-9.99992z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,47.5999,54.4509)"><g id="83274" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83274_fill_path" d="M17.306,8.653c0,0.9077 -0.1428,1.8102 -0.4232,2.6738c-0.2804,0.8636 -0.6957,1.6778 -1.2296,2.4124c-0.5339,0.7346 -1.1794,1.3801 -1.914,1.914c-0.7346,0.5339 -1.5488,0.9492 -2.4124,1.2296c-0.8636,0.2804 -1.7661,0.4232 -2.6738,0.4232c-0.9077,0 -1.8102,-0.1428 -2.6738,-0.4232c-0.8636,-0.2804 -1.6778,-0.6957 -2.4124,-1.2296c-0.7346,-0.5339 -1.3801,-1.1794 -1.914,-1.914c-0.5339,-0.7346 -0.9492,-1.5488 -1.2296,-2.4124c-0.2804,-0.8636 -0.4232,-1.7661 -0.4232,-2.6738c0,-0.9077 0.1428,-1.8102 0.4232,-2.6738c0.2804,-0.8636 0.6957,-1.6778 1.2296,-2.4124c0.5339,-0.7346 1.1794,-1.3801 1.914,-1.914c0.7346,-0.5339 1.5488,-0.9492 2.4124,-1.2296c0.8636,-0.2804 1.7661,-0.4232 2.6738,-0.4232c0.9077,0 1.8102,0.1428 2.6738,0.4232c0.8636,0.2804 1.6778,0.6957 2.4124,1.2296c0.7346,0.5339 1.3801,1.1794 1.914,1.914c0.5339,0.7346 0.9492,1.5488 1.2296,2.4124c0.2804,0.8636 0.4232,1.7661 0.4232,2.6738z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,32,48)"><g id="83275" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83275_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83275_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,-1,1,6.123233995736766e-17,32,94)"><g id="83276" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83276_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83276_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(-1,2.4492935982947064e-16,-2.4492935982947064e-16,-1,79,94)"><g id="83277" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83277_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83277_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,79,48)"><g id="83278" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83278_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83278_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,47)"><g id="83279" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83279_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,47)"><g id="83280" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83280_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,67)"><g id="83281" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83281_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,67)"><g id="83282" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83282_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,87)"><g id="83283" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83283_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,87)"><g id="83284" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83284_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h51c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,137,9)"><g id="83285" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83285_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,92.4999,98.9985)"><g id="83286" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83286_fill_path" d="M90.49994,0l-90.49994,96.99852l90.49994,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,0,20)"><g id="83319" opacity="0" style="mix-blend-mode:normal"><g><g><path id="83319_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g></g></g></g></g><animateTransform href="#83287" attributeName="transform" type="translate" values="118 70;118 70;118 70;118 70;118 70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="scale" values="0 1;0 1;1.02 1;1 1;1 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="translate" values="-118 -70;-118 -70;-118 -70;-118 -70;-118 -70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="0 0;0 0;9.018099999999999 -4;9.018099999999999 -4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.42 0 0.15 1;0.42 0 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="113.5 30.4997;113.5 30.4997;113.5 30.4997;113.5 30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="scale" values="-1 -1;-1 -1;-0.88 -0.88;-0.88 -0.88" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animate href="#83320" attributeName="opacity" values="0.2;0.2;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.39;0.43;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate><animateTransform href="#83268" attributeName="transform" type="translate" values="117 75;117 75;117 75;117 75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="scale" values="1 1;1 1;0 1;0 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="translate" values="-117 -75;-117 -75;-117 -75;-117 -75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animate href="#83271_fill_path" attributeName="d" values="M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,-0.0042l-135.0142,40.0042h135.0142z;M135,-0.0364l-135.1228,40.0364h135.1228z;M135,-0.0975l-135.3292,40.0975h135.3292z;M135,-0.1848l-135.6236,40.1848h135.6236z;M135,-0.2958l-135.9982,40.2958h135.9982z;M135,-0.4285l-136.4462,40.4285h136.4462z;M135,-0.5812l-136.9617,40.5812h136.9617z;M135,-0.7525l-137.5397,40.7525h137.5397z;M135,-0.941l-138.176,40.941h138.176z;M135,-1.1457l-138.8667,41.1457h138.8667z;M135,-1.3655l-139.6085,41.3655h139.6085z;M135,-1.5996l-140.3986,41.5996h140.3986z;M135,-1.8472l-141.2343,41.8472h141.2343z;M135,-2.1077l-142.1134,42.1077h142.1134z;M135,-2.3804l-143.0339,42.3804h143.0339z;M135,-2.6649l-143.994,42.6649h143.994z;M135,-2.9607l-144.9922,42.9607h144.9922z;M135,-3.2673l-146.0272,43.2673h146.0272z;M135,-3.5846l-147.0978,43.5846h147.0978z;M135,-3.9121l-148.2031,43.9121h148.2031z;M135,-4.2497l-149.3424,44.2497h149.3424z;M135,-4.5972l-150.5153,44.5972h150.5153z;M135,-4.9545l-151.7213,44.9545h151.7213z;M135,-5.3218l-152.9607,45.3218h152.9607z;M135,-5.6991l-154.2341,45.6991h154.2341z;M135,-6.0868l-155.5427,46.0868h155.5427z;M135,-6.4858l-156.8893,46.4858h156.8893z;M135,-6.898l-158.2804,46.898h158.2804z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z" dur="2.6s" repeatCount="indefinite" keyTimes="0;0.007692307692307693;0.015384615384615385;0.023076923076923078;0.03076923076923077;0.038461538461538464;0.046153846153846156;0.05384615384615385;0.06153846153846154;0.06923076923076923;0.07692307692307693;0.08461538461538462;0.09230769230769231;0.1;0.1076923076923077;0.11538461538461539;0.12307692307692308;0.13076923076923078;0.13846153846153847;0.14615384615384616;0.15384615384615385;0.16153846153846155;0.16923076923076924;0.17692307692307693;0.18461538461538463;0.19230769230769232;0.2;0.2076923076923077;0.2153846153846154;0.2230769230769231;0.23076923076923078;0.23846153846153847;0.24615384615384617;0.25384615384615383;0.26153846153846155;0.2692307692307692;0.27692307692307694;0.2846153846153846;0.2923076923076923;0.3;0.3076923076923077;0.3153846153846154;0.3230769230769231;0.33076923076923076;0.3384615384615385;0.34615384615384615;0.35384615384615387;0.36153846153846153;0.36923076923076925;0.3769230769230769;0.38461538461538464;0.3923076923076923;0.4;0.4076923076923077;0.4153846153846154;0.4230769230769231;0.4307692307692308;0.43846153846153846;0.4461538461538462;0.45384615384615384;0.46153846153846156;0.46923076923076923;0.47692307692307695;0.4846153846153846;0.49230769230769234;0.5;0.5076923076923077;0.5153846153846153;0.5230769230769231;0.5307692307692308;0.5384615384615384;0.5461538461538461;0.5538461538461539;0.5615384615384615;0.5692307692307692;0.5769230769230769;0.5846153846153846;0.5923076923076923;0.6;0.6076923076923076;0.6153846153846154;0.6230769230769231;0.6307692307692307;0.6384615384615384;0.6461538461538462;0.6538461538461539;0.6615384615384615;0.6692307692307692;0.676923076923077;0.6846153846153846;0.6923076923076923;0.7;0.7076923076923077;0.7153846153846154;0.7230769230769231;0.7307692307692307;0.7384615384615385;0.7461538461538462;0.7538461538461538;0.7615384615384615;0.7692307692307693;0.7769230769230769;0.7846153846153846;0.7923076923076923;0.8;0.8076923076923077;0.8153846153846154;0.823076923076923;0.8307692307692308;0.8384615384615385;0.8461538461538461;0.8538461538461538;0.8615384615384616;0.8692307692307693;0.8769230769230769;0.8846153846153846;0.8923076923076924;0.9;0.9076923076923077;0.9153846153846154;0.9230769230769231;0.9307692307692308;0.9384615384615385;0.9461538461538461;0.9538461538461539;0.9615384615384616;0.9692307692307692;0.9769230769230769;0.9846153846153847;0.9923076923076923;1" fill="freeze"></animate><animateTransform href="#83285" attributeName="transform" type="translate" values="88 2;88 2;88 2;88 2;88 2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="scale" values="0.98 1;0.98 1;1 1;0.96 1;0.96 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="translate" values="-88 -2;-88 -2;-88 -2;-88 -2;-88 -2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewX" values="0;0;-4;-4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewY" values="0;0;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animate href="#83319" attributeName="opacity" values="0;0;0.18;0.18" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.31;0.36;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate>\n ',e}();return t.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_back"===e&&(t.style.opacity="1",setTimeout((()=>{t.style.opacity="0"}),5e3)),t};var vo;!function(e){e.INVALID="invalid",e.VALID="valid",e.ACCEPTED="accepted",e.REJECTED="rejected"}(vo||(vo={}));const bo="#ED3232",yo="#01B678",wo="#FFF";const Eo=e=>{const t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight;return t.getContext("2d").drawImage(e,0,0,e.videoWidth,e.videoHeight),t};async function ko(e){let{context:t,onDetect:i,frame:n,showError:r,isSelfie:a=!1}=e;const o=t.state.name;if(o===vo.REJECTED){r(function(e){switch(e){case ra.DOCUMENT_DETECTION:return"searching_document_autocapture";case ra.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case ra.BARCODE_DETECTION:return wn.feedback.BARCODE_NOT_FOUND;case ra.BLUR_DETECTION:return wn.feedback.BLUR;case ra.GLARE_DETECTION:return wn.feedback.GLARE;case ra.FACE_DETECTION:return wn.feedback.FACE_NOT_FOUND;case ra.FACE_POSITION:return wn.feedback.FACE_TOO_SMALL}}(t.invalidFramesCause));Ao("border-color",t.invalidFramesCause===ra.DOCUMENT_DETECTION?wo:bo)}if(o===vo.VALID)if(a){Ao("border-color",yo);r(`capturing_face_autocapture${Math.ceil((t.validFramesThreshold-t.validFramesCounter)/t.validFramesThreshold*3)}`)}else r("capturing_in_progress_message"),Ao("border-color",wo);o===vo.ACCEPTED&&(Ao("border-color",wo),r(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await i({frame:n,suspendedPreview:!0,context:t}))}function Ao(e,t){document.querySelectorAll('[id^="overlay-frame"]').forEach((i=>{i.style[e]=t}))}function Co(e){let t,i,n,{captureFrame:r,object:a,videoWidth:o,videoHeight:s,deviceWidth:l,deviceHeight:u,threshold:c,iouThreshold:d=.85}=e;if(o/s>=l/u){n=u/s;const e=(o*n-l)/2;t=a.x*n-e,i=a.y*n}else{n=l/o;const e=(s*n-u)/2;t=a.x*n,i=a.y*n-e}const h=t+a.width*n,p=i+a.height*n;!function(e,t,i,n){var r,a;if(null===(a=null===(r=na.state.autoCaptureSettings)||void 0===r?void 0:r.settings)||void 0===a?void 0:a.debug){const r=document.getElementById("image-preview-section"),a=document.getElementById("rectangle");if(a)a.style.width=`${i}px`,a.style.height=`${n}px`,a.style.left=`${e}px`,a.style.top=`${t}px`;else{const a=document.createElement("div");a.id="rectangle",a.style.position="absolute",a.style.border="1px solid yellow",a.style.width=`${i}px`,a.style.height=`${n}px`,a.style.left=`${e}px`,a.style.top=`${t}px`,r.appendChild(a)}}}(t,i,a.width*n,a.height*n);const g=function(e,t){const i=Math.max(e.left,t.left),n=Math.min(e.right,t.right),r=Math.max(e.top,t.top),a=n-i,o=Math.min(e.bottom,t.bottom)-r;if(a<=0||o<=0)return 0;const s=a*o;return s/((e.right-e.left)*(e.bottom-e.top)+(t.right-t.left)*(t.bottom-t.top)-s)}({top:r.top,left:r.left,bottom:r.bottom,right:r.right},{top:i,left:t,bottom:p,right:h}),f=g>d,m=a.width*n*(a.height*n)>c*(r.width*r.height);return f&&m}const Do=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.innerHTML='\n <path d="M10.7202 25.9524C9.81992 25.9524 9.08331 25.2158 9.08331 24.3155V11.2202C9.08331 10.3199 9.81992 9.58333 10.7202 9.58333C11.6205 9.58333 12.3571 10.3199 12.3571 11.2202V20.6938C16.3675 14.0337 23.662 9.58333 32 9.58333C44.6553 9.58333 54.9166 19.8447 54.9166 32.5C54.9166 45.1553 44.6553 55.4167 32 55.4167C23.8257 55.4167 16.654 51.1403 12.5924 44.6949C11.9274 43.631 12.7357 42.3214 13.994 42.3214C14.6079 42.3214 15.1603 42.6488 15.4979 43.1603C18.9968 48.5621 25.0841 52.1429 32 52.1429C42.8445 52.1429 51.6428 43.3445 51.6428 32.5C51.6428 21.6555 42.8445 12.8571 32 12.8571C24.726 12.8571 18.383 16.8062 14.9864 22.6786H23.8155C24.7158 22.6786 25.4524 23.4152 25.4524 24.3155C25.4524 25.2158 24.7158 25.9524 23.8155 25.9524H10.7202Z" fill="#FF8B8B"/> \n ',e}(),t=Oa({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"retake-image",testid:"retake-image"});return Pa(t,e),Pa(t,ho({text:"Retake",level:2,style:{color:"#FF8B8B",margin:"0",width:"100%"},id:"retake-image-text"})),t};const So=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.innerHTML='\n <path d="M32.5 8.66666C38.6884 8.66666 44.6233 11.125 48.9992 15.5008C53.375 19.8767 55.8333 25.8116 55.8333 32C55.8333 38.1884 53.375 44.1233 48.9992 48.4992C44.6233 52.875 38.6884 55.3333 32.5 55.3333C26.3116 55.3333 20.3767 52.875 16.0009 48.4992C11.625 44.1233 9.16668 38.1884 9.16668 32C9.16668 25.8116 11.625 19.8767 16.0009 15.5008C20.3767 11.125 26.3116 8.66666 32.5 8.66666ZM32.5 58.6667C39.5725 58.6667 46.3552 55.8572 51.3562 50.8562C56.3572 45.8552 59.1667 39.0724 59.1667 32C59.1667 24.9276 56.3572 18.1448 51.3562 13.1438C46.3552 8.14284 39.5725 5.33333 32.5 5.33333C25.4276 5.33333 18.6448 8.14284 13.6438 13.1438C8.64286 18.1448 5.83334 24.9276 5.83334 32C5.83334 39.0724 8.64286 45.8552 13.6438 50.8562C18.6448 55.8572 25.4276 58.6667 32.5 58.6667ZM43.6771 26.5104C44.3229 25.8646 44.3229 24.8021 43.6771 24.1562C43.0313 23.5104 41.9688 23.5104 41.3229 24.1562L29.1667 36.3125L23.6771 30.8229C23.0313 30.1771 21.9688 30.1771 21.3229 30.8229C20.6771 31.4687 20.6771 32.5312 21.3229 33.1771L27.9896 39.8437C28.6354 40.4896 29.6979 40.4896 30.3438 39.8437L43.6771 26.5104Z" fill="#BBF7DD"/>\n ',e}(),t=Oa({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"approve-image",testid:"approve-image"});return Pa(t,e),Pa(t,ho({text:"Approve",level:2,style:{color:"#BBF7DD",margin:"0",width:"100%"},id:"check-circle-text"})),t},To=e=>{let{step:t,setImage:i,camera:n}=e;var r,a,o,s;const l=oo[t];(null===(r=na.state.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&"selfie"===t&&(l.instructions="second_title_face_autocapture");const u=((e,t)=>Oa({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"document-capture",className:t}))("document-capture",t),c=Oa({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=Oa({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(na.state.rootElementId);if(!h)throw new Error("Root element not found");const p=so($a(t),h);Pa(c,xo(t)),Pa(c,p);const g=(()=>{const e=Oa({tagName:"div",style:{zIndex:"2",width:"80%",height:"50px",color:"white",display:"flex",alignItems:"center",backgroundColor:"#2E2E2E",justifyContent:"center",opacity:".9"},id:"loading-block",testid:"loading-block"}),t=uo();return t.style.width="16px",t.style.height="16px",t.style.margin="0 10px",Pa(e,t),Pa(e,ho({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),e})();Pa(p,g),g.style.visibility="hidden";const f=_o({text:La.translate(l.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),m=(e=>{let{click:t,id:i,testid:n,color:r,withLoader:a}=e;if(a){const e=lo();e.style.position="absolute",e.style.left="-7px",e.style.top="-7px",e.style.height="63px",e.style.width="63px";const a=Oa({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:r||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:n+"-inner"});return Pa(a,e),a.addEventListener("click",t),a}{const e=Oa({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(r||"white"),borderRadius:"40px"},id:i+"-outer",testid:n+"-outer"});return Pa(e,Oa({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:r||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:n+"-inner"})),e.addEventListener("click",t),e}})({click:()=>i({frame:Eo(n.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(o=null===(a=na.state)||void 0===a?void 0:a.autoCaptureSettings)||void 0===o?void 0:o.enabled}),_=(()=>{const e=Oa({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",alignItems:"center",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),t=So();return Pa(e,Do()),Pa(e,t),e})(),x=(e=>{let{title:t,text:i,clientHeight:n,customTextColor:r}=e;const a=n<700,o=Oa({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:a?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=ho({text:t,level:a?2:1,style:{color:r||"white",textAlign:"center",marginBottom:a?"4px":"10px"},id:"step-title"}),l=ho({text:i,level:a?6:5,style:{color:r||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return Pa(o,s),Pa(o,l),o})({text:La.translate(l.instructions),title:La.translate(l.title),clientHeight:h.clientHeight}),v=(e=>{const t=e<700,i=Oa({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:na.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=Oa({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),r=uo();r.style.width="16px",r.style.height="16px",r.style.margin="0 10px",na.state.markdownSupportText?Pa(n,r):Pa(i,r);const a=na.state.markdownSupportText&&null!=mo?mo.parse(na.state.markdownSupportText,{async:!1}):"",o=ho({text:"",level:t?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=ho({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return a&&(s.innerHTML=a,Pa(n,o)),Pa(i,a?[n,s]:o),i})(h.clientHeight),b=(null===(s=na.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?lo():function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","65"),e.setAttribute("height","65"),e.setAttribute("viewBox","0 0 24 24"),e.innerHTML='\n <path fill="#ffffff" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="#ffffff" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" type="rotate" dur="0.75s" values="0 12 12;360 12 12" repeatCount="indefinite"/></path>\n ',e}();b.style.display="none",Pa(d,f),Pa(d,x),Pa(d,c),Pa(d,v),Pa(u,d);const y=Oa({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});Pa(y,b),Pa(y,m),Pa(y,_),Pa(u,y),Pa(u,n.videoElement);const w=Oa({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===$a(t)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const E=(e=>{const t=Oa({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return t.appendChild(e),t})(w);return Pa(u,E),{component:u,setLoadingMode:e=>{var t;m.style.display="none",v.style.visibility="hidden",b.style.display="block",(null===(t=na.state.autoCaptureSettings)||void 0===t?void 0:t.enabled)&&(b.style.height="63px",b.style.width="63px"),e&&(g.style.visibility="visible")},setApprovalRetakeButtons:e=>{let{approveAction:t,retakeAction:i}=e;var n,r;m.style.display="none",v.style.display="none",_.style.display="flex";const a=_.querySelector("#approve-image"),o=_.querySelector("#retake-image"),s=a.cloneNode(!0);null===(n=a.parentNode)||void 0===n||n.replaceChild(s,a),s.addEventListener("click",t);const l=o.cloneNode(!0);null===(r=o.parentNode)||void 0===r||r.replaceChild(l,o),l.addEventListener("click",i)},hideApprovalRetakeButtons:()=>{_.style.display="none",v.style.display="flex"},setPreviewImage:(e,t)=>{w.src=e,g.style.visibility="hidden",n.videoElement.style.display="none",m.style.display="none",v.style.visibility="hidden",E.style.display="block",b.style.display=t?"none":"block"},setLoadingComplete:()=>{b.style.display="none",g.style.visibility="hidden"},setAutoCapturingError:(e,t)=>{if(!e)return void(v.style.visibility="hidden");let i;i=e==wn.feedback.RESTRICTED_CRITERIA&&t?t:ao[e]?ao[e].message:La.translate(e)!==e?e:ao.other.message,document.getElementById("image-error-message").innerHTML=La.translate(i),v.style.visibility="visible"},enableVideoElement:()=>{m.style.display="block",n.videoElement.style.display="block",E.style.display="none",b.style.display="none"},setCapturingShowErrorMode:(e,t)=>{m.style.display="block",E.style.display="none",n.videoElement.style.display="block";const i=e==wn.feedback.RESTRICTED_CRITERIA,r=ao[e]||ao.other;document.getElementById("image-error-message").innerHTML=t&&i&&null!=mo?mo.parse(t,{async:!1}):La.translate(r.message),v.style.visibility="visible",g.style.visibility="hidden"},setTitleInstructionsMidStep:e=>{let{title:t,instructions:i}=e;t&&(document.getElementById("step-title").innerHTML=La.translate(t)),i&&(document.getElementById("step-instructions").innerHTML=La.translate(i))}}};class Io{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t||(this.isValid=!1,this.failedStep=e),this.steps.push(new Mo(e,t,i))}}class Mo{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=e,this.success=t,this.duration=i}}class Bo{constructor(){this.name=vo.ACCEPTED}async handleFrame(){return new Io}}class Fo{constructor(){this.name=vo.VALID}async handleFrame(e){let{context:t,frame:i,deviceInfo:n,detectionStrategy:r}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.validFramesCounter++,t.validFramesCounter>=t.validFramesThreshold&&t.setState(new Bo)):(t.validFramesCounter=0,t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new Ro)),a}}class zo{constructor(){this.name=vo.REJECTED}async handleFrame(e){let{context:t,frame:i,detectionStrategy:n,deviceInfo:r}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new Fo),a):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new Ro),a):(t.invalidFramesCounter++,a)}}class Ro{constructor(){this.name=vo.INVALID}async handleFrame(e){let{context:t,frame:i,detectionStrategy:n,deviceInfo:r}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new Fo)):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep):(t.invalidFramesCounter++,t.invalidFramesCounter>=t.invalidFramesThreshold&&t.setState(new zo)),a}}class Oo{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=e,this.state=new Ro,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=t,this.invalidFramesThreshold=i}setState(e){this.state=e}async handleFrame(e){let{frame:t,deviceInfo:i}=e;return await this.state.handleFrame({context:this,frame:t,deviceInfo:i,detectionStrategy:this.detectionStrategy})}}async function Po(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;const a=No(t,n,r),o=await new Promise(((n,r)=>{navigator.serviceWorker.ready.then((o=>{var s;const l=t=>{t.data.type===e+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",l),n(t.data.result)),t.data.type===e+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",l),ha(t.data.error.toString(),e,"error"),r(t.data.error))};navigator.serviceWorker.addEventListener("message",l),null===(s=o.active)||void 0===s||s.postMessage(u({type:e,imageData:a,height:t.height,width:t.width},i))}))}));return ga(`****** in web-SDK return result for ${e}`,o),o}function No(e,t,i){const n=document.createElement("canvas"),r=t||{height:e.height,width:e.width},a=n.getContext("2d");n.width=r.width,n.height=r.height,i?null==a||a.drawImage(e,i.x,i.y,i.width,i.height,0,0,r.width,r.height):null==a||a.drawImage(e,0,0,r.width,r.height);const o=null==a?void 0:a.getImageData(0,0,r.width,r.height);return n.remove(),o}async function Lo(e){if(e instanceof HTMLVideoElement&&e.paused)return[];return Po("DETECT_DOCUMENT",e,{},va[fa.DOCUMENT_DETECTOR].imageDimensions)}async function Uo(e,t){return Po("BLUR_GLARE_CLASSIFY",e,{},va[fa.BLUR_GLARE_CLASSIFIER].imageDimensions,t)}const jo=function(){try{return new _a}catch(e){return ga("Error initializing barcode model",e),ha("Error initializing barcode model","barcode_model_not_supported","init"),null}}();class qo{constructor(e){this.barcodeModel=null,this.hasBarcode=e,this.barcodeModel=jo}async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new Io;let a=Date.now();const o=null===(n=await Lo(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(ra.DOCUMENT_DETECTION,void 0!==o,s),!o)return r;a=Date.now();const l=Co({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:na.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:na.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-a,r.addStepResponse(ra.DOCUMENT_POSITION,l,s),!l)return r;a=Date.now();const u=await Uo(t,o);s=Date.now()-a;const c=u.some((e=>"blur"===e.class));if(r.addStepResponse(ra.BLUR_DETECTION,!c,s),c)return r;const d=u.some((e=>"glare"===e.class));if(r.addStepResponse(ra.GLARE_DETECTION,!d,s),d)return r;if(this.barcodeModel&&this.hasBarcode){a=Date.now();const e=await this.barcodeModel.detect(t);s=Date.now()-a;const i=(null==e?void 0:e.length)>0;if(r.addStepResponse(ra.BARCODE_DETECTION,i,s),!i)return r}return r}}class $o{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class Vo{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(ra).forEach((e=>{this.stats.set(e,new $o)}))}addStats(e,t){this.frameHandleDurations.push(t),e.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),e.steps.forEach((e=>{this.addStat(e.step,e.duration,e.success?1:0,e.success?0:1)}))}addStat(e,t,i,n){const r=this.stats.get(e);if(!r)throw new Error(`Stat for step ${e} not found`);r.durations.push(t),r.countSuccess+=i,r.countFailed+=n}}let Ho=!1;const Go=e=>{Ho=e};class Ko{async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new Io;let a=Date.now();const o=null===(n=await Lo(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(ra.DOCUMENT_DETECTION,void 0!==o,s),!o)return r;a=Date.now();const l=Co({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:na.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:na.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-a,r.addStepResponse(ra.DOCUMENT_POSITION,l,s),!l)return r;a=Date.now();const u=await Uo(t,o);s=Date.now()-a;const c=u.some((e=>"blur"===e.class));if(r.addStepResponse(ra.BLUR_DETECTION,!c,s),c)return r;const d=u.some((e=>"glare"===e.class));return r.addStepResponse(ra.GLARE_DETECTION,!d,s),r}}let Zo=!1;const Yo=e=>{Zo=e};class Wo{async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new Io;let a=Date.now();const o=null===(n=await async function(e){return e instanceof HTMLVideoElement&&e.paused?[]:Po("DETECT_FACE_LANDMARKS",e)}(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse(ra.FACE_DETECTION,"face"===(null==o?void 0:o.class),s),!o)return r;a=Date.now();const l=Co({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:na.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:na.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-a,r.addStepResponse(ra.FACE_POSITION,l,s),r}}let Jo=!1;const Xo=e=>{Jo=e};async function Qo(e,t){var i,n,r,a;let o="camera-error";if("NotAllowedError"===t.name){o="Permission dismissed"===t.message?"camera-permission-dismissed":"camera-permission-denied";const s=ua.createCameraNotAllowedEvent(t.message,e);await ca(null===(i=na.state)||void 0===i?void 0:i.step,null===(n=na.state)||void 0===n?void 0:n.userToken,null===(r=na.state)||void 0===r?void 0:r.sessionId,null===(a=na.state)||void 0===a?void 0:a.clientId,s),na.dispatch("setIsCapturingProcessStarted",!1)}Jr(e,o)}function es(e){const t=(e=>{var t,i,n,r;const[a,o]=e.split(",");if(!a||!o)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(i=null===(t=a.split(";"))||void 0===t?void 0:t[0])||void 0===i?void 0:i.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const l=null===(r=s.split("/"))||void 0===r?void 0:r[1];if(!l)throw new Error("unable-to-parse-data-uri");return{data:o,format:l}})(e);return{image:{data:t.data,format:t.format,captureMargins:qa()}}}let ts=!1;const is=async()=>{const e=await Ba(na.state.sessionId,na.state.userToken,na.state.clientId);ns(e)},ns=async e=>{var t;"expired"===(null==e?void 0:e.status)?Xr("processing","session-expired",`Session expired for session id: ${na.state.sessionId}`):(null==e?void 0:e.missing_images)&&(null===(t=null==e?void 0:e.missing_images)||void 0===t?void 0:t.length)>0&&setTimeout(is,3e3)},rs=e=>{let{step:t}=e;var i,n,r;const a=null===(n=null===(i=na.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===n?void 0:n.enabled;let o=!1;const s=null===(r=na.state)||void 0===r?void 0:r.videoCaptureSettings,l=(e=>{let t,i,n=!1;const r=no(e),a=new Za(r),o=async()=>{n&&(await a.stopCamera(),a.stream&&a.stream.getTracks().forEach((e=>{"live"==e.readyState&&e.stop()})),n=!1)};return{videoStream:i,startVideoFeed:async e=>{var r,s,l;n&&await o(),"environment"==e&&(t=await Ja());const u=null!==(s=null===(r=null==t?void 0:t.selectedCamera)||void 0===r?void 0:r.deviceId)&&void 0!==s?s:e,c=io(e,null===(l=na.state)||void 0===l?void 0:l.videoCaptureSettings);Ya.getInstance().stopStream(),i=await a.startCamera(u,c),n=!0},stopVideoFeed:o,videoElement:a.videoElement,getDataUri:a.getDataUri,getCameraInfo:()=>t}})($a(t));!function(e){Yr({type:"page-load",step:e})}(t),is();const u=To({step:t,setImage:c,camera:l});async function c(e){let{suspendedPreview:i=!1,frame:n,context:r}=e;n||(n=Eo(l.videoElement)),"document_front"===t&&Yo(!1),"document_back"===t&&Go(!1),"selfie"===t&&Xo(!1);const a=Date.now(),c=function(e){const t=e.getCameraInfo();return{selectedCamera:(null==t?void 0:t.selectedCamera)&&{label:t.selectedCamera.label},camerasInfo:(null==t?void 0:t.optionalCameras)&&t.optionalCameras.map((e=>({label:e.label})))}}(l);if(!o)return;u.setLoadingMode(null==s?void 0:s.showLoadingBlock);const p=(e=>e.toDataURL("image/jpeg"))(n);u.setPreviewImage(p,"selfie"===t),await l.stopVideoFeed(),"selfie"!==t?await h(i,p,c,a,null==r?void 0:r.stats):(u.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),u.setApprovalRetakeButtons({approveAction:async()=>{u.hideApprovalRetakeButtons(),await h(i,p,c,a,null==r?void 0:r.stats)},retakeAction:()=>{u.hideApprovalRetakeButtons(),d()}}))}function d(){"selfie"===t&&u.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),l.startVideoFeed($a(t)).then((()=>{o=!0,u.enableVideoElement(),a&&(u.setAutoCapturingError(null),p(t))})).catch((async e=>{throw await Qo(t,e),e}))}async function h(e,i,n,r,c){const h=[];!function(e){var i,n,r,a;const o=ua.createUserActionEvent("capture_image",t,e);ca(null===(i=na.state)||void 0===i?void 0:i.step,null===(n=na.state)||void 0===n?void 0:n.userToken,null===(r=na.state)||void 0===r?void 0:r.sessionId,null===(a=na.state)||void 0===a?void 0:a.clientId,o)}(c),function(e,t){Yr({type:"capture-image",imageType:t,step:e})}(t,Va(t));try{const l=Date.now(),c=es(i);o=!1,h.push(ja(na.state.sessionId,na.state.userToken,na.state.clientId,null==c?void 0:c.image,n,Va(t))),h.push(e?new Promise((e=>setTimeout(e,500))):Promise.resolve(null)),u.setLoadingMode(null==s?void 0:s.showLoadingBlock);const p=(await Promise.all(h))[0];if(Object.prototype.hasOwnProperty.call(p,"has_barcode")&&(ts=p.has_barcode),async function(e){let{step:t,requestStartTime:i,imageProcessingStartTime:n,serverProcessingTime:r,userToken:a,sessionId:o,clientId:s}=e;const l=Date.now()-i,u=n?i-n:0,c=ua.createUploadImageEvent(t,String(l),String(r),String(u));await ca(t,a,o,s,c)}({step:t,requestStartTime:l,imageProcessingStartTime:r,serverProcessingTime:p.serverProcessingTime,userToken:na.state.userToken,sessionId:na.state.sessionId,clientId:na.state.clientId}),na.dispatch("setMissingImages",p.missing_images),u.setLoadingComplete(),function(e,t,i){Yr({type:"capture-image-result",imageType:t,feedback:i,step:e})}(t,Va(t),p.feedback),"ok"!==p.feedback)return await async function(e){Ao("border-color",bo),a?u.setAutoCapturingError(e.feedback,e.custom_feedback):u.setCapturingShowErrorMode(e.feedback,e.custom_feedback),await new Promise((e=>setTimeout(e,1e3))),Ao("border-color",wo)}(p),void d();Ao("border-color",yo),await new Promise((e=>setTimeout(e,750))),Ao("border-color",wo),na.dispatch("setStep",(e=>{let t;return t=e&&e.length>0?e.shift():"processing",t})(na.state.missingImages))}catch(e){u.setLoadingComplete(),u.setCapturingShowErrorMode(wn.feedback.OTHER),l.startVideoFeed($a(t)).then((()=>{o=!0})).catch((async e=>{throw await Qo(t,e),e})),Jr(t,"failed-to-submit-image")}}async function p(e){if("document_front"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;ga("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n}=e;var r,a,o,s,l,u,c;const d=new Oo(new Ko,null!==(o=null===(a=null===(r=na.state.autoCaptureSettings.settings)||void 0===r?void 0:r.stability)||void 0===a?void 0:a.numStableFrames)&&void 0!==o?o:2),h=new Vo;for(Yo(!0);d.state.name!==vo.ACCEPTED&&Zo;){const e=Date.now(),r=Eo(t.videoElement),a={width:null!==(l=null===(s=t.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==l?l:0,height:null!==(c=null===(u=t.videoElement.getBoundingClientRect())||void 0===u?void 0:u.height)&&void 0!==c?c:0},o=await d.handleFrame({frame:r,deviceInfo:a}),p=Date.now()-e+50;h.addStats(o,p),d.stats=h,await ko({context:d,onDetect:i,showError:n,frame:r}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError})}if("document_back"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;ga("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n,hasBarcode:r}=e;var a,o,s,l,u,c,d;const h=new Oo(new qo(r),null!==(s=null===(o=null===(a=na.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===o?void 0:o.numStableFrames)&&void 0!==s?s:2);Go(!0);const p=new Vo;for(;h.state.name!==vo.ACCEPTED&&Ho;){const e=Date.now(),r=Eo(t.videoElement),a={width:null!==(u=null===(l=t.videoElement.getBoundingClientRect())||void 0===l?void 0:l.width)&&void 0!==u?u:0,height:null!==(d=null===(c=t.videoElement.getBoundingClientRect())||void 0===c?void 0:c.height)&&void 0!==d?d:0},o=await h.handleFrame({frame:r,deviceInfo:a}),s=Date.now()-e+50;p.addStats(o,s),h.stats=p,await ko({context:h,onDetect:i,showError:n,frame:r}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError,hasBarcode:ts})}if("selfie"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;ga("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:n}=e;var r,a,o,s;const l=new Oo(new Wo,30);Xo(!0);const u=new Vo;for(;l.state.name!==vo.ACCEPTED&&Jo;){const e=Date.now(),c=Eo(t.videoElement),d={width:null!==(a=null===(r=t.videoElement.getBoundingClientRect())||void 0===r?void 0:r.width)&&void 0!==a?a:0,height:null!==(s=null===(o=t.videoElement.getBoundingClientRect())||void 0===o?void 0:o.height)&&void 0!==s?s:0},h=await l.handleFrame({frame:c,deviceInfo:d}),p=Date.now()-e;u.addStats(h,p),l.stats=u,await ko({context:l,onDetect:i,showError:n,frame:c,isSelfie:!0}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError})}}return a&&p(t),(async e=>{var t,i,n,r;const a=ua.createPageViewEvent(e);await ca(null===(t=na.state)||void 0===t?void 0:t.step,null===(i=na.state)||void 0===i?void 0:i.userToken,null===(n=na.state)||void 0===n?void 0:n.sessionId,null===(r=na.state)||void 0===r?void 0:r.clientId,a)})(t),l.startVideoFeed($a(t)).then((()=>{o=!0})).catch((async e=>{throw await Qo(t,e),e})),u.component},as=()=>{Yr({type:"start-verification-processing",step:na.state.step}),Wr("processing","processing",na.state.sessionId);const e=os("processing-verification");Pa(e,_o({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const t=async()=>{const e=await Ba(na.state.sessionId,na.state.userToken,na.state.clientId);r(e)},i=()=>{setTimeout(t,3e3)},n=async e=>{na.dispatch("setStep",e.status),na.dispatch("setStatus",e.status)},r=async e=>{var t,r,a;if(na.dispatch("setMissingImages",e.missing_images),e.status)if("complete"===(null==e?void 0:e.status)){Ya.getInstance().stopStream();const i=ua.createProcessingCompleteEvent();await ca(na.state.step,na.state.userToken,null===(t=na.state)||void 0===t?void 0:t.sessionId,null===(r=na.state)||void 0===r?void 0:r.clientId,i),n(e),Wr("complete",e.status,na.state.sessionId),function(e,t,i){Yr({type:"verification-complete",step:e,sessionId:t,callbackUrl:i})}("complete",na.state.sessionId,e.callback_url),a=Hr,sessionStorage.removeItem(a)}else"recapture"===(null==e?void 0:e.status)?(n(e),na.dispatch("setIsCapturingProcessStarted",!1),Wr("recapture",e.status,na.state.sessionId),function(e,t,i){Yr({type:"verification-recapture",step:e,sessionId:t,reason:i})}("recapture",e.status,e.recapture_reason)):"expired"===(null==e?void 0:e.status)?Xr("processing","session-expired",`Session expired for session id: ${na.state.sessionId}`):i();else"processing"!==e.state&&(n(e),i())};return t(),e},os=e=>Oa({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"processing-verification"});function ss(e,t){var i;if(!e)return;null===(i=t.firstChild)||void 0===i||i.remove();const n=function(e){switch(e){case"processing":return as;case"document_front":case"document_back":case"selfie":return rs;default:throw new Error("Invalid step")}}(e);Pa(t,n({step:e}))}function ls(e){let{key:t,state:i}=e;const n=i.rootElementId,r=document.getElementById(n);"step"===t&&"complete"!==i.step&&"recapture"!==i.step&&ss(i.step,r),r&&"processing"===i.step&&(r.style.visibility="hidden")}function us(){const e=Fa(Gr(Hr));if(!Fa)throw console.log("Error restarting session, stored session data is invalid or missing"),new Error("Error restarting session, stored session data is invalid or missing");const t=e.sessionId,i=e.userToken;return na.dispatch("setSessionId",t),na.dispatch("setUserToken",i),{sessionId:t,userToken:i}}async function cs(){var e,t;if(null===(e=na.state.autoCaptureSettings)||void 0===e?void 0:e.enabled){const e=Date.now();try{await ps(),ga("all models loaded - auto-capture enabled")}catch(e){na.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(t=na.state.autoCaptureSettings)||void 0===t?void 0:t.settings}),ga("Model loading did not complete on time:",e);ha(`timed out loading models: ${ba.filter((e=>va[e].status!==xa.LOADED)).map((e=>e)).join(", ")}`,"model_load_timeout","init")}const i=Object.values(va).filter((e=>e.status===xa.LOADED)).map((e=>e.loadingStats));!async function(e,t){const i=ua.createSdkInitEvent(e,t);await pa("init",i)}(Date.now()-e,i)}}async function ds(e){var t;try{await Ya.getInstance().startNewStream({video:u(u({},io("environment",null===(t=na.state)||void 0===t?void 0:t.videoCaptureSettings)),{},{deviceId:await to("environment")})}),function(e,t){Yr({type:"session-id-acquired",step:e,sessionId:t})}("init",e),function(e,t,i){const n=document.getElementById(i);n.style.visibility="visible",ss(e.shift(),n)}(na.state.missingImages,na.state.sessionId,na.state.rootElementId)}catch(e){await Qo("init",e)}}async function hs(e){let{status:t,sessionId:i,userToken:n,missingImages:r,rootElementId:a,language:o}=e;!function(e,t){Yr({type:"session-granted",step:e,sessionId:t})}("init",i),na.dispatch("setStatus",t),na.dispatch("setSessionId",i),na.dispatch("setUserToken",n),na.dispatch("setMissingImages",r),na.dispatch("setRootElement",a),na.dispatch("setLanguage",o),async function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";La.overrideLanguage(Ua[i]||Ua.en);let n=document.getElementById(t);if(!n){n=Oa({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:t,testid:"root"});const e=document.createElement("style");e.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${t} #trigger-section {\n margin: 0 !important;\n }\n #${t} #page-header {\n height: 5% !important;\n }\n }\n `,Pa(document.head,e),Pa(document.body,n)}}(na.state.sessionId,na.state.rootElementId,na.state.language),function(){try{qr.events.off(Vr,ls)}catch(e){}qr.events.on(Vr,ls)}(),await cs(),await ds(i)}const ps=async()=>{const e=na.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([ya(),new Promise(((t,i)=>setTimeout((()=>i(new Error(`Model loading timed out after ${e} ms`))),e)))])};async function gs(e){if(na.state.isCapturingProcessStarted)return void Jr(na.state.step,"trying-to-initialize-active-session");let t,i;if(e){const n=await async function(e){let t,i;try{const n=await Ra(e,na.state.consentVersion,na.state.clientId);return t=n.sessionId,i=n.userToken,na.dispatch("setSessionId",t),na.dispatch("setUserToken",i),{sessionId:t,userToken:i}}catch(e){throw console.log("Error starting session"),console.error(e),e}}(e);t=n.sessionId,i=n.userToken}else{const e=us();t=e.sessionId,i=e.userToken}if(!t)return void Jr(na.state.step,"other");const{missing_images:n,status:r}=await Ba(t,i,na.state.clientId);return na.dispatch("setIsCapturingProcessStarted",!0),await hs({status:r,sessionId:t,userToken:i,missingImages:n,rootElementId:na.state.rootElementId,language:na.state.language}),!0}async function fs(e){try{return await gs(e)}catch(e){throw console.log("Error starting session"),console.error(e),e}}async function ms(){try{return await async function(){if("recapture"===na.state.verificationStatus||"pending"===na.state.verificationStatus){const{sessionId:e,userToken:t}=us(),{missing_images:i,status:n}=await Ba(e,t,na.state.clientId);return await hs({status:n,sessionId:e,userToken:t,missingImages:i,rootElementId:na.state.rootElementId,language:na.state.language}),!0}Jr(na.state.step,"trying-to-initialize-active-session")}()}catch(e){throw console.log("Error restarting session"),console.error(e),e}}async function _s(){return ms()}const xs=()=>Mn;const vs="1.15.0",bs={initialize:o,...Object.freeze({__proto__:null,recapture:ms,restart:_s,start:fs,version:xs})};export{vs as PACKAGE_VERSION,bs as idv,o as initialize,ms as recapture,_s as restart,fs as start,xs as version};