@regulaforensics/idv-capture-web 4.0.684-nightly → 4.0.686-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.iife.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var RegulaIdv=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},c=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),l=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},u=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},d=(e,r,i)=>(i=e==null?{}:t(a(e)),u(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),f=e=>o.call(e,`module.exports`)?e[`module.exports`]:u(n({},`__esModule`,{value:!0}),e),p=globalThis,m=p.ShadowRoot&&(p.ShadyCSS===void 0||p.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,h=Symbol(),g=new WeakMap,_=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==h)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(m&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=g.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&g.set(t,e))}return e}toString(){return this.cssText}},v=e=>new _(typeof e==`string`?e:e+``,void 0,h),y=(e,...t)=>new _(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,h),b=(e,t)=>{if(m)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=p.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},x=m?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return v(t)})(e):e;function S(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function C(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){S(a,r,i,o,s,`next`,e)}function s(e){S(a,r,i,o,s,`throw`,e)}o(void 0)})}}var w,T,{is:ee,defineProperty:E,getOwnPropertyDescriptor:te,getOwnPropertyNames:ne,getOwnPropertySymbols:re,getPrototypeOf:D}=Object,O=globalThis,ie=O.trustedTypes,ae=ie?ie.emptyScript:``,oe=O.reactiveElementPolyfillSupport,se=(e,t)=>e,k={toAttribute(e,t){switch(t){case Boolean:e=e?ae:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},ce=(e,t)=>!ee(e,t),le={attribute:!0,type:String,converter:k,reflect:!1,useDefault:!1,hasChanged:ce};(w=Symbol).metadata!=null||(w.metadata=Symbol(`metadata`)),O.litPropertyMetadata!=null||(O.litPropertyMetadata=new WeakMap);var ue=class extends HTMLElement{static addInitializer(e){var t;this._$Ei(),((t=this.l)==null?this.l=[]:t).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=le){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&E(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){var r;let{get:i,set:a}=(r=te(this.prototype,e))==null?{get(){return this[t]},set(e){this[t]=e}}:r;return{get:i,set(t){let r=i==null?void 0:i.call(this);a==null||a.call(this,t),this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var t;return(t=this.elementProperties.get(e))==null?le:t}static _$Ei(){if(this.hasOwnProperty(se(`elementProperties`)))return;let e=D(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(se(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(se(`properties`))){let e=this.properties,t=[...ne(e),...re(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(x(e))}else e!==void 0&&t.push(x(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(e=>e(this))}addController(e){var t,n;((t=this._$EO)==null?this._$EO=new Set:t).add(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)==null||n.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var e;let t=(e=this.shadowRoot)==null?this.attachShadow(this.constructor.shadowRootOptions):e;return b(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(e=>{var t;return(t=e.hostConnected)==null?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(e=>{var t;return(t=e.hostDisconnected)==null?void 0:t.call(e)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){var i;let a=(((i=n.converter)==null?void 0:i.toAttribute)===void 0?k:n.converter).toAttribute(t,n.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){var i,a,o;let e=n.getPropertyOptions(r),s=typeof e.converter==`function`?{fromAttribute:e.converter}:((i=e.converter)==null?void 0:i.fromAttribute)===void 0?k:e.converter;this._$Em=r;let c=s.fromAttribute(t,e.type);this[r]=(a=c==null?(o=this._$Ej)==null?void 0:o.get(r):c)==null?c:a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){var a,o;let s=this.constructor;if(!1===r&&(i=this[e]),n!=null||(n=s.getPropertyOptions(e)),!(((a=n.hasChanged)==null?ce:a)(i,t)||n.useDefault&&n.reflect&&i===((o=this._$Ej)==null?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){var o,s,c;n&&!((o=this._$Ej)==null?this._$Ej=new Map:o).has(e)&&(this._$Ej.set(e,(s=a==null?t:a)==null?this[e]:s),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&((c=this._$Eq)==null?this._$Eq=new Set:c).add(e))}_$EP(){var e=this;return C(function*(){e.isUpdatePending=!0;try{yield e._$ES}catch(e){Promise.reject(e)}let t=e.scheduleUpdate();return t!=null&&(yield t),!e.isUpdatePending})()}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{var n;e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$EO)==null||n.forEach(e=>{var t;return(t=e.hostUpdate)==null?void 0:t.call(e)}),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(e=>{var t;return(t=e.hostUpdated)==null?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};ue.elementStyles=[],ue.shadowRootOptions={mode:`open`},ue[se(`elementProperties`)]=new Map,ue[se(`finalized`)]=new Map,oe==null||oe({ReactiveElement:ue}),((T=O.reactiveElementVersions)==null?O.reactiveElementVersions=[]:T).push(`2.1.2`);var de,fe=globalThis,pe=e=>e,me=fe.trustedTypes,he=me?me.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,ge=`$lit$`,_e=`lit$${Math.random().toFixed(9).slice(2)}$`,ve=`?`+_e,ye=`<${ve}>`,be=document,xe=()=>be.createComment(``),Se=e=>e===null||typeof e!=`object`&&typeof e!=`function`,Ce=Array.isArray,we=e=>Ce(e)||typeof(e==null?void 0:e[Symbol.iterator])==`function`,Te=`[
2
2
  \f\r]`,Ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,De=/-->/g,Oe=/>/g,ke=RegExp(`>|${Te}(?:([^\\s"'>=/]+)(${Te}*=${Te}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),Ae=/'/g,je=/"/g,Me=/^(?:script|style|textarea|title)$/i,Ne=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),Pe=Symbol.for(`lit-noChange`),A=Symbol.for(`lit-nothing`),Fe=new WeakMap,Ie=be.createTreeWalker(be,129);function Le(e,t){if(!Ce(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return he===void 0?t:he.createHTML(t)}var Re=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=Ee;for(let t=0;t<n;t++){var s;let n=e[t],c,l,u=-1,d=0;for(;d<n.length&&(o.lastIndex=d,l=o.exec(n),l!==null);)d=o.lastIndex,o===Ee?l[1]===`!--`?o=De:l[1]===void 0?l[2]===void 0?l[3]!==void 0&&(o=ke):(Me.test(l[2])&&(i=RegExp(`</`+l[2],`g`)),o=ke):o=Oe:o===ke?l[0]===`>`?(o=(s=i)==null?Ee:s,u=-1):l[1]===void 0?u=-2:(u=o.lastIndex-l[2].length,c=l[1],o=l[3]===void 0?ke:l[3]===`"`?je:Ae):o===je||o===Ae?o=ke:o===De||o===Oe?o=Ee:(o=ke,i=void 0);let f=o===ke&&e[t+1].startsWith(`/>`)?` `:``;a+=o===Ee?n+ye:u>=0?(r.push(c),n.slice(0,u)+ge+n.slice(u)+_e+f):n+_e+(u===-2?t:f)}return[Le(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},ze=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Re(t,n);if(this.el=e.createElement(l,r),Ie.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=Ie.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(ge)){let t=u[o++],n=i.getAttribute(e).split(_e),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?We:r[1]===`?`?Ge:r[1]===`@`?Ke:Ue}),i.removeAttribute(e)}else e.startsWith(_e)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(Me.test(i.tagName)){let e=i.textContent.split(_e),t=e.length-1;if(t>0){i.textContent=me?me.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],xe()),Ie.nextNode(),c.push({type:2,index:++a});i.append(e[t],xe())}}}else if(i.nodeType===8){if(i.data===ve)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(_e,e+1))!==-1;)c.push({type:7,index:a}),e+=_e.length-1}}a++}}static createElement(e,t){let n=be.createElement(`template`);return n.innerHTML=e,n}};function Be(e,t,n=e,r){var i,a,o;if(t===Pe)return t;let s=r===void 0?n._$Cl:(i=n._$Co)==null?void 0:i[r],c=Se(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==c&&(s==null||(a=s._$AO)==null||a.call(s,!1),c===void 0?s=void 0:(s=new c(e),s._$AT(e,n,r)),r===void 0?n._$Cl=s:((o=n._$Co)==null?n._$Co=[]:o)[r]=s),s!==void 0&&(t=Be(e,s._$AS(e,t.values),s,r)),t}var Ve=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;let{el:{content:n},parts:r}=this._$AD,i=((t=e==null?void 0:e.creationScope)==null?be:t).importNode(n,!0);Ie.currentNode=i;let a=Ie.nextNode(),o=0,s=0,c=r[0];for(;c!==void 0;){if(o===c.index){let t;c.type===2?t=new He(a,a.nextSibling,this,e):c.type===1?t=new c.ctor(a,c.name,c.strings,this,e):c.type===6&&(t=new qe(a,this,e)),this._$AV.push(t),c=r[++s]}o!==(c==null?void 0:c.index)&&(a=Ie.nextNode(),o++)}return Ie.currentNode=be,i}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},He=class e{get _$AU(){var e,t;return(e=(t=this._$AM)==null?void 0:t._$AU)==null?this._$Cv:e}constructor(e,t,n,r){var i;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=(i=r==null?void 0:r.isConnected)==null||i}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Be(this,e,t),Se(e)?e===A||e==null||e===``?(this._$AH!==A&&this._$AR(),this._$AH=A):e!==this._$AH&&e!==Pe&&this._(e):e._$litType$===void 0?e.nodeType===void 0?we(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==A&&Se(this._$AH)?this._$AA.nextSibling.data=e:this.T(be.createTextNode(e)),this._$AH=e}$(e){var t;let{values:n,_$litType$:r}=e,i=typeof r==`number`?this._$AC(e):(r.el===void 0&&(r.el=ze.createElement(Le(r.h,r.h[0]),this.options)),r);if(((t=this._$AH)==null?void 0:t._$AD)===i)this._$AH.p(n);else{let e=new Ve(i,this),t=e.u(this.options);e.p(n),this.T(t),this._$AH=e}}_$AC(e){let t=Fe.get(e.strings);return t===void 0&&Fe.set(e.strings,t=new ze(e)),t}k(t){Ce(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(xe()),this.O(xe()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)==null||n.call(this,!1,!0,t);e!==this._$AB;){let t=pe(e).nextSibling;pe(e).remove(),e=t}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}},Ue=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=A,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=A}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=Be(this,e,t,0),a=!Se(e)||e!==this._$AH&&e!==Pe,a&&(this._$AH=e);else{var o;let r=e,s,c;for(e=i[0],s=0;s<i.length-1;s++)c=Be(this,r[n+s],t,s),c===Pe&&(c=this._$AH[s]),a||(a=!Se(c)||c!==this._$AH[s]),c===A?e=A:e!==A&&(e+=((o=c)==null?``:o)+i[s+1]),this._$AH[s]=c}a&&!r&&this.j(e)}j(e){e===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e==null?``:e)}},We=class extends Ue{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===A?void 0:e}},Ge=class extends Ue{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==A)}},Ke=class extends Ue{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){var n;if((e=(n=Be(this,e,t,0))==null?A:n)===Pe)return;let r=this._$AH,i=e===A&&r!==A||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,a=e!==A&&(r===A||i);i&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH==`function`?this._$AH.call((t=(n=this.options)==null?void 0:n.host)==null?this.element:t,e):this._$AH.handleEvent(e)}},qe=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Be(this,e)}},Je=fe.litHtmlPolyfillSupport;Je==null||Je(ze,He),((de=fe.litHtmlVersions)==null?fe.litHtmlVersions=[]:de).push(`3.3.3`);var Ye=(e,t,n)=>{var r;let i=(r=n==null?void 0:n.renderBefore)==null?t:r,a=i._$litPart$;if(a===void 0){var o;let e=(o=n==null?void 0:n.renderBefore)==null?null:o;i._$litPart$=a=new He(t.insertBefore(xe(),e),e,void 0,n==null?{}:n)}return a._$AI(e),a},Xe,Ze,Qe=globalThis,$e=class extends ue{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;let t=super.createRenderRoot();return(e=this.renderOptions).renderBefore!=null||(e.renderBefore=t.firstChild),t}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ye(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Pe}};$e._$litElement$=!0,$e.finalized=!0,(Xe=Qe.litElementHydrateSupport)==null||Xe.call(Qe,{LitElement:$e});var et=Qe.litElementPolyfillSupport;et==null||et({LitElement:$e}),((Ze=Qe.litElementVersions)==null?Qe.litElementVersions=[]:Ze).push(`4.2.2`);var tt={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:ce},nt=(e=tt,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function rt(e){return(t,n)=>typeof n==`object`?nt(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function it(e){"@babel/helpers - typeof";return it=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},it(e)}function at(e,t){if(it(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(it(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ot(e){var t=at(e,`string`);return it(t)==`symbol`?t:t+``}function st(e,t,n){return(t=ot(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ct(Object(n),!0).forEach(function(t){st(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lt(e){return rt(j(j({},e),{},{state:!0,attribute:!1}))}var ut=new class{constructor(){this._domains=[],this._transports=[],this._logs=[],this._prevTime=0;try{if(!window.localStorage)return;let e=window.localStorage.getItem(`logger`);if(!e)return;let[t,n]=e.split(`>`);this._domains=t.split(`,`),n&&(this._transports=n.split(`,`))}catch(e){return}}create(e,t){return n=>{let r=Date.now(),i=new Date(r).toISOString(),a=0;if(this._prevTime&&(a=r-this._prevTime),this._prevTime=r,this._domains.includes(e)&&this._transports.includes(`console`)){let r=(t==null?void 0:t.color)||`blue`;console.log(`%c%s: %c%s %c+%dms`,`color: ${r};`,`${i} ${e}`,``,n,`color: ${r};`,a)}this._logs.push(`${i} ${e}: ${n} +${a}ms`)}}getLogs(){return this._logs}clearLogs(){this._logs=[]}saveLogsToFile(){if(!this._transports.includes(`file`)||!this._logs.length)return;let e=this._logs.join(`
3
- `),t=new Blob([e],{type:`text/plain`}),n=window.URL.createObjectURL(t),r=document.createElement(`a`);r.download=`log.txt`,r.href=n,r.click(),window.URL.revokeObjectURL(n),this.clearLogs()}},dt=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=(r==null?typeof i!=`object`||!i:r)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},ft=(e=>e?dt(e):dt);function pt(e,t){for(var n in t)e[n]=t[n];return e}function mt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ht(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Gt.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return gt(e,o,r,i,null)}function gt(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++Kt:i,__i:-1,__u:0};return i==null&&M.vnode!=null&&M.vnode(a),a}function _t(){return{current:null}}function vt(e){return e.children}function yt(e,t){this.props=e,this.context=t}function bt(e,t){if(t==null)return e.__?bt(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?bt(e):null}function xt(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=pt({},t);a.__v=t.__v+1,M.vnode&&M.vnode(a),Nt(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n==null?bt(t):n,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Ft(r,a,i),t.__e=t.__=null,a.__e!=n&&St(a)}}function St(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),St(e)}function Ct(e){(!e.__d&&(e.__d=!0)&&qt.push(e)&&!wt.__r++||Jt!=M.debounceRendering)&&((Jt=M.debounceRendering)||Yt)(wt)}function wt(){try{for(var e,t=1;qt.length;)qt.length>t&&qt.sort(Xt),e=qt.shift(),t=qt.length,xt(e)}finally{qt.length=wt.__r=0}}function Tt(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||sn,y=t.length;for(c=Et(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||on,p.__i=d,g=Nt(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Rt(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=Dt(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function Et(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=gt(null,o,null,null,null):ln(o)?o=e.__k[a]=gt(vt,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=gt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=kt(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=bt(s)),zt(s,s));return r}function Dt(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Dt(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=bt(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ot(e,t){return t=t||[],e==null||typeof e==`boolean`||(ln(e)?e.some(function(e){Ot(e,t)}):t.push(e)),t}function kt(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function At(e,t,n){t[0]==`-`?e.setProperty(t,n==null?``:n):e[t]=n==null?``:typeof n!=`number`||cn.test(t)?n:n+`px`}function jt(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||At(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||At(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(en,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n[$t]=r[$t]:(n[$t]=tn,e.addEventListener(t,a?rn:nn,a)):e.removeEventListener(t,a?rn:nn,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n==null?``:n;break n}catch(e){}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Mt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[Qt]==null)t[Qt]=tn++;else if(t[Qt]<n[$t])return;return n(M.event?M.event(t):t)}}}function Nt(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=M.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=T.prototype&&T.prototype.render,y=(u=T.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(v?t.__c=d=new T(_,b):(t.__c=d=new yt(_,b),d.constructor=T,d.render=Bt),y&&y.sub(d),d.state||(d.state={}),d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),v&&d.__s==null&&(d.__s=d.state),v&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=pt({},d.__s)),pt(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)v&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),v&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(v&&T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,b),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,b)){t.__v!=n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),sn.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,b),v&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=b,d.props=_,d.__P=e,d.__e=!1,x=M.__r,S=0,v)d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),sn.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=pt(pt({},r),d.getChildContext())),v&&!f&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(p,m)),C=u!=null&&u.type===vt&&u.key==null?It(u.props.children):u,s=Tt(e,ln(C)?C:[C],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||a!=null){if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(w=a.length;w--;)mt(a[w]);Pt(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Pt(t);M.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Lt(n.__e,t,n,r,i,a,o,c,l);return(u=M.diffed)&&u(t),128&t.__u?void 0:s}function Pt(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Pt))}function Ft(e,t,n){for(var r=0;r<n.length;r++)Rt(n[r],n[++r],n[++r]);M.__c&&M.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){M.__e(e,t.__v)}})}function It(e){return typeof e!=`object`||!e||e.__b>0?e:ln(e)?e.map(It):e.constructor===void 0?pt({},e):null}function Lt(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props||on,_=t.props,v=t.type;if(v==`svg`?i=`http://www.w3.org/2000/svg`:v==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(i,v,_.is&&_),s&&(M.__m&&M.__m(t,a),s=!1),a=null}if(v==null)g===_||s&&e.data==_||(e.data=_);else{if(a=v==`textarea`&&_.defaultValue!=null?null:a&&Gt.call(e.childNodes),!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`dangerouslySetInnerHTML`?d=p:l==`children`||l in _||l==`value`&&`defaultValue`in _||l==`checked`&&`defaultChecked`in _||jt(e,l,null,p,i);for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:s&&typeof p!=`function`||g[l]===p||jt(e,l,p,g[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),Tt(t.type==`template`?e.content:e,ln(f)?f:[f],t,n,r,v==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&bt(n,0),s,c),a!=null)for(l=a.length;l--;)mt(a[l]);s&&v!=`textarea`||(l=`value`,v==`progress`&&m==null?e.removeAttribute(`value`):m!=null&&(m!==e[l]||v==`progress`&&!m||v==`option`&&m!=g[l])&&jt(e,l,m,g[l],i),l=`checked`,h!=null&&h!=e[l]&&jt(e,l,h,g[l],i))}return e}function Rt(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){M.__e(e,n)}}function zt(e,t,n){var r,i;if(M.unmount&&M.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Rt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){M.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&zt(r[i],t,n||typeof e.type!=`function`);n||mt(e.__e),e.__c=e.__=e.__e=void 0}function Bt(e,t,n){return this.constructor(e,n)}function Vt(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),M.__&&M.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],Nt(t,e=(!r&&n||t).__k=ht(vt,null,[e]),i||on,on,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?Gt.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),Ft(a,e,o)}function Ht(e,t){Vt(e,t,Ht)}function Ut(e,t,n){var r,i,a,o,s=pt({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a==`key`?r=t[a]:a==`ref`?i=t[a]:s[a]=t[a]===void 0&&o!=null?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Gt.call(arguments,2):n),gt(e.type,s,r||e.key,i||e.ref,null)}function Wt(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,Ct(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+an++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}var Gt,M,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un=s((()=>{on={},sn=[],cn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ln=Array.isArray,Gt=sn.slice,M={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},Kt=0,yt.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=pt({},this.state);typeof e==`function`&&(e=e(pt({},n),this.props)),e&&pt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ct(this))},yt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ct(this))},yt.prototype.render=vt,qt=[],Yt=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xt=function(e,t){return e.__v.__b-t.__v.__b},wt.__r=0,Zt=Math.random().toString(8),Qt=`__d`+Zt,$t=`__a`+Zt,en=/(PointerCapture)$|Capture$/i,tn=0,nn=Mt(!1),rn=Mt(!0),an=0}));function dn(e,t){F.__h&&F.__h(P,e,Mn||t),Mn=0;var n=P.__H||(P.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N(e){return Mn=1,fn(On,e)}function fn(e,t,n){var r=dn(kn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):On(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=P,!P.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};P.__f=!0;var a=P.shouldComponentUpdate,o=P.componentWillUpdate;P.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},P.shouldComponentUpdate=i}return r.__N||r.__}function pn(e,t){var n=dn(kn++,3);!F.__s&&Dn(n.__H,t)&&(n.__=e,n.u=t,P.__H.__h.push(n))}function mn(e,t){var n=dn(kn++,4);!F.__s&&Dn(n.__H,t)&&(n.__=e,n.u=t,P.__h.push(n))}function hn(e){return Mn=5,_n(function(){return{current:e}},[])}function gn(e,t,n){Mn=6,mn(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function _n(e,t){var n=dn(kn++,7);return Dn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function vn(e,t){return Mn=8,_n(function(){return e},t)}function yn(e){var t=P.context[e.__c],n=dn(kn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(P)),t.props.value):e.__}function bn(e,t){F.useDebugValue&&F.useDebugValue(t?t(e):e)}function xn(e){var t=dn(kn++,10),n=N();return t.__=e,P.componentDidCatch||(P.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Sn(){var e=dn(kn++,11);if(!e.__){for(var t=P.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function Cn(){for(var e;e=Nn.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Tn),t.__h.some(En),t.__h=[]}catch(n){t.__h=[],F.__e(n,e.__v)}}}function wn(e){var t,n=function(){clearTimeout(r),Bn&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Bn&&(t=requestAnimationFrame(n))}function Tn(e){var t=P,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),P=t}function En(e){var t=P;e.__c=e.__(),P=t}function Dn(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function On(e,t){return typeof t==`function`?t(e):t}var kn,P,An,jn,Mn,Nn,F,Pn,Fn,In,Ln,Rn,zn,Bn,I=s((()=>{un(),Mn=0,Nn=[],F=M,Pn=F.__b,Fn=F.__r,In=F.diffed,Ln=F.__c,Rn=F.unmount,zn=F.__,F.__b=function(e){P=null,Pn&&Pn(e)},F.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zn&&zn(e,t)},F.__r=function(e){Fn&&Fn(e),kn=0;var t=(P=e.__c).__H;t&&(An===P?(t.__h=[],P.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Tn),t.__h.some(En),t.__h=[],kn=0)),An=P},F.diffed=function(e){In&&In(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Nn.push(t)!==1&&jn===F.requestAnimationFrame||((jn=F.requestAnimationFrame)||wn)(Cn)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),An=P=null},F.__c=function(e,t){t.some(function(e){try{e.__h.some(Tn),e.__h=e.__h.filter(function(e){return!e.__||En(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],F.__e(n,e.__v)}}),Ln&&Ln(e,t)},F.unmount=function(e){Rn&&Rn(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Tn(e)}catch(e){t=e}}),n.__H=void 0,t&&F.__e(t,n.__v))},Bn=typeof requestAnimationFrame==`function`})),Vn=l({Children:()=>br,Component:()=>yt,Fragment:()=>vt,PureComponent:()=>Yn,StrictMode:()=>vt,Suspense:()=>er,SuspenseList:()=>rr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Ir,cloneElement:()=>pr,createContext:()=>Wt,createElement:()=>ht,createFactory:()=>lr,createPortal:()=>or,createRef:()=>_t,default:()=>L,findDOMNode:()=>hr,flushSync:()=>zr,forwardRef:()=>Zn,hydrate:()=>cr,isElement:()=>Br,isFragment:()=>dr,isMemo:()=>fr,isValidElement:()=>ur,lazy:()=>nr,memo:()=>Xn,render:()=>sr,startTransition:()=>Kn,unmountComponentAtNode:()=>mr,unstable_batchedUpdates:()=>Rr,useCallback:()=>vn,useContext:()=>yn,useDebugValue:()=>bn,useDeferredValue:()=>qn,useEffect:()=>pn,useErrorBoundary:()=>xn,useId:()=>Sn,useImperativeHandle:()=>gn,useInsertionEffect:()=>gr,useLayoutEffect:()=>mn,useMemo:()=>_n,useReducer:()=>fn,useRef:()=>hn,useState:()=>N,useSyncExternalStore:()=>Wn,useTransition:()=>Jn,version:()=>Lr});function Hn(e,t){for(var n in t)e[n]=t[n];return e}function Un(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function Wn(e,t){var n=t(),r=N({t:{__:n,u:t}}),i=r[0].t,a=r[1];return mn(function(){i.__=n,i.u=t,Gn(i)&&a({t:i})},[e,n,t]),pn(function(){return Gn(i)&&a({t:i}),e(function(){Gn(i)&&a({t:i})})},[e]),n}function Gn(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}var t,n}function Kn(e){e()}function qn(e){return e}function Jn(){return[!1,Kn]}function Yn(e,t){this.props=e,this.context=t}function Xn(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&(typeof n==`function`?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:Un(this.props,e)}function r(t){return this.shouldComponentUpdate=n,ht(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.__f=r.prototype.isReactComponent=!0,r.type=e,r}function Zn(e){function t(t){var n=Hn({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=vr,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}function Qn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=Hn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Qn(e,t,n)})),e}function $n(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return $n(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function er(){this.__u=0,this.o=null,this.__b=null}function tr(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function nr(e){var t,n,r,i=null;function a(a){if(t||(t=e()).then(function(e){e&&(i=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return i?ht(i,a):null}return a.displayName=`Lazy`,a.__f=!0,a}function rr(){this.i=null,this.l=null}function ir(e){return this.getChildContext=function(){return e.context},e.children}function ar(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Vt(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}Vt(ht(ir,{context:t.context},e.__v),t.v)}function or(e,t){var n=ht(ar,{__v:e,h:t});return n.containerInfo=t,n}function sr(e,t,n){return t.__k==null&&(t.textContent=``),Vt(e,t),typeof n==`function`&&n(),e?e.__c:null}function cr(e,t,n){return Ht(e,t),typeof n==`function`&&n(),e?e.__c:null}function lr(e){return ht.bind(null,e)}function ur(e){return!!e&&e.$$typeof===wr}function dr(e){return ur(e)&&e.type===vt}function fr(e){return!!e&&typeof e.displayName==`string`&&e.displayName.indexOf(`Memo(`)==0}function pr(e){return ur(e)?Ut.apply(null,arguments):e}function mr(e){return!!e.__k&&(Vt(null,e),!0)}function hr(e){return e&&(e.base||e.nodeType===1&&e)||null}var gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,L,Vr=s((()=>{un(),I(),I(),gr=mn,(Yn.prototype=new yt).isPureReactComponent=!0,Yn.prototype.shouldComponentUpdate=function(e,t){return Un(this.props,e)||Un(this.state,t)},_r=M.__b,M.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_r&&_r(e)},vr=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911,yr=function(e,t){return e==null?null:Ot(Ot(e).map(t))},br={map:yr,forEach:yr,count:function(e){return e?Ot(e).length:0},only:function(e){var t=Ot(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:Ot},xr=M.__e,M.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}xr(e,t,n,r)},Sr=M.unmount,M.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Sr&&Sr(e)},(er.prototype=new yt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=tr(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=$n(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},er.prototype.componentWillUnmount=function(){this.o=[]},er.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=Qn(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&ht(vt,null,e.fallback);return i&&(i.__u&=-33),[ht(vt,null,t.__a?null:e.children),i]},Cr=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}},(rr.prototype=new yt).__a=function(e){var t=this,n=tr(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),Cr(t,e,r)):i()};n?n(a):a()}},rr.prototype.render=function(e){this.i=null,this.l=new Map;var t=Ot(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},rr.prototype.componentDidUpdate=rr.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Cr(e,n,t)})},wr=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,Tr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Er=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Dr=/[A-Z0-9]/g,Or=typeof document<`u`,kr=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)},yt.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(yt.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}),Ar=M.event,M.event=function(e){return Ar&&(e=Ar(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e},Mr={configurable:!0,get:function(){return this.class}},Nr=M.vnode,M.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)==-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Or&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||kr(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:Er.test(a)&&(a=s):s=a=`oninput`:i&&Tr.test(a)?a=a.replace(Dr,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&(r.multiple&&Array.isArray(r.value)&&(r.value=Ot(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=Ot(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Mr)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=wr,Nr&&Nr(e)},Pr=M.__r,M.__r=function(e){Pr&&Pr(e),jr=e.__c},Fr=M.diffed,M.diffed=function(e){Fr&&Fr(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value),jr=null},Ir={ReactCurrentDispatcher:{current:{readContext:function(e){return jr.__n[e.__c].props.value},useCallback:vn,useContext:yn,useDebugValue:bn,useDeferredValue:qn,useEffect:pn,useId:Sn,useImperativeHandle:gn,useInsertionEffect:gr,useLayoutEffect:mn,useMemo:_n,useReducer:fn,useRef:hn,useState:N,useSyncExternalStore:Wn,useTransition:Jn}}},Lr=`18.3.1`,Rr=function(e,t){return e(t)},zr=function(e,t){var n=M.debounceRendering;M.debounceRendering=function(e){return e()};var r=e(t);return M.debounceRendering=n,r},Br=ur,L={useState:N,useId:Sn,useReducer:fn,useEffect:pn,useLayoutEffect:mn,useInsertionEffect:gr,useTransition:Jn,useDeferredValue:qn,useSyncExternalStore:Wn,startTransition:Kn,useRef:hn,useImperativeHandle:gn,useMemo:_n,useCallback:vn,useContext:yn,useDebugValue:bn,version:`18.3.1`,Children:br,render:sr,hydrate:cr,unmountComponentAtNode:mr,createPortal:or,createElement:ht,createContext:Wt,createFactory:lr,cloneElement:pr,createRef:_t,Fragment:vt,isValidElement:ur,isElement:Br,isFragment:dr,isMemo:fr,findDOMNode:hr,Component:yt,PureComponent:Yn,memo:Xn,forwardRef:Zn,flushSync:zr,unstable_batchedUpdates:Rr,StrictMode:vt,Suspense:er,SuspenseList:rr,lazy:nr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ir}}));Vr();var Hr=e=>e;function Ur(e,t=Hr){let n=L.useSyncExternalStore(e.subscribe,L.useCallback(()=>t(e.getState()),[e,t]),L.useCallback(()=>t(e.getInitialState()),[e,t]));return L.useDebugValue(n),n}var Wr=e=>{let t=ft(e),n=e=>Ur(t,e);return Object.assign(n,t),n},Gr=(e=>e?Wr(e):Wr),Kr=c(((e,t,n)=>{(function(n,r){"use strict";var i=`1.0.41`,a=``,o=`function`,s=`undefined`,c=`object`,l=`string`,u=`major`,d=`model`,f=`name`,p=`type`,m=`vendor`,h=`version`,g=`architecture`,_=`console`,v=`mobile`,y=`tablet`,b=`smarttv`,x=`wearable`,S=`embedded`,C=`Amazon`,w=`Apple`,T=`ASUS`,ee=`BlackBerry`,E=`Browser`,te=`Chrome`,ne=`Edge`,re=`Firefox`,D=`Google`,O=`Honor`,ie=`Huawei`,ae=`Lenovo`,oe=`LG`,se=`Microsoft`,k=`Motorola`,ce=`Nvidia`,le=`OnePlus`,ue=`Opera`,de=`OPPO`,fe=`Samsung`,pe=`Sharp`,me=`Sony`,he=`Xiaomi`,ge=`Zebra`,_e=`Facebook`,ve=`Chromium OS`,ye=`Mac OS`,be=` Browser`,xe=function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n},Se=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Ce=function(e,t){return typeof e==l&&we(t).indexOf(we(e))!==-1},we=function(e){return e.toLowerCase()},Te=function(e){return typeof e==l?e.replace(/[^\d\.]/g,a).split(`.`)[0]:r},Ee=function(e,t){if(typeof e==l)return e=e.replace(/^\s\s*/,a),typeof t===s?e:e.substring(0,500)},De=function(e,t){for(var n=0,i,a,s,l,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(i=a=0;i<f.length&&!u&&f[i];)if(u=f[i++].exec(e),u)for(s=0;s<p.length;s++)d=u[++a],l=p[s],typeof l==c&&l.length>0?l.length===2?typeof l[1]==o?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:l.length===3?typeof l[1]===o&&!(l[1].exec&&l[1].test)?this[l[0]]=d?l[1].call(this,d,l[2]):r:this[l[0]]=d?d.replace(l[1],l[2]):r:l.length===4&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):r):this[l]=d||r;n+=2}},Oe=function(e,t){for(var n in t)if(typeof t[n]==c&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(Ce(t[n][i],e))return n===`?`?r:n}else if(Ce(t[n],e))return n===`?`?r:n;return t.hasOwnProperty(`*`)?t[`*`]:e},ke={"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},Ae={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`},je={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[f,`Chrome`]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[f,`Edge`]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,h],[/opios[\/ ]+([\w\.]+)/i],[h,[f,ue+` Mini`]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[f,ue+` GX`]],[/\bopr\/([\w\.]+)/i],[h,[f,ue]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[f,`Baidu`]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[f,`Maxthon`]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/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|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[f,`Quark`]],[/\bddg\/([\w\.]+)/i],[h,[f,`DuckDuckGo`]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[f,`UC`+E]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[f,`WeChat`]],[/konqueror\/([\w\.]+)/i],[h,[f,`Konqueror`]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[f,`IE`]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[f,`Yandex`]],[/slbrowser\/([\w\.]+)/i],[h,[f,`Smart Lenovo `+E]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,`$1 Secure `+E],h],[/\bfocus\/([\w\.]+)/i],[h,[f,re+` Focus`]],[/\bopt\/([\w\.]+)/i],[h,[f,ue+` Touch`]],[/coc_coc\w+\/([\w\.]+)/i],[h,[f,`Coc Coc`]],[/dolfin\/([\w\.]+)/i],[h,[f,`Dolphin`]],[/coast\/([\w\.]+)/i],[h,[f,ue+` Coast`]],[/miuibrowser\/([\w\.]+)/i],[h,[f,`MIUI`+be]],[/fxios\/([\w\.-]+)/i],[h,[f,re]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[f,`360`]],[/\b(qq)\/([\w\.]+)/i],[[f,/(.+)/,`$1Browser`],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[f,/(.+)/,`$1`+be],h],[/samsungbrowser\/([\w\.]+)/i],[h,[f,fe+` Internet`]],[/metasr[\/ ]?([\d\.]+)/i],[h,[f,`Sogou Explorer`]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,`Sogou Mobile`],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[f,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[f],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,_e],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\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],[f,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[f,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[f,`TikTok`]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[f,te+` Headless`]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,te+` WebView`],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[f,`Android `+E]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[f,`Mobile Safari`]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[h,Oe,ke]],[/(webkit|khtml)\/([\w\.]+)/i],[f,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,`Netscape`],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[f,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[f,re+` 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,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[f,[h,/_/g,`.`]],[/(cobalt)\/([\w\.]+)/i],[f,[h,/master.|lts./,``]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[g,`amd64`]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[g,`ia32`]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[g,`arm64`]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[g,`armhf`]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[g,`arm`]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[g,/ower/,a,we]],[/ sun4\w[;\)]/i],[[g,`sparc`]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[g,we]]],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],[d,[m,fe],[p,y]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[m,fe],[p,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[m,w],[p,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[m,w],[p,y]],[/(macintosh);/i],[d,[m,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[m,pe],[p,v]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[m,O],[p,y]],[/honor([-\w ]+)[;\)]/i],[d,[m,O],[p,v]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[d,[m,ie],[p,y]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[m,ie],[p,v]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g,` `],[m,he],[p,y]],[/\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,/ ([\w ]+) miui\/v?\d/i],[[d,/_/g,` `],[m,he],[p,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[m,de],[p,v]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[m,Oe,{OnePlus:[`304`,`403`,`203`],"*":de}],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[m,`Vivo`],[p,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[m,`Realme`],[p,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[m,k],[p,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[m,k],[p,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[m,oe],[p,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[m,oe],[p,v]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[d,[m,ae],[p,y]],[/(nokia) (t[12][01])/i],[m,d,[p,y]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g,` `],[p,v],[m,`Nokia`]],[/(pixel (c|tablet))\b/i],[d,[m,D],[p,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[m,D],[p,v]],[/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],[d,[m,me],[p,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,`Xperia Tablet`],[m,me],[p,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[m,le],[p,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[m,C],[p,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,`Fire Phone $1`],[m,C],[p,v]],[/(playbook);[-\w\),; ]+(rim)/i],[d,m,[p,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[m,ee],[p,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[m,T],[p,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[m,T],[p,v]],[/(nexus 9)/i],[d,[m,`HTC`],[p,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[d,/_/g,` `],[p,v]],[/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],[d,[m,`TCL`],[p,y]],[/(itel) ((\w+))/i],[[m,we],d,[p,Oe,{tablet:[`p10001l`,`w7001`],"*":`mobile`}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[m,`Acer`],[p,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[m,`Meizu`],[p,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[m,`Ulefone`],[p,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[m,`Energizer`],[p,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[m,`Cat`],[p,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[m,`Smartfren`],[p,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[m,`Nothing`],[p,v]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[m,`Archos`],[p,y]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[m,`Archos`],[p,v]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[m,d,[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[m,d,[p,v]],[/(kobo)\s(ereader|touch)/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],[m,d,[p,y]],[/(surface duo)/i],[d,[m,se],[p,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[m,`Fairphone`],[p,v]],[/(u304aa)/i],[d,[m,`AT&T`],[p,v]],[/\bsie-(\w*)/i],[d,[m,`Siemens`],[p,v]],[/\b(rct\w+) b/i],[d,[m,`RCA`],[p,y]],[/\b(venue[\d ]{2,7}) b/i],[d,[m,`Dell`],[p,y]],[/\b(q(?:mv|ta)\w+) b/i],[d,[m,`Verizon`],[p,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[m,`Barnes & Noble`],[p,y]],[/\b(tm\d{3}\w+) b/i],[d,[m,`NuVision`],[p,y]],[/\b(k88) b/i],[d,[m,`ZTE`],[p,y]],[/\b(nx\d{3}j) b/i],[d,[m,`ZTE`],[p,v]],[/\b(gen\d{3}) b.+49h/i],[d,[m,`Swiss`],[p,v]],[/\b(zur\d{3}) b/i],[d,[m,`Swiss`],[p,y]],[/\b((zeki)?tb.*\b) b/i],[d,[m,`Zeki`],[p,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,`Dragon Touch`],d,[p,y]],[/\b(ns-?\w{0,9}) b/i],[d,[m,`Insignia`],[p,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[m,`NextBook`],[p,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,`Voice`],d,[p,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,`LvTel`],d,[p,v]],[/\b(ph-1) /i],[d,[m,`Essential`],[p,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[m,`Envizen`],[p,y]],[/\b(trio[-\w\. ]+) b/i],[d,[m,`MachSpeed`],[p,y]],[/\btu_(1491) b/i],[d,[m,`Rotor`],[p,y]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[m,ce],[p,y]],[/(sprint) (\w+)/i],[m,d,[p,v]],[/(kin\.[onetw]{3})/i],[[d,/\./g,` `],[m,se],[p,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[m,ge],[p,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[m,ge],[p,v]],[/smart-tv.+(samsung)/i],[m,[p,b]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,`SmartTV`],[m,fe],[p,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,oe],[p,b]],[/(apple) ?tv/i],[m,[d,w+` TV`],[p,b]],[/crkey/i],[[d,te+`cast`],[m,D],[p,b]],[/droid.+aft(\w+)( bui|\))/i],[d,[m,C],[p,b]],[/(shield \w+ tv)/i],[d,[m,ce],[p,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[m,pe],[p,b]],[/(bravia[\w ]+)( bui|\))/i],[d,[m,me],[p,b]],[/(mi(tv|box)-?\w+) bui/i],[d,[m,he],[p,b]],[/Hbbtv.*(technisat) (.*);/i],[m,d,[p,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,Ee],[d,Ee],[p,b]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[p,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,d,[p,_]],[/droid.+; (shield)( bui|\))/i],[d,[m,ce],[p,_]],[/(playstation \w+)/i],[d,[m,me],[p,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[m,se],[p,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[m,fe],[p,x]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[m,d,[p,x]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[m,de],[p,x]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[m,w],[p,x]],[/(opwwe\d{3})/i],[d,[m,le],[p,x]],[/(moto 360)/i],[d,[m,k],[p,x]],[/(smartwatch 3)/i],[d,[m,me],[p,x]],[/(g watch r)/i],[d,[m,oe],[p,x]],[/droid.+; (wt63?0{2,3})\)/i],[d,[m,ge],[p,x]],[/droid.+; (glass) \d/i],[d,[m,D],[p,x]],[/(pico) (4|neo3(?: link|pro)?)/i],[m,d,[p,x]],[/; (quest( \d| pro)?)/i],[d,[m,_e],[p,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[p,S]],[/(aeobc)\b/i],[d,[m,C],[p,S]],[/(homepod).+mac os/i],[d,[m,w],[p,S]],[/windows iot/i],[[p,S]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,v]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[m,`Generic`]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[f,ne+`HTML`]],[/(arkweb)\/([\w\.]+)/i],[f,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[f,`Blink`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,h],[/ladybird\//i],[[f,`LibWeb`]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[f,[h,Oe,Ae]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,Oe,Ae],[f,`Windows`]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,`.`],[f,`iOS`]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,ye],[h,/_/g,`.`]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,f],[/(ubuntu) ([\w\.]+) like android/i],[[f,/(.+)/,`$1 Touch`],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[f,h],[/\(bb(10);/i],[h,[f,ee]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[f,`Symbian`]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[f,re+` OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[f,`webOS`]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[f,`watchOS`]],[/crkey\/([\d\.]+)/i],[h,[f,te+`cast`]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,ve],h],[/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)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,h],[/(sunos) ?([\w\.\d]*)/i],[[f,`Solaris`],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,h]]},Me=function(e,t){if(typeof e==c&&(t=e,e=r),!(this instanceof Me))return new Me(e,t).getResult();var i=typeof n!==s&&n.navigator?n.navigator:r,_=e||(i&&i.userAgent?i.userAgent:a),b=i&&i.userAgentData?i.userAgentData:r,x=t?xe(je,t):je,S=i&&i.userAgent==_;return this.getBrowser=function(){var e={};return e[f]=r,e[h]=r,De.call(e,_,x.browser),e[u]=Te(e[h]),S&&i&&i.brave&&typeof i.brave.isBrave==o&&(e[f]=`Brave`),e},this.getCPU=function(){var e={};return e[g]=r,De.call(e,_,x.cpu),e},this.getDevice=function(){var e={};return e[m]=r,e[d]=r,e[p]=r,De.call(e,_,x.device),S&&!e[p]&&b&&b.mobile&&(e[p]=v),S&&e[d]==`Macintosh`&&i&&typeof i.standalone!==s&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[d]=`iPad`,e[p]=y),e},this.getEngine=function(){var e={};return e[f]=r,e[h]=r,De.call(e,_,x.engine),e},this.getOS=function(){var e={};return e[f]=r,e[h]=r,De.call(e,_,x.os),S&&!e[f]&&b&&b.platform&&b.platform!=`Unknown`&&(e[f]=b.platform.replace(/chrome os/i,ve).replace(/macos/i,ye)),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 _},this.setUA=function(e){return _=typeof e==l&&e.length>500?Ee(e,500):e,this},this.setUA(_),this};Me.VERSION=i,Me.BROWSER=Se([f,h,u]),Me.CPU=Se([g]),Me.DEVICE=Se([d,m,p,_,v,b,y,x,S]),Me.ENGINE=Me.OS=Se([f,h]),typeof e===s?typeof define===o&&define.amd?define(function(){return Me}):typeof n!==s&&(n.UAParser=Me):(typeof t!==s&&t.exports&&(e=t.exports=Me),e.UAParser=Me);var Ne=typeof n!==s&&(n.jQuery||n.Zepto);if(Ne&&!Ne.ua){var Pe=new Me;Ne.ua=Pe.getResult(),Ne.ua.get=function(){return Pe.getUA()},Ne.ua.set=function(e){Pe.setUA(e);var t=Pe.getResult();for(var n in t)Ne.ua[n]=t[n]}}})(typeof window==`object`?window:n)})),qr=c((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){return e&&typeof e==`object`&&`default`in e?e.default:e}t((Vr(),f(Vn)));var n=new(Kr()),r=n.getBrowser();n.getCPU();var i=n.getDevice(),a=n.getEngine(),o=n.getOS(),s=n.getUA(),c={Mobile:`mobile`,Tablet:`tablet`,SmartTv:`smarttv`,Console:`console`,Wearable:`wearable`,Embedded:`embedded`,Browser:void 0},l={Chrome:`Chrome`,Firefox:`Firefox`,Opera:`Opera`,Yandex:`Yandex`,Safari:`Safari`,InternetExplorer:`Internet Explorer`,Edge:`Edge`,Chromium:`Chromium`,Ie:`IE`,MobileSafari:`Mobile Safari`,EdgeChromium:`Edge Chromium`,MIUI:`MIUI Browser`,SamsungBrowser:`Samsung Browser`},u={IOS:`iOS`,Android:`Android`,WindowsPhone:`Windows Phone`,Windows:`Windows`,MAC_OS:`Mac OS`},d=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`none`;return e||t},p=function(){return typeof window<`u`&&(window.navigator||navigator)?window.navigator||navigator:!1},m=function(e){var t=p();return t&&t.platform&&(t.platform.indexOf(e)!==-1||t.platform===`MacIntel`&&t.maxTouchPoints>1&&!window.MSStream)},h=function(e){return e.type===c.Mobile},g=function(e){return e.type===c.Tablet},_=function(e){var t=e.type;return t===c.Mobile||t===c.Tablet},v=function(e){return e.type===c.SmartTv},y=function(e){return e.type===c.Browser},b=function(e){return e.type===c.Wearable},x=function(e){return e.type===c.Console},S=function(e){return e.type===c.Embedded},C=function(e){var t=e.vendor;return d(t)},w=function(e){var t=e.model;return d(t)},T=function(e){var t=e.type;return d(t,`browser`)},ee=function(e){return e.name===u.Android},E=function(e){return e.name===u.Windows},te=function(e){return e.name===u.MAC_OS},ne=function(e){return e.name===u.WindowsPhone},re=function(e){return e.name===u.IOS},D=function(e){var t=e.version;return d(t)},O=function(e){var t=e.name;return d(t)},ie=function(e){return e.name===l.Chrome},ae=function(e){return e.name===l.Firefox},oe=function(e){return e.name===l.Chromium},se=function(e){return e.name===l.Edge},k=function(e){return e.name===l.Yandex},ce=function(e){var t=e.name;return t===l.Safari||t===l.MobileSafari},le=function(e){return e.name===l.MobileSafari},ue=function(e){return e.name===l.Opera},de=function(e){var t=e.name;return t===l.InternetExplorer||t===l.Ie},fe=function(e){return e.name===l.MIUI},pe=function(e){return e.name===l.SamsungBrowser},me=function(e){var t=e.version;return d(t)},he=function(e){var t=e.major;return d(t)},ge=function(e){var t=e.name;return d(t)},_e=function(e){var t=e.name;return d(t)},ve=function(e){var t=e.version;return d(t)},ye=function(){var e=p(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return typeof t==`string`&&/electron/.test(t)},be=function(e){return typeof e==`string`&&e.indexOf(`Edg/`)!==-1},xe=function(){var e=p();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform===`MacIntel`&&e.maxTouchPoints>1)&&!window.MSStream},Se=function(){return m(`iPad`)},Ce=function(){return m(`iPhone`)},we=function(){return m(`iPod`)},Te=function(e){return d(e)};v(i),x(i),b(i),S(i),le(r)||Se(),oe(r),_(i)||Se(),h(i),g(i)||Se(),y(i);var Ee=y(i);ee(o),ne(o),re(o)||Se(),ie(r),ae(r);var De=ce(r);ue(r),de(r);var Oe=D(o),ke=O(o),Ae=me(r);he(r);var je=ge(r);C(i),w(i),_e(a),ve(a),Te(s),se(r)||be(s),k(r),T(i),xe(),Se(),Ce(),we(),ye(),be(s),se(r)&&be(s),E(o),te(o),fe(r),pe(r),e.browserName=je,e.fullBrowserVersion=Ae,e.isDesktop=Ee,e.isSafari=De,e.osName=ke,e.osVersion=Oe})),Jr=c(((e,t)=>{var n=`__lodash_hash_undefined__`,r=9007199254740991,i=`[object Arguments]`,a=`[object Array]`,o=`[object Boolean]`,s=`[object Date]`,c=`[object Error]`,l=`[object Function]`,u=`[object Map]`,d=`[object Number]`,f=`[object Object]`,p=`[object RegExp]`,m=`[object Set]`,h=`[object String]`,g=`[object WeakMap]`,_=`[object ArrayBuffer]`,v=`[object DataView]`,y=`[object Float32Array]`,b=`[object Float64Array]`,x=`[object Int8Array]`,S=`[object Int16Array]`,C=`[object Int32Array]`,w=`[object Uint8Array]`,T=`[object Uint8ClampedArray]`,ee=`[object Uint16Array]`,E=`[object Uint32Array]`,te=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,D={};D[y]=D[b]=D[x]=D[S]=D[C]=D[w]=D[T]=D[ee]=D[E]=!0,D[i]=D[a]=D[_]=D[o]=D[v]=D[s]=D[c]=D[l]=D[u]=D[d]=D[f]=D[p]=D[m]=D[h]=D[g]=!1;var O=typeof global==`object`&&global&&global.Object===Object&&global,ie=typeof self==`object`&&self&&self.Object===Object&&self,ae=O||ie||Function(`return this`)(),oe=typeof e==`object`&&e&&!e.nodeType&&e,se=oe&&typeof t==`object`&&t&&!t.nodeType&&t,k=se&&se.exports===oe,ce=k&&O.process,le=function(){try{return se&&se.require&&se.require(`util`).types||ce&&ce.binding&&ce.binding(`util`)}catch(e){}}(),ue=le&&le.isTypedArray;function de(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function fe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function pe(e){return function(t){return e(t)}}function me(e,t){return e==null?void 0:e[t]}function he(e,t){return function(n){return e(t(n))}}var ge=Array.prototype,_e=Function.prototype,ve=Object.prototype,ye=ae[`__core-js_shared__`],be=_e.toString,xe=ve.hasOwnProperty,Se=function(){var e=/[^.]+$/.exec(ye&&ye.keys&&ye.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),Ce=ve.toString,we=be.call(Object),Te=RegExp(`^`+be.call(xe).replace(te,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Ee=k?ae.Buffer:void 0,De=ae.Symbol,Oe=ae.Uint8Array,ke=Ee?Ee.allocUnsafe:void 0,Ae=he(Object.getPrototypeOf,Object),je=Object.create,Me=ve.propertyIsEnumerable,Ne=ge.splice,Pe=De?De.toStringTag:void 0,A=function(){try{var e=Nt(Object,`defineProperty`);return e({},``,{}),e}catch(e){}}(),Fe=Ee?Ee.isBuffer:void 0,Ie=Math.max,Le=Date.now,Re=Nt(ae,`Map`),ze=Nt(Object,`create`),Be=function(){function e(){}return function(t){if(!tn(t))return{};if(je)return je(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ve(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function He(){this.__data__=ze?ze(null):{},this.size=0}function Ue(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function We(e){var t=this.__data__;if(ze){var r=t[e];return r===n?void 0:r}return xe.call(t,e)?t[e]:void 0}function Ge(e){var t=this.__data__;return ze?t[e]!==void 0:xe.call(t,e)}function Ke(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=ze&&t===void 0?n:t,this}Ve.prototype.clear=He,Ve.prototype.delete=Ue,Ve.prototype.get=We,Ve.prototype.has=Ge,Ve.prototype.set=Ke;function qe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Je(){this.__data__=[],this.size=0}function Ye(e){var t=this.__data__,n=pt(t,e);return n<0?!1:(n==t.length-1?t.pop():Ne.call(t,n,1),--this.size,!0)}function Xe(e){var t=this.__data__,n=pt(t,e);return n<0?void 0:t[n][1]}function Ze(e){return pt(this.__data__,e)>-1}function Qe(e,t){var n=this.__data__,r=pt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}qe.prototype.clear=Je,qe.prototype.delete=Ye,qe.prototype.get=Xe,qe.prototype.has=Ze,qe.prototype.set=Qe;function $e(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function et(){this.size=0,this.__data__={hash:new Ve,map:new(Re||qe),string:new Ve}}function tt(e){var t=Mt(this,e).delete(e);return this.size-=+!!t,t}function nt(e){return Mt(this,e).get(e)}function rt(e){return Mt(this,e).has(e)}function it(e,t){var n=Mt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}$e.prototype.clear=et,$e.prototype.delete=tt,$e.prototype.get=nt,$e.prototype.has=rt,$e.prototype.set=it;function at(e){var t=this.__data__=new qe(e);this.size=t.size}function ot(){this.__data__=new qe,this.size=0}function st(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ct(e){return this.__data__.get(e)}function j(e){return this.__data__.has(e)}function lt(e,t){var n=this.__data__;if(n instanceof qe){var r=n.__data__;if(!Re||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $e(r)}return n.set(e,t),this.size=n.size,this}at.prototype.clear=ot,at.prototype.delete=st,at.prototype.get=ct,at.prototype.has=j,at.prototype.set=lt;function ut(e,t){var n=Yt(e),r=!n&&Jt(e),i=!n&&!r&&Qt(e),a=!n&&!r&&!i&&an(e),o=n||r||i||a,s=o?fe(e.length,String):[],c=s.length;for(var l in e)(t||xe.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||It(l,c)))&&s.push(l);return s}function dt(e,t,n){(n!==void 0&&!qt(e[t],n)||n===void 0&&!(t in e))&&mt(e,t,n)}function ft(e,t,n){var r=e[t];(!(xe.call(e,t)&&qt(r,n))||n===void 0&&!(t in e))&&mt(e,t,n)}function pt(e,t){for(var n=e.length;n--;)if(qt(e[n][0],t))return n;return-1}function mt(e,t,n){t==`__proto__`&&A?A(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ht=jt();function gt(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Pe&&Pe in Object(e)?Pt(e):Ht(e)}function _t(e){return nn(e)&&gt(e)==i}function vt(e){return!tn(e)||zt(e)?!1:($t(e)?Te:ne).test(Kt(e))}function yt(e){return nn(e)&&en(e.length)&&!!D[gt(e)]}function bt(e){if(!tn(e))return Vt(e);var t=Bt(e),n=[];for(var r in e)(r!=`constructor`||!t&&xe.call(e,r))&&n.push(r);return n}function xt(e,t,n,r,i){e!==t&&ht(t,function(a,o){if(i||(i=new at),tn(a))St(e,t,o,n,xt,r,i);else{var s=r?r(Wt(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),dt(e,o,s)}},sn)}function St(e,t,n,r,i,a,o){var s=Wt(e,n),c=Wt(t,n),l=o.get(c);if(l)dt(e,n,l);else{var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=Yt(c),p=!f&&Qt(c),m=!f&&!p&&an(c);u=c,f||p||m?Yt(s)?u=s:Zt(s)?u=Ot(s):p?(d=!1,u=Tt(c,!0)):m?(d=!1,u=Dt(c,!0)):u=[]:rn(c)||Jt(c)?(u=s,Jt(s)?u=on(s):(!tn(s)||$t(s))&&(u=Ft(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),dt(e,n,u)}}function Ct(e,t){return Gt(Ut(e,t,un),e+``)}var wt=A?function(e,t){return A(e,`toString`,{configurable:!0,enumerable:!1,value:ln(t),writable:!0})}:un;function Tt(e,t){if(t)return e.slice();var n=e.length,r=ke?ke(n):new e.constructor(n);return e.copy(r),r}function Et(e){var t=new e.constructor(e.byteLength);return new Oe(t).set(new Oe(e)),t}function Dt(e,t){var n=t?Et(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ot(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function kt(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?mt(n,s,c):ft(n,s,c)}return n}function At(e){return Ct(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Lt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}function jt(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}function Mt(e,t){var n=e.__data__;return Rt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Nt(e,t){var n=me(e,t);return vt(n)?n:void 0}function Pt(e){var t=xe.call(e,Pe),n=e[Pe];try{e[Pe]=void 0;var r=!0}catch(e){}var i=Ce.call(e);return r&&(t?e[Pe]=n:delete e[Pe]),i}function Ft(e){return typeof e.constructor==`function`&&!Bt(e)?Be(Ae(e)):{}}function It(e,t){var n=typeof e;return t=t==null?r:t,!!t&&(n==`number`||n!=`symbol`&&re.test(e))&&e>-1&&e%1==0&&e<t}function Lt(e,t,n){if(!tn(n))return!1;var r=typeof t;return(r==`number`?Xt(n)&&It(t,n.length):r==`string`&&t in n)?qt(n[t],e):!1}function Rt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function zt(e){return!!Se&&Se in e}function Bt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ve)}function Vt(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}function Ht(e){return Ce.call(e)}function Ut(e,t,n){return t=Ie(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Ie(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),de(e,this,s)}}function Wt(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var Gt=M(wt);function M(e){var t=0,n=0;return function(){var r=Le(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Kt(e){if(e!=null){try{return be.call(e)}catch(e){}try{return e+``}catch(e){}}return``}function qt(e,t){return e===t||e!==e&&t!==t}var Jt=_t(function(){return arguments}())?_t:function(e){return nn(e)&&xe.call(e,`callee`)&&!Me.call(e,`callee`)},Yt=Array.isArray;function Xt(e){return e!=null&&en(e.length)&&!$t(e)}function Zt(e){return nn(e)&&Xt(e)}var Qt=Fe||dn;function $t(e){if(!tn(e))return!1;var t=gt(e);return t==l||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`}function en(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=r}function tn(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function nn(e){return typeof e==`object`&&!!e}function rn(e){if(!nn(e)||gt(e)!=f)return!1;var t=Ae(e);if(t===null)return!0;var n=xe.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&be.call(n)==we}var an=ue?pe(ue):yt;function on(e){return kt(e,sn(e))}function sn(e){return Xt(e)?ut(e,!0):bt(e)}var cn=At(function(e,t,n){xt(e,t,n)});function ln(e){return function(){return e}}function un(e){return e}function dn(){return!1}t.exports=cn})),Yr=c(((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function a(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function o(e,t){return i(t,function(t){return e[t]})}function s(e,t){return function(n){return e(t(n))}}var c=Object.prototype,l=c.hasOwnProperty,u=c.toString,d=c.propertyIsEnumerable,f=s(Object.keys,Object);function p(e,t){var n=v(e)||_(e)?a(e.length,String):[],r=n.length,i=!!r;for(var o in e)(t||l.call(e,o))&&(!i||o!=`length`&&!h(o,r))&&n.push(o);return n}function m(e){if(!g(e))return f(e);var t=[];for(var n in Object(e))l.call(e,n)&&n!=`constructor`&&t.push(n);return t}function h(e,t){return t=t==null?n:t,!!t&&(typeof e==`number`||r.test(e))&&e>-1&&e%1==0&&e<t}function g(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||c)}function _(e){return b(e)&&l.call(e,`callee`)&&(!d.call(e,`callee`)||u.call(e)==`[object Arguments]`)}var v=Array.isArray;function y(e){return e!=null&&S(e.length)&&!x(e)}function b(e){return w(e)&&y(e)}function x(e){var t=C(e)?u.call(e):``;return t==`[object Function]`||t==`[object GeneratorFunction]`}function S(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=n}function C(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function w(e){return!!e&&typeof e==`object`}function T(e){return y(e)?p(e):m(e)}function ee(e){return e?o(e,T(e)):[]}t.exports=ee})),Xr=[];for(let e=0;e<256;++e)Xr.push((e+256).toString(16).slice(1));function Zr(e,t=0){return(Xr[e[t+0]]+Xr[e[t+1]]+Xr[e[t+2]]+Xr[e[t+3]]+`-`+Xr[e[t+4]]+Xr[e[t+5]]+`-`+Xr[e[t+6]]+Xr[e[t+7]]+`-`+Xr[e[t+8]]+Xr[e[t+9]]+`-`+Xr[e[t+10]]+Xr[e[t+11]]+Xr[e[t+12]]+Xr[e[t+13]]+Xr[e[t+14]]+Xr[e[t+15]]).toLowerCase()}var Qr=new Uint8Array(16);function $r(){return crypto.getRandomValues(Qr)}function ei(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():ti(e,t,n)}function ti(e,t,n){var r,i,a;e=e||{};let o=(r=(i=e.random)==null?(a=e.rng)==null?void 0:a.call(e):i)==null?$r():r;if(o.length<16)throw Error(`Random bytes length must be >= 16`);if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=o[e];return t}return Zr(o)}var ni=qr(),ri=d(Jr(),1),ii=d(Yr(),1),ai={MESSAGE:`MESSAGE`,ERROR:`ERROR`},R={DEBUG:`DEBUG`,ERROR:`ERROR`,INFO:`INFO`,WARNING:`WARNING`,CRITICAL:`CRITICAL`},oi=function(e){return e.INFO=`INFO`,e}({});Object.values({DATA:`DATA`,QUESTIONARY:`QUESTIONARY`,DOCREADER:`DOCREADER`,LIVENESS:`LIVENESS`,DEVICE_TRANSFER:`DEVICE_TRANSFER`});var si={DATA:`DATA`,PROCESSING:`PROCESSING`,QUESTIONARY:`QUESTIONARY`,GEOLOCATION:`GEOLOCATION`,FILE_UPLOAD:`FILE_UPLOAD`,DEVICE_TRANSFER:`DEVICE_TRANSFER`,DOCREADER:`DOCREADER`,LIVENESS:`LIVENESS`,LOGIN:`LOGIN`,IAM_CONSENT:`IAM_CONSENT`,IAM_AUTH_CODE:`IAM_AUTH_CODE`,REDIRECT:`REDIRECT`},ci=function(e){return e.DID_START_SESSION=`DID_START_SESSION`,e.DID_END_SESSION=`DID_END_SESSION`,e.DID_START_RESTORE_SESSION=`DID_START_RESTORE_SESSION`,e.DID_CONTINUE_REMOTE_SESSION=`DID_CONTINUE_REMOTE_SESSION`,e}({}),li=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.CONNECTION_ISSUE=1]=`CONNECTION_ISSUE`,e[e.WORKFLOW_ISSUE=2]=`WORKFLOW_ISSUE`,e[e.INTERNAL_ISSUE=3]=`INTERNAL_ISSUE`,e[e.SCENARIO_IN_PROGRESS=4]=`SCENARIO_IN_PROGRESS`,e}({}),ui=function(e){return e[e.CONNECTION_ISSUE=0]=`CONNECTION_ISSUE`,e[e.CONFIG_MISSED_OR_INVALID=1]=`CONFIG_MISSED_OR_INVALID`,e[e.INITIALIZATION_REQUIRED=2]=`INITIALIZATION_REQUIRED`,e[e.SCENARIO_IN_PROGRESS=3]=`SCENARIO_IN_PROGRESS`,e}({}),di=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.PREPARED_REQUIRED=1]=`PREPARED_REQUIRED`,e[e.START_SESSION_FAILED=2]=`START_SESSION_FAILED`,e[e.UNKNOWN_STEP=3]=`UNKNOWN_STEP`,e[e.MODULES_ISSUE=4]=`MODULES_ISSUE`,e[e.ALREADY_STARTED=5]=`ALREADY_STARTED`,e[e.INTERNAL_ISSUE=6]=`INTERNAL_ISSUE`,e}({}),fi=function(e){return e[e.CONFIG_MISSED_OR_INVALID=0]=`CONFIG_MISSED_OR_INVALID`,e[e.MODULES_INSTANTIATION_FAILURE=1]=`MODULES_INSTANTIATION_FAILURE`,e[e.INITIALIZATION_IN_PROGRESS=2]=`INITIALIZATION_IN_PROGRESS`,e}({}),pi=function(e){return e[e.CONNECTION_ISSUE=0]=`CONNECTION_ISSUE`,e[e.WORKFLOW_ISSUE=1]=`WORKFLOW_ISSUE`,e}({}),mi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e}({}),hi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e[e.TOKEN_ERROR=3]=`TOKEN_ERROR`,e[e.CONNECTION_ISSUE=4]=`CONNECTION_ISSUE`,e}({}),gi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e[e.SAME_STEP=3]=`SAME_STEP`,e[e.IS_PROCESSING=4]=`IS_PROCESSING`,e[e.NOT_DATA_TYPE=5]=`NOT_DATA_TYPE`,e}({}),_i=function(e){return e[e.UNKNOWN=0]=`UNKNOWN`,e[e.SESSION_NOT_FOUND_OR_ACCESS_DENIED=1]=`SESSION_NOT_FOUND_OR_ACCESS_DENIED`,e[e.INVALID_MESSAGE_FORMAT=2]=`INVALID_MESSAGE_FORMAT`,e[e.UNSUPPORTED_COMMAND=3]=`UNSUPPORTED_COMMAND`,e}({}),vi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.SCENARIO_IN_PROGRESS=3]=`SCENARIO_IN_PROGRESS`,e}({}),yi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e}({}),bi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.ALREADY_IN_PROCESS=1]=`ALREADY_IN_PROCESS`,e[e.START_COMMAND_FAILURE=2]=`START_COMMAND_FAILURE`,e[e.MISSING_CONFIGURATION=3]=`MISSING_CONFIGURATION`,e[e.PREPARE_WORKFLOW_FAILURE=4]=`PREPARE_WORKFLOW_FAILURE`,e[e.EXECUTION_WORKFLOW_FAILURE=5]=`EXECUTION_WORKFLOW_FAILURE`,e[e.MISSING_AUTH_CODE=6]=`MISSING_AUTH_CODE`,e[e.AUTH_FAILURE=7]=`AUTH_FAILURE`,e}({}),xi=function(e){return e[e.SUCCESS=0]=`SUCCESS`,e[e.ERROR=1]=`ERROR`,e}({}),Si=`PROGRESS`,Ci=`idv-session-data`,wi=`idv-session-auth-token`,Ti=`rgl-uid`,Ei=2e4,Di={shouldStartNewSession:!0},Oi=(e,t)=>ki(e,t),ki=(e,t)=>{let n=Ai(e,t);for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)){let r=n[e];typeof r==`object`&&r&&!Array.isArray(r)?n[e]=ki(r,t):Array.isArray(r)&&(n[e]=r.map(e=>typeof e==`object`&&e?ki(e,t):e))}return n},Ai=(e,t)=>{let n=ji(e),r=e.layout;if(!r||r.length===0)return n;let i=null;if(r.forEach(e=>{let n=t[e];i?n&&Mi(n,i):i=n}),i){let e=Ai(i,t);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];Object.prototype.hasOwnProperty.call(n,t)||(n[t]=r)}}return n},ji=e=>{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&n.toLowerCase()!==`layout`&&(t[n]=e[n]);return t},Mi=(e,t)=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])};function Ni(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return console.warn(`Failed to copy object:`,e),null}}var Pi=(e,t)=>{if(!e||!t)return null;let n=Ni(e);return n?Oi(n,t):null};function Fi(e){return Ii.apply(this,arguments)}function Ii(){return Ii=C(function*(e){return new Promise(t=>setTimeout(t,e))}),Ii.apply(this,arguments)}function Li(e,t){return Ri.apply(this,arguments)}function Ri(){return Ri=C(function*(e,t,n=120,r=200){let i=0;for(;i<n;){let t=yield e();if(t!==null)return t;i++,i<n&&(yield Fi(r))}return t()}),Ri.apply(this,arguments)}var zi=(e,t,n)=>{let r=e.reduce((e,t)=>(e.push(...t.supportedTemplates),e),[]),i=t.find(e=>e.id===n);return r.includes(i==null?void 0:i.client.templateId)},Bi=e=>e?e.type===si.PROCESSING:!1,Vi=e=>{let t=e.currentStep,n=e.workflow.steps.find(e=>e.id===t);return(e==null?void 0:e.isProcessingFiles)||Bi(n)},Hi=(e,t)=>t!=null&&t.length?e.filter(e=>e.id===`idv-gui`||e.supportedTemplates.some(e=>t.includes(e))):e,Ui=(e,t)=>{let n=e.reduce((e,t)=>(e.push(...t.supportedTemplates),e),[]);function r(e,t){let n=new Set(e);return t.filter(e=>!n.has(e))}let i=r(n,t||[]);return{isAllTemplatesSupported:i.length===0,unsupportedSteps:i.length>0?i:void 0}},Wi={setAuthTokenToLs:({apiKey:e,authToken:t,tokenExpiresAt:n,sessionId:r,workflowId:i})=>{let a=localStorage.getItem(wi),o=a?JSON.parse(a):{};o[e]={authToken:t,tokenExpiresAt:n,workflowId:i,sessionId:r},localStorage.setItem(wi,JSON.stringify(o))},getAuthTokenLs:()=>{let e=localStorage.getItem(wi);if(!e)return null;try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:null}catch(e){return null}},removeAuthTokenLs:e=>{if(!e)return!1;let t=localStorage.getItem(wi);if(!t)return!1;try{let n=JSON.parse(t);return Object.prototype.hasOwnProperty.call(n,e)?(delete n[e],localStorage.setItem(wi,JSON.stringify(n)),!0):!1}catch(e){return!1}}},Gi=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Ki=e=>/^[^:{}\s]+:[^:{}\s]+$/.test(e),qi={setSessionIdWorkflowIdToLs:(e,t)=>{let n=localStorage.getItem(Ci),r={};if(n)try{let e=JSON.parse(n);Gi(e)&&(r=e)}catch(e){if(Ki(n)){let[e,t]=n.split(`:`);e&&t&&(r={[t]:e})}}r[t]=e,localStorage.setItem(Ci,JSON.stringify(r))},getSessionIdWorkflowIdFromLS:()=>{let e=localStorage.getItem(Ci);if(!e)return null;try{let t=JSON.parse(e);return Gi(t)?t:null}catch(t){if(Ki(e)){let[t,n]=e.split(`:`);if(t&&n)return{[n]:t}}return null}},removeSessionIdWorkflowIdFromLS:e=>{let t=localStorage.getItem(Ci);if(!t)return!1;if(!e)return localStorage.removeItem(Ci),!0;try{let n=JSON.parse(t);if(!Gi(n))return!1;let r=n;return Object.prototype.hasOwnProperty.call(r,e)?(delete r[e],localStorage.setItem(Ci,JSON.stringify(r)),!0):!1}catch(n){if(Ki(t)){let[,n]=t.split(`:`);return n===e&&(localStorage.removeItem(Ci),!0)}return!1}}},Ji=e=>{let t,n=ei();try{var r;t=(r=window.localStorage.getItem(e))==null?n:r,window.localStorage.setItem(e,t)}catch(e){t=n}return t};function Yi(e){return Object.prototype.toString.call(e)===`[object Object]`&&Object.keys(e).length>0}function Xi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function Zi(){return typeof document>`u`?null:document.documentElement.getAttribute(`lang`)||null}function Qi(){return typeof navigator<`u`?navigator.language:null}var $i=e=>{let t=typeof e==`string`?e:null,n=Zi(),r=Qi();return t||n||r||`en`},ea=e=>{try{var t;return(t=new URL(e).searchParams.get(`sessionId`))==null?``:t}catch(e){return``}},ta=e=>{try{var t;return(t=new URL(e).searchParams.get(`authorization`))==null?``:t}catch(e){return``}};function na(e){try{let t=e;!e.includes(`://`)&&e.includes(`.`)&&(t=`http://${e}`);let n=new URL(t);return{host:n.hostname,isSecure:n.protocol===`https:`,port:n.port?parseInt(n.port,10):void 0}}catch(e){return null}}var ra=()=>{if(typeof window>`u`)return`SERVER_SIDE_RENDERING`;if(!document.referrer)return window.location.origin;try{return new URL(document.referrer).origin}catch(e){return window.location.origin}},ia=e=>{var t;let n=Ji(Ti),r={deviceId:n,metadata:{platform:`browser`,osVersion:`${ni.osVersion}`,hostAppId:ra(),host:ra(),sdkVersion:(t=`4.0.684-nightly`)==null?void 0:t.trim(),name:navigator.userAgent,deviceModel:`${ni.osName}/${ni.osVersion} ${ni.browserName}/${ni.fullBrowserVersion}`,hostAppVersion:`${ni.browserName}/${ni.fullBrowserVersion}`,userID:n},deviceType:`browser`};return e&&e instanceof Object&&Object.keys(e).length>0&&(r.customMetadata=e),r};function aa(){return oa.apply(this,arguments)}function oa(){return oa=C(function*(){if(typeof navigator>`u`||!(`geolocation`in navigator))return null;try{return!(`permissions`in navigator)||(yield navigator.permissions.query({name:`geolocation`})).state!==`granted`?null:yield new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{e({lat:t.coords.latitude,lon:t.coords.longitude})},()=>e(null))})}catch(e){return null}}),oa.apply(this,arguments)}var sa=(e,t)=>{let n={};for(let o=0;o<t.length;o++){var r;let s=t[o].property,c=e?`${e}.${s}`:s;if(t[o].children&&(r=t[o].children)!=null&&r.length){var i,a;n=(0,ri.default)(n,sa(c,(i=(a=t[o])==null?void 0:a.children)==null?[]:i))}t[o].constraints&&(n[c]={errors:(0,ii.default)((0,ri.default)(t[o].constraints,n[c])),value:t[o].value})}return n},z=e=>typeof e==`string`&&e.length>0,ca=e=>e instanceof Error?e.message:String(e);function la(e,t){return e===4?t.HTTP_ISSUE:e===5?t.PROVIDER_ERROR:e===6?t.DECODING_FAILED:t.PROVIDER_ERROR}function ua(e){switch(e){case _i.SESSION_NOT_FOUND_OR_ACCESS_DENIED:case _i.INVALID_MESSAGE_FORMAT:case _i.UNSUPPORTED_COMMAND:case _i.UNKNOWN:return e;default:return _i.UNKNOWN}}function da(e){return fa.apply(this,arguments)}function fa(){return fa=C(function*(e){let t=yield crypto.subtle.digest(`SHA-256`,e);return Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}),fa.apply(this,arguments)}var pa=`********`,ma=/"([^"]+)"\s*:\s*"((?:[^"\\]|\\.)*)"/g,ha=[`password`,`token`,`secret`,`apikey`,`authorization`,`credential`,`privateKey`,`clientSecret`,`licenseId`,`serial`,`authHeader`];function ga(e){return ha.includes(e)}function _a(e){return e.replace(ma,(e,t)=>ga(t)?`"${t}":"${pa}"`:e)}var B=new class{constructor(){this._logsByStep={},this._tempCollectedLogs=``,this._events=[],this._publicListener=null}_formatEntry(e){var t,n;return[e.timestamp,(t=e.module)==null?`-`:t,`[${e.logLevel}]`,String((n=e.message)==null?`-`:n)].join(` `)}setTemplateId(e){this._templateId=e}logSessionEvent(e,t=!1){let n=new Date().toISOString(),r=this._templateId,i=r?`[${r}: ${_a(e.message)}]`:_a(e.message);if(this._publicListener&&this._publicListener({eventType:ai.MESSAGE,logLevel:e.logLevel,module:e.module,message:`${n} - ${i}`}),t)return;let a={timestamp:n,logLevel:e.logLevel,module:e.module,message:i};this._events.push(a);let o=this._formatEntry(a);this._tempCollectedLogs+=o+`
3
+ `),t=new Blob([e],{type:`text/plain`}),n=window.URL.createObjectURL(t),r=document.createElement(`a`);r.download=`log.txt`,r.href=n,r.click(),window.URL.revokeObjectURL(n),this.clearLogs()}},dt=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=(r==null?typeof i!=`object`||!i:r)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},ft=(e=>e?dt(e):dt);function pt(e,t){for(var n in t)e[n]=t[n];return e}function mt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ht(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Gt.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return gt(e,o,r,i,null)}function gt(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++Kt:i,__i:-1,__u:0};return i==null&&M.vnode!=null&&M.vnode(a),a}function _t(){return{current:null}}function vt(e){return e.children}function yt(e,t){this.props=e,this.context=t}function bt(e,t){if(t==null)return e.__?bt(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?bt(e):null}function xt(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=pt({},t);a.__v=t.__v+1,M.vnode&&M.vnode(a),Nt(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n==null?bt(t):n,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Ft(r,a,i),t.__e=t.__=null,a.__e!=n&&St(a)}}function St(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),St(e)}function Ct(e){(!e.__d&&(e.__d=!0)&&qt.push(e)&&!wt.__r++||Jt!=M.debounceRendering)&&((Jt=M.debounceRendering)||Yt)(wt)}function wt(){try{for(var e,t=1;qt.length;)qt.length>t&&qt.sort(Xt),e=qt.shift(),t=qt.length,xt(e)}finally{qt.length=wt.__r=0}}function Tt(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||sn,y=t.length;for(c=Et(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||on,p.__i=d,g=Nt(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Rt(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=Dt(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function Et(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=gt(null,o,null,null,null):ln(o)?o=e.__k[a]=gt(vt,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=gt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=kt(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=bt(s)),zt(s,s));return r}function Dt(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Dt(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=bt(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ot(e,t){return t=t||[],e==null||typeof e==`boolean`||(ln(e)?e.some(function(e){Ot(e,t)}):t.push(e)),t}function kt(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function At(e,t,n){t[0]==`-`?e.setProperty(t,n==null?``:n):e[t]=n==null?``:typeof n!=`number`||cn.test(t)?n:n+`px`}function jt(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||At(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||At(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(en,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n[$t]=r[$t]:(n[$t]=tn,e.addEventListener(t,a?rn:nn,a)):e.removeEventListener(t,a?rn:nn,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n==null?``:n;break n}catch(e){}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Mt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[Qt]==null)t[Qt]=tn++;else if(t[Qt]<n[$t])return;return n(M.event?M.event(t):t)}}}function Nt(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=M.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=T.prototype&&T.prototype.render,y=(u=T.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(v?t.__c=d=new T(_,b):(t.__c=d=new yt(_,b),d.constructor=T,d.render=Bt),y&&y.sub(d),d.state||(d.state={}),d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),v&&d.__s==null&&(d.__s=d.state),v&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=pt({},d.__s)),pt(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)v&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),v&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(v&&T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,b),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,b)){t.__v!=n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),sn.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,b),v&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=b,d.props=_,d.__P=e,d.__e=!1,x=M.__r,S=0,v)d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),sn.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=pt(pt({},r),d.getChildContext())),v&&!f&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(p,m)),C=u!=null&&u.type===vt&&u.key==null?It(u.props.children):u,s=Tt(e,ln(C)?C:[C],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||a!=null){if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(w=a.length;w--;)mt(a[w]);Pt(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Pt(t);M.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Lt(n.__e,t,n,r,i,a,o,c,l);return(u=M.diffed)&&u(t),128&t.__u?void 0:s}function Pt(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Pt))}function Ft(e,t,n){for(var r=0;r<n.length;r++)Rt(n[r],n[++r],n[++r]);M.__c&&M.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){M.__e(e,t.__v)}})}function It(e){return typeof e!=`object`||!e||e.__b>0?e:ln(e)?e.map(It):e.constructor===void 0?pt({},e):null}function Lt(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props||on,_=t.props,v=t.type;if(v==`svg`?i=`http://www.w3.org/2000/svg`:v==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(i,v,_.is&&_),s&&(M.__m&&M.__m(t,a),s=!1),a=null}if(v==null)g===_||s&&e.data==_||(e.data=_);else{if(a=v==`textarea`&&_.defaultValue!=null?null:a&&Gt.call(e.childNodes),!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`dangerouslySetInnerHTML`?d=p:l==`children`||l in _||l==`value`&&`defaultValue`in _||l==`checked`&&`defaultChecked`in _||jt(e,l,null,p,i);for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:s&&typeof p!=`function`||g[l]===p||jt(e,l,p,g[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),Tt(t.type==`template`?e.content:e,ln(f)?f:[f],t,n,r,v==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&bt(n,0),s,c),a!=null)for(l=a.length;l--;)mt(a[l]);s&&v!=`textarea`||(l=`value`,v==`progress`&&m==null?e.removeAttribute(`value`):m!=null&&(m!==e[l]||v==`progress`&&!m||v==`option`&&m!=g[l])&&jt(e,l,m,g[l],i),l=`checked`,h!=null&&h!=e[l]&&jt(e,l,h,g[l],i))}return e}function Rt(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){M.__e(e,n)}}function zt(e,t,n){var r,i;if(M.unmount&&M.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Rt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){M.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&zt(r[i],t,n||typeof e.type!=`function`);n||mt(e.__e),e.__c=e.__=e.__e=void 0}function Bt(e,t,n){return this.constructor(e,n)}function Vt(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),M.__&&M.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],Nt(t,e=(!r&&n||t).__k=ht(vt,null,[e]),i||on,on,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?Gt.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),Ft(a,e,o)}function Ht(e,t){Vt(e,t,Ht)}function Ut(e,t,n){var r,i,a,o,s=pt({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a==`key`?r=t[a]:a==`ref`?i=t[a]:s[a]=t[a]===void 0&&o!=null?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Gt.call(arguments,2):n),gt(e.type,s,r||e.key,i||e.ref,null)}function Wt(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,Ct(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+an++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}var Gt,M,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un=s((()=>{on={},sn=[],cn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ln=Array.isArray,Gt=sn.slice,M={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},Kt=0,yt.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=pt({},this.state);typeof e==`function`&&(e=e(pt({},n),this.props)),e&&pt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ct(this))},yt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ct(this))},yt.prototype.render=vt,qt=[],Yt=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xt=function(e,t){return e.__v.__b-t.__v.__b},wt.__r=0,Zt=Math.random().toString(8),Qt=`__d`+Zt,$t=`__a`+Zt,en=/(PointerCapture)$|Capture$/i,tn=0,nn=Mt(!1),rn=Mt(!0),an=0}));function dn(e,t){F.__h&&F.__h(P,e,Mn||t),Mn=0;var n=P.__H||(P.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N(e){return Mn=1,fn(On,e)}function fn(e,t,n){var r=dn(kn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):On(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=P,!P.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};P.__f=!0;var a=P.shouldComponentUpdate,o=P.componentWillUpdate;P.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},P.shouldComponentUpdate=i}return r.__N||r.__}function pn(e,t){var n=dn(kn++,3);!F.__s&&Dn(n.__H,t)&&(n.__=e,n.u=t,P.__H.__h.push(n))}function mn(e,t){var n=dn(kn++,4);!F.__s&&Dn(n.__H,t)&&(n.__=e,n.u=t,P.__h.push(n))}function hn(e){return Mn=5,_n(function(){return{current:e}},[])}function gn(e,t,n){Mn=6,mn(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function _n(e,t){var n=dn(kn++,7);return Dn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function vn(e,t){return Mn=8,_n(function(){return e},t)}function yn(e){var t=P.context[e.__c],n=dn(kn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(P)),t.props.value):e.__}function bn(e,t){F.useDebugValue&&F.useDebugValue(t?t(e):e)}function xn(e){var t=dn(kn++,10),n=N();return t.__=e,P.componentDidCatch||(P.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Sn(){var e=dn(kn++,11);if(!e.__){for(var t=P.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function Cn(){for(var e;e=Nn.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Tn),t.__h.some(En),t.__h=[]}catch(n){t.__h=[],F.__e(n,e.__v)}}}function wn(e){var t,n=function(){clearTimeout(r),Bn&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Bn&&(t=requestAnimationFrame(n))}function Tn(e){var t=P,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),P=t}function En(e){var t=P;e.__c=e.__(),P=t}function Dn(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function On(e,t){return typeof t==`function`?t(e):t}var kn,P,An,jn,Mn,Nn,F,Pn,Fn,In,Ln,Rn,zn,Bn,I=s((()=>{un(),Mn=0,Nn=[],F=M,Pn=F.__b,Fn=F.__r,In=F.diffed,Ln=F.__c,Rn=F.unmount,zn=F.__,F.__b=function(e){P=null,Pn&&Pn(e)},F.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zn&&zn(e,t)},F.__r=function(e){Fn&&Fn(e),kn=0;var t=(P=e.__c).__H;t&&(An===P?(t.__h=[],P.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Tn),t.__h.some(En),t.__h=[],kn=0)),An=P},F.diffed=function(e){In&&In(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Nn.push(t)!==1&&jn===F.requestAnimationFrame||((jn=F.requestAnimationFrame)||wn)(Cn)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),An=P=null},F.__c=function(e,t){t.some(function(e){try{e.__h.some(Tn),e.__h=e.__h.filter(function(e){return!e.__||En(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],F.__e(n,e.__v)}}),Ln&&Ln(e,t)},F.unmount=function(e){Rn&&Rn(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Tn(e)}catch(e){t=e}}),n.__H=void 0,t&&F.__e(t,n.__v))},Bn=typeof requestAnimationFrame==`function`})),Vn=l({Children:()=>br,Component:()=>yt,Fragment:()=>vt,PureComponent:()=>Yn,StrictMode:()=>vt,Suspense:()=>er,SuspenseList:()=>rr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Ir,cloneElement:()=>pr,createContext:()=>Wt,createElement:()=>ht,createFactory:()=>lr,createPortal:()=>or,createRef:()=>_t,default:()=>L,findDOMNode:()=>hr,flushSync:()=>zr,forwardRef:()=>Zn,hydrate:()=>cr,isElement:()=>Br,isFragment:()=>dr,isMemo:()=>fr,isValidElement:()=>ur,lazy:()=>nr,memo:()=>Xn,render:()=>sr,startTransition:()=>Kn,unmountComponentAtNode:()=>mr,unstable_batchedUpdates:()=>Rr,useCallback:()=>vn,useContext:()=>yn,useDebugValue:()=>bn,useDeferredValue:()=>qn,useEffect:()=>pn,useErrorBoundary:()=>xn,useId:()=>Sn,useImperativeHandle:()=>gn,useInsertionEffect:()=>gr,useLayoutEffect:()=>mn,useMemo:()=>_n,useReducer:()=>fn,useRef:()=>hn,useState:()=>N,useSyncExternalStore:()=>Wn,useTransition:()=>Jn,version:()=>Lr});function Hn(e,t){for(var n in t)e[n]=t[n];return e}function Un(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function Wn(e,t){var n=t(),r=N({t:{__:n,u:t}}),i=r[0].t,a=r[1];return mn(function(){i.__=n,i.u=t,Gn(i)&&a({t:i})},[e,n,t]),pn(function(){return Gn(i)&&a({t:i}),e(function(){Gn(i)&&a({t:i})})},[e]),n}function Gn(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}var t,n}function Kn(e){e()}function qn(e){return e}function Jn(){return[!1,Kn]}function Yn(e,t){this.props=e,this.context=t}function Xn(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&(typeof n==`function`?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:Un(this.props,e)}function r(t){return this.shouldComponentUpdate=n,ht(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.__f=r.prototype.isReactComponent=!0,r.type=e,r}function Zn(e){function t(t){var n=Hn({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=vr,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}function Qn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=Hn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Qn(e,t,n)})),e}function $n(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return $n(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function er(){this.__u=0,this.o=null,this.__b=null}function tr(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function nr(e){var t,n,r,i=null;function a(a){if(t||(t=e()).then(function(e){e&&(i=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return i?ht(i,a):null}return a.displayName=`Lazy`,a.__f=!0,a}function rr(){this.i=null,this.l=null}function ir(e){return this.getChildContext=function(){return e.context},e.children}function ar(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Vt(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}Vt(ht(ir,{context:t.context},e.__v),t.v)}function or(e,t){var n=ht(ar,{__v:e,h:t});return n.containerInfo=t,n}function sr(e,t,n){return t.__k==null&&(t.textContent=``),Vt(e,t),typeof n==`function`&&n(),e?e.__c:null}function cr(e,t,n){return Ht(e,t),typeof n==`function`&&n(),e?e.__c:null}function lr(e){return ht.bind(null,e)}function ur(e){return!!e&&e.$$typeof===wr}function dr(e){return ur(e)&&e.type===vt}function fr(e){return!!e&&typeof e.displayName==`string`&&e.displayName.indexOf(`Memo(`)==0}function pr(e){return ur(e)?Ut.apply(null,arguments):e}function mr(e){return!!e.__k&&(Vt(null,e),!0)}function hr(e){return e&&(e.base||e.nodeType===1&&e)||null}var gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,L,Vr=s((()=>{un(),I(),I(),gr=mn,(Yn.prototype=new yt).isPureReactComponent=!0,Yn.prototype.shouldComponentUpdate=function(e,t){return Un(this.props,e)||Un(this.state,t)},_r=M.__b,M.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_r&&_r(e)},vr=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911,yr=function(e,t){return e==null?null:Ot(Ot(e).map(t))},br={map:yr,forEach:yr,count:function(e){return e?Ot(e).length:0},only:function(e){var t=Ot(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:Ot},xr=M.__e,M.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}xr(e,t,n,r)},Sr=M.unmount,M.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Sr&&Sr(e)},(er.prototype=new yt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=tr(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=$n(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},er.prototype.componentWillUnmount=function(){this.o=[]},er.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=Qn(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&ht(vt,null,e.fallback);return i&&(i.__u&=-33),[ht(vt,null,t.__a?null:e.children),i]},Cr=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}},(rr.prototype=new yt).__a=function(e){var t=this,n=tr(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),Cr(t,e,r)):i()};n?n(a):a()}},rr.prototype.render=function(e){this.i=null,this.l=new Map;var t=Ot(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},rr.prototype.componentDidUpdate=rr.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Cr(e,n,t)})},wr=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,Tr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Er=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Dr=/[A-Z0-9]/g,Or=typeof document<`u`,kr=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)},yt.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(yt.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}),Ar=M.event,M.event=function(e){return Ar&&(e=Ar(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e},Mr={configurable:!0,get:function(){return this.class}},Nr=M.vnode,M.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)==-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Or&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||kr(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:Er.test(a)&&(a=s):s=a=`oninput`:i&&Tr.test(a)?a=a.replace(Dr,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&(r.multiple&&Array.isArray(r.value)&&(r.value=Ot(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=Ot(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Mr)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=wr,Nr&&Nr(e)},Pr=M.__r,M.__r=function(e){Pr&&Pr(e),jr=e.__c},Fr=M.diffed,M.diffed=function(e){Fr&&Fr(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value),jr=null},Ir={ReactCurrentDispatcher:{current:{readContext:function(e){return jr.__n[e.__c].props.value},useCallback:vn,useContext:yn,useDebugValue:bn,useDeferredValue:qn,useEffect:pn,useId:Sn,useImperativeHandle:gn,useInsertionEffect:gr,useLayoutEffect:mn,useMemo:_n,useReducer:fn,useRef:hn,useState:N,useSyncExternalStore:Wn,useTransition:Jn}}},Lr=`18.3.1`,Rr=function(e,t){return e(t)},zr=function(e,t){var n=M.debounceRendering;M.debounceRendering=function(e){return e()};var r=e(t);return M.debounceRendering=n,r},Br=ur,L={useState:N,useId:Sn,useReducer:fn,useEffect:pn,useLayoutEffect:mn,useInsertionEffect:gr,useTransition:Jn,useDeferredValue:qn,useSyncExternalStore:Wn,startTransition:Kn,useRef:hn,useImperativeHandle:gn,useMemo:_n,useCallback:vn,useContext:yn,useDebugValue:bn,version:`18.3.1`,Children:br,render:sr,hydrate:cr,unmountComponentAtNode:mr,createPortal:or,createElement:ht,createContext:Wt,createFactory:lr,cloneElement:pr,createRef:_t,Fragment:vt,isValidElement:ur,isElement:Br,isFragment:dr,isMemo:fr,findDOMNode:hr,Component:yt,PureComponent:Yn,memo:Xn,forwardRef:Zn,flushSync:zr,unstable_batchedUpdates:Rr,StrictMode:vt,Suspense:er,SuspenseList:rr,lazy:nr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ir}}));Vr();var Hr=e=>e;function Ur(e,t=Hr){let n=L.useSyncExternalStore(e.subscribe,L.useCallback(()=>t(e.getState()),[e,t]),L.useCallback(()=>t(e.getInitialState()),[e,t]));return L.useDebugValue(n),n}var Wr=e=>{let t=ft(e),n=e=>Ur(t,e);return Object.assign(n,t),n},Gr=(e=>e?Wr(e):Wr),Kr=c(((e,t,n)=>{(function(n,r){"use strict";var i=`1.0.41`,a=``,o=`function`,s=`undefined`,c=`object`,l=`string`,u=`major`,d=`model`,f=`name`,p=`type`,m=`vendor`,h=`version`,g=`architecture`,_=`console`,v=`mobile`,y=`tablet`,b=`smarttv`,x=`wearable`,S=`embedded`,C=`Amazon`,w=`Apple`,T=`ASUS`,ee=`BlackBerry`,E=`Browser`,te=`Chrome`,ne=`Edge`,re=`Firefox`,D=`Google`,O=`Honor`,ie=`Huawei`,ae=`Lenovo`,oe=`LG`,se=`Microsoft`,k=`Motorola`,ce=`Nvidia`,le=`OnePlus`,ue=`Opera`,de=`OPPO`,fe=`Samsung`,pe=`Sharp`,me=`Sony`,he=`Xiaomi`,ge=`Zebra`,_e=`Facebook`,ve=`Chromium OS`,ye=`Mac OS`,be=` Browser`,xe=function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n},Se=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Ce=function(e,t){return typeof e==l&&we(t).indexOf(we(e))!==-1},we=function(e){return e.toLowerCase()},Te=function(e){return typeof e==l?e.replace(/[^\d\.]/g,a).split(`.`)[0]:r},Ee=function(e,t){if(typeof e==l)return e=e.replace(/^\s\s*/,a),typeof t===s?e:e.substring(0,500)},De=function(e,t){for(var n=0,i,a,s,l,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(i=a=0;i<f.length&&!u&&f[i];)if(u=f[i++].exec(e),u)for(s=0;s<p.length;s++)d=u[++a],l=p[s],typeof l==c&&l.length>0?l.length===2?typeof l[1]==o?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:l.length===3?typeof l[1]===o&&!(l[1].exec&&l[1].test)?this[l[0]]=d?l[1].call(this,d,l[2]):r:this[l[0]]=d?d.replace(l[1],l[2]):r:l.length===4&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):r):this[l]=d||r;n+=2}},Oe=function(e,t){for(var n in t)if(typeof t[n]==c&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(Ce(t[n][i],e))return n===`?`?r:n}else if(Ce(t[n],e))return n===`?`?r:n;return t.hasOwnProperty(`*`)?t[`*`]:e},ke={"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},Ae={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`},je={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[f,`Chrome`]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[f,`Edge`]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,h],[/opios[\/ ]+([\w\.]+)/i],[h,[f,ue+` Mini`]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[f,ue+` GX`]],[/\bopr\/([\w\.]+)/i],[h,[f,ue]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[f,`Baidu`]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[f,`Maxthon`]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/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|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[f,`Quark`]],[/\bddg\/([\w\.]+)/i],[h,[f,`DuckDuckGo`]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[f,`UC`+E]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[f,`WeChat`]],[/konqueror\/([\w\.]+)/i],[h,[f,`Konqueror`]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[f,`IE`]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[f,`Yandex`]],[/slbrowser\/([\w\.]+)/i],[h,[f,`Smart Lenovo `+E]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,`$1 Secure `+E],h],[/\bfocus\/([\w\.]+)/i],[h,[f,re+` Focus`]],[/\bopt\/([\w\.]+)/i],[h,[f,ue+` Touch`]],[/coc_coc\w+\/([\w\.]+)/i],[h,[f,`Coc Coc`]],[/dolfin\/([\w\.]+)/i],[h,[f,`Dolphin`]],[/coast\/([\w\.]+)/i],[h,[f,ue+` Coast`]],[/miuibrowser\/([\w\.]+)/i],[h,[f,`MIUI`+be]],[/fxios\/([\w\.-]+)/i],[h,[f,re]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[f,`360`]],[/\b(qq)\/([\w\.]+)/i],[[f,/(.+)/,`$1Browser`],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[f,/(.+)/,`$1`+be],h],[/samsungbrowser\/([\w\.]+)/i],[h,[f,fe+` Internet`]],[/metasr[\/ ]?([\d\.]+)/i],[h,[f,`Sogou Explorer`]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,`Sogou Mobile`],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[f,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[f],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,_e],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\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],[f,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[f,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[f,`TikTok`]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[f,te+` Headless`]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,te+` WebView`],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[f,`Android `+E]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[f,`Mobile Safari`]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[h,Oe,ke]],[/(webkit|khtml)\/([\w\.]+)/i],[f,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,`Netscape`],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[f,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[f,re+` 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,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[f,[h,/_/g,`.`]],[/(cobalt)\/([\w\.]+)/i],[f,[h,/master.|lts./,``]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[g,`amd64`]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[g,`ia32`]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[g,`arm64`]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[g,`armhf`]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[g,`arm`]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[g,/ower/,a,we]],[/ sun4\w[;\)]/i],[[g,`sparc`]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[g,we]]],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],[d,[m,fe],[p,y]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[m,fe],[p,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[m,w],[p,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[m,w],[p,y]],[/(macintosh);/i],[d,[m,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[m,pe],[p,v]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[m,O],[p,y]],[/honor([-\w ]+)[;\)]/i],[d,[m,O],[p,v]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[d,[m,ie],[p,y]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[m,ie],[p,v]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g,` `],[m,he],[p,y]],[/\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,/ ([\w ]+) miui\/v?\d/i],[[d,/_/g,` `],[m,he],[p,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[m,de],[p,v]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[m,Oe,{OnePlus:[`304`,`403`,`203`],"*":de}],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[m,`Vivo`],[p,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[m,`Realme`],[p,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[m,k],[p,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[m,k],[p,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[m,oe],[p,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[m,oe],[p,v]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[d,[m,ae],[p,y]],[/(nokia) (t[12][01])/i],[m,d,[p,y]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g,` `],[p,v],[m,`Nokia`]],[/(pixel (c|tablet))\b/i],[d,[m,D],[p,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[m,D],[p,v]],[/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],[d,[m,me],[p,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,`Xperia Tablet`],[m,me],[p,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[m,le],[p,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[m,C],[p,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,`Fire Phone $1`],[m,C],[p,v]],[/(playbook);[-\w\),; ]+(rim)/i],[d,m,[p,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[m,ee],[p,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[m,T],[p,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[m,T],[p,v]],[/(nexus 9)/i],[d,[m,`HTC`],[p,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[d,/_/g,` `],[p,v]],[/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],[d,[m,`TCL`],[p,y]],[/(itel) ((\w+))/i],[[m,we],d,[p,Oe,{tablet:[`p10001l`,`w7001`],"*":`mobile`}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[m,`Acer`],[p,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[m,`Meizu`],[p,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[m,`Ulefone`],[p,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[m,`Energizer`],[p,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[m,`Cat`],[p,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[m,`Smartfren`],[p,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[m,`Nothing`],[p,v]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[m,`Archos`],[p,y]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[m,`Archos`],[p,v]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[m,d,[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[m,d,[p,v]],[/(kobo)\s(ereader|touch)/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],[m,d,[p,y]],[/(surface duo)/i],[d,[m,se],[p,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[m,`Fairphone`],[p,v]],[/(u304aa)/i],[d,[m,`AT&T`],[p,v]],[/\bsie-(\w*)/i],[d,[m,`Siemens`],[p,v]],[/\b(rct\w+) b/i],[d,[m,`RCA`],[p,y]],[/\b(venue[\d ]{2,7}) b/i],[d,[m,`Dell`],[p,y]],[/\b(q(?:mv|ta)\w+) b/i],[d,[m,`Verizon`],[p,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[m,`Barnes & Noble`],[p,y]],[/\b(tm\d{3}\w+) b/i],[d,[m,`NuVision`],[p,y]],[/\b(k88) b/i],[d,[m,`ZTE`],[p,y]],[/\b(nx\d{3}j) b/i],[d,[m,`ZTE`],[p,v]],[/\b(gen\d{3}) b.+49h/i],[d,[m,`Swiss`],[p,v]],[/\b(zur\d{3}) b/i],[d,[m,`Swiss`],[p,y]],[/\b((zeki)?tb.*\b) b/i],[d,[m,`Zeki`],[p,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,`Dragon Touch`],d,[p,y]],[/\b(ns-?\w{0,9}) b/i],[d,[m,`Insignia`],[p,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[m,`NextBook`],[p,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,`Voice`],d,[p,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,`LvTel`],d,[p,v]],[/\b(ph-1) /i],[d,[m,`Essential`],[p,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[m,`Envizen`],[p,y]],[/\b(trio[-\w\. ]+) b/i],[d,[m,`MachSpeed`],[p,y]],[/\btu_(1491) b/i],[d,[m,`Rotor`],[p,y]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[m,ce],[p,y]],[/(sprint) (\w+)/i],[m,d,[p,v]],[/(kin\.[onetw]{3})/i],[[d,/\./g,` `],[m,se],[p,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[m,ge],[p,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[m,ge],[p,v]],[/smart-tv.+(samsung)/i],[m,[p,b]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,`SmartTV`],[m,fe],[p,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,oe],[p,b]],[/(apple) ?tv/i],[m,[d,w+` TV`],[p,b]],[/crkey/i],[[d,te+`cast`],[m,D],[p,b]],[/droid.+aft(\w+)( bui|\))/i],[d,[m,C],[p,b]],[/(shield \w+ tv)/i],[d,[m,ce],[p,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[m,pe],[p,b]],[/(bravia[\w ]+)( bui|\))/i],[d,[m,me],[p,b]],[/(mi(tv|box)-?\w+) bui/i],[d,[m,he],[p,b]],[/Hbbtv.*(technisat) (.*);/i],[m,d,[p,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,Ee],[d,Ee],[p,b]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[p,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,d,[p,_]],[/droid.+; (shield)( bui|\))/i],[d,[m,ce],[p,_]],[/(playstation \w+)/i],[d,[m,me],[p,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[m,se],[p,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[m,fe],[p,x]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[m,d,[p,x]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[m,de],[p,x]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[m,w],[p,x]],[/(opwwe\d{3})/i],[d,[m,le],[p,x]],[/(moto 360)/i],[d,[m,k],[p,x]],[/(smartwatch 3)/i],[d,[m,me],[p,x]],[/(g watch r)/i],[d,[m,oe],[p,x]],[/droid.+; (wt63?0{2,3})\)/i],[d,[m,ge],[p,x]],[/droid.+; (glass) \d/i],[d,[m,D],[p,x]],[/(pico) (4|neo3(?: link|pro)?)/i],[m,d,[p,x]],[/; (quest( \d| pro)?)/i],[d,[m,_e],[p,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[p,S]],[/(aeobc)\b/i],[d,[m,C],[p,S]],[/(homepod).+mac os/i],[d,[m,w],[p,S]],[/windows iot/i],[[p,S]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,v]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[m,`Generic`]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[f,ne+`HTML`]],[/(arkweb)\/([\w\.]+)/i],[f,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[f,`Blink`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,h],[/ladybird\//i],[[f,`LibWeb`]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[f,[h,Oe,Ae]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,Oe,Ae],[f,`Windows`]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,`.`],[f,`iOS`]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,ye],[h,/_/g,`.`]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,f],[/(ubuntu) ([\w\.]+) like android/i],[[f,/(.+)/,`$1 Touch`],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[f,h],[/\(bb(10);/i],[h,[f,ee]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[f,`Symbian`]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[f,re+` OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[f,`webOS`]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[f,`watchOS`]],[/crkey\/([\d\.]+)/i],[h,[f,te+`cast`]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,ve],h],[/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)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,h],[/(sunos) ?([\w\.\d]*)/i],[[f,`Solaris`],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,h]]},Me=function(e,t){if(typeof e==c&&(t=e,e=r),!(this instanceof Me))return new Me(e,t).getResult();var i=typeof n!==s&&n.navigator?n.navigator:r,_=e||(i&&i.userAgent?i.userAgent:a),b=i&&i.userAgentData?i.userAgentData:r,x=t?xe(je,t):je,S=i&&i.userAgent==_;return this.getBrowser=function(){var e={};return e[f]=r,e[h]=r,De.call(e,_,x.browser),e[u]=Te(e[h]),S&&i&&i.brave&&typeof i.brave.isBrave==o&&(e[f]=`Brave`),e},this.getCPU=function(){var e={};return e[g]=r,De.call(e,_,x.cpu),e},this.getDevice=function(){var e={};return e[m]=r,e[d]=r,e[p]=r,De.call(e,_,x.device),S&&!e[p]&&b&&b.mobile&&(e[p]=v),S&&e[d]==`Macintosh`&&i&&typeof i.standalone!==s&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[d]=`iPad`,e[p]=y),e},this.getEngine=function(){var e={};return e[f]=r,e[h]=r,De.call(e,_,x.engine),e},this.getOS=function(){var e={};return e[f]=r,e[h]=r,De.call(e,_,x.os),S&&!e[f]&&b&&b.platform&&b.platform!=`Unknown`&&(e[f]=b.platform.replace(/chrome os/i,ve).replace(/macos/i,ye)),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 _},this.setUA=function(e){return _=typeof e==l&&e.length>500?Ee(e,500):e,this},this.setUA(_),this};Me.VERSION=i,Me.BROWSER=Se([f,h,u]),Me.CPU=Se([g]),Me.DEVICE=Se([d,m,p,_,v,b,y,x,S]),Me.ENGINE=Me.OS=Se([f,h]),typeof e===s?typeof define===o&&define.amd?define(function(){return Me}):typeof n!==s&&(n.UAParser=Me):(typeof t!==s&&t.exports&&(e=t.exports=Me),e.UAParser=Me);var Ne=typeof n!==s&&(n.jQuery||n.Zepto);if(Ne&&!Ne.ua){var Pe=new Me;Ne.ua=Pe.getResult(),Ne.ua.get=function(){return Pe.getUA()},Ne.ua.set=function(e){Pe.setUA(e);var t=Pe.getResult();for(var n in t)Ne.ua[n]=t[n]}}})(typeof window==`object`?window:n)})),qr=c((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){return e&&typeof e==`object`&&`default`in e?e.default:e}t((Vr(),f(Vn)));var n=new(Kr()),r=n.getBrowser();n.getCPU();var i=n.getDevice(),a=n.getEngine(),o=n.getOS(),s=n.getUA(),c={Mobile:`mobile`,Tablet:`tablet`,SmartTv:`smarttv`,Console:`console`,Wearable:`wearable`,Embedded:`embedded`,Browser:void 0},l={Chrome:`Chrome`,Firefox:`Firefox`,Opera:`Opera`,Yandex:`Yandex`,Safari:`Safari`,InternetExplorer:`Internet Explorer`,Edge:`Edge`,Chromium:`Chromium`,Ie:`IE`,MobileSafari:`Mobile Safari`,EdgeChromium:`Edge Chromium`,MIUI:`MIUI Browser`,SamsungBrowser:`Samsung Browser`},u={IOS:`iOS`,Android:`Android`,WindowsPhone:`Windows Phone`,Windows:`Windows`,MAC_OS:`Mac OS`},d=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`none`;return e||t},p=function(){return typeof window<`u`&&(window.navigator||navigator)?window.navigator||navigator:!1},m=function(e){var t=p();return t&&t.platform&&(t.platform.indexOf(e)!==-1||t.platform===`MacIntel`&&t.maxTouchPoints>1&&!window.MSStream)},h=function(e){return e.type===c.Mobile},g=function(e){return e.type===c.Tablet},_=function(e){var t=e.type;return t===c.Mobile||t===c.Tablet},v=function(e){return e.type===c.SmartTv},y=function(e){return e.type===c.Browser},b=function(e){return e.type===c.Wearable},x=function(e){return e.type===c.Console},S=function(e){return e.type===c.Embedded},C=function(e){var t=e.vendor;return d(t)},w=function(e){var t=e.model;return d(t)},T=function(e){var t=e.type;return d(t,`browser`)},ee=function(e){return e.name===u.Android},E=function(e){return e.name===u.Windows},te=function(e){return e.name===u.MAC_OS},ne=function(e){return e.name===u.WindowsPhone},re=function(e){return e.name===u.IOS},D=function(e){var t=e.version;return d(t)},O=function(e){var t=e.name;return d(t)},ie=function(e){return e.name===l.Chrome},ae=function(e){return e.name===l.Firefox},oe=function(e){return e.name===l.Chromium},se=function(e){return e.name===l.Edge},k=function(e){return e.name===l.Yandex},ce=function(e){var t=e.name;return t===l.Safari||t===l.MobileSafari},le=function(e){return e.name===l.MobileSafari},ue=function(e){return e.name===l.Opera},de=function(e){var t=e.name;return t===l.InternetExplorer||t===l.Ie},fe=function(e){return e.name===l.MIUI},pe=function(e){return e.name===l.SamsungBrowser},me=function(e){var t=e.version;return d(t)},he=function(e){var t=e.major;return d(t)},ge=function(e){var t=e.name;return d(t)},_e=function(e){var t=e.name;return d(t)},ve=function(e){var t=e.version;return d(t)},ye=function(){var e=p(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return typeof t==`string`&&/electron/.test(t)},be=function(e){return typeof e==`string`&&e.indexOf(`Edg/`)!==-1},xe=function(){var e=p();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform===`MacIntel`&&e.maxTouchPoints>1)&&!window.MSStream},Se=function(){return m(`iPad`)},Ce=function(){return m(`iPhone`)},we=function(){return m(`iPod`)},Te=function(e){return d(e)};v(i),x(i),b(i),S(i),le(r)||Se(),oe(r),_(i)||Se(),h(i),g(i)||Se(),y(i);var Ee=y(i);ee(o),ne(o),re(o)||Se(),ie(r),ae(r);var De=ce(r);ue(r),de(r);var Oe=D(o),ke=O(o),Ae=me(r);he(r);var je=ge(r);C(i),w(i),_e(a),ve(a),Te(s),se(r)||be(s),k(r),T(i),xe(),Se(),Ce(),we(),ye(),be(s),se(r)&&be(s),E(o),te(o),fe(r),pe(r),e.browserName=je,e.fullBrowserVersion=Ae,e.isDesktop=Ee,e.isSafari=De,e.osName=ke,e.osVersion=Oe})),Jr=c(((e,t)=>{var n=`__lodash_hash_undefined__`,r=9007199254740991,i=`[object Arguments]`,a=`[object Array]`,o=`[object Boolean]`,s=`[object Date]`,c=`[object Error]`,l=`[object Function]`,u=`[object Map]`,d=`[object Number]`,f=`[object Object]`,p=`[object RegExp]`,m=`[object Set]`,h=`[object String]`,g=`[object WeakMap]`,_=`[object ArrayBuffer]`,v=`[object DataView]`,y=`[object Float32Array]`,b=`[object Float64Array]`,x=`[object Int8Array]`,S=`[object Int16Array]`,C=`[object Int32Array]`,w=`[object Uint8Array]`,T=`[object Uint8ClampedArray]`,ee=`[object Uint16Array]`,E=`[object Uint32Array]`,te=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,D={};D[y]=D[b]=D[x]=D[S]=D[C]=D[w]=D[T]=D[ee]=D[E]=!0,D[i]=D[a]=D[_]=D[o]=D[v]=D[s]=D[c]=D[l]=D[u]=D[d]=D[f]=D[p]=D[m]=D[h]=D[g]=!1;var O=typeof global==`object`&&global&&global.Object===Object&&global,ie=typeof self==`object`&&self&&self.Object===Object&&self,ae=O||ie||Function(`return this`)(),oe=typeof e==`object`&&e&&!e.nodeType&&e,se=oe&&typeof t==`object`&&t&&!t.nodeType&&t,k=se&&se.exports===oe,ce=k&&O.process,le=function(){try{return se&&se.require&&se.require(`util`).types||ce&&ce.binding&&ce.binding(`util`)}catch(e){}}(),ue=le&&le.isTypedArray;function de(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function fe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function pe(e){return function(t){return e(t)}}function me(e,t){return e==null?void 0:e[t]}function he(e,t){return function(n){return e(t(n))}}var ge=Array.prototype,_e=Function.prototype,ve=Object.prototype,ye=ae[`__core-js_shared__`],be=_e.toString,xe=ve.hasOwnProperty,Se=function(){var e=/[^.]+$/.exec(ye&&ye.keys&&ye.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),Ce=ve.toString,we=be.call(Object),Te=RegExp(`^`+be.call(xe).replace(te,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Ee=k?ae.Buffer:void 0,De=ae.Symbol,Oe=ae.Uint8Array,ke=Ee?Ee.allocUnsafe:void 0,Ae=he(Object.getPrototypeOf,Object),je=Object.create,Me=ve.propertyIsEnumerable,Ne=ge.splice,Pe=De?De.toStringTag:void 0,A=function(){try{var e=Nt(Object,`defineProperty`);return e({},``,{}),e}catch(e){}}(),Fe=Ee?Ee.isBuffer:void 0,Ie=Math.max,Le=Date.now,Re=Nt(ae,`Map`),ze=Nt(Object,`create`),Be=function(){function e(){}return function(t){if(!tn(t))return{};if(je)return je(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ve(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function He(){this.__data__=ze?ze(null):{},this.size=0}function Ue(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function We(e){var t=this.__data__;if(ze){var r=t[e];return r===n?void 0:r}return xe.call(t,e)?t[e]:void 0}function Ge(e){var t=this.__data__;return ze?t[e]!==void 0:xe.call(t,e)}function Ke(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=ze&&t===void 0?n:t,this}Ve.prototype.clear=He,Ve.prototype.delete=Ue,Ve.prototype.get=We,Ve.prototype.has=Ge,Ve.prototype.set=Ke;function qe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Je(){this.__data__=[],this.size=0}function Ye(e){var t=this.__data__,n=pt(t,e);return n<0?!1:(n==t.length-1?t.pop():Ne.call(t,n,1),--this.size,!0)}function Xe(e){var t=this.__data__,n=pt(t,e);return n<0?void 0:t[n][1]}function Ze(e){return pt(this.__data__,e)>-1}function Qe(e,t){var n=this.__data__,r=pt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}qe.prototype.clear=Je,qe.prototype.delete=Ye,qe.prototype.get=Xe,qe.prototype.has=Ze,qe.prototype.set=Qe;function $e(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function et(){this.size=0,this.__data__={hash:new Ve,map:new(Re||qe),string:new Ve}}function tt(e){var t=Mt(this,e).delete(e);return this.size-=+!!t,t}function nt(e){return Mt(this,e).get(e)}function rt(e){return Mt(this,e).has(e)}function it(e,t){var n=Mt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}$e.prototype.clear=et,$e.prototype.delete=tt,$e.prototype.get=nt,$e.prototype.has=rt,$e.prototype.set=it;function at(e){var t=this.__data__=new qe(e);this.size=t.size}function ot(){this.__data__=new qe,this.size=0}function st(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ct(e){return this.__data__.get(e)}function j(e){return this.__data__.has(e)}function lt(e,t){var n=this.__data__;if(n instanceof qe){var r=n.__data__;if(!Re||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $e(r)}return n.set(e,t),this.size=n.size,this}at.prototype.clear=ot,at.prototype.delete=st,at.prototype.get=ct,at.prototype.has=j,at.prototype.set=lt;function ut(e,t){var n=Yt(e),r=!n&&Jt(e),i=!n&&!r&&Qt(e),a=!n&&!r&&!i&&an(e),o=n||r||i||a,s=o?fe(e.length,String):[],c=s.length;for(var l in e)(t||xe.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||It(l,c)))&&s.push(l);return s}function dt(e,t,n){(n!==void 0&&!qt(e[t],n)||n===void 0&&!(t in e))&&mt(e,t,n)}function ft(e,t,n){var r=e[t];(!(xe.call(e,t)&&qt(r,n))||n===void 0&&!(t in e))&&mt(e,t,n)}function pt(e,t){for(var n=e.length;n--;)if(qt(e[n][0],t))return n;return-1}function mt(e,t,n){t==`__proto__`&&A?A(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ht=jt();function gt(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Pe&&Pe in Object(e)?Pt(e):Ht(e)}function _t(e){return nn(e)&&gt(e)==i}function vt(e){return!tn(e)||zt(e)?!1:($t(e)?Te:ne).test(Kt(e))}function yt(e){return nn(e)&&en(e.length)&&!!D[gt(e)]}function bt(e){if(!tn(e))return Vt(e);var t=Bt(e),n=[];for(var r in e)(r!=`constructor`||!t&&xe.call(e,r))&&n.push(r);return n}function xt(e,t,n,r,i){e!==t&&ht(t,function(a,o){if(i||(i=new at),tn(a))St(e,t,o,n,xt,r,i);else{var s=r?r(Wt(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),dt(e,o,s)}},sn)}function St(e,t,n,r,i,a,o){var s=Wt(e,n),c=Wt(t,n),l=o.get(c);if(l)dt(e,n,l);else{var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=Yt(c),p=!f&&Qt(c),m=!f&&!p&&an(c);u=c,f||p||m?Yt(s)?u=s:Zt(s)?u=Ot(s):p?(d=!1,u=Tt(c,!0)):m?(d=!1,u=Dt(c,!0)):u=[]:rn(c)||Jt(c)?(u=s,Jt(s)?u=on(s):(!tn(s)||$t(s))&&(u=Ft(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),dt(e,n,u)}}function Ct(e,t){return Gt(Ut(e,t,un),e+``)}var wt=A?function(e,t){return A(e,`toString`,{configurable:!0,enumerable:!1,value:ln(t),writable:!0})}:un;function Tt(e,t){if(t)return e.slice();var n=e.length,r=ke?ke(n):new e.constructor(n);return e.copy(r),r}function Et(e){var t=new e.constructor(e.byteLength);return new Oe(t).set(new Oe(e)),t}function Dt(e,t){var n=t?Et(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ot(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function kt(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?mt(n,s,c):ft(n,s,c)}return n}function At(e){return Ct(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Lt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}function jt(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}function Mt(e,t){var n=e.__data__;return Rt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Nt(e,t){var n=me(e,t);return vt(n)?n:void 0}function Pt(e){var t=xe.call(e,Pe),n=e[Pe];try{e[Pe]=void 0;var r=!0}catch(e){}var i=Ce.call(e);return r&&(t?e[Pe]=n:delete e[Pe]),i}function Ft(e){return typeof e.constructor==`function`&&!Bt(e)?Be(Ae(e)):{}}function It(e,t){var n=typeof e;return t=t==null?r:t,!!t&&(n==`number`||n!=`symbol`&&re.test(e))&&e>-1&&e%1==0&&e<t}function Lt(e,t,n){if(!tn(n))return!1;var r=typeof t;return(r==`number`?Xt(n)&&It(t,n.length):r==`string`&&t in n)?qt(n[t],e):!1}function Rt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function zt(e){return!!Se&&Se in e}function Bt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ve)}function Vt(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}function Ht(e){return Ce.call(e)}function Ut(e,t,n){return t=Ie(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Ie(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),de(e,this,s)}}function Wt(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var Gt=M(wt);function M(e){var t=0,n=0;return function(){var r=Le(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Kt(e){if(e!=null){try{return be.call(e)}catch(e){}try{return e+``}catch(e){}}return``}function qt(e,t){return e===t||e!==e&&t!==t}var Jt=_t(function(){return arguments}())?_t:function(e){return nn(e)&&xe.call(e,`callee`)&&!Me.call(e,`callee`)},Yt=Array.isArray;function Xt(e){return e!=null&&en(e.length)&&!$t(e)}function Zt(e){return nn(e)&&Xt(e)}var Qt=Fe||dn;function $t(e){if(!tn(e))return!1;var t=gt(e);return t==l||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`}function en(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=r}function tn(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function nn(e){return typeof e==`object`&&!!e}function rn(e){if(!nn(e)||gt(e)!=f)return!1;var t=Ae(e);if(t===null)return!0;var n=xe.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&be.call(n)==we}var an=ue?pe(ue):yt;function on(e){return kt(e,sn(e))}function sn(e){return Xt(e)?ut(e,!0):bt(e)}var cn=At(function(e,t,n){xt(e,t,n)});function ln(e){return function(){return e}}function un(e){return e}function dn(){return!1}t.exports=cn})),Yr=c(((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function a(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function o(e,t){return i(t,function(t){return e[t]})}function s(e,t){return function(n){return e(t(n))}}var c=Object.prototype,l=c.hasOwnProperty,u=c.toString,d=c.propertyIsEnumerable,f=s(Object.keys,Object);function p(e,t){var n=v(e)||_(e)?a(e.length,String):[],r=n.length,i=!!r;for(var o in e)(t||l.call(e,o))&&(!i||o!=`length`&&!h(o,r))&&n.push(o);return n}function m(e){if(!g(e))return f(e);var t=[];for(var n in Object(e))l.call(e,n)&&n!=`constructor`&&t.push(n);return t}function h(e,t){return t=t==null?n:t,!!t&&(typeof e==`number`||r.test(e))&&e>-1&&e%1==0&&e<t}function g(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||c)}function _(e){return b(e)&&l.call(e,`callee`)&&(!d.call(e,`callee`)||u.call(e)==`[object Arguments]`)}var v=Array.isArray;function y(e){return e!=null&&S(e.length)&&!x(e)}function b(e){return w(e)&&y(e)}function x(e){var t=C(e)?u.call(e):``;return t==`[object Function]`||t==`[object GeneratorFunction]`}function S(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=n}function C(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function w(e){return!!e&&typeof e==`object`}function T(e){return y(e)?p(e):m(e)}function ee(e){return e?o(e,T(e)):[]}t.exports=ee})),Xr=[];for(let e=0;e<256;++e)Xr.push((e+256).toString(16).slice(1));function Zr(e,t=0){return(Xr[e[t+0]]+Xr[e[t+1]]+Xr[e[t+2]]+Xr[e[t+3]]+`-`+Xr[e[t+4]]+Xr[e[t+5]]+`-`+Xr[e[t+6]]+Xr[e[t+7]]+`-`+Xr[e[t+8]]+Xr[e[t+9]]+`-`+Xr[e[t+10]]+Xr[e[t+11]]+Xr[e[t+12]]+Xr[e[t+13]]+Xr[e[t+14]]+Xr[e[t+15]]).toLowerCase()}var Qr=new Uint8Array(16);function $r(){return crypto.getRandomValues(Qr)}function ei(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():ti(e,t,n)}function ti(e,t,n){var r,i,a;e=e||{};let o=(r=(i=e.random)==null?(a=e.rng)==null?void 0:a.call(e):i)==null?$r():r;if(o.length<16)throw Error(`Random bytes length must be >= 16`);if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=o[e];return t}return Zr(o)}var ni=qr(),ri=d(Jr(),1),ii=d(Yr(),1),ai={MESSAGE:`MESSAGE`,ERROR:`ERROR`},R={DEBUG:`DEBUG`,ERROR:`ERROR`,INFO:`INFO`,WARNING:`WARNING`,CRITICAL:`CRITICAL`},oi=function(e){return e.INFO=`INFO`,e}({});Object.values({DATA:`DATA`,QUESTIONARY:`QUESTIONARY`,DOCREADER:`DOCREADER`,LIVENESS:`LIVENESS`,DEVICE_TRANSFER:`DEVICE_TRANSFER`});var si={DATA:`DATA`,PROCESSING:`PROCESSING`,QUESTIONARY:`QUESTIONARY`,GEOLOCATION:`GEOLOCATION`,FILE_UPLOAD:`FILE_UPLOAD`,DEVICE_TRANSFER:`DEVICE_TRANSFER`,DOCREADER:`DOCREADER`,LIVENESS:`LIVENESS`,LOGIN:`LOGIN`,IAM_CONSENT:`IAM_CONSENT`,IAM_AUTH_CODE:`IAM_AUTH_CODE`,REDIRECT:`REDIRECT`},ci=function(e){return e.DID_START_SESSION=`DID_START_SESSION`,e.DID_END_SESSION=`DID_END_SESSION`,e.DID_START_RESTORE_SESSION=`DID_START_RESTORE_SESSION`,e.DID_CONTINUE_REMOTE_SESSION=`DID_CONTINUE_REMOTE_SESSION`,e}({}),li=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.CONNECTION_ISSUE=1]=`CONNECTION_ISSUE`,e[e.WORKFLOW_ISSUE=2]=`WORKFLOW_ISSUE`,e[e.INTERNAL_ISSUE=3]=`INTERNAL_ISSUE`,e[e.SCENARIO_IN_PROGRESS=4]=`SCENARIO_IN_PROGRESS`,e}({}),ui=function(e){return e[e.CONNECTION_ISSUE=0]=`CONNECTION_ISSUE`,e[e.CONFIG_MISSED_OR_INVALID=1]=`CONFIG_MISSED_OR_INVALID`,e[e.INITIALIZATION_REQUIRED=2]=`INITIALIZATION_REQUIRED`,e[e.SCENARIO_IN_PROGRESS=3]=`SCENARIO_IN_PROGRESS`,e}({}),di=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.PREPARED_REQUIRED=1]=`PREPARED_REQUIRED`,e[e.START_SESSION_FAILED=2]=`START_SESSION_FAILED`,e[e.UNKNOWN_STEP=3]=`UNKNOWN_STEP`,e[e.MODULES_ISSUE=4]=`MODULES_ISSUE`,e[e.ALREADY_STARTED=5]=`ALREADY_STARTED`,e[e.INTERNAL_ISSUE=6]=`INTERNAL_ISSUE`,e}({}),fi=function(e){return e[e.CONFIG_MISSED_OR_INVALID=0]=`CONFIG_MISSED_OR_INVALID`,e[e.MODULES_INSTANTIATION_FAILURE=1]=`MODULES_INSTANTIATION_FAILURE`,e[e.INITIALIZATION_IN_PROGRESS=2]=`INITIALIZATION_IN_PROGRESS`,e}({}),pi=function(e){return e[e.CONNECTION_ISSUE=0]=`CONNECTION_ISSUE`,e[e.WORKFLOW_ISSUE=1]=`WORKFLOW_ISSUE`,e}({}),mi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e}({}),hi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e[e.TOKEN_ERROR=3]=`TOKEN_ERROR`,e[e.CONNECTION_ISSUE=4]=`CONNECTION_ISSUE`,e}({}),gi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e[e.SAME_STEP=3]=`SAME_STEP`,e[e.IS_PROCESSING=4]=`IS_PROCESSING`,e[e.NOT_DATA_TYPE=5]=`NOT_DATA_TYPE`,e}({}),_i=function(e){return e[e.UNKNOWN=0]=`UNKNOWN`,e[e.SESSION_NOT_FOUND_OR_ACCESS_DENIED=1]=`SESSION_NOT_FOUND_OR_ACCESS_DENIED`,e[e.INVALID_MESSAGE_FORMAT=2]=`INVALID_MESSAGE_FORMAT`,e[e.UNSUPPORTED_COMMAND=3]=`UNSUPPORTED_COMMAND`,e}({}),vi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.SCENARIO_IN_PROGRESS=3]=`SCENARIO_IN_PROGRESS`,e}({}),yi=function(e){return e[e.HTTP_ISSUE=0]=`HTTP_ISSUE`,e[e.PROVIDER_ERROR=1]=`PROVIDER_ERROR`,e[e.DECODING_FAILED=2]=`DECODING_FAILED`,e}({}),bi=function(e){return e[e.INITIALIZATION_REQUIRED=0]=`INITIALIZATION_REQUIRED`,e[e.ALREADY_IN_PROCESS=1]=`ALREADY_IN_PROCESS`,e[e.START_COMMAND_FAILURE=2]=`START_COMMAND_FAILURE`,e[e.MISSING_CONFIGURATION=3]=`MISSING_CONFIGURATION`,e[e.PREPARE_WORKFLOW_FAILURE=4]=`PREPARE_WORKFLOW_FAILURE`,e[e.EXECUTION_WORKFLOW_FAILURE=5]=`EXECUTION_WORKFLOW_FAILURE`,e[e.MISSING_AUTH_CODE=6]=`MISSING_AUTH_CODE`,e[e.AUTH_FAILURE=7]=`AUTH_FAILURE`,e}({}),xi=function(e){return e[e.SUCCESS=0]=`SUCCESS`,e[e.ERROR=1]=`ERROR`,e}({}),Si=`PROGRESS`,Ci=`idv-session-data`,wi=`idv-session-auth-token`,Ti=`rgl-uid`,Ei=2e4,Di={shouldStartNewSession:!0},Oi={ALLOW:`ALLOW_SESSION`,BLOCK:`BLOCK_SESSION`},ki={VERY_GOOD:`VERY_GOOD`,GOOD:`GOOD`,FAIR:`FAIR`,BAD:`BAD`},Ai={NOT_STARTED:`NOT_STARTED`,IN_PROGRESS:`IN_PROGRESS`,COMPLETED:`COMPLETED`,CANCELLED:`CANCELLED`},ji=(e,t)=>Mi(e,t),Mi=(e,t)=>{let n=Ni(e,t);for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)){let r=n[e];typeof r==`object`&&r&&!Array.isArray(r)?n[e]=Mi(r,t):Array.isArray(r)&&(n[e]=r.map(e=>typeof e==`object`&&e?Mi(e,t):e))}return n},Ni=(e,t)=>{let n=Pi(e),r=e.layout;if(!r||r.length===0)return n;let i=null;if(r.forEach(e=>{let n=t[e];i?n&&Fi(n,i):i=n}),i){let e=Ni(i,t);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];Object.prototype.hasOwnProperty.call(n,t)||(n[t]=r)}}return n},Pi=e=>{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&n.toLowerCase()!==`layout`&&(t[n]=e[n]);return t},Fi=(e,t)=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])};function Ii(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return console.warn(`Failed to copy object:`,e),null}}var Li=(e,t)=>{if(!e||!t)return null;let n=Ii(e);return n?ji(n,t):null};function Ri(e){return zi.apply(this,arguments)}function zi(){return zi=C(function*(e){return new Promise(t=>setTimeout(t,e))}),zi.apply(this,arguments)}function Bi(e,t){return Vi.apply(this,arguments)}function Vi(){return Vi=C(function*(e,t,n=120,r=200){let i=0;for(;i<n;){let t=yield e();if(t!==null)return t;i++,i<n&&(yield Ri(r))}return t()}),Vi.apply(this,arguments)}var Hi=(e,t,n)=>{let r=e.reduce((e,t)=>(e.push(...t.supportedTemplates),e),[]),i=t.find(e=>e.id===n);return r.includes(i==null?void 0:i.client.templateId)},Ui=e=>e?e.type===si.PROCESSING:!1,Wi=e=>{let t=e.currentStep,n=e.workflow.steps.find(e=>e.id===t);return(e==null?void 0:e.isProcessingFiles)||Ui(n)},Gi=(e,t)=>t!=null&&t.length?e.filter(e=>e.id===`idv-gui`||e.supportedTemplates.some(e=>t.includes(e))):e,Ki=(e,t)=>{let n=e.reduce((e,t)=>(e.push(...t.supportedTemplates),e),[]);function r(e,t){let n=new Set(e);return t.filter(e=>!n.has(e))}let i=r(n,t||[]);return{isAllTemplatesSupported:i.length===0,unsupportedSteps:i.length>0?i:void 0}},qi={setAuthTokenToLs:({apiKey:e,authToken:t,tokenExpiresAt:n,sessionId:r,workflowId:i})=>{let a=localStorage.getItem(wi),o=a?JSON.parse(a):{};o[e]={authToken:t,tokenExpiresAt:n,workflowId:i,sessionId:r},localStorage.setItem(wi,JSON.stringify(o))},getAuthTokenLs:()=>{let e=localStorage.getItem(wi);if(!e)return null;try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:null}catch(e){return null}},removeAuthTokenLs:e=>{if(!e)return!1;let t=localStorage.getItem(wi);if(!t)return!1;try{let n=JSON.parse(t);return Object.prototype.hasOwnProperty.call(n,e)?(delete n[e],localStorage.setItem(wi,JSON.stringify(n)),!0):!1}catch(e){return!1}}},Ji=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Yi=e=>/^[^:{}\s]+:[^:{}\s]+$/.test(e),Xi={setSessionIdWorkflowIdToLs:(e,t)=>{let n=localStorage.getItem(Ci),r={};if(n)try{let e=JSON.parse(n);Ji(e)&&(r=e)}catch(e){if(Yi(n)){let[e,t]=n.split(`:`);e&&t&&(r={[t]:e})}}r[t]=e,localStorage.setItem(Ci,JSON.stringify(r))},getSessionIdWorkflowIdFromLS:()=>{let e=localStorage.getItem(Ci);if(!e)return null;try{let t=JSON.parse(e);return Ji(t)?t:null}catch(t){if(Yi(e)){let[t,n]=e.split(`:`);if(t&&n)return{[n]:t}}return null}},removeSessionIdWorkflowIdFromLS:e=>{let t=localStorage.getItem(Ci);if(!t)return!1;if(!e)return localStorage.removeItem(Ci),!0;try{let n=JSON.parse(t);if(!Ji(n))return!1;let r=n;return Object.prototype.hasOwnProperty.call(r,e)?(delete r[e],localStorage.setItem(Ci,JSON.stringify(r)),!0):!1}catch(n){if(Yi(t)){let[,n]=t.split(`:`);return n===e&&(localStorage.removeItem(Ci),!0)}return!1}}},Zi=e=>{let t,n=ei();try{var r;t=(r=window.localStorage.getItem(e))==null?n:r,window.localStorage.setItem(e,t)}catch(e){t=n}return t};function Qi(e){return Object.prototype.toString.call(e)===`[object Object]`&&Object.keys(e).length>0}function $i(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function ea(){return typeof document>`u`?null:document.documentElement.getAttribute(`lang`)||null}function ta(){return typeof navigator<`u`?navigator.language:null}var na=e=>{let t=typeof e==`string`?e:null,n=ea(),r=ta();return t||n||r||`en`},ra=e=>{try{var t;return(t=new URL(e).searchParams.get(`sessionId`))==null?``:t}catch(e){return``}},ia=e=>{try{var t;return(t=new URL(e).searchParams.get(`authorization`))==null?``:t}catch(e){return``}};function aa(e){try{let t=e;!e.includes(`://`)&&e.includes(`.`)&&(t=`http://${e}`);let n=new URL(t);return{host:n.hostname,isSecure:n.protocol===`https:`,port:n.port?parseInt(n.port,10):void 0}}catch(e){return null}}var oa=()=>{if(typeof window>`u`)return`SERVER_SIDE_RENDERING`;if(!document.referrer)return window.location.origin;try{return new URL(document.referrer).origin}catch(e){return window.location.origin}},sa=e=>{var t;let n=Zi(Ti),r={deviceId:n,metadata:{platform:`browser`,osVersion:`${ni.osVersion}`,hostAppId:oa(),host:oa(),sdkVersion:(t=`4.0.686-nightly`)==null?void 0:t.trim(),name:navigator.userAgent,deviceModel:`${ni.osName}/${ni.osVersion} ${ni.browserName}/${ni.fullBrowserVersion}`,hostAppVersion:`${ni.browserName}/${ni.fullBrowserVersion}`,userID:n},deviceType:`browser`};return e&&e instanceof Object&&Object.keys(e).length>0&&(r.customMetadata=e),r};function ca(){return la.apply(this,arguments)}function la(){return la=C(function*(){if(typeof navigator>`u`||!(`geolocation`in navigator))return null;try{return!(`permissions`in navigator)||(yield navigator.permissions.query({name:`geolocation`})).state!==`granted`?null:yield new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{e({lat:t.coords.latitude,lon:t.coords.longitude})},()=>e(null))})}catch(e){return null}}),la.apply(this,arguments)}var ua=(e,t)=>{let n={};for(let o=0;o<t.length;o++){var r;let s=t[o].property,c=e?`${e}.${s}`:s;if(t[o].children&&(r=t[o].children)!=null&&r.length){var i,a;n=(0,ri.default)(n,ua(c,(i=(a=t[o])==null?void 0:a.children)==null?[]:i))}t[o].constraints&&(n[c]={errors:(0,ii.default)((0,ri.default)(t[o].constraints,n[c])),value:t[o].value})}return n},z=e=>typeof e==`string`&&e.length>0,da=e=>e instanceof Error?e.message:String(e);function fa(e,t){return e===4?t.HTTP_ISSUE:e===5?t.PROVIDER_ERROR:e===6?t.DECODING_FAILED:t.PROVIDER_ERROR}function pa(e){switch(e){case _i.SESSION_NOT_FOUND_OR_ACCESS_DENIED:case _i.INVALID_MESSAGE_FORMAT:case _i.UNSUPPORTED_COMMAND:case _i.UNKNOWN:return e;default:return _i.UNKNOWN}}function ma(e){return ha.apply(this,arguments)}function ha(){return ha=C(function*(e){let t=yield crypto.subtle.digest(`SHA-256`,e);return Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}),ha.apply(this,arguments)}var ga=`********`,_a=/"([^"]+)"\s*:\s*"((?:[^"\\]|\\.)*)"/g,va=[`password`,`token`,`secret`,`apikey`,`authorization`,`credential`,`privateKey`,`clientSecret`,`licenseId`,`serial`,`authHeader`];function ya(e){return va.includes(e)}function ba(e){return e.replace(_a,(e,t)=>ya(t)?`"${t}":"${ga}"`:e)}var B=new class{constructor(){this._logsByStep={},this._tempCollectedLogs=``,this._events=[],this._publicListener=null}_formatEntry(e){var t,n;return[e.timestamp,(t=e.module)==null?`-`:t,`[${e.logLevel}]`,String((n=e.message)==null?`-`:n)].join(` `)}setTemplateId(e){this._templateId=e}logSessionEvent(e,t=!1){let n=new Date().toISOString(),r=this._templateId,i=r?`[${r}: ${ba(e.message)}]`:ba(e.message);if(this._publicListener&&this._publicListener({eventType:ai.MESSAGE,logLevel:e.logLevel,module:e.module,message:`${n} - ${i}`}),t)return;let a={timestamp:n,logLevel:e.logLevel,module:e.module,message:i};this._events.push(a);let o=this._formatEntry(a);this._tempCollectedLogs+=o+`
4
4
  `}cutCurrentStepLogs(e){let t=this._tempCollectedLogs;return this._logsByStep[e]=t==null?`no-logs`:t,this._tempCollectedLogs=``,t==null?`no-logs`:t}getSessionLogBySteps(){return j({},this._logsByStep)}getSessionEventsObject(){return[...this._events]}setPublicListener(e){this._publicListener=e}clearSession(){this._events=[],this._logsByStep={},this._templateId=void 0}getSessionLogAsJsonObject(){return JSON.stringify({logsByStep:this._logsByStep,exportedAt:new Date().toISOString()},null,2)}getSessionLogAsText(){let e=[];for(let[t,n]of Object.entries(this._logsByStep))n&&(e.push(`[${t}]`),e.push(n));return e.join(`
5
- `)}},va={apiKeyAuthTokenCollection:{},sessionProperties:[],currentSessionData:null,sessionRestoreMode:!1,nonce:void 0,currentStepId:null,currentScreenConfig:null,modulesConfig:{},workflow:null,externalModules:[],serviceToken:void 0,startConfig:{},locale:``,listener:()=>{}},ya=(e,t)=>j(j({},va),{},{setApiKeyAuthTokenCollection:(t,n,r)=>{e({apiKeyAuthTokenCollection:{authToken:n,apiKey:t,tokenExpiresAt:r}})},setSessionProperties:t=>{e({sessionProperties:t})},setServiceSessionToken:t=>{e({serviceToken:t})},setListener:t=>{B.setPublicListener(t),e({listener:t})},getCurrentSessionDataLs:()=>{var e;let n=qi.getSessionIdWorkflowIdFromLS(),r=(e=t().workflow)==null?void 0:e.id,i=n==null?void 0:n[r];return r&&i?{workflowId:r,sessionId:i}:null},setCurrentSessionDataLsAndStore:({isApiKeyConnection:n,sessionId:r,workflowId:i,locale:a})=>{if(e({currentSessionData:{sessionId:r,workflowId:i,locale:a}}),n){let{apiKey:e,authToken:n,tokenExpiresAt:a}=t().apiKeyAuthTokenCollection;if(!e||!n||!a)return;Wi.setAuthTokenToLs({apiKey:e,authToken:n,tokenExpiresAt:a,sessionId:r,workflowId:i})}else qi.setSessionIdWorkflowIdToLs(r,i)},removeCurrentSessionDataLsAndStore:()=>{e({currentSessionData:null,_sessionIdFromUrl:null});let n=t().startConfig,r=typeof n.apiKey==`string`?n.apiKey:``;if(r)Wi.removeAuthTokenLs(r);else{var i;let e=(i=t().workflow)==null?void 0:i.id;qi.removeSessionIdWorkflowIdFromLS(e)}},getCurrentSessionId(){let e=t().currentSessionData;return e?e.sessionId:null},setWorkflow:t=>{e(e=>({workflow:j(j({},e.workflow),t)}))},setCurrentStepId:t=>{e(()=>({currentStepId:t}))},setSessionRestoreMode:t=>{e(()=>({sessionRestoreMode:t}))},setNonce:t=>{e(()=>({nonce:t}))},getNonce:()=>t().nonce,resetProps:()=>e(()=>j({},va)),setStartConfig:t=>{e(()=>({startConfig:t}))},setLocale:t=>{e(()=>({locale:t}))}}),V=class e{constructor({errorCode:e,errorCodeKey:t,message:n,underlyingError:r,underlyingBaseError:i,domain:a,module:o,errorEnumName:s,shortDomainCode:c}){this.errorCode=e,this.errorCodeKey=t,this.message=n,this.underlyingError=r,this.underlyingBaseError=i,this.module=o,this.domain=a,this.errorEnumName=s,this.shortDomainCode=c}static getErrorKey(e,t){let n=Object.keys(t).find(n=>t[n]===e);if(!n)throw Error(`Invalid errorCode: ${e} in enum`);return n}get lastUnderlyingError(){let t=this.underlyingBaseError;for(;(t==null?void 0:t.underlyingBaseError)instanceof e;)t=t.underlyingBaseError;return t==null?void 0:t.underlyingError}toObject(){let t={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof e&&(t.underlyingBaseError=this.underlyingBaseError.toObject()),t}get shortChain(){let t=`${this.shortDomainCode}:${this.errorCode}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.shortChain}`),t}get fullChain(){let t=`${this.module}.${this.domain}:${this.errorCodeKey}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.fullChain}`),t}},ba=class extends HTMLElement{};function xa(e,t){if(t.displayName?console.log(`Register module: ${t.displayName}`):console.error(`Missed "displayName" when register module`),t.getSupportedTemplates&&typeof t.getSupportedTemplates==`function`){let e=t.getSupportedTemplates();console.log(`${t==null?void 0:t.displayName} supported templates: ${e.join(`, `)}`)}else console.error(`Missed "getSupportedTemplates" method when register module`);if(t.initialize&&typeof t.initialize==`function`||console.error(`${t==null?void 0:t.displayName} "initialize" method was not implemented`),t.deinitialize&&typeof t.deinitialize==`function`||console.error(`${t==null?void 0:t.displayName} "deinitialize" method was not implemented`),t.cancel&&typeof t.cancel==`function`||console.error(`${t==null?void 0:t.displayName} "cancel" method was not implemented`),t.isReady&&typeof t.isReady==`function`||console.error(`${t==null?void 0:t.displayName} "isReady" method was not implemented`),t.getIdentifier&&typeof t.getIdentifier==`function`){let e=t.getIdentifier();console.log(`Module id: ${e}`)}else console.error(`Missed "getIdentifier" when register module`);customElements.get(t.getIdentifier())?console.log(`Module ${e} has already registered`):customElements.define(e,t),console.log(`-------`)}var Sa=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Ca(e){if(Array.isArray(e))return e.map(Ca);if(Sa(e)){let t=j({},e);if(delete t.ios,delete t.android,delete t.web,`web`in e)return Sa(e.web)?j(j({},Ca(t)),e.web):e.web;let n={};for(let[e,r]of Object.entries(t))n[e]=Ca(r);return n}return e}var wa={FORM:`form`,DATA:`data`};function Ta(e){return new Promise(t=>setTimeout(t,e))}var Ea=e=>{if(typeof e!=`string`)return!1;try{return new URL(e),!0}catch(e){return!1}},Da=function(e){return e.RTL=`rtl`,e.LTR=`ltr`,e}({}),Oa=[`ar`,`he`],ka=e=>{var t;let n=e?(t=e.substring(0,2))==null?void 0:t.toLowerCase():``;return Oa.includes(n)?`rtl`:`ltr`},Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,fi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Aa=Ha,Aa.MODULE=`IDV`,Aa.ERROR_ENUM_NAME=`InitializeError`,Aa.SHORT_CODE=`IN`;var Ua=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,pi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};ja=Ua,ja.MODULE=`IDV`,ja.ERROR_ENUM_NAME=`TokenInitializeError`,ja.SHORT_CODE=`TI`;var Wa=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,li);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ma=Wa,Ma.MODULE=`IDV`,Ma.ERROR_ENUM_NAME=`PrepareWorkflowError`,Ma.SHORT_CODE=`PW`;var Ga=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,ui);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Na=Ga,Na.MODULE=`IDV`,Na.ERROR_ENUM_NAME=`ConfigureError`,Na.SHORT_CODE=`CFG`;var Ka=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,di);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Pa=Ka,Pa.MODULE=`IDV`,Pa.ERROR_ENUM_NAME=`WorkflowError`,Pa.SHORT_CODE=`SC`;var qa=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,yi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Fa=qa,Fa.MODULE=`IDV`,Fa.ERROR_ENUM_NAME=`ConnectionError`,Fa.SHORT_CODE=`CO`;var Ja=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,gi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ia=Ja,Ia.MODULE=`IDV`,Ia.ERROR_ENUM_NAME=`SessionError`,Ia.SHORT_CODE=`SE`;var Ya=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,hi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};La=Ya,La.MODULE=`IDV`,La.ERROR_ENUM_NAME=`StartSessionError`,La.SHORT_CODE=`ST`;var Xa=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,_i);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ra=Xa,Ra.MODULE=`IDV`,Ra.ERROR_ENUM_NAME=`SocketError`,Ra.SHORT_CODE=`SO`;var Za=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,vi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};za=Za,za.MODULE=`IDV`,za.ERROR_ENUM_NAME=`DeinitializationError`,za.SHORT_CODE=`DE`;var Qa=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,bi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ba=Qa,Ba.MODULE=`IDV`,Ba.ERROR_ENUM_NAME=`LoginError`,Ba.SHORT_CODE=`LG`;var $a=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,mi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Va=$a,Va.MODULE=`IDV`,Va.ERROR_ENUM_NAME=`WorkflowPlatformError`,Va.SHORT_CODE=`WPE`;var eo=function(e){return e.Force=`force`,e.ApiKey=`apiKey`,e.Simple=`simple`,e}({}),H=class e{constructor(){this.webSocket=null,this.messageCallbacks=new Set,this.reconnectCallbacks=new Set,this.connected=!1,this.wasEverConnected=!1,this.lastConnectConfig=null,this.reconnectAttempt=0,this.baseReconnectDelay=1e3,this.maxReconnectDelay=1e4,this.multiplier=1.5,this.reconnectAttemptThreshold=Math.log(this.maxReconnectDelay/this.baseReconnectDelay)/Math.log(this.multiplier),this.resetReconnectAttempt=()=>{this.reconnectAttempt=0},this.calculateReconnectDelay=()=>this.reconnectAttempt<this.reconnectAttemptThreshold?this.baseReconnectDelay*Math.pow(this.multiplier,this.reconnectAttempt):this.maxReconnectDelay}static getInstance(){return e.instance||(e.instance=new e),e.instance}send(e){if(!this.webSocket||!this.connected||this.webSocket.readyState!==WebSocket.OPEN)return{status:xi.ERROR,errorMessage:`WebSocket is not ready.`};let t=typeof e==`string`?e:JSON.stringify(e);try{return this.webSocket.send(t),{status:xi.SUCCESS}}catch(e){return{status:xi.ERROR,errorMessage:`Error while sending message to WebSocket: ${ca(e)}.`}}}isConnected(){return this.connected}connect(e,t){return B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`WebSocket is trying to ${t?`re`:``}connect...`}),this.connected?Promise.resolve():(this.lastConnectConfig=e,new Promise(t=>{let{host:n,isSecure:r=!0,token:i,port:a}=e,o=`ws${r?`s`:``}://${n}${a?`:${a}`:``}/ws/device?Authorization=Connection%20${i}`;this.webSocket=new WebSocket(o),this.webSocket.onopen=()=>{B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`WebSocket ${this.reconnectAttempt>0?`re`:``}connected successfully`}),this.connected=!0,this.wasEverConnected=!0,this.reconnectAttempt>0&&this.reconnectCallbacks.forEach(e=>e()),this.resetReconnectAttempt(),t()},this.webSocket.onerror=()=>{console.log(`Socket error`),t()},this.webSocket.onmessage=e=>{this.messageCallbacks.forEach(t=>t(e.data))},this.webSocket.onclose=()=>{if(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`WebSocket connection closed.`}),this.connected=!1,this.webSocket=null,!this.wasEverConnected||!this.lastConnectConfig)return;this.reconnectAttempt++;let e=this.calculateReconnectDelay();setTimeout(()=>{this.connect(this.lastConnectConfig,!0)},e)}}))}sendSessionGetMessage({sessionId:e,locale:t}){let n=this.send({command:`sessionGet`,options:j({id:e},t&&{locale:t})});n.status===xi.SUCCESS&&B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Successfully sent sessionGet message to WebSocket.`}),n.status===xi.ERROR&&B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Failed to send sessionGet message to WebSocket: ${n.errorMessage}.`})}onMessage(e){this.messageCallbacks.add(e)}onReconnect(e){this.reconnectCallbacks.add(e)}clearSubscriptions(){this.messageCallbacks.clear(),this.reconnectCallbacks.clear()}close(){var e;(e=this.webSocket)==null||e.close(),this.webSocket=null,this.connected=!1,this.wasEverConnected=!1,this.lastConnectConfig=null,this.clearSubscriptions()}}.getInstance();un();var to=0;Array.isArray;function U(e,t,n,r,i,a){t||(t={});var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--to,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return M.vnode&&M.vnode(l),l}un(),I();var no=Wt(void 0),ro=({perform:e,children:t,setIsProcessingCallback:n,devSettings:r,failedAssets:i,layoutDirection:a})=>U(no.Provider,{value:{perform:e,setIsProcessingCallback:n,devSettings:r,failedAssets:i,layoutDirection:a},children:t}),io=()=>{let e=yn(no);if(!e)throw Error(`useDevSettings must be used within a Context Provider`);return{devSettings:e==null?void 0:e.devSettings}},ao=()=>{let e=yn(no);if(!e)throw Error(`usePerform must be used within a PerformProvider`);return{perform:e.perform}},oo=()=>{let e=yn(no);if(!e)throw Error(`useSetIsProcessingCallback must be used within a Context Provider`);return{setIsProcessingCallback:e.setIsProcessingCallback}},so=()=>{let e=yn(no);if(!e)throw Error(`useFailedAssets must be used within a Context Provider`);return{failedAssets:e.failedAssets}},co=()=>{let e=yn(no);if(!e)throw Error(`useLayoutDirection must be used within a Context Provider`);return{layoutDirection:e.layoutDirection}},lo={width:`86px`,height:`86px`,flex:`0 0 86px`,marginBottom:`16px`,display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`};I();var uo=({dataUrl:e,isFullSize:t=!1})=>{let n=hn(null);return pn(()=>{if(!n.current)return;let e=!0,t=0,r=performance.now();function i(a){if(!e)return;let o=a-r;r=a,t=(t+.36*o)%360,n.current&&(n.current.style.transform=`rotate(${t}deg)`),requestAnimationFrame(i)}return requestAnimationFrame(i),()=>{e=!1}},[]),U(`img`,{src:e,ref:n,style:j({},t&&{width:`100%`,height:`100%`,aspectRatio:`1`})})},fo={INFO:`INFO`,INFO_DETAILS:`INFO_DETAILS`,STATUS:`STATUS`,PROGRESS:`PROGRESS`,QUESTIONS:`QUESTIONS`,CAMERA:`CAMERA`,GALLERY:`GALLERY`,GEOLOCATION:`GEOLOCATION`,DEVICE_TRANSFER:`DEVICE_TRANSFER`,GENERIC:`GENERIC`,GENERIC_LIST:`GENERIC_LIST`,GENERIC_LOCATION:`GENERIC_LOCATION`,GENERIC_PROGRESS:`GENERIC_PROGRESS`,UPLOAD_FILES:`UPLOAD_FILES`},po={START:`START`,LEFT:`LEFT`,CENTER:`CENTER`,RIGHT:`RIGHT`,END:`END`},mo={ASPECT_FILL:`ASPECT_FILL`,ASPECT_FIT:`ASPECT_FIT`,FILL:`FILL`},ho={NORMAL:`NORMAL`,BOLD:`BOLD`},go={TEXT_EXPANDABLE:`text_expandable`,TEXT_SINGLE_LINE:`text_single_line`,SELECTOR_OPTIONS:`selector_options`,SELECTOR_BUTTONS:`selector_buttons`,SELECTOR_DROPDOWN:`selector_dropdown`,MULTI_SELECTOR_BUTTONS:`multi_selector_buttons`,MULTI_SELECTOR_OPTIONS:`multi_selector_options`,MULTI_SELECTOR_DROPDOWN:`multi_selector_dropdown`},_o={FREE_TEXT:`FREE_TEXT`,EMAIL:`EMAIL`,NUMBER:`NUMBER`,SECURE:`SECURE`},vo=function(e){return e.HIGH=`HIGH`,e.BALANCED=`BALANCED`,e.LOW=`LOW`,e.PASSIVE=`PASSIVE`,e}({}),yo={SCAFFOLD:`scaffold`},bo={LIST_SCAFFOLD:`listScaffold`},xo={LABEL:`label`,IMAGE:`image`,IMAGE_BUTTON:`imageButton`,BUTTON:`button`,COLUMN:`column`,ROW:`row`,SPACER:`spacer`,PROGRESS_VIEW:`progressView`},So={TOP:`TOP`,CENTER:`CENTER`,BOTTOM:`BOTTOM`},Co={START:`START`,LEFT:`LEFT`,CENTER:`CENTER`,RIGHT:`RIGHT`,END:`END`},wo={NUMERIC:`NUMERIC`,ALPHA_NUMERIC:`ALPHA_NUMERIC`},To={EMAIL:`EMAIL`,PHONE:`PHONE`},Eo={GENERIC_COLUMN:`genericColumn`,QUESTION:`question`,SECTION:`section`,CODE_INPUT:`codeInput`,TEXT_INPUT:`textInput`};function Do(e){let t=/\[([^\]]+)\]\(((https?:\/\/|www\.)?[^\s)]+\.[^\s)]+)\)/g,n=[],r=0;for(let a of e.matchAll(t)){var i;let[t,o,s]=a,c=(i=a.index)==null?0:i;c>r&&n.push(e.slice(r,c));let l=s.startsWith(`http`)?s:`https://${s}`;n.push(U(`a`,{href:l,target:`_blank`,rel:`noopener noreferrer`,children:o},c)),r=c+t.length}return r<e.length&&n.push(e.slice(r)),n}function Oo(e){let t=e.split(`
6
- `);return t.flatMap((e,n)=>{let r=Do(e);return n===t.length-1?r:[...r,U(`br`,{},`br-`+n)]})}var ko=e=>!!(e!=null&&e.base64||e!=null&&e.imageURL||e!=null&&e.imageId),Ao=e=>{if(typeof e==`number`)return`${e}px`};function jo(e){return e?{paddingTop:Ao(e.top),paddingRight:Ao(e.right),paddingBottom:Ao(e.bottom),paddingLeft:Ao(e.left)}:{}}var Mo=(e,t)=>!!(e.base64&&!(t!=null&&t.base64.has(e.base64))||e.imageId&&e.imageId in zo||e.imageURL&&!(t!=null&&t.imageURL.has(e.imageURL))),No=(e,t)=>{let n=[],r=e==null?null:e;for(;r;)Mo(r,t)&&n.push(r),r=r.failurePolicy===`placeholderImage`&&r.placeholderImage||null;return n},Po=e=>{if(e===mo.ASPECT_FILL)return`cover`;if(e===mo.ASPECT_FIT)return`contain`;if(e===mo.FILL)return`fill`},Fo=(e,t)=>{let n=No(e,t)[0];if(n){if(n.imageURL)return n.imageURL;if(n.base64)return n.base64;if(n.imageId){var r;return(r=zo[n.imageId])==null?void 0:r.call(zo)}}},Io=(e,t)=>{var n;if(!e||!ko(e))return{};let r=Fo(e,t);if(!r)return{};let i=(n=e.contentMode)==null?mo.ASPECT_FILL:n;return{backgroundImage:`url("${r}")`,backgroundSize:Po(i),backgroundRepeat:`no-repeat`,backgroundPosition:`center`}},Lo=e=>e===ho.BOLD?700:(ho.NORMAL,400),Ro=e=>[e,`-apple-system`,`BlinkMacSystemFont`,`sans-serif`].filter(Boolean).join(`, `),W={WARNING:`warning_icon`,SPINNER:`spinner`,LOADER:`loader`,ERROR:`failure`,AGE:`age`,ANDROID:`android`,ARROW:`arrow`,APPLE:`apple`,BACK:`back`,BIOMETRIC:`biometricIcon`,INFO:`info`,TO_MOBILE:`toMobile`,UNDERAGE:`underage`,CROSS:`cross`,REGULA_LOGO:`regulaLogo`,POWERED_BY:`signature`,SUCCESS:`success`,DEFAULT:`empty`,CIRCLE_SELECTED:`radio_selected`,CIRCLE_NORMAL:`radio_normal`,SQUARE_SELECTED:`square_selected`,SQUARE_NORMAL:`square_normal`,SELECTED:`selected`,CHEVRON_DOWN:`chevronDown`,CLOSE_ICON:`close_icon`,GALLERY_ICON:`gallery`,CAMERA_ICON:`camera`,OK:`ok`,FILE:`file`,RELOAD:`reload`},zo={[W.SPINNER]:e=>{let t=`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHlsZT0idHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7Ij4KICA8Y2lyY2xlIGN4PSIzMCIgY3k9IjMwIiByPSIyNy41IiBmaWxsPSJub25lIiBzdHJva2U9IiM3RTU3QzUiIHN0cm9rZS13aWR0aD0iNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTI5LjU5MDY5Njk2MDU3ODk4IDQzLjE5Njg5ODk4Njg1OTY2IiBzdHJva2UtZGFzaG9mZnNldD0iMCIgc3Ryb2tlLWxpbmVjYXA9ImJ1dHQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAzMCAzMCkiLz4KPC9zdmc+Cg==`;if(!e)return t;let n=t.split(`,`),r=atob(n[1]);r=r.replace(/stroke="[^"]*"/g,`stroke="${e}"`);let i=btoa(r);return`${n[0]},${i}`},[W.LOADER]:e=>{let t=`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCAyMiAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iMTAiIHRyYW5zZm9ybT0icm90YXRlKDkwIDExIDExKSIgc3Ryb2tlPSIjRkJGQkZCIiBzdHJva2Utd2lkdGg9IjEuODc1Ii8+CjxwYXRoIGQ9Ik0xMSAwLjk5OTk5OEM1LjQ3NzE2IDAuOTk5OTk3IDEgNS40NzcxNSAxIDExQzEgMTYuNTIyOCA1LjQ3NzE1IDIxIDExIDIxQzE2LjUyMjggMjEgMjEgMTYuNTIyOCAyMSAxMSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K`;if(!e)return t;let n=t.split(`,`),r=atob(n[1]);r=r.replace(/stroke="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YXRoIGQ9Ik0yNS41OTE5IDIwLjUyMjZDMjQuOTkzNCAyMi4zMjM4IDIzLjc3NCAyMy44NTM1IDIyLjE1MTUgMjQuODM4NUMyMC41MjkxIDI1LjgyMzUgMTguNjA5MyAyNi4xOTk1IDE2LjczNTIgMjUuODk5NEMxNC44NjEgMjUuNTk5MyAxMy4xNTQ2IDI0LjY0MjcgMTEuOTIwOCAyMy4yMDA0QzEwLjY4NyAyMS43NTgxIDEwLjAwNjIgMTkuOTI0MSAxMCAxOC4wMjYxQzkuOTkzODYgMTYuMTI4MSAxMC42NjI3IDE0LjI4OTcgMTEuODg3MSAxMi44Mzk0QzEzLjExMTQgMTEuMzg5MSAxNC44MTE2IDEwLjQyMTMgMTYuNjgzNyAxMC4xMDkxQzE4LjU1NTggOS43OTY3NiAyMC40NzggMTAuMTYwMyAyMi4xMDY5IDExLjEzNDZDMjMuNzM1NyAxMi4xMDkgMjQuOTY1IDEzLjYzMDcgMjUuNTc1MyAxNS40MjgiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjwvZz4KPC9zdmc+Cg==`,[W.DEFAULT]:()=>``},Bo=({type:e,color:t,contentMode:n=mo.ASPECT_FILL,cornerRadius:r,backgroundColor:i,isFullSize:a=!1})=>{let o=zo[e]||zo[W.DEFAULT],s=o==null?void 0:o(t);return e===W.SPINNER||e===W.LOADER?U(uo,{dataUrl:s,isFullSize:a}):U(`img`,{src:s,style:j(j({display:`block`},a?{width:`100%`,height:`100%`}:{width:`auto`,height:`auto`,maxWidth:`100%`,maxHeight:`100%`}),{},{objectFit:Po(n),borderRadius:r,backgroundColor:i})})},Vo=`#005fcc`,Ho=`idv-gui`,Uo={DECODING_FAILED:0,IMAGE_LOADING_FAILED:1},Wo={text:`text`,selector:`selector`,multiSelector:`multiSelector`},Go={NOT_EMPTY:`notEmpty`,REGEX:`regex`},Ko={APP_DENIED:`app_denied`,SYSTEM_RESTRICTED:`system_restricted`,FILES_NOT_SELECTED:`files_not_selected`,FILES_LIMIT_EXCEEDED:`files_limit_exceeded`};function qo(e){return e===po.CENTER?`center`:e===po.RIGHT||e===po.END?`end`:`start`}function Jo(e){return e===po.CENTER?`center`:e===po.END?`end`:e===po.LEFT?`left`:e===po.RIGHT?`right`:`start`}function Yo(e){if(typeof e==`object`&&e)for(let t in e)typeof e[t]==`object`?Yo(e[t]):e[t]===`true`?e[t]=!0:e[t]===`false`&&(e[t]=!1);return e}function Xo(e){return Object.entries(e).map(([e,t])=>({id:e,value:typeof t==`string`?t.trim():t})).filter(e=>!!e.value)}var Zo=e=>Array.isArray(e)?e.length===0:e!==0&&!e;function G(e){if(e)return/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e)?e:void 0}var Qo=(e,t)=>e.reduce((e,n)=>{if(n.answerType===Wo.text||n.answerType===Wo.selector){var r;if((r=n.property)!=null&&r.id){let r=t.find(e=>e.name===n.property.id);if(r!=null&&r.string)return j(j({},e),{},{[n.id]:r.string})}}if(n.answerType===Wo.multiSelector){var i;if((i=n.property)!=null&&i.id){let r=t.find(e=>e.name===n.property.id);if(r!=null&&r.array)return j(j({},e),{},{[n.id]:r.array})}}return e},{}),$o=e=>Array.isArray(e)?e.reduce((e,t)=>t.type===Eo.SECTION?[...e,...$o(t.content.dataItems)]:t.type===Eo.QUESTION?[...e,{type:Eo.QUESTION,content:t.content}]:t.type===Eo.CODE_INPUT?[...e,{type:Eo.CODE_INPUT,content:t.content}]:t.type===Eo.TEXT_INPUT?[...e,{type:Eo.TEXT_INPUT,content:t.content}]:e,[]):[],es=(e,t)=>t!=null&&t.length?$o(e).reduce((e,n)=>{var r;if(!(n!=null&&(r=n.content)!=null&&(r=r.property)!=null&&r.id))return e;let i=t.find(e=>e.name===n.content.property.id);if(!i)return e;if(n.type===Eo.CODE_INPUT||n.type===Eo.TEXT_INPUT)return i.string?j(j({},e),{},{[n.content.id]:i.string}):e;if(n.type===Eo.QUESTION){let{content:t}=n;if(t.answerType===Wo.multiSelector)return i.array?j(j({},e),{},{[t.id]:i.array}):e;if((t.answerType===Wo.text||t.answerType===Wo.selector)&&i.string)return j(j({},e),{},{[t.id]:i.string})}return e},{}):{},ts=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;if(typeof e==`string`){let n=e.split(`,`)[1];t(n)}else n(Error(`Unexpected result type`))},r.onerror=()=>n(r.error),r.readAsDataURL(e)}),ns=function(){var e=C(function*(){try{return(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(e=>e.stop()),`allowed`}catch(e){return(e==null?void 0:e.name)===`NotAllowedError`?`denied`:`error`}});return function(){return e.apply(this,arguments)}}(),rs=()=>String.fromCharCode(Math.floor(Math.random()*26)+97)+Number(Math.random()).toString(16).slice(2)+Date.now().toString(16).slice(4);function is(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function as(e,t){if(e==null)return{};var n,r,i=is(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}I();var os=[`isFullSize`],ss=e=>{let{isFullSize:t=!1}=e,n=as(e,os),{failedAssets:r}=so(),i=No(n,r),[a,o]=N(0),s=i[a];if(!s)return null;let{imageId:c,imageURL:l,base64:u,contentMode:d=mo.ASPECT_FILL,cornerRadius:f,backgroundColor:p}=s,[m,h]=N(!0),g=m&&l,_=()=>{h(!1)},v=()=>{o(e=>e+1)},y=t?{width:`100%`,height:`100%`}:{width:`auto`,height:`auto`,maxWidth:`100%`,maxHeight:`100%`};return u?U(`img`,{style:j(j({},y),{},{objectFit:Po(d),borderRadius:f,backgroundColor:G(p)||`transparent`,display:`block`}),src:u,onError:v}):c?U(Bo,{type:c in zo?c:`default`,contentMode:d,cornerRadius:f,backgroundColor:G(p)||`transparent`,isFullSize:t}):l?U(vt,{children:[g&&U(`div`,{style:{width:`100%`,height:`100%`,backgroundColor:`#e0e0e0`,borderRadius:f}}),U(`img`,{style:j(j({},y),{},{objectFit:Po(d),borderRadius:f,backgroundColor:G(p)||`transparent`,display:g?`none`:`block`}),src:l,onLoad:_,onError:v})]}):null},cs=({signature:e})=>U(`footer`,{"data-ui":`gui-footer`,part:`gui-footer`,style:{display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`,height:`100%`,width:`100%`},children:U(`a`,{href:``,style:{display:`inline-block`,height:`16px`},children:U(ss,j({},e))})});I();var ls={display:`flex`,justifyContent:`center`,alignItems:`center`,height:`36px`,minWidth:`36px`,border:`none`,cursor:`pointer`,padding:0},us=({dataTestId:e,responseBody:t,image:n,title:r,backgroundColor:i=`transparent`,cornerRadius:a,highlightColor:o})=>{var s;let[c,l]=N(!1),u=c&&o?o:i,{perform:d}=ao();return U(`button`,{"data-ui":`gui-close-button`,part:`gui-close-button`,"data-test":e,onClick:()=>{let e=JSON.parse(JSON.stringify(t));Yo(e),d(e,wa.DATA)},className:`hover-button`,style:j(j(j({},ls),a&&{borderRadius:a}),{},{backgroundColor:(s=G(u))==null?`transparent`:s}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[n&&U(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`},children:U(ss,j({},n))}),r&&U(`div`,{style:{padding:`0 5px`},children:U(K,j({},r))})]})},ds=({closeButton:e})=>U(`header`,{style:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`flex-end`,alignItems:`center`,paddingInlineEnd:`16px`},"data-ui":`gui-header`,part:`gui-header`,children:U(`div`,{children:e&&U(us,j({dataTestId:`close-btn`},e))})}),K=({text:e,fontName:t=``,fontSize:n=`17px`,fontColor:r,alignment:i,backgroundColor:a,cornerRadius:o=0,paddings:s,fontWeight:c=ho.NORMAL,htmlFor:l,isGenericTemplate:u=!1})=>{let d=u?po.START:po.LEFT,f=i||d,p=u?Jo(f):qo(f),m=j(j(j({},u&&{display:`block`}),{},{fontFamily:Ro(t),fontSize:n},u&&{fontWeight:Lo(c)}),{},{color:G(r)||`#000000`,textAlign:p,backgroundColor:G(a)||`transparent`,borderRadius:o,overflowWrap:`break-word`},u&&jo(s)),h=typeof e==`string`&&e.trim()&&Oo(e);return l?U(`label`,{"data-ui":`gui-label`,part:`gui-label`,style:m,htmlFor:l,children:h}):U(`div`,{"data-ui":`gui-label`,part:`gui-label`,style:m,children:h})};I();var fs=()=>{let[e,t]=N(!1),[n,r]=N(!1);return{isHovered:e,isPressed:n,interactionHandlers:{onPointerDown:()=>r(!0),onPointerUp:()=>r(!1),onPointerLeave:()=>r(!1),onPointerCancel:()=>r(!1),onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1)}}},ps=({isGenericTemplate:e,isPressed:t,isHovered:n,backgroundColor:r,highlightColor:i,hoverColor:a})=>{let o=G(r)||`transparent`,s=G(i),c=G(a);return e&&t?s||o:e&&n?c||o:!e&&n&&s||o},ms=({title:e,image:t,responseBody:n,url:r,backgroundColor:i=`transparent`,cornerRadius:a,highlightColor:o,hoverColor:s,dataTestId:c,borderColor:l,borderWidth:u,type:d=`RESPONSE_BODY`,paddings:f,isGenericTemplate:p=!1,onClick:m})=>{var h;let{perform:g}=ao(),{isHovered:_,isPressed:v,interactionHandlers:y}=fs(),b=ps({isGenericTemplate:p,isPressed:v,isHovered:_,backgroundColor:i,highlightColor:o,hoverColor:s}),x=e=>{if(d===`URL`){r&&window.open(r,`_blank`,`noopener,noreferrer`);return}if(m&&m(e),d!==`RESPONSE_BODY`&&!(d===`FORM`&&n))return;let t=JSON.parse(JSON.stringify(n));Yo(t);let i=d===`FORM`?wa.FORM:wa.DATA;g(t,i)},S=p?j({},jo(f)):{padding:`10px 16px`,height:`50px`},C=j(j({width:`100%`,textAlign:`center`,fontSize:`16px`,fontWeight:`400`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:10,borderRadius:a||0,borderStyle:l&&u?`solid`:void 0,backgroundColor:b,borderColor:(h=G(l))==null?`none`:h,borderWidth:u==null?0:u,overflow:`hidden`,transition:`.3s`,outlineColor:Vo},p&&{WebkitTapHighlightColor:`transparent`}),S);return U(`button`,j(j({"data-ui":`gui-button`,part:`gui-button`,type:d===`FORM`?`submit`:`button`,"data-test":c,style:C},y),{},{onClick:x,children:[t&&U(`div`,{style:{width:`auto`,maxWidth:`30px`,height:`30px`,display:`flex`,alignItems:`center`},children:U(ss,j({},t))}),e&&U(`div`,{style:{flexGrow:+!t},children:U(K,j(j({},e),{},{isGenericTemplate:p}))})]}))},hs=[`items`],gs=e=>{let{items:t}=e,n=as(e,hs);return U(`div`,{part:`gui-buttons`,"data-ui":`gui-buttons`,style:j(j({},{display:`flex`,flexDirection:`row`,flexWrap:`wrap`,alignItems:`center`,alignSelf:`flex-end`,justifyContent:`center`,gap:`8px`,width:`100%`,height:`auto`,alignContent:`flex-end`,paddingTop:`20px`}),n),children:t.map(e=>{var t;return U(ms,j({dataTestId:`button-`+((t=e.title)==null?void 0:t.text)},e),rs())})})},_s=({children:e,header:t,footer:n,backgroundColor:r=`white`,backgroundImage:i,buttons:a})=>{let{failedAssets:o}=so(),s=t?60:10,c=n?66:32;return U(`div`,{part:`gui-base-container`,"data-ui":`gui-base-container`,id:`base-container`,style:j({},j({position:`relative`,display:`flex`,flexGrow:1,flexDirection:`column`,alignItems:`center`,alignContent:`center`,justifyContent:`center`,margin:`0 auto`,paddingTop:`${t?s+10:10}px`,paddingBottom:`${c}px`,paddingInline:`20px`,height:`100%`,width:`100%`,backgroundColor:G(r)},Io(i,o))),children:[t&&U(`div`,{style:{position:`absolute`,top:0,insetInline:0,width:`100%`,height:s},children:U(ds,{closeButton:t.closeButton})}),U(`div`,{style:{height:`100%`,width:`100%`,flex:`1 1 100%`,overflow:`hidden`},children:e}),(a==null?void 0:a.length)&&U(gs,{items:a}),n&&U(`div`,{style:{position:`absolute`,bottom:0,insetInline:0,width:`100%`,height:c,padding:`16px 20px`},children:U(cs,j({},n))})]})},vs=({text:e,fontName:t=``,fontColor:n,alignment:r=po.LEFT,fontSize:i=17,backgroundColor:a,cornerRadius:o=0})=>U(`div`,{"data-ui":`gui-description`,part:`gui-description`,style:{fontFamily:Ro(t),fontSize:i,textAlign:qo(r),color:G(n)||`#000000`,borderRadius:o,backgroundColor:G(a)||`transparent`,whiteSpace:`pre-line`,overflowWrap:`break-word`},children:e&&Oo(e)});I();var ys=({header:e,footer:t,image:n,title:r,description:i,buttons:a,backgroundColor:o,backgroundImage:s})=>{let c=hn(null),l=hn(null),[u,d]=N(!1);return pn(()=>{var e;let t=l.current,n=c.current;if(!t||!n)return;let r=(e=n.getBoundingClientRect().height)==null?0:e,i=t.getBoundingClientRect().height;d(r>i+2)},[]),U(_s,{header:e,buttons:a,footer:t,backgroundColor:o,backgroundImage:s,children:U(`div`,{part:`gui-status-screen`,style:{display:`flex`,justifyContent:u?`flex-start`:`center`,alignItems:`center`,alignContent:`center`,flex:1,height:`100%`,flexDirection:`column`},children:[n&&U(`div`,{style:lo,children:U(ss,j({},n))}),(r==null?void 0:r.text)&&U(`div`,{ref:l,style:{width:`100%`,overflow:u?`auto`:`hidden`},children:U(`div`,{ref:c,style:{margin:`0 auto`,fontSize:`20px`,fontWeight:700,maxWidth:`345px`,textAlign:`center`,lineHeight:`1.2`,display:`flex`,flexDirection:`column`,justifyContent:u?`flex-start`:`center`,alignItems:`center`,alignContent:`center`},children:r&&U(K,j({},r))})}),i&&U(`div`,{style:{lineHeight:`28px`,fontWeight:`400`,marginTop:`16px`},children:U(vs,j({},i))})]})})},bs={width:`100%`,height:`auto`,marginBottom:`32px`,aspectRatio:`1.68`},xs={position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`stretch`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`},Ss=({title:e,header:t,footer:n,image:r,description:i,buttons:a,backgroundColor:o,backgroundImage:s})=>U(_s,{header:t,footer:n,buttons:a,backgroundColor:o,backgroundImage:s,children:U(vt,{children:U(`div`,{part:`gui-info-screen-container`,"data-ui":`gui-info-screen-container`,id:`info-screen-container`,style:j(j({},xs),{},{justifyContent:r?`flex-start`:`center`}),children:[r&&U(`div`,{style:bs,children:U(ss,j({},r))}),e&&U(`div`,{style:{marginBottom:20,lineHeight:`39.2px`},children:U(K,j({},e))}),i&&U(`div`,{style:{lineHeight:`28px`,fontWeight:`400`},children:U(vs,j({},i))})]})})}),Cs=({indicatorColor:e=`#7E57C5`,isFullSize:t=!1})=>U(Bo,{type:W.SPINNER,color:e,isFullSize:t}),ws=({progressView:e,footer:t,backgroundColor:n,backgroundImage:r})=>U(_s,{footer:t,backgroundColor:n,backgroundImage:r,children:U(`div`,{style:{flex:`1 1 100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`20px`,height:`100%`,width:`100%`},children:U(Cs,{indicatorColor:G(e==null?void 0:e.indicatorColor)||`#000000`})})}),Ts=({title:e,description:t,image:n,backgroundColor:r,cornerRadius:i=0,isLastChild:a})=>U(`div`,{className:`details-item`,style:j(j({},{display:`flex`,alignItems:`flex-start`,justifyContent:`space-between`,borderBottom:a?`none`:`1px solid #E0E0E0`,padding:`16px 0`,gap:16}),{},{backgroundColor:G(r)||`transparent`,borderRadius:i}),children:[U(`div`,{style:{flex:`0 1 auto`,minWidth:0},children:[U(`div`,{style:{marginBottom:5,fontWeight:`bold`,lineHeight:`21px`},children:U(K,j({},e))}),U(`div`,{style:{lineHeight:`21px`,fontWeight:`400`},children:U(vs,j({},t))})]}),U(`div`,{style:{aspectRatio:`1 / 1`,width:120,height:120,flex:`0 0 120px`},children:U(ss,j({},n))})]}),Es={display:`flex`,flexDirection:`column`,padding:`0 16px`},Ds=({items:e,backgroundColor:t,cornerRadius:n=16})=>U(`div`,{className:`details`,style:j(j({},Es),{},{backgroundColor:G(t)||`white`,borderRadius:n}),children:e.map((t,n)=>U(Ts,j({isLastChild:n===e.length-1},t),n))});I();var Os=({title:e,header:t,footer:n,details:r,buttons:i,backgroundColor:a,backgroundImage:o})=>{let s=hn(null),[c,l]=N(!1);return pn(()=>{s.current&&l(s.current.scrollHeight>s.current.clientHeight)},[]),U(_s,{header:t,buttons:i,footer:n,backgroundColor:a,backgroundImage:o,children:U(`div`,{style:{display:`flex`,flexDirection:`column`,justifyContent:c?`flex-start`:`center`,height:`100%`,minHeight:`100%`,overflow:`auto`},ref:s,children:[U(`div`,{style:{marginBottom:e?`16px`:`0`,fontWeight:400,fontSize:`28px`},children:e&&U(K,j({},e))}),r&&U(Ds,j({},r))]})})};Vr();var ks=[`_f`],As=[`name`],js=[`_f`],Ms=[`ref`,`message`,`type`],Ns=[`formControl`],Ps=e=>e.type===`checkbox`,Fs=e=>e instanceof Date,Is=e=>e==null,Ls=e=>typeof e==`object`,Rs=e=>!Is(e)&&!Array.isArray(e)&&Ls(e)&&!Fs(e),zs=e=>Rs(e)&&e.target?Ps(e.target)?e.target.checked:e.target.value:e,Bs=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),Vs=e=>{let t=e.constructor&&e.constructor.prototype;return Rs(t)&&t.hasOwnProperty(`isPrototypeOf`)},Hs=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function Us(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(Hs&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(Rs(e)&&Vs(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=Us(e[t]));return r}var Ws={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},Gs={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},Ks={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},qs=`form`,Js=`root`,Ys=[`__proto__`,`constructor`,`prototype`],Xs=e=>/^\w*$/.test(e),q=e=>e===void 0,Zs=e=>e.split(/[.[\]'"]/g).filter(Boolean),J=(e,t,n)=>{if(!t||!Rs(e))return n;let r=Xs(t)?[t]:Zs(t);if(r.some(e=>Ys.includes(e)))return n;let i=r.reduce((e,t)=>Is(e)?void 0:e[t],e);return q(i)||i===e?q(e[t])?n:e[t]:i},Qs=e=>typeof e==`boolean`,$s=e=>typeof e==`function`,Y=(e,t,n)=>{let r=-1,i=Xs(t)?[t]:Zs(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=Rs(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(Ys.includes(t))return;e[t]=a,e=e[t]}},ec=L.createContext(null);ec.displayName=`HookFormControlContext`;var tc=()=>L.useContext(ec),nc=(e,t,n,r=!0)=>{let i={};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==Gs.all&&(t._proxyFormState[i]=!r||Gs.all),n&&(n[i]=!0),e[i]}});return i},rc=Hs?L.useLayoutEffect:L.useEffect;function ic(e){let t=tc(),{control:n=t,disabled:r,name:i,exact:a}=e||{},[o,s]=L.useState(()=>j(j({},n._formState),{},{defaultValues:n._defaultValues})),c=L.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return rc(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!r&&s(j(j(j({},n._formState),e),{},{defaultValues:n._defaultValues}))}}),[i,r,a]),L.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),L.useMemo(()=>nc(o,n,c.current,!1),[o,n])}var ac=e=>typeof e==`string`,oc=(e,t,n,r,i)=>ac(e)?(r&&t.watch.add(e),J(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),J(n,e))):(r&&(t.watchAll=!0),n),sc=e=>Is(e)||!Ls(e),cc=(e,t)=>t.length===0&&!Array.isArray(e)&&!Vs(e);function lc(e,t,n=new WeakMap){if(e===t)return!0;if(sc(e)||sc(t))return Object.is(e,t);if(Fs(e)&&Fs(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(cc(e,r)||cc(t,i))return Object.is(e,t);let a=n.get(e);if(a&&a.has(t))return!0;a?a.add(t):n.set(e,new WeakSet([t]));for(let i of r){let r=e[i];if(!(i in t))return!1;if(i!==`ref`){let e=t[i];if(Fs(r)&&Fs(e)||(Rs(r)||Array.isArray(r))&&(Rs(e)||Array.isArray(e))?!lc(r,e,n):!Object.is(r,e))return!1}}return!0}function uc(e){let t=tc(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=L.useRef(i),l=L.useRef(s),u=L.useRef(void 0),d=L.useRef(n),f=L.useRef(r);l.current=s;let[p,m]=L.useState(()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e}),h=L.useCallback(e=>{let t=oc(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),g=L.useCallback(e=>{if(!a){let t=oc(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);lc(e,u.current)||(m(e),u.current=e)}else m(t)}},[n._formValues,n._names,a,r]);rc(()=>((d.current!==n||!lc(f.current,r))&&(d.current=n,f.current=r,g()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{g(e.values)}})),[n,o,r,g]),L.useEffect(()=>n._removeUnmounted());let _=d.current!==n,v=f.current,y=L.useMemo(()=>{if(a)return null;let e=!_&&!lc(v,r);return _||e?h():null},[a,_,r,v,h]);return y===null?p:y}function dc(e){let t=tc(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=Bs(i._names.array,n),l=uc({control:i,name:n,defaultValue:L.useMemo(()=>J(i._formValues,n,J(i._defaultValues,n,o)),[i,n,o]),exact:s}),u=ic({control:i,name:n,exact:s}),d=L.useRef(e),f=L.useRef(null),p=L.useRef(i.register(n,j(j({},e.rules),{},{value:l},Qs(e.disabled)?{disabled:e.disabled}:{})));d.current=e;let m=L.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!J(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!J(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!J(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!J(u.validatingFields,n)},error:{enumerable:!0,get:()=>J(u.errors,n)}}),[u,n]),h=L.useCallback(e=>{let t=zs(e);return J(i._fields,n)||(p.current=i.register(n,j(j({},d.current.rules),{},{value:t}))),p.current.onChange({target:{value:zs(e),name:n},type:Ws.CHANGE})},[n,i]),g=L.useCallback(()=>p.current.onBlur({target:{value:J(i._formValues,n),name:n},type:Ws.BLUR}),[n,i._formValues]),_=L.useCallback(e=>{e&&(f.current={focus:()=>$s(e.focus)&&e.focus(),select:()=>$s(e.select)&&e.select(),setCustomValidity:t=>$s(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>$s(e.reportValidity)&&e.reportValidity()});let t=J(i._fields,n);t&&t._f&&e&&(t._f.ref=f.current)},[i._fields,n]),v=L.useMemo(()=>j(j({name:n,value:l},Qs(r)||u.disabled?{disabled:u.disabled||r}:{}),{},{onChange:h,onBlur:g,ref:_}),[n,r,u.disabled,h,g,_,l]);return L.useEffect(()=>{let e=i._options.shouldUnregister||a;i.register(n,j(j({},d.current.rules),Qs(d.current.disabled)?{disabled:d.current.disabled}:{}));let t=(e,t)=>{let n=J(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=Us(J(a?i._defaultValues:i._options.values||i._defaultValues,n,J(i._options.defaultValues,n,d.current.defaultValue)));Y(i._defaultValues,n,e),q(J(i._formValues,n))&&Y(i._formValues,n,e)}if(!c&&i.register(n),f.current){let e=J(i._fields,n);e&&e._f&&(e._f.ref=f.current)}return()=>{(c?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,c,a]),L.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),L.useMemo(()=>({field:v,formState:u,fieldState:m}),[v,u,m])}var fc=e=>e.render(dc(e)),pc=L.createContext(null);pc.displayName=`HookFormContext`;var mc=()=>L.useContext(pc),hc=({children:e,watch:t,getValues:n,getFieldState:r,setError:i,clearErrors:a,setValue:o,setValues:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:m,register:h,setFocus:g,subscribe:_})=>{let v=L.useMemo(()=>({watch:t,getValues:n,getFieldState:r,setError:i,clearErrors:a,setValue:o,setValues:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:m,register:h,setFocus:g,subscribe:_}),[a,m,l,r,n,f,h,d,u,i,g,o,s,_,c,p,t]);return L.createElement(pc.Provider,{value:v},L.createElement(ec.Provider,{value:v.control},e))},gc=(e,t,n,r,i)=>t?j(j({},n[e]),{},{types:j(j({},n[e]&&n[e].types?n[e].types:{}),{},{[r]:i||!0})}):{},_c=e=>Array.isArray(e)?e.filter(Boolean):[],vc=e=>Array.isArray(e)?e:[e],yc=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function bc(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&Rs(i)&&a){let e=bc(i,a);Rs(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var xc=e=>Rs(e)&&!Object.keys(e).length,Sc=e=>e.type===`file`,Cc=e=>{if(!Hs)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},wc=e=>e.type===`select-multiple`,Tc=e=>e.type===`radio`,Ec=e=>Tc(e)||Ps(e),Dc=e=>Cc(e)&&e.isConnected;function Oc(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;){if(Is(e)){e=void 0;break}e=e[t[r]],r++}return e}function kc(e){for(let t in e)if(e.hasOwnProperty(t)&&!q(e[t]))return!1;return!0}function Ac(e,t){if(ac(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:Xs(t)?[t]:Zs(t),r=n.length===1?e:Oc(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(Rs(r)&&xc(r)||Array.isArray(r)&&kc(r))&&Ac(e,n.slice(0,-1)),e}var jc=e=>{for(let t in e)if($s(e[t]))return!0;return!1};function Mc(e){return Array.isArray(e)||Rs(e)&&!jc(e)}function Nc(e,t={}){for(let n in e){let r=e[n];Mc(r)?(t[n]=Array.isArray(r)?[]:{},Nc(r,t[n])):q(r)||(t[n]=!0)}return t}function Pc(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){let t=e.map(e=>Pc(e));return t.some(e=>e!==void 0)?t:void 0}if(Rs(e)){let t={};for(let n in e){let r=Pc(e[n]);q(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function Fc(e,t,n){n||(n=Nc(t));for(let r in e){let i=e[r];if(Mc(i))q(t)||sc(n[r])?n[r]=Nc(i,Array.isArray(i)?[]:{}):Fc(i,Is(t)?{}:t[r],n[r]);else{let e=t[r];n[r]=!lc(i,e)}}return Pc(n)||{}}var Ic={value:!1,isValid:!1},Lc={value:!0,isValid:!0},Rc=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!q(e[0].attributes.value)?q(e[0].value)||e[0].value===``?Lc:{value:e[0].value,isValid:!0}:Lc:Ic}return Ic},zc=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>q(e)?e:t?e===``?NaN:e&&+e:n&&ac(e)?new Date(e):r?r(e):e,Bc={isValid:!1,value:null},Vc=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Bc):Bc;function Hc(e){let t=e.ref;return Sc(t)?t.files:Tc(t)?Vc(e.refs).value:wc(t)?[...t.selectedOptions].map(({value:e})=>e):Ps(t)?Rc(e.refs).value:zc(q(t.value)?e.ref.value:t.value,e)}var Uc=(e,t,n,r)=>{let i={};for(let n of e){let e=J(t,n);e&&Y(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Wc=e=>e instanceof RegExp,Gc=e=>q(e)?e:Wc(e)?e.source:Rs(e)?Wc(e.value)?e.value.source:e.value:e,Kc=e=>({isOnSubmit:!e||e===Gs.onSubmit,isOnBlur:e===Gs.onBlur,isOnChange:e===Gs.onChange,isOnAll:e===Gs.all,isOnTouch:e===Gs.onTouched}),qc=`AsyncFunction`,Jc=e=>!!e&&!!e.validate&&!!($s(e.validate)&&e.validate.constructor.name===qc||Rs(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===qc)),Yc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Xc=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(`${t}.`))),Zc=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=J(e,i);if(n){let{_f:e}=n,a=as(n,ks);if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(Zc(a,t))break}else if(Rs(a)&&Zc(a,t))break}}};function Qc(e,t,n){let r=J(e,n);if(r||Xs(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=J(t,r),o=J(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var $c=(e,t,n,r)=>{n(e);let{name:i}=e,a=as(e,As);return xc(a)||r&&Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||Gs.all))},el=(e,t,n)=>!e||!t||e===t||vc(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),tl=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e,nl=(e,t)=>!_c(J(e,t)).length&&Ac(e,t),rl=(e,t,n)=>{let r=J(e,n),i=Array.isArray(r)?r:[];return Y(i,Js,t[n]),Y(e,n,i),e};function il(e,t,n=`validate`){if(ac(e)||Array.isArray(e)&&e.every(ac)||Qs(e)&&!e)return{type:n,message:ac(e)?e:``,ref:t}}var al=e=>Rs(e)&&!Wc(e)?e:{value:e,message:``},ol=function(){var e=C(function*(e,t,n,r,i,a){let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_}=e._f,v=J(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{if(i&&y.reportValidity){let t=Qs(e)?``:e||``;s?s.forEach(e=>e.setCustomValidity(t)):y.setCustomValidity(t),y.reportValidity()}},x={},S=Tc(o),C=Ps(o),w=S||C,T=(g||Sc(o))&&q(o.value)&&q(v)||Cc(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length,ee=gc.bind(null,h,r,x),E=(e,t,n,r=Ks.maxLength,i=Ks.minLength)=>{let a=e?t:n;x[h]=j({type:e?r:i,message:a,ref:o},ee(e?r:i,a))};if(a?!Array.isArray(v)||!v.length:c&&(!w&&(T||Is(v))||Qs(v)&&!v||C&&!Rc(s).isValid||S&&!Vc(s).isValid)){let{value:e,message:t}=ac(c)?{value:!!c,message:c}:al(c);if(e&&(x[h]=j({type:Ks.required,message:t,ref:y},ee(Ks.required,t)),!r))return b(t),x}if(!T&&(!Is(d)||!Is(f))){let e,t,n=al(f),i=al(d);if(!Is(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;Is(n.value)||(e=r>n.value),Is(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(v),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;ac(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),ac(i.value)&&v&&(t=s?a(v)<a(i.value):c?v<i.value:r<new Date(i.value))}if((e||t)&&(E(!!e,n.message,i.message,Ks.max,Ks.min),!r))return b(x[h].message),x}if((l||u)&&!T&&(ac(v)||a&&Array.isArray(v))){let e=al(l),t=al(u),n=!Is(e.value)&&v.length>+e.value,i=!Is(t.value)&&v.length<+t.value;if((n||i)&&(E(n,e.message,t.message),!r))return b(x[h].message),x}if(p&&!T&&ac(v)){let{value:e,message:t}=al(p);if(Wc(e)&&!v.match(e)&&(x[h]=j({type:Ks.pattern,message:t,ref:o},ee(Ks.pattern,t)),!r))return b(t),x}if(m){if($s(m)){let e=il(yield m(v,n),y);if(e&&(x[h]=j(j({},e),ee(Ks.validate,e.message)),!r))return b(e.message),x}else if(Rs(m)){let e={};for(let t in m){if(!xc(e)&&!r)break;let i=il(yield m[t](v,n),y,t);i&&(e=j(j({},i),ee(t,i.message)),b(i.message),r&&(x[h]=e))}if(!xc(e)&&(x[h]=j({ref:y},e),!r))return x}}return b(!0),x});return function(t,n,r,i,a,o){return e.apply(this,arguments)}}(),sl={mode:Gs.onSubmit,reValidateMode:Gs.onChange,shouldFocusError:!0},cl={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function ll(e={}){let t=j(j({},sl),e),n=j(j({},Us(cl)),{},{isLoading:$s(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1}),r={},i=(Rs(t.defaultValues)||Rs(t.values))&&Us(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:Us(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,l=0,u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d=j({},u),f=j({},d),p={array:yc(),state:yc()},m=t.criteriaMode===Gs.all,h=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},g=function(){var e=C(function*(e){if(!o.keepIsValid&&!t.disabled&&(d.isValid||f.isValid||e)){let e;t.resolver?(e=xc((yield E()).errors),_()):e=yield re({fields:r,onlyCheckValid:!0,eventType:Ws.VALID}),e!==n.isValid&&p.state.next({isValid:e})}});return function(t){return e.apply(this,arguments)}}(),_=(e,r)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?Y(n.validatingFields,e,r):Ac(n.validatingFields,e))}),p.state.next({validatingFields:n.validatingFields,isValidating:!xc(n.validatingFields)}))},v=()=>{n.dirtyFields=Fc(i,a)},y=(e,i=[],s,c,l=!0,u=!0)=>{if(c&&s&&!t.disabled){if(o.action=!0,u&&Array.isArray(J(r,e))){let t=s(J(r,e),c.argA,c.argB);l&&Y(r,e,t)}if(u&&Array.isArray(J(n.errors,e))){let t=s(J(n.errors,e),c.argA,c.argB);l&&Y(n.errors,e,t),nl(n.errors,e)}if((d.touchedFields||f.touchedFields)&&u&&Array.isArray(J(n.touchedFields,e))){let t=s(J(n.touchedFields,e),c.argA,c.argB);l&&Y(n.touchedFields,e,t)}(d.dirtyFields||f.dirtyFields)&&v(),p.state.next({name:e,isDirty:O(e,i),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Y(a,e,i)},b=(e,t)=>{Y(n.errors,e,t),n.errors=j({},n.errors),p.state.next({errors:n.errors})},x=e=>{n.errors=e,p.state.next({errors:n.errors,isValid:!1})},S=e=>{let t=Xs(e)?[e]:Zs(e),n=a,r=i;for(let e=0;e<t.length-1;e++){let i=t[e];if(n=Is(n)?n:n[i],r=Is(r)?r:r[i],n===null&&r!==null)return!0}return!1},w=(t,c,l,u)=>{let m=J(r,t);if(m){if(S(t))return;let r=q(J(a,t)),h=J(a,t,q(l)?J(i,t):l);q(h)||u&&u.defaultChecked||c?Y(a,t,c?h:Hc(m._f)):oe(t,h),o.mount&&!o.action&&(g(),r&&n.isDirty&&(d.isDirty||f.isDirty)&&(O()||(n.isDirty=!1,p.state.next(j({},n)))),e.shouldUnregister&&r&&!q(J(a,t))&&Xc(t,s)&&(o.watch=!0))}},T=(e,r,o,s,c)=>{let l=!1,u=!1,m={name:e};if(!t.disabled){if(!o||s){(d.isDirty||f.isDirty)&&(u=n.isDirty,n.isDirty=m.isDirty=O(),l=u!==m.isDirty);let t=lc(J(i,e),r);u=!!J(n.dirtyFields,e),t===n.isDirty?t?Ac(n.dirtyFields,e):Y(n.dirtyFields,e,!0):n.dirtyFields=Fc(i,a),m.dirtyFields=n.dirtyFields,l=l||(d.dirtyFields||f.dirtyFields)&&u!==!t}if(o){let t=J(n.touchedFields,e);t||(Y(n.touchedFields,e,o),m.touchedFields=n.touchedFields,l=l||(d.touchedFields||f.touchedFields)&&t!==o)}l&&c&&p.state.next(m)}return l?m:{}},ee=(e,r,i,a)=>{let o=J(n.errors,e),s=(d.isValid||f.isValid)&&Qs(r)&&n.isValid!==r;if(t.delayError&&i?(c=h(()=>b(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?Y(n.errors,e,i):Ac(n.errors,e),n.errors=j({},n.errors)),(i?!lc(o,i):o)||!xc(a)||s){let t=j(j(j({},a),s&&Qs(r)?{isValid:r}:{}),{},{errors:n.errors,name:e});n=j(j({},n),t),p.state.next(t)}},E=function(){var e=C(function*(e){return _(e,!0),yield t.resolver(a,t.context,Uc(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))});return function(t){return e.apply(this,arguments)}}(),te=function(){var e=C(function*(e){let{errors:t}=yield E(e);if(_(e),e){for(let r of e){let e=J(t,r);e?s.array.has(r)&&Rs(e)&&!Object.keys(e).some(e=>!Number.isNaN(Number(e)))?rl(n.errors,{[r]:e},r):Y(n.errors,r,e):Ac(n.errors,r)}n.errors=j({},n.errors)}else n.errors=t;return t});return function(t){return e.apply(this,arguments)}}(),ne=function(){var t=C(function*({name:t,eventType:r}){if(e.validate){let i=yield e.validate({formValues:a,formState:n,name:t,eventType:r});if(Rs(i))for(let e in i){let t=i[e];t&&ge(`${qs}.${e}`,{message:ac(t.message)?t.message:``,type:t.type||Ks.validate})}else ac(i)||!i?ge(qs,{message:i||``,type:Ks.validate}):he(qs);return i}return!0});return function(e){return t.apply(this,arguments)}}(),re=function(){var r=C(function*({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}}){if(e.validate&&(l.runRootValidation=!0,!(yield ne({name:o,eventType:c}))&&(l.valid=!1,i)))return l.valid;for(let o in r){let u=r[o];if(u){let{_f:r}=u,p=as(u,js);if(r){let o=s.array.has(r.name),c=u._f&&Jc(u._f),p=d.validatingFields||d.isValidating||f.validatingFields||f.isValidating;c&&p&&_([r.name],!0);let h=yield ol(u,s.disabled,a,m,t.shouldUseNativeValidation&&!i,o);if(c&&p&&_([r.name]),h[r.name]&&(l.valid=!1,i)||(!i&&(J(h,r.name)?o?rl(n.errors,h,r.name):Y(n.errors,r.name,h[r.name]):Ac(n.errors,r.name)),e.shouldUseNativeValidation&&h[r.name]))break}!xc(p)&&(yield re({context:l,onlyCheckValid:i,fields:p,name:o,eventType:c}))}}return l.valid});return function(e){return r.apply(this,arguments)}}(),D=()=>{for(let e of s.unMount){let t=J(r,e);t&&(t._f.refs?t._f.refs.every(e=>!Dc(e)):!Dc(t._f.ref))&&be(e)}s.unMount=new Set},O=(e,n)=>!t.disabled&&(e&&n&&Y(a,e,n),!lc(pe(),i)),ie=(e,t,n)=>oc(e,s,j({},o.mount?a:q(t)?i:ac(e)?{[e]:t}:t),n,t),ae=e=>_c(J(o.mount?a:i,e,t.shouldUnregister?J(i,e,[]):[])),oe=(e,t,n={},i=!1)=>{let o=J(r,e),s=t;if(o){let n=o._f;n&&(!n.disabled&&Y(a,e,zc(t,n)),s=Cc(n.ref)&&Is(t)?``:t,wc(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?Ps(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(s)?!!s.find(t=>t===e.value):s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):Sc(n.ref)?n.ref.value=``:(n.ref.value=s,n.ref.type||p.state.next({name:e,values:i?a:Us(a)})))}(n.shouldDirty||n.shouldTouch)&&T(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&fe(e)},se=(e,t,n,i=!1)=>{for(let a in t){if(!t.hasOwnProperty(a))return;let o=t[a],c=e+`.`+a,l=J(r,c);(s.array.has(e)||Rs(o)||l&&!l._f)&&!Fs(o)?se(c,o,n,i):oe(c,o,n,i)}},k=(e,t,i,c)=>{let l=J(r,e),u=s.array.has(e),m=c?t:Us(t),h=lc(J(a,e),m);if(h||Y(a,e,m),u)p.array.next({name:e,values:c?a:Us(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&i.shouldDirty&&(v(),p.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:O(e,m)}));else{let t=Array.isArray(m)&&!m.length||xc(m);!l||l._f||Is(m)||t?oe(e,m,i,c):se(e,m,i,c)}if(!h){let t=Xc(e,s),r=c?a:Us(a);p.state.next(j(j({},t&&n),{},{name:o.mount||t?e:void 0,values:r}))}},ce=(e,t,n={})=>k(e,t,n,!1),le=(e,t={})=>{let r=$s(e)?e(a):e;if(!lc(a,r)){a=j(j({},a),r);for(let e of s.mount)k(e,J(r,e),t,!0);p.state.next(j(j({},n),{},{name:void 0,type:void 0,values:a})),t.shouldValidate&&g()}},ue=function(){var i=C(function*(i){o.mount=!0;let l=i.target,u=l.name,h=!0,v=J(r,u),y=e=>{h=Number.isNaN(e)||Fs(e)&&isNaN(e.getTime())||lc(e,J(a,u,e))},b=Kc(t.mode),x=Kc(t.reValidateMode);if(v){let o,S,C=l.type?Hc(v._f):zs(i),w=i.type===Ws.BLUR||i.type===Ws.FOCUS_OUT,te=!Yc(v._f)&&!e.validate&&!t.resolver&&!J(n.errors,u)&&!v._f.deps||tl(w,J(n.touchedFields,u),n.isSubmitted,x,b),D=Xc(u,s,w);Y(a,u,C),w?(!l||!l.readOnly)&&(v._f.onBlur&&v._f.onBlur(i),c&&c(0)):v._f.onChange&&v._f.onChange(i);let O=T(u,C,w),ie=!xc(O)||D;if(!w&&p.state.next({name:u,type:i.type,values:Us(a)}),te)return(d.isValid||f.isValid)&&(t.mode===`onBlur`?w&&g():w||g()),ie&&p.state.next(j({name:u},D?{}:O));if(!t.resolver&&e.validate&&(yield ne({name:u,eventType:i.type})),!w&&D&&p.state.next(j({},n)),t.resolver){let{errors:e}=yield E([u]);if(_([u]),y(C),!h){!xc(O)&&p.state.next(O);return}let t=Qc(n.errors,r,u),i=Qc(e,r,t.name||u);o=i.error,u=i.name,S=xc(e)}else _([u],!0),o=(yield ol(v,s.disabled,a,m,t.shouldUseNativeValidation))[u],_([u]),y(C),h&&(o?S=!1:(d.isValid||f.isValid)&&(S=yield re({fields:r,onlyCheckValid:!0,name:u,eventType:i.type})));h&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&fe(v._f.deps),ee(u,S,o,O))}});return function(e){return i.apply(this,arguments)}}(),de=(e,t)=>{if(J(n.errors,t)&&e.focus)return e.focus(),1},fe=function(){var e=C(function*(e,i={}){let a,o,c=vc(e);if(t.resolver){let t=yield te(q(e)?e:c);a=xc(t),o=e?!c.some(e=>J(t,e)):a}else e?(o=(yield Promise.all(c.map(function(){var e=C(function*(e){let t=J(r,e);return yield re({fields:t&&t._f?{[e]:t}:t,eventType:Ws.TRIGGER})});return function(t){return e.apply(this,arguments)}}()))).every(Boolean),(o||n.isValid)&&g()):o=a=yield re({fields:r,name:e,eventType:Ws.TRIGGER});return p.state.next(j(j(j({},!ac(e)||(d.isValid||f.isValid)&&a!==n.isValid?{}:{name:e}),t.resolver||!e?{isValid:a}:{}),{},{errors:n.errors})),i.shouldFocus&&!o&&Zc(r,de,e?c:s.mount),o});return function(t){return e.apply(this,arguments)}}(),pe=(e,t)=>{let r=j({},o.mount?a:i);return t&&(r=bc(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),q(e)?r:ac(e)?J(r,e):e.map(e=>J(r,e))},me=(e,t)=>({invalid:!!J((t||n).errors,e),isDirty:!!J((t||n).dirtyFields,e),error:J((t||n).errors,e),isValidating:!!J(n.validatingFields,e),isTouched:!!J((t||n).touchedFields,e)}),he=e=>{let t=e?vc(e):void 0;t==null||t.forEach(e=>Ac(n.errors,e)),t?t.forEach(e=>{p.state.next({name:e,errors:n.errors})}):p.state.next({errors:{}})},ge=(e,t,i)=>{let a=(J(r,e,{_f:{}})._f||{}).ref,o=J(n.errors,e)||{},{ref:s,message:c,type:l}=o,u=as(o,Ms);Y(n.errors,e,j(j(j({},u),t),{},{ref:a})),p.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},_e=(e,t)=>$s(e)?p.state.subscribe({next:n=>`values`in n&&e(n.values||ie(void 0,t),n)}):ie(e,t,!0),ve=e=>p.state.subscribe({next:t=>{if(el(e.name,t.name,e.exact)&&$c(t,e.formState||d,Ae,e.reRenderRoot)){let r=j({},a);e.callback(j(j(j({values:r},n),t),{},{defaultValues:i}))}}}).unsubscribe,ye=e=>(o.mount=!0,f=j(j({},f),e.formState),ve(j(j({},e),{},{formState:j(j({},u),e.formState)}))),be=(e,o={})=>{for(let c of e?vc(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(Ac(r,c),Ac(a,c)),!o.keepError&&Ac(n.errors,c),!o.keepDirty&&Ac(n.dirtyFields,c),!o.keepTouched&&Ac(n.touchedFields,c),!o.keepIsValidating&&Ac(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&Ac(i,c);p.state.next({values:Us(a)}),p.state.next(j(j({},n),o.keepDirty?{isDirty:O()}:{})),!o.keepIsValid&&g()},xe=({disabled:e,name:t})=>{if(Qs(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&g()}},Se=(e,n={})=>{let a=J(r,e),c=Qs(n.disabled)||Qs(t.disabled),l=!s.registerName.has(e)&&a&&a._f&&!a._f.mount;return Y(r,e,j(j({},a||{}),{},{_f:j(j({},a&&a._f?a._f:{ref:{name:e}}),{},{name:e,mount:!0},n)})),s.mount.add(e),a&&!l?xe({disabled:Qs(n.disabled)?n.disabled:t.disabled,name:e}):w(e,!0,n.value),j(j(j({},c?{disabled:n.disabled||t.disabled}:{}),t.progressive?{required:!!n.required,min:Gc(n.min),max:Gc(n.max),minLength:Gc(n.minLength),maxLength:Gc(n.maxLength),pattern:Gc(n.pattern)}:{}),{},{name:e,onChange:ue,onBlur:ue,ref:c=>{if(c){s.registerName.add(e),Se(e,n),s.registerName.delete(e),a=J(r,e);let t=q(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=Ec(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;Y(r,e,{_f:j(j({},a._f),o?{refs:[...l.filter(Dc),t,...Array.isArray(J(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t})}),w(e,!1,void 0,t)}else a=J(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(Bs(s.array,e)&&o.action)&&s.unMount.add(e)}})},Ce=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Zc(r,de,s.mount),we=e=>{Qs(e)&&(p.state.next({disabled:e}),Zc(r,(t,n)=>{let i=J(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},Te=(e,i)=>function(){var o=C(function*(o){let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=Us(a);if(p.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=yield E();_(),n.errors=e,l=Us(t)}else yield re({fields:r,eventType:Ws.SUBMIT});if(s.disabled.size)for(let e of s.disabled)Ac(l,e);if(Ac(n.errors,Js),xc(n.errors)){p.state.next({errors:{}});try{yield e(l,o)}catch(e){c=e}}else i&&(yield i(j({},n.errors),o)),Ce(),setTimeout(Ce);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xc(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c});return function(e){return o.apply(this,arguments)}}(),Ee=(e,t={})=>{J(r,e)&&(q(t.defaultValue)?ce(e,Us(J(i,e))):(ce(e,t.defaultValue),Y(i,e,Us(t.defaultValue))),t.keepTouched||Ac(n.touchedFields,e),t.keepDirty||(Ac(n.dirtyFields,e),n.isDirty=t.defaultValue?O(e,Us(J(i,e))):O()),t.keepError||(Ac(n.errors,e),d.isValid&&g()),p.state.next(j({},n)))},De=(e,c={})=>{let l=e?Us(e):i,u=Us(l),f=xc(e),m=u;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(Fc(i,a))]);for(let t of Array.from(e)){let e=J(n.dirtyFields,t),r=J(a,t),i=J(m,t);e&&!q(r)?Y(m,t,r):!e&&!q(i)&&ce(t,i)}}else{if(Hs&&q(e))for(let e of s.mount){let t=J(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Cc(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)ce(e,J(m,e));else r={}}if(t.shouldUnregister){if(a=c.keepDefaultValues?Us(i):{},c.keepFieldsRef)for(let e of s.mount)Y(a,e,J(m,e))}else a=Us(m);p.array.next({values:j({},m)}),p.state.next({values:j({},m)})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!d.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!xc(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(n.errors={}),p.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:f?!1:c.keepDirty?n.isDirty:c.keepValues?O():!(!c.keepDefaultValues||lc(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:f?{}:c.keepDirtyValues?c.keepDefaultValues&&a?Fc(i,a):n.dirtyFields:c.keepDefaultValues&&e?Fc(i,e):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Oe=(e,n)=>De($s(e)?e(a):e,j(j({},t.resetOptions),n)),ke=(e,t={})=>{let n=J(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&$s(e.select)&&e.select()})}},Ae=e=>{n=j(j({},n),e)},je={control:{register:Se,unregister:be,getFieldState:me,handleSubmit:Te,setError:ge,_subscribe:ve,_runSchema:E,_updateIsValidating:_,_focusError:Ce,_getWatch:ie,_getDirty:O,_setValid:g,_setFieldArray:y,_setDisabledField:xe,_setErrors:x,_getFieldArray:ae,_reset:De,_resetDefaultValues:()=>$s(t.defaultValues)&&t.defaultValues().then(e=>{Oe(e,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:D,_disableForm:we,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t=j(j({},t),e)}},subscribe:ye,trigger:fe,register:Se,handleSubmit:Te,watch:_e,setValue:ce,setValues:le,getValues:pe,reset:Oe,resetField:Ee,resetDefaultValues:(e,t={})=>{if(i=Us(e),!t.keepDirty){let e=Fc(i,a);n.dirtyFields=e,n.isDirty=!xc(e)}t.keepIsValid||g(),p.state.next(j(j({},n),{},{defaultValues:i}))},clearErrors:he,unregister:be,setError:ge,setFocus:ke,getFieldState:me};return j(j({},je),{},{formControl:je})}function ul(e={}){let t=L.useRef(void 0),n=L.useRef(void 0),r=L.useRef(e.formControl),[i,a]=L.useState(()=>j(j({},Us(cl)),{},{isLoading:$s(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:$s(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl){if(r.current=e.formControl,e.formControl)t.current=j(j({},e.formControl),{},{formState:i}),e.defaultValues&&!$s(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let n=ll(e),{formControl:r}=n;t.current=j(j({},as(n,Ns)),{},{formState:i})}}let o=t.current.control;return o._options=e,rc(()=>{let e=o._subscribe({formState:o._proxyFormState,callback:()=>a(j(j({},o._formState),{},{defaultValues:o._defaultValues})),reRenderRoot:!0});return a(e=>j(j({},e),{},{isReady:!0})),o._formState.isReady=!0,e},[o]),L.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),L.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),L.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),L.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),L.useEffect(()=>{if(o._proxyFormState.isDirty){let e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}},[o,i.isDirty]),L.useEffect(()=>{var t;e.values&&!lc(e.values,n.current)?(o._reset(e.values,j({keepFieldsRef:!0},o._options.resetOptions)),(t=o._options.resetOptions)!=null&&t.keepIsValid||o._setValid(),n.current=e.values,a(e=>j({},e))):o._resetDefaultValues()},[o,e.values]),L.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next(j({},o._formState))),o._removeUnmounted()}),t.current.formState=L.useMemo(()=>nc(i,o),[o,i]),t.current}var dl=(e,t,n)=>{let r={};return e.forEach((e,i)=>{if(e.type===Go.NOT_EMPTY&&(r.required=n=>!t||!Zo(n)||e.message),e.type===Go.REGEX&&`regex`in e){let n=new RegExp(e.regex);r[`regex_${i}`]=r=>!t&&!r||typeof r==`string`&&n.test(r)||e.message}`passed`in e&&e.passed===!1&&(r[`remote_${i}`]=()=>n!=null&&n()?!0:e.message)}),r};I();var fl=e=>e.filter(e=>`passed`in e&&e.passed===!1),pl=e=>{if(!e)return[];if(e.types){let t=Object.values(e.types).filter(e=>typeof e==`string`&&!!e);if(t.length)return t}return typeof e.message==`string`?[e.message]:[]},ml=({name:e,validators:t,required:n,form:r})=>{let{control:i,clearErrors:a,formState:o,getFieldState:s,setError:c}=r,l=dl(t,n,()=>s(e,o).isDirty),u=()=>{let n=fl(t);if(!n.length)return;let r=n.reduce((e,t,n)=>(e[`remote_${n}`]=t.message,e),{});c(e,{type:`remote`,message:n[0].message,types:r})};return pn(()=>{u()},[t,e,c]),{control:i,validate:l,clearFieldErrors:()=>{a(e)},getErrorMessages:pl}},hl=({children:e,backgroundColor:t,cornerRadius:n=0,isError:r,isRequired:i,validationBorderColor:a,validationBorderWidth:o})=>U(`div`,{style:j({position:`relative`,flexShrink:0,width:`100%`,fontWeight:300,lineHeight:`140%`,backgroundColor:G(t)||`transparent`,borderRadius:n,padding:`16px`,boxSizing:`border-box`,height:`auto`},r&&j(j({},G(a)&&{borderColor:a,borderStyle:`solid`}),o&&{borderWidth:o})),children:[i&&U(`span`,{style:{color:G(a),position:`absolute`,insetInlineStart:`6px`,top:`18px`},children:`*`}),e]}),gl=({validationErrorsTypes:e,title:t})=>e?U(`div`,{style:{width:`100%`,fontSize:12},children:Object.entries(e).map(([e,n])=>U(K,j(j({},t),{},{text:n}),e))}):null,_l=e=>!e||e===_o.FREE_TEXT?{type:`text`}:e===_o.EMAIL?{type:`email`}:e===_o.NUMBER?{type:`number`}:e===_o.SECURE?{type:`password`}:{type:`text`},vl=e=>e===_o.EMAIL?{type:`text`,inputMode:`email`,autoComplete:`email`}:e===_o.NUMBER?{type:`text`,inputMode:`decimal`}:_l(e),yl=({layout:e,dataSourceQuestion:t,register:n,validate:r,clearFieldErrors:i,shouldDismissKeyboardOnEnter:a=!1})=>{var o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S;let C=String(t.id),w=n(C,{required:!!t.required,validate:r});return U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`},children:[U(K,j(j({},e.title),{},{text:t.text,htmlFor:C})),U(`input`,j(j(j(j({},w),{},{onChange:e=>{w.onChange(e),i()},id:C},a?vl((o=e.textField)==null?void 0:o.inputType):_l((s=e.textField)==null?void 0:s.inputType)),a&&{enterKeyHint:`done`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.currentTarget.blur())}}),{},{style:{fontFamily:(c=e==null||(l=e.textField)==null?void 0:l.fontName)==null?`sans-serif`:c,fontSize:(u=e==null||(d=e.textField)==null?void 0:d.fontSize)==null?15:u,color:(f=G(e==null||(p=e.textField)==null?void 0:p.fontColor))==null?`#000000`:f,height:`42px`,borderWidth:(m=e==null||(h=e.textField)==null?void 0:h.borderWidth)==null?1:m,borderColor:(g=G(e==null||(_=e.textField)==null?void 0:_.borderColor))==null?`#d9d9d9`:g,borderStyle:`solid`,borderRadius:(v=e==null||(y=e.textField)==null?void 0:y.cornerRadius)==null?8:v,padding:`11px`,boxSizing:`border-box`,backgroundColor:(b=G(e==null||(x=e.textField)==null?void 0:x.backgroundColor))==null?`#FFFFFF`:b,outlineColor:Vo},placeholder:(S=t.placeholder)==null?``:S,"data-id":C}))]})},bl=({layout:e,dataSourceQuestion:t,register:n,validate:r,clearFieldErrors:i})=>{var a,o,s,c,l,u,d,f,p,m,h,g,_;let v=String(t.id),y=n(v,{required:!!t.required,validate:r});return U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`},children:[U(K,j(j({},e.title),{},{text:t.text,htmlFor:v})),U(`textarea`,j(j({},y),{},{onChange:e=>{y.onChange(e),i()},id:v,placeholder:(a=t.placeholder)==null?``:a,onInput:e=>{e.currentTarget.style.height=`auto`,e.currentTarget.style.height=`${e.currentTarget.scrollHeight-15}px`},"data-id":v,style:{fontFamily:`sans-serif`,fontSize:(o=e==null||(s=e.textField)==null?void 0:s.fontSize)==null?15:o,color:(c=G(e==null||(l=e.textField)==null?void 0:l.fontColor))==null?`#000000`:c,resize:`none`,overflow:`hidden`,height:`42px`,minHeight:`42px`,borderWidth:(u=e==null||(d=e.textField)==null?void 0:d.borderWidth)==null?1:u,borderColor:(f=G(e==null||(p=e.textField)==null?void 0:p.borderColor))==null?`#d9d9d9`:f,borderStyle:`solid`,borderRadius:(m=e==null||(h=e.textField)==null?void 0:h.cornerRadius)==null?8:m,padding:`11px`,boxSizing:`border-box`,backgroundColor:(g=G(e==null||(_=e.textField)==null?void 0:_.backgroundColor))==null?`#FFFFFF`:g,outlineColor:Vo}}))]})};I();var xl=()=>{let[e,t]=N(!1);return pn(()=>{let e=()=>t(!0),n=()=>t(!1);return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,n)}},[]),e};I();var Sl=({option:e,layout:t,dataSourceQuestion:n,register:r,watch:i,validate:a,clearFieldErrors:o})=>{let[s,c]=N(!1),l=xl(),u=String(n.id),d=i(u)===String(e.id),f=r(u,{required:!!n.required,validate:a}),p=e=>{f.onChange(e),o()},m=t.option,h=t.optionSelected,g={backgroundColor:G(h==null?void 0:h.backgroundColor),borderRadius:h.cornerRadius},_={backgroundColor:G(m==null?void 0:m.backgroundColor),borderRadius:m.cornerRadius},v=s&&l?{filter:`drop-shadow(0 0 1px ${Vo})`}:{};return U(`div`,{children:U(`label`,{style:j({display:`flex`,alignItems:`center`,alignContent:`center`,gap:8,cursor:`pointer`},d?g:_),children:[U(`div`,{style:j({display:`flex`,alignItems:`center`,alignContent:`center`,flexShrink:0},v),children:U(ss,j({},d?h.image:m.image))}),U(K,j(j({},d?h.title:m.title),{},{text:e.text})),U(`input`,j(j({style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`}},f),{},{onChange:p,value:e.id,type:`radio`,onFocus:()=>c(!0),onBlur:()=>c(!1)}))]})},e.id)},Cl=({layout:e,register:t,watch:n,dataSourceQuestion:r,validate:i,clearFieldErrors:a})=>U(`div`,{style:{boxSizing:`border-box`},children:U(`fieldset`,{style:{margin:0,padding:0,border:`none`,display:`flex`,flexDirection:`column`,gap:`16px`},children:[e.title&&U(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:U(K,j(j({},e.title),{},{text:r.text}))}),r.options.map(o=>U(Sl,{register:t,watch:n,layout:e,option:o,dataSourceQuestion:r,validate:i,clearFieldErrors:a},o.id))]})});I();var wl=({option:e,layout:t,dataSourceQuestion:n,register:r,watch:i,validate:a,clearFieldErrors:o})=>{let[s,c]=N(!1),l=xl(),u=String(n.id),d=i(u)===String(e.id),f=r(u,{required:!!n.required,validate:a}),p=e=>{f.onChange(e),o()},m=t.option,h=t.optionSelected,g={borderRadius:m==null?void 0:m.cornerRadius,background:G(m==null?void 0:m.backgroundColor),borderColor:G(m==null?void 0:m.borderColor),borderWidth:m==null?void 0:m.borderWidth},_={borderRadius:h==null?void 0:h.cornerRadius,background:G(h==null?void 0:h.backgroundColor),borderColor:G(h==null?void 0:h.borderColor),borderWidth:h==null?void 0:h.borderWidth},v=s&&l?{outline:`2px solid ${Vo}`}:{};return U(`div`,{style:{display:`flex`,flexGrow:1},children:U(`label`,{style:j(j({width:`100%`,padding:`8px 16px`,cursor:`pointer`,borderStyle:`solid`,position:`relative`},d?_:g),v),children:[U(`input`,j(j({style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`}},f),{},{onChange:p,value:e.id,type:`radio`,onFocus:()=>c(!0),onBlur:()=>c(!1)})),U(K,j(j({},d?h.title:m.title),{},{text:e.text}))]})},e.id)},Tl=({layout:e,watch:t,register:n,dataSourceQuestion:r,validate:i,clearFieldErrors:a})=>U(`div`,{style:{boxSizing:`border-box`},children:U(`fieldset`,{style:{margin:0,padding:0,border:`none`},children:[e.title&&U(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:U(K,j(j({},e.title),{},{text:r.text}))}),U(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:r.options.map(o=>U(wl,{register:n,watch:t,layout:e,option:o,dataSourceQuestion:r,validate:i,clearFieldErrors:a},o.id))})]})});I();var El=({isOpen:e,image:t})=>U(`div`,{"data-ui":`gui-custom-select-chevron`,style:{width:`16px`,height:`16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,transform:e?`rotate(180deg)`:`none`,transformOrigin:`50% 50%`,transition:`.2s`,flexShrink:0},children:t?U(ss,j({},t)):U(ss,{imageId:`chevronDown`})}),Dl=({isChosen:e,option:t,onOptionClickCallback:n,isHovered:r,onHover:i,onHoverEnd:a})=>{let o=e?t.layoutSelected.image:t.layout.image;return U(`div`,{style:{padding:`5px 8px`,background:((e,n)=>{var r,i,a,o,s,c,l,u;if(!e&&!n)return(r=G((i=t.layout)==null?void 0:i.backgroundColor))==null?`transparent`:r;if(!e&&n)return(a=G((o=t.layoutSelected)==null?void 0:o.backgroundColor))==null?`transparent`:a;if(e&&!n)return(s=G((c=t.layout)==null?void 0:c.highlightColor))==null?`#F4F4F4`:s;if(e&&n)return(l=G((u=t.layoutSelected)==null?void 0:u.highlightColor))==null?`#F4F4F4`:l})(r,e),fontSize:13,display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:8,borderRadius:4,cursor:`pointer`},"data-select-id":t.value,onClick:n(t),onMouseEnter:i,onMouseLeave:a,children:[U(K,j(j({},t.layout.title),{},{text:t.label})),U(`div`,{style:{display:`flex`,flexShrink:0},children:U(ss,j({},o))})]},t.value)},Ol=({name:e,options:t,isMulti:n=!1,isClearable:r=!1,value:i,onChange:a,placeholder:o,closeMenuOnSelect:s=!0,onBlur:c,parentElementRef:l,controlLayout:u,pickerLayout:d})=>{var f,p,m,h,g,_,v,y;let[b,x]=N(!1),[S,C]=N(i),[w,T]=N(`down`),[ee,E]=N(null),te=hn(null),ne=hn(null);mn(()=>{var e,t,n;if(!b)return;let r=(e=te.current)==null?void 0:e.getBoundingClientRect(),i=(t=ne.current)==null?void 0:t.getBoundingClientRect(),a=(n=l.current)==null?void 0:n.getBoundingClientRect();if(!r||!i||!a)return;let o=r.bottom+i.height<a.bottom;T(o?`down`:`up`)},[b]),pn(()=>{a(S)},[S]);let re=e=>t=>{var r,i;let a=t.target;a!=null&&(r=a.closest)!=null&&r.call(a,`a`)||(t.stopPropagation(),(t.type===`touchend`||((i=t.nativeEvent)==null?void 0:i.pointerType)===`touch`)&&E(null),s&&x(!1),C(t=>n?t.some(t=>t.value===e.value)?t.filter(t=>t.value!==e.value):[...t,e]:[e]))},D=()=>{c&&c(),x(!1)},O=e=>{var t;let n=e.currentTarget,r=(t=e.relatedTarget)==null?null:t;r&&n.contains(r)||D()},ie=e=>t=>{t.stopPropagation(),C(t=>t.filter(t=>t.value!==e.value))},ae=e=>{e.stopPropagation(),C([])},oe=(f=G(u==null?void 0:u.borderColor))==null?`#D9D9D9`:f,se=(p=G(u==null?void 0:u.highlightBorderColor))==null?`#7E57C5`:p;return U(`div`,{"data-ui":`gui-custom-select`,ref:te,children:U(`div`,{"data-ui":`gui-select-name-`+e,style:{backgroundColor:G(u==null?void 0:u.backgroundColor),borderStyle:`solid`,borderColor:b?se:oe,borderWidth:(m=u==null?void 0:u.borderWidth)==null?1:m,borderRadius:(h=u==null?void 0:u.cornerRadius)==null?8:h,minHeight:`41px`,position:`relative`,zIndex:`auto`,paddingTop:`8px`,paddingBottom:`8px`,paddingInlineStart:`8px`,paddingInlineEnd:`11px`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`end`,gap:10},tabIndex:0,onBlur:O,onClick:()=>x(!b),children:[U(`div`,{"data-ui":`gui-custom-select-multi-choose-container`,style:{display:`flex`,gap:8,alignItems:`flex-start`,alignContent:`center`,flexWrap:`wrap`,width:n?`calc(100% - 63px)`:`100%`},children:[!S.length&&U(`span`,{style:{fontSize:13,color:`#8C8C8C`},children:o}),S.map(e=>{if(n){var t,r,i,a;let n=u==null?void 0:u.chip;return U(`div`,{style:{padding:`0px 5px`,display:`flex`,gap:8,backgroundColor:(t=G(n==null?void 0:n.backgroundColor))==null?`#F2F2F2`:t,borderRadius:(r=n==null?void 0:n.cornerRadius)==null?4:r,userSelect:`none`,alignItems:`center`},children:[U(K,j(j({},n==null?void 0:n.title),{},{fontSize:(i=n==null||(a=n.title)==null?void 0:a.fontSize)==null?13:i,text:e.label})),U(`div`,{style:{display:`flex`,alignItems:`center`,cursor:`pointer`,width:`16px`,height:`16px`},onClick:ie(e),children:n!=null&&n.removeImage?U(ss,j({},n.removeImage)):U(ss,{imageId:`cross`})})]},e.value)}{var o;let t=u==null?void 0:u.title;return U(`div`,{style:{display:`flex`,userSelect:`none`},children:U(K,j(j({},t),{},{fontSize:(o=t==null?void 0:t.fontSize)==null?13:o,text:e.label}))},e.value)}})]}),r&&S.length?U(`div`,{style:{display:`flex`,alignItems:`center`,cursor:`pointer`,width:`16px`,height:`16px`,zIndex:1},onClick:ae,children:u!=null&&u.clearButton?U(ss,j({},u.clearButton)):U(ss,{imageId:`cross`})}):null,r?U(`div`,{style:{width:`1px`,alignSelf:`stretch`,backgroundColor:`#D9D9D9`}}):null,U(El,{isOpen:b,image:u==null?void 0:u.expandButton}),b&&U(`div`,{"data-ui":`gui-custom-select-dropdown-menu`,ref:ne,style:j(j({position:`absolute`},w===`down`?{top:`calc(100% + 1px)`}:{bottom:`calc(100% + 1px)`}),{},{insetInline:0,border:`1px solid #e8e8e8`,width:`100%`,backgroundColor:(g=G(d==null?void 0:d.backgroundColor))==null?`#ffffff`:g,borderRadius:(_=d==null?void 0:d.cornerRadius)==null?8:_,borderStyle:`solid`,borderColor:(v=G(d==null?void 0:d.borderColor))==null?`#D9D9D9`:v,borderWidth:(y=d==null?void 0:d.borderWidth)==null?1:y,maxHeight:`500px`,overflow:`auto`,zIndex:2,boxShadow:`0 3px 15px rgba(0,0,0,.2)`,padding:`8px`,display:`flex`,flexDirection:`column`,gap:`2px`,cursor:`default`}),onClick:e=>e.stopPropagation(),children:t.map(e=>U(Dl,{isChosen:S.some(t=>t.value===e.value),option:e,onOptionClickCallback:re,isHovered:ee===e.value,onHover:()=>E(e.value),onHoverEnd:()=>E(null)},e.label))})]})})},kl=({control:e,layout:t,dataSourceQuestion:n,parentElementRef:r,validate:i,clearFieldErrors:a})=>{let o=n.options.map(e=>({value:String(e.id),label:e.text,layout:t.option,layoutSelected:t.optionSelected})),s=String(n.id);return U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`,boxSizing:`border-box`},children:[t.title&&U(K,j(j({},t.title),{},{text:n.text,htmlFor:s})),U(fc,{name:s,control:e,rules:{required:!!n.required,validate:i},render:({field:e})=>{let i=o.find(t=>t.value===e.value);return U(Ol,{options:o,placeholder:n.placeholder,closeMenuOnSelect:!0,name:e.name,value:i?[i]:[],onChange:t=>{let n=t&&Array.isArray(t)&&t.length?t[0].value:null;e.onChange(n),a()},parentElementRef:r,isMulti:!1,isClearable:!1,controlLayout:t.dropdownControl,pickerLayout:t.dropdownPicker})}})]})},Al=({control:e,layout:t,dataSourceQuestion:n,parentElementRef:r,validate:i,clearFieldErrors:a})=>{let o=n.options.map(e=>({value:String(e.id),label:e.text,layout:t.option,layoutSelected:t.optionSelected})),s=String(n.id);return U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`,boxSizing:`border-box`},children:[t.title&&U(K,j(j({},t.title),{},{text:n.text,htmlFor:s})),U(fc,{name:s,control:e,rules:{required:!!n.required,validate:i},render:({field:e})=>{let i=o.filter(t=>{var n;return(n=e.value)==null?void 0:n.includes(t.value)});return U(Ol,{name:s,options:o,placeholder:n.placeholder,closeMenuOnSelect:!1,value:i,onChange:t=>{let n=t.map(e=>e.value);e.onChange(n),a()},parentElementRef:r,isMulti:!0,isClearable:!0,controlLayout:t.dropdownControl,pickerLayout:t.dropdownPicker})}})]})};I();var jl=({option:e,layout:t,dataSourceQuestion:n,isChosen:r,onToggle:i})=>{let[a,o]=N(!1),s=xl(),c=String(n.id),l=t.option,u=t.optionSelected,d={backgroundColor:G(u==null?void 0:u.backgroundColor),borderRadius:u.cornerRadius},f={backgroundColor:G(l==null?void 0:l.backgroundColor),borderRadius:l.cornerRadius},p=a&&s?{filter:`drop-shadow(0 0 1px ${Vo})`}:{};return U(`div`,{children:U(`label`,{style:j({display:`flex`,alignItems:`center`,alignContent:`center`,gap:8,cursor:`pointer`},r?d:f),children:[U(`div`,{style:j({display:`flex`,alignItems:`center`,alignContent:`center`,flexShrink:0},p),children:U(ss,j({},r?u.image:l.image))}),U(K,j(j({},r?u.title:l.title),{},{text:e.text})),U(`input`,{style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`},name:c,value:e.id,checked:r,type:`checkbox`,onChange:i,onFocus:()=>o(!0),onBlur:()=>o(!1)})]})},e.id)},Ml=({control:e,layout:t,dataSourceQuestion:n,validate:r,clearFieldErrors:i})=>{let a=String(n.id);return U(`div`,{style:{boxSizing:`border-box`},children:U(`fieldset`,{style:{margin:0,padding:0,border:`none`,display:`flex`,flexDirection:`column`,gap:`16px`},children:[t.title&&U(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:U(K,j(j({},t.title),{},{text:n.text}))}),U(fc,{name:a,control:e,rules:{required:!!n.required,validate:r},render:({field:e})=>{var r;let a=(r=e.value)==null?[]:r;return U(vt,{children:n.options.map(r=>{let o=String(r.id),s=a.includes(o);return U(jl,{dataSourceQuestion:n,layout:t,option:r,isChosen:s,onToggle:()=>{let t=s?a.filter(e=>e!==o):[...a,o];e.onChange(t),i()}},r.id)})})}})]})})};I();var Nl=({option:e,layout:t,dataSourceQuestion:n,isChosen:r,onToggle:i})=>{let[a,o]=N(!1),s=xl(),c=String(n.id),l=t.option,u=t.optionSelected,d={borderRadius:l==null?void 0:l.cornerRadius,background:G(l==null?void 0:l.backgroundColor),borderColor:G(l==null?void 0:l.borderColor),borderWidth:l==null?void 0:l.borderWidth},f={borderRadius:u==null?void 0:u.cornerRadius,background:G(u==null?void 0:u.backgroundColor),borderColor:G(u==null?void 0:u.borderColor),borderWidth:u==null?void 0:u.borderWidth},p=a&&s?{outline:`2px solid ${Vo}`}:{};return U(`div`,{style:{display:`flex`,flexGrow:1},children:U(`label`,{style:j(j({width:`100%`,padding:`8px 16px`,cursor:`pointer`,borderStyle:`solid`,position:`relative`},r?f:d),p),children:[U(`input`,{style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`},name:c,value:e.id,checked:r,type:`checkbox`,onChange:i,onFocus:()=>o(!0),onBlur:()=>o(!1)}),U(K,j(j({},r?u.title:l.title),{},{text:e.text}))]})})},Pl=({control:e,layout:t,dataSourceQuestion:n,validate:r,clearFieldErrors:i})=>{let a=String(n.id);return U(`div`,{style:{boxSizing:`border-box`},children:U(`fieldset`,{style:{margin:0,padding:0,border:`none`},children:[t.title&&U(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:U(K,j(j({},t.title),{},{text:n.text}))}),U(fc,{name:a,control:e,rules:{required:!!n.required,validate:r},render:({field:e})=>{var r;let a=(r=e.value)==null?[]:r;return U(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:n.options.map(r=>{let o=String(r.id),s=a.includes(o);return U(Nl,{dataSourceQuestion:n,layout:t,option:r,isChosen:s,onToggle:()=>{let t=s?a.filter(e=>e!==o):[...a,o];e.onChange(t),i()}},r.id)})})}})]})})};I();var Fl=({layout:e,dataSourceQuestion:t,parentElementRef:n,shouldClearErrorsOnChange:r=!0,shouldDismissKeyboardOnEnter:i=!0})=>{var a;let o=hn(null),s=n==null?o:n,c=mc(),{register:l,watch:u,control:d,formState:f}=c,{errors:p}=f,m=String(t.id),h=m in p&&((a=p[m])==null?void 0:a.types),{validate:g,clearFieldErrors:_}=ml({name:m,validators:t.validators,required:!!t.required,form:c}),v=r?_:()=>{};return U(`div`,{ref:o,children:[U(hl,{backgroundColor:e.backgroundColor,cornerRadius:e.cornerRadius,isError:!!h,isRequired:t.required,validationBorderColor:e.validationBorderColor,validationBorderWidth:e.validationBorderWidth,children:[e.displayType===go.TEXT_EXPANDABLE&&U(bl,{layout:e,dataSourceQuestion:t,register:l,validate:g,clearFieldErrors:v}),e.displayType===go.TEXT_SINGLE_LINE&&U(yl,{layout:e,dataSourceQuestion:t,register:l,validate:g,clearFieldErrors:v,shouldDismissKeyboardOnEnter:i}),e.displayType===go.SELECTOR_OPTIONS&&U(Cl,{layout:e,dataSourceQuestion:t,watch:u,register:l,validate:g,clearFieldErrors:v}),e.displayType===go.SELECTOR_BUTTONS&&U(Tl,{layout:e,dataSourceQuestion:t,watch:u,register:l,validate:g,clearFieldErrors:v}),e.displayType===go.SELECTOR_DROPDOWN&&U(kl,{control:d,layout:e,dataSourceQuestion:t,parentElementRef:s,validate:g,clearFieldErrors:v}),e.displayType===go.MULTI_SELECTOR_DROPDOWN&&U(Al,{control:d,layout:e,dataSourceQuestion:t,parentElementRef:s,validate:g,clearFieldErrors:v}),e.displayType===go.MULTI_SELECTOR_OPTIONS&&U(Ml,{control:d,layout:e,dataSourceQuestion:t,validate:g,clearFieldErrors:v}),e.displayType===go.MULTI_SELECTOR_BUTTONS&&U(Pl,{control:d,layout:e,dataSourceQuestion:t,validate:g,clearFieldErrors:v})]}),h&&U(gl,{validationErrorsTypes:h,title:e.validationMessage})]})},Il=(e,t)=>t.find(t=>{var n;return(n=t.questionIds)==null?void 0:n.some(t=>t===e)}),Ll=(e,t)=>t.find(t=>!t.questionIds&&t.answerType===e),Rl=(e,t,n)=>n?Il(String(e.id),t)||Ll(e.answerType,t):t.find(t=>t.answerType===e.answerType),zl,Bl=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,Uo);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};zl=Bl,zl.MODULE=Ho,zl.ERROR_ENUM_NAME=`GuiModuleError`,zl.SHORT_CODE=`GM`,I();var Vl=({header:e,title:t,buttons:n,footer:r,questions:i,dataSource:a,properties:o,backgroundColor:s,backgroundImage:c})=>{var l;let u=hn(null),d=wa.FORM,{perform:f}=ao();if(!a||(a==null?void 0:a.questions.length)===0)return f(new Bl({errorCode:Uo.DECODING_FAILED,message:`No dataSource or no data for questions in the dataSource`})),null;if(!(i!=null&&i.itemTypes)||Array.isArray(i==null?void 0:i.itemTypes)&&(i==null||(l=i.itemTypes)==null?void 0:l.length)===0)return f(new Bl({errorCode:Uo.DECODING_FAILED,message:`No questions in the itemTypes field or itemTypes is not an array`})),null;let p=ul({mode:`onSubmit`,reValidateMode:`onSubmit`,criteriaMode:`all`,defaultValues:o?Qo(a.questions,o):{}}),{handleSubmit:m,reset:h}=p;return U(_s,{header:e,footer:r,backgroundColor:s,backgroundImage:c,children:U(hc,j(j({},p),{},{children:U(`form`,{onSubmit:m(e=>{f(Xo(e),d),h()}),style:{height:`100%`,fontFamily:`sans-serif`,display:`flex`,flexDirection:`column`,gap:`15px`},noValidate:!0,children:[U(`div`,{style:{flex:`1 1 100%`,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`10px`,height:`100%`,width:`100%`,overflow:`auto`,position:`relative`,backgroundColor:G(i==null?void 0:i.backgroundColor)||`transparent`},ref:u,children:[t&&U(`div`,{style:{lineHeight:`39.2px`,width:`100%`},children:U(K,j({},t))}),U(`div`,{"data-ui":`gui-questions`,part:`gui-questions`,style:{width:`100%`,display:`flex`,gap:`10px`,flexDirection:`column`},children:a.questions.map(e=>{let t=Rl(e,i.itemTypes,a.static);if(t)return U(Fl,{layout:t,dataSourceQuestion:e,parentElementRef:u,shouldClearErrorsOnChange:!1,shouldDismissKeyboardOnEnter:!1},e.id);{let e=new Bl({errorCode:Uo.DECODING_FAILED,message:`The question template has not been found`});f(e)}})})]}),!!(n!=null&&n.length)&&U(`div`,{style:{display:`flex`,width:`100%`,flexGrow:0,flexShrink:0,justifyContent:`center`,alignItems:`flex-end`,padding:`2px`},children:n.map((e,t)=>U(ms,j({dataTestId:`question-button`},e),t))})]})}))})},Hl={display:`none`},Ul={display:`flex`,alignItems:`center`,justifyContent:`center`,width:`250px`,height:`50px`,border:0,borderRadius:`16px`,backgroundColor:`#7e57c5`,cursor:`pointer`},Wl={position:`relative`,display:`flex`,flexGrow:1,flexDirection:`column`,alignItems:`center`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`};I();var Gl=({header:e,footer:t,buttons:n,backgroundColor:r,backgroundImage:i,selectionLimit:a})=>{var o;let{perform:s}=ao(),c=hn(null),l=typeof a==`number`&&(a===0||a>1),u=function(){var e=C(function*(e){var t;let n=Array.from((t=e.currentTarget.files)==null?[]:t);if(n.length)try{let e=(yield Promise.allSettled(n.map(function(){var e=C(function*(e){return{content:yield ts(e),metadata:{name:e.name,type:e.type,size:e.size,lastModified:e.lastModified}}});return function(t){return e.apply(this,arguments)}}()))).filter(e=>e.status===`fulfilled`).map(e=>e.value);s({cancel:!1,permissionDenied:!1,files:e})}catch(e){console.error(`Error: `,e)}});return function(t){return e.apply(this,arguments)}}();return U(_s,{header:e,footer:t,backgroundColor:r,backgroundImage:i,children:U(vt,{children:U(`div`,{style:j(j({},Wl),{},{justifyContent:`center`}),children:[U(`input`,j(j({style:Hl,ref:c,type:`file`,accept:`image/*`},l?{multiple:!0}:{}),{},{onInput:u})),U(`button`,{style:Ul,onClick:()=>{var e;(e=c.current)==null||e.showPicker()},children:U(ss,{imageId:n==null||(o=n[0])==null||(o=o.image)==null?void 0:o.imageId})})]})})})},Kl={display:`none`},ql={display:`flex`,alignItems:`center`,justifyContent:`center`,width:`250px`,height:`50px`,border:0,borderRadius:`16px`,background:`#7e57c5`,cursor:`pointer`},Jl={position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`};I();var Yl=({header:e,footer:t,backgroundColor:n,backgroundImage:r,buttons:i,selectionLimit:a})=>{var o;let{perform:s}=ao(),c=hn(null),l=typeof a==`number`&&(a===0||a>1),u=function(){var e=C(function*(e){var t;let n=Array.from((t=e.currentTarget.files)==null?[]:t);if(n.length)try{let e=(yield Promise.allSettled(n.map(function(){var e=C(function*(e){return{content:yield ts(e),metadata:{name:e.name,type:e.type,size:e.size,lastModified:e.lastModified}}});return function(t){return e.apply(this,arguments)}}()))).filter(e=>e.status===`fulfilled`).map(e=>e.value);s({cancel:!1,permissionDenied:!1,files:e})}catch(e){console.error(`Error: `,e)}});return function(t){return e.apply(this,arguments)}}(),d=function(){var e=C(function*(){var e;(e=c.current)==null||e.showPicker()});return function(){return e.apply(this,arguments)}}();return pn(()=>{C(function*(){if(ni.isDesktop)return;let e=yield ns();(e===`denied`||e===`error`)&&s({cancel:!1,permissionDenied:!0,files:[]})})()},[]),U(_s,{header:e,footer:t,backgroundColor:n,backgroundImage:r,children:U(vt,{children:U(`div`,{style:j(j({},Jl),{},{justifyContent:`center`}),children:[U(`input`,j(j({style:Kl,ref:c,type:`file`,accept:`image/*`,capture:`user`},l?{multiple:!0}:{}),{},{onInput:u})),U(`button`,{style:ql,onClick:d,children:U(ss,{imageId:i==null||(o=i[0])==null||(o=o.image)==null?void 0:o.imageId})})]})})})},Xl=function(){var e=C(function*(){try{var e;let t=yield navigator.permissions.query({name:`geolocation`});return(e=t==null?void 0:t.state)==null?`unknown`:e}catch(e){return`unknown`}});return function(){return e.apply(this,arguments)}}(),Zl=function(){var e=C(function*(){try{return yield navigator.permissions.query({name:`geolocation`})}catch(e){return null}});return function(){return e.apply(this,arguments)}}(),Ql=function(){var e=C(function*(e){return new Promise(t=>{if(!navigator.geolocation)return t({location:{locationState:`location_request_failed`,lat:null,lon:null,error:`Requesting location failed`}});navigator.geolocation.getCurrentPosition(e=>t({location:{locationState:`ok`,lat:e.coords.latitude,lon:e.coords.longitude,error:null}}),e=>{e.code===1?t({location:{locationState:`application_location_restricted`,lat:null,lon:null,error:`Application location services restricted or unavailable`}}):t({location:{locationState:`location_request_failed`,lat:null,lon:null,error:`Requesting location failed`}})},e)})});return function(t){return e.apply(this,arguments)}}(),$l=(e,t)=>typeof t==`number`&&t>0?t*1e3:e;I();var eu=({askEveryTime:e,getLocationTimeout:t,locationAccuracy:n})=>{var r;let i={[vo.HIGH]:{enableHighAccuracy:!0,timeout:$l(15e3,t),maximumAge:0},[vo.BALANCED]:{enableHighAccuracy:!1,timeout:$l(12e3,t),maximumAge:3e4},[vo.LOW]:{enableHighAccuracy:!1,timeout:$l(8e3,t),maximumAge:6e4},[vo.PASSIVE]:{enableHighAccuracy:!1,timeout:$l(5e3,t),maximumAge:3e5}}[n||vo.PASSIVE],a=wa.FORM,{perform:o}=ao(),{setIsProcessingCallback:s}=oo(),[c,l]=N(!1),{devSettings:u}=io(),d=!!(u!=null&&(r=u.popups)!=null&&(r=r.system_restricted)!=null&&r.isOpen);pn(()=>{u&&l(d)},[d,u]);let f=()=>{var e;u!=null&&(e=u.popups)!=null&&e.system_restricted||l(!0)},p=()=>{var e;u!=null&&(e=u.popups)!=null&&e.system_restricted||l(!1)};mn(()=>{ni.isSafari||e||s==null||s(!0)},[]),pn(()=>{if(ni.isSafari||e)return;let t=!0;return C(function*(){if((yield Xl())!==`granted`){s==null||s(!1);return}let e=yield Ql(i);t&&o(e,a)})(),()=>{ni.isSafari||e||(t=!1)}},[]),pn(()=>{if(ni.isSafari)return;let e=!0,t=null;return C(function*(){let n=yield Zl();n&&(t=n,n.onchange=C(function*(){if(n.state===`denied`&&(s==null||s(!0),o({location:{locationState:`application_location_restricted`,lat:null,lon:null,error:`Application location services restricted or unavailable`}},a)),n.state===`granted`){s==null||s(!0);let t=yield Ql(i);if(!e)return;o(t,a)}}))})(),()=>{ni.isSafari||(e=!1,t&&(t.onchange=null))}},[]);let m=function(){var e=C(function*(e){e.preventDefault();let t=yield Xl();if(t===`denied`)f();else if(t===`prompt`&&(yield Ql()),t===`granted`){let e=yield Ql(i);o(e,a)}});return function(t){return e.apply(this,arguments)}}(),h=function(){var e=C(function*(e){if(e.preventDefault(),(yield Xl())===`denied`){f();return}s==null||s(!0);let t=yield Ql(i);o(t,a)});return function(t){return e.apply(this,arguments)}}();return{isPopupOpen:c,handleAllowButtonClick:ni.isSafari?h:m,closePopup:p}},tu={height:`100%`,fontFamily:`sans-serif`,display:`flex`,flexDirection:`column`,gap:`15px`},nu={flex:`1 1 100%`,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`10px`,height:`100%`,width:`100%`,overflow:`auto`,position:`relative`},ru={position:`absolute`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,inset:0,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,background:`rgba(0,0,0,0.2)`,zIndex:1e3,pointerEvents:`auto`,cursor:`default`},iu={width:`100%`,height:`auto`,marginBottom:`32px`,aspectRatio:`1.61`},au={marginBottom:20,lineHeight:`39.2px`,width:`100%`},ou={lineHeight:`28px`,fontWeight:`400`,width:`100%`},su={position:`relative`,padding:`32px 24px 0`,border:`1px solid rgba(0, 0, 0, 0.06)`,width:`min(400px, calc(100vw - 32px))`},cu={marginBottom:`10px`,fontWeight:500,display:`-webkit-box`,"-webkit-box-orient":`vertical`,"-webkit-line-clamp":2,overflow:`hidden`,textOverflow:`ellipsis`,lineClamp:2},lu={marginBottom:`84px`,fontWeight:400},uu={height:`100%`,overflow:`scroll`,maxHeight:`calc(100dvh - 190px)`},du={position:`absolute`,bottom:0,insetInline:0,padding:`24px`,width:`100%`},fu=({title:e,header:t,footer:n,image:r,description:i,buttons:a,backgroundColor:o,backgroundImage:s,popups:c,askEveryTime:l,getLocationTimeout:u,locationAccuracy:d})=>{let f=c==null?void 0:c.find(e=>e.reason===Ko.SYSTEM_RESTRICTED),{isPopupOpen:p,handleAllowButtonClick:m,closePopup:h}=eu({askEveryTime:l,getLocationTimeout:u,locationAccuracy:d});return U(_s,{header:t,footer:n,backgroundColor:o,backgroundImage:s,children:[U(`div`,{style:tu,children:[U(`div`,{part:`gui-geolocation-screen-container`,"data-ui":`gui-geolocation-screen-container`,id:`geolocation-screen-container`,style:nu,children:[r&&U(`div`,{style:iu,children:U(ss,j({},r))}),e&&U(`div`,{style:au,children:U(K,j({},e))}),i&&U(`div`,{style:ou,children:U(vs,j({},i))})]}),!!(a!=null&&a.length)&&U(`div`,{style:{display:`flex`,flexDirection:`column`},children:a.map((e,t)=>U(`div`,{style:{padding:`5px`},children:U(ms,j(j({dataTestId:`question-button`},e),e.type===`FORM`&&{onClick:m}))},t))})]}),f&&p&&U(`div`,{style:ru,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),h()},children:U(`div`,{style:j(j({},su),{},{borderRadius:(f==null?void 0:f.cornerRadius)||`27px`,backgroundColor:(f==null?void 0:f.backgroundColor)||`#ffffff`}),onPointerDown:e=>{e.stopPropagation()},children:[U(`div`,{style:cu,children:U(K,j({fontSize:`24px`},f.title))}),U(`div`,{style:lu,children:U(`div`,{style:uu,children:U(K,j({fontSize:`17px`},f.message))})}),f.actionButton1&&U(`div`,{style:du,children:U(ms,j(j({dataTestId:`question-button`},f.actionButton1),f.actionButton1.type===`FORM`?{onClick:h}:{}))})]})})]})};un(),I();var pu=Wt(void 0),mu=({children:e,handlers:t})=>U(pu.Provider,{value:{handlers:t},children:e}),hu=()=>yn(pu),gu=e=>{let t=hu(),n=t==null?void 0:t.handlers,r;return e.type===`FORM`&&e.actionId&&n&&n[e.actionId]&&(r=n[e.actionId]),U(ms,j({title:e.title,image:e.image,responseBody:e.responseBody,url:e.url,borderColor:e.borderColor,borderWidth:e.borderWidth,type:e.type,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,highlightColor:e.highlightColor,hoverColor:e.hoverColor,paddings:e.paddings,isGenericTemplate:!0},r&&{onClick:r}))},_u=({isPressed:e,isHovered:t,backgroundColor:n,highlightColor:r,hoverColor:i})=>{let a=G(n)||`transparent`,o=G(r),s=G(i);return e?o||a:t&&s||a};I();var vu=e=>{let{image:t,responseBody:n,type:r,url:i,paddings:a,backgroundColor:o,highlightColor:s,hoverColor:c,cornerRadius:l,onClick:u}=e,{perform:d}=ao(),[f,p]=N(!0),[m,h]=N(0),{failedAssets:g}=so(),{isHovered:_,isPressed:v,interactionHandlers:y}=fs(),b=No(t,g)[m];if(!b)return null;let{imageId:x,imageURL:S,base64:C,contentMode:w=mo.ASPECT_FILL,cornerRadius:T,backgroundColor:ee}=b,E=_u({isPressed:v,isHovered:_,backgroundColor:o,highlightColor:s,hoverColor:c}),te=f&&S,ne=()=>{p(!1)},re=()=>{h(e=>e+1)},D=e=>{if(r===`URL`)i&&window.open(i,`_blank`,`noopener,noreferrer`);else{if(n){let e=JSON.parse(JSON.stringify(n));Yo(e),d(e,wa.DATA)}u&&u(e)}},O={width:`100%`,height:`100%`},ie,ae=G(ee)||`transparent`;return C&&(ie=U(`img`,{style:j(j({},O),{},{objectFit:Po(w),borderRadius:T,backgroundColor:ae,display:`block`}),src:C,onError:re})),x&&(ie=U(Bo,{type:x in zo?x:`default`,contentMode:w,cornerRadius:T,backgroundColor:ae,isFullSize:!0})),S&&(ie=U(vt,{children:[te&&U(`div`,{style:j(j({},O),{},{backgroundColor:`#e0e0e0`,borderRadius:T})}),U(`img`,{style:j(j({},O),{},{objectFit:Po(w),borderRadius:T,backgroundColor:ae,display:te?`none`:`block`}),src:S,onLoad:ne,onError:re})]})),U(`button`,j(j({type:`button`,style:j({width:`100%`,height:`100%`,appearance:`none`,background:`none`,border:0,padding:0,margin:0,display:`inline-flex`,cursor:`pointer`,backgroundColor:E,borderRadius:l},jo(a))},y),{},{onClick:D,children:ie}))},yu=e=>{let t=hu(),n=t==null?void 0:t.handlers,r;return e.type===`FORM`&&e.actionId&&n&&n[e.actionId]&&(r=n[e.actionId]),U(vu,j({image:{imageId:e.image.imageId,imageURL:e.image.imageURL,base64:e.image.base64,contentMode:e.image.contentMode,cornerRadius:e.image.cornerRadius,backgroundColor:e.image.backgroundColor,prepareRequired:e.image.prepareRequired,failurePolicy:e.image.failurePolicy,timeout:e.image.timeout,placeholderImage:e.image.placeholderImage},type:e.type,url:e.url,responseBody:e.responseBody,paddings:e.paddings,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,highlightColor:e.highlightColor,hoverColor:e.hoverColor},r&&{onClick:r}))},bu={[So.TOP]:`flex-start`,[So.CENTER]:`center`,[So.BOTTOM]:`flex-end`},xu=bu[So.TOP],Su=bu[So.TOP],Cu=e=>({[Co.START]:`flex-start`,[Co.LEFT]:e===Da.RTL?`flex-end`:`flex-start`,[Co.CENTER]:`center`,[Co.RIGHT]:e===Da.RTL?`flex-start`:`flex-end`,[Co.END]:`flex-end`}),wu=({elements:e,verticalAlignment:t,horizontalAlignment:n,backgroundColor:r,cornerRadius:i,paddings:a})=>{let{layoutDirection:o}=co(),s=Cu(o),c=s[Co.START];return U(`div`,{"data-ui":`gui-row`,part:`gui-row`,style:j({width:`100%`,display:`flex`,flexDirection:`row`,alignItems:t&&bu[t]||Su,justifyContent:n&&s[n]||c,backgroundColor:G(r)||`transparent`,borderRadius:i},jo(a)),children:e==null?void 0:e.map(e=>{let t=e.type===xo.IMAGE,n=e.type===xo.IMAGE_BUTTON,r=e.type===xo.SPACER,i=e.type===xo.PROGRESS_VIEW,a=(t||n||r)&&e.content.width||i;return U(`div`,{"data-ui":`gui-row-item`,part:`gui-row-item`,style:j(j(j(j(j({flex:a?`0 0 auto`:`${e.content.weight||1} 1 0`},a&&!i&&{width:e.content.width}),i&&{width:e.content.width||e.content.height||60}),r&&e.content.height&&{height:e.content.height}),(t||n)&&{height:e.content.height||120}),i&&{height:e.content.height||e.content.width||60}),children:Du(e)})})})},Tu=({backgroundColor:e,cornerRadius:t})=>U(`div`,{"data-ui":`gui-spacer`,part:`gui-spacer`,style:{width:`100%`,height:`100%`,backgroundColor:G(e)||`transparent`,borderRadius:t}}),Eu={[xo.LABEL]:e=>U(K,{text:e.content.text,fontName:e.content.fontName,fontSize:e.content.fontSize,fontColor:e.content.fontColor,alignment:e.content.alignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings,fontWeight:e.content.fontWeight,isGenericTemplate:!0}),[xo.IMAGE]:e=>U(ss,{imageId:e.content.imageId,imageURL:e.content.imageURL,base64:e.content.base64,contentMode:e.content.contentMode,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,isFullSize:!0,prepareRequired:e.content.prepareRequired,failurePolicy:e.content.failurePolicy,timeout:e.content.timeout,placeholderImage:e.content.placeholderImage}),[xo.IMAGE_BUTTON]:e=>U(yu,{type:e.content.type,actionId:e.content.actionId,image:{imageId:e.content.image.imageId,imageURL:e.content.image.imageURL,base64:e.content.image.base64,contentMode:e.content.image.contentMode,cornerRadius:e.content.image.cornerRadius,backgroundColor:e.content.image.backgroundColor,prepareRequired:e.content.image.prepareRequired,failurePolicy:e.content.image.failurePolicy,timeout:e.content.image.timeout,placeholderImage:e.content.image.placeholderImage},url:e.content.url,responseBody:e.content.responseBody,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,highlightColor:e.content.highlightColor,hoverColor:e.content.hoverColor,paddings:e.content.paddings}),[xo.BUTTON]:e=>U(gu,{actionId:e.content.actionId,title:e.content.title,image:e.content.image,responseBody:e.content.responseBody,url:e.content.url,borderColor:e.content.borderColor,borderWidth:e.content.borderWidth,type:e.content.type,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,highlightColor:e.content.highlightColor,hoverColor:e.content.hoverColor,paddings:e.content.paddings}),[xo.COLUMN]:e=>U(Ou,{elements:e.content.elements,horizontalAlignment:e.content.horizontalAlignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings}),[xo.ROW]:e=>U(wu,{elements:e.content.elements,horizontalAlignment:e.content.horizontalAlignment,verticalAlignment:e.content.verticalAlignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings}),[xo.SPACER]:e=>U(Tu,{backgroundColor:e.content.backgroundColor,cornerRadius:e.content.cornerRadius}),[xo.PROGRESS_VIEW]:e=>U(Cs,{isFullSize:!0,indicatorColor:e.content.indicatorColor})};function Du(e){let t=Eu[e.type];return t?t(e):null}var Ou=({elements:e,horizontalAlignment:t,backgroundColor:n,cornerRadius:r,paddings:i})=>{let{layoutDirection:a}=co(),o=Cu(a),s=o[Co.START];return U(`div`,{"data-ui":`gui-column`,part:`gui-column`,style:j({display:`flex`,flexDirection:`column`,alignItems:t&&o[t]||s,backgroundColor:G(n)||`transparent`,borderRadius:r},jo(i)),children:e==null?void 0:e.map(e=>{let t=e.type===xo.IMAGE,n=e.type===xo.IMAGE_BUTTON,r=e.type===xo.SPACER,i=e.type===xo.PROGRESS_VIEW,a=(t||n||r)&&e.content.width||i;return U(`div`,{"data-ui":`gui-column-item`,part:`gui-column-item`,style:j(j(j(j(j(j({},!a&&{alignSelf:`stretch`}),a&&!i&&{width:e.content.width}),i&&{width:e.content.width||e.content.height||60}),r&&e.content.height&&{height:e.content.height}),(t||n)&&{height:e.content.height||120}),i&&{height:e.content.height||e.content.width||60}),children:Du(e)})})})},ku=({topColumn:e,mainColumn:t,bottomColumn:n,backgroundColor:r=`#ffffff00`,backgroundImage:i,cornerRadius:a,isInModal:o=!1})=>{let{failedAssets:s}=so();return U(`div`,{"data-ui":`gui-scaffold-container`,part:`gui-scaffold-container`,id:`scaffold-container`,style:j(j({display:`flex`,flexDirection:`column`,height:`100%`},o&&{minHeight:0}),{},{backgroundColor:G(r)||`transparent`,borderRadius:a},Io(i,s)),children:[e&&U(`div`,{"data-ui":`gui-top-column`,part:`gui-top-column`,style:{flex:`0 0 auto`},children:U(Ou,j({},e))}),t&&U(`div`,{"data-ui":`gui-main-column-container`,part:`gui-main-column-container`,style:{flex:`1 1 auto`,minHeight:0,overflowY:`auto`,overflowX:`hidden`,backgroundColor:G(t.backgroundColor)||`transparent`},children:U(`div`,{"data-ui":`gui-main-column`,part:`gui-main-column`,style:{display:`flex`,flexDirection:`column`,minHeight:`100%`,justifyContent:t.verticalAlignment&&bu[t.verticalAlignment]||xu},children:U(Ou,j(j({},t),{},{backgroundColor:`transparent`}))})}),n&&U(`div`,{"data-ui":`gui-bottom-column`,part:`gui-bottom-column`,style:{flex:`0 0 auto`},children:U(Ou,j({},n))})]})},Au=({rootElement:e})=>{let{type:t,content:n}=e;if(t===yo.SCAFFOLD){let{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i,backgroundImage:a,cornerRadius:o}=n;return U(ku,{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i,cornerRadius:o,backgroundImage:a})}return null},ju=({width:e=400,shouldCloseOnClickOutside:t=!1,close:n,children:r})=>U(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,inset:0,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,background:`rgba(0,0,0,0.2)`,zIndex:1e3,pointerEvents:`auto`,cursor:`default`},onPointerDown:()=>{t&&(n==null||n())},children:U(`div`,{style:{position:`relative`,width:`min(${e}px, calc(100vw - 32px))`,maxHeight:`calc(100vh - 32px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`},onPointerDown:e=>{e.stopPropagation()},children:r})}),Mu=({popups:e,rootElement:t,settings:n})=>{let r=e==null?void 0:e.find(e=>e.reason===Ko.SYSTEM_RESTRICTED),{isPopupOpen:i,handleAllowButtonClick:a,closePopup:o}=eu({askEveryTime:n==null?void 0:n.askEveryTime,getLocationTimeout:n==null?void 0:n.getLocationTimeout,locationAccuracy:n==null?void 0:n.locationAccuracy}),s={ALLOW_LOCATION:a,HIDE_POPUP:o},{type:c,content:l}=t;if(c!==yo.SCAFFOLD)return null;let{topColumn:u,mainColumn:d,bottomColumn:f,backgroundColor:p,cornerRadius:m,backgroundImage:h}=l;return U(`div`,{style:{position:`relative`,height:`100%`},children:U(mu,{handlers:s,children:[U(ku,{topColumn:u,mainColumn:d,bottomColumn:f,backgroundColor:p,cornerRadius:m,backgroundImage:h}),r&&i&&U(ju,{width:400,close:o,shouldCloseOnClickOutside:!0,children:U(ku,{isInModal:!0,topColumn:r.rootElement.content.topColumn,mainColumn:r.rootElement.content.mainColumn,bottomColumn:r.rootElement.content.bottomColumn,backgroundColor:r.rootElement.content.backgroundColor,backgroundImage:h,cornerRadius:r.rootElement.content.cornerRadius})})]})})},Nu=({rootElement:e})=>{let{type:t,content:n}=e;if(t===yo.SCAFFOLD){let{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i,cornerRadius:a,backgroundImage:o}=n;return U(ku,{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i,backgroundImage:o,cornerRadius:a})}return null},Pu=({backgroundColor:e,cornerRadius:t,paddings:n,dataItems:r,uiComponents:i})=>U(`div`,{"data-ui":`gui-section`,part:`gui-section`,style:j({display:`flex`,flexDirection:`column`,backgroundColor:G(e)||`transparent`,borderRadius:t},jo(n)),children:U(rd,{dataItems:r,uiComponents:i})}),Fu=({titleLabel:e,htmlFor:t})=>e?U(`div`,{"data-ui":`gui-code-input-title`,part:`gui-code-input-title`,style:{width:`100%`},children:U(K,j(j({},e),{},{htmlFor:t,isGenericTemplate:!0}))}):null,Iu=`code-input-caret`,Lu=({char:e,showCaret:t,width:n=42,height:r=42,backgroundColor:i,cornerRadius:a=8,fontName:o,fontSize:s,fontColor:c,fontWeight:l,borderWidth:u,borderColor:d})=>U(`div`,{"data-ui":`gui-code-field-slot`,part:`gui-code-field-slot`,"aria-hidden":`true`,style:{boxSizing:`border-box`,width:n,height:r,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:G(i)||`transparent`,borderRadius:a,borderStyle:`solid`,borderWidth:u,borderColor:d,fontFamily:Ro(o),fontSize:s,color:c,fontWeight:Lo(l),lineHeight:1.4,userSelect:`none`,cursor:`text`,flexShrink:0},children:[e,t&&U(`span`,{style:{display:`inline-block`,width:1,height:Math.max((s==null?20:s)*.9,14),marginInlineStart:+!!e,backgroundColor:c,animation:`code-input-caret 1s step-end infinite`}})]}),Ru=`#d9d9d9`,zu=`#7B61FF`,Bu=`#FF3B30`,Vu=({isError:e,isFocused:t,borderWidth:n,borderColor:r,focusedBorderWidth:i,focusedBorderColor:a,errorBorderWidth:o,errorBorderColor:s})=>{let c=n==null?1:n,l=G(r)||Ru;return e?{borderWidth:o==null?c:o,borderColor:G(s)||Bu}:t?{borderWidth:i==null?c:i,borderColor:G(a)||zu}:{borderWidth:c,borderColor:l}},Hu=(e=4)=>e<4?4:e>12?12:e,Uu=(e,t,n)=>{let r=e;return t===wo.ALPHA_NUMERIC&&(r=r.replace(/[^a-zA-Z0-9]/g,``)),t===wo.NUMERIC&&(r=r.replace(/\D/g,``)),r.slice(0,n)},Wu={[wo.NUMERIC]:`numeric`,[wo.ALPHA_NUMERIC]:`text`},Gu=e=>Wu[e],Ku=e=>Array.from({length:e},(e,t)=>t),qu=({isError:e,isActive:t,borderWidth:n,borderColor:r,focusedBorderWidth:i,focusedBorderColor:a,errorBorderWidth:o,errorBorderColor:s})=>Vu({isError:e,isFocused:t,borderWidth:n,borderColor:r,focusedBorderWidth:i,focusedBorderColor:a,errorBorderWidth:o,errorBorderColor:s});I();var Ju=({codeField:e,value:t=``,name:n,id:r,ariaDescribedBy:i,isError:a=!1,onChange:o,onBlur:s})=>{let[c,l]=N(!1),u=hn(null),{codeLength:d,inputType:f=wo.NUMERIC,interSlotSpacing:p,fontName:m,fontSize:h,fontColor:g,fontWeight:_,slot:v}=e,y=Hu(d),b=Uu(t,f,y),x=Math.min(b.length,y-1),S=G(g)||`#000000`,C=e=>{let t=Uu(e,f,y);if(o==null||o(t),t.length>=y){var n;(n=u.current)==null||n.blur()}};return U(`div`,{"data-ui":`gui-code-field`,part:`gui-code-field`,style:{position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`center`,width:`100%`,backgroundColor:`transparent`},children:[U(`style`,{children:`
7
- @keyframes ${Iu} {
5
+ `)}},xa={apiKeyAuthTokenCollection:{},sessionProperties:[],currentSessionData:null,sessionRestoreMode:!1,nonce:void 0,currentStepId:null,currentScreenConfig:null,modulesConfig:{},workflow:null,externalModules:[],serviceToken:void 0,startConfig:{},locale:``,listener:()=>{}},Sa=(e,t)=>j(j({},xa),{},{setApiKeyAuthTokenCollection:(t,n,r)=>{e({apiKeyAuthTokenCollection:{authToken:n,apiKey:t,tokenExpiresAt:r}})},setSessionProperties:t=>{e({sessionProperties:t})},setServiceSessionToken:t=>{e({serviceToken:t})},setListener:t=>{B.setPublicListener(t),e({listener:t})},getCurrentSessionDataLs:()=>{var e;let n=Xi.getSessionIdWorkflowIdFromLS(),r=(e=t().workflow)==null?void 0:e.id,i=n==null?void 0:n[r];return r&&i?{workflowId:r,sessionId:i}:null},setCurrentSessionDataLsAndStore:({isApiKeyConnection:n,sessionId:r,workflowId:i,locale:a})=>{if(e({currentSessionData:{sessionId:r,workflowId:i,locale:a}}),n){let{apiKey:e,authToken:n,tokenExpiresAt:a}=t().apiKeyAuthTokenCollection;if(!e||!n||!a)return;qi.setAuthTokenToLs({apiKey:e,authToken:n,tokenExpiresAt:a,sessionId:r,workflowId:i})}else Xi.setSessionIdWorkflowIdToLs(r,i)},removeCurrentSessionDataLsAndStore:()=>{e({currentSessionData:null,_sessionIdFromUrl:null});let n=t().startConfig,r=typeof n.apiKey==`string`?n.apiKey:``;if(r)qi.removeAuthTokenLs(r);else{var i;let e=(i=t().workflow)==null?void 0:i.id;Xi.removeSessionIdWorkflowIdFromLS(e)}},getCurrentSessionId(){let e=t().currentSessionData;return e?e.sessionId:null},setWorkflow:t=>{e(e=>({workflow:j(j({},e.workflow),t)}))},setCurrentStepId:t=>{e(()=>({currentStepId:t}))},setSessionRestoreMode:t=>{e(()=>({sessionRestoreMode:t}))},setNonce:t=>{e(()=>({nonce:t}))},getNonce:()=>t().nonce,resetProps:()=>e(()=>j({},xa)),setStartConfig:t=>{e(()=>({startConfig:t}))},setLocale:t=>{e(()=>({locale:t}))}}),V=class e{constructor({errorCode:e,errorCodeKey:t,message:n,underlyingError:r,underlyingBaseError:i,domain:a,module:o,errorEnumName:s,shortDomainCode:c}){this.errorCode=e,this.errorCodeKey=t,this.message=n,this.underlyingError=r,this.underlyingBaseError=i,this.module=o,this.domain=a,this.errorEnumName=s,this.shortDomainCode=c}static getErrorKey(e,t){let n=Object.keys(t).find(n=>t[n]===e);if(!n)throw Error(`Invalid errorCode: ${e} in enum`);return n}get lastUnderlyingError(){let t=this.underlyingBaseError;for(;(t==null?void 0:t.underlyingBaseError)instanceof e;)t=t.underlyingBaseError;return t==null?void 0:t.underlyingError}toObject(){let t={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof e&&(t.underlyingBaseError=this.underlyingBaseError.toObject()),t}get shortChain(){let t=`${this.shortDomainCode}:${this.errorCode}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.shortChain}`),t}get fullChain(){let t=`${this.module}.${this.domain}:${this.errorCodeKey}${this.underlyingError?`-`+this.underlyingError:``}`;return this.underlyingBaseError instanceof e&&(t+=`-${this.underlyingBaseError.fullChain}`),t}},Ca=class extends HTMLElement{};function wa(e,t){if(t.displayName?console.log(`Register module: ${t.displayName}`):console.error(`Missed "displayName" when register module`),t.getSupportedTemplates&&typeof t.getSupportedTemplates==`function`){let e=t.getSupportedTemplates();console.log(`${t==null?void 0:t.displayName} supported templates: ${e.join(`, `)}`)}else console.error(`Missed "getSupportedTemplates" method when register module`);if(t.initialize&&typeof t.initialize==`function`||console.error(`${t==null?void 0:t.displayName} "initialize" method was not implemented`),t.deinitialize&&typeof t.deinitialize==`function`||console.error(`${t==null?void 0:t.displayName} "deinitialize" method was not implemented`),t.cancel&&typeof t.cancel==`function`||console.error(`${t==null?void 0:t.displayName} "cancel" method was not implemented`),t.isReady&&typeof t.isReady==`function`||console.error(`${t==null?void 0:t.displayName} "isReady" method was not implemented`),t.getIdentifier&&typeof t.getIdentifier==`function`){let e=t.getIdentifier();console.log(`Module id: ${e}`)}else console.error(`Missed "getIdentifier" when register module`);customElements.get(t.getIdentifier())?console.log(`Module ${e} has already registered`):customElements.define(e,t),console.log(`-------`)}var Ta=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Ea(e){if(Array.isArray(e))return e.map(Ea);if(Ta(e)){let t=j({},e);if(delete t.ios,delete t.android,delete t.web,`web`in e)return Ta(e.web)?j(j({},Ea(t)),e.web):e.web;let n={};for(let[e,r]of Object.entries(t))n[e]=Ea(r);return n}return e}var Da={FORM:`form`,DATA:`data`};function Oa(e){return new Promise(t=>setTimeout(t,e))}var ka=e=>{if(typeof e!=`string`)return!1;try{return new URL(e),!0}catch(e){return!1}},Aa=function(e){return e.RTL=`rtl`,e.LTR=`ltr`,e}({}),ja=[`ar`,`he`],Ma=e=>{var t;let n=e?(t=e.substring(0,2))==null?void 0:t.toLowerCase():``;return ja.includes(n)?`rtl`:`ltr`},Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,fi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Na=Ga,Na.MODULE=`IDV`,Na.ERROR_ENUM_NAME=`InitializeError`,Na.SHORT_CODE=`IN`;var Ka=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,pi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Pa=Ka,Pa.MODULE=`IDV`,Pa.ERROR_ENUM_NAME=`TokenInitializeError`,Pa.SHORT_CODE=`TI`;var qa=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,li);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Fa=qa,Fa.MODULE=`IDV`,Fa.ERROR_ENUM_NAME=`PrepareWorkflowError`,Fa.SHORT_CODE=`PW`;var Ja=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,ui);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ia=Ja,Ia.MODULE=`IDV`,Ia.ERROR_ENUM_NAME=`ConfigureError`,Ia.SHORT_CODE=`CFG`;var Ya=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,di);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};La=Ya,La.MODULE=`IDV`,La.ERROR_ENUM_NAME=`WorkflowError`,La.SHORT_CODE=`SC`;var Xa=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,yi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ra=Xa,Ra.MODULE=`IDV`,Ra.ERROR_ENUM_NAME=`ConnectionError`,Ra.SHORT_CODE=`CO`;var Za=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,gi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};za=Za,za.MODULE=`IDV`,za.ERROR_ENUM_NAME=`SessionError`,za.SHORT_CODE=`SE`;var Qa=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,hi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ba=Qa,Ba.MODULE=`IDV`,Ba.ERROR_ENUM_NAME=`StartSessionError`,Ba.SHORT_CODE=`ST`;var $a=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,_i);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Va=$a,Va.MODULE=`IDV`,Va.ERROR_ENUM_NAME=`SocketError`,Va.SHORT_CODE=`SO`;var eo=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,vi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ha=eo,Ha.MODULE=`IDV`,Ha.ERROR_ENUM_NAME=`DeinitializationError`,Ha.SHORT_CODE=`DE`;var to=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,bi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Ua=to,Ua.MODULE=`IDV`,Ua.ERROR_ENUM_NAME=`LoginError`,Ua.SHORT_CODE=`LG`;var no=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,mi);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Wa=no,Wa.MODULE=`IDV`,Wa.ERROR_ENUM_NAME=`WorkflowPlatformError`,Wa.SHORT_CODE=`WPE`;var ro=function(e){return e.Force=`force`,e.ApiKey=`apiKey`,e.Simple=`simple`,e}({}),H=class e{constructor(){this.webSocket=null,this.pingMessageCallbacks=new Set,this.messageCallbacks=new Set,this.reconnectCallbacks=new Set,this.connected=!1,this.wasEverConnected=!1,this.lastConnectConfig=null,this.reconnectAttempt=0,this.baseReconnectDelay=1e3,this.maxReconnectDelay=1e4,this.multiplier=1.5,this.reconnectAttemptThreshold=Math.log(this.maxReconnectDelay/this.baseReconnectDelay)/Math.log(this.multiplier),this.resetReconnectAttempt=()=>{this.reconnectAttempt=0},this.calculateReconnectDelay=()=>this.reconnectAttempt<this.reconnectAttemptThreshold?this.baseReconnectDelay*Math.pow(this.multiplier,this.reconnectAttempt):this.maxReconnectDelay}static getInstance(){return e.instance||(e.instance=new e),e.instance}send(e){if(!this.webSocket||!this.connected||this.webSocket.readyState!==WebSocket.OPEN)return{status:xi.ERROR,errorMessage:`WebSocket is not ready.`};let t=typeof e==`string`?e:JSON.stringify(e);try{return this.webSocket.send(t),{status:xi.SUCCESS}}catch(e){return{status:xi.ERROR,errorMessage:`Error while sending message to WebSocket: ${da(e)}.`}}}isConnected(){return this.connected}connect(e,t){return B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`WebSocket is trying to ${t?`re`:``}connect...`}),this.connected?Promise.resolve():(this.lastConnectConfig=e,new Promise(t=>{let{host:n,isSecure:r=!0,token:i,port:a}=e,o=`ws${r?`s`:``}://${n}${a?`:${a}`:``}/ws/device?Authorization=Connection%20${i}`;this.webSocket=new WebSocket(o),this.webSocket.onopen=()=>{B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`WebSocket ${this.reconnectAttempt>0?`re`:``}connected successfully`}),this.connected=!0,this.wasEverConnected=!0,this.reconnectAttempt>0&&this.reconnectCallbacks.forEach(e=>e()),this.resetReconnectAttempt(),t()},this.webSocket.onerror=()=>{console.log(`Socket error`),t()},this.webSocket.onmessage=e=>{this.pingMessageCallbacks.forEach(t=>t(e.data)),this.messageCallbacks.forEach(t=>t(e.data))},this.webSocket.onclose=()=>{if(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`WebSocket connection closed.`}),this.connected=!1,this.webSocket=null,!this.wasEverConnected||!this.lastConnectConfig)return;this.reconnectAttempt++;let e=this.calculateReconnectDelay();setTimeout(()=>{this.connect(this.lastConnectConfig,!0)},e)}}))}sendSessionGetMessage({sessionId:e,locale:t}){let n=this.send({command:`sessionGet`,options:j({id:e},t&&{locale:t})});n.status===xi.SUCCESS&&B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Successfully sent sessionGet message to WebSocket.`}),n.status===xi.ERROR&&B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Failed to send sessionGet message to WebSocket: ${n.errorMessage}.`})}sendPingMessage(e){return this.send({command:`ping`,options:{pingId:e}})}sendConnectionStatusMessage({sessionId:e,result:t,endedAt:n,assessmentId:r,assessmentStatus:i}){return this.send({command:`connectionStatus`,options:{sessionId:e,status:t,timestamp:n,assessmentId:r,assessmentStatus:i}})}subscribeToMessage(e){this.messageCallbacks.add(e)}subscribeToPingMessage(e){this.pingMessageCallbacks.add(e)}unsubscribeFromPingMessage(e){this.pingMessageCallbacks.delete(e)}decodeMessage(e){try{return JSON.parse(atob(JSON.parse(e).payload))}catch(e){return B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Failed to decode message from WebSocket: ${da(e)}`}),null}}subscribeToReconnect(e){this.reconnectCallbacks.add(e)}clearSubscriptions(){this.messageCallbacks.clear(),this.reconnectCallbacks.clear()}close(){var e;(e=this.webSocket)==null||e.close(),this.webSocket=null,this.connected=!1,this.wasEverConnected=!1,this.lastConnectConfig=null,this.clearSubscriptions(),this.pingMessageCallbacks.clear()}}.getInstance();un();var io=0;Array.isArray;function U(e,t,n,r,i,a){t||(t={});var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--io,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return M.vnode&&M.vnode(l),l}un(),I();var ao=Wt(void 0),oo=({perform:e,children:t,setIsProcessingCallback:n,devSettings:r,failedAssets:i,layoutDirection:a})=>U(ao.Provider,{value:{perform:e,setIsProcessingCallback:n,devSettings:r,failedAssets:i,layoutDirection:a},children:t}),so=()=>{let e=yn(ao);if(!e)throw Error(`useDevSettings must be used within a Context Provider`);return{devSettings:e==null?void 0:e.devSettings}},co=()=>{let e=yn(ao);if(!e)throw Error(`usePerform must be used within a PerformProvider`);return{perform:e.perform}},lo=()=>{let e=yn(ao);if(!e)throw Error(`useSetIsProcessingCallback must be used within a Context Provider`);return{setIsProcessingCallback:e.setIsProcessingCallback}},uo=()=>{let e=yn(ao);if(!e)throw Error(`useFailedAssets must be used within a Context Provider`);return{failedAssets:e.failedAssets}},fo=()=>{let e=yn(ao);if(!e)throw Error(`useLayoutDirection must be used within a Context Provider`);return{layoutDirection:e.layoutDirection}},po={width:`86px`,height:`86px`,flex:`0 0 86px`,marginBottom:`16px`,display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`};I();var mo=({dataUrl:e,isFullSize:t=!1})=>{let n=hn(null);return pn(()=>{if(!n.current)return;let e=!0,t=0,r=performance.now();function i(a){if(!e)return;let o=a-r;r=a,t=(t+.36*o)%360,n.current&&(n.current.style.transform=`rotate(${t}deg)`),requestAnimationFrame(i)}return requestAnimationFrame(i),()=>{e=!1}},[]),U(`img`,{src:e,ref:n,style:j({},t&&{width:`100%`,height:`100%`,aspectRatio:`1`})})},ho={INFO:`INFO`,INFO_DETAILS:`INFO_DETAILS`,STATUS:`STATUS`,PROGRESS:`PROGRESS`,QUESTIONS:`QUESTIONS`,CAMERA:`CAMERA`,GALLERY:`GALLERY`,GEOLOCATION:`GEOLOCATION`,DEVICE_TRANSFER:`DEVICE_TRANSFER`,GENERIC:`GENERIC`,GENERIC_LIST:`GENERIC_LIST`,GENERIC_LOCATION:`GENERIC_LOCATION`,GENERIC_PROGRESS:`GENERIC_PROGRESS`,UPLOAD_FILES:`UPLOAD_FILES`},go={START:`START`,LEFT:`LEFT`,CENTER:`CENTER`,RIGHT:`RIGHT`,END:`END`},_o={ASPECT_FILL:`ASPECT_FILL`,ASPECT_FIT:`ASPECT_FIT`,FILL:`FILL`},vo={NORMAL:`NORMAL`,BOLD:`BOLD`},yo={TEXT_EXPANDABLE:`text_expandable`,TEXT_SINGLE_LINE:`text_single_line`,SELECTOR_OPTIONS:`selector_options`,SELECTOR_BUTTONS:`selector_buttons`,SELECTOR_DROPDOWN:`selector_dropdown`,MULTI_SELECTOR_BUTTONS:`multi_selector_buttons`,MULTI_SELECTOR_OPTIONS:`multi_selector_options`,MULTI_SELECTOR_DROPDOWN:`multi_selector_dropdown`},bo={FREE_TEXT:`FREE_TEXT`,EMAIL:`EMAIL`,NUMBER:`NUMBER`,SECURE:`SECURE`},xo=function(e){return e.HIGH=`HIGH`,e.BALANCED=`BALANCED`,e.LOW=`LOW`,e.PASSIVE=`PASSIVE`,e}({}),So={SCAFFOLD:`scaffold`},Co={LIST_SCAFFOLD:`listScaffold`},wo={LABEL:`label`,IMAGE:`image`,IMAGE_BUTTON:`imageButton`,BUTTON:`button`,COLUMN:`column`,ROW:`row`,SPACER:`spacer`,PROGRESS_VIEW:`progressView`},To={TOP:`TOP`,CENTER:`CENTER`,BOTTOM:`BOTTOM`},Eo={START:`START`,LEFT:`LEFT`,CENTER:`CENTER`,RIGHT:`RIGHT`,END:`END`},Do={NUMERIC:`NUMERIC`,ALPHA_NUMERIC:`ALPHA_NUMERIC`},Oo={EMAIL:`EMAIL`,PHONE:`PHONE`},ko={GENERIC_COLUMN:`genericColumn`,QUESTION:`question`,SECTION:`section`,CODE_INPUT:`codeInput`,TEXT_INPUT:`textInput`};function Ao(e){let t=/\[([^\]]+)\]\(((https?:\/\/|www\.)?[^\s)]+\.[^\s)]+)\)/g,n=[],r=0;for(let a of e.matchAll(t)){var i;let[t,o,s]=a,c=(i=a.index)==null?0:i;c>r&&n.push(e.slice(r,c));let l=s.startsWith(`http`)?s:`https://${s}`;n.push(U(`a`,{href:l,target:`_blank`,rel:`noopener noreferrer`,children:o},c)),r=c+t.length}return r<e.length&&n.push(e.slice(r)),n}function jo(e){let t=e.split(`
6
+ `);return t.flatMap((e,n)=>{let r=Ao(e);return n===t.length-1?r:[...r,U(`br`,{},`br-`+n)]})}var Mo=e=>!!(e!=null&&e.base64||e!=null&&e.imageURL||e!=null&&e.imageId),No=e=>{if(typeof e==`number`)return`${e}px`};function Po(e){return e?{paddingTop:No(e.top),paddingRight:No(e.right),paddingBottom:No(e.bottom),paddingLeft:No(e.left)}:{}}var Fo=(e,t)=>!!(e.base64&&!(t!=null&&t.base64.has(e.base64))||e.imageId&&e.imageId in Ho||e.imageURL&&!(t!=null&&t.imageURL.has(e.imageURL))),Io=(e,t)=>{let n=[],r=e==null?null:e;for(;r;)Fo(r,t)&&n.push(r),r=r.failurePolicy===`placeholderImage`&&r.placeholderImage||null;return n},Lo=e=>{if(e===_o.ASPECT_FILL)return`cover`;if(e===_o.ASPECT_FIT)return`contain`;if(e===_o.FILL)return`fill`},Ro=(e,t)=>{let n=Io(e,t)[0];if(n){if(n.imageURL)return n.imageURL;if(n.base64)return n.base64;if(n.imageId){var r;return(r=Ho[n.imageId])==null?void 0:r.call(Ho)}}},zo=(e,t)=>{var n;if(!e||!Mo(e))return{};let r=Ro(e,t);if(!r)return{};let i=(n=e.contentMode)==null?_o.ASPECT_FILL:n;return{backgroundImage:`url("${r}")`,backgroundSize:Lo(i),backgroundRepeat:`no-repeat`,backgroundPosition:`center`}},Bo=e=>e===vo.BOLD?700:(vo.NORMAL,400),Vo=e=>[e,`-apple-system`,`BlinkMacSystemFont`,`sans-serif`].filter(Boolean).join(`, `),W={WARNING:`warning_icon`,SPINNER:`spinner`,LOADER:`loader`,ERROR:`failure`,AGE:`age`,ANDROID:`android`,ARROW:`arrow`,APPLE:`apple`,BACK:`back`,BIOMETRIC:`biometricIcon`,INFO:`info`,TO_MOBILE:`toMobile`,UNDERAGE:`underage`,CROSS:`cross`,REGULA_LOGO:`regulaLogo`,POWERED_BY:`signature`,SUCCESS:`success`,DEFAULT:`empty`,CIRCLE_SELECTED:`radio_selected`,CIRCLE_NORMAL:`radio_normal`,SQUARE_SELECTED:`square_selected`,SQUARE_NORMAL:`square_normal`,SELECTED:`selected`,CHEVRON_DOWN:`chevronDown`,CLOSE_ICON:`close_icon`,GALLERY_ICON:`gallery`,CAMERA_ICON:`camera`,OK:`ok`,FILE:`file`,RELOAD:`reload`},Ho={[W.SPINNER]:e=>{let t=`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHlsZT0idHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7Ij4KICA8Y2lyY2xlIGN4PSIzMCIgY3k9IjMwIiByPSIyNy41IiBmaWxsPSJub25lIiBzdHJva2U9IiM3RTU3QzUiIHN0cm9rZS13aWR0aD0iNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTI5LjU5MDY5Njk2MDU3ODk4IDQzLjE5Njg5ODk4Njg1OTY2IiBzdHJva2UtZGFzaG9mZnNldD0iMCIgc3Ryb2tlLWxpbmVjYXA9ImJ1dHQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAzMCAzMCkiLz4KPC9zdmc+Cg==`;if(!e)return t;let n=t.split(`,`),r=atob(n[1]);r=r.replace(/stroke="[^"]*"/g,`stroke="${e}"`);let i=btoa(r);return`${n[0]},${i}`},[W.LOADER]:e=>{let t=`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCAyMiAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iMTAiIHRyYW5zZm9ybT0icm90YXRlKDkwIDExIDExKSIgc3Ryb2tlPSIjRkJGQkZCIiBzdHJva2Utd2lkdGg9IjEuODc1Ii8+CjxwYXRoIGQ9Ik0xMSAwLjk5OTk5OEM1LjQ3NzE2IDAuOTk5OTk3IDEgNS40NzcxNSAxIDExQzEgMTYuNTIyOCA1LjQ3NzE1IDIxIDExIDIxQzE2LjUyMjggMjEgMjEgMTYuNTIyOCAyMSAxMSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K`;if(!e)return t;let n=t.split(`,`),r=atob(n[1]);r=r.replace(/stroke="[^"]*"/g,`stroke="${e}"`);let i=btoa(r);return`${n[0]},${i}`},[W.AGE]:()=>`data:image/svg+xml;base64,IDxzdmcgd2lkdGg9IjQ4IiBoZWlnaHQ9IjQ4IiB2aWV3LWJveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgICAgICAgICA8Y2lyY2xlIGN4PSIyNC41IiBjeT0iMjQiIHI9IjE4IiBzdHJva2U9IiMwRTFGOTciIHN0cm9rZS13aWR0aD0iMyIgLz4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0xNy4zODAzIDE4LjM0MDZWMjkuMjQ5NkgxNS4wNzM5VjIwLjUyOThIMTUuMDA5OUwxMi41MTE3IDIyLjA5NTlWMjAuMDUwNEwxNS4yMTI0IDE4LjM0MDZIMTcuMzgwM1oiCiAgICAgICAgICAgICAgICBmaWxsPSIjMEUxRjk3IgogICAgICAgICAgICAvPgogICAgICAgICAgICA8cGF0aAogICAgICAgICAgICAgICAgZD0iTTIzLjI5MjcgMjkuMzk4OEMyMi40NzI0IDI5LjM5ODggMjEuNzQyNiAyOS4yNjU2IDIxLjEwMzQgMjguOTk5M0My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T]:()=>``},Uo=({type:e,color:t,contentMode:n=_o.ASPECT_FILL,cornerRadius:r,backgroundColor:i,isFullSize:a=!1})=>{let o=Ho[e]||Ho[W.DEFAULT],s=o==null?void 0:o(t);return e===W.SPINNER||e===W.LOADER?U(mo,{dataUrl:s,isFullSize:a}):U(`img`,{src:s,style:j(j({display:`block`},a?{width:`100%`,height:`100%`}:{width:`auto`,height:`auto`,maxWidth:`100%`,maxHeight:`100%`}),{},{objectFit:Lo(n),borderRadius:r,backgroundColor:i})})},Wo=`#005fcc`,Go=`idv-gui`,Ko={DECODING_FAILED:0,IMAGE_LOADING_FAILED:1},qo={text:`text`,selector:`selector`,multiSelector:`multiSelector`},Jo={NOT_EMPTY:`notEmpty`,REGEX:`regex`},Yo={APP_DENIED:`app_denied`,SYSTEM_RESTRICTED:`system_restricted`,FILES_NOT_SELECTED:`files_not_selected`,FILES_LIMIT_EXCEEDED:`files_limit_exceeded`};function Xo(e){return e===go.CENTER?`center`:e===go.RIGHT||e===go.END?`end`:`start`}function Zo(e){return e===go.CENTER?`center`:e===go.END?`end`:e===go.LEFT?`left`:e===go.RIGHT?`right`:`start`}function Qo(e){if(typeof e==`object`&&e)for(let t in e)typeof e[t]==`object`?Qo(e[t]):e[t]===`true`?e[t]=!0:e[t]===`false`&&(e[t]=!1);return e}function $o(e){return Object.entries(e).map(([e,t])=>({id:e,value:typeof t==`string`?t.trim():t})).filter(e=>!!e.value)}var es=e=>Array.isArray(e)?e.length===0:e!==0&&!e;function G(e){if(e)return/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e)?e:void 0}var ts=(e,t)=>e.reduce((e,n)=>{if(n.answerType===qo.text||n.answerType===qo.selector){var r;if((r=n.property)!=null&&r.id){let r=t.find(e=>e.name===n.property.id);if(r!=null&&r.string)return j(j({},e),{},{[n.id]:r.string})}}if(n.answerType===qo.multiSelector){var i;if((i=n.property)!=null&&i.id){let r=t.find(e=>e.name===n.property.id);if(r!=null&&r.array)return j(j({},e),{},{[n.id]:r.array})}}return e},{}),ns=e=>Array.isArray(e)?e.reduce((e,t)=>t.type===ko.SECTION?[...e,...ns(t.content.dataItems)]:t.type===ko.QUESTION?[...e,{type:ko.QUESTION,content:t.content}]:t.type===ko.CODE_INPUT?[...e,{type:ko.CODE_INPUT,content:t.content}]:t.type===ko.TEXT_INPUT?[...e,{type:ko.TEXT_INPUT,content:t.content}]:e,[]):[],rs=(e,t)=>t!=null&&t.length?ns(e).reduce((e,n)=>{var r;if(!(n!=null&&(r=n.content)!=null&&(r=r.property)!=null&&r.id))return e;let i=t.find(e=>e.name===n.content.property.id);if(!i)return e;if(n.type===ko.CODE_INPUT||n.type===ko.TEXT_INPUT)return i.string?j(j({},e),{},{[n.content.id]:i.string}):e;if(n.type===ko.QUESTION){let{content:t}=n;if(t.answerType===qo.multiSelector)return i.array?j(j({},e),{},{[t.id]:i.array}):e;if((t.answerType===qo.text||t.answerType===qo.selector)&&i.string)return j(j({},e),{},{[t.id]:i.string})}return e},{}):{},is=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;if(typeof e==`string`){let n=e.split(`,`)[1];t(n)}else n(Error(`Unexpected result type`))},r.onerror=()=>n(r.error),r.readAsDataURL(e)}),as=function(){var e=C(function*(){try{return(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(e=>e.stop()),`allowed`}catch(e){return(e==null?void 0:e.name)===`NotAllowedError`?`denied`:`error`}});return function(){return e.apply(this,arguments)}}(),os=()=>String.fromCharCode(Math.floor(Math.random()*26)+97)+Number(Math.random()).toString(16).slice(2)+Date.now().toString(16).slice(4);function ss(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function cs(e,t){if(e==null)return{};var n,r,i=ss(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}I();var ls=[`isFullSize`],us=e=>{let{isFullSize:t=!1}=e,n=cs(e,ls),{failedAssets:r}=uo(),i=Io(n,r),[a,o]=N(0),s=i[a];if(!s)return null;let{imageId:c,imageURL:l,base64:u,contentMode:d=_o.ASPECT_FILL,cornerRadius:f,backgroundColor:p}=s,[m,h]=N(!0),g=m&&l,_=()=>{h(!1)},v=()=>{o(e=>e+1)},y=t?{width:`100%`,height:`100%`}:{width:`auto`,height:`auto`,maxWidth:`100%`,maxHeight:`100%`};return u?U(`img`,{style:j(j({},y),{},{objectFit:Lo(d),borderRadius:f,backgroundColor:G(p)||`transparent`,display:`block`}),src:u,onError:v}):c?U(Uo,{type:c in Ho?c:`default`,contentMode:d,cornerRadius:f,backgroundColor:G(p)||`transparent`,isFullSize:t}):l?U(vt,{children:[g&&U(`div`,{style:{width:`100%`,height:`100%`,backgroundColor:`#e0e0e0`,borderRadius:f}}),U(`img`,{style:j(j({},y),{},{objectFit:Lo(d),borderRadius:f,backgroundColor:G(p)||`transparent`,display:g?`none`:`block`}),src:l,onLoad:_,onError:v})]}):null},ds=({signature:e})=>U(`footer`,{"data-ui":`gui-footer`,part:`gui-footer`,style:{display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`,height:`100%`,width:`100%`},children:U(`a`,{href:``,style:{display:`inline-block`,height:`16px`},children:U(us,j({},e))})});I();var fs={display:`flex`,justifyContent:`center`,alignItems:`center`,height:`36px`,minWidth:`36px`,border:`none`,cursor:`pointer`,padding:0},ps=({dataTestId:e,responseBody:t,image:n,title:r,backgroundColor:i=`transparent`,cornerRadius:a,highlightColor:o})=>{var s;let[c,l]=N(!1),u=c&&o?o:i,{perform:d}=co();return U(`button`,{"data-ui":`gui-close-button`,part:`gui-close-button`,"data-test":e,onClick:()=>{let e=JSON.parse(JSON.stringify(t));Qo(e),d(e,Da.DATA)},className:`hover-button`,style:j(j(j({},fs),a&&{borderRadius:a}),{},{backgroundColor:(s=G(u))==null?`transparent`:s}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[n&&U(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`},children:U(us,j({},n))}),r&&U(`div`,{style:{padding:`0 5px`},children:U(K,j({},r))})]})},ms=({closeButton:e})=>U(`header`,{style:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`flex-end`,alignItems:`center`,paddingInlineEnd:`16px`},"data-ui":`gui-header`,part:`gui-header`,children:U(`div`,{children:e&&U(ps,j({dataTestId:`close-btn`},e))})}),K=({text:e,fontName:t=``,fontSize:n=`17px`,fontColor:r,alignment:i,backgroundColor:a,cornerRadius:o=0,paddings:s,fontWeight:c=vo.NORMAL,htmlFor:l,isGenericTemplate:u=!1})=>{let d=u?go.START:go.LEFT,f=i||d,p=u?Zo(f):Xo(f),m=j(j(j({},u&&{display:`block`}),{},{fontFamily:Vo(t),fontSize:n},u&&{fontWeight:Bo(c)}),{},{color:G(r)||`#000000`,textAlign:p,backgroundColor:G(a)||`transparent`,borderRadius:o,overflowWrap:`break-word`},u&&Po(s)),h=typeof e==`string`&&e.trim()&&jo(e);return l?U(`label`,{"data-ui":`gui-label`,part:`gui-label`,style:m,htmlFor:l,children:h}):U(`div`,{"data-ui":`gui-label`,part:`gui-label`,style:m,children:h})};I();var hs=()=>{let[e,t]=N(!1),[n,r]=N(!1);return{isHovered:e,isPressed:n,interactionHandlers:{onPointerDown:()=>r(!0),onPointerUp:()=>r(!1),onPointerLeave:()=>r(!1),onPointerCancel:()=>r(!1),onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1)}}},gs=({isGenericTemplate:e,isPressed:t,isHovered:n,backgroundColor:r,highlightColor:i,hoverColor:a})=>{let o=G(r)||`transparent`,s=G(i),c=G(a);return e&&t?s||o:e&&n?c||o:!e&&n&&s||o},_s=({title:e,image:t,responseBody:n,url:r,backgroundColor:i=`transparent`,cornerRadius:a,highlightColor:o,hoverColor:s,dataTestId:c,borderColor:l,borderWidth:u,type:d=`RESPONSE_BODY`,paddings:f,isGenericTemplate:p=!1,onClick:m})=>{var h;let{perform:g}=co(),{isHovered:_,isPressed:v,interactionHandlers:y}=hs(),b=gs({isGenericTemplate:p,isPressed:v,isHovered:_,backgroundColor:i,highlightColor:o,hoverColor:s}),x=e=>{if(d===`URL`){r&&window.open(r,`_blank`,`noopener,noreferrer`);return}if(m&&m(e),d!==`RESPONSE_BODY`&&!(d===`FORM`&&n))return;let t=JSON.parse(JSON.stringify(n));Qo(t);let i=d===`FORM`?Da.FORM:Da.DATA;g(t,i)},S=p?j({},Po(f)):{padding:`10px 16px`,height:`50px`},C=j(j({width:`100%`,textAlign:`center`,fontSize:`16px`,fontWeight:`400`,border:`none`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:10,borderRadius:a||0,borderStyle:l&&u?`solid`:void 0,backgroundColor:b,borderColor:(h=G(l))==null?`none`:h,borderWidth:u==null?0:u,overflow:`hidden`,transition:`.3s`,outlineColor:Wo},p&&{WebkitTapHighlightColor:`transparent`}),S);return U(`button`,j(j({"data-ui":`gui-button`,part:`gui-button`,type:d===`FORM`?`submit`:`button`,"data-test":c,style:C},y),{},{onClick:x,children:[t&&U(`div`,{style:{width:`auto`,maxWidth:`30px`,height:`30px`,display:`flex`,alignItems:`center`},children:U(us,j({},t))}),e&&U(`div`,{style:{flexGrow:+!t},children:U(K,j(j({},e),{},{isGenericTemplate:p}))})]}))},vs=[`items`],ys=e=>{let{items:t}=e,n=cs(e,vs);return U(`div`,{part:`gui-buttons`,"data-ui":`gui-buttons`,style:j(j({},{display:`flex`,flexDirection:`row`,flexWrap:`wrap`,alignItems:`center`,alignSelf:`flex-end`,justifyContent:`center`,gap:`8px`,width:`100%`,height:`auto`,alignContent:`flex-end`,paddingTop:`20px`}),n),children:t.map(e=>{var t;return U(_s,j({dataTestId:`button-`+((t=e.title)==null?void 0:t.text)},e),os())})})},bs=({children:e,header:t,footer:n,backgroundColor:r=`white`,backgroundImage:i,buttons:a})=>{let{failedAssets:o}=uo(),s=t?60:10,c=n?66:32;return U(`div`,{part:`gui-base-container`,"data-ui":`gui-base-container`,id:`base-container`,style:j({},j({position:`relative`,display:`flex`,flexGrow:1,flexDirection:`column`,alignItems:`center`,alignContent:`center`,justifyContent:`center`,margin:`0 auto`,paddingTop:`${t?s+10:10}px`,paddingBottom:`${c}px`,paddingInline:`20px`,height:`100%`,width:`100%`,backgroundColor:G(r)},zo(i,o))),children:[t&&U(`div`,{style:{position:`absolute`,top:0,insetInline:0,width:`100%`,height:s},children:U(ms,{closeButton:t.closeButton})}),U(`div`,{style:{height:`100%`,width:`100%`,flex:`1 1 100%`,overflow:`hidden`},children:e}),(a==null?void 0:a.length)&&U(ys,{items:a}),n&&U(`div`,{style:{position:`absolute`,bottom:0,insetInline:0,width:`100%`,height:c,padding:`16px 20px`},children:U(ds,j({},n))})]})},xs=({text:e,fontName:t=``,fontColor:n,alignment:r=go.LEFT,fontSize:i=17,backgroundColor:a,cornerRadius:o=0})=>U(`div`,{"data-ui":`gui-description`,part:`gui-description`,style:{fontFamily:Vo(t),fontSize:i,textAlign:Xo(r),color:G(n)||`#000000`,borderRadius:o,backgroundColor:G(a)||`transparent`,whiteSpace:`pre-line`,overflowWrap:`break-word`},children:e&&jo(e)});I();var Ss=({header:e,footer:t,image:n,title:r,description:i,buttons:a,backgroundColor:o,backgroundImage:s})=>{let c=hn(null),l=hn(null),[u,d]=N(!1);return pn(()=>{var e;let t=l.current,n=c.current;if(!t||!n)return;let r=(e=n.getBoundingClientRect().height)==null?0:e,i=t.getBoundingClientRect().height;d(r>i+2)},[]),U(bs,{header:e,buttons:a,footer:t,backgroundColor:o,backgroundImage:s,children:U(`div`,{part:`gui-status-screen`,style:{display:`flex`,justifyContent:u?`flex-start`:`center`,alignItems:`center`,alignContent:`center`,flex:1,height:`100%`,flexDirection:`column`},children:[n&&U(`div`,{style:po,children:U(us,j({},n))}),(r==null?void 0:r.text)&&U(`div`,{ref:l,style:{width:`100%`,overflow:u?`auto`:`hidden`},children:U(`div`,{ref:c,style:{margin:`0 auto`,fontSize:`20px`,fontWeight:700,maxWidth:`345px`,textAlign:`center`,lineHeight:`1.2`,display:`flex`,flexDirection:`column`,justifyContent:u?`flex-start`:`center`,alignItems:`center`,alignContent:`center`},children:r&&U(K,j({},r))})}),i&&U(`div`,{style:{lineHeight:`28px`,fontWeight:`400`,marginTop:`16px`},children:U(xs,j({},i))})]})})},Cs={width:`100%`,height:`auto`,marginBottom:`32px`,aspectRatio:`1.68`},ws={position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`stretch`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`},Ts=({title:e,header:t,footer:n,image:r,description:i,buttons:a,backgroundColor:o,backgroundImage:s})=>U(bs,{header:t,footer:n,buttons:a,backgroundColor:o,backgroundImage:s,children:U(vt,{children:U(`div`,{part:`gui-info-screen-container`,"data-ui":`gui-info-screen-container`,id:`info-screen-container`,style:j(j({},ws),{},{justifyContent:r?`flex-start`:`center`}),children:[r&&U(`div`,{style:Cs,children:U(us,j({},r))}),e&&U(`div`,{style:{marginBottom:20,lineHeight:`39.2px`},children:U(K,j({},e))}),i&&U(`div`,{style:{lineHeight:`28px`,fontWeight:`400`},children:U(xs,j({},i))})]})})}),Es=({indicatorColor:e=`#7E57C5`,isFullSize:t=!1})=>U(Uo,{type:W.SPINNER,color:e,isFullSize:t}),Ds=({progressView:e,footer:t,backgroundColor:n,backgroundImage:r})=>U(bs,{footer:t,backgroundColor:n,backgroundImage:r,children:U(`div`,{style:{flex:`1 1 100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`20px`,height:`100%`,width:`100%`},children:U(Es,{indicatorColor:G(e==null?void 0:e.indicatorColor)||`#000000`})})}),Os=({title:e,description:t,image:n,backgroundColor:r,cornerRadius:i=0,isLastChild:a})=>U(`div`,{className:`details-item`,style:j(j({},{display:`flex`,alignItems:`flex-start`,justifyContent:`space-between`,borderBottom:a?`none`:`1px solid #E0E0E0`,padding:`16px 0`,gap:16}),{},{backgroundColor:G(r)||`transparent`,borderRadius:i}),children:[U(`div`,{style:{flex:`0 1 auto`,minWidth:0},children:[U(`div`,{style:{marginBottom:5,fontWeight:`bold`,lineHeight:`21px`},children:U(K,j({},e))}),U(`div`,{style:{lineHeight:`21px`,fontWeight:`400`},children:U(xs,j({},t))})]}),U(`div`,{style:{aspectRatio:`1 / 1`,width:120,height:120,flex:`0 0 120px`},children:U(us,j({},n))})]}),ks={display:`flex`,flexDirection:`column`,padding:`0 16px`},As=({items:e,backgroundColor:t,cornerRadius:n=16})=>U(`div`,{className:`details`,style:j(j({},ks),{},{backgroundColor:G(t)||`white`,borderRadius:n}),children:e.map((t,n)=>U(Os,j({isLastChild:n===e.length-1},t),n))});I();var js=({title:e,header:t,footer:n,details:r,buttons:i,backgroundColor:a,backgroundImage:o})=>{let s=hn(null),[c,l]=N(!1);return pn(()=>{s.current&&l(s.current.scrollHeight>s.current.clientHeight)},[]),U(bs,{header:t,buttons:i,footer:n,backgroundColor:a,backgroundImage:o,children:U(`div`,{style:{display:`flex`,flexDirection:`column`,justifyContent:c?`flex-start`:`center`,height:`100%`,minHeight:`100%`,overflow:`auto`},ref:s,children:[U(`div`,{style:{marginBottom:e?`16px`:`0`,fontWeight:400,fontSize:`28px`},children:e&&U(K,j({},e))}),r&&U(As,j({},r))]})})};Vr();var Ms=[`_f`],Ns=[`name`],Ps=[`_f`],Fs=[`ref`,`message`,`type`],Is=[`formControl`],Ls=e=>e.type===`checkbox`,Rs=e=>e instanceof Date,zs=e=>e==null,Bs=e=>typeof e==`object`,Vs=e=>!zs(e)&&!Array.isArray(e)&&Bs(e)&&!Rs(e),Hs=e=>Vs(e)&&e.target?Ls(e.target)?e.target.checked:e.target.value:e,Us=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),Ws=e=>{let t=e.constructor&&e.constructor.prototype;return Vs(t)&&t.hasOwnProperty(`isPrototypeOf`)},Gs=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function Ks(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(Gs&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(Vs(e)&&Ws(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=Ks(e[t]));return r}var qs={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},Js={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},Ys={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},Xs=`form`,Zs=`root`,Qs=[`__proto__`,`constructor`,`prototype`],$s=e=>/^\w*$/.test(e),q=e=>e===void 0,ec=e=>e.split(/[.[\]'"]/g).filter(Boolean),J=(e,t,n)=>{if(!t||!Vs(e))return n;let r=$s(t)?[t]:ec(t);if(r.some(e=>Qs.includes(e)))return n;let i=r.reduce((e,t)=>zs(e)?void 0:e[t],e);return q(i)||i===e?q(e[t])?n:e[t]:i},tc=e=>typeof e==`boolean`,nc=e=>typeof e==`function`,Y=(e,t,n)=>{let r=-1,i=$s(t)?[t]:ec(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=Vs(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(Qs.includes(t))return;e[t]=a,e=e[t]}},rc=L.createContext(null);rc.displayName=`HookFormControlContext`;var ic=()=>L.useContext(rc),ac=(e,t,n,r=!0)=>{let i={};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==Js.all&&(t._proxyFormState[i]=!r||Js.all),n&&(n[i]=!0),e[i]}});return i},oc=Gs?L.useLayoutEffect:L.useEffect;function sc(e){let t=ic(),{control:n=t,disabled:r,name:i,exact:a}=e||{},[o,s]=L.useState(()=>j(j({},n._formState),{},{defaultValues:n._defaultValues})),c=L.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return oc(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!r&&s(j(j(j({},n._formState),e),{},{defaultValues:n._defaultValues}))}}),[i,r,a]),L.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),L.useMemo(()=>ac(o,n,c.current,!1),[o,n])}var cc=e=>typeof e==`string`,lc=(e,t,n,r,i)=>cc(e)?(r&&t.watch.add(e),J(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),J(n,e))):(r&&(t.watchAll=!0),n),uc=e=>zs(e)||!Bs(e),dc=(e,t)=>t.length===0&&!Array.isArray(e)&&!Ws(e);function fc(e,t,n=new WeakMap){if(e===t)return!0;if(uc(e)||uc(t))return Object.is(e,t);if(Rs(e)&&Rs(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(dc(e,r)||dc(t,i))return Object.is(e,t);let a=n.get(e);if(a&&a.has(t))return!0;a?a.add(t):n.set(e,new WeakSet([t]));for(let i of r){let r=e[i];if(!(i in t))return!1;if(i!==`ref`){let e=t[i];if(Rs(r)&&Rs(e)||(Vs(r)||Array.isArray(r))&&(Vs(e)||Array.isArray(e))?!fc(r,e,n):!Object.is(r,e))return!1}}return!0}function pc(e){let t=ic(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=L.useRef(i),l=L.useRef(s),u=L.useRef(void 0),d=L.useRef(n),f=L.useRef(r);l.current=s;let[p,m]=L.useState(()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e}),h=L.useCallback(e=>{let t=lc(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),g=L.useCallback(e=>{if(!a){let t=lc(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);fc(e,u.current)||(m(e),u.current=e)}else m(t)}},[n._formValues,n._names,a,r]);oc(()=>((d.current!==n||!fc(f.current,r))&&(d.current=n,f.current=r,g()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{g(e.values)}})),[n,o,r,g]),L.useEffect(()=>n._removeUnmounted());let _=d.current!==n,v=f.current,y=L.useMemo(()=>{if(a)return null;let e=!_&&!fc(v,r);return _||e?h():null},[a,_,r,v,h]);return y===null?p:y}function mc(e){let t=ic(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=Us(i._names.array,n),l=pc({control:i,name:n,defaultValue:L.useMemo(()=>J(i._formValues,n,J(i._defaultValues,n,o)),[i,n,o]),exact:s}),u=sc({control:i,name:n,exact:s}),d=L.useRef(e),f=L.useRef(null),p=L.useRef(i.register(n,j(j({},e.rules),{},{value:l},tc(e.disabled)?{disabled:e.disabled}:{})));d.current=e;let m=L.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!J(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!J(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!J(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!J(u.validatingFields,n)},error:{enumerable:!0,get:()=>J(u.errors,n)}}),[u,n]),h=L.useCallback(e=>{let t=Hs(e);return J(i._fields,n)||(p.current=i.register(n,j(j({},d.current.rules),{},{value:t}))),p.current.onChange({target:{value:Hs(e),name:n},type:qs.CHANGE})},[n,i]),g=L.useCallback(()=>p.current.onBlur({target:{value:J(i._formValues,n),name:n},type:qs.BLUR}),[n,i._formValues]),_=L.useCallback(e=>{e&&(f.current={focus:()=>nc(e.focus)&&e.focus(),select:()=>nc(e.select)&&e.select(),setCustomValidity:t=>nc(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>nc(e.reportValidity)&&e.reportValidity()});let t=J(i._fields,n);t&&t._f&&e&&(t._f.ref=f.current)},[i._fields,n]),v=L.useMemo(()=>j(j({name:n,value:l},tc(r)||u.disabled?{disabled:u.disabled||r}:{}),{},{onChange:h,onBlur:g,ref:_}),[n,r,u.disabled,h,g,_,l]);return L.useEffect(()=>{let e=i._options.shouldUnregister||a;i.register(n,j(j({},d.current.rules),tc(d.current.disabled)?{disabled:d.current.disabled}:{}));let t=(e,t)=>{let n=J(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=Ks(J(a?i._defaultValues:i._options.values||i._defaultValues,n,J(i._options.defaultValues,n,d.current.defaultValue)));Y(i._defaultValues,n,e),q(J(i._formValues,n))&&Y(i._formValues,n,e)}if(!c&&i.register(n),f.current){let e=J(i._fields,n);e&&e._f&&(e._f.ref=f.current)}return()=>{(c?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,c,a]),L.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),L.useMemo(()=>({field:v,formState:u,fieldState:m}),[v,u,m])}var hc=e=>e.render(mc(e)),gc=L.createContext(null);gc.displayName=`HookFormContext`;var _c=()=>L.useContext(gc),vc=({children:e,watch:t,getValues:n,getFieldState:r,setError:i,clearErrors:a,setValue:o,setValues:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:m,register:h,setFocus:g,subscribe:_})=>{let v=L.useMemo(()=>({watch:t,getValues:n,getFieldState:r,setError:i,clearErrors:a,setValue:o,setValues:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:m,register:h,setFocus:g,subscribe:_}),[a,m,l,r,n,f,h,d,u,i,g,o,s,_,c,p,t]);return L.createElement(gc.Provider,{value:v},L.createElement(rc.Provider,{value:v.control},e))},yc=(e,t,n,r,i)=>t?j(j({},n[e]),{},{types:j(j({},n[e]&&n[e].types?n[e].types:{}),{},{[r]:i||!0})}):{},bc=e=>Array.isArray(e)?e.filter(Boolean):[],xc=e=>Array.isArray(e)?e:[e],Sc=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function Cc(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&Vs(i)&&a){let e=Cc(i,a);Vs(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var wc=e=>Vs(e)&&!Object.keys(e).length,Tc=e=>e.type===`file`,Ec=e=>{if(!Gs)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Dc=e=>e.type===`select-multiple`,Oc=e=>e.type===`radio`,kc=e=>Oc(e)||Ls(e),Ac=e=>Ec(e)&&e.isConnected;function jc(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;){if(zs(e)){e=void 0;break}e=e[t[r]],r++}return e}function Mc(e){for(let t in e)if(e.hasOwnProperty(t)&&!q(e[t]))return!1;return!0}function Nc(e,t){if(cc(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:$s(t)?[t]:ec(t),r=n.length===1?e:jc(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(Vs(r)&&wc(r)||Array.isArray(r)&&Mc(r))&&Nc(e,n.slice(0,-1)),e}var Pc=e=>{for(let t in e)if(nc(e[t]))return!0;return!1};function Fc(e){return Array.isArray(e)||Vs(e)&&!Pc(e)}function Ic(e,t={}){for(let n in e){let r=e[n];Fc(r)?(t[n]=Array.isArray(r)?[]:{},Ic(r,t[n])):q(r)||(t[n]=!0)}return t}function Lc(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){let t=e.map(e=>Lc(e));return t.some(e=>e!==void 0)?t:void 0}if(Vs(e)){let t={};for(let n in e){let r=Lc(e[n]);q(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function Rc(e,t,n){n||(n=Ic(t));for(let r in e){let i=e[r];if(Fc(i))q(t)||uc(n[r])?n[r]=Ic(i,Array.isArray(i)?[]:{}):Rc(i,zs(t)?{}:t[r],n[r]);else{let e=t[r];n[r]=!fc(i,e)}}return Lc(n)||{}}var zc={value:!1,isValid:!1},Bc={value:!0,isValid:!0},Vc=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!q(e[0].attributes.value)?q(e[0].value)||e[0].value===``?Bc:{value:e[0].value,isValid:!0}:Bc:zc}return zc},Hc=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>q(e)?e:t?e===``?NaN:e&&+e:n&&cc(e)?new Date(e):r?r(e):e,Uc={isValid:!1,value:null},Wc=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Uc):Uc;function Gc(e){let t=e.ref;return Tc(t)?t.files:Oc(t)?Wc(e.refs).value:Dc(t)?[...t.selectedOptions].map(({value:e})=>e):Ls(t)?Vc(e.refs).value:Hc(q(t.value)?e.ref.value:t.value,e)}var Kc=(e,t,n,r)=>{let i={};for(let n of e){let e=J(t,n);e&&Y(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},qc=e=>e instanceof RegExp,Jc=e=>q(e)?e:qc(e)?e.source:Vs(e)?qc(e.value)?e.value.source:e.value:e,Yc=e=>({isOnSubmit:!e||e===Js.onSubmit,isOnBlur:e===Js.onBlur,isOnChange:e===Js.onChange,isOnAll:e===Js.all,isOnTouch:e===Js.onTouched}),Xc=`AsyncFunction`,Zc=e=>!!e&&!!e.validate&&!!(nc(e.validate)&&e.validate.constructor.name===Xc||Vs(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Xc)),Qc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),$c=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(`${t}.`))),el=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=J(e,i);if(n){let{_f:e}=n,a=cs(n,Ms);if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(el(a,t))break}else if(Vs(a)&&el(a,t))break}}};function tl(e,t,n){let r=J(e,n);if(r||$s(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=J(t,r),o=J(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var nl=(e,t,n,r)=>{n(e);let{name:i}=e,a=cs(e,Ns);return wc(a)||r&&Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||Js.all))},rl=(e,t,n)=>!e||!t||e===t||xc(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),il=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e,al=(e,t)=>!bc(J(e,t)).length&&Nc(e,t),ol=(e,t,n)=>{let r=J(e,n),i=Array.isArray(r)?r:[];return Y(i,Zs,t[n]),Y(e,n,i),e};function sl(e,t,n=`validate`){if(cc(e)||Array.isArray(e)&&e.every(cc)||tc(e)&&!e)return{type:n,message:cc(e)?e:``,ref:t}}var cl=e=>Vs(e)&&!qc(e)?e:{value:e,message:``},ll=function(){var e=C(function*(e,t,n,r,i,a){let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_}=e._f,v=J(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{if(i&&y.reportValidity){let t=tc(e)?``:e||``;s?s.forEach(e=>e.setCustomValidity(t)):y.setCustomValidity(t),y.reportValidity()}},x={},S=Oc(o),C=Ls(o),w=S||C,T=(g||Tc(o))&&q(o.value)&&q(v)||Ec(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length,ee=yc.bind(null,h,r,x),E=(e,t,n,r=Ys.maxLength,i=Ys.minLength)=>{let a=e?t:n;x[h]=j({type:e?r:i,message:a,ref:o},ee(e?r:i,a))};if(a?!Array.isArray(v)||!v.length:c&&(!w&&(T||zs(v))||tc(v)&&!v||C&&!Vc(s).isValid||S&&!Wc(s).isValid)){let{value:e,message:t}=cc(c)?{value:!!c,message:c}:cl(c);if(e&&(x[h]=j({type:Ys.required,message:t,ref:y},ee(Ys.required,t)),!r))return b(t),x}if(!T&&(!zs(d)||!zs(f))){let e,t,n=cl(f),i=cl(d);if(!zs(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;zs(n.value)||(e=r>n.value),zs(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(v),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;cc(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),cc(i.value)&&v&&(t=s?a(v)<a(i.value):c?v<i.value:r<new Date(i.value))}if((e||t)&&(E(!!e,n.message,i.message,Ys.max,Ys.min),!r))return b(x[h].message),x}if((l||u)&&!T&&(cc(v)||a&&Array.isArray(v))){let e=cl(l),t=cl(u),n=!zs(e.value)&&v.length>+e.value,i=!zs(t.value)&&v.length<+t.value;if((n||i)&&(E(n,e.message,t.message),!r))return b(x[h].message),x}if(p&&!T&&cc(v)){let{value:e,message:t}=cl(p);if(qc(e)&&!v.match(e)&&(x[h]=j({type:Ys.pattern,message:t,ref:o},ee(Ys.pattern,t)),!r))return b(t),x}if(m){if(nc(m)){let e=sl(yield m(v,n),y);if(e&&(x[h]=j(j({},e),ee(Ys.validate,e.message)),!r))return b(e.message),x}else if(Vs(m)){let e={};for(let t in m){if(!wc(e)&&!r)break;let i=sl(yield m[t](v,n),y,t);i&&(e=j(j({},i),ee(t,i.message)),b(i.message),r&&(x[h]=e))}if(!wc(e)&&(x[h]=j({ref:y},e),!r))return x}}return b(!0),x});return function(t,n,r,i,a,o){return e.apply(this,arguments)}}(),ul={mode:Js.onSubmit,reValidateMode:Js.onChange,shouldFocusError:!0},dl={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function fl(e={}){let t=j(j({},ul),e),n=j(j({},Ks(dl)),{},{isLoading:nc(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1}),r={},i=(Vs(t.defaultValues)||Vs(t.values))&&Ks(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:Ks(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,l=0,u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d=j({},u),f=j({},d),p={array:Sc(),state:Sc()},m=t.criteriaMode===Js.all,h=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},g=function(){var e=C(function*(e){if(!o.keepIsValid&&!t.disabled&&(d.isValid||f.isValid||e)){let e;t.resolver?(e=wc((yield E()).errors),_()):e=yield re({fields:r,onlyCheckValid:!0,eventType:qs.VALID}),e!==n.isValid&&p.state.next({isValid:e})}});return function(t){return e.apply(this,arguments)}}(),_=(e,r)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?Y(n.validatingFields,e,r):Nc(n.validatingFields,e))}),p.state.next({validatingFields:n.validatingFields,isValidating:!wc(n.validatingFields)}))},v=()=>{n.dirtyFields=Rc(i,a)},y=(e,i=[],s,c,l=!0,u=!0)=>{if(c&&s&&!t.disabled){if(o.action=!0,u&&Array.isArray(J(r,e))){let t=s(J(r,e),c.argA,c.argB);l&&Y(r,e,t)}if(u&&Array.isArray(J(n.errors,e))){let t=s(J(n.errors,e),c.argA,c.argB);l&&Y(n.errors,e,t),al(n.errors,e)}if((d.touchedFields||f.touchedFields)&&u&&Array.isArray(J(n.touchedFields,e))){let t=s(J(n.touchedFields,e),c.argA,c.argB);l&&Y(n.touchedFields,e,t)}(d.dirtyFields||f.dirtyFields)&&v(),p.state.next({name:e,isDirty:O(e,i),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Y(a,e,i)},b=(e,t)=>{Y(n.errors,e,t),n.errors=j({},n.errors),p.state.next({errors:n.errors})},x=e=>{n.errors=e,p.state.next({errors:n.errors,isValid:!1})},S=e=>{let t=$s(e)?[e]:ec(e),n=a,r=i;for(let e=0;e<t.length-1;e++){let i=t[e];if(n=zs(n)?n:n[i],r=zs(r)?r:r[i],n===null&&r!==null)return!0}return!1},w=(t,c,l,u)=>{let m=J(r,t);if(m){if(S(t))return;let r=q(J(a,t)),h=J(a,t,q(l)?J(i,t):l);q(h)||u&&u.defaultChecked||c?Y(a,t,c?h:Gc(m._f)):oe(t,h),o.mount&&!o.action&&(g(),r&&n.isDirty&&(d.isDirty||f.isDirty)&&(O()||(n.isDirty=!1,p.state.next(j({},n)))),e.shouldUnregister&&r&&!q(J(a,t))&&$c(t,s)&&(o.watch=!0))}},T=(e,r,o,s,c)=>{let l=!1,u=!1,m={name:e};if(!t.disabled){if(!o||s){(d.isDirty||f.isDirty)&&(u=n.isDirty,n.isDirty=m.isDirty=O(),l=u!==m.isDirty);let t=fc(J(i,e),r);u=!!J(n.dirtyFields,e),t===n.isDirty?t?Nc(n.dirtyFields,e):Y(n.dirtyFields,e,!0):n.dirtyFields=Rc(i,a),m.dirtyFields=n.dirtyFields,l=l||(d.dirtyFields||f.dirtyFields)&&u!==!t}if(o){let t=J(n.touchedFields,e);t||(Y(n.touchedFields,e,o),m.touchedFields=n.touchedFields,l=l||(d.touchedFields||f.touchedFields)&&t!==o)}l&&c&&p.state.next(m)}return l?m:{}},ee=(e,r,i,a)=>{let o=J(n.errors,e),s=(d.isValid||f.isValid)&&tc(r)&&n.isValid!==r;if(t.delayError&&i?(c=h(()=>b(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?Y(n.errors,e,i):Nc(n.errors,e),n.errors=j({},n.errors)),(i?!fc(o,i):o)||!wc(a)||s){let t=j(j(j({},a),s&&tc(r)?{isValid:r}:{}),{},{errors:n.errors,name:e});n=j(j({},n),t),p.state.next(t)}},E=function(){var e=C(function*(e){return _(e,!0),yield t.resolver(a,t.context,Kc(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))});return function(t){return e.apply(this,arguments)}}(),te=function(){var e=C(function*(e){let{errors:t}=yield E(e);if(_(e),e){for(let r of e){let e=J(t,r);e?s.array.has(r)&&Vs(e)&&!Object.keys(e).some(e=>!Number.isNaN(Number(e)))?ol(n.errors,{[r]:e},r):Y(n.errors,r,e):Nc(n.errors,r)}n.errors=j({},n.errors)}else n.errors=t;return t});return function(t){return e.apply(this,arguments)}}(),ne=function(){var t=C(function*({name:t,eventType:r}){if(e.validate){let i=yield e.validate({formValues:a,formState:n,name:t,eventType:r});if(Vs(i))for(let e in i){let t=i[e];t&&ge(`${Xs}.${e}`,{message:cc(t.message)?t.message:``,type:t.type||Ys.validate})}else cc(i)||!i?ge(Xs,{message:i||``,type:Ys.validate}):he(Xs);return i}return!0});return function(e){return t.apply(this,arguments)}}(),re=function(){var r=C(function*({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}}){if(e.validate&&(l.runRootValidation=!0,!(yield ne({name:o,eventType:c}))&&(l.valid=!1,i)))return l.valid;for(let o in r){let u=r[o];if(u){let{_f:r}=u,p=cs(u,Ps);if(r){let o=s.array.has(r.name),c=u._f&&Zc(u._f),p=d.validatingFields||d.isValidating||f.validatingFields||f.isValidating;c&&p&&_([r.name],!0);let h=yield ll(u,s.disabled,a,m,t.shouldUseNativeValidation&&!i,o);if(c&&p&&_([r.name]),h[r.name]&&(l.valid=!1,i)||(!i&&(J(h,r.name)?o?ol(n.errors,h,r.name):Y(n.errors,r.name,h[r.name]):Nc(n.errors,r.name)),e.shouldUseNativeValidation&&h[r.name]))break}!wc(p)&&(yield re({context:l,onlyCheckValid:i,fields:p,name:o,eventType:c}))}}return l.valid});return function(e){return r.apply(this,arguments)}}(),D=()=>{for(let e of s.unMount){let t=J(r,e);t&&(t._f.refs?t._f.refs.every(e=>!Ac(e)):!Ac(t._f.ref))&&be(e)}s.unMount=new Set},O=(e,n)=>!t.disabled&&(e&&n&&Y(a,e,n),!fc(pe(),i)),ie=(e,t,n)=>lc(e,s,j({},o.mount?a:q(t)?i:cc(e)?{[e]:t}:t),n,t),ae=e=>bc(J(o.mount?a:i,e,t.shouldUnregister?J(i,e,[]):[])),oe=(e,t,n={},i=!1)=>{let o=J(r,e),s=t;if(o){let n=o._f;n&&(!n.disabled&&Y(a,e,Hc(t,n)),s=Ec(n.ref)&&zs(t)?``:t,Dc(n.ref)?[...n.ref.options].forEach(e=>e.selected=s.includes(e.value)):n.refs?Ls(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(s)?!!s.find(t=>t===e.value):s===e.value||!!s)}):n.refs.forEach(e=>e.checked=e.value===s):Tc(n.ref)?n.ref.value=``:(n.ref.value=s,n.ref.type||p.state.next({name:e,values:i?a:Ks(a)})))}(n.shouldDirty||n.shouldTouch)&&T(e,s,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&fe(e)},se=(e,t,n,i=!1)=>{for(let a in t){if(!t.hasOwnProperty(a))return;let o=t[a],c=e+`.`+a,l=J(r,c);(s.array.has(e)||Vs(o)||l&&!l._f)&&!Rs(o)?se(c,o,n,i):oe(c,o,n,i)}},k=(e,t,i,c)=>{let l=J(r,e),u=s.array.has(e),m=c?t:Ks(t),h=fc(J(a,e),m);if(h||Y(a,e,m),u)p.array.next({name:e,values:c?a:Ks(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&i.shouldDirty&&(v(),p.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:O(e,m)}));else{let t=Array.isArray(m)&&!m.length||wc(m);!l||l._f||zs(m)||t?oe(e,m,i,c):se(e,m,i,c)}if(!h){let t=$c(e,s),r=c?a:Ks(a);p.state.next(j(j({},t&&n),{},{name:o.mount||t?e:void 0,values:r}))}},ce=(e,t,n={})=>k(e,t,n,!1),le=(e,t={})=>{let r=nc(e)?e(a):e;if(!fc(a,r)){a=j(j({},a),r);for(let e of s.mount)k(e,J(r,e),t,!0);p.state.next(j(j({},n),{},{name:void 0,type:void 0,values:a})),t.shouldValidate&&g()}},ue=function(){var i=C(function*(i){o.mount=!0;let l=i.target,u=l.name,h=!0,v=J(r,u),y=e=>{h=Number.isNaN(e)||Rs(e)&&isNaN(e.getTime())||fc(e,J(a,u,e))},b=Yc(t.mode),x=Yc(t.reValidateMode);if(v){let o,S,C=l.type?Gc(v._f):Hs(i),w=i.type===qs.BLUR||i.type===qs.FOCUS_OUT,te=!Qc(v._f)&&!e.validate&&!t.resolver&&!J(n.errors,u)&&!v._f.deps||il(w,J(n.touchedFields,u),n.isSubmitted,x,b),D=$c(u,s,w);Y(a,u,C),w?(!l||!l.readOnly)&&(v._f.onBlur&&v._f.onBlur(i),c&&c(0)):v._f.onChange&&v._f.onChange(i);let O=T(u,C,w),ie=!wc(O)||D;if(!w&&p.state.next({name:u,type:i.type,values:Ks(a)}),te)return(d.isValid||f.isValid)&&(t.mode===`onBlur`?w&&g():w||g()),ie&&p.state.next(j({name:u},D?{}:O));if(!t.resolver&&e.validate&&(yield ne({name:u,eventType:i.type})),!w&&D&&p.state.next(j({},n)),t.resolver){let{errors:e}=yield E([u]);if(_([u]),y(C),!h){!wc(O)&&p.state.next(O);return}let t=tl(n.errors,r,u),i=tl(e,r,t.name||u);o=i.error,u=i.name,S=wc(e)}else _([u],!0),o=(yield ll(v,s.disabled,a,m,t.shouldUseNativeValidation))[u],_([u]),y(C),h&&(o?S=!1:(d.isValid||f.isValid)&&(S=yield re({fields:r,onlyCheckValid:!0,name:u,eventType:i.type})));h&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&fe(v._f.deps),ee(u,S,o,O))}});return function(e){return i.apply(this,arguments)}}(),de=(e,t)=>{if(J(n.errors,t)&&e.focus)return e.focus(),1},fe=function(){var e=C(function*(e,i={}){let a,o,c=xc(e);if(t.resolver){let t=yield te(q(e)?e:c);a=wc(t),o=e?!c.some(e=>J(t,e)):a}else e?(o=(yield Promise.all(c.map(function(){var e=C(function*(e){let t=J(r,e);return yield re({fields:t&&t._f?{[e]:t}:t,eventType:qs.TRIGGER})});return function(t){return e.apply(this,arguments)}}()))).every(Boolean),(o||n.isValid)&&g()):o=a=yield re({fields:r,name:e,eventType:qs.TRIGGER});return p.state.next(j(j(j({},!cc(e)||(d.isValid||f.isValid)&&a!==n.isValid?{}:{name:e}),t.resolver||!e?{isValid:a}:{}),{},{errors:n.errors})),i.shouldFocus&&!o&&el(r,de,e?c:s.mount),o});return function(t){return e.apply(this,arguments)}}(),pe=(e,t)=>{let r=j({},o.mount?a:i);return t&&(r=Cc(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),q(e)?r:cc(e)?J(r,e):e.map(e=>J(r,e))},me=(e,t)=>({invalid:!!J((t||n).errors,e),isDirty:!!J((t||n).dirtyFields,e),error:J((t||n).errors,e),isValidating:!!J(n.validatingFields,e),isTouched:!!J((t||n).touchedFields,e)}),he=e=>{let t=e?xc(e):void 0;t==null||t.forEach(e=>Nc(n.errors,e)),t?t.forEach(e=>{p.state.next({name:e,errors:n.errors})}):p.state.next({errors:{}})},ge=(e,t,i)=>{let a=(J(r,e,{_f:{}})._f||{}).ref,o=J(n.errors,e)||{},{ref:s,message:c,type:l}=o,u=cs(o,Fs);Y(n.errors,e,j(j(j({},u),t),{},{ref:a})),p.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},_e=(e,t)=>nc(e)?p.state.subscribe({next:n=>`values`in n&&e(n.values||ie(void 0,t),n)}):ie(e,t,!0),ve=e=>p.state.subscribe({next:t=>{if(rl(e.name,t.name,e.exact)&&nl(t,e.formState||d,Ae,e.reRenderRoot)){let r=j({},a);e.callback(j(j(j({values:r},n),t),{},{defaultValues:i}))}}}).unsubscribe,ye=e=>(o.mount=!0,f=j(j({},f),e.formState),ve(j(j({},e),{},{formState:j(j({},u),e.formState)}))),be=(e,o={})=>{for(let c of e?xc(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(Nc(r,c),Nc(a,c)),!o.keepError&&Nc(n.errors,c),!o.keepDirty&&Nc(n.dirtyFields,c),!o.keepTouched&&Nc(n.touchedFields,c),!o.keepIsValidating&&Nc(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&Nc(i,c);p.state.next({values:Ks(a)}),p.state.next(j(j({},n),o.keepDirty?{isDirty:O()}:{})),!o.keepIsValid&&g()},xe=({disabled:e,name:t})=>{if(tc(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&g()}},Se=(e,n={})=>{let a=J(r,e),c=tc(n.disabled)||tc(t.disabled),l=!s.registerName.has(e)&&a&&a._f&&!a._f.mount;return Y(r,e,j(j({},a||{}),{},{_f:j(j({},a&&a._f?a._f:{ref:{name:e}}),{},{name:e,mount:!0},n)})),s.mount.add(e),a&&!l?xe({disabled:tc(n.disabled)?n.disabled:t.disabled,name:e}):w(e,!0,n.value),j(j(j({},c?{disabled:n.disabled||t.disabled}:{}),t.progressive?{required:!!n.required,min:Jc(n.min),max:Jc(n.max),minLength:Jc(n.minLength),maxLength:Jc(n.maxLength),pattern:Jc(n.pattern)}:{}),{},{name:e,onChange:ue,onBlur:ue,ref:c=>{if(c){s.registerName.add(e),Se(e,n),s.registerName.delete(e),a=J(r,e);let t=q(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=kc(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;Y(r,e,{_f:j(j({},a._f),o?{refs:[...l.filter(Ac),t,...Array.isArray(J(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t})}),w(e,!1,void 0,t)}else a=J(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(Us(s.array,e)&&o.action)&&s.unMount.add(e)}})},Ce=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&el(r,de,s.mount),we=e=>{tc(e)&&(p.state.next({disabled:e}),el(r,(t,n)=>{let i=J(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},Te=(e,i)=>function(){var o=C(function*(o){let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=Ks(a);if(p.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=yield E();_(),n.errors=e,l=Ks(t)}else yield re({fields:r,eventType:qs.SUBMIT});if(s.disabled.size)for(let e of s.disabled)Nc(l,e);if(Nc(n.errors,Zs),wc(n.errors)){p.state.next({errors:{}});try{yield e(l,o)}catch(e){c=e}}else i&&(yield i(j({},n.errors),o)),Ce(),setTimeout(Ce);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:wc(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c});return function(e){return o.apply(this,arguments)}}(),Ee=(e,t={})=>{J(r,e)&&(q(t.defaultValue)?ce(e,Ks(J(i,e))):(ce(e,t.defaultValue),Y(i,e,Ks(t.defaultValue))),t.keepTouched||Nc(n.touchedFields,e),t.keepDirty||(Nc(n.dirtyFields,e),n.isDirty=t.defaultValue?O(e,Ks(J(i,e))):O()),t.keepError||(Nc(n.errors,e),d.isValid&&g()),p.state.next(j({},n)))},De=(e,c={})=>{let l=e?Ks(e):i,u=Ks(l),f=wc(e),m=u;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(Rc(i,a))]);for(let t of Array.from(e)){let e=J(n.dirtyFields,t),r=J(a,t),i=J(m,t);e&&!q(r)?Y(m,t,r):!e&&!q(i)&&ce(t,i)}}else{if(Gs&&q(e))for(let e of s.mount){let t=J(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Ec(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)ce(e,J(m,e));else r={}}if(t.shouldUnregister){if(a=c.keepDefaultValues?Ks(i):{},c.keepFieldsRef)for(let e of s.mount)Y(a,e,J(m,e))}else a=Ks(m);p.array.next({values:j({},m)}),p.state.next({values:j({},m)})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!d.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!wc(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(n.errors={}),p.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:f?!1:c.keepDirty?n.isDirty:c.keepValues?O():!(!c.keepDefaultValues||fc(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:f?{}:c.keepDirtyValues?c.keepDefaultValues&&a?Rc(i,a):n.dirtyFields:c.keepDefaultValues&&e?Rc(i,e):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Oe=(e,n)=>De(nc(e)?e(a):e,j(j({},t.resetOptions),n)),ke=(e,t={})=>{let n=J(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&nc(e.select)&&e.select()})}},Ae=e=>{n=j(j({},n),e)},je={control:{register:Se,unregister:be,getFieldState:me,handleSubmit:Te,setError:ge,_subscribe:ve,_runSchema:E,_updateIsValidating:_,_focusError:Ce,_getWatch:ie,_getDirty:O,_setValid:g,_setFieldArray:y,_setDisabledField:xe,_setErrors:x,_getFieldArray:ae,_reset:De,_resetDefaultValues:()=>nc(t.defaultValues)&&t.defaultValues().then(e=>{Oe(e,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:D,_disableForm:we,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t=j(j({},t),e)}},subscribe:ye,trigger:fe,register:Se,handleSubmit:Te,watch:_e,setValue:ce,setValues:le,getValues:pe,reset:Oe,resetField:Ee,resetDefaultValues:(e,t={})=>{if(i=Ks(e),!t.keepDirty){let e=Rc(i,a);n.dirtyFields=e,n.isDirty=!wc(e)}t.keepIsValid||g(),p.state.next(j(j({},n),{},{defaultValues:i}))},clearErrors:he,unregister:be,setError:ge,setFocus:ke,getFieldState:me};return j(j({},je),{},{formControl:je})}function pl(e={}){let t=L.useRef(void 0),n=L.useRef(void 0),r=L.useRef(e.formControl),[i,a]=L.useState(()=>j(j({},Ks(dl)),{},{isLoading:nc(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:nc(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl){if(r.current=e.formControl,e.formControl)t.current=j(j({},e.formControl),{},{formState:i}),e.defaultValues&&!nc(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let n=fl(e),{formControl:r}=n;t.current=j(j({},cs(n,Is)),{},{formState:i})}}let o=t.current.control;return o._options=e,oc(()=>{let e=o._subscribe({formState:o._proxyFormState,callback:()=>a(j(j({},o._formState),{},{defaultValues:o._defaultValues})),reRenderRoot:!0});return a(e=>j(j({},e),{},{isReady:!0})),o._formState.isReady=!0,e},[o]),L.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),L.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),L.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),L.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),L.useEffect(()=>{if(o._proxyFormState.isDirty){let e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}},[o,i.isDirty]),L.useEffect(()=>{var t;e.values&&!fc(e.values,n.current)?(o._reset(e.values,j({keepFieldsRef:!0},o._options.resetOptions)),(t=o._options.resetOptions)!=null&&t.keepIsValid||o._setValid(),n.current=e.values,a(e=>j({},e))):o._resetDefaultValues()},[o,e.values]),L.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next(j({},o._formState))),o._removeUnmounted()}),t.current.formState=L.useMemo(()=>ac(i,o),[o,i]),t.current}var ml=(e,t,n)=>{let r={};return e.forEach((e,i)=>{if(e.type===Jo.NOT_EMPTY&&(r.required=n=>!t||!es(n)||e.message),e.type===Jo.REGEX&&`regex`in e){let n=new RegExp(e.regex);r[`regex_${i}`]=r=>!t&&!r||typeof r==`string`&&n.test(r)||e.message}`passed`in e&&e.passed===!1&&(r[`remote_${i}`]=()=>n!=null&&n()?!0:e.message)}),r};I();var hl=e=>e.filter(e=>`passed`in e&&e.passed===!1),gl=e=>{if(!e)return[];if(e.types){let t=Object.values(e.types).filter(e=>typeof e==`string`&&!!e);if(t.length)return t}return typeof e.message==`string`?[e.message]:[]},_l=({name:e,validators:t,required:n,form:r})=>{let{control:i,clearErrors:a,formState:o,getFieldState:s,setError:c}=r,l=ml(t,n,()=>s(e,o).isDirty),u=()=>{let n=hl(t);if(!n.length)return;let r=n.reduce((e,t,n)=>(e[`remote_${n}`]=t.message,e),{});c(e,{type:`remote`,message:n[0].message,types:r})};return pn(()=>{u()},[t,e,c]),{control:i,validate:l,clearFieldErrors:()=>{a(e)},getErrorMessages:gl}},vl=({children:e,backgroundColor:t,cornerRadius:n=0,isError:r,isRequired:i,validationBorderColor:a,validationBorderWidth:o})=>U(`div`,{style:j({position:`relative`,flexShrink:0,width:`100%`,fontWeight:300,lineHeight:`140%`,backgroundColor:G(t)||`transparent`,borderRadius:n,padding:`16px`,boxSizing:`border-box`,height:`auto`},r&&j(j({},G(a)&&{borderColor:a,borderStyle:`solid`}),o&&{borderWidth:o})),children:[i&&U(`span`,{style:{color:G(a),position:`absolute`,insetInlineStart:`6px`,top:`18px`},children:`*`}),e]}),yl=({validationErrorsTypes:e,title:t})=>e?U(`div`,{style:{width:`100%`,fontSize:12},children:Object.entries(e).map(([e,n])=>U(K,j(j({},t),{},{text:n}),e))}):null,bl=e=>!e||e===bo.FREE_TEXT?{type:`text`}:e===bo.EMAIL?{type:`email`}:e===bo.NUMBER?{type:`number`}:e===bo.SECURE?{type:`password`}:{type:`text`},xl=e=>e===bo.EMAIL?{type:`text`,inputMode:`email`,autoComplete:`email`}:e===bo.NUMBER?{type:`text`,inputMode:`decimal`}:bl(e),Sl=({layout:e,dataSourceQuestion:t,register:n,validate:r,clearFieldErrors:i,shouldDismissKeyboardOnEnter:a=!1})=>{var o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S;let C=String(t.id),w=n(C,{required:!!t.required,validate:r});return U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`},children:[U(K,j(j({},e.title),{},{text:t.text,htmlFor:C})),U(`input`,j(j(j(j({},w),{},{onChange:e=>{w.onChange(e),i()},id:C},a?xl((o=e.textField)==null?void 0:o.inputType):bl((s=e.textField)==null?void 0:s.inputType)),a&&{enterKeyHint:`done`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.currentTarget.blur())}}),{},{style:{fontFamily:(c=e==null||(l=e.textField)==null?void 0:l.fontName)==null?`sans-serif`:c,fontSize:(u=e==null||(d=e.textField)==null?void 0:d.fontSize)==null?15:u,color:(f=G(e==null||(p=e.textField)==null?void 0:p.fontColor))==null?`#000000`:f,height:`42px`,borderWidth:(m=e==null||(h=e.textField)==null?void 0:h.borderWidth)==null?1:m,borderColor:(g=G(e==null||(_=e.textField)==null?void 0:_.borderColor))==null?`#d9d9d9`:g,borderStyle:`solid`,borderRadius:(v=e==null||(y=e.textField)==null?void 0:y.cornerRadius)==null?8:v,padding:`11px`,boxSizing:`border-box`,backgroundColor:(b=G(e==null||(x=e.textField)==null?void 0:x.backgroundColor))==null?`#FFFFFF`:b,outlineColor:Wo},placeholder:(S=t.placeholder)==null?``:S,"data-id":C}))]})},Cl=({layout:e,dataSourceQuestion:t,register:n,validate:r,clearFieldErrors:i})=>{var a,o,s,c,l,u,d,f,p,m,h,g,_;let v=String(t.id),y=n(v,{required:!!t.required,validate:r});return U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`},children:[U(K,j(j({},e.title),{},{text:t.text,htmlFor:v})),U(`textarea`,j(j({},y),{},{onChange:e=>{y.onChange(e),i()},id:v,placeholder:(a=t.placeholder)==null?``:a,onInput:e=>{e.currentTarget.style.height=`auto`,e.currentTarget.style.height=`${e.currentTarget.scrollHeight-15}px`},"data-id":v,style:{fontFamily:`sans-serif`,fontSize:(o=e==null||(s=e.textField)==null?void 0:s.fontSize)==null?15:o,color:(c=G(e==null||(l=e.textField)==null?void 0:l.fontColor))==null?`#000000`:c,resize:`none`,overflow:`hidden`,height:`42px`,minHeight:`42px`,borderWidth:(u=e==null||(d=e.textField)==null?void 0:d.borderWidth)==null?1:u,borderColor:(f=G(e==null||(p=e.textField)==null?void 0:p.borderColor))==null?`#d9d9d9`:f,borderStyle:`solid`,borderRadius:(m=e==null||(h=e.textField)==null?void 0:h.cornerRadius)==null?8:m,padding:`11px`,boxSizing:`border-box`,backgroundColor:(g=G(e==null||(_=e.textField)==null?void 0:_.backgroundColor))==null?`#FFFFFF`:g,outlineColor:Wo}}))]})};I();var wl=()=>{let[e,t]=N(!1);return pn(()=>{let e=()=>t(!0),n=()=>t(!1);return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,n)}},[]),e};I();var Tl=({option:e,layout:t,dataSourceQuestion:n,register:r,watch:i,validate:a,clearFieldErrors:o})=>{let[s,c]=N(!1),l=wl(),u=String(n.id),d=i(u)===String(e.id),f=r(u,{required:!!n.required,validate:a}),p=e=>{f.onChange(e),o()},m=t.option,h=t.optionSelected,g={backgroundColor:G(h==null?void 0:h.backgroundColor),borderRadius:h.cornerRadius},_={backgroundColor:G(m==null?void 0:m.backgroundColor),borderRadius:m.cornerRadius},v=s&&l?{filter:`drop-shadow(0 0 1px ${Wo})`}:{};return U(`div`,{children:U(`label`,{style:j({display:`flex`,alignItems:`center`,alignContent:`center`,gap:8,cursor:`pointer`},d?g:_),children:[U(`div`,{style:j({display:`flex`,alignItems:`center`,alignContent:`center`,flexShrink:0},v),children:U(us,j({},d?h.image:m.image))}),U(K,j(j({},d?h.title:m.title),{},{text:e.text})),U(`input`,j(j({style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`}},f),{},{onChange:p,value:e.id,type:`radio`,onFocus:()=>c(!0),onBlur:()=>c(!1)}))]})},e.id)},El=({layout:e,register:t,watch:n,dataSourceQuestion:r,validate:i,clearFieldErrors:a})=>U(`div`,{style:{boxSizing:`border-box`},children:U(`fieldset`,{style:{margin:0,padding:0,border:`none`,display:`flex`,flexDirection:`column`,gap:`16px`},children:[e.title&&U(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:U(K,j(j({},e.title),{},{text:r.text}))}),r.options.map(o=>U(Tl,{register:t,watch:n,layout:e,option:o,dataSourceQuestion:r,validate:i,clearFieldErrors:a},o.id))]})});I();var Dl=({option:e,layout:t,dataSourceQuestion:n,register:r,watch:i,validate:a,clearFieldErrors:o})=>{let[s,c]=N(!1),l=wl(),u=String(n.id),d=i(u)===String(e.id),f=r(u,{required:!!n.required,validate:a}),p=e=>{f.onChange(e),o()},m=t.option,h=t.optionSelected,g={borderRadius:m==null?void 0:m.cornerRadius,background:G(m==null?void 0:m.backgroundColor),borderColor:G(m==null?void 0:m.borderColor),borderWidth:m==null?void 0:m.borderWidth},_={borderRadius:h==null?void 0:h.cornerRadius,background:G(h==null?void 0:h.backgroundColor),borderColor:G(h==null?void 0:h.borderColor),borderWidth:h==null?void 0:h.borderWidth},v=s&&l?{outline:`2px solid ${Wo}`}:{};return U(`div`,{style:{display:`flex`,flexGrow:1},children:U(`label`,{style:j(j({width:`100%`,padding:`8px 16px`,cursor:`pointer`,borderStyle:`solid`,position:`relative`},d?_:g),v),children:[U(`input`,j(j({style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`}},f),{},{onChange:p,value:e.id,type:`radio`,onFocus:()=>c(!0),onBlur:()=>c(!1)})),U(K,j(j({},d?h.title:m.title),{},{text:e.text}))]})},e.id)},Ol=({layout:e,watch:t,register:n,dataSourceQuestion:r,validate:i,clearFieldErrors:a})=>U(`div`,{style:{boxSizing:`border-box`},children:U(`fieldset`,{style:{margin:0,padding:0,border:`none`},children:[e.title&&U(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:U(K,j(j({},e.title),{},{text:r.text}))}),U(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:r.options.map(o=>U(Dl,{register:n,watch:t,layout:e,option:o,dataSourceQuestion:r,validate:i,clearFieldErrors:a},o.id))})]})});I();var kl=({isOpen:e,image:t})=>U(`div`,{"data-ui":`gui-custom-select-chevron`,style:{width:`16px`,height:`16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,transform:e?`rotate(180deg)`:`none`,transformOrigin:`50% 50%`,transition:`.2s`,flexShrink:0},children:t?U(us,j({},t)):U(us,{imageId:`chevronDown`})}),Al=({isChosen:e,option:t,onOptionClickCallback:n,isHovered:r,onHover:i,onHoverEnd:a})=>{let o=e?t.layoutSelected.image:t.layout.image;return U(`div`,{style:{padding:`5px 8px`,background:((e,n)=>{var r,i,a,o,s,c,l,u;if(!e&&!n)return(r=G((i=t.layout)==null?void 0:i.backgroundColor))==null?`transparent`:r;if(!e&&n)return(a=G((o=t.layoutSelected)==null?void 0:o.backgroundColor))==null?`transparent`:a;if(e&&!n)return(s=G((c=t.layout)==null?void 0:c.highlightColor))==null?`#F4F4F4`:s;if(e&&n)return(l=G((u=t.layoutSelected)==null?void 0:u.highlightColor))==null?`#F4F4F4`:l})(r,e),fontSize:13,display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:8,borderRadius:4,cursor:`pointer`},"data-select-id":t.value,onClick:n(t),onMouseEnter:i,onMouseLeave:a,children:[U(K,j(j({},t.layout.title),{},{text:t.label})),U(`div`,{style:{display:`flex`,flexShrink:0},children:U(us,j({},o))})]},t.value)},jl=({name:e,options:t,isMulti:n=!1,isClearable:r=!1,value:i,onChange:a,placeholder:o,closeMenuOnSelect:s=!0,onBlur:c,parentElementRef:l,controlLayout:u,pickerLayout:d})=>{var f,p,m,h,g,_,v,y;let[b,x]=N(!1),[S,C]=N(i),[w,T]=N(`down`),[ee,E]=N(null),te=hn(null),ne=hn(null);mn(()=>{var e,t,n;if(!b)return;let r=(e=te.current)==null?void 0:e.getBoundingClientRect(),i=(t=ne.current)==null?void 0:t.getBoundingClientRect(),a=(n=l.current)==null?void 0:n.getBoundingClientRect();if(!r||!i||!a)return;let o=r.bottom+i.height<a.bottom;T(o?`down`:`up`)},[b]),pn(()=>{a(S)},[S]);let re=e=>t=>{var r,i;let a=t.target;a!=null&&(r=a.closest)!=null&&r.call(a,`a`)||(t.stopPropagation(),(t.type===`touchend`||((i=t.nativeEvent)==null?void 0:i.pointerType)===`touch`)&&E(null),s&&x(!1),C(t=>n?t.some(t=>t.value===e.value)?t.filter(t=>t.value!==e.value):[...t,e]:[e]))},D=()=>{c&&c(),x(!1)},O=e=>{var t;let n=e.currentTarget,r=(t=e.relatedTarget)==null?null:t;r&&n.contains(r)||D()},ie=e=>t=>{t.stopPropagation(),C(t=>t.filter(t=>t.value!==e.value))},ae=e=>{e.stopPropagation(),C([])},oe=(f=G(u==null?void 0:u.borderColor))==null?`#D9D9D9`:f,se=(p=G(u==null?void 0:u.highlightBorderColor))==null?`#7E57C5`:p;return U(`div`,{"data-ui":`gui-custom-select`,ref:te,children:U(`div`,{"data-ui":`gui-select-name-`+e,style:{backgroundColor:G(u==null?void 0:u.backgroundColor),borderStyle:`solid`,borderColor:b?se:oe,borderWidth:(m=u==null?void 0:u.borderWidth)==null?1:m,borderRadius:(h=u==null?void 0:u.cornerRadius)==null?8:h,minHeight:`41px`,position:`relative`,zIndex:`auto`,paddingTop:`8px`,paddingBottom:`8px`,paddingInlineStart:`8px`,paddingInlineEnd:`11px`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`end`,gap:10},tabIndex:0,onBlur:O,onClick:()=>x(!b),children:[U(`div`,{"data-ui":`gui-custom-select-multi-choose-container`,style:{display:`flex`,gap:8,alignItems:`flex-start`,alignContent:`center`,flexWrap:`wrap`,width:n?`calc(100% - 63px)`:`100%`},children:[!S.length&&U(`span`,{style:{fontSize:13,color:`#8C8C8C`},children:o}),S.map(e=>{if(n){var t,r,i,a;let n=u==null?void 0:u.chip;return U(`div`,{style:{padding:`0px 5px`,display:`flex`,gap:8,backgroundColor:(t=G(n==null?void 0:n.backgroundColor))==null?`#F2F2F2`:t,borderRadius:(r=n==null?void 0:n.cornerRadius)==null?4:r,userSelect:`none`,alignItems:`center`},children:[U(K,j(j({},n==null?void 0:n.title),{},{fontSize:(i=n==null||(a=n.title)==null?void 0:a.fontSize)==null?13:i,text:e.label})),U(`div`,{style:{display:`flex`,alignItems:`center`,cursor:`pointer`,width:`16px`,height:`16px`},onClick:ie(e),children:n!=null&&n.removeImage?U(us,j({},n.removeImage)):U(us,{imageId:`cross`})})]},e.value)}{var o;let t=u==null?void 0:u.title;return U(`div`,{style:{display:`flex`,userSelect:`none`},children:U(K,j(j({},t),{},{fontSize:(o=t==null?void 0:t.fontSize)==null?13:o,text:e.label}))},e.value)}})]}),r&&S.length?U(`div`,{style:{display:`flex`,alignItems:`center`,cursor:`pointer`,width:`16px`,height:`16px`,zIndex:1},onClick:ae,children:u!=null&&u.clearButton?U(us,j({},u.clearButton)):U(us,{imageId:`cross`})}):null,r?U(`div`,{style:{width:`1px`,alignSelf:`stretch`,backgroundColor:`#D9D9D9`}}):null,U(kl,{isOpen:b,image:u==null?void 0:u.expandButton}),b&&U(`div`,{"data-ui":`gui-custom-select-dropdown-menu`,ref:ne,style:j(j({position:`absolute`},w===`down`?{top:`calc(100% + 1px)`}:{bottom:`calc(100% + 1px)`}),{},{insetInline:0,border:`1px solid #e8e8e8`,width:`100%`,backgroundColor:(g=G(d==null?void 0:d.backgroundColor))==null?`#ffffff`:g,borderRadius:(_=d==null?void 0:d.cornerRadius)==null?8:_,borderStyle:`solid`,borderColor:(v=G(d==null?void 0:d.borderColor))==null?`#D9D9D9`:v,borderWidth:(y=d==null?void 0:d.borderWidth)==null?1:y,maxHeight:`500px`,overflow:`auto`,zIndex:2,boxShadow:`0 3px 15px rgba(0,0,0,.2)`,padding:`8px`,display:`flex`,flexDirection:`column`,gap:`2px`,cursor:`default`}),onClick:e=>e.stopPropagation(),children:t.map(e=>U(Al,{isChosen:S.some(t=>t.value===e.value),option:e,onOptionClickCallback:re,isHovered:ee===e.value,onHover:()=>E(e.value),onHoverEnd:()=>E(null)},e.label))})]})})},Ml=({control:e,layout:t,dataSourceQuestion:n,parentElementRef:r,validate:i,clearFieldErrors:a})=>{let o=n.options.map(e=>({value:String(e.id),label:e.text,layout:t.option,layoutSelected:t.optionSelected})),s=String(n.id);return U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`,boxSizing:`border-box`},children:[t.title&&U(K,j(j({},t.title),{},{text:n.text,htmlFor:s})),U(hc,{name:s,control:e,rules:{required:!!n.required,validate:i},render:({field:e})=>{let i=o.find(t=>t.value===e.value);return U(jl,{options:o,placeholder:n.placeholder,closeMenuOnSelect:!0,name:e.name,value:i?[i]:[],onChange:t=>{let n=t&&Array.isArray(t)&&t.length?t[0].value:null;e.onChange(n),a()},parentElementRef:r,isMulti:!1,isClearable:!1,controlLayout:t.dropdownControl,pickerLayout:t.dropdownPicker})}})]})},Nl=({control:e,layout:t,dataSourceQuestion:n,parentElementRef:r,validate:i,clearFieldErrors:a})=>{let o=n.options.map(e=>({value:String(e.id),label:e.text,layout:t.option,layoutSelected:t.optionSelected})),s=String(n.id);return U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`,boxSizing:`border-box`},children:[t.title&&U(K,j(j({},t.title),{},{text:n.text,htmlFor:s})),U(hc,{name:s,control:e,rules:{required:!!n.required,validate:i},render:({field:e})=>{let i=o.filter(t=>{var n;return(n=e.value)==null?void 0:n.includes(t.value)});return U(jl,{name:s,options:o,placeholder:n.placeholder,closeMenuOnSelect:!1,value:i,onChange:t=>{let n=t.map(e=>e.value);e.onChange(n),a()},parentElementRef:r,isMulti:!0,isClearable:!0,controlLayout:t.dropdownControl,pickerLayout:t.dropdownPicker})}})]})};I();var Pl=({option:e,layout:t,dataSourceQuestion:n,isChosen:r,onToggle:i})=>{let[a,o]=N(!1),s=wl(),c=String(n.id),l=t.option,u=t.optionSelected,d={backgroundColor:G(u==null?void 0:u.backgroundColor),borderRadius:u.cornerRadius},f={backgroundColor:G(l==null?void 0:l.backgroundColor),borderRadius:l.cornerRadius},p=a&&s?{filter:`drop-shadow(0 0 1px ${Wo})`}:{};return U(`div`,{children:U(`label`,{style:j({display:`flex`,alignItems:`center`,alignContent:`center`,gap:8,cursor:`pointer`},r?d:f),children:[U(`div`,{style:j({display:`flex`,alignItems:`center`,alignContent:`center`,flexShrink:0},p),children:U(us,j({},r?u.image:l.image))}),U(K,j(j({},r?u.title:l.title),{},{text:e.text})),U(`input`,{style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`},name:c,value:e.id,checked:r,type:`checkbox`,onChange:i,onFocus:()=>o(!0),onBlur:()=>o(!1)})]})},e.id)},Fl=({control:e,layout:t,dataSourceQuestion:n,validate:r,clearFieldErrors:i})=>{let a=String(n.id);return U(`div`,{style:{boxSizing:`border-box`},children:U(`fieldset`,{style:{margin:0,padding:0,border:`none`,display:`flex`,flexDirection:`column`,gap:`16px`},children:[t.title&&U(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:U(K,j(j({},t.title),{},{text:n.text}))}),U(hc,{name:a,control:e,rules:{required:!!n.required,validate:r},render:({field:e})=>{var r;let a=(r=e.value)==null?[]:r;return U(vt,{children:n.options.map(r=>{let o=String(r.id),s=a.includes(o);return U(Pl,{dataSourceQuestion:n,layout:t,option:r,isChosen:s,onToggle:()=>{let t=s?a.filter(e=>e!==o):[...a,o];e.onChange(t),i()}},r.id)})})}})]})})};I();var Il=({option:e,layout:t,dataSourceQuestion:n,isChosen:r,onToggle:i})=>{let[a,o]=N(!1),s=wl(),c=String(n.id),l=t.option,u=t.optionSelected,d={borderRadius:l==null?void 0:l.cornerRadius,background:G(l==null?void 0:l.backgroundColor),borderColor:G(l==null?void 0:l.borderColor),borderWidth:l==null?void 0:l.borderWidth},f={borderRadius:u==null?void 0:u.cornerRadius,background:G(u==null?void 0:u.backgroundColor),borderColor:G(u==null?void 0:u.borderColor),borderWidth:u==null?void 0:u.borderWidth},p=a&&s?{outline:`2px solid ${Wo}`}:{};return U(`div`,{style:{display:`flex`,flexGrow:1},children:U(`label`,{style:j(j({width:`100%`,padding:`8px 16px`,cursor:`pointer`,borderStyle:`solid`,position:`relative`},r?f:d),p),children:[U(`input`,{style:{width:1,height:1,opacity:0,position:`absolute`,left:`50%`},name:c,value:e.id,checked:r,type:`checkbox`,onChange:i,onFocus:()=>o(!0),onBlur:()=>o(!1)}),U(K,j(j({},r?u.title:l.title),{},{text:e.text}))]})})},Ll=({control:e,layout:t,dataSourceQuestion:n,validate:r,clearFieldErrors:i})=>{let a=String(n.id);return U(`div`,{style:{boxSizing:`border-box`},children:U(`fieldset`,{style:{margin:0,padding:0,border:`none`},children:[t.title&&U(`legend`,{style:{margin:0,padding:0,marginBottom:`16px`},children:U(K,j(j({},t.title),{},{text:n.text}))}),U(hc,{name:a,control:e,rules:{required:!!n.required,validate:r},render:({field:e})=>{var r;let a=(r=e.value)==null?[]:r;return U(`div`,{style:{display:`flex`,justifyContent:`center`,gap:5},children:n.options.map(r=>{let o=String(r.id),s=a.includes(o);return U(Il,{dataSourceQuestion:n,layout:t,option:r,isChosen:s,onToggle:()=>{let t=s?a.filter(e=>e!==o):[...a,o];e.onChange(t),i()}},r.id)})})}})]})})};I();var Rl=({layout:e,dataSourceQuestion:t,parentElementRef:n,shouldClearErrorsOnChange:r=!0,shouldDismissKeyboardOnEnter:i=!0})=>{var a;let o=hn(null),s=n==null?o:n,c=_c(),{register:l,watch:u,control:d,formState:f}=c,{errors:p}=f,m=String(t.id),h=m in p&&((a=p[m])==null?void 0:a.types),{validate:g,clearFieldErrors:_}=_l({name:m,validators:t.validators,required:!!t.required,form:c}),v=r?_:()=>{};return U(`div`,{ref:o,children:[U(vl,{backgroundColor:e.backgroundColor,cornerRadius:e.cornerRadius,isError:!!h,isRequired:t.required,validationBorderColor:e.validationBorderColor,validationBorderWidth:e.validationBorderWidth,children:[e.displayType===yo.TEXT_EXPANDABLE&&U(Cl,{layout:e,dataSourceQuestion:t,register:l,validate:g,clearFieldErrors:v}),e.displayType===yo.TEXT_SINGLE_LINE&&U(Sl,{layout:e,dataSourceQuestion:t,register:l,validate:g,clearFieldErrors:v,shouldDismissKeyboardOnEnter:i}),e.displayType===yo.SELECTOR_OPTIONS&&U(El,{layout:e,dataSourceQuestion:t,watch:u,register:l,validate:g,clearFieldErrors:v}),e.displayType===yo.SELECTOR_BUTTONS&&U(Ol,{layout:e,dataSourceQuestion:t,watch:u,register:l,validate:g,clearFieldErrors:v}),e.displayType===yo.SELECTOR_DROPDOWN&&U(Ml,{control:d,layout:e,dataSourceQuestion:t,parentElementRef:s,validate:g,clearFieldErrors:v}),e.displayType===yo.MULTI_SELECTOR_DROPDOWN&&U(Nl,{control:d,layout:e,dataSourceQuestion:t,parentElementRef:s,validate:g,clearFieldErrors:v}),e.displayType===yo.MULTI_SELECTOR_OPTIONS&&U(Fl,{control:d,layout:e,dataSourceQuestion:t,validate:g,clearFieldErrors:v}),e.displayType===yo.MULTI_SELECTOR_BUTTONS&&U(Ll,{control:d,layout:e,dataSourceQuestion:t,validate:g,clearFieldErrors:v})]}),h&&U(yl,{validationErrorsTypes:h,title:e.validationMessage})]})},zl=(e,t)=>t.find(t=>{var n;return(n=t.questionIds)==null?void 0:n.some(t=>t===e)}),Bl=(e,t)=>t.find(t=>!t.questionIds&&t.answerType===e),Vl=(e,t,n)=>n?zl(String(e.id),t)||Bl(e.answerType,t):t.find(t=>t.answerType===e.answerType),Hl,Ul=class e extends V{constructor({errorCode:t,message:n,underlyingError:r,underlyingBaseError:i}){let a=V.getErrorKey(t,Ko);super({errorCode:t,errorCodeKey:a,errorEnumName:e.ERROR_ENUM_NAME,module:e.MODULE,message:n,underlyingError:r,underlyingBaseError:i,domain:e.ERROR_ENUM_NAME,shortDomainCode:e.SHORT_CODE})}};Hl=Ul,Hl.MODULE=Go,Hl.ERROR_ENUM_NAME=`GuiModuleError`,Hl.SHORT_CODE=`GM`,I();var Wl=({header:e,title:t,buttons:n,footer:r,questions:i,dataSource:a,properties:o,backgroundColor:s,backgroundImage:c})=>{var l;let u=hn(null),d=Da.FORM,{perform:f}=co();if(!a||(a==null?void 0:a.questions.length)===0)return f(new Ul({errorCode:Ko.DECODING_FAILED,message:`No dataSource or no data for questions in the dataSource`})),null;if(!(i!=null&&i.itemTypes)||Array.isArray(i==null?void 0:i.itemTypes)&&(i==null||(l=i.itemTypes)==null?void 0:l.length)===0)return f(new Ul({errorCode:Ko.DECODING_FAILED,message:`No questions in the itemTypes field or itemTypes is not an array`})),null;let p=pl({mode:`onSubmit`,reValidateMode:`onSubmit`,criteriaMode:`all`,defaultValues:o?ts(a.questions,o):{}}),{handleSubmit:m,reset:h}=p;return U(bs,{header:e,footer:r,backgroundColor:s,backgroundImage:c,children:U(vc,j(j({},p),{},{children:U(`form`,{onSubmit:m(e=>{f($o(e),d),h()}),style:{height:`100%`,fontFamily:`sans-serif`,display:`flex`,flexDirection:`column`,gap:`15px`},noValidate:!0,children:[U(`div`,{style:{flex:`1 1 100%`,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`10px`,height:`100%`,width:`100%`,overflow:`auto`,position:`relative`,backgroundColor:G(i==null?void 0:i.backgroundColor)||`transparent`},ref:u,children:[t&&U(`div`,{style:{lineHeight:`39.2px`,width:`100%`},children:U(K,j({},t))}),U(`div`,{"data-ui":`gui-questions`,part:`gui-questions`,style:{width:`100%`,display:`flex`,gap:`10px`,flexDirection:`column`},children:a.questions.map(e=>{let t=Vl(e,i.itemTypes,a.static);if(t)return U(Rl,{layout:t,dataSourceQuestion:e,parentElementRef:u,shouldClearErrorsOnChange:!1,shouldDismissKeyboardOnEnter:!1},e.id);{let e=new Ul({errorCode:Ko.DECODING_FAILED,message:`The question template has not been found`});f(e)}})})]}),!!(n!=null&&n.length)&&U(`div`,{style:{display:`flex`,width:`100%`,flexGrow:0,flexShrink:0,justifyContent:`center`,alignItems:`flex-end`,padding:`2px`},children:n.map((e,t)=>U(_s,j({dataTestId:`question-button`},e),t))})]})}))})},Gl={display:`none`},Kl={display:`flex`,alignItems:`center`,justifyContent:`center`,width:`250px`,height:`50px`,border:0,borderRadius:`16px`,backgroundColor:`#7e57c5`,cursor:`pointer`},ql={position:`relative`,display:`flex`,flexGrow:1,flexDirection:`column`,alignItems:`center`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`};I();var Jl=({header:e,footer:t,buttons:n,backgroundColor:r,backgroundImage:i,selectionLimit:a})=>{var o;let{perform:s}=co(),c=hn(null),l=typeof a==`number`&&(a===0||a>1),u=function(){var e=C(function*(e){var t;let n=Array.from((t=e.currentTarget.files)==null?[]:t);if(n.length)try{let e=(yield Promise.allSettled(n.map(function(){var e=C(function*(e){return{content:yield is(e),metadata:{name:e.name,type:e.type,size:e.size,lastModified:e.lastModified}}});return function(t){return e.apply(this,arguments)}}()))).filter(e=>e.status===`fulfilled`).map(e=>e.value);s({cancel:!1,permissionDenied:!1,files:e})}catch(e){console.error(`Error: `,e)}});return function(t){return e.apply(this,arguments)}}();return U(bs,{header:e,footer:t,backgroundColor:r,backgroundImage:i,children:U(vt,{children:U(`div`,{style:j(j({},ql),{},{justifyContent:`center`}),children:[U(`input`,j(j({style:Gl,ref:c,type:`file`,accept:`image/*`},l?{multiple:!0}:{}),{},{onInput:u})),U(`button`,{style:Kl,onClick:()=>{var e;(e=c.current)==null||e.showPicker()},children:U(us,{imageId:n==null||(o=n[0])==null||(o=o.image)==null?void 0:o.imageId})})]})})})},Yl={display:`none`},Xl={display:`flex`,alignItems:`center`,justifyContent:`center`,width:`250px`,height:`50px`,border:0,borderRadius:`16px`,background:`#7e57c5`,cursor:`pointer`},Zl={position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`};I();var Ql=({header:e,footer:t,backgroundColor:n,backgroundImage:r,buttons:i,selectionLimit:a})=>{var o;let{perform:s}=co(),c=hn(null),l=typeof a==`number`&&(a===0||a>1),u=function(){var e=C(function*(e){var t;let n=Array.from((t=e.currentTarget.files)==null?[]:t);if(n.length)try{let e=(yield Promise.allSettled(n.map(function(){var e=C(function*(e){return{content:yield is(e),metadata:{name:e.name,type:e.type,size:e.size,lastModified:e.lastModified}}});return function(t){return e.apply(this,arguments)}}()))).filter(e=>e.status===`fulfilled`).map(e=>e.value);s({cancel:!1,permissionDenied:!1,files:e})}catch(e){console.error(`Error: `,e)}});return function(t){return e.apply(this,arguments)}}(),d=function(){var e=C(function*(){var e;(e=c.current)==null||e.showPicker()});return function(){return e.apply(this,arguments)}}();return pn(()=>{C(function*(){if(ni.isDesktop)return;let e=yield as();(e===`denied`||e===`error`)&&s({cancel:!1,permissionDenied:!0,files:[]})})()},[]),U(bs,{header:e,footer:t,backgroundColor:n,backgroundImage:r,children:U(vt,{children:U(`div`,{style:j(j({},Zl),{},{justifyContent:`center`}),children:[U(`input`,j(j({style:Yl,ref:c,type:`file`,accept:`image/*`,capture:`user`},l?{multiple:!0}:{}),{},{onInput:u})),U(`button`,{style:Xl,onClick:d,children:U(us,{imageId:i==null||(o=i[0])==null||(o=o.image)==null?void 0:o.imageId})})]})})})},$l=function(){var e=C(function*(){try{var e;let t=yield navigator.permissions.query({name:`geolocation`});return(e=t==null?void 0:t.state)==null?`unknown`:e}catch(e){return`unknown`}});return function(){return e.apply(this,arguments)}}(),eu=function(){var e=C(function*(){try{return yield navigator.permissions.query({name:`geolocation`})}catch(e){return null}});return function(){return e.apply(this,arguments)}}(),tu=function(){var e=C(function*(e){return new Promise(t=>{if(!navigator.geolocation)return t({location:{locationState:`location_request_failed`,lat:null,lon:null,error:`Requesting location failed`}});navigator.geolocation.getCurrentPosition(e=>t({location:{locationState:`ok`,lat:e.coords.latitude,lon:e.coords.longitude,error:null}}),e=>{e.code===1?t({location:{locationState:`application_location_restricted`,lat:null,lon:null,error:`Application location services restricted or unavailable`}}):t({location:{locationState:`location_request_failed`,lat:null,lon:null,error:`Requesting location failed`}})},e)})});return function(t){return e.apply(this,arguments)}}(),nu=(e,t)=>typeof t==`number`&&t>0?t*1e3:e;I();var ru=({askEveryTime:e,getLocationTimeout:t,locationAccuracy:n})=>{var r;let i={[xo.HIGH]:{enableHighAccuracy:!0,timeout:nu(15e3,t),maximumAge:0},[xo.BALANCED]:{enableHighAccuracy:!1,timeout:nu(12e3,t),maximumAge:3e4},[xo.LOW]:{enableHighAccuracy:!1,timeout:nu(8e3,t),maximumAge:6e4},[xo.PASSIVE]:{enableHighAccuracy:!1,timeout:nu(5e3,t),maximumAge:3e5}}[n||xo.PASSIVE],a=Da.FORM,{perform:o}=co(),{setIsProcessingCallback:s}=lo(),[c,l]=N(!1),{devSettings:u}=so(),d=!!(u!=null&&(r=u.popups)!=null&&(r=r.system_restricted)!=null&&r.isOpen);pn(()=>{u&&l(d)},[d,u]);let f=()=>{var e;u!=null&&(e=u.popups)!=null&&e.system_restricted||l(!0)},p=()=>{var e;u!=null&&(e=u.popups)!=null&&e.system_restricted||l(!1)};mn(()=>{ni.isSafari||e||s==null||s(!0)},[]),pn(()=>{if(ni.isSafari||e)return;let t=!0;return C(function*(){if((yield $l())!==`granted`){s==null||s(!1);return}let e=yield tu(i);t&&o(e,a)})(),()=>{ni.isSafari||e||(t=!1)}},[]),pn(()=>{if(ni.isSafari)return;let e=!0,t=null;return C(function*(){let n=yield eu();n&&(t=n,n.onchange=C(function*(){if(n.state===`denied`&&(s==null||s(!0),o({location:{locationState:`application_location_restricted`,lat:null,lon:null,error:`Application location services restricted or unavailable`}},a)),n.state===`granted`){s==null||s(!0);let t=yield tu(i);if(!e)return;o(t,a)}}))})(),()=>{ni.isSafari||(e=!1,t&&(t.onchange=null))}},[]);let m=function(){var e=C(function*(e){e.preventDefault();let t=yield $l();if(t===`denied`)f();else if(t===`prompt`&&(yield tu()),t===`granted`){let e=yield tu(i);o(e,a)}});return function(t){return e.apply(this,arguments)}}(),h=function(){var e=C(function*(e){if(e.preventDefault(),(yield $l())===`denied`){f();return}s==null||s(!0);let t=yield tu(i);o(t,a)});return function(t){return e.apply(this,arguments)}}();return{isPopupOpen:c,handleAllowButtonClick:ni.isSafari?h:m,closePopup:p}},iu={height:`100%`,fontFamily:`sans-serif`,display:`flex`,flexDirection:`column`,gap:`15px`},au={flex:`1 1 100%`,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,alignContent:`center`,flexDirection:`column`,gap:`10px`,height:`100%`,width:`100%`,overflow:`auto`,position:`relative`},ou={position:`absolute`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,inset:0,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,background:`rgba(0,0,0,0.2)`,zIndex:1e3,pointerEvents:`auto`,cursor:`default`},su={width:`100%`,height:`auto`,marginBottom:`32px`,aspectRatio:`1.61`},cu={marginBottom:20,lineHeight:`39.2px`,width:`100%`},lu={lineHeight:`28px`,fontWeight:`400`,width:`100%`},uu={position:`relative`,padding:`32px 24px 0`,border:`1px solid rgba(0, 0, 0, 0.06)`,width:`min(400px, calc(100vw - 32px))`},du={marginBottom:`10px`,fontWeight:500,display:`-webkit-box`,"-webkit-box-orient":`vertical`,"-webkit-line-clamp":2,overflow:`hidden`,textOverflow:`ellipsis`,lineClamp:2},fu={marginBottom:`84px`,fontWeight:400},pu={height:`100%`,overflow:`scroll`,maxHeight:`calc(100dvh - 190px)`},mu={position:`absolute`,bottom:0,insetInline:0,padding:`24px`,width:`100%`},hu=({title:e,header:t,footer:n,image:r,description:i,buttons:a,backgroundColor:o,backgroundImage:s,popups:c,askEveryTime:l,getLocationTimeout:u,locationAccuracy:d})=>{let f=c==null?void 0:c.find(e=>e.reason===Yo.SYSTEM_RESTRICTED),{isPopupOpen:p,handleAllowButtonClick:m,closePopup:h}=ru({askEveryTime:l,getLocationTimeout:u,locationAccuracy:d});return U(bs,{header:t,footer:n,backgroundColor:o,backgroundImage:s,children:[U(`div`,{style:iu,children:[U(`div`,{part:`gui-geolocation-screen-container`,"data-ui":`gui-geolocation-screen-container`,id:`geolocation-screen-container`,style:au,children:[r&&U(`div`,{style:su,children:U(us,j({},r))}),e&&U(`div`,{style:cu,children:U(K,j({},e))}),i&&U(`div`,{style:lu,children:U(xs,j({},i))})]}),!!(a!=null&&a.length)&&U(`div`,{style:{display:`flex`,flexDirection:`column`},children:a.map((e,t)=>U(`div`,{style:{padding:`5px`},children:U(_s,j(j({dataTestId:`question-button`},e),e.type===`FORM`&&{onClick:m}))},t))})]}),f&&p&&U(`div`,{style:ou,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),h()},children:U(`div`,{style:j(j({},uu),{},{borderRadius:(f==null?void 0:f.cornerRadius)||`27px`,backgroundColor:(f==null?void 0:f.backgroundColor)||`#ffffff`}),onPointerDown:e=>{e.stopPropagation()},children:[U(`div`,{style:du,children:U(K,j({fontSize:`24px`},f.title))}),U(`div`,{style:fu,children:U(`div`,{style:pu,children:U(K,j({fontSize:`17px`},f.message))})}),f.actionButton1&&U(`div`,{style:mu,children:U(_s,j(j({dataTestId:`question-button`},f.actionButton1),f.actionButton1.type===`FORM`?{onClick:h}:{}))})]})})]})};un(),I();var gu=Wt(void 0),_u=({children:e,handlers:t})=>U(gu.Provider,{value:{handlers:t},children:e}),vu=()=>yn(gu),yu=e=>{let t=vu(),n=t==null?void 0:t.handlers,r;return e.type===`FORM`&&e.actionId&&n&&n[e.actionId]&&(r=n[e.actionId]),U(_s,j({title:e.title,image:e.image,responseBody:e.responseBody,url:e.url,borderColor:e.borderColor,borderWidth:e.borderWidth,type:e.type,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,highlightColor:e.highlightColor,hoverColor:e.hoverColor,paddings:e.paddings,isGenericTemplate:!0},r&&{onClick:r}))},bu=({isPressed:e,isHovered:t,backgroundColor:n,highlightColor:r,hoverColor:i})=>{let a=G(n)||`transparent`,o=G(r),s=G(i);return e?o||a:t&&s||a};I();var xu=e=>{let{image:t,responseBody:n,type:r,url:i,paddings:a,backgroundColor:o,highlightColor:s,hoverColor:c,cornerRadius:l,onClick:u}=e,{perform:d}=co(),[f,p]=N(!0),[m,h]=N(0),{failedAssets:g}=uo(),{isHovered:_,isPressed:v,interactionHandlers:y}=hs(),b=Io(t,g)[m];if(!b)return null;let{imageId:x,imageURL:S,base64:C,contentMode:w=_o.ASPECT_FILL,cornerRadius:T,backgroundColor:ee}=b,E=bu({isPressed:v,isHovered:_,backgroundColor:o,highlightColor:s,hoverColor:c}),te=f&&S,ne=()=>{p(!1)},re=()=>{h(e=>e+1)},D=e=>{if(r===`URL`)i&&window.open(i,`_blank`,`noopener,noreferrer`);else{if(n){let e=JSON.parse(JSON.stringify(n));Qo(e),d(e,Da.DATA)}u&&u(e)}},O={width:`100%`,height:`100%`},ie,ae=G(ee)||`transparent`;return C&&(ie=U(`img`,{style:j(j({},O),{},{objectFit:Lo(w),borderRadius:T,backgroundColor:ae,display:`block`}),src:C,onError:re})),x&&(ie=U(Uo,{type:x in Ho?x:`default`,contentMode:w,cornerRadius:T,backgroundColor:ae,isFullSize:!0})),S&&(ie=U(vt,{children:[te&&U(`div`,{style:j(j({},O),{},{backgroundColor:`#e0e0e0`,borderRadius:T})}),U(`img`,{style:j(j({},O),{},{objectFit:Lo(w),borderRadius:T,backgroundColor:ae,display:te?`none`:`block`}),src:S,onLoad:ne,onError:re})]})),U(`button`,j(j({type:`button`,style:j({width:`100%`,height:`100%`,appearance:`none`,background:`none`,border:0,padding:0,margin:0,display:`inline-flex`,cursor:`pointer`,backgroundColor:E,borderRadius:l},Po(a))},y),{},{onClick:D,children:ie}))},Su=e=>{let t=vu(),n=t==null?void 0:t.handlers,r;return e.type===`FORM`&&e.actionId&&n&&n[e.actionId]&&(r=n[e.actionId]),U(xu,j({image:{imageId:e.image.imageId,imageURL:e.image.imageURL,base64:e.image.base64,contentMode:e.image.contentMode,cornerRadius:e.image.cornerRadius,backgroundColor:e.image.backgroundColor,prepareRequired:e.image.prepareRequired,failurePolicy:e.image.failurePolicy,timeout:e.image.timeout,placeholderImage:e.image.placeholderImage},type:e.type,url:e.url,responseBody:e.responseBody,paddings:e.paddings,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,highlightColor:e.highlightColor,hoverColor:e.hoverColor},r&&{onClick:r}))},Cu={[To.TOP]:`flex-start`,[To.CENTER]:`center`,[To.BOTTOM]:`flex-end`},wu=Cu[To.TOP],Tu=Cu[To.TOP],Eu=e=>({[Eo.START]:`flex-start`,[Eo.LEFT]:e===Aa.RTL?`flex-end`:`flex-start`,[Eo.CENTER]:`center`,[Eo.RIGHT]:e===Aa.RTL?`flex-start`:`flex-end`,[Eo.END]:`flex-end`}),Du=({elements:e,verticalAlignment:t,horizontalAlignment:n,backgroundColor:r,cornerRadius:i,paddings:a})=>{let{layoutDirection:o}=fo(),s=Eu(o),c=s[Eo.START];return U(`div`,{"data-ui":`gui-row`,part:`gui-row`,style:j({width:`100%`,display:`flex`,flexDirection:`row`,alignItems:t&&Cu[t]||Tu,justifyContent:n&&s[n]||c,backgroundColor:G(r)||`transparent`,borderRadius:i},Po(a)),children:e==null?void 0:e.map(e=>{let t=e.type===wo.IMAGE,n=e.type===wo.IMAGE_BUTTON,r=e.type===wo.SPACER,i=e.type===wo.PROGRESS_VIEW,a=(t||n||r)&&e.content.width||i;return U(`div`,{"data-ui":`gui-row-item`,part:`gui-row-item`,style:j(j(j(j(j({flex:a?`0 0 auto`:`${e.content.weight||1} 1 0`},a&&!i&&{width:e.content.width}),i&&{width:e.content.width||e.content.height||60}),r&&e.content.height&&{height:e.content.height}),(t||n)&&{height:e.content.height||120}),i&&{height:e.content.height||e.content.width||60}),children:Au(e)})})})},Ou=({backgroundColor:e,cornerRadius:t})=>U(`div`,{"data-ui":`gui-spacer`,part:`gui-spacer`,style:{width:`100%`,height:`100%`,backgroundColor:G(e)||`transparent`,borderRadius:t}}),ku={[wo.LABEL]:e=>U(K,{text:e.content.text,fontName:e.content.fontName,fontSize:e.content.fontSize,fontColor:e.content.fontColor,alignment:e.content.alignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings,fontWeight:e.content.fontWeight,isGenericTemplate:!0}),[wo.IMAGE]:e=>U(us,{imageId:e.content.imageId,imageURL:e.content.imageURL,base64:e.content.base64,contentMode:e.content.contentMode,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,isFullSize:!0,prepareRequired:e.content.prepareRequired,failurePolicy:e.content.failurePolicy,timeout:e.content.timeout,placeholderImage:e.content.placeholderImage}),[wo.IMAGE_BUTTON]:e=>U(Su,{type:e.content.type,actionId:e.content.actionId,image:{imageId:e.content.image.imageId,imageURL:e.content.image.imageURL,base64:e.content.image.base64,contentMode:e.content.image.contentMode,cornerRadius:e.content.image.cornerRadius,backgroundColor:e.content.image.backgroundColor,prepareRequired:e.content.image.prepareRequired,failurePolicy:e.content.image.failurePolicy,timeout:e.content.image.timeout,placeholderImage:e.content.image.placeholderImage},url:e.content.url,responseBody:e.content.responseBody,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,highlightColor:e.content.highlightColor,hoverColor:e.content.hoverColor,paddings:e.content.paddings}),[wo.BUTTON]:e=>U(yu,{actionId:e.content.actionId,title:e.content.title,image:e.content.image,responseBody:e.content.responseBody,url:e.content.url,borderColor:e.content.borderColor,borderWidth:e.content.borderWidth,type:e.content.type,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,highlightColor:e.content.highlightColor,hoverColor:e.content.hoverColor,paddings:e.content.paddings}),[wo.COLUMN]:e=>U(ju,{elements:e.content.elements,horizontalAlignment:e.content.horizontalAlignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings}),[wo.ROW]:e=>U(Du,{elements:e.content.elements,horizontalAlignment:e.content.horizontalAlignment,verticalAlignment:e.content.verticalAlignment,cornerRadius:e.content.cornerRadius,backgroundColor:e.content.backgroundColor,paddings:e.content.paddings}),[wo.SPACER]:e=>U(Ou,{backgroundColor:e.content.backgroundColor,cornerRadius:e.content.cornerRadius}),[wo.PROGRESS_VIEW]:e=>U(Es,{isFullSize:!0,indicatorColor:e.content.indicatorColor})};function Au(e){let t=ku[e.type];return t?t(e):null}var ju=({elements:e,horizontalAlignment:t,backgroundColor:n,cornerRadius:r,paddings:i})=>{let{layoutDirection:a}=fo(),o=Eu(a),s=o[Eo.START];return U(`div`,{"data-ui":`gui-column`,part:`gui-column`,style:j({display:`flex`,flexDirection:`column`,alignItems:t&&o[t]||s,backgroundColor:G(n)||`transparent`,borderRadius:r},Po(i)),children:e==null?void 0:e.map(e=>{let t=e.type===wo.IMAGE,n=e.type===wo.IMAGE_BUTTON,r=e.type===wo.SPACER,i=e.type===wo.PROGRESS_VIEW,a=(t||n||r)&&e.content.width||i;return U(`div`,{"data-ui":`gui-column-item`,part:`gui-column-item`,style:j(j(j(j(j(j({},!a&&{alignSelf:`stretch`}),a&&!i&&{width:e.content.width}),i&&{width:e.content.width||e.content.height||60}),r&&e.content.height&&{height:e.content.height}),(t||n)&&{height:e.content.height||120}),i&&{height:e.content.height||e.content.width||60}),children:Au(e)})})})},Mu=({topColumn:e,mainColumn:t,bottomColumn:n,backgroundColor:r=`#ffffff00`,backgroundImage:i,cornerRadius:a,isInModal:o=!1})=>{let{failedAssets:s}=uo();return U(`div`,{"data-ui":`gui-scaffold-container`,part:`gui-scaffold-container`,id:`scaffold-container`,style:j(j({display:`flex`,flexDirection:`column`,height:`100%`},o&&{minHeight:0}),{},{backgroundColor:G(r)||`transparent`,borderRadius:a},zo(i,s)),children:[e&&U(`div`,{"data-ui":`gui-top-column`,part:`gui-top-column`,style:{flex:`0 0 auto`},children:U(ju,j({},e))}),t&&U(`div`,{"data-ui":`gui-main-column-container`,part:`gui-main-column-container`,style:{flex:`1 1 auto`,minHeight:0,overflowY:`auto`,overflowX:`hidden`,backgroundColor:G(t.backgroundColor)||`transparent`},children:U(`div`,{"data-ui":`gui-main-column`,part:`gui-main-column`,style:{display:`flex`,flexDirection:`column`,minHeight:`100%`,justifyContent:t.verticalAlignment&&Cu[t.verticalAlignment]||wu},children:U(ju,j(j({},t),{},{backgroundColor:`transparent`}))})}),n&&U(`div`,{"data-ui":`gui-bottom-column`,part:`gui-bottom-column`,style:{flex:`0 0 auto`},children:U(ju,j({},n))})]})},Nu=({rootElement:e})=>{let{type:t,content:n}=e;if(t===So.SCAFFOLD){let{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i,backgroundImage:a,cornerRadius:o}=n;return U(Mu,{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i,cornerRadius:o,backgroundImage:a})}return null},Pu=({width:e=400,shouldCloseOnClickOutside:t=!1,close:n,children:r})=>U(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,inset:0,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,background:`rgba(0,0,0,0.2)`,zIndex:1e3,pointerEvents:`auto`,cursor:`default`},onPointerDown:()=>{t&&(n==null||n())},children:U(`div`,{style:{position:`relative`,width:`min(${e}px, calc(100vw - 32px))`,maxHeight:`calc(100vh - 32px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`},onPointerDown:e=>{e.stopPropagation()},children:r})}),Fu=({popups:e,rootElement:t,settings:n})=>{let r=e==null?void 0:e.find(e=>e.reason===Yo.SYSTEM_RESTRICTED),{isPopupOpen:i,handleAllowButtonClick:a,closePopup:o}=ru({askEveryTime:n==null?void 0:n.askEveryTime,getLocationTimeout:n==null?void 0:n.getLocationTimeout,locationAccuracy:n==null?void 0:n.locationAccuracy}),s={ALLOW_LOCATION:a,HIDE_POPUP:o},{type:c,content:l}=t;if(c!==So.SCAFFOLD)return null;let{topColumn:u,mainColumn:d,bottomColumn:f,backgroundColor:p,cornerRadius:m,backgroundImage:h}=l;return U(`div`,{style:{position:`relative`,height:`100%`},children:U(_u,{handlers:s,children:[U(Mu,{topColumn:u,mainColumn:d,bottomColumn:f,backgroundColor:p,cornerRadius:m,backgroundImage:h}),r&&i&&U(Pu,{width:400,close:o,shouldCloseOnClickOutside:!0,children:U(Mu,{isInModal:!0,topColumn:r.rootElement.content.topColumn,mainColumn:r.rootElement.content.mainColumn,bottomColumn:r.rootElement.content.bottomColumn,backgroundColor:r.rootElement.content.backgroundColor,backgroundImage:h,cornerRadius:r.rootElement.content.cornerRadius})})]})})},Iu=({rootElement:e})=>{let{type:t,content:n}=e;if(t===So.SCAFFOLD){let{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i,cornerRadius:a,backgroundImage:o}=n;return U(Mu,{topColumn:e,mainColumn:t,bottomColumn:r,backgroundColor:i,backgroundImage:o,cornerRadius:a})}return null},Lu=({backgroundColor:e,cornerRadius:t,paddings:n,dataItems:r,uiComponents:i})=>U(`div`,{"data-ui":`gui-section`,part:`gui-section`,style:j({display:`flex`,flexDirection:`column`,backgroundColor:G(e)||`transparent`,borderRadius:t},Po(n)),children:U(od,{dataItems:r,uiComponents:i})}),Ru=({titleLabel:e,htmlFor:t})=>e?U(`div`,{"data-ui":`gui-code-input-title`,part:`gui-code-input-title`,style:{width:`100%`},children:U(K,j(j({},e),{},{htmlFor:t,isGenericTemplate:!0}))}):null,zu=`code-input-caret`,Bu=({char:e,showCaret:t,width:n=42,height:r=42,backgroundColor:i,cornerRadius:a=8,fontName:o,fontSize:s,fontColor:c,fontWeight:l,borderWidth:u,borderColor:d})=>U(`div`,{"data-ui":`gui-code-field-slot`,part:`gui-code-field-slot`,"aria-hidden":`true`,style:{boxSizing:`border-box`,width:n,height:r,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:G(i)||`transparent`,borderRadius:a,borderStyle:`solid`,borderWidth:u,borderColor:d,fontFamily:Vo(o),fontSize:s,color:c,fontWeight:Bo(l),lineHeight:1.4,userSelect:`none`,cursor:`text`,flexShrink:0},children:[e,t&&U(`span`,{style:{display:`inline-block`,width:1,height:Math.max((s==null?20:s)*.9,14),marginInlineStart:+!!e,backgroundColor:c,animation:`code-input-caret 1s step-end infinite`}})]}),Vu=`#d9d9d9`,Hu=`#7B61FF`,Uu=`#FF3B30`,Wu=({isError:e,isFocused:t,borderWidth:n,borderColor:r,focusedBorderWidth:i,focusedBorderColor:a,errorBorderWidth:o,errorBorderColor:s})=>{let c=n==null?1:n,l=G(r)||Vu;return e?{borderWidth:o==null?c:o,borderColor:G(s)||Uu}:t?{borderWidth:i==null?c:i,borderColor:G(a)||Hu}:{borderWidth:c,borderColor:l}},Gu=(e=4)=>e<4?4:e>12?12:e,Ku=(e,t,n)=>{let r=e;return t===Do.ALPHA_NUMERIC&&(r=r.replace(/[^a-zA-Z0-9]/g,``)),t===Do.NUMERIC&&(r=r.replace(/\D/g,``)),r.slice(0,n)},qu={[Do.NUMERIC]:`numeric`,[Do.ALPHA_NUMERIC]:`text`},Ju=e=>qu[e],Yu=e=>Array.from({length:e},(e,t)=>t),Xu=({isError:e,isActive:t,borderWidth:n,borderColor:r,focusedBorderWidth:i,focusedBorderColor:a,errorBorderWidth:o,errorBorderColor:s})=>Wu({isError:e,isFocused:t,borderWidth:n,borderColor:r,focusedBorderWidth:i,focusedBorderColor:a,errorBorderWidth:o,errorBorderColor:s});I();var Zu=({codeField:e,value:t=``,name:n,id:r,ariaDescribedBy:i,isError:a=!1,onChange:o,onBlur:s})=>{let[c,l]=N(!1),u=hn(null),{codeLength:d,inputType:f=Do.NUMERIC,interSlotSpacing:p,fontName:m,fontSize:h,fontColor:g,fontWeight:_,slot:v}=e,y=Gu(d),b=Ku(t,f,y),x=Math.min(b.length,y-1),S=G(g)||`#000000`,C=e=>{let t=Ku(e,f,y);if(o==null||o(t),t.length>=y){var n;(n=u.current)==null||n.blur()}};return U(`div`,{"data-ui":`gui-code-field`,part:`gui-code-field`,style:{position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`center`,width:`100%`,backgroundColor:`transparent`},children:[U(`style`,{children:`
7
+ @keyframes ${zu} {
8
8
  0%, 49% { opacity: 1; }
9
9
  50%, 100% { opacity: 0; }
10
10
  }
11
- `}),U(`div`,{"data-ui":`gui-code-field-slots`,part:`gui-code-field-slots`,"aria-hidden":`true`,onClick:()=>{let e=u.current;if(!e)return;e.focus();let t=b.length;e.setSelectionRange(t,t)},style:{display:`flex`,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,gap:p,width:`100%`},children:Ku(y).map(e=>{var t;let n=c&&e===x,{borderWidth:r,borderColor:i}=qu({isError:a,isActive:n,borderWidth:v.borderWidth,borderColor:v.borderColor,focusedBorderWidth:v.focusedBorderWidth,focusedBorderColor:v.focusedBorderColor,errorBorderWidth:v.errorBorderWidth,errorBorderColor:v.errorBorderColor});return U(Lu,{char:(t=b[e])==null?``:t,showCaret:n,fontName:m,fontSize:h,fontColor:S,fontWeight:_,width:v.width,height:v.height,backgroundColor:v.backgroundColor,cornerRadius:v.cornerRadius,borderWidth:r,borderColor:i},e)})}),U(`input`,j(j({ref:u,id:r,name:n,value:b,inputMode:Gu(f),enterKeyHint:`done`,autoComplete:`one-time-code`,autoCapitalize:`off`,autoCorrect:`off`,spellcheck:!1,onKeyDown:e=>{var t;e.key===`Enter`&&(e.preventDefault(),(t=u.current)==null||t.blur())},onChange:e=>{C(e.currentTarget.value)},onPaste:e=>{var t,n;e.preventDefault();let r=(t=(n=e.clipboardData)==null?void 0:n.getData(`text`))==null?``:t;C(r)},onCopy:e=>{e.preventDefault()},onCut:e=>{e.preventDefault()},onFocus:()=>l(!0),onBlur:()=>{l(!1),s==null||s()},style:{position:`absolute`,opacity:0,pointerEvents:`none`,width:1,height:v.height||42,padding:0,border:0,caretColor:`transparent`,userSelect:`none`},"aria-label":`Verification code`},a&&{"aria-invalid":!0}),i&&{"aria-describedby":i}))]})},Yu=({descriptionLabel:e,id:t,messages:n=[]})=>!(n.length>0)&&!(e!=null&&e.text)?null:U(`div`,{id:t,"data-ui":`gui-code-input-description`,part:`gui-code-input-description`,style:{width:`100%`},children:[n.map(t=>U(K,j(j({},e),{},{text:t,fontColor:G(e==null?void 0:e.fontColor),alignment:e==null?void 0:e.alignment,isGenericTemplate:!0}),t)),(e==null?void 0:e.text)&&U(K,j(j({},e),{},{text:e.text,isGenericTemplate:!0}))]}),Xu=({layout:e,dataItem:t})=>{let n=String(t.id),r=`${n}-description`,i=!!t.required,a=mc(),{control:o,validate:s,clearFieldErrors:c,getErrorMessages:l}=ml({name:n,validators:t.validators,required:i,form:a});return U(`div`,{"data-ui":`gui-code-input`,part:`gui-code-input`,style:{display:`flex`,flexDirection:`column`,width:`100%`},children:[U(Fu,{titleLabel:j(j({},e.titleLabel),{},{text:t.text}),htmlFor:n}),U(fc,{name:n,control:o,rules:{validate:s},render:({field:t,fieldState:i})=>{var a;let o=l(i.error),s=!!i.error,u=o.length>0||!!((a=e.descriptionLabel)!=null&&a.text);return U(vt,{children:[U(Ju,j({codeField:e.codeField,id:n,name:t.name,value:t.value,isError:s,onChange:e=>{t.onChange(e),c()},onBlur:t.onBlur},u&&{ariaDescribedBy:r})),U(Yu,{id:r,messages:o,descriptionLabel:e.descriptionLabel})]})}})]})},Zu=({text:e,htmlFor:t,titleLabel:n})=>e?U(`div`,{"data-ui":`gui-text-input-title`,part:`gui-text-input-title`,style:{position:`relative`,width:`100%`},children:U(K,j(j({},n),{},{text:e,htmlFor:t,isGenericTemplate:!0}))}):null;I();var Qu=e=>e===To.EMAIL?{inputMode:`email`,autoComplete:`email`}:e===To.PHONE?{inputMode:`tel`,autoComplete:`tel`}:{inputMode:`text`},$u=({textField:e,id:t,name:n,value:r,inputPlaceholder:i,isError:a=!1,isRequired:o=!1,ariaDescribedBy:s,onChange:c,onBlur:l})=>{var u,d;let[f,p]=N(!1),{inputType:m,fontName:h,fontSize:g=15,fontColor:_,fontWeight:v,backgroundColor:y,cornerRadius:b=8,borderWidth:x,borderColor:S,focusedBorderWidth:C,focusedBorderColor:w,errorBorderWidth:T,errorBorderColor:ee}=e,{borderWidth:E,borderColor:te}=Vu({isError:a,isFocused:f,borderWidth:x,borderColor:S,focusedBorderWidth:C,focusedBorderColor:w,errorBorderWidth:T,errorBorderColor:ee});return U(`input`,j(j({id:t,name:n},Qu(m)),{},{enterKeyHint:`done`,value:r,placeholder:i==null?``:i,"data-ui":`gui-text-field`,part:`gui-text-field`,"aria-required":o,"aria-invalid":a,"aria-describedby":s,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.currentTarget.blur())},onChange:e=>{c==null||c(e.currentTarget.value)},onFocus:()=>p(!0),onBlur:()=>{p(!1),l==null||l()},style:{boxSizing:`border-box`,width:`100%`,height:42,padding:11,fontFamily:Ro(h),fontSize:g,fontWeight:Lo(v),color:(u=G(_))==null?`#000000`:u,backgroundColor:(d=G(y))==null?`#FFFFFF`:d,borderStyle:`solid`,borderWidth:E,borderColor:te,borderRadius:b,outline:`none`}}))},ed=({id:e,messages:t=[],descriptionLabel:n})=>!(t.length>0)&&!(n!=null&&n.text)?null:U(`div`,{id:e,"data-ui":`gui-text-input-description`,part:`gui-text-input-description`,style:{width:`100%`},children:[t.map(e=>U(K,j(j({},n),{},{text:e,alignment:n==null?void 0:n.alignment,isGenericTemplate:!0}),e)),(n==null?void 0:n.text)&&U(K,j(j({},n),{},{text:n.text,isGenericTemplate:!0}))]}),td=({layout:e,dataItem:t})=>{let n=String(t.id),r=`${n}-description`,i=typeof t.required==`boolean`&&t.required,a=mc(),{control:o,validate:s,clearFieldErrors:c,getErrorMessages:l}=ml({name:n,validators:t.validators,required:i,form:a});return U(`div`,{"data-ui":`gui-text-input`,part:`gui-text-input`,style:{display:`flex`,flexDirection:`column`,width:`100%`},children:[U(Zu,{text:t.text,htmlFor:n,titleLabel:e.titleLabel}),U(fc,{name:n,control:o,rules:{validate:s},render:({field:a,fieldState:o})=>{var s,u;let d=l(o.error),f=!!o.error,p=d.length>0||!!((s=e.descriptionLabel)!=null&&s.text);return U(vt,{children:[U($u,j({textField:e.textField,id:n,name:a.name,value:(u=a.value)==null?``:u,inputPlaceholder:t.placeholder,isError:f,isRequired:i,onChange:e=>{a.onChange(e),c()},onBlur:a.onBlur},p&&{ariaDescribedBy:r})),U(ed,{id:r,messages:d,descriptionLabel:e.descriptionLabel})]})}})]})};function nd(e,t,n){return e.type===Eo.GENERIC_COLUMN&&t.type===Eo.GENERIC_COLUMN?U(Ou,j({},t.content)):e.type===Eo.SECTION&&t.type===Eo.SECTION?U(Pu,j(j({},t.content),{},{dataItems:e.content.dataItems,uiComponents:n})):e.type===Eo.QUESTION&&t.type===Eo.QUESTION?U(Fl,{layout:t.content,dataSourceQuestion:e.content}):e.type===Eo.CODE_INPUT&&t.type===Eo.CODE_INPUT?U(Xu,{layout:t.content,dataItem:e.content}):e.type===Eo.TEXT_INPUT&&t.type===Eo.TEXT_INPUT?U(td,{layout:t.content,dataItem:e.content}):null}var rd=({dataItems:e,uiComponents:t})=>!e||!t||!Array.isArray(e)||!Array.isArray(t)?null:e.map((e,n)=>{let r=t.find(t=>t.id===e.uiComponentId);if(!r)return null;let i=nd(e,r,t);return i?U(`div`,{"data-ui":`gui-list-data-item`,part:`gui-list-data-item`,children:i},`${e.uiComponentId}-${n}`):null}),id=({uiComponents:e,backgroundColor:t,cornerRadius:n,paddings:r,dataSource:i})=>U(`div`,{"data-ui":`gui-list-column`,part:`gui-list-column`,style:j({display:`flex`,flexDirection:`column`,backgroundColor:G(t)||`transparent`,borderRadius:n},jo(r)),children:U(rd,{dataItems:i==null?void 0:i.dataItems,uiComponents:e})}),ad=({topColumn:e,mainListColumn:t,bottomColumn:n,backgroundColor:r=`#ffffff00`,backgroundImage:i,cornerRadius:a,isInModal:o=!1,dataSource:s})=>{let{failedAssets:c}=so();return U(`div`,{"data-ui":`gui-scaffold-container`,part:`gui-scaffold-container`,id:`scaffold-container`,style:j(j({display:`flex`,flexDirection:`column`,height:`100%`},o&&{minHeight:0}),{},{backgroundColor:G(r)||`transparent`,borderRadius:a},Io(i,c)),children:[e&&U(`div`,{"data-ui":`gui-top-column`,part:`gui-top-column`,style:{flex:`0 0 auto`},children:U(Ou,j({},e))}),t&&U(`div`,{"data-ui":`gui-main-list-column-container`,part:`gui-main-list-column-container`,style:{flex:`1 1 auto`,minHeight:0,overflowY:`auto`,overflowX:`hidden`,backgroundColor:G(t.backgroundColor)||`transparent`},children:U(`div`,{"data-ui":`gui-main-list-column`,part:`gui-main-list-column`,style:{display:`flex`,flexDirection:`column`,minHeight:`100%`,justifyContent:t.verticalAlignment&&bu[t.verticalAlignment]||xu},children:U(id,j(j({},t),{},{backgroundColor:`transparent`,dataSource:s}))})}),n&&U(`div`,{"data-ui":`gui-bottom-column`,part:`gui-bottom-column`,style:{flex:`0 0 auto`},children:U(Ou,j({},n))})]})},od=({rootElement:e,dataSource:t,properties:n})=>{let{type:r,content:i}=e,{perform:a}=ao(),o=es(t.dataItems,n);console.log(`properties`,n),console.log(`defaultValues`,o);let s=ul({mode:`onSubmit`,reValidateMode:`onSubmit`,criteriaMode:`all`,defaultValues:o}),c={COLLECT_DATA:s.handleSubmit(e=>{a(Xo(e),wa.FORM),s.reset()})};if(r===bo.LIST_SCAFFOLD){let{topColumn:e,mainListColumn:n,bottomColumn:r,backgroundColor:a,backgroundImage:o,cornerRadius:l}=i;return U(mu,{handlers:c,children:U(hc,j(j({},s),{},{children:U(ad,{topColumn:e,mainListColumn:n,bottomColumn:r,backgroundColor:a,dataSource:t,cornerRadius:l,backgroundImage:o})}))})}return null};Vr();var sd=Object.defineProperty,cd=Object.getOwnPropertySymbols,ld=Object.prototype.hasOwnProperty,ud=Object.prototype.propertyIsEnumerable,dd=(e,t,n)=>t in e?sd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))ld.call(t,n)&&dd(e,n,t[n]);if(cd)for(var n of cd(t))ud.call(t,n)&&dd(e,n,t[n]);return e},pd=(e,t)=>{var n={};for(var r in e)ld.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cd)for(var r of cd(e))t.indexOf(r)<0&&ud.call(e,r)&&(n[r]=e[r]);return n},md;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e<this.size;e++)o.push(!1);for(let e=0;e<this.size;e++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a==-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(a=t,e=n),this.applyMask(t)}}i(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(n,r){let i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){let i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,r,a=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)n(e,8,f);let m=[];for(;m.length*8<f.length;)m.push(0);return f.forEach((e,t)=>m[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n==0&&r==0||n==0&&r==t-1||n==t-1&&r==0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let a=(t<<10|n)^21522;i(!(a>>>15));for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(!(t>>>18));for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a<this.size&&0<=o&&o<this.size&&this.setFunctionModule(a,o,i!=2&&i!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){let n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw RangeError(`Invalid argument`);let a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],o=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=a-s%a,l=Math.floor(s/a),u=[],d=t.reedSolomonComputeDivisor(o);for(let n=0,r=0;n<a;n++){let i=e.slice(r,r+l-o+(n<c?0:1));r+=i.length;let a=t.reedSolomonComputeRemainder(i,d);n<c&&i.push(0),u.push(i.concat(a))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach((t,n)=>{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i<this.size;i++)for(let a=0;a<2;a++){let o=t-a,s=t+1&2?i:this.size-1-i;!this.isFunction[s][o]&&n<e.length*8&&(this.modules[s][o]=r(e[n>>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[n][o]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][n]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){let i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(let e of this.modules)n=e.reduce((e,t)=>e+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map(e=>0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(!(n>>>8)),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return!!(e>>>t&1)}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e<t.length;){let i=Math.min(t.length-e,3);n(parseInt(t.substring(e,e+i),10),i*3+1,r),e+=i}return new e(e.Mode.NUMERIC,t.length,r)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let r=[],i=0;for(;i+2<=t.length;i+=2){let a=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i))*45;a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i+1)),n(a,11,r)}return i<t.length&&n(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return t==``?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let r=[];if(t<0)throw RangeError(`ECI assignment value out of range`);if(t<128)n(t,8,r);else if(t<16384)n(2,2,r),n(t,14,r);else if(t<1e6)n(6,3,r),n(t,21,r);else throw RangeError(`ECI assignment value out of range`);return new e(e.Mode.ECI,0,r)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(let r of e){let e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)==`%`?(t.push(parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`;let o=a;e.QrSegment=a})(md||(md={})),(e=>{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||(e.QrCode={}))})(md||(md={})),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(md||(md={}));var hd=md,gd={L:hd.QrCode.Ecc.LOW,M:hd.QrCode.Ecc.MEDIUM,Q:hd.QrCode.Ecc.QUARTILE,H:hd.QrCode.Ecc.HIGH},_d=128,vd=`L`,yd=`#FFFFFF`,bd=`#000000`,xd=!1,Sd=1,Cd=4,wd=0,Td=.1;function Ed(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null)n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;else if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`)}else a&&i===null&&(i=o)})}),n.join(``)}function Dd(e,t){return e.slice().map((e,n)=>n<t.y||n>=t.y+t.h?e:e.map((e,n)=>n<t.x||n>=t.x+t.w?e:!1))}function Od(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*Td),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function kd(e,t){return t==null?e?Cd:wd:Math.max(Math.floor(t),0)}function Ad({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:s}){let c=L.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...hd.QrSegment.makeSegments(t)),e),[]);return hd.QrCode.encodeSegments(r,gd[t],n,void 0,void 0,s)},[e,t,n,s]),{cells:l,margin:u,numCells:d,calculatedImageSettings:f}=L.useMemo(()=>{let e=c.getModules(),t=kd(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:Od(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var jd=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}(),Md=L.forwardRef(function(e,t){let n=e,{value:r,size:i=_d,level:a=vd,bgColor:o=yd,fgColor:s=bd,includeMargin:c=xd,minVersion:l=Sd,boostLevel:u,marginSize:d,imageSettings:f}=n,p=pd(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=pd(p,[`style`]),g=f==null?void 0:f.src,_=L.useRef(null),v=L.useRef(null),y=L.useCallback(e=>{_.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[b,x]=L.useState(!1),{margin:S,cells:C,numCells:w,calculatedImageSettings:T}=Ad({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:d,imageSettings:f,size:i});L.useEffect(()=>{if(_.current!=null){let e=_.current,t=e.getContext(`2d`);if(!t)return;let n=C,r=v.current,a=T!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&T.excavation!=null&&(n=Dd(C,T.excavation));let c=window.devicePixelRatio||1;e.height=e.width=i*c;let l=i/w*c;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,w,w),t.fillStyle=s,jd?t.fill(new Path2D(Ed(n,S))):C.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+S,n+S,1,1)})}),T&&(t.globalAlpha=T.opacity),a&&t.drawImage(r,T.x+S,T.y+S,T.w,T.h)}}),L.useEffect(()=>{x(!1)},[g]);let ee=fd({height:i,width:i},m),E=null;return g!=null&&(E=L.createElement(`img`,{src:g,key:g,style:{display:`none`},onLoad:()=>{x(!0)},ref:v,crossOrigin:T==null?void 0:T.crossOrigin})),L.createElement(L.Fragment,null,L.createElement(`canvas`,fd({style:ee,height:i,width:i,ref:y,role:`img`},h)),E)});Md.displayName=`QRCodeCanvas`;var Nd=L.forwardRef(function(e,t){let n=e,{value:r,size:i=_d,level:a=vd,bgColor:o=yd,fgColor:s=bd,includeMargin:c=xd,minVersion:l=Sd,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=pd(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=Ad({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:f,imageSettings:p,size:i}),y=g,b=null;p!=null&&v!=null&&(v.excavation!=null&&(y=Dd(g,v.excavation)),b=L.createElement(`image`,{href:p.src,height:v.h,width:v.w,x:v.x+h,y:v.y+h,preserveAspectRatio:`none`,opacity:v.opacity,crossOrigin:v.crossOrigin}));let x=Ed(y,h);return L.createElement(`svg`,fd({height:i,width:i,viewBox:`0 0 ${_} ${_}`,ref:t,role:`img`},m),!!d&&L.createElement(`title`,null,d),L.createElement(`path`,{fill:o,d:`M0,0 h${_}v${_}H0z`,shapeRendering:`crispEdges`}),L.createElement(`path`,{fill:s,d:x,shapeRendering:`crispEdges`}),b)});Nd.displayName=`QRCodeSVG`;var Pd={width:`100%`,height:`auto`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,marginBottom:`40px`},Fd={position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`stretch`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`},Id={marginBottom:20,lineHeight:`140%`},Ld={fontWeight:`400`,lineHeight:`140%`},Rd=({header:e,footer:t,buttons:n,title:r,description:i,qr:a,url:o,backgroundColor:s,backgroundImage:c})=>{let{perform:l}=ao();return!o&&typeof o!=`string`?(l(new Bl({errorCode:Uo.DECODING_FAILED,message:`No QR URL in the client config`})),null):U(_s,{header:e,footer:t,buttons:n,backgroundColor:s,backgroundImage:c,children:U(`div`,{part:`gui-device-transfer-screen-container`,"data-ui":`gui-device-transfer-screen-container`,id:`device-transfer-screen-container`,style:j(j({},Fd),{},{justifyContent:`flex-start`}),children:[U(`div`,{part:`gui-device-transfer-qr-container`,style:Pd,children:U(Nd,{value:o,size:300,fgColor:a==null?void 0:a.color,bgColor:a==null?void 0:a.backgroundColor,style:{width:`100%`,maxWidth:300,height:`auto`}})}),r&&U(`div`,{style:Id,children:U(K,j({},r))}),i&&U(`div`,{style:Ld,children:U(vs,j({},i))})]})})},zd=function(e){return e.IDLE=`idle`,e.UPLOADING=`uploading`,e.DONE=`done`,e}({}),Bd=function(e){return e.IDLE=`idle`,e.UPLOADING=`uploading`,e.SUCCESS=`success`,e.ERROR=`error`,e}({}),Vd=function(e){return e.OK=`ok`,e.SIZE=`size`,e.FORMAT=`format`,e}({});function Hd(e){if(e<1024)return`${e} B`;let t=e/1024;if(t<1024)return`${t<10?t.toFixed(1):Math.round(t)} kB`;let n=t/1024;return`${n<10?n.toFixed(1):Math.round(n)} MB`}function Ud(e){let t=e.lastIndexOf(`.`);return t<0?``:e.slice(t).toLowerCase()}function Wd(e,t){let n=Ud(e);return n?new Set(t.map(e=>e.startsWith(`.`)?e.toLowerCase():`.${e.toLowerCase()}`)).has(n):!1}function Gd(e,t,n){return e.size>t?Vd.SIZE:Wd(e.name,n)?Vd.OK:Vd.FORMAT}function Kd(e){return`${e.name}\0${e.size}\0${e.lastModified}`}var qd=e=>{let t=getComputedStyle(e),n=parseFloat(t.lineHeight);if(!Number.isFinite(n)||n<=0){let e=parseFloat(t.fontSize);n=Number.isFinite(e)?e*1.35:20}return e.scrollHeight>n+2},Jd={display:`grid`,gridTemplateColumns:`auto minmax(0, 1fr) auto auto`,columnGap:`8px`,minWidth:0,width:`100%`},Yd={width:`20px`,height:`20px`,color:`#555`},Xd={fontSize:`15px`,wordBreak:`break-all`},Zd={display:`flex`,gap:3},Qd={display:`flex`,alignItems:`center`,justifyContent:`center`,height:`36px`,width:`36px`},$d={border:`none`,background:`none`,cursor:`pointer`,padding:0};I();var ef=({uploadFile:e,uploadPhase:t,onRetryFile:n,onRemoveFile:r})=>{let[i,a]=N(!1),o=hn(null),s=vn(()=>{let e=o.current;e&&a(qd(e))},[]);return mn(()=>{s();let e=o.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>s());return t.observe(e),()=>t.disconnect()},[e.file.name,e.file.size,e.uploadState,t,s]),U(`div`,{style:j(j({},Jd),{},{alignItems:i?`start`:`center`}),children:[U(`div`,{style:Yd,children:U(Bo,{type:`file`})}),U(`div`,{ref:o,children:U(`span`,{style:Xd,children:e.file.name})}),U(`div`,{children:U(`span`,{style:Xd,children:[` (`,Hd(e.file.size),`)`]})}),U(`div`,{style:Zd,children:[U(`div`,{style:Qd,children:e.uploadState===Bd.ERROR&&t===zd.DONE&&U(`button`,{type:`button`,"aria-label":`Retry`,onClick:()=>n(e.id),style:$d,children:U(Bo,{type:`reload`})})}),U(`div`,{style:Qd,children:[(t===zd.UPLOADING||e.uploadState===Bd.UPLOADING)&&e.uploadState!==Bd.SUCCESS&&U(Bo,{type:`loader`}),e.uploadState===Bd.SUCCESS&&U(Bo,{type:`ok`}),t!==zd.UPLOADING&&(e.uploadState===Bd.IDLE||e.uploadState===Bd.ERROR)&&U(`button`,{type:`button`,"aria-label":`Remove`,onClick:()=>r(e.id),style:$d,children:U(Bo,{type:`close_icon`})})]})]})]})},tf=({range:e,color:t=`#00A028`})=>U(`div`,{style:{position:`absolute`,bottom:`2px`,left:0,right:0,marginLeft:`8px`,marginRight:`8px`,height:`2px`,overflow:`hidden`},children:U(`div`,{style:{height:`100%`,width:`${Math.round(e*100)}%`,backgroundColor:t,transition:`width 0.15s ease-out`}})});I();var nf=({settings:e,errorMessages:t,serviceToken:n,uploadFileToTemp:r,abortRequest:i})=>{var a;let{perform:o}=ao(),[s,c]=N([]),[l,u]=N(zd.IDLE),d=hn([]),f=hn(!1);d.current=s;let p=s.some(e=>e.clientValidation!==Vd.OK),m=s.filter(e=>e.clientValidation===Vd.OK),h=m.length>0&&m.every(e=>e.uploadState===Bd.SUCCESS&&e.tempFileId),g=l===zd.UPLOADING,_=l===zd.DONE&&h&&!p,{devSettings:v}=io(),y=v==null||(a=v.screens)==null||(a=a[fo.UPLOAD_FILES])==null?void 0:a.files,b=!!y,x=e=>{b||g||c(t=>{let n=t.find(t=>t.id===e);return!n||n.uploadState===Bd.UPLOADING||n.uploadState===Bd.SUCCESS?t:t.filter(t=>t.id!==e)})},S=vn(function(){var e=C(function*(e){if(!n||!r)return c(n=>n.map(n=>n.id===e.id?j(j({},n),{},{uploadState:Bd.ERROR,serverError:t.fileNotLoaded}):n)),null;try{var i;c(t=>t.map(t=>t.id===e.id?j(j({},t),{},{uploadState:Bd.UPLOADING,progressBarRange:0}):t));let n=yield r(e.file,(t,n)=>{let r=n>0?t/n:0;c(t=>t.map(t=>t.id===e.id?j(j({},t),{},{progressBarRange:r,uploadState:Bd.UPLOADING}):t))});if(n.code===0&&`tempFileId`in n.data){let t=n.data.tempFileId;return c(n=>n.map(n=>n.id===e.id?j(j({},n),{},{uploadState:Bd.SUCCESS,progressBarRange:1,tempFileId:t}):n)),{tempFileId:t,name:e.file.name,size:e.file.size}}let a=n.data,o=`httpCode`in a?(i=a.what)==null?t.fileNotLoaded:i:t.fileNotLoaded;return c(t=>t.map(t=>t.id===e.id?j(j({},t),{},{uploadState:Bd.ERROR,serverError:o}):t)),null}catch(n){return c(n=>n.map(n=>n.id===e.id?j(j({},n),{},{uploadState:Bd.ERROR,serverError:t.fileNotLoaded}):n)),null}});return function(t){return e.apply(this,arguments)}}(),[n,r]),w=function(){var t=C(function*(t){var n;if(g||_)return;let r=Array.from((n=t.currentTarget.files)==null?[]:n);if(t.currentTarget.value=``,!r.length)return;let i=[];c(t=>{let n=new Set(t.map(e=>Kd(e.file))),a=Math.max(0,e.selectionLimit-t.length),o=[...t];for(let t of r){if(a<=0)break;let r=Kd(t);if(n.has(r))continue;n.add(r);let s=Gd(t,e.fileMaxSize,e.supportedFileFormats),c={id:ei(),file:t,clientValidation:s,uploadState:Bd.IDLE,progressBarRange:0};o.push(c),s===Vd.OK&&i.push(c),--a}return o}),i.length});return function(e){return t.apply(this,arguments)}}(),T=function(){var e=C(function*(e){if(b||g||_||p)return;c(e=>e.map(e=>j(j({},e),{},{serverError:void 0})));let t=d.current.filter(e=>e.clientValidation===Vd.OK).map(e=>e.id);if(!t.length)return;u(zd.UPLOADING),f.current=!1;let n=[],r=!1;for(let e of t){if(f.current)break;let t=d.current.find(t=>t.id===e);if(!t||t.clientValidation!==Vd.OK)continue;if(t.uploadState===Bd.SUCCESS&&t.tempFileId){n.push(t.tempFileId);continue}let i=yield S(t);if(f.current)break;i?n.push(i.tempFileId):r=!0}!r&&n.length===t.length&&o({files:n,upload_complete:!0},e),u(zd.DONE)});return function(t){return e.apply(this,arguments)}}(),ee=function(){var e=C(function*(e){if(b||l===zd.UPLOADING||_)return;f.current=!1;let t;c(n=>{let r=n.map(t=>t.id===e?j(j({},t),{},{uploadState:Bd.IDLE,serverError:void 0,progressBarRange:0}):t);return t=r.find(t=>t.id===e),r}),t&&t.clientValidation===Vd.OK&&((yield S(t))&&!f.current&&c(e=>{let t=e.filter(e=>e.clientValidation===Vd.OK);if(t.length>0&&t.every(e=>e.uploadState===Bd.SUCCESS&&e.tempFileId)){let e=t.map(e=>e.tempFileId);o({files:e,upload_complete:!0},wa.FORM)}return e}),u(zd.DONE))});return function(t){return e.apply(this,arguments)}}(),E=()=>{f.current=!0,i==null||i()};return pn(()=>()=>E(),[]),pn(()=>{if(v&&y){let e=y.map((e,t)=>{var n,r,i;let a=new File([],(n=e.name)==null?`test-file-${t}.jpg`:n);return Object.defineProperty(a,"size",{value:(r=e.size)==null?1048576:r}),{id:t.toString(),file:a,clientValidation:e.clientValidation,uploadState:e.uploadState,progressBarRange:(i=e.progressBarRange)==null?0:i}});c(e),u(zd.DONE)}},[v,y]),{uploadFileRows:s,uploadPhase:l,pickFiles:e=>{b||g||_||e()},removeFile:x,onChangeFileInput:w,submit:T,retryFile:ee}},rf={position:`relative`,display:`flex`,flexDirection:`column`,height:`100%`,width:`100%`,minHeight:0,fontFamily:`-apple-system, sans-serif`},af={flex:`1 1 auto`,minHeight:0,overflowY:`auto`,width:`100%`,display:`flex`,flexDirection:`column`,alignItems:`stretch`},of={marginBottom:`8px`},sf={minHeight:`54px`,position:`relative`,backgroundColor:`#fff`,borderRadius:`12px`,padding:`8px 16px`,marginBottom:`2px`},cf={boxShadow:`inset 0 0 0 2px #d32f2f`},lf={fontSize:`13px`,color:`#d32f2f`,marginTop:`4px`,marginBottom:`4px`,marginLeft:`2px`},uf={position:`absolute`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,inset:0,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,background:`rgba(0,0,0,0.2)`,zIndex:1e3,pointerEvents:`auto`,cursor:`default`},df={position:`relative`,padding:`32px 24px 0`,border:`1px solid rgba(0, 0, 0, 0.06)`,width:`min(400px, calc(100vw - 32px))`},ff={marginBottom:`10px`,fontWeight:600},pf={marginBottom:`84px`},mf={maxHeight:`calc(100dvh - 190px)`,overflow:`auto`},hf={position:`absolute`,bottom:0,insetInline:0,padding:`24px`,width:`100%`};I();var gf=e=>{var t,n,r,i,a;let{title:o,description:s,header:c,buttons:l,footer:u,backgroundColor:d,backgroundImage:f,popups:p,settings:m,errorMessages:h,serviceToken:g,uploadFileToTemp:_,abortRequest:v}=e,y=hn(null),[b,x]=N(!1),[S,C]=N(!1),{uploadFileRows:w,uploadPhase:T,pickFiles:ee,removeFile:E,onChangeFileInput:te,submit:ne,retryFile:re}=nf({serviceToken:g,settings:m,errorMessages:h,uploadFileToTemp:_,abortRequest:v}),{devSettings:D}=io(),O=D==null||(t=D.popups)==null?void 0:t.files_not_selected,ie=D==null||(n=D.popups)==null?void 0:n.files_limit_exceeded,ae=!!O||!!ie||!!(D!=null&&(r=D.screens)!=null&&r[fo.UPLOAD_FILES]),oe=!!(O!=null&&O.isOpen),se=!!(ie!=null&&ie.isOpen),k=p==null?void 0:p.find(e=>e.reason===Ko.FILES_NOT_SELECTED),ce=p==null?void 0:p.find(e=>e.reason===Ko.FILES_LIMIT_EXCEEDED),le=()=>{ae||x(!1)},ue=()=>{ae||C(!1)},de=e=>e===`size`?h.invalidFileSize:e===`format`?h.invalidFileFormat:null,fe=e=>{if(!ae&&e){if(e.actionId===`SELECT_FILES`){if(w.length>=m.selectionLimit)return C(!0);ee(()=>{var e;return(e=y.current)==null?void 0:e.click()})}else if(e.actionId===`SUBMIT_FILES`){if(w.length===0)return x(!0);ne(e.type===`FORM`?wa.FORM:wa.DATA)}}};return pn(()=>{D&&(x(oe),C(se))},[oe,se,D]),U(_s,{header:c,footer:u,backgroundColor:d==null?`#f5f5f5`:d,backgroundImage:f,children:[U(`div`,{style:rf,part:`gui-file-upload-root`,"data-ui":`gui-file-upload`,children:[U(`div`,{style:af,children:[U(`div`,{style:of,children:U(K,j({},o))}),w.length===0&&U(K,j({},s)),w.length>0&&w.map(e=>{var t;let n=e.clientValidation!==Vd.OK||e.uploadState===Bd.ERROR&&T!==zd.UPLOADING;return U(`div`,{style:{width:`100%`},children:[U(`div`,{"data-ui":`gui-file-card`,style:j(j({},sf),n?cf:{}),children:[U(ef,{uploadFile:e,uploadPhase:T,onRetryFile:re,onRemoveFile:E}),e.uploadState===Bd.UPLOADING&&U(tf,{range:e.progressBarRange})]}),e.clientValidation!==Vd.OK&&U(`div`,{style:lf,children:U(K,{text:de(e.clientValidation),fontSize:`13px`,fontColor:`#d32f2f`})}),T!==zd.UPLOADING&&e.uploadState===Bd.ERROR&&e.clientValidation===Vd.OK&&U(`div`,{style:lf,children:U(K,{text:(t=e.serverError)==null?h.fileNotLoaded:t,fontSize:`13px`,fontColor:`#d32f2f`})})]},e.id)})]}),!!(l!=null&&l.length)&&U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`10px`,width:`100%`,paddingTop:`12px`},children:[U(`input`,{ref:y,type:`file`,multiple:!0,accept:m.supportedFileFormats.map(e=>e.toLowerCase()).join(`,`),style:{display:`none`},onChange:te}),l.map((e,t)=>U(ms,j(j({dataTestId:`file-upload-button$-${t}`},e),{},{onClick:()=>fe(e)}),t))]})]}),S&&ce&&U(`div`,{style:uf,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),ue()},children:U(`div`,{style:j(j({},df),{},{borderRadius:(k==null?void 0:k.cornerRadius)||`27px`,backgroundColor:(k==null?void 0:k.backgroundColor)||`#ffffff`}),children:[U(`div`,{style:ff,children:U(K,j({fontSize:`24px`},ce.title))}),U(`div`,{style:pf,children:U(`div`,{style:mf,children:U(K,j({fontSize:`17px`},ce.message))})}),ce.actionButton1&&U(`div`,{style:hf,children:U(ms,j(j({dataTestId:`files-limit-exceeded-modal-ok-button`},ce.actionButton1),(ce==null||(i=ce.actionButton1)==null?void 0:i.type)===`FORM`?{onClick:ue}:{}))})]})}),b&&k&&U(`div`,{style:uf,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),le()},children:U(`div`,{style:j(j({},df),{},{borderRadius:(k==null?void 0:k.cornerRadius)||`27px`,backgroundColor:(k==null?void 0:k.backgroundColor)||`#ffffff`}),children:[U(`div`,{style:ff,children:U(K,j({fontSize:`24px`},k.title))}),U(`div`,{style:pf,children:U(`div`,{style:mf,children:U(K,j({fontSize:`17px`},k.message))})}),k.actionButton1&&U(`div`,{style:hf,children:U(ms,j(j({dataTestId:`no-files-modal-ok-button`},k.actionButton1),(k==null||(a=k.actionButton1)==null?void 0:a.type)===`FORM`?{onClick:le}:{}))})]})})]})},_f=({moduleProps:e})=>{let{templateId:t,templateLayout:n}=e,{perform:r}=ao();if(!t||!n)return U(ws,{});if(t===fo.STATUS)return U(ys,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,description:n==null?void 0:n.description,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage});if(t===fo.INFO)return U(Ss,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage});if(t===fo.GEOLOCATION)return U(fu,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage,popups:n==null?void 0:n.popups,askEveryTime:n==null?void 0:n.askEveryTime,getLocationTimeout:e.getLocationTimeout,locationAccuracy:e.locationAccuracy});if(t===fo.GENERIC_LOCATION)return U(Mu,{rootElement:n.rootElement,popups:n.popups,settings:n.settings});if(t===fo.PROGRESS)return U(ws,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,progressView:n==null?void 0:n.progressView,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage});if(t===fo.INFO_DETAILS)return U(Os,{header:n==null?void 0:n.header,title:n==null?void 0:n.title,details:n==null?void 0:n.details,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage});if(t===fo.CAMERA)return U(Yl,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:e.backgroundColor,selectionLimit:e.selectionLimit,backgroundImage:n==null?void 0:n.backgroundImage});if(t===fo.GALLERY)return U(Gl,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:e.backgroundColor,selectionLimit:e.selectionLimit,backgroundImage:n==null?void 0:n.backgroundImage});if(t===fo.QUESTIONS){var i;let t=(i=e.properties)!=null&&i.length?JSON.stringify(e.properties):`default-key`;return U(Vl,{dataSource:e.dataSource,properties:e.properties,questions:n==null?void 0:n.questions,header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage},t)}if(t===fo.DEVICE_TRANSFER)return U(Rd,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,title:n==null?void 0:n.title,description:n==null?void 0:n.description,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage,qr:n==null?void 0:n.qr,url:e==null?void 0:e.url});if(t===fo.GENERIC)return U(Au,{rootElement:n.rootElement});if(t===fo.GENERIC_PROGRESS)return U(Nu,{rootElement:n.rootElement});if(t===fo.GENERIC_LIST){var a;return U(od,{rootElement:n.rootElement,dataSource:(a=e.dataSource)==null?n.dataSource:a,properties:e.properties})}return t===fo.UPLOAD_FILES?U(gf,{title:n.title,description:n.description,header:n.header,buttons:n.buttons,footer:n.footer,backgroundColor:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage,popups:n.popups,errorMessages:n.errorMessages,settings:n.settings,serviceToken:e.serviceToken,uploadFileToTemp:e.uploadFileToTemp,abortRequest:e.abortRequest}):(r(new Bl({errorCode:Uo.DECODING_FAILED,message:`Unsupported step template id`})),null)};un(),I();var vf,yf=!1,bf=({children:e,locale:t,direction:n})=>U(`div`,{part:`gui-idv`,id:`gui-idv-web-c`,dir:n,lang:t,style:{backgroundColor:`white`,height:`100%`,width:`100%`},children:e}),xf=({isProcessing:e,moduleProps:t,perform:n,devSettings:r,idvEventListener:i})=>{let a=ka(t.locale);return pn(()=>{i==null||i(`idv-gui`,`Gui component was rendered`)},[i]),U(ro,{perform:(e,t)=>n==null?void 0:n(e,t),setIsProcessingCallback:e,devSettings:r,failedAssets:t.failedAssets,layoutDirection:a,children:U(bf,{locale:t.locale,direction:a,children:U(_f,{moduleProps:t})})})},Sf=class extends ba{constructor(){super(),this._mounted=!1,this._shadowRoot=this.attachShadow({mode:`open`}),this._renderVersion=0,this.props=null}setProps(e){let t=e.moduleProps.failedAssets;if(t&&t.blockingAssets.size>0){var n;let r=new Bl({errorCode:Uo.IMAGE_LOADING_FAILED,message:`Failed to load image asset${t.blockingAssets.size>1?`s`:``}: ${[...t.blockingAssets].join(`, `)}`});(n=e.perform)==null||n.call(e,r)}this._renderVersion++,this.props={idvEventListener:e.idvEventListener,moduleProps:e.moduleProps,isProcessing:e.isProcessing,perform:e.perform,devSettings:e.devSettings},this.render()}connectedCallback(){this.render(),this._mounted=!0}static cancel(){}render(){if(!this.props)return``;if(this.shadowRoot){let e=document.createElement(`style`);e.id=`idv-gui-styles`,e.textContent=`
11
+ `}),U(`div`,{"data-ui":`gui-code-field-slots`,part:`gui-code-field-slots`,"aria-hidden":`true`,onClick:()=>{let e=u.current;if(!e)return;e.focus();let t=b.length;e.setSelectionRange(t,t)},style:{display:`flex`,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,gap:p,width:`100%`},children:Yu(y).map(e=>{var t;let n=c&&e===x,{borderWidth:r,borderColor:i}=Xu({isError:a,isActive:n,borderWidth:v.borderWidth,borderColor:v.borderColor,focusedBorderWidth:v.focusedBorderWidth,focusedBorderColor:v.focusedBorderColor,errorBorderWidth:v.errorBorderWidth,errorBorderColor:v.errorBorderColor});return U(Bu,{char:(t=b[e])==null?``:t,showCaret:n,fontName:m,fontSize:h,fontColor:S,fontWeight:_,width:v.width,height:v.height,backgroundColor:v.backgroundColor,cornerRadius:v.cornerRadius,borderWidth:r,borderColor:i},e)})}),U(`input`,j(j({ref:u,id:r,name:n,value:b,inputMode:Ju(f),enterKeyHint:`done`,autoComplete:`one-time-code`,autoCapitalize:`off`,autoCorrect:`off`,spellcheck:!1,onKeyDown:e=>{var t;e.key===`Enter`&&(e.preventDefault(),(t=u.current)==null||t.blur())},onChange:e=>{C(e.currentTarget.value)},onPaste:e=>{var t,n;e.preventDefault();let r=(t=(n=e.clipboardData)==null?void 0:n.getData(`text`))==null?``:t;C(r)},onCopy:e=>{e.preventDefault()},onCut:e=>{e.preventDefault()},onFocus:()=>l(!0),onBlur:()=>{l(!1),s==null||s()},style:{position:`absolute`,opacity:0,pointerEvents:`none`,width:1,height:v.height||42,padding:0,border:0,caretColor:`transparent`,userSelect:`none`},"aria-label":`Verification code`},a&&{"aria-invalid":!0}),i&&{"aria-describedby":i}))]})},Qu=({descriptionLabel:e,id:t,messages:n=[]})=>!(n.length>0)&&!(e!=null&&e.text)?null:U(`div`,{id:t,"data-ui":`gui-code-input-description`,part:`gui-code-input-description`,style:{width:`100%`},children:[n.map(t=>U(K,j(j({},e),{},{text:t,fontColor:G(e==null?void 0:e.fontColor),alignment:e==null?void 0:e.alignment,isGenericTemplate:!0}),t)),(e==null?void 0:e.text)&&U(K,j(j({},e),{},{text:e.text,isGenericTemplate:!0}))]}),$u=({layout:e,dataItem:t})=>{let n=String(t.id),r=`${n}-description`,i=!!t.required,a=_c(),{control:o,validate:s,clearFieldErrors:c,getErrorMessages:l}=_l({name:n,validators:t.validators,required:i,form:a});return U(`div`,{"data-ui":`gui-code-input`,part:`gui-code-input`,style:{display:`flex`,flexDirection:`column`,width:`100%`},children:[U(Ru,{titleLabel:j(j({},e.titleLabel),{},{text:t.text}),htmlFor:n}),U(hc,{name:n,control:o,rules:{validate:s},render:({field:t,fieldState:i})=>{var a;let o=l(i.error),s=!!i.error,u=o.length>0||!!((a=e.descriptionLabel)!=null&&a.text);return U(vt,{children:[U(Zu,j({codeField:e.codeField,id:n,name:t.name,value:t.value,isError:s,onChange:e=>{t.onChange(e),c()},onBlur:t.onBlur},u&&{ariaDescribedBy:r})),U(Qu,{id:r,messages:o,descriptionLabel:e.descriptionLabel})]})}})]})},ed=({text:e,htmlFor:t,titleLabel:n})=>e?U(`div`,{"data-ui":`gui-text-input-title`,part:`gui-text-input-title`,style:{position:`relative`,width:`100%`},children:U(K,j(j({},n),{},{text:e,htmlFor:t,isGenericTemplate:!0}))}):null;I();var td=e=>e===Oo.EMAIL?{inputMode:`email`,autoComplete:`email`}:e===Oo.PHONE?{inputMode:`tel`,autoComplete:`tel`}:{inputMode:`text`},nd=({textField:e,id:t,name:n,value:r,inputPlaceholder:i,isError:a=!1,isRequired:o=!1,ariaDescribedBy:s,onChange:c,onBlur:l})=>{var u,d;let[f,p]=N(!1),{inputType:m,fontName:h,fontSize:g=15,fontColor:_,fontWeight:v,backgroundColor:y,cornerRadius:b=8,borderWidth:x,borderColor:S,focusedBorderWidth:C,focusedBorderColor:w,errorBorderWidth:T,errorBorderColor:ee}=e,{borderWidth:E,borderColor:te}=Wu({isError:a,isFocused:f,borderWidth:x,borderColor:S,focusedBorderWidth:C,focusedBorderColor:w,errorBorderWidth:T,errorBorderColor:ee});return U(`input`,j(j({id:t,name:n},td(m)),{},{enterKeyHint:`done`,value:r,placeholder:i==null?``:i,"data-ui":`gui-text-field`,part:`gui-text-field`,"aria-required":o,"aria-invalid":a,"aria-describedby":s,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.currentTarget.blur())},onChange:e=>{c==null||c(e.currentTarget.value)},onFocus:()=>p(!0),onBlur:()=>{p(!1),l==null||l()},style:{boxSizing:`border-box`,width:`100%`,height:42,padding:11,fontFamily:Vo(h),fontSize:g,fontWeight:Bo(v),color:(u=G(_))==null?`#000000`:u,backgroundColor:(d=G(y))==null?`#FFFFFF`:d,borderStyle:`solid`,borderWidth:E,borderColor:te,borderRadius:b,outline:`none`}}))},rd=({id:e,messages:t=[],descriptionLabel:n})=>!(t.length>0)&&!(n!=null&&n.text)?null:U(`div`,{id:e,"data-ui":`gui-text-input-description`,part:`gui-text-input-description`,style:{width:`100%`},children:[t.map(e=>U(K,j(j({},n),{},{text:e,alignment:n==null?void 0:n.alignment,isGenericTemplate:!0}),e)),(n==null?void 0:n.text)&&U(K,j(j({},n),{},{text:n.text,isGenericTemplate:!0}))]}),id=({layout:e,dataItem:t})=>{let n=String(t.id),r=`${n}-description`,i=typeof t.required==`boolean`&&t.required,a=_c(),{control:o,validate:s,clearFieldErrors:c,getErrorMessages:l}=_l({name:n,validators:t.validators,required:i,form:a});return U(`div`,{"data-ui":`gui-text-input`,part:`gui-text-input`,style:{display:`flex`,flexDirection:`column`,width:`100%`},children:[U(ed,{text:t.text,htmlFor:n,titleLabel:e.titleLabel}),U(hc,{name:n,control:o,rules:{validate:s},render:({field:a,fieldState:o})=>{var s,u;let d=l(o.error),f=!!o.error,p=d.length>0||!!((s=e.descriptionLabel)!=null&&s.text);return U(vt,{children:[U(nd,j({textField:e.textField,id:n,name:a.name,value:(u=a.value)==null?``:u,inputPlaceholder:t.placeholder,isError:f,isRequired:i,onChange:e=>{a.onChange(e),c()},onBlur:a.onBlur},p&&{ariaDescribedBy:r})),U(rd,{id:r,messages:d,descriptionLabel:e.descriptionLabel})]})}})]})};function ad(e,t,n){return e.type===ko.GENERIC_COLUMN&&t.type===ko.GENERIC_COLUMN?U(ju,j({},t.content)):e.type===ko.SECTION&&t.type===ko.SECTION?U(Lu,j(j({},t.content),{},{dataItems:e.content.dataItems,uiComponents:n})):e.type===ko.QUESTION&&t.type===ko.QUESTION?U(Rl,{layout:t.content,dataSourceQuestion:e.content}):e.type===ko.CODE_INPUT&&t.type===ko.CODE_INPUT?U($u,{layout:t.content,dataItem:e.content}):e.type===ko.TEXT_INPUT&&t.type===ko.TEXT_INPUT?U(id,{layout:t.content,dataItem:e.content}):null}var od=({dataItems:e,uiComponents:t})=>!e||!t||!Array.isArray(e)||!Array.isArray(t)?null:e.map((e,n)=>{let r=t.find(t=>t.id===e.uiComponentId);if(!r)return null;let i=ad(e,r,t);return i?U(`div`,{"data-ui":`gui-list-data-item`,part:`gui-list-data-item`,children:i},`${e.uiComponentId}-${n}`):null}),sd=({uiComponents:e,backgroundColor:t,cornerRadius:n,paddings:r,dataSource:i})=>U(`div`,{"data-ui":`gui-list-column`,part:`gui-list-column`,style:j({display:`flex`,flexDirection:`column`,backgroundColor:G(t)||`transparent`,borderRadius:n},Po(r)),children:U(od,{dataItems:i==null?void 0:i.dataItems,uiComponents:e})}),cd=({topColumn:e,mainListColumn:t,bottomColumn:n,backgroundColor:r=`#ffffff00`,backgroundImage:i,cornerRadius:a,isInModal:o=!1,dataSource:s})=>{let{failedAssets:c}=uo();return U(`div`,{"data-ui":`gui-scaffold-container`,part:`gui-scaffold-container`,id:`scaffold-container`,style:j(j({display:`flex`,flexDirection:`column`,height:`100%`},o&&{minHeight:0}),{},{backgroundColor:G(r)||`transparent`,borderRadius:a},zo(i,c)),children:[e&&U(`div`,{"data-ui":`gui-top-column`,part:`gui-top-column`,style:{flex:`0 0 auto`},children:U(ju,j({},e))}),t&&U(`div`,{"data-ui":`gui-main-list-column-container`,part:`gui-main-list-column-container`,style:{flex:`1 1 auto`,minHeight:0,overflowY:`auto`,overflowX:`hidden`,backgroundColor:G(t.backgroundColor)||`transparent`},children:U(`div`,{"data-ui":`gui-main-list-column`,part:`gui-main-list-column`,style:{display:`flex`,flexDirection:`column`,minHeight:`100%`,justifyContent:t.verticalAlignment&&Cu[t.verticalAlignment]||wu},children:U(sd,j(j({},t),{},{backgroundColor:`transparent`,dataSource:s}))})}),n&&U(`div`,{"data-ui":`gui-bottom-column`,part:`gui-bottom-column`,style:{flex:`0 0 auto`},children:U(ju,j({},n))})]})},ld=({rootElement:e,dataSource:t,properties:n})=>{let{type:r,content:i}=e,{perform:a}=co(),o=rs(t.dataItems,n);console.log(`properties`,n),console.log(`defaultValues`,o);let s=pl({mode:`onSubmit`,reValidateMode:`onSubmit`,criteriaMode:`all`,defaultValues:o}),c={COLLECT_DATA:s.handleSubmit(e=>{a($o(e),Da.FORM),s.reset()})};if(r===Co.LIST_SCAFFOLD){let{topColumn:e,mainListColumn:n,bottomColumn:r,backgroundColor:a,backgroundImage:o,cornerRadius:l}=i;return U(_u,{handlers:c,children:U(vc,j(j({},s),{},{children:U(cd,{topColumn:e,mainListColumn:n,bottomColumn:r,backgroundColor:a,dataSource:t,cornerRadius:l,backgroundImage:o})}))})}return null};Vr();var ud=Object.defineProperty,dd=Object.getOwnPropertySymbols,fd=Object.prototype.hasOwnProperty,pd=Object.prototype.propertyIsEnumerable,md=(e,t,n)=>t in e?ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hd=(e,t)=>{for(var n in t||(t={}))fd.call(t,n)&&md(e,n,t[n]);if(dd)for(var n of dd(t))pd.call(t,n)&&md(e,n,t[n]);return e},gd=(e,t)=>{var n={};for(var r in e)fd.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dd)for(var r of dd(e))t.indexOf(r)<0&&pd.call(e,r)&&(n[r]=e[r]);return n},_d;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e<this.size;e++)o.push(!1);for(let e=0;e<this.size;e++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a==-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(a=t,e=n),this.applyMask(t)}}i(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(n,r){let i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){let i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,r,a=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)n(e,8,f);let m=[];for(;m.length*8<f.length;)m.push(0);return f.forEach((e,t)=>m[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n==0&&r==0||n==0&&r==t-1||n==t-1&&r==0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let a=(t<<10|n)^21522;i(!(a>>>15));for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(!(t>>>18));for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a<this.size&&0<=o&&o<this.size&&this.setFunctionModule(a,o,i!=2&&i!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){let n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw RangeError(`Invalid argument`);let a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],o=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=a-s%a,l=Math.floor(s/a),u=[],d=t.reedSolomonComputeDivisor(o);for(let n=0,r=0;n<a;n++){let i=e.slice(r,r+l-o+(n<c?0:1));r+=i.length;let a=t.reedSolomonComputeRemainder(i,d);n<c&&i.push(0),u.push(i.concat(a))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach((t,n)=>{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i<this.size;i++)for(let a=0;a<2;a++){let o=t-a,s=t+1&2?i:this.size-1-i;!this.isFunction[s][o]&&n<e.length*8&&(this.modules[s][o]=r(e[n>>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[n][o]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][n]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){let i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(let e of this.modules)n=e.reduce((e,t)=>e+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map(e=>0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(!(n>>>8)),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return!!(e>>>t&1)}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let r=[];for(let e=0;e<t.length;){let i=Math.min(t.length-e,3);n(parseInt(t.substring(e,e+i),10),i*3+1,r),e+=i}return new e(e.Mode.NUMERIC,t.length,r)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let r=[],i=0;for(;i+2<=t.length;i+=2){let a=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i))*45;a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i+1)),n(a,11,r)}return i<t.length&&n(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return t==``?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let r=[];if(t<0)throw RangeError(`ECI assignment value out of range`);if(t<128)n(t,8,r);else if(t<16384)n(2,2,r),n(t,14,r);else if(t<1e6)n(6,3,r),n(t,21,r);else throw RangeError(`ECI assignment value out of range`);return new e(e.Mode.ECI,0,r)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(let r of e){let e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)==`%`?(t.push(parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`;let o=a;e.QrSegment=a})(_d||(_d={})),(e=>{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||(e.QrCode={}))})(_d||(_d={})),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(_d||(_d={}));var vd=_d,yd={L:vd.QrCode.Ecc.LOW,M:vd.QrCode.Ecc.MEDIUM,Q:vd.QrCode.Ecc.QUARTILE,H:vd.QrCode.Ecc.HIGH},bd=128,xd=`L`,Sd=`#FFFFFF`,Cd=`#000000`,wd=!1,Td=1,Ed=4,Dd=0,Od=.1;function kd(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null)n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;else if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`)}else a&&i===null&&(i=o)})}),n.join(``)}function Ad(e,t){return e.slice().map((e,n)=>n<t.y||n>=t.y+t.h?e:e.map((e,n)=>n<t.x||n>=t.x+t.w?e:!1))}function jd(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*Od),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function Md(e,t){return t==null?e?Ed:Dd:Math.max(Math.floor(t),0)}function Nd({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:a,size:o,boostLevel:s}){let c=L.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...vd.QrSegment.makeSegments(t)),e),[]);return vd.QrCode.encodeSegments(r,yd[t],n,void 0,void 0,s)},[e,t,n,s]),{cells:l,margin:u,numCells:d,calculatedImageSettings:f}=L.useMemo(()=>{let e=c.getModules(),t=Md(r,i);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:jd(e,o,t,a)}},[c,o,a,r,i]);return{qrcode:c,margin:u,cells:l,numCells:d,calculatedImageSettings:f}}var Pd=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}(),Fd=L.forwardRef(function(e,t){let n=e,{value:r,size:i=bd,level:a=xd,bgColor:o=Sd,fgColor:s=Cd,includeMargin:c=wd,minVersion:l=Td,boostLevel:u,marginSize:d,imageSettings:f}=n,p=gd(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:m}=p,h=gd(p,[`style`]),g=f==null?void 0:f.src,_=L.useRef(null),v=L.useRef(null),y=L.useCallback(e=>{_.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[b,x]=L.useState(!1),{margin:S,cells:C,numCells:w,calculatedImageSettings:T}=Nd({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:d,imageSettings:f,size:i});L.useEffect(()=>{if(_.current!=null){let e=_.current,t=e.getContext(`2d`);if(!t)return;let n=C,r=v.current,a=T!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWidth!==0;a&&T.excavation!=null&&(n=Ad(C,T.excavation));let c=window.devicePixelRatio||1;e.height=e.width=i*c;let l=i/w*c;t.scale(l,l),t.fillStyle=o,t.fillRect(0,0,w,w),t.fillStyle=s,Pd?t.fill(new Path2D(kd(n,S))):C.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+S,n+S,1,1)})}),T&&(t.globalAlpha=T.opacity),a&&t.drawImage(r,T.x+S,T.y+S,T.w,T.h)}}),L.useEffect(()=>{x(!1)},[g]);let ee=hd({height:i,width:i},m),E=null;return g!=null&&(E=L.createElement(`img`,{src:g,key:g,style:{display:`none`},onLoad:()=>{x(!0)},ref:v,crossOrigin:T==null?void 0:T.crossOrigin})),L.createElement(L.Fragment,null,L.createElement(`canvas`,hd({style:ee,height:i,width:i,ref:y,role:`img`},h)),E)});Fd.displayName=`QRCodeCanvas`;var Id=L.forwardRef(function(e,t){let n=e,{value:r,size:i=bd,level:a=xd,bgColor:o=Sd,fgColor:s=Cd,includeMargin:c=wd,minVersion:l=Td,boostLevel:u,title:d,marginSize:f,imageSettings:p}=n,m=gd(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:h,cells:g,numCells:_,calculatedImageSettings:v}=Nd({value:r,level:a,minVersion:l,boostLevel:u,includeMargin:c,marginSize:f,imageSettings:p,size:i}),y=g,b=null;p!=null&&v!=null&&(v.excavation!=null&&(y=Ad(g,v.excavation)),b=L.createElement(`image`,{href:p.src,height:v.h,width:v.w,x:v.x+h,y:v.y+h,preserveAspectRatio:`none`,opacity:v.opacity,crossOrigin:v.crossOrigin}));let x=kd(y,h);return L.createElement(`svg`,hd({height:i,width:i,viewBox:`0 0 ${_} ${_}`,ref:t,role:`img`},m),!!d&&L.createElement(`title`,null,d),L.createElement(`path`,{fill:o,d:`M0,0 h${_}v${_}H0z`,shapeRendering:`crispEdges`}),L.createElement(`path`,{fill:s,d:x,shapeRendering:`crispEdges`}),b)});Id.displayName=`QRCodeSVG`;var Ld={width:`100%`,height:`auto`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,marginBottom:`40px`},Rd={position:`relative`,display:`flex`,flexDirection:`column`,alignItems:`stretch`,alignContent:`center`,margin:`0 auto`,height:`100%`,width:`100%`,minHeight:`100%`,overflow:`auto`},zd={marginBottom:20,lineHeight:`140%`},Bd={fontWeight:`400`,lineHeight:`140%`},Vd=({header:e,footer:t,buttons:n,title:r,description:i,qr:a,url:o,backgroundColor:s,backgroundImage:c})=>{let{perform:l}=co();return!o&&typeof o!=`string`?(l(new Ul({errorCode:Ko.DECODING_FAILED,message:`No QR URL in the client config`})),null):U(bs,{header:e,footer:t,buttons:n,backgroundColor:s,backgroundImage:c,children:U(`div`,{part:`gui-device-transfer-screen-container`,"data-ui":`gui-device-transfer-screen-container`,id:`device-transfer-screen-container`,style:j(j({},Rd),{},{justifyContent:`flex-start`}),children:[U(`div`,{part:`gui-device-transfer-qr-container`,style:Ld,children:U(Id,{value:o,size:300,fgColor:a==null?void 0:a.color,bgColor:a==null?void 0:a.backgroundColor,style:{width:`100%`,maxWidth:300,height:`auto`}})}),r&&U(`div`,{style:zd,children:U(K,j({},r))}),i&&U(`div`,{style:Bd,children:U(xs,j({},i))})]})})},Hd=function(e){return e.IDLE=`idle`,e.UPLOADING=`uploading`,e.DONE=`done`,e}({}),Ud=function(e){return e.IDLE=`idle`,e.UPLOADING=`uploading`,e.SUCCESS=`success`,e.ERROR=`error`,e}({}),Wd=function(e){return e.OK=`ok`,e.SIZE=`size`,e.FORMAT=`format`,e}({});function Gd(e){if(e<1024)return`${e} B`;let t=e/1024;if(t<1024)return`${t<10?t.toFixed(1):Math.round(t)} kB`;let n=t/1024;return`${n<10?n.toFixed(1):Math.round(n)} MB`}function Kd(e){let t=e.lastIndexOf(`.`);return t<0?``:e.slice(t).toLowerCase()}function qd(e,t){let n=Kd(e);return n?new Set(t.map(e=>e.startsWith(`.`)?e.toLowerCase():`.${e.toLowerCase()}`)).has(n):!1}function Jd(e,t,n){return e.size>t?Wd.SIZE:qd(e.name,n)?Wd.OK:Wd.FORMAT}function Yd(e){return`${e.name}\0${e.size}\0${e.lastModified}`}var Xd=e=>{let t=getComputedStyle(e),n=parseFloat(t.lineHeight);if(!Number.isFinite(n)||n<=0){let e=parseFloat(t.fontSize);n=Number.isFinite(e)?e*1.35:20}return e.scrollHeight>n+2},Zd={display:`grid`,gridTemplateColumns:`auto minmax(0, 1fr) auto auto`,columnGap:`8px`,minWidth:0,width:`100%`},Qd={width:`20px`,height:`20px`,color:`#555`},$d={fontSize:`15px`,wordBreak:`break-all`},ef={display:`flex`,gap:3},tf={display:`flex`,alignItems:`center`,justifyContent:`center`,height:`36px`,width:`36px`},nf={border:`none`,background:`none`,cursor:`pointer`,padding:0};I();var rf=({uploadFile:e,uploadPhase:t,onRetryFile:n,onRemoveFile:r})=>{let[i,a]=N(!1),o=hn(null),s=vn(()=>{let e=o.current;e&&a(Xd(e))},[]);return mn(()=>{s();let e=o.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>s());return t.observe(e),()=>t.disconnect()},[e.file.name,e.file.size,e.uploadState,t,s]),U(`div`,{style:j(j({},Zd),{},{alignItems:i?`start`:`center`}),children:[U(`div`,{style:Qd,children:U(Uo,{type:`file`})}),U(`div`,{ref:o,children:U(`span`,{style:$d,children:e.file.name})}),U(`div`,{children:U(`span`,{style:$d,children:[` (`,Gd(e.file.size),`)`]})}),U(`div`,{style:ef,children:[U(`div`,{style:tf,children:e.uploadState===Ud.ERROR&&t===Hd.DONE&&U(`button`,{type:`button`,"aria-label":`Retry`,onClick:()=>n(e.id),style:nf,children:U(Uo,{type:`reload`})})}),U(`div`,{style:tf,children:[(t===Hd.UPLOADING||e.uploadState===Ud.UPLOADING)&&e.uploadState!==Ud.SUCCESS&&U(Uo,{type:`loader`}),e.uploadState===Ud.SUCCESS&&U(Uo,{type:`ok`}),t!==Hd.UPLOADING&&(e.uploadState===Ud.IDLE||e.uploadState===Ud.ERROR)&&U(`button`,{type:`button`,"aria-label":`Remove`,onClick:()=>r(e.id),style:nf,children:U(Uo,{type:`close_icon`})})]})]})]})},af=({range:e,color:t=`#00A028`})=>U(`div`,{style:{position:`absolute`,bottom:`2px`,left:0,right:0,marginLeft:`8px`,marginRight:`8px`,height:`2px`,overflow:`hidden`},children:U(`div`,{style:{height:`100%`,width:`${Math.round(e*100)}%`,backgroundColor:t,transition:`width 0.15s ease-out`}})});I();var of=({settings:e,errorMessages:t,serviceToken:n,uploadFileToTemp:r,abortRequest:i})=>{var a;let{perform:o}=co(),[s,c]=N([]),[l,u]=N(Hd.IDLE),d=hn([]),f=hn(!1);d.current=s;let p=s.some(e=>e.clientValidation!==Wd.OK),m=s.filter(e=>e.clientValidation===Wd.OK),h=m.length>0&&m.every(e=>e.uploadState===Ud.SUCCESS&&e.tempFileId),g=l===Hd.UPLOADING,_=l===Hd.DONE&&h&&!p,{devSettings:v}=so(),y=v==null||(a=v.screens)==null||(a=a[ho.UPLOAD_FILES])==null?void 0:a.files,b=!!y,x=e=>{b||g||c(t=>{let n=t.find(t=>t.id===e);return!n||n.uploadState===Ud.UPLOADING||n.uploadState===Ud.SUCCESS?t:t.filter(t=>t.id!==e)})},S=vn(function(){var e=C(function*(e){if(!n||!r)return c(n=>n.map(n=>n.id===e.id?j(j({},n),{},{uploadState:Ud.ERROR,serverError:t.fileNotLoaded}):n)),null;try{var i;c(t=>t.map(t=>t.id===e.id?j(j({},t),{},{uploadState:Ud.UPLOADING,progressBarRange:0}):t));let n=yield r(e.file,(t,n)=>{let r=n>0?t/n:0;c(t=>t.map(t=>t.id===e.id?j(j({},t),{},{progressBarRange:r,uploadState:Ud.UPLOADING}):t))});if(n.code===0&&`tempFileId`in n.data){let t=n.data.tempFileId;return c(n=>n.map(n=>n.id===e.id?j(j({},n),{},{uploadState:Ud.SUCCESS,progressBarRange:1,tempFileId:t}):n)),{tempFileId:t,name:e.file.name,size:e.file.size}}let a=n.data,o=`httpCode`in a?(i=a.what)==null?t.fileNotLoaded:i:t.fileNotLoaded;return c(t=>t.map(t=>t.id===e.id?j(j({},t),{},{uploadState:Ud.ERROR,serverError:o}):t)),null}catch(n){return c(n=>n.map(n=>n.id===e.id?j(j({},n),{},{uploadState:Ud.ERROR,serverError:t.fileNotLoaded}):n)),null}});return function(t){return e.apply(this,arguments)}}(),[n,r]),w=function(){var t=C(function*(t){var n;if(g||_)return;let r=Array.from((n=t.currentTarget.files)==null?[]:n);if(t.currentTarget.value=``,!r.length)return;let i=[];c(t=>{let n=new Set(t.map(e=>Yd(e.file))),a=Math.max(0,e.selectionLimit-t.length),o=[...t];for(let t of r){if(a<=0)break;let r=Yd(t);if(n.has(r))continue;n.add(r);let s=Jd(t,e.fileMaxSize,e.supportedFileFormats),c={id:ei(),file:t,clientValidation:s,uploadState:Ud.IDLE,progressBarRange:0};o.push(c),s===Wd.OK&&i.push(c),--a}return o}),i.length});return function(e){return t.apply(this,arguments)}}(),T=function(){var e=C(function*(e){if(b||g||_||p)return;c(e=>e.map(e=>j(j({},e),{},{serverError:void 0})));let t=d.current.filter(e=>e.clientValidation===Wd.OK).map(e=>e.id);if(!t.length)return;u(Hd.UPLOADING),f.current=!1;let n=[],r=!1;for(let e of t){if(f.current)break;let t=d.current.find(t=>t.id===e);if(!t||t.clientValidation!==Wd.OK)continue;if(t.uploadState===Ud.SUCCESS&&t.tempFileId){n.push(t.tempFileId);continue}let i=yield S(t);if(f.current)break;i?n.push(i.tempFileId):r=!0}!r&&n.length===t.length&&o({files:n,upload_complete:!0},e),u(Hd.DONE)});return function(t){return e.apply(this,arguments)}}(),ee=function(){var e=C(function*(e){if(b||l===Hd.UPLOADING||_)return;f.current=!1;let t;c(n=>{let r=n.map(t=>t.id===e?j(j({},t),{},{uploadState:Ud.IDLE,serverError:void 0,progressBarRange:0}):t);return t=r.find(t=>t.id===e),r}),t&&t.clientValidation===Wd.OK&&((yield S(t))&&!f.current&&c(e=>{let t=e.filter(e=>e.clientValidation===Wd.OK);if(t.length>0&&t.every(e=>e.uploadState===Ud.SUCCESS&&e.tempFileId)){let e=t.map(e=>e.tempFileId);o({files:e,upload_complete:!0},Da.FORM)}return e}),u(Hd.DONE))});return function(t){return e.apply(this,arguments)}}(),E=()=>{f.current=!0,i==null||i()};return pn(()=>()=>E(),[]),pn(()=>{if(v&&y){let e=y.map((e,t)=>{var n,r,i;let a=new File([],(n=e.name)==null?`test-file-${t}.jpg`:n);return Object.defineProperty(a,"size",{value:(r=e.size)==null?1048576:r}),{id:t.toString(),file:a,clientValidation:e.clientValidation,uploadState:e.uploadState,progressBarRange:(i=e.progressBarRange)==null?0:i}});c(e),u(Hd.DONE)}},[v,y]),{uploadFileRows:s,uploadPhase:l,pickFiles:e=>{b||g||_||e()},removeFile:x,onChangeFileInput:w,submit:T,retryFile:ee}},sf={position:`relative`,display:`flex`,flexDirection:`column`,height:`100%`,width:`100%`,minHeight:0,fontFamily:`-apple-system, sans-serif`},cf={flex:`1 1 auto`,minHeight:0,overflowY:`auto`,width:`100%`,display:`flex`,flexDirection:`column`,alignItems:`stretch`},lf={marginBottom:`8px`},uf={minHeight:`54px`,position:`relative`,backgroundColor:`#fff`,borderRadius:`12px`,padding:`8px 16px`,marginBottom:`2px`},df={boxShadow:`inset 0 0 0 2px #d32f2f`},ff={fontSize:`13px`,color:`#d32f2f`,marginTop:`4px`,marginBottom:`4px`,marginLeft:`2px`},pf={position:`absolute`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,inset:0,backdropFilter:`blur(8px)`,WebkitBackdropFilter:`blur(8px)`,background:`rgba(0,0,0,0.2)`,zIndex:1e3,pointerEvents:`auto`,cursor:`default`},mf={position:`relative`,padding:`32px 24px 0`,border:`1px solid rgba(0, 0, 0, 0.06)`,width:`min(400px, calc(100vw - 32px))`},hf={marginBottom:`10px`,fontWeight:600},gf={marginBottom:`84px`},_f={maxHeight:`calc(100dvh - 190px)`,overflow:`auto`},vf={position:`absolute`,bottom:0,insetInline:0,padding:`24px`,width:`100%`};I();var yf=e=>{var t,n,r,i,a;let{title:o,description:s,header:c,buttons:l,footer:u,backgroundColor:d,backgroundImage:f,popups:p,settings:m,errorMessages:h,serviceToken:g,uploadFileToTemp:_,abortRequest:v}=e,y=hn(null),[b,x]=N(!1),[S,C]=N(!1),{uploadFileRows:w,uploadPhase:T,pickFiles:ee,removeFile:E,onChangeFileInput:te,submit:ne,retryFile:re}=of({serviceToken:g,settings:m,errorMessages:h,uploadFileToTemp:_,abortRequest:v}),{devSettings:D}=so(),O=D==null||(t=D.popups)==null?void 0:t.files_not_selected,ie=D==null||(n=D.popups)==null?void 0:n.files_limit_exceeded,ae=!!O||!!ie||!!(D!=null&&(r=D.screens)!=null&&r[ho.UPLOAD_FILES]),oe=!!(O!=null&&O.isOpen),se=!!(ie!=null&&ie.isOpen),k=p==null?void 0:p.find(e=>e.reason===Yo.FILES_NOT_SELECTED),ce=p==null?void 0:p.find(e=>e.reason===Yo.FILES_LIMIT_EXCEEDED),le=()=>{ae||x(!1)},ue=()=>{ae||C(!1)},de=e=>e===`size`?h.invalidFileSize:e===`format`?h.invalidFileFormat:null,fe=e=>{if(!ae&&e){if(e.actionId===`SELECT_FILES`){if(w.length>=m.selectionLimit)return C(!0);ee(()=>{var e;return(e=y.current)==null?void 0:e.click()})}else if(e.actionId===`SUBMIT_FILES`){if(w.length===0)return x(!0);ne(e.type===`FORM`?Da.FORM:Da.DATA)}}};return pn(()=>{D&&(x(oe),C(se))},[oe,se,D]),U(bs,{header:c,footer:u,backgroundColor:d==null?`#f5f5f5`:d,backgroundImage:f,children:[U(`div`,{style:sf,part:`gui-file-upload-root`,"data-ui":`gui-file-upload`,children:[U(`div`,{style:cf,children:[U(`div`,{style:lf,children:U(K,j({},o))}),w.length===0&&U(K,j({},s)),w.length>0&&w.map(e=>{var t;let n=e.clientValidation!==Wd.OK||e.uploadState===Ud.ERROR&&T!==Hd.UPLOADING;return U(`div`,{style:{width:`100%`},children:[U(`div`,{"data-ui":`gui-file-card`,style:j(j({},uf),n?df:{}),children:[U(rf,{uploadFile:e,uploadPhase:T,onRetryFile:re,onRemoveFile:E}),e.uploadState===Ud.UPLOADING&&U(af,{range:e.progressBarRange})]}),e.clientValidation!==Wd.OK&&U(`div`,{style:ff,children:U(K,{text:de(e.clientValidation),fontSize:`13px`,fontColor:`#d32f2f`})}),T!==Hd.UPLOADING&&e.uploadState===Ud.ERROR&&e.clientValidation===Wd.OK&&U(`div`,{style:ff,children:U(K,{text:(t=e.serverError)==null?h.fileNotLoaded:t,fontSize:`13px`,fontColor:`#d32f2f`})})]},e.id)})]}),!!(l!=null&&l.length)&&U(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`10px`,width:`100%`,paddingTop:`12px`},children:[U(`input`,{ref:y,type:`file`,multiple:!0,accept:m.supportedFileFormats.map(e=>e.toLowerCase()).join(`,`),style:{display:`none`},onChange:te}),l.map((e,t)=>U(_s,j(j({dataTestId:`file-upload-button$-${t}`},e),{},{onClick:()=>fe(e)}),t))]})]}),S&&ce&&U(`div`,{style:pf,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),ue()},children:U(`div`,{style:j(j({},mf),{},{borderRadius:(k==null?void 0:k.cornerRadius)||`27px`,backgroundColor:(k==null?void 0:k.backgroundColor)||`#ffffff`}),children:[U(`div`,{style:hf,children:U(K,j({fontSize:`24px`},ce.title))}),U(`div`,{style:gf,children:U(`div`,{style:_f,children:U(K,j({fontSize:`17px`},ce.message))})}),ce.actionButton1&&U(`div`,{style:vf,children:U(_s,j(j({dataTestId:`files-limit-exceeded-modal-ok-button`},ce.actionButton1),(ce==null||(i=ce.actionButton1)==null?void 0:i.type)===`FORM`?{onClick:ue}:{}))})]})}),b&&k&&U(`div`,{style:pf,onPointerDown:e=>{e.preventDefault(),e.stopPropagation(),le()},children:U(`div`,{style:j(j({},mf),{},{borderRadius:(k==null?void 0:k.cornerRadius)||`27px`,backgroundColor:(k==null?void 0:k.backgroundColor)||`#ffffff`}),children:[U(`div`,{style:hf,children:U(K,j({fontSize:`24px`},k.title))}),U(`div`,{style:gf,children:U(`div`,{style:_f,children:U(K,j({fontSize:`17px`},k.message))})}),k.actionButton1&&U(`div`,{style:vf,children:U(_s,j(j({dataTestId:`no-files-modal-ok-button`},k.actionButton1),(k==null||(a=k.actionButton1)==null?void 0:a.type)===`FORM`?{onClick:le}:{}))})]})})]})},bf=({moduleProps:e})=>{let{templateId:t,templateLayout:n}=e,{perform:r}=co();if(!t||!n)return U(Ds,{});if(t===ho.STATUS)return U(Ss,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,description:n==null?void 0:n.description,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage});if(t===ho.INFO)return U(Ts,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage});if(t===ho.GEOLOCATION)return U(hu,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage,popups:n==null?void 0:n.popups,askEveryTime:n==null?void 0:n.askEveryTime,getLocationTimeout:e.getLocationTimeout,locationAccuracy:e.locationAccuracy});if(t===ho.GENERIC_LOCATION)return U(Fu,{rootElement:n.rootElement,popups:n.popups,settings:n.settings});if(t===ho.PROGRESS)return U(Ds,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,progressView:n==null?void 0:n.progressView,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage});if(t===ho.INFO_DETAILS)return U(js,{header:n==null?void 0:n.header,title:n==null?void 0:n.title,details:n==null?void 0:n.details,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage});if(t===ho.CAMERA)return U(Ql,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:e.backgroundColor,selectionLimit:e.selectionLimit,backgroundImage:n==null?void 0:n.backgroundImage});if(t===ho.GALLERY)return U(Jl,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:e.backgroundColor,selectionLimit:e.selectionLimit,backgroundImage:n==null?void 0:n.backgroundImage});if(t===ho.QUESTIONS){var i;let t=(i=e.properties)!=null&&i.length?JSON.stringify(e.properties):`default-key`;return U(Wl,{dataSource:e.dataSource,properties:e.properties,questions:n==null?void 0:n.questions,header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage},t)}if(t===ho.DEVICE_TRANSFER)return U(Vd,{header:n==null?void 0:n.header,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,title:n==null?void 0:n.title,description:n==null?void 0:n.description,backgroundColor:n==null?void 0:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage,qr:n==null?void 0:n.qr,url:e==null?void 0:e.url});if(t===ho.GENERIC)return U(Nu,{rootElement:n.rootElement});if(t===ho.GENERIC_PROGRESS)return U(Iu,{rootElement:n.rootElement});if(t===ho.GENERIC_LIST){var a;return U(ld,{rootElement:n.rootElement,dataSource:(a=e.dataSource)==null?n.dataSource:a,properties:e.properties})}return t===ho.UPLOAD_FILES?U(yf,{title:n.title,description:n.description,header:n.header,buttons:n.buttons,footer:n.footer,backgroundColor:n.backgroundColor,backgroundImage:n==null?void 0:n.backgroundImage,popups:n.popups,errorMessages:n.errorMessages,settings:n.settings,serviceToken:e.serviceToken,uploadFileToTemp:e.uploadFileToTemp,abortRequest:e.abortRequest}):(r(new Ul({errorCode:Ko.DECODING_FAILED,message:`Unsupported step template id`})),null)};un(),I();var xf,Sf=!1,Cf=({children:e,locale:t,direction:n})=>U(`div`,{part:`gui-idv`,id:`gui-idv-web-c`,dir:n,lang:t,style:{backgroundColor:`white`,height:`100%`,width:`100%`},children:e}),wf=({isProcessing:e,moduleProps:t,perform:n,devSettings:r,idvEventListener:i})=>{let a=Ma(t.locale);return pn(()=>{i==null||i(`idv-gui`,`Gui component was rendered`)},[i]),U(oo,{perform:(e,t)=>n==null?void 0:n(e,t),setIsProcessingCallback:e,devSettings:r,failedAssets:t.failedAssets,layoutDirection:a,children:U(Cf,{locale:t.locale,direction:a,children:U(bf,{moduleProps:t})})})},Tf=class extends Ca{constructor(){super(),this._mounted=!1,this._shadowRoot=this.attachShadow({mode:`open`}),this._renderVersion=0,this.props=null}setProps(e){let t=e.moduleProps.failedAssets;if(t&&t.blockingAssets.size>0){var n;let r=new Ul({errorCode:Ko.IMAGE_LOADING_FAILED,message:`Failed to load image asset${t.blockingAssets.size>1?`s`:``}: ${[...t.blockingAssets].join(`, `)}`});(n=e.perform)==null||n.call(e,r)}this._renderVersion++,this.props={idvEventListener:e.idvEventListener,moduleProps:e.moduleProps,isProcessing:e.isProcessing,perform:e.perform,devSettings:e.devSettings},this.render()}connectedCallback(){this.render(),this._mounted=!0}static cancel(){}render(){if(!this.props)return``;if(this.shadowRoot){let e=document.createElement(`style`);e.id=`idv-gui-styles`,e.textContent=`
12
12
  *, *::before, *::after {
13
13
  box-sizing: border-box;
14
14
  }
@@ -26,11 +26,11 @@ var RegulaIdv=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Mo
26
26
  width: 100%;
27
27
  height: 100%;
28
28
  }
29
- `,this.shadowRoot.querySelector(`#idv-gui-styles`)||this.shadowRoot.appendChild(e)}Vt(U(xf,{moduleProps:this.props.moduleProps,perform:this.props.perform,idvEventListener:this.props.idvEventListener,isProcessing:this.props.isProcessing,devSettings:this.props.devSettings},this._renderVersion),this._shadowRoot)}disconnectedCallback(){Vt(null,this._shadowRoot),setTimeout(()=>{this._mounted&&(this._mounted=!1)})}static isReady(){return yf}static initialize(e){yf=!0}static deinitialize(){yf=!1}};vf=Sf,vf.displayName=Ho,vf.getSupportedTemplates=()=>Object.values(fo),vf.getIdentifier=()=>Ho,xa(Ho,Sf);var Cf=function(){function e(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=e==null?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context,this.validateIf=e.validationOptions.validateIf)}return e}(),wf=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach(function(n){e.properties[n].forEach(function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},a={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new Cf(a))})}),t},e}();function Tf(e){return e instanceof Map?Array.from(e.values()):Array.isArray(e)?e:Array.from(e)}function Ef(){if(typeof globalThis<`u`)return globalThis;if(typeof global<`u`)return global;if(typeof window<`u`)return window;if(typeof self<`u`)return self}function Df(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var Of=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},kf=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Af=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},jf=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;new wf().transform(e).forEach(function(e){return t.addValidationMetadata(e)})},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach(function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)}),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var a,o,s=function(e){return e.always===void 0?e.groups&&e.groups.length?!1:n:e.always},c=function(e){return!(!r||i&&i.length||!e.groups||!e.groups.length)},l=(this.validationMetadatas.get(e)||[]).filter(function(n){return n.target!==e&&n.target!==t?!1:s(n)?!0:c(n)?!1:i&&i.length>0?n.groups&&!!n.groups.find(function(e){return i.indexOf(e)!==-1}):!0}),u=[];try{for(var d=Of(this.validationMetadatas.entries()),f=d.next();!f.done;f=d.next()){var p=kf(f.value,2),m=p[0],h=p[1];e.prototype instanceof m&&u.push.apply(u,Af([],kf(h),!1))}}catch(e){a={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}var g=u.filter(function(t){return typeof t.target==`string`||t.target===e||t.target instanceof Function&&!(e.prototype instanceof t.target)?!1:s(t)?!0:c(t)?!1:i&&i.length>0?t.groups&&!!t.groups.find(function(e){return i.indexOf(e)!==-1}):!0}).filter(function(e){return!l.find(function(t){return t.propertyName===e.propertyName&&t.type===e.type})});return l.concat(g)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function Mf(){var e=Ef();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new jf),e.classValidatorMetadataStorage}var Nf=function(){function e(){}return e.prototype.toString=function(e,t,n,r){var i=this;e===void 0&&(e=!1),t===void 0&&(t=!1),n===void 0&&(n=``),r===void 0&&(r=!1);var a=e?`\x1B[1m`:``,o=e?`\x1B[22m`:``,s=function(){var e;return(r?Object.values:Object.keys)((e=i.constraints)==null?{}:e).join(`, `)},c=function(e){return` - property ${a}${n}${e}${o} has failed the following constraints: ${a}${s()}${o}
29
+ `,this.shadowRoot.querySelector(`#idv-gui-styles`)||this.shadowRoot.appendChild(e)}Vt(U(wf,{moduleProps:this.props.moduleProps,perform:this.props.perform,idvEventListener:this.props.idvEventListener,isProcessing:this.props.isProcessing,devSettings:this.props.devSettings},this._renderVersion),this._shadowRoot)}disconnectedCallback(){Vt(null,this._shadowRoot),setTimeout(()=>{this._mounted&&(this._mounted=!1)})}static isReady(){return Sf}static initialize(e){Sf=!0}static deinitialize(){Sf=!1}};xf=Tf,xf.displayName=Go,xf.getSupportedTemplates=()=>Object.values(ho),xf.getIdentifier=()=>Go,wa(Go,Tf);var Ef=function(){function e(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=e==null?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context,this.validateIf=e.validationOptions.validateIf)}return e}(),Df=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach(function(n){e.properties[n].forEach(function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},a={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new Ef(a))})}),t},e}();function Of(e){return e instanceof Map?Array.from(e.values()):Array.isArray(e)?e:Array.from(e)}function kf(){if(typeof globalThis<`u`)return globalThis;if(typeof global<`u`)return global;if(typeof window<`u`)return window;if(typeof self<`u`)return self}function Af(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var jf=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},Mf=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Nf=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Pf=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;new Df().transform(e).forEach(function(e){return t.addValidationMetadata(e)})},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach(function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)}),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var a,o,s=function(e){return e.always===void 0?e.groups&&e.groups.length?!1:n:e.always},c=function(e){return!(!r||i&&i.length||!e.groups||!e.groups.length)},l=(this.validationMetadatas.get(e)||[]).filter(function(n){return n.target!==e&&n.target!==t?!1:s(n)?!0:c(n)?!1:i&&i.length>0?n.groups&&!!n.groups.find(function(e){return i.indexOf(e)!==-1}):!0}),u=[];try{for(var d=jf(this.validationMetadatas.entries()),f=d.next();!f.done;f=d.next()){var p=Mf(f.value,2),m=p[0],h=p[1];e.prototype instanceof m&&u.push.apply(u,Nf([],Mf(h),!1))}}catch(e){a={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}var g=u.filter(function(t){return typeof t.target==`string`||t.target===e||t.target instanceof Function&&!(e.prototype instanceof t.target)?!1:s(t)?!0:c(t)?!1:i&&i.length>0?t.groups&&!!t.groups.find(function(e){return i.indexOf(e)!==-1}):!0}).filter(function(e){return!l.find(function(t){return t.propertyName===e.propertyName&&t.type===e.type})});return l.concat(g)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function Ff(){var e=kf();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new Pf),e.classValidatorMetadataStorage}var If=function(){function e(){}return e.prototype.toString=function(e,t,n,r){var i=this;e===void 0&&(e=!1),t===void 0&&(t=!1),n===void 0&&(n=``),r===void 0&&(r=!1);var a=e?`\x1B[1m`:``,o=e?`\x1B[22m`:``,s=function(){var e;return(r?Object.values:Object.keys)((e=i.constraints)==null?{}:e).join(`, `)},c=function(e){return` - property ${a}${n}${e}${o} has failed the following constraints: ${a}${s()}${o}
30
30
  `};if(t){var l=Number.isInteger(+this.property)?`[${this.property}]`:`${n?`.`:``}${this.property}`;return this.constraints?c(l):this.children?this.children.map(function(t){return t.toString(e,!0,`${n}${l}`,r)}).join(``):``}return`An instance of ${a}${this.target?this.target.constructor.name:`an object`}${o} has failed the validation:
31
- `+(this.constraints?c(this.property):``)+(this.children?this.children.map(function(t){return t.toString(e,!0,i.property,r)}).join(``):``)},e}(),Pf=function(){function e(){}return e.isValid=function(e){var t=this;return e!==`isValid`&&e!==`getMessage`&&Object.keys(this).map(function(e){return t[e]}).indexOf(e)!==-1},e.CUSTOM_VALIDATION=`customValidation`,e.NESTED_VALIDATION=`nestedValidation`,e.PROMISE_VALIDATION=`promiseValidation`,e.CONDITIONAL_VALIDATION=`conditionalValidation`,e.WHITELIST=`whitelistValidation`,e.IS_DEFINED=`isDefined`,e}();function Ff(e){return Array.isArray(e)?e.join(`, `):(typeof e==`symbol`&&(e=e.description),`${e}`)}var If=function(){function e(){}return e.replaceMessageSpecialTokens=function(e,t){var n;return e instanceof Function?n=e(t):typeof e==`string`&&(n=e),n&&Array.isArray(t.constraints)&&t.constraints.forEach(function(e,t){n=n.replace(RegExp(`\\$constraint${t+1}`,`g`),Ff(e))}),n&&t.value!==void 0&&t.value!==null&&[`string`,`boolean`,`number`].includes(typeof t.value)&&(n=n.replace(/\$value/g,t.value)),n&&(n=n.replace(/\$property/g,t.property)),n&&(n=n.replace(/\$target/g,t.targetName)),n},e}(),Lf=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Rf=function(){function e(e,t){this.validator=e,this.validatorOptions=t,this.awaitingPromises=[],this.ignoreAsyncValidations=!1,this.metadataStorage=Mf()}return e.prototype.execute=function(e,t,n){var r=this,i,a;!this.metadataStorage.hasValidationMetaData&&((i=this.validatorOptions)==null?void 0:i.enableDebugMessages)===!0&&console.warn(`No validation metadata found. No validation will be performed. There are multiple possible reasons:
31
+ `+(this.constraints?c(this.property):``)+(this.children?this.children.map(function(t){return t.toString(e,!0,i.property,r)}).join(``):``)},e}(),Lf=function(){function e(){}return e.isValid=function(e){var t=this;return e!==`isValid`&&e!==`getMessage`&&Object.keys(this).map(function(e){return t[e]}).indexOf(e)!==-1},e.CUSTOM_VALIDATION=`customValidation`,e.NESTED_VALIDATION=`nestedValidation`,e.PROMISE_VALIDATION=`promiseValidation`,e.CONDITIONAL_VALIDATION=`conditionalValidation`,e.WHITELIST=`whitelistValidation`,e.IS_DEFINED=`isDefined`,e}();function Rf(e){return Array.isArray(e)?e.join(`, `):(typeof e==`symbol`&&(e=e.description),`${e}`)}var zf=function(){function e(){}return e.replaceMessageSpecialTokens=function(e,t){var n;return e instanceof Function?n=e(t):typeof e==`string`&&(n=e),n&&Array.isArray(t.constraints)&&t.constraints.forEach(function(e,t){n=n.replace(RegExp(`\\$constraint${t+1}`,`g`),Rf(e))}),n&&t.value!==void 0&&t.value!==null&&[`string`,`boolean`,`number`].includes(typeof t.value)&&(n=n.replace(/\$value/g,t.value)),n&&(n=n.replace(/\$property/g,t.property)),n&&(n=n.replace(/\$target/g,t.targetName)),n},e}(),Bf=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Vf=function(){function e(e,t){this.validator=e,this.validatorOptions=t,this.awaitingPromises=[],this.ignoreAsyncValidations=!1,this.metadataStorage=Ff()}return e.prototype.execute=function(e,t,n){var r=this,i,a;!this.metadataStorage.hasValidationMetaData&&((i=this.validatorOptions)==null?void 0:i.enableDebugMessages)===!0&&console.warn(`No validation metadata found. No validation will be performed. There are multiple possible reasons:
32
32
  - There may be multiple class-validator versions installed. You will need to flatten your dependencies to fix the issue.
33
- - This validation runs before any file with validation decorator was parsed by NodeJS.`);var o=this.validatorOptions?this.validatorOptions.groups:void 0,s=this.validatorOptions&&this.validatorOptions.strictGroups||!1,c=this.validatorOptions&&this.validatorOptions.always||!1,l=((a=this.validatorOptions)==null?void 0:a.forbidUnknownValues)===void 0||this.validatorOptions.forbidUnknownValues!==!1,u=this.metadataStorage.getTargetValidationMetadatas(e.constructor,t,c,s,o),d=this.metadataStorage.groupByPropertyName(u);if(l&&!u.length){var f=new Nf;(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.target===void 0||this.validatorOptions.validationError.target===!0)&&(f.target=e),f.value=void 0,f.property=void 0,f.children=[],f.constraints={unknownValue:`an unknown value was passed to the validate function`},n.push(f)}else this.validatorOptions&&this.validatorOptions.whitelist&&this.whitelist(e,d,n),Object.keys(d).forEach(function(t){var i=e[t],a=d[t].filter(function(e){return e.type===Pf.IS_DEFINED}),o=d[t].filter(function(e){return e.type!==Pf.IS_DEFINED&&e.type!==Pf.WHITELIST});i instanceof Promise&&o.find(function(e){return e.type===Pf.PROMISE_VALIDATION})?r.awaitingPromises.push(i.then(function(i){r.performValidations(e,i,t,a,o,n)})):r.performValidations(e,i,t,a,o,n)})},e.prototype.whitelist=function(e,t,n){var r=this,i=[];Object.keys(e).forEach(function(e){(!t[e]||t[e].length===0)&&i.push(e)}),i.length>0&&(this.validatorOptions&&this.validatorOptions.forbidNonWhitelisted?i.forEach(function(t){var i,a=r.generateValidationError(e,e[t],t);a.constraints=(i={},i[Pf.WHITELIST]=`property ${t} should not exist`,i),a.children=void 0,n.push(a)}):i.forEach(function(t){return delete e[t]}))},e.prototype.stripEmptyErrors=function(e){var t=this;return e.filter(function(e){if(e.children&&(e.children=t.stripEmptyErrors(e.children)),Object.keys(e.constraints).length===0){if(e.children.length===0)return!1;delete e.constraints}return!0})},e.prototype.performValidations=function(e,t,n,r,i,a){var o=i.filter(function(e){return e.type===Pf.CUSTOM_VALIDATION}),s=i.filter(function(e){return e.type===Pf.NESTED_VALIDATION}),c=i.filter(function(e){return e.type===Pf.CONDITIONAL_VALIDATION}),l=this.generateValidationError(e,t,n);a.push(l),this.conditionalValidations(e,t,c)&&(this.customValidations(e,t,r,l),this.mapContexts(e,t,r,l),!(t===void 0&&this.validatorOptions&&this.validatorOptions.skipUndefinedProperties===!0)&&(t===null&&this.validatorOptions&&this.validatorOptions.skipNullProperties===!0||t==null&&this.validatorOptions&&this.validatorOptions.skipMissingProperties===!0||(this.customValidations(e,t,o,l),this.nestedValidations(t,s,l),this.mapContexts(e,t,i,l),this.mapContexts(e,t,o,l))))},e.prototype.generateValidationError=function(e,t,n){var r=new Nf;return(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.target===void 0||this.validatorOptions.validationError.target===!0)&&(r.target=e),(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.value===void 0||this.validatorOptions.validationError.value===!0)&&(r.value=t),r.property=n,r.children=[],r.constraints={},r},e.prototype.conditionalValidations=function(e,t,n){return n.map(function(n){return n.constraints[0](e,t)}).reduce(function(e,t){return e&&t},!0)},e.prototype.customValidations=function(e,t,n,r){var i=this;n.forEach(function(n){var a=function(){return{targetName:e.constructor?e.constructor.name:void 0,property:n.propertyName,object:e,value:t,constraints:n.constraints}};(!n.validateIf||n.validateIf(e,t))&&i.metadataStorage.getTargetValidatorConstraints(n.constraintCls).forEach(function(o){if(!(o.async&&i.ignoreAsyncValidations)&&!(i.validatorOptions&&i.validatorOptions.stopAtFirstError&&Object.keys(r.constraints||{}).length>0)){var s=a();if(!n.each||!(Array.isArray(t)||t instanceof Set||t instanceof Map)){var c=o.instance.validate(t,s);if(Df(c)){var l=c.then(function(a){if(!a){var s=Lf(i.createValidationError(e,t,n,o),2),c=s[0],l=s[1];r.constraints[c]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(l)}else if(!c){var u=Lf(i.createValidationError(e,t,n,o),2),d=u[0],f=u[1];r.constraints[d]=f}}else{var p=Tf(t).map(function(e){return o.instance.validate(e,s)});if(p.some(function(e){return Df(e)})){var m=p.map(function(e){return Df(e)?e:Promise.resolve(e)}),h=Promise.all(m).then(function(a){if(!a.every(function(e){return e})){var s=Lf(i.createValidationError(e,t,n,o),2),c=s[0],l=s[1];r.constraints[c]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(h)}else if(!p.every(function(e){return e})){var g=Lf(i.createValidationError(e,t,n,o),2),d=g[0],f=g[1];r.constraints[d]=f}}}})})},e.prototype.nestedValidations=function(e,t,n){var r=this;e!==void 0&&t.forEach(function(i){if((i.type===Pf.NESTED_VALIDATION||i.type===Pf.PROMISE_VALIDATION)&&!(r.validatorOptions&&r.validatorOptions.stopAtFirstError&&Object.keys(n.constraints||{}).length>0)){if(Array.isArray(e)||e instanceof Set||e instanceof Map)(e instanceof Set?Array.from(e):e).forEach(function(i,a){r.performValidations(e,i,a.toString(),[],t,n.children)});else if(e instanceof Object){var a=typeof i.target==`string`?i.target:i.target.name;r.execute(e,a,n.children)}else{var o=Lf(r.createValidationError(i.target,e,i),2),s=o[0],c=o[1];n.constraints[s]=c}}})},e.prototype.mapContexts=function(e,t,n,r){var i=this;return n.forEach(function(e){if(e.context){var t=void 0;e.type===Pf.CUSTOM_VALIDATION&&(t=i.metadataStorage.getTargetValidatorConstraints(e.constraintCls)[0]);var n=i.getConstraintType(e,t);r.constraints[n]&&(r.contexts||(r.contexts={}),r.contexts[n]=Object.assign(r.contexts[n]||{},e.context))}})},e.prototype.createValidationError=function(e,t,n,r){var i=e.constructor?e.constructor.name:void 0,a=this.getConstraintType(n,r),o={targetName:i,property:n.propertyName,object:e,value:t,constraints:n.constraints},s=n.message||``;return!n.message&&(!this.validatorOptions||this.validatorOptions&&!this.validatorOptions.dismissDefaultMessages)&&r&&r.instance.defaultMessage instanceof Function&&(s=r.instance.defaultMessage(o)),[a,If.replaceMessageSpecialTokens(s,o)]},e.prototype.getConstraintType=function(e,t){return t&&t.name?t.name:e.type},e}(),zf=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Bf=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Vf=function(){function e(){}return e.prototype.validate=function(e,t,n){return this.coreValidate(e,t,n)},e.prototype.validateOrReject=function(e,t,n){return zf(this,void 0,void 0,function(){var r;return Bf(this,function(i){switch(i.label){case 0:return[4,this.coreValidate(e,t,n)];case 1:return r=i.sent(),r.length?[2,Promise.reject(r)]:[2]}})})},e.prototype.validateSync=function(e,t,n){var r=typeof e==`string`?t:e,i=typeof e==`string`?n:t,a=typeof e==`string`?e:void 0,o=new Rf(this,i);o.ignoreAsyncValidations=!0;var s=[];return o.execute(r,a,s),o.stripEmptyErrors(s)},e.prototype.coreValidate=function(e,t,n){var r=typeof e==`string`?t:e,i=typeof e==`string`?n:t,a=typeof e==`string`?e:void 0,o=new Rf(this,i),s=[];return o.execute(r,a,s),Promise.all(o.awaitingPromises).then(function(){return o.stripEmptyErrors(s)})},e}(),Hf=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}()),Uf,Wf;function Gf(e){if(Uf)try{var t=Uf.get(e);if(t||!Wf||!Wf.fallback)return t}catch(e){if(!Wf||!Wf.fallbackOnErrors)throw e}return Hf.get(e)}var Kf=function(){function e(e,t,n){n===void 0&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return Gf(this.target)},enumerable:!1,configurable:!0}),e}();function qf(e){var t;if(e.validator instanceof Function){if(t=e.validator,Gf(jf).getTargetValidatorConstraints(e.validator).length>1)throw`More than one implementation of ValidatorConstraintInterface found for validator on: ${e.target.name}:${e.propertyName}`}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):``},e}(),Mf().addConstraintMetadata(new Kf(t,e.name,e.async))}var r={type:e.name&&Pf.isValid(e.name)?e.name:Pf.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};Mf().addValidationMetadata(new Cf(r))}function Jf(e,t){return function(n){return e(t&&t.each?`each value in `:``,n)}}function Yf(e,t){return function(n,r){qf({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}var Xf=Pf.IS_DEFINED;function Zf(e){return e!=null}function Qf(e){return Yf({name:Xf,validator:{validate:function(e){return Zf(e)},defaultMessage:Jf(function(e){return e+`$property should not be null or undefined`},e)}},e)}var $f=`isOptional`;function X(e){return function(t,n){var r={type:Pf.CONDITIONAL_VALIDATION,name:$f,target:t.constructor,propertyName:n,constraints:[function(e,t){return e[n]!==null&&e[n]!==void 0}],validationOptions:e};Mf().addValidationMetadata(new Cf(r))}}function ep(e,t){return function(n,r){var i={type:Pf.CONDITIONAL_VALIDATION,target:n.constructor,propertyName:r,constraints:[e],validationOptions:t};Mf().addValidationMetadata(new Cf(i))}}var tp=function(){return tp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tp.apply(this,arguments)};function np(e){var t=tp({},e),n=t.each?`each value in `:``;return t.message=t.message||n+`nested property $property must be either object or array`,function(e,n){var r={type:Pf.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};Mf().addValidationMetadata(new Cf(r))}}var rp=`isNotEmpty`;function ip(e){return e!==``&&e!=null}function ap(e){return Yf({name:rp,validator:{validate:function(e,t){return ip(e)},defaultMessage:Jf(function(e){return e+`$property should not be empty`},e)}},e)}var op=`isBoolean`;function sp(e){return e instanceof Boolean||typeof e==`boolean`}function cp(e){return Yf({name:op,validator:{validate:function(e,t){return sp(e)},defaultMessage:Jf(function(e){return e+`$property must be a boolean value`},e)}},e)}var lp=`isNumber`;function up(e,t){if(t===void 0&&(t={}),typeof e!=`number`)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(t.maxDecimalPlaces!==void 0){var n=0;if(e%1!=0&&(n=e.toString().split(`.`)[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}function dp(e,t){return e===void 0&&(e={}),Yf({name:lp,constraints:[e],validator:{validate:function(e,t){return up(e,t==null?void 0:t.constraints[0])},defaultMessage:Jf(function(e){return e+`$property must be a number conforming to the specified constraints`},t)}},t)}var fp=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},pp=`isEnum`;function mp(e,t){return Object.keys(t).map(function(e){return t[e]}).includes(e)}function hp(e){return Object.entries(e).filter(function(e){var t=fp(e,2),n=t[0];return t[1],isNaN(parseInt(n))}).map(function(e){var t=fp(e,2);return t[0],t[1]})}function gp(e,t){return Yf({name:pp,constraints:[e,hp(e)],validator:{validate:function(e,t){return mp(e,t==null?void 0:t.constraints[0])},defaultMessage:Jf(function(e){return e+`$property must be one of the following values: $constraint2`},t)}},t)}var _p=`isString`;function vp(e){return e instanceof String||typeof e==`string`}function yp(e){return Yf({name:_p,validator:{validate:function(e,t){return vp(e)},defaultMessage:Jf(function(e){return e+`$property must be a string`},e)}},e)}var bp=`isArray`;function xp(e){return Array.isArray(e)}function Sp(e){return Yf({name:bp,validator:{validate:function(e,t){return xp(e)},defaultMessage:Jf(function(e){return e+`$property must be an array`},e)}},e)}var Cp=`isObject`;function wp(e){return e!=null&&(typeof e==`object`||typeof e==`function`)&&!Array.isArray(e)}function Tp(e){return Yf({name:Cp,validator:{validate:function(e,t){return wp(e)},defaultMessage:Jf(function(e){return e+`$property must be an object`},e)}},e)}function Ep(e,t,n){return typeof e==`string`?Gf(Vf).validateSync(e,t,n):Gf(Vf).validateSync(e,t)}var Z;(function(e){e[e.PLAIN_TO_CLASS=0]=`PLAIN_TO_CLASS`,e[e.CLASS_TO_PLAIN=1]=`CLASS_TO_PLAIN`,e[e.CLASS_TO_CLASS=2]=`CLASS_TO_CLASS`})(Z||(Z={}));var Dp=new(function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,n){return this.findMetadatas(this._transformMetadatas,e,t).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?n===Z.CLASS_TO_CLASS||n===Z.PLAIN_TO_CLASS:e.options.toPlainOnly!==!0||n===Z.CLASS_TO_PLAIN})},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find(function(e){return e.options&&e.options.name===t})},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),n=t&&t.get(void 0),r=this._exposeMetadatas.get(e),i=r&&r.get(void 0);return n&&i||!n&&!i?`none`:n?`excludeAll`:`exposeAll`},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?t===Z.CLASS_TO_CLASS||t===Z.PLAIN_TO_CLASS:e.options.toPlainOnly!==!0||t===Z.CLASS_TO_PLAIN}).map(function(e){return e.propertyName})},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?t===Z.CLASS_TO_CLASS||t===Z.PLAIN_TO_CLASS:e.options.toPlainOnly!==!0||t===Z.CLASS_TO_PLAIN}).map(function(e){return e.propertyName})},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var n=e.get(t),r;n&&(r=Array.from(n.values()).filter(function(e){return e.propertyName!==void 0}));for(var i=[],a=0,o=this.getAncestors(t);a<o.length;a++){var s=o[a],c=e.get(s);if(c){var l=Array.from(c.values()).filter(function(e){return e.propertyName!==void 0});i.push.apply(i,l)}}return i.concat(r||[])},e.prototype.findMetadata=function(e,t,n){var r=e.get(t);if(r){var i=r.get(n);if(i)return i}for(var a=0,o=this.getAncestors(t);a<o.length;a++){var s=o[a],c=e.get(s);if(c){var l=c.get(n);if(l)return l}}},e.prototype.findMetadatas=function(e,t,n){var r=e.get(t),i;r&&(i=r.get(n));for(var a=[],o=0,s=this.getAncestors(t);o<s.length;o++){var c=s[o],l=e.get(c);l&&l.has(n)&&a.push.apply(a,l.get(n))}return a.slice().reverse().concat((i||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],n=Object.getPrototypeOf(e.prototype.constructor);n.prototype!==void 0;n=Object.getPrototypeOf(n.prototype.constructor))t.push(n);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}());function Op(){if(typeof globalThis<`u`)return globalThis;if(typeof global<`u`)return global;if(typeof window<`u`)return window;if(typeof self<`u`)return self}function kp(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var Ap=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function jp(e){var t=new e;return!(t instanceof Set)&&!(`push`in t)?[]:t}var Mp=function(){function e(e,t){this.transformationType=e,this.options=t,this.recursionStack=new Set}return e.prototype.transform=function(e,t,n,r,i,a){var o=this;if(a===void 0&&(a=0),Array.isArray(t)||t instanceof Set){var s=r&&this.transformationType===Z.PLAIN_TO_CLASS?jp(r):[];return t.forEach(function(t,r){var i=e?e[r]:void 0;if(!o.options.enableCircularCheck||!o.isCircular(t)){var c=void 0;if(typeof n!=`function`&&n&&n.options&&n.options.discriminator&&n.options.discriminator.property&&n.options.discriminator.subTypes){if(o.transformationType===Z.PLAIN_TO_CLASS){c=n.options.discriminator.subTypes.find(function(e){return e.name===t[n.options.discriminator.property]});var l={newObject:s,object:t,property:void 0},u=n.typeFunction(l);c=c===void 0?u:c.value,n.options.keepDiscriminatorProperty||delete t[n.options.discriminator.property]}o.transformationType===Z.CLASS_TO_CLASS&&(c=t.constructor),o.transformationType===Z.CLASS_TO_PLAIN&&(t[n.options.discriminator.property]=n.options.discriminator.subTypes.find(function(e){return e.value===t.constructor}).name)}else c=n;var d=o.transform(i,t,c,void 0,t instanceof Map,a+1);s instanceof Set?s.add(d):s.push(d)}else o.transformationType===Z.CLASS_TO_CLASS&&(s instanceof Set?s.add(t):s.push(t))}),s}if(n===String&&!i)return t==null?t:String(t);if(n===Number&&!i)return t==null?t:Number(t);if(n===Boolean&&!i)return t==null?t:!!t;if((n===Date||t instanceof Date)&&!i)return t instanceof Date?new Date(t.valueOf()):t==null?t:new Date(t);if(Op().Buffer&&(n===Buffer||t instanceof Buffer)&&!i)return t==null?t:Buffer.from(t);if(kp(t)&&!i)return new Promise(function(e,r){t.then(function(t){return e(o.transform(void 0,t,n,void 0,void 0,a+1))},r)});if(!i&&typeof t==`object`&&t&&typeof t.then==`function`)return t;if(typeof t==`object`&&t){!n&&t.constructor!==Object&&(!Array.isArray(t)&&t.constructor===Array||(n=t.constructor)),!n&&e&&(n=e.constructor),this.options.enableCircularCheck&&this.recursionStack.add(t);var c=this.getKeys(n,t,i),l=e||{};!e&&(this.transformationType===Z.PLAIN_TO_CLASS||this.transformationType===Z.CLASS_TO_CLASS)&&(l=i?new Map:n?new n:{});for(var u=function(r){if(r===`__proto__`||r===`constructor`)return`continue`;var o=r,s=r,c=r;if(!d.options.ignoreDecorators&&n){if(d.transformationType===Z.PLAIN_TO_CLASS){var u=Dp.findExposeMetadataByCustomName(n,r);u&&(c=u.propertyName,s=u.propertyName)}else if(d.transformationType===Z.CLASS_TO_PLAIN||d.transformationType===Z.CLASS_TO_CLASS){var u=Dp.findExposeMetadata(n,r);u&&u.options&&u.options.name&&(s=u.options.name)}}var f=void 0;f=d.transformationType===Z.PLAIN_TO_CLASS?t[o]:t instanceof Map?t.get(o):t[o]instanceof Function?t[o]():t[o];var p=void 0,m=f instanceof Map;if(n&&i)p=n;else if(n){var h=Dp.findTypeMetadata(n,c);if(h){var g={newObject:l,object:t,property:c},_=h.typeFunction?h.typeFunction(g):h.reflectedType;h.options&&h.options.discriminator&&h.options.discriminator.property&&h.options.discriminator.subTypes?t[o]instanceof Array?p=h:(d.transformationType===Z.PLAIN_TO_CLASS&&(p=h.options.discriminator.subTypes.find(function(e){if(f&&f instanceof Object&&h.options.discriminator.property in f)return e.name===f[h.options.discriminator.property]}),p=p===void 0?_:p.value,h.options.keepDiscriminatorProperty||f&&f instanceof Object&&h.options.discriminator.property in f&&delete f[h.options.discriminator.property]),d.transformationType===Z.CLASS_TO_CLASS&&(p=f.constructor),d.transformationType===Z.CLASS_TO_PLAIN&&f&&(f[h.options.discriminator.property]=h.options.discriminator.subTypes.find(function(e){return e.value===f.constructor}).name)):p=_,m=m||h.reflectedType===Map}else if(d.options.targetMaps)d.options.targetMaps.filter(function(e){return e.target===n&&!!e.properties[c]}).forEach(function(e){return p=e.properties[c]});else if(d.options.enableImplicitConversion&&d.transformationType===Z.PLAIN_TO_CLASS){var v=Reflect.getMetadata(`design:type`,n.prototype,c);v&&(p=v)}}var y=Array.isArray(t[o])?d.getReflectedType(n,c):void 0,b=e?e[o]:void 0;if(l.constructor.prototype){var x=Object.getOwnPropertyDescriptor(l.constructor.prototype,s);if((d.transformationType===Z.PLAIN_TO_CLASS||d.transformationType===Z.CLASS_TO_CLASS)&&(x&&!x.set||l[s]instanceof Function))return`continue`}if(!d.options.enableCircularCheck||!d.isCircular(f)){var S=d.transformationType===Z.PLAIN_TO_CLASS?s:r,C=void 0;d.transformationType===Z.CLASS_TO_PLAIN?(C=t[S],C=d.applyCustomTransformations(C,n,S,t,d.transformationType),C=t[S]===C?f:C,C=d.transform(b,C,p,y,m,a+1)):f===void 0&&d.options.exposeDefaultValues?C=l[s]:(C=d.transform(b,f,p,y,m,a+1),C=d.applyCustomTransformations(C,n,S,t,d.transformationType)),(C!==void 0||d.options.exposeUnsetFields)&&(l instanceof Map?l.set(s,C):l[s]=C)}else if(d.transformationType===Z.CLASS_TO_CLASS){var C=f;C=d.applyCustomTransformations(C,n,r,t,d.transformationType),(C!==void 0||d.options.exposeUnsetFields)&&(l instanceof Map?l.set(s,C):l[s]=C)}},d=this,f=0,p=c;f<p.length;f++){var m=p[f];u(m)}return this.options.enableCircularCheck&&this.recursionStack.delete(t),l}return t},e.prototype.applyCustomTransformations=function(e,t,n,r,i){var a=this,o=Dp.findTransformMetadatas(t,n,this.transformationType);return this.options.version!==void 0&&(o=o.filter(function(e){return!e.options||a.checkVersion(e.options.since,e.options.until)})),o=this.options.groups&&this.options.groups.length?o.filter(function(e){return!e.options||a.checkGroups(e.options.groups)}):o.filter(function(e){return!e.options||!e.options.groups||!e.options.groups.length}),o.forEach(function(t){e=t.transformFn({value:e,key:n,obj:r,type:i,options:a.options})}),e},e.prototype.isCircular=function(e){return this.recursionStack.has(e)},e.prototype.getReflectedType=function(e,t){if(e){var n=Dp.findTypeMetadata(e,t);return n?n.reflectedType:void 0}},e.prototype.getKeys=function(e,t,n){var r=this,i=Dp.getStrategy(e);i===`none`&&(i=this.options.strategy||`exposeAll`);var a=[];if((i===`exposeAll`||n)&&(a=t instanceof Map?Array.from(t.keys()):Object.keys(t)),n)return a;if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&e){var o=Dp.getExposedProperties(e,this.transformationType),s=Dp.getExcludedProperties(e,this.transformationType);a=Ap(Ap([],o,!0),s,!0)}if(!this.options.ignoreDecorators&&e){var o=Dp.getExposedProperties(e,this.transformationType);this.transformationType===Z.PLAIN_TO_CLASS&&(o=o.map(function(t){var n=Dp.findExposeMetadata(e,t);return n&&n.options&&n.options.name?n.options.name:t})),a=this.options.excludeExtraneousValues?o:a.concat(o);var c=Dp.getExcludedProperties(e,this.transformationType);c.length>0&&(a=a.filter(function(e){return!c.includes(e)})),this.options.version!==void 0&&(a=a.filter(function(t){var n=Dp.findExposeMetadata(e,t);return!n||!n.options||r.checkVersion(n.options.since,n.options.until)})),a=this.options.groups&&this.options.groups.length?a.filter(function(t){var n=Dp.findExposeMetadata(e,t);return!n||!n.options||r.checkGroups(n.options.groups)}):a.filter(function(t){var n=Dp.findExposeMetadata(e,t);return!n||!n.options||!n.options.groups||!n.options.groups.length})}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(a=a.filter(function(e){return r.options.excludePrefixes.every(function(t){return e.substr(0,t.length)!==t})})),a=a.filter(function(e,t,n){return n.indexOf(e)===t}),a},e.prototype.checkVersion=function(e,t){var n=!0;return n&&e&&(n=this.options.version>=e),n&&t&&(n=this.options.version<t),n},e.prototype.checkGroups=function(e){return!e||this.options.groups.some(function(t){return e.includes(t)})},e}(),Np={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0},Pp=function(){return Pp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Pp.apply(this,arguments)},Fp=function(){function e(){}return e.prototype.instanceToPlain=function(e,t){return new Mp(Z.CLASS_TO_PLAIN,Pp(Pp({},Np),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToPlainFromExist=function(e,t,n){return new Mp(Z.CLASS_TO_PLAIN,Pp(Pp({},Np),n)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.plainToInstance=function(e,t,n){return new Mp(Z.PLAIN_TO_CLASS,Pp(Pp({},Np),n)).transform(void 0,t,e,void 0,void 0,void 0)},e.prototype.plainToClassFromExist=function(e,t,n){return new Mp(Z.PLAIN_TO_CLASS,Pp(Pp({},Np),n)).transform(e,t,void 0,void 0,void 0,void 0)},e.prototype.instanceToInstance=function(e,t){return new Mp(Z.CLASS_TO_CLASS,Pp(Pp({},Np),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToClassFromExist=function(e,t,n){return new Mp(Z.CLASS_TO_CLASS,Pp(Pp({},Np),n)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.serialize=function(e,t){return JSON.stringify(this.instanceToPlain(e,t))},e.prototype.deserialize=function(e,t,n){var r=JSON.parse(t);return this.plainToInstance(e,r,n)},e.prototype.deserializeArray=function(e,t,n){var r=JSON.parse(t);return this.plainToInstance(e,r,n)},e}();function Ip(e,t){return t===void 0&&(t={}),function(n,r){Dp.addTransformMetadata({target:n.constructor,propertyName:r,transformFn:e,options:t})}}var Lp=new Fp;function Rp(e,t,n){return Lp.plainToInstance(e,t,n)}function Q(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function $(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var zp=class{};$([Qf(),yp(),Q(`design:type`,String)],zp.prototype,`templateId`,void 0),$([X(),Tp(),Q(`design:type`,typeof Record>`u`?Object:Record)],zp.prototype,`templateLayout`,void 0);var Bp=class{};$([Qf(),yp(),Q(`design:type`,String)],Bp.prototype,`id`,void 0),$([Qf(),yp(),Q(`design:type`,String)],Bp.prototype,`name`,void 0),$([Qf(),yp(),Q(`design:type`,String)],Bp.prototype,`type`,void 0),$([Qf(),cp(),Q(`design:type`,Boolean)],Bp.prototype,`final`,void 0),$([Qf(),cp(),Q(`design:type`,Boolean)],Bp.prototype,`releaseClientApp`,void 0),$([X(),Tp(),Q(`design:type`,Object)],Bp.prototype,`dataSource`,void 0),$([Ip(({value:e})=>Yi(e)?Rp(zp,e):void 0),X(),Tp(),ep((e,t)=>Yi(t)),np(),Q(`design:type`,zp===void 0?Object:zp)],Bp.prototype,`client`,void 0);var Vp=e=>Array.isArray(e)&&e.some(e=>e&&typeof e==`object`&&(e.templateId===`PROGRESS`||e.templateId===`GENERIC_PROGRESS`)),Hp=()=>Yf({name:`hasProgressStep`,validator:{validate(e){return Vp(e)},defaultMessage(){return`Workflow client must have at least one step with templateId "${Si}"`}}}),Up=class{};$([Qf(),Tp(),Q(`design:type`,typeof Record>`u`?Object:Record)],Up.prototype,`layout`,void 0),$([Sp(),Qf(),Ip(({value:e})=>Array.isArray(e)?e.map(e=>Rp(zp,e)):e),np({each:!0}),Hp(),Q(`design:type`,typeof Array>`u`?Object:Array)],Up.prototype,`steps`,void 0);var Wp,Gp=class{static isWorkflowModel(e){return typeof e==`object`&&!!e&&`id`in e&&`steps`in e&&`client`in e&&!(`error`in e)}};Wp=Gp,Wp.fromPlain=e=>{if(!e)return{validationErrorMessage:`Workflow data is not defined`};try{let t=Rp(Wp,e),n=Ep(t);return n.length?{validationErrorMessage:JSON.stringify(sa(``,n))}:t}catch(e){let t=e instanceof Error?e.message:String(e);return{validationErrorMessage:`Failed to parse workflow data${t?`: ${t}`:`.`}`}}},$([Qf(),yp(),Q(`design:type`,String)],Gp.prototype,`id`,void 0),$([Qf(),Sp(),Ip(({value:e})=>Array.isArray(e)?e.map(e=>Rp(Bp,e)):e),np({each:!0}),Q(`design:type`,Array)],Gp.prototype,`steps`,void 0),$([Qf(),Tp(),Ip(({value:e})=>Gi(e)?Rp(Up,e):e),np(),Q(`design:type`,Up===void 0?Object:Up)],Gp.prototype,`client`,void 0),$([X(),Sp(),yp({each:!0}),Q(`design:type`,Array)],Gp.prototype,`stepTemplateIds`,void 0),$([X(),yp(),Q(`design:type`,String)],Gp.prototype,`name`,void 0),$([X(),Tp(),Q(`design:type`,Object)],Gp.prototype,`logging`,void 0),$([X(),yp(),Q(`design:type`,Object)],Gp.prototype,`error`,void 0),$([X(),yp(),Q(`design:type`,String)],Gp.prototype,`defaultLocale`,void 0),$([X(),Tp(),Q(`design:type`,typeof Record>`u`?Object:Record)],Gp.prototype,`config`,void 0),$([X(),Tp(),Q(`design:type`,typeof Record>`u`?Object:Record)],Gp.prototype,`metadata`,void 0),$([X(),dp(),Q(`design:type`,Number)],Gp.prototype,`sessionUpdateTimeout`,void 0),$([X(),cp(),Q(`design:type`,Boolean)],Gp.prototype,`trackLocation`,void 0);var Kp=class{};$([X(),gp(oi),Q(`design:type`,oi===void 0?Object:oi)],Kp.prototype,`level`,void 0);var qp=class{};$([Qf(),ap(),yp(),Q(`design:type`,String)],qp.prototype,`id`,void 0),$([Qf(),yp(),ap(),Q(`design:type`,String)],qp.prototype,`name`,void 0),$([X(),yp(),Q(`design:type`,String)],qp.prototype,`createdAt`,void 0),$([X(),yp(),Q(`design:type`,String)],qp.prototype,`updatedAt`,void 0),$([X(),yp(),Q(`design:type`,String)],qp.prototype,`string`,void 0),$([X(),Q(`design:type`,Object)],qp.prototype,`createdBy`,void 0),$([X(),Q(`design:type`,Object)],qp.prototype,`updatedBy`,void 0),$([X(),yp(),Q(`design:type`,Object)],qp.prototype,`step`,void 0),$([X(),yp(),Q(`design:type`,Object)],qp.prototype,`action`,void 0),$([X(),yp(),Q(`design:type`,Object)],qp.prototype,`path`,void 0),$([X(),dp(),Q(`design:type`,Object)],qp.prototype,`integer`,void 0),$([X(),dp(),Q(`design:type`,Object)],qp.prototype,`decimal`,void 0),$([X(),Q(`design:type`,Object)],qp.prototype,`object`,void 0);var Jp,Yp=class{static isSessionModel(e){return typeof e==`object`&&!!e&&`id`in e&&`currentStep`in e&&`workflow`in e&&`properties`in e&&`isProcessingFiles`in e&&!(`error`in e)}};Jp=Yp,Jp.fromPlain=e=>{if(!e)return{validationErrorMessage:`Session data is not defined`};try{let t=Rp(Jp,e),n=Ep(t);return n.length?{validationErrorMessage:JSON.stringify(sa(``,n))}:t}catch(e){let t=e instanceof Error?e.message:String(e);return{validationErrorMessage:`Failed to parse session data${t?`: ${t}`:`.`}`}}},$([Qf(),ap(),yp(),Q(`design:type`,String)],Yp.prototype,`id`,void 0),$([Qf(),yp(),Q(`design:type`,String)],Yp.prototype,`currentStep`,void 0),$([Qf(),Ip(({value:e})=>Gi(e)?Rp(Gp,e):e),np(),Q(`design:type`,Gp===void 0?Object:Gp)],Yp.prototype,`workflow`,void 0),$([Qf(),Ip(({value:e})=>(Array.isArray(e)?e:[]).map(e=>Rp(qp,e))),np({each:!0}),Q(`design:type`,Array)],Yp.prototype,`properties`,void 0),$([Qf(),cp(),Q(`design:type`,Boolean)],Yp.prototype,`isProcessingFiles`,void 0),$([X(),yp(),Q(`design:type`,String)],Yp.prototype,`locale`,void 0),$([X(),cp(),Q(`design:type`,Boolean)],Yp.prototype,`isErrorFiles`,void 0),$([X(),yp(),Q(`design:type`,String)],Yp.prototype,`shortId`,void 0),$([X(),yp(),Q(`design:type`,String)],Yp.prototype,`deviceId`,void 0),$([X(),Tp(),Q(`design:type`,typeof Record>`u`?Object:Record)],Yp.prototype,`deviceMetadata`,void 0),$([X(),Tp(),Q(`design:type`,typeof Record>`u`?Object:Record)],Yp.prototype,`metadata`,void 0);var Xp=(e,t)=>({_isInitialized:!1,_initializationInProgress:!1,_isConnectedToPlatform:!1,_sessionIdFromUrl:null,_ttl:86400,_runSocketConnection:function(){var e=C(function*(e){let{host:n,isSecure:r,port:i}=t().startConfig;if(n&&e&&(yield H.connect({host:n,isSecure:r,port:i,token:e})),!n||!e||!H.isConnected()){let e=new Ya({errorCode:hi.CONNECTION_ISSUE,message:`WebSocket connection issue`}),t=new Ka({errorCode:di.START_SESSION_FAILED,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`WebSocket connection issue`}),{error:t}}return{}});return function(t){return e.apply(this,arguments)}}(),_continueSession:function(){var e=C(function*(e){var n,r;let i=t()._sessionIdFromUrl,a=t().startConfig,o=z(a.apiKey),s;s=i?eo.Force:o?eo.ApiKey:eo.Simple;let c=(n=t().workflow)==null?void 0:n.id,l=i?`Session continued from force session id`:`Session restored from local storage`,u;if(s===eo.Force&&(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session with force session id: ${i}`}),u=i),s===eo.ApiKey){var d;if(!t().sessionRestoreMode)return Di;let e=a.apiKey,n=Wi.getAuthTokenLs(),r=n&&((d=n[e])==null?void 0:d.sessionId);if(!r)return Di;r&&(u=r),B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session with api key: ${e}`})}if(s===eo.Simple){if(!t().sessionRestoreMode)return Di;let e=t().getCurrentSessionDataLs();if(!e)return Di;let n=e.sessionId,r=e.workflowId;if(!n||r!==c)return Di;u=n,B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session with session id from LS: ${n}`})}let f=yield t().waitForContinueSession({sessionId:u,locale:e});if(f.error)return s===eo.Simple?(t().removeCurrentSessionDataLsAndStore(),Di):{error:f.error};let p=f.sessionData.currentStep,m=f.sessionData.workflow.steps.find(e=>e.id===p);return(m==null?void 0:m.releaseClientApp)===!0&&m!=null&&(r=m.client)!=null&&r.templateId&&s===eo.Simple?(t().removeCurrentSessionDataLsAndStore(),Di):(t().setCurrentSessionDataLsAndStore({isApiKeyConnection:o,sessionId:f.sessionData.id,workflowId:c,locale:f.sessionData.locale}),yield t().setNextStep({workflow:f.sessionData.workflow,properties:f.sessionData.properties,nextStepId:f.sessionData.currentStep,locale:f.sessionData.locale}),t().listener({eventType:ai.MESSAGE,module:`IDV`,logLevel:R.INFO,message:l}),{shouldStartNewSession:!1})});return function(t){return e.apply(this,arguments)}}(),initialize(n){return C(function*(){if(t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Already initialized`}),{};if(t()._initializationInProgress)return{error:new Ha({errorCode:fi.INITIALIZATION_IN_PROGRESS})};e({_initializationInProgress:!0}),yield t().setAndInitFetchService(),e({modulesConfig:n.modulesConfig||{}});let r=[Sf];if(Array.isArray(n==null?void 0:n.includedModules)){let e=n.includedModules.filter(e=>typeof e==`function`&&e.displayName&&!r.some(t=>t.displayName===e.displayName));r=[...r,...e]}let i=yield t().loadModules(r);return i.error?{error:i.error}:(B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully load modules: ${r.map(e=>e.displayName).join(`, `)}`}),e({_initializationInProgress:!1,_isInitialized:!0}),{})})()},configureByApiKey(n){return C(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (configure by api key)`}),{error:new Ga({errorCode:ui.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (configure by api key)`}),{error:new Ga({errorCode:ui.SCENARIO_IN_PROGRESS})};let r=[`apiKey`,`baseUrl`].filter(e=>!(n!=null&&n[e]));if(r.length>0)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Missing parameters: ${r.join(`, `)}`}),{error:new Ga({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`Missing parameters: ${r.join(`, `)}`})};let i=na(n.baseUrl);if(!i)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Invalid URL: ${n.baseUrl}`}),{error:new Ga({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n.baseUrl}`})};let a=Number(n.ttl);!Number.isNaN(a)&&a>0&&e({_ttl:a});let o=t()._ttl,s={host:i.host,isSecure:i.isSecure,port:i.port,apiKey:n.apiKey,deviceDescriptor:{ttl:o},httpTimeoutMs:n.httpTimeoutMs},c=Wi.getAuthTokenLs(),l=c&&c[n.apiKey]&&c[n.apiKey].authToken?c[n.apiKey]:null,u=l&&l.authToken,d=yield t().connectByApiKey(s);if(d.error){let e=new Ga({errorCode:ui.CONNECTION_ISSUE,underlyingBaseError:d.error});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue by api key`}),{error:e}}u&&d.authToken!==u&&(Wi.removeAuthTokenLs(n.apiKey),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Removed old session from LS because new api token will not work with old session id`}));let f=l&&d.authToken===l.authToken&&l,p=f?f.tokenExpiresAt:Date.now()+o*1e3;return B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully configure by api key. Token expires at: ${p}`}),t().setApiKeyAuthTokenCollection(n.apiKey,d.authToken,p),e({_isConnectedToPlatform:!0}),t().setStartConfig({host:i.host,isSecure:i.isSecure,apiKey:n.apiKey,port:i.port,httpTimeoutMs:n.httpTimeoutMs}),d})()},configureWithUrl(n){return C(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (configure by url)`}),{error:new Ga({errorCode:ui.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (configure by url)`}),{error:new Ga({errorCode:ui.SCENARIO_IN_PROGRESS})};let r=na(n);if(!r){let e=`Invalid URL: ${n}`;return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:e}),{error:new Ga({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:e})}}if(!ta(n)){let e=`Missing parameters: authorization`;return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:e}),{error:new Ga({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:e})}}let i=ea(n);i&&(t().removeCurrentSessionDataLsAndStore(),e({_sessionIdFromUrl:i}));let a=yield t().connectByUrl(n);return a.error?(B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue by url: ${a.error.message}`}),{error:new Ga({errorCode:ui.CONNECTION_ISSUE,underlyingBaseError:a.error})}):(e({_isConnectedToPlatform:!0}),t().setStartConfig({host:r.host,isSecure:r.isSecure,port:r.port}),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully configure with url. URL: ${n}`}),a)})()},configureByUserPass(n){return C(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (configure by user pass)`}),{error:new Ga({errorCode:ui.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (configure by user pass)`}),{error:new Ga({errorCode:ui.SCENARIO_IN_PROGRESS})};let r=[`password`,`userName`,`baseUrl`].filter(e=>!(n!=null&&n[e]));if(r.length>0)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Missing parameters: ${r.join(`, `)}`}),{error:new Ga({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`Missing parameters: ${r.join(`, `)}`})};let i=na(n.baseUrl);if(!i)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Invalid URL: ${n.baseUrl}`}),{error:new Ga({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n.baseUrl}`})};let a={host:i.host,isSecure:i.isSecure,password:n.password,port:i.port,userName:n.userName,httpTimeoutMs:n.httpTimeoutMs},o=yield t().connectByUserPass(a);if(o.error){let e=new Ga({errorCode:ui.CONNECTION_ISSUE,underlyingBaseError:o.error});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue by user pass: ${o.error.message}`}),{error:e}}return B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully configure by user pass`}),e({_isConnectedToPlatform:!0}),t().setStartConfig({host:i.host,isSecure:i.isSecure,port:i.port,httpTimeoutMs:n.httpTimeoutMs}),o})()},getWorkflows(){return C(function*(e={limit:100,skip:0}){if(!t()._isInitialized){let e=new Wa({errorCode:li.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (get workflows)`}),{error:e}}if(!t()._isConnectedToPlatform){let e=new Wa({errorCode:li.CONNECTION_ISSUE});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue (get workflows)`}),{error:e}}let n=yield t().fetchService.listWorkflows(e);if(n.code!==0){let e=la(n.code,mi),t=n.data.what,r=new $a({errorCode:e}),i=new Wa({errorCode:li.WORKFLOW_ISSUE,message:`No workflow list${z(t)&&`: ${t}`}.`,underlyingBaseError:r});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`No workflow list`}),{error:i}}return{results:n.data.items}}).apply(this,arguments)},prepareWorkflowAndPrepareUi(e){return C(function*(){var n;if(!t()._isInitialized){let e=new Wa({errorCode:li.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (prepare workflow and prepare ui)`}),{error:e}}if(!t()._isConnectedToPlatform){let e=new Wa({errorCode:li.CONNECTION_ISSUE});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue (prepare workflow and prepare ui)`}),{error:e}}if(t().currentScreenConfig){let e=new Wa({errorCode:li.SCENARIO_IN_PROGRESS});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (prepare workflow and prepare ui)`}),{error:e}}let r=t()._sessionIdFromUrl,i=yield t().fetchService.getWorkflow(e,r);if(i.code!==0){let e=i.data.what,t=new $a(j({errorCode:la(i.code,mi)},z(e)&&{message:e})),n=new Wa({errorCode:li.INTERNAL_ISSUE,underlyingBaseError:t});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Workflow issue${z(e)&&`: ${e}`}.`}),{error:n}}let a=Gp.fromPlain(i.data);if(`validationErrorMessage`in a){let e=new $a({errorCode:mi.DECODING_FAILED,message:a.validationErrorMessage}),t=new Wa({errorCode:li.WORKFLOW_ISSUE,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Workflow decoding failed: ${a.validationErrorMessage}`}),{error:t}}let o=t().externalModules,s=a.stepTemplateIds,{isAllTemplatesSupported:c,unsupportedSteps:l}=Ui(o,s);c||B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Warning. Unsupported steps found: ${l}`});let u=Hi(o,s),d=(n=t().workflow)==null?void 0:n.id;d&&e!==d&&o.forEach(e=>{e.component.deinitialize()});let f=t().modulesConfig;return u.forEach(e=>{e.component.isReady()||e.component.initialize(f)}),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully prepare workflow and prepare ui. Workflow id: ${e}`}),t().setWorkflow(a),{workflow:a}})()},startSession({completion:e,locale:n,metadata:r,location:i}){return C(function*(){var a;if(B.clearSession(),!t()._isInitialized){let e=new Ka({errorCode:di.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (start new session)`}),{error:e}}let o=(a=t().workflow)==null?void 0:a.id;if(!o){let e=new Ka({errorCode:di.PREPARED_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Prepared required (start new session)`}),{error:e}}if(t().currentScreenConfig){let e=new Ka({errorCode:di.ALREADY_STARTED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (start new session)`}),{error:e}}t().setWorkflowSessionCompletion(t=>{H&&H.close(),e(t)});let s=t().startConfig,c=z(s.apiKey),l=t().apiKeyAuthTokenCollection;if(c&&`tokenExpiresAt`in l){let e=l.tokenExpiresAt&&typeof l.tokenExpiresAt==`number`?l.tokenExpiresAt:0;if(Date.now()>e){B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`API key TTL expired. Trying to connect by api key`});let e=yield t().connectByApiKey({apiKey:s.apiKey,host:s.host,deviceDescriptor:{ttl:t()._ttl},isSecure:s.isSecure,port:s.port,httpTimeoutMs:s.httpTimeoutMs});if(Wi.removeAuthTokenLs(s.apiKey),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Removed old session from LS because new api token will not work with old session id`}),e.error){let t=new Ya({errorCode:hi.CONNECTION_ISSUE,underlyingBaseError:e.error});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue by api key`}),{error:t}}if(e&&`authToken`in e){let n=Date.now()+t()._ttl*1e3;t().setApiKeyAuthTokenCollection(s.apiKey,e.authToken,n),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully connect by api key`})}}}t().setIsProcessing(!0);let u=yield t().fetchService.getConnectionToken(!1);if(!u||typeof u!=`string`){let e=new Ya({errorCode:hi.TOKEN_ERROR}),t=new Ka({errorCode:di.START_SESSION_FAILED,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Token error`}),{error:t}}B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Successfully get service token`}),t().setServiceSessionToken(u);let d=yield t()._runSocketConnection(u);if(d.error)return{error:d.error};let f=yield t()._continueSession(n);if(`error`in f)return{error:f.error};if(!f.shouldStartNewSession)return{};let p=yield t().waitForStartSession({workflowId:o,locale:n,metadata:r,location:i});return p.error?{error:p.error}:(t().setCurrentSessionDataLsAndStore({isApiKeyConnection:c,sessionId:p.sessionData.id,workflowId:o,locale:p.sessionData.locale}),yield t().setNextStep({workflow:p.sessionData.workflow,properties:p.sessionData.properties,nextStepId:p.sessionData.currentStep,locale:p.sessionData.locale}),t().listener({eventType:ai.MESSAGE,module:`IDV`,logLevel:R.INFO,message:ci.DID_START_SESSION}),{})})()},deinitialize(){return C(function*(){if(!t()._isInitialized)return{error:new Za({errorCode:vi.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return{error:new Za({errorCode:vi.SCENARIO_IN_PROGRESS})};let n=yield t().deinitializationIdv();return t().resetProps(),e({_isInitialized:!1}),n})()},startIamAuth(e){return C(function*(){return t().setStartConfig({httpTimeoutMs:e.httpTimeoutMs}),yield t().fetchService.startIamAuth(e)})()}});function Zp(e,t,n){let r=n.value;n.value=function(){var e=C(function*(e,t){var n,i;let a=((n=t==null?void 0:t.method)==null?`GET`:n).toUpperCase(),o=t==null||(i=t.headers)==null?void 0:i.authorization,s=yield r.call(this,e,t),c=s.status,l={method:a,url:e,statusCode:c,authHeader:o,response:s.statusText};if(c!==200)return B.logSessionEvent({logLevel:R.ERROR,module:`IDV`,message:JSON.stringify(l)},!0),s;let u=yield s.clone().json();return l=j(j({},l),{},{response:u}),B.logSessionEvent({logLevel:R.DEBUG,module:`IDV`,message:JSON.stringify(l)},!0),s});return function(t,n){return e.apply(this,arguments)}}()}var Qp=class{constructor(){this._connectionTokenExpirationBufferMs=6e4,this._httpTimeoutMs=Ei,this._origin=``,this._apiKeyAuthToken={token:``,expiresAt:0},this._connectionToken={token:``,expiresAt:0},this._connect=null,this.abortController=null,this.abortController=null}_setApiKeyAuthToken(e){this._apiKeyAuthToken=e}_setConnectionToken(e){this._connectionToken=e}_getOriginFromConfig(e){return`http${e.isSecure?`s`:``}://${e.host}${e.port?`:${e.port}`:``}`}_getOriginFromUrl(e){try{return new URL(e).origin}catch(e){return``}}_getExpiresAtFromTtl(e){return Date.now()+1e3*e}_getAuthorizationHeaderFromConnectionToken(e){return`Connection ${e}`}_getAuthorizationHeaderFromBasicToken(e){return`Basic ${e}`}_getAuthorizationHeaderFromAuthToken(e){return`Token ${e}`}_getApiKeyAuthTokenFromLs(e){var t,n;let r=Wi.getAuthTokenLs(),i=r==null||(t=r[e])==null?void 0:t.authToken,a=Number((r==null||(n=r[e])==null?void 0:n.tokenExpiresAt)||0);return!i||!a||Number.isNaN(a)||a<=Date.now()?null:{token:i,expiresAt:a}}_getApiKeyAuthTokenFromHeader(e){return e.replace(/^Token\s+/i,``)}_requestEphemeralAuthToken(e,t){var n=this;return C(function*(){let r=yield n._fetchEphemeral(e,t);return r.code===0?{code:0,data:{token:n._getApiKeyAuthTokenFromHeader(r.data.authorization),expiresAt:n._getExpiresAtFromTtl(t)}}:r})()}_getValidApiKeyAuthToken(e,t){var n=this;return C(function*(){if(n._apiKeyAuthToken.token)return t||Date.now()<n._apiKeyAuthToken.expiresAt?{code:0,data:n._apiKeyAuthToken}:n._requestEphemeralAuthToken(e.apiKey,e.deviceDescriptor.ttl);let r=n._getApiKeyAuthTokenFromLs(e.apiKey);return r?{code:0,data:r}:n._requestEphemeralAuthToken(e.apiKey,e.deviceDescriptor.ttl)})()}_getResponseTextFromBadResponse(e){return C(function*(){return yield e.text().catch(()=>``)})()}_applyHttpTimeout(e){this._httpTimeoutMs=e&&Number.isFinite(e)&&e>0?e:Ei}_getRequestSignal(e){let t=AbortSignal.timeout(this._httpTimeoutMs);return e?AbortSignal.any([t,e]):t}_httpFetch(e,t){var n=this;return C(function*(){return fetch(e,j(j({},t),{},{signal:n._getRequestSignal(t==null?void 0:t.signal)}))})()}_fetchAndHandleResponse({method:e,url:t,headers:n,body:r,signal:i,validIf:a}){var o=this;return C(function*(){let s;try{s=yield o._httpFetch(t,{method:e,headers:n,body:r,signal:i})}catch(n){return{code:4,data:{httpCode:0,method:e,url:t,what:ca(n)}}}let c={httpCode:s.status,method:e,url:t};if(!s.ok){let e=yield o._getResponseTextFromBadResponse(s);return e&&(c.what=e),{code:5,data:c}}try{let e=yield s.json();return!e||a&&!a(e)?{code:6,data:c}:{code:0,data:e}}catch(e){return c.what=ca(e),{code:6,data:c}}})()}_fetchPing(){var e=this;return C(function*(){return yield e._fetchAndHandleResponse({method:`GET`,url:`${e._origin}/api/ping`,validIf:e=>e.status===`OK`})})()}_fetchMe(e){var t=this;return C(function*(){return yield t._fetchAndHandleResponse({method:`GET`,url:`${t._origin}/api/user/me`,headers:{authorization:e}})})()}_fetchConnection(e,t){var n=this;return C(function*(){let r=yield n._fetchAndHandleResponse({method:`POST`,url:`${n._origin}/api/device/connection`,headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(j(j({},ia()),t&&{sessionId:t})),validIf:e=>!!(e.token&&e.expiresAt)});return r.code===0?{code:0,data:{token:r.data.token,expiresAt:+new Date(r.data.expiresAt),workflows:r.data.workflows}}:r})()}_fetchEphemeral(e,t){var n=this;return C(function*(){return n._fetchAndHandleResponse({method:`POST`,url:`${n._origin}/api/device/ephemeral`,headers:{authorization:`ApiKey ${e}`,"content-type":`application/json`},body:JSON.stringify({ttl:t}),validIf:e=>!!e.authorization})})()}_fetchSessionState(e,t,n){var r=this;return C(function*(){return r._fetchAndHandleResponse({method:`GET`,url:`${r._origin}/api/sessions/${t}${n?`?locale=${n}`:``}`,headers:{authorization:e,"content-type":`application/json`},validIf:e=>!!e.id})})()}connectByUserPass(e){var t=this;return C(function*(){t._applyHttpTimeout(e.httpTimeoutMs),t._connect={type:`byUserPass`,arg:e},t._origin=t._getOriginFromConfig(e);let n=yield t._fetchPing();if(n.code!==0)return n;let r=`${btoa(`${e.userName}:${e.password}`)}`,i=t._getAuthorizationHeaderFromBasicToken(r),a=yield t._fetchMe(i);if(a.code!==0)return a;let o=yield t._fetchConnection(i);return o.code===0?(t._setConnectionToken(o.data),i=t._getAuthorizationHeaderFromConnectionToken(o.data.token),a=yield t._fetchMe(i),a.code===0?{code:0,data:{workflows:o.data.workflows}}:a):o})()}connectByApiKey(e,t){var n=this;return C(function*(){n._applyHttpTimeout(e.httpTimeoutMs),n._connect={type:`byApiKey`,arg:e},n._origin=n._getOriginFromConfig(e);let r=yield n._fetchPing();if(r.code!==0)return r;let i=yield n._getValidApiKeyAuthToken(e,t);if(i.code!==0)return i;n._setApiKeyAuthToken(i.data);let a=n._getAuthorizationHeaderFromAuthToken(i.data.token),o=yield n._fetchMe(a);if(o.code!==0)return o;let s=yield n._fetchConnection(a);return s.code===0?(n._setConnectionToken(s.data),a=n._getAuthorizationHeaderFromConnectionToken(s.data.token),o=yield n._fetchMe(a),o.code===0?{code:0,data:{authToken:i.data.token,workflows:s.data.workflows}}:o):s})()}connectByUrl(e){var t=this;return C(function*(){t._connect={type:`byUrl`,arg:e},t._origin=t._getOriginFromUrl(e);let n=ea(e),r=ta(e),i=yield t._fetchPing();if(i.code!==0)return i;let a=yield t._fetchMe(r);if(a.code!==0)return a;let o=yield t._fetchConnection(r,n);return o.code===0?(t._setConnectionToken(o.data),r=t._getAuthorizationHeaderFromConnectionToken(o.data.token),a=yield t._fetchMe(r),a.code===0?{code:0,data:{workflows:o.data.workflows}}:a):o})()}getConnectionToken(e){var t=this;return C(function*(){var n,r,i;return+new Date<+new Date(t._connectionToken.expiresAt)-t._connectionTokenExpirationBufferMs?t._connectionToken.token:((n=t._connect)==null?void 0:n.type)===`byUserPass`?(yield t.connectByUserPass(t._connect.arg),t._connectionToken.token):((r=t._connect)==null?void 0:r.type)===`byApiKey`?(yield t.connectByApiKey(t._connect.arg,e),t._connectionToken.token):((i=t._connect)==null?void 0:i.type)===`byUrl`?(yield t.connectByUrl(t._connect.arg),t._connectionToken.token):``})()}startSession({workflowId:e,locale:t,metadata:n,location:r}){var i=this;return C(function*(){let a={locale:t};Yi(n)&&(a.metadata=n),r&&(a.location=r);let o=yield i.getConnectionToken(!1),s=i._getAuthorizationHeaderFromConnectionToken(o);return yield i._fetchAndHandleResponse({method:`POST`,url:`${i._origin}/api/sessions?workflowId=${e}`,headers:{authorization:s,"content-type":`application/json`},body:JSON.stringify(a),validIf:e=>!!e.id})})()}continueSession({sessionId:e,locale:t}){var n=this;return C(function*(){let r=yield n.getConnectionToken(!1),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionState(i,e,t)})()}listWorkflows(){var e=this;return C(function*(t={limit:0,skip:0}){let n=yield e.getConnectionToken(!1),r=e._getAuthorizationHeaderFromConnectionToken(n),i=new URL(`${e._origin}/api/workflows`);return typeof t.limit==`number`&&t.limit>=0&&i.searchParams.set(`limit`,String(t.limit)),typeof t.skip==`number`&&t.skip>=0&&i.searchParams.set(`skip`,String(t.skip)),yield e._fetchAndHandleResponse({method:`GET`,url:i.toString(),headers:{authorization:r}})}).apply(this,arguments)}getWorkflow(e,t,n){var r=this;return C(function*(){let i=yield r.getConnectionToken(!1),a=r._getAuthorizationHeaderFromConnectionToken(i);if(t){let e=yield r._fetchSessionState(a,t,n);return e.code===0?{code:e.code,data:e.data.workflow}:e}return yield r._fetchAndHandleResponse({method:`GET`,url:`${r._origin}/api/workflows/${e}?renderClient=true`,headers:{authorization:a}})})()}pushData({sessionId:e,stepId:t,data:n,type:r}){var i=this;return C(function*(){let a=yield i.getConnectionToken(!0),o=i._getAuthorizationHeaderFromConnectionToken(a),s=new URLSearchParams(j({},r&&{type:r})).toString(),c=`${i._origin}/api/sessions/${e}/step/${t}${s?`?${s}`:``}`;return yield i._fetchAndHandleResponse({method:`POST`,url:c,headers:{authorization:o,"content-type":`application/json`},body:JSON.stringify(n)})})()}getSessionState(e,t){var n=this;return C(function*(){let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionState(i,e,t)})()}pushLogs(e,t){var n=this;return C(function*(){let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchAndHandleResponse({method:`POST`,url:`${n._origin}/api/sessions/${e}/logs`,headers:{authorization:i,"content-type":`application/json`},body:JSON.stringify(t.body)})})()}startIamAuth({applicationId:e,baseUrl:t,metadata:n,locale:r,httpTimeoutMs:i}){var a=this;return C(function*(){a._applyHttpTimeout(i);let o={applicationId:e};return Yi(n)&&(o.metadata=n),r&&(o.locale=r),yield a._fetchAndHandleResponse({method:`POST`,url:`${t}/api/v1/iam/auth/start`,headers:{"content-type":`application/json`},body:JSON.stringify(o)})})()}_startUpload({authorizationHeader:e,body:t}){var n=this;return C(function*(){return n.abortController||(n.abortController=new AbortController),yield n._fetchAndHandleResponse({method:`POST`,url:`${n._origin}/api/v1/files/start-upload`,headers:{"Content-Type":`application/json`,authorization:e},body:JSON.stringify(t),signal:n.abortController.signal})})()}_uploadFileChunk({authorizationHeader:e,uploadId:t,sha256:n,contentRange:r,body:i}){var a=this;return C(function*(){var o;let s=(o=a.abortController)==null?void 0:o.signal,c=`POST`,l=new URL(`${a._origin}/api/v1/files`);l.searchParams.set(`uploadId`,t),l.searchParams.set(`sha256`,n);let u=l.toString(),d={"Content-Type":`application/octet-stream`,"Content-Range":r,authorization:e},f;try{f=yield a._httpFetch(u,{method:c,signal:s,headers:d,body:i})}catch(e){return{code:4,data:{httpCode:0,method:c,url:u,what:ca(e)}}}let p={httpCode:f.status,method:c,url:u};if(f.status===204)return{code:0,data:{}};if(f.status===200)try{let e=yield f.json();return{code:0,data:e==null?{}:e}}catch(e){return p.what=ca(e),{code:6,data:p}}let m=yield a._getResponseTextFromBadResponse(f);return m&&(p.what=m),{code:5,data:p}})()}_uploadFileInChunks({authorizationHeader:e,file:t,chunkSize:n,uploadId:r,onProgress:i}){var a=this;return C(function*(){let o=t.size,s=0,c=``,l=`POST`,u=`${a._origin}/api/v1/files`;try{for(;s<o;){var d;if((d=a.abortController)!=null&&(d=d.signal)!=null&&d.aborted)return{code:4,data:{httpCode:0,method:l,url:u,what:`Aborted`}};let f=Math.min(s+n,o),p=yield t.slice(s,f).arrayBuffer(),m=yield da(p),h=`bytes ${s}-${f-1}/${o}`,g=yield a._uploadFileChunk({authorizationHeader:e,uploadId:r,sha256:m,contentRange:h,body:p});if(g.code!==0)return g;s=f,i(s,o),g.data.tempFileId&&(c=g.data.tempFileId)}return c?{code:0,data:{tempFileId:c}}:{code:5,data:{httpCode:0,method:l,url:u,what:`upload finished without tempFileId`}}}catch(e){return{code:4,data:{httpCode:0,method:l,url:u,what:ca(e)}}}})()}uploadFileToTemp(e,t){var n=this;return C(function*(){try{let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r),a={name:e.name,size:e.size},o=yield n._startUpload({authorizationHeader:i,body:a});if(o.code!==0)return o;let{uploadId:s,chunkSize:c}=o.data;return yield n._uploadFileInChunks({authorizationHeader:i,file:e,chunkSize:c,uploadId:s,onProgress:t})}finally{n.abortController=null}})()}abortRequest(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};$([Zp,Q(`design:type`,Function),Q(`design:paramtypes`,[Object,typeof RequestInit>`u`?Object:RequestInit]),Q(`design:returntype`,Promise)],Qp.prototype,`_httpFetch`,null);var $p,em=3e4,tm=class e{static isImageLike(e){return typeof e.imageURL==`string`||typeof e.imageId==`string`||typeof e.base64==`string`}static collectAssets(e,t){let n=[],r=e=>{if(!e||typeof e!=`object`)return;if(Array.isArray(e)){for(let t of e)r(t);return}let i=e,a=t(i);if(a)n.push(a);else for(let e of Object.values(i))r(e)};return r(e),n}static collectAssetsOfGuiModule(e){return this.collectAssets(e,e=>e.prepareRequired&&this.isImageLike(e)?e:null)}static collectAssetsOfExternalModule(e){return this.collectAssets(e,e=>{let t=e.idvAsset;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t;if(this.isImageLike(e))return e}return null})}static checkImage(e,t){var n=this;return C(function*(){if(!t||e.prepareRequired){if(e.base64){if(yield n.checkImageBySrc(e.base64,e.timeout))return;if(n.failedAssets.base64.add(e.base64),e.failurePolicy===`error`){n.failedAssets.blockingAssets.add(`base64 string`);return}}if(!e.imageId){if(e.imageURL){if(yield n.checkImageBySrc(e.imageURL,e.timeout))return;if(n.failedAssets.imageURL.add(e.imageURL),e.failurePolicy===`error`){n.failedAssets.blockingAssets.add(e.imageURL);return}}if(e.failurePolicy===`placeholderImage`){let r=e.placeholderImage;r&&(yield n.checkImage(r,t))}}}})()}static checkImageBySrc(t,n){return C(function*(){return new Promise(r=>{let i=null,a=null,o=!1,s=n?n*1e3:em,c=e=>{o||(o=!0,l(),r(e))},l=()=>{a!==null&&(clearTimeout(a),a=null),i&&(i.onload=null,i.onerror=null,i=null)};try{if(t.length===0)return c(!1);a=setTimeout(()=>c(!1),s),i=new Image,i.onload=C(function*(){if(!(i!=null&&i.decode))return c(!0);try{yield i.decode()}catch(e){}e.decodedImages.set(t,i),c(!0)}),i.onerror=()=>c(!1),i.src=t}catch(e){c(!1)}})})()}static warmupModuleImages(t,n){var r=this;return C(function*(){if(!t)return r.failedAssets;let i;n?i=e.collectAssetsOfGuiModule(t):(t.preloadAssetsRequired!==!0&&(i=[]),i=e.collectAssetsOfExternalModule(t));let a=i.map(t=>e.checkImage(t,n));return yield Promise.allSettled(a),r.failedAssets})()}static clearFailedAssets(){this.decodedImages.clear(),this.failedAssets={imageURL:new Set,base64:new Set,blockingAssets:new Set}}};$p=tm,$p.decodedImages=new Map,$p.failedAssets={imageURL:new Set,base64:new Set,blockingAssets:new Set};var nm=(e,t)=>({fetchService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitFetchService:function(){var t=C(function*(){e({fetchService:new Qp})});return function(){return t.apply(this,arguments)}}(),setFinalWaitingUi:t=>{e({isFinalWaitingUi:t})},connectByApiKey(e){return C(function*(){let n=yield t().fetchService.connectByApiKey(e,!1);if(n.code!==0){let e=la(n.code,yi),t=n.data.what,r=new qa(j({errorCode:e},z(t)&&{message:t}));return{error:new Ua({errorCode:pi.CONNECTION_ISSUE,underlyingBaseError:r})}}return n.data})()},connectByUserPass(e){return C(function*(){let n=yield t().fetchService.connectByUserPass(e);if(n.code!==0){let e=la(n.code,yi),t=n.data.what;return{error:new qa(j({errorCode:e},z(t)&&{message:t}))}}return{workflows:n.data.workflows}})()},connectByUrl(e){return C(function*(){let n=yield t().fetchService.connectByUrl(e);if(n.code!==0){let e=la(n.code,yi),t=n.data.what,r=new qa(j({errorCode:e},z(t)&&{message:t}));return{workflows:[],error:new Ua({errorCode:pi.CONNECTION_ISSUE,underlyingBaseError:r})}}return{workflows:n.data.workflows}})()},workflowSessionCompletion:()=>{},setWorkflowSessionCompletion:n=>{let r=e=>{var r;let i=(r=t().currentSessionData)==null?void 0:r.sessionId,a=j({results:j(j({},e.results),{},{sessionId:i})},e.error&&{error:e.error});if(t().removeCurrentSessionDataLsAndStore(),n(a),e.error){let n=JSON.stringify(e.error);t().fetchService.pushLogs(i,{body:{log:n,errorCode:e.error.shortChain,deviceInfo:{platform:`Web`}}})}};e(()=>({workflowSessionCompletion:r}))},loadModules:function(){var n=C(function*(n){try{let t=yield rm(n);return e(()=>({externalModules:t})),{}}catch(e){return t().resetFetchService(),t().resetProps(),{error:new Ha({errorCode:fi.MODULES_INSTANTIATION_FAILURE})}}});return function(e){return n.apply(this,arguments)}}(),setIsProcessing:t=>{e({isProcessing:t})},getProcessingTemplate:()=>{var e;let n=t().workflow;if(!n)return null;let r=n.client.steps,i=Ni((e=r.find(e=>e.templateId===`GENERIC_PROGRESS`))==null?r.find(e=>e.templateId===Si):e);if(!i)return null;let a=n.client.layout,o=Pi(i.templateLayout,a);return o&&(i.templateLayout=o),i},_pushStep:function(){var e=C(function*(e,n,r){let i=null;return yield Li(function(){var a=C(function*(){var a;let o=(a=t().currentSessionData)==null?void 0:a.sessionId,s=yield t().fetchService.pushData({sessionId:o,stepId:e,data:n,type:r}),c=null;if(s.code===4&&(c=gi.HTTP_ISSUE),s.code!==0&&s.code!==4&&(c=gi.PROVIDER_ERROR),c!==null){let e=new Ja({errorCode:gi.HTTP_ISSUE});i=new Ka({errorCode:di.INTERNAL_ISSUE,message:`Error from external module`,underlyingBaseError:e})}return s.code===0?(i=null,s):null});return function(){return a.apply(this,arguments)}}(),()=>null),i?{error:i}:{}});return function(t,n,r){return e.apply(this,arguments)}}(),_findStepById:e=>{let n=t().workflow;if(!n||!e)return null;let r=n.steps.find(t=>t.id===e);return r==null?null:r},_getSessionStateNextStepConditionResult:function(){var e=C(function*(){let e=t().currentSessionData,n=e==null?void 0:e.sessionId,r=e==null?void 0:e.locale,i=yield t().fetchService.getSessionState(n,r),a=i.code;if(a!==0){let e=la(a,gi),t=i.data.what;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Get session: Failed to get session (from HTTP Get)${z(t)&&`: ${t}`}.`});let n=new Ja(j({errorCode:e},z(t)&&{message:t}));return{error:new Ka({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:n}),shouldRetry:!0}}B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Get session: Session data successfully received (from HTTP Get).`});let o=t()._validateSession(i.data);if(`validationErrorMessage`in o){let e=new Ja({errorCode:gi.DECODING_FAILED});return{error:new Ka({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:e}),shouldRetry:!0}}let s=o.currentStep,c=o.workflow.steps.find(e=>e.id===s),l=o.isProcessingFiles,u=Bi(c),d=null;if(u&&(d=gi.NOT_DATA_TYPE),l&&(d=gi.IS_PROCESSING),d!==null){(u||l)&&B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Get session: Session is still in processing state (from HTTP Get).`});let e=new Ja({errorCode:d});return{error:new Ka({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:e}),shouldRetry:!0}}return o});return function(){return e.apply(this,arguments)}}(),waitForStartSession(e){return C(function*(){let n,r;if(yield new Promise(i=>{let a=!1,o=()=>{a||(a=!0,H.clearSubscriptions(),i())},s=function(){var i=C(function*(){let i=yield t().fetchService.startSession(e);if(!a){if(i.code!==0){let e=i.data.what;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Start session failed (from HTTP Post)${z(e)&&`: ${e}`}.`});let t=new Ya(j({errorCode:la(i.code,hi)},z(e)&&{message:e}));r=new Ka({errorCode:di.START_SESSION_FAILED,underlyingBaseError:t}),o()}else B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Start session: session data successfully received (from HTTP Post).`}),n=i.data,o()}});return function(){return i.apply(this,arguments)}}();H.clearSubscriptions(),H.onMessage(e=>{var i,s;if(a)return;let c=t()._decodeMessageFromWebSocket(e);if(c&&(c==null?void 0:c.eventType)===`SESSION_STARTED`){if(c.error){let e=c.error.message;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Start session failed (from WebSocket)${z(e)&&`: ${e}`}.`});let t=new Xa(j({errorCode:ua(c.error.code)},z(e)&&{message:e})),n=new Ya({errorCode:hi.PROVIDER_ERROR,underlyingBaseError:t});r=new Ka({errorCode:di.START_SESSION_FAILED,underlyingBaseError:n}),o()}else(i=c.options)!=null&&i.session&&(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Start session: session data successfully received (from WebSocket).`}),n=(s=c.options)==null?void 0:s.session,o())}}),s()}),r)return{error:r};let i=t()._validateSession(n);if(`validationErrorMessage`in i){let e=new Ya({errorCode:hi.DECODING_FAILED,message:i.validationErrorMessage});return{error:new Ka({errorCode:di.START_SESSION_FAILED,underlyingBaseError:e})}}return{sessionData:i}})()},waitForContinueSession({sessionId:e,locale:n}){return C(function*(){let r,i;if(yield new Promise(a=>{let o=!1,s=()=>{o||(o=!0,H.clearSubscriptions(),a())},c=function(){var a=C(function*(){let a=yield t().fetchService.continueSession({sessionId:e,locale:n});if(!o){if(a.code!==0){let e=a.data.what;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Continue session failed (from HTTP Get)${z(e)&&`: ${e}`}.`});let t=new Ya(j({errorCode:la(a.code,hi)},z(e)&&{message:e}));i=new Ka({errorCode:di.START_SESSION_FAILED,underlyingBaseError:t}),s()}else B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session: session data successfully received (from HTTP Get).`}),r=a.data,s()}});return function(){return a.apply(this,arguments)}}();H.clearSubscriptions(),H.onMessage(e=>{var n,a;if(o)return;let c=t()._decodeMessageFromWebSocket(e);if(c&&[`SESSION_STATE`,`SESSION_UPDATED`].includes(c==null?void 0:c.eventType)){if(c.error){let e=c.error.message;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Continue session failed (from WebSocket)${z(e)&&`: ${e}`}.`});let t=new Xa(j({errorCode:ua(c.error.code)},z(e)&&{message:e})),n=new Ya({errorCode:hi.PROVIDER_ERROR,underlyingBaseError:t});i=new Ka({errorCode:di.START_SESSION_FAILED,underlyingBaseError:n}),s()}else(n=c.options)!=null&&n.session&&(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session: session data successfully received (from WebSocket).`}),r=(a=c.options)==null?void 0:a.session,s())}}),H.onReconnect(()=>{H.sendSessionGetMessage({sessionId:e,locale:n})}),H.sendSessionGetMessage({sessionId:e,locale:n}),c()}),i)return{error:i};let a=t()._validateSession(r);if(`validationErrorMessage`in a){let e=new Ya({errorCode:hi.DECODING_FAILED,message:a.validationErrorMessage});return{error:new Ka({errorCode:di.START_SESSION_FAILED,underlyingBaseError:e})}}return{sessionData:a}})()},_waitForNextStep:()=>{var e;let n,r,i=!1,a=()=>{},o=()=>{},s=((e=t().workflow)==null||(e=e.client)==null?void 0:e.sessionUpdateTimeout)||60;return new Promise(e=>{let c=1e4,l=Math.round(s*1e3/c),u=0,d,f=!1,p=!1,m=()=>{f||(f=!0,clearTimeout(d),H.clearSubscriptions(),e())};a=()=>{f||p||(p=!0,h({isDeferred:!0}))},o=()=>{f||(i=!0,m())};let h=function(){var e=C(function*({isDeferred:e}){if(f)return;if(e){d=window.setTimeout(()=>{B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: no WebSocket message received, falling back to HTTP Get.`}),h({isDeferred:!1})},c);return}B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: HTTP Get attempt ${u+1}/${l}.`});let i=yield t()._getSessionStateNextStepConditionResult();if(!f){if(u++,`shouldRetry`in i&&u<l){let e=`Wait for next step: retryable error (attempt ${u}/${l}), waiting for next HTTP Get.`;B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:e}),d=window.setTimeout(()=>{h({isDeferred:!1})},c)}else Yp.isSessionModel(i)?n=i:i.error&&(B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Wait for next step: failed to get next step after ${u}/${l} HTTP Get attempts.`}),r=i.error),m()}});return function(t){return e.apply(this,arguments)}}();H.clearSubscriptions(),H.onMessage(e=>{var i;if(f)return;let a=t()._decodeMessageFromWebSocket(e);if(!a||![`SESSION_UPDATED`,`SESSION_STATE`].includes(a==null?void 0:a.eventType))return;if(a.error){let e=a.error.message;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Wait for next step failed (from WebSocket)${z(e)&&`: ${e}`}.`});let t=new Xa(j({errorCode:ua(a.error.code)},z(e)&&{message:e})),n=new Ja({errorCode:gi.PROVIDER_ERROR,underlyingBaseError:t});r=new Ka({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:n}),m();return}let o=(i=a.options)==null?void 0:i.session;if(!o){h({isDeferred:!1});return}let s=t()._validateSession(o);`validationErrorMessage`in s?(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: invalid session from WebSocket, falling back to HTTP Get.`}),clearTimeout(d),h({isDeferred:!1})):Vi(s)||(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: session data successfully received (from WebSocket).`}),n=s,m())}),H.onReconnect(()=>{var e,n;B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: WebSocket reconnected, requesting session via WebSocket.`});let r=(e=t().currentSessionData)==null?void 0:e.sessionId,i=(n=t().currentSessionData)==null?void 0:n.locale;H.sendSessionGetMessage({sessionId:r,locale:i})})}).then(C(function*(){if(!i){if(r)t().workflowSessionCompletion({error:r}),t().resetSession();else if(n){let{workflow:e,properties:r,currentStep:i,locale:a}=n;yield t().setNextStep({workflow:e,properties:r,nextStepId:i,locale:a})}}})),{startHttpTimer:a,cancel:o}},_setFinalStepAndStopProcess:e=>{let n=e||t().currentStepId;if(!n)return;let r=t()._findStepById(n);r&&(t().workflowSessionCompletion({results:{finalStep:{id:r.id,name:r.name,final:r.releaseClientApp}}}),t().resetSession(),t().listener({eventType:ai.MESSAGE,logLevel:R.INFO,message:ci.DID_END_SESSION,module:`IDV`}))},_setIamAuthCodeAndStopProcess:e=>{var n,r;let i=e=>{if(!Xi(e))return null;let{message:t,code:n}=e;return typeof t==`string`&&t.toLowerCase()!==`none`?t:typeof n==`string`&&n.toLowerCase()!==`none`?n:null},a=(n=e.dataSource)==null?void 0:n.code,o=i((r=e.dataSource)==null?void 0:r.error);t().workflowSessionCompletion({results:{iamAuthCode:{code:a,error:o}}}),t().resetSession(),t().listener({eventType:ai.MESSAGE,logLevel:R.INFO,message:ci.DID_END_SESSION,module:`IDV`})},_redirectUsingFormSubmit:(e,t)=>{let n=document.createElement(`form`);n.method=`POST`,n.action=e,n.hidden=!0;let r=document.createElement(`input`);r.type=`hidden`,r.name=`authorization`,r.value=`Connection ${t}`,n.append(r),document.body.append(n),n.submit()},_redirectAndStopProcess:function(){var e=C(function*(e){var n,r;t().setIsProcessing(!0),t()._stepSocketListenerWhenStepIsRunning(!1);let i=(n=e.dataSource)==null?void 0:n.url,a=yield(r=t().fetchService)==null?void 0:r.getConnectionToken(!0);if(!Ea(i)||!a){let e=[];i?Ea(i)||e.push(`redirect URL is invalid`):e.push(`redirect URL is missing`),a||e.push(`authorization token is missing`);let n=new Ka({errorCode:di.INTERNAL_ISSUE,message:`Redirect failed: ${e.join(`, `)}`});t().workflowSessionCompletion({error:n}),t().resetSession()}else t()._setFinalStepAndStopProcess(e.id),t()._redirectUsingFormSubmit(i,a)});return function(t){return e.apply(this,arguments)}}(),_stepSocketListenerWhenStepIsRunning:e=>{if(!e){H.clearSubscriptions();return}let n=e=>e===t().currentStepId,r=function(){var e=C(function*(){let e={},r=0;for(;r<5&&(r>0&&(yield Ta(1e3*r)),r++,e=yield t()._getSessionStateNextStepConditionResult(),`shouldRetry`in e&&e.shouldRetry););if(`error`in e&&e.error)H.clearSubscriptions(),t().workflowSessionCompletion({error:e.error}),t().resetSession();else if(Yp.isSessionModel(e)&&!n(e.currentStep)){H.clearSubscriptions();let{workflow:n,properties:r,currentStep:i,locale:a}=e;yield t().setNextStep({workflow:n,properties:r,nextStepId:i,locale:a})}});return function(){return e.apply(this,arguments)}}(),i=function(){var e=C(function*(e){var i;let a=t()._decodeMessageFromWebSocket(e);if(!a)return;let{eventType:o}=a;if(![`SESSION_UPDATED`,`DEVICE_TRANSFERRED`].includes(o))return;if(a.error){let e=a.error.message;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Error (from WebSocket)${z(e)&&`: ${e}`}.`});let n=new Xa(j({errorCode:ua(a.error.code)},z(e)&&{message:e})),r=new Ja({errorCode:gi.PROVIDER_ERROR,underlyingBaseError:n}),i=new Ka({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:r});H.clearSubscriptions(),t().workflowSessionCompletion({error:i}),t().resetSession();return}H.clearSubscriptions();let s=(i=a.options)==null?void 0:i.session;if(s){let e=t()._validateSession(s);if(!(`validationErrorMessage`in e)&&!Vi(e)&&!n(e.currentStep)){let{workflow:n,properties:r,currentStep:i,locale:a}=e;yield t().setNextStep({workflow:n,properties:r,nextStepId:i,locale:a});return}}yield r()});return function(t){return e.apply(this,arguments)}}(),a=function(){var e=C(function*(){yield r()});return function(){return e.apply(this,arguments)}}();H.clearSubscriptions(),H.onMessage(i),H.onReconnect(a)},setNextStep:function(){var e=C(function*({workflow:e,properties:n,nextStepId:r,locale:i}){t().setWorkflow(e),t().setSessionProperties(n),i&&t().setLocale(i),t().setCurrentStepId(r),B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Attempting to set next step: ${r}`});let a=e.steps.find(e=>e.id===r);if(Bi(a)){B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Step type is PROCESSING, stepId: ${r}, waiting for next step...`}),t()._waitForNextStep().startHttpTimer();return}let o=e=>!!e&&Object.prototype.toString.call(e)===`[object Object]`&&e.templateId;a!=null&&a.releaseClientApp&&(a==null?void 0:a.type)===si.IAM_AUTH_CODE?t()._setIamAuthCodeAndStopProcess(a):a!=null&&a.releaseClientApp&&(a==null?void 0:a.type)===si.REDIRECT?yield t()._redirectAndStopProcess(a):a!=null&&a.releaseClientApp&&!o(a.client)?t()._setFinalStepAndStopProcess(a.id):(a!=null&&a.releaseClientApp&&o(a.client)&&t().setFinalWaitingUi(!0),yield t()._prepareScreenConfigAndShowStep(r),t().setIsProcessing(!1),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Next step successfully set: ${r}`}),t()._stepSocketListenerWhenStepIsRunning(!0))});return function(t){return e.apply(this,arguments)}}(),pushStepWaitNextStepAndSet:function(){var e=C(function*(e,n){var r;t()._stepSocketListenerWhenStepIsRunning(!1);let i=t().currentStepId;if(!i)return;if(t().setIsProcessing(!0),((r=t().workflow)==null||(r=r.logging)==null?void 0:r.level)===oi.INFO){var a;let e=B.cutCurrentStepLogs(i),n=(a=t().currentSessionData)==null?void 0:a.sessionId;t().fetchService.pushLogs(n,{body:{step:i,log:e,deviceInfo:{platform:`Web`}}}).catch(()=>{})}if(t().isFinalWaitingUi){t()._setFinalStepAndStopProcess();return}if(e.errorEnumName){let n=e,r=new Ka({errorCode:di.MODULES_ISSUE,message:`Error from external module`,underlyingBaseError:n});t().workflowSessionCompletion({error:r}),t().resetSession();return}let o=t()._waitForNextStep(),s=yield t()._pushStep(i,e,n);s.error?(o.cancel(),t().workflowSessionCompletion({error:s.error}),t().resetSession()):o.startHttpTimer()});return function(t,n){return e.apply(this,arguments)}}(),_prepareScreenConfigAndShowStep:function(){var n=C(function*(n){var r,i,a,o;if(!n)return e(()=>({currentScreenConfig:null}));let s=t().workflow;if(!s)return e(()=>({currentScreenConfig:null}));let c=t().sessionProperties,l=null,u=t()._findStepById(n);if(typeof(u==null||(r=u.client)==null?void 0:r.templateId)==`string`){var d;l=j(j({},u.client),{},{templateId:u.client.templateId,dataSource:(d=u.dataSource)==null?null:d,properties:c,stepType:u.type,locale:t().locale})}if(l){var f;l.sessionId=(f=t().currentSessionData)==null?void 0:f.sessionId,l.serviceToken=t().serviceToken}if(l&&Xi(u==null||(i=u.client)==null?void 0:i.templateLayout)){let e=s.client.layout,t=Pi(u.client.templateLayout,e);t&&(l.templateLayout=t)}let p=zi(t().externalModules,s.steps,n);if(l===null||!p){let n=new Ka({errorCode:di.UNKNOWN_STEP,message:`Unsupported step template`});t().workflowSessionCompletion({error:n}),e(()=>({currentScreenConfig:null})),t().resetSession();return}tm.clearFailedAssets(),l=Ca(l);let m=t().externalModules.find(e=>e.id===`idv-gui`),h=!!(m!=null&&(a=m.supportedTemplates)!=null&&a.includes(l.templateId)),g=yield tm.warmupModuleImages(l,h);if(h){let e=t().fetchService;l=j(j({},l),{},{uploadFileToTemp:e==null?void 0:e.uploadFileToTemp.bind(e),abortRequest:e==null?void 0:e.abortRequest.bind(e)})}l=j(j({},l),{},{failedAssets:g});let _=(o=t().currentScreenConfig)==null?void 0:o.templateId;if(typeof _==`string`){let e=t().externalModules.find(e=>e.supportedTemplates.includes(_));try{var v;typeof(e==null||(v=e.component)==null?void 0:v.cancel)==`function`&&e.component.cancel()}catch(t){var y,b;B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Failed to cancel previous module (${(y=e==null||(b=e.component)==null?void 0:b.displayName)==null?`unknown`:y}): ${ca(t)}`})}}e(()=>({currentScreenConfig:l}))});return function(e){return n.apply(this,arguments)}}(),deinitializationIdv:function(){var e=C(function*(){return H.close(),t().resetFetchService(),t().externalModules.forEach(e=>{e.component.deinitialize&&e.component.isReady&&e.component.deinitialize()}),{}});return function(){return e.apply(this,arguments)}}(),resetSession:()=>e(()=>({isFinalWaitingUi:!1,isProcessing:!1,currentStepId:null,currentScreenConfig:null,workflow:null,serviceToken:void 0})),resetFetchService:()=>e(()=>({fetchService:null})),_decodeMessageFromWebSocket:e=>{try{return JSON.parse(atob(JSON.parse(e).payload))}catch(e){return B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Failed to decode message from WebSocket: ${ca(e)}`}),null}},_validateSession:e=>{let t=Yp.fromPlain(e);return`validationErrorMessage`in t?B.logSessionEvent({logLevel:R.DEBUG,module:`IDV`,message:`Session data validation failed: ${JSON.stringify(t.validationErrorMessage)}`}):B.logSessionEvent({logLevel:R.DEBUG,module:`IDV`,message:`Session data validated successfully.`}),t}});function rm(e){return im.apply(this,arguments)}function im(){return im=C(function*(e){let t=[];for(let n of e)n&&t.push({id:n.getIdentifier(),supportedTemplates:n.getSupportedTemplates(),component:n});return t.filter(e=>e!==null)}),im.apply(this,arguments)}var am=Gr((...e)=>j(j(j({},ya(...e)),Xp(...e)),nm(...e))),om=e=>/^[a-z][a-z0-9]*-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)&&e.length<=100,sm=(e,t)=>{if(!om(e))throw Error(`Invalid component name: ${e}`);let n=document.createElement(e);return n.style.width=`100%`,n.style.height=`100%`,n.setProps(t),n},cm=class{constructor(e){this.isPortrait=!1,this.isLandscape=!1,this.orientation=`portrait`,this._handleOrientationChange=()=>{let e=this._getOrientation();this.orientation!==e&&(this.orientation=e,this.isPortrait=this.orientation===`portrait`,this.isLandscape=this.orientation===`landscape`,this.host.requestUpdate())},(this.host=e).addController(this)}_getOrientation(){return window.matchMedia(`(orientation: landscape)`).matches?`landscape`:`portrait`}hostConnected(){typeof window<`u`&&(this._handleOrientationChange(),window.addEventListener(`load`,this._handleOrientationChange),window.addEventListener(`resize`,this._handleOrientationChange))}hostDisconnected(){typeof window<`u`&&(window.removeEventListener(`load`,this._handleOrientationChange),window.removeEventListener(`resize`,this._handleOrientationChange))}},lm=c(((e,t)=>{t.exports=(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(e,t,n){"use strict";e.exports={BROWSER_TYPES:{CHROME:`Chrome`,FIREFOX:`Firefox`,OPERA:`Opera`,YANDEX:`Yandex`,SAFARI:`Safari`,INTERNET_EXPLORER:`Internet Explorer`,EDGE:`Edge`,CHROMIUM:`Chromium`,IE:`IE`,MOBILE_SAFARI:`Mobile Safari`,EDGE_CHROMIUM:`Edge Chromium`},DEVICE_TYPES:{MOBILE:`mobile`,TABLET:`tablet`,SMART_TV:`smarttv`,CONSOLE:`console`,WEARABLE:`wearable`,BROWSER:void 0},OS_TYPES:{IOS:`iOS`,ANDROID:`Android`,WINDOWS_PHONE:`Windows Phone`,WINDOWS:`Windows`,MAC_OS:`Mac OS`},defaultData:{isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1}}}),(function(e,t,n){"use strict";var r=n(2),i=n(0),a=i.BROWSER_TYPES,o=i.OS_TYPES,s=i.DEVICE_TYPES,c=n(4),l=c.checkType,u=c.broPayload,d=c.mobilePayload,f=c.wearPayload,p=c.consolePayload,m=c.stvPayload,h=c.getNavigatorInstance,g=c.isIOS13Check,_=new r,v=_.getBrowser(),y=_.getDevice(),b=_.getEngine(),x=_.getOS(),S=_.getUA(),C=a.CHROME,w=a.CHROMIUM,T=a.IE,ee=a.INTERNET_EXPLORER,E=a.OPERA,te=a.FIREFOX,ne=a.SAFARI,re=a.EDGE,D=a.YANDEX,O=a.MOBILE_SAFARI,ie=s.MOBILE,ae=s.TABLET,oe=s.SMART_TV,se=s.BROWSER,k=s.WEARABLE,ce=s.CONSOLE,le=o.ANDROID,ue=o.WINDOWS_PHONE,de=o.IOS,fe=o.WINDOWS,pe=o.MAC_OS,me=function(){return y.type===ie},he=function(){return y.type===ae},ge=function(){switch(y.type){case ie:case ae:return!0;default:return!1}},_e=function(){return x.name===o.WINDOWS&&x.version===`10`&&typeof S==`string`&&S.indexOf(`Edg/`)!==-1},ve=function(){return y.type===oe},ye=function(){return y.type===se},be=function(){return y.type===k},xe=function(){return y.type===ce},Se=function(){return x.name===le},Ce=function(){return x.name===fe},we=function(){return x.name===pe},Te=function(){return x.name===ue},Ee=function(){return x.name===de},De=function(){return v.name===C},Oe=function(){return v.name===te},ke=function(){return v.name===w},Ae=function(){return v.name===re},je=function(){return v.name===D},Me=function(){return v.name===ne||v.name===O},Ne=function(){return v.name===O},Pe=function(){return v.name===E},A=function(){return v.name===ee||v.name===T},Fe=function(){var e=h(),t=e&&e.userAgent.toLowerCase();return typeof t==`string`&&/electron/.test(t)},Ie=function(){var e=h();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform===`MacIntel`&&e.maxTouchPoints>1)&&!window.MSStream},Le=function(){return g(`iPad`)},Re=function(){return g(`iPhone`)},ze=function(){return g(`iPod`)},Be=function(){return v.major},Ve=function(){return v.version},He=function(){return x.version?x.version:`none`},Ue=function(){return x.name?x.name:`none`},We=function(){return v.name},Ge=function(){return y.vendor?y.vendor:`none`},Ke=function(){return y.model?y.model:`none`},qe=function(){return b.name},Je=function(){return b.version},Ye=function(){return S},Xe=function(){return y.type},Ze=ve(),Qe=xe(),$e=be(),et=Ne()||Le(),tt=ke(),nt=ge()||Le(),rt=me(),it=he()||Le(),at=ye(),ot=Se(),st=Te(),ct=Ee()||Le(),j=De(),lt=Oe(),ut=Me(),dt=Pe(),ft=A(),pt=He(),mt=Ue(),ht=Be(),gt=Ve(),_t=We(),vt=Ge(),yt=Ke(),bt=qe(),xt=Je(),St=Ye(),Ct=Ae()||_e(),wt=je(),Tt=Xe(),Et=Ie(),Dt=Le(),Ot=Re(),kt=ze(),At=Fe(),jt=_e(),Mt=Ae(),Nt=Ce(),Pt=we(),Ft=l(y.type);function It(){var e=Ft.isBrowser,t=Ft.isMobile,n=Ft.isTablet,r=Ft.isSmartTV,i=Ft.isConsole,a=Ft.isWearable;if(e)return u(e,v,b,x,S);if(r)return m(r,b,x,S);if(i)return p(i,b,x,S);if(t||n)return d(Ft,y,x,S);if(a)return f(a,b,x,S)}e.exports={deviceDetect:It,isSmartTV:Ze,isConsole:Qe,isWearable:$e,isMobileSafari:et,isChromium:tt,isMobile:nt,isMobileOnly:rt,isTablet:it,isBrowser:at,isAndroid:ot,isWinPhone:st,isIOS:ct,isChrome:j,isFirefox:lt,isSafari:ut,isOpera:dt,isIE:ft,osVersion:pt,osName:mt,fullBrowserVersion:ht,browserVersion:gt,browserName:_t,mobileVendor:vt,mobileModel:yt,engineName:bt,engineVersion:xt,getUA:St,isEdge:Ct,isYandex:wt,deviceType:Tt,isIOS13:Et,isIPad13:Dt,isIPhone13:Ot,isIPod13:kt,isElectron:At,isEdgeChromium:jt,isLegacyEdge:Mt,isWindows:Nt,isMacOs:Pt}}),(function(e,t,n){var r;(function(i,a){"use strict";var o=`0.7.18`,s=`function`,c=`undefined`,l=`object`,u=`major`,d=`model`,f=`name`,p=`type`,m=`vendor`,h=`version`,g=`architecture`,_=`console`,v=`mobile`,y=`tablet`,b=`smarttv`,x=`wearable`,S=`embedded`,C={extend:function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n},has:function(e,t){return typeof e==`string`&&t.toLowerCase().indexOf(e.toLowerCase())!==-1},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e==`string`?e.replace(/[^\d\.]/g,``).split(`.`)[0]:a},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}},w={rgx:function(e,t){for(var n=0,r,i,o,c,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(r=i=0;r<f.length&&!u;)if(u=f[r++].exec(e),u)for(o=0;o<p.length;o++)d=u[++i],c=p[o],typeof c==l&&c.length>0?c.length==2?typeof c[1]==s?this[c[0]]=c[1].call(this,d):this[c[0]]=c[1]:c.length==3?typeof c[1]===s&&!(c[1].exec&&c[1].test)?this[c[0]]=d?c[1].call(this,d,c[2]):a:this[c[0]]=d?d.replace(c[1],c[2]):a:c.length==4&&(this[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):a):this[c]=d||a;n+=2}},str:function(e,t){for(var n in t)if(typeof t[n]==l&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(C.has(t[n][r],e))return n===`?`?a:n}else if(C.has(t[n],e))return n===`?`?a:n;return e}},T={browser:{oldsafari:{version:{"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`}}},device:{amazon:{model:{"Fire Phone":[`SD`,`KF`]}},sprint:{model:{"Evo Shift 4G":`7373KT`},vendor:{HTC:`APA`,Sprint:`Sprint`}}},os:{windows:{version:{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`}}}},ee={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[f,h],[/(opios)[\/\s]+([\w\.]+)/i],[[f,`Opera Mini`],h],[/\s(opr)\/([\w\.]+)/i],[[f,`Opera`],h],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\/([\w\.-]+)/i],[f,h],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[f,`IE`],h],[/(edge|edgios|edgea)\/((\d+)?[\w\.]+)/i],[[f,`Edge`],h],[/(yabrowser)\/([\w\.]+)/i],[[f,`Yandex`],h],[/(puffin)\/([\w\.]+)/i],[[f,`Puffin`],h],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[f,`UCBrowser`],h],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g,` `],h],[/(micromessenger)\/([\w\.]+)/i],[[f,`WeChat`],h],[/(qqbrowserlite)\/([\w\.]+)/i],[f,h],[/(QQ)\/([\d\.]+)/i],[f,h],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[f,h],[/(BIDUBrowser)[\/\s]?([\w\.]+)/i],[f,h],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[f,h],[/(MetaSr)[\/\s]?([\w\.]+)/i],[f],[/(LBBROWSER)/i],[f],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[h,[f,`MIUI Browser`]],[/;fbav\/([\w\.]+);/i],[h,[f,`Facebook`]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[h,[f,`Chrome Headless`]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[f,/(.+)/,`$1 WebView`],h],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[f,/(.+(?:g|us))(.+)/,`$1 $2`],h],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[h,[f,`Android Browser`]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[f,h],[/(dolfin)\/([\w\.]+)/i],[[f,`Dolphin`],h],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[f,`Chrome`],h],[/(coast)\/([\w\.]+)/i],[[f,`Opera Coast`],h],[/fxios\/([\w\.-]+)/i],[h,[f,`Firefox`]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[h,[f,`Mobile Safari`]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[h,f],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[f,`GSA`],h],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[f,[h,w.str,T.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[f,h],[/(navigator|netscape)\/([\w\.-]+)/i],[[f,`Netscape`],h],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[f,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[g,`amd64`]],[/(ia32(?=;))/i],[[g,C.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[g,`ia32`]],[/windows\s(ce|mobile);\sppc;/i],[[g,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[g,/ower/,``,C.lowerize]],[/(sun4\w)[;\)]/i],[[g,`sparc`]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[g,C.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[d,m,[p,y]],[/applecoremedia\/[\w\.]+ \((ipad)/],[d,[m,`Apple`],[p,y]],[/(apple\s{0,1}tv)/i],[[d,`Apple TV`],[m,`Apple`]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[m,d,[p,y]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[d,[m,`Amazon`],[p,y]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[d,w.str,T.device.amazon.model],[m,`Amazon`],[p,v]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[d,m,[p,v]],[/\((ip[honed|\s\w*]+);/i],[d,[m,`Apple`],[p,v]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[m,d,[p,v]],[/\(bb10;\s(\w+)/i],[d,[m,`BlackBerry`],[p,v]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[d,[m,`Asus`],[p,y]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[m,`Sony`],[d,`Xperia Tablet`],[p,y]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[d,[m,`Sony`],[p,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[m,d,[p,_]],[/android.+;\s(shield)\sbuild/i],[d,[m,`Nvidia`],[p,_]],[/(playstation\s[34portablevi]+)/i],[d,[m,`Sony`],[p,_]],[/(sprint\s(\w+))/i],[[m,w.str,T.device.sprint.vendor],[d,w.str,T.device.sprint.model],[p,v]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[m,d,[p,y]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[m,[d,/_/g,` `],[p,v]],[/(nexus\s9)/i],[d,[m,`HTC`],[p,y]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[d,[m,`Huawei`],[p,v]],[/(microsoft);\s(lumia[\s\w]+)/i],[m,d,[p,v]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[d,[m,`Microsoft`],[p,_]],[/(kin\.[onetw]{3})/i],[[d,/\./g,` `],[m,`Microsoft`],[p,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[d,[m,`Motorola`],[p,v]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[d,[m,`Motorola`],[p,y]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[m,C.trim],[d,C.trim],[p,b]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,`SmartTV`],[m,`Samsung`],[p,b]],[/\(dtv[\);].+(aquos)/i],[d,[m,`Sharp`],[p,b]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[m,`Samsung`],d,[p,y]],[/smart-tv.+(samsung)/i],[m,[p,b],d],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[m,`Samsung`],d,[p,v]],[/sie-(\w*)/i],[d,[m,`Siemens`],[p,v]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[m,`Nokia`],d,[p,v]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[d,[m,`Acer`],[p,y]],[/android.+([vl]k\-?\d{3})\s+build/i],[d,[m,`LG`],[p,y]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[m,`LG`],d,[p,y]],[/(lg) netcast\.tv/i],[m,d,[p,b]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[d,[m,`LG`],[p,v]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[d,[m,`Lenovo`],[p,y]],[/linux;.+((jolla));/i],[m,d,[p,v]],[/((pebble))app\/[\d\.]+\s/i],[m,d,[p,x]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[m,d,[p,v]],[/crkey/i],[[d,`Chromecast`],[m,`Google`]],[/android.+;\s(glass)\s\d/i],[d,[m,`Google`],[p,x]],[/android.+;\s(pixel c)\s/i],[d,[m,`Google`],[p,y]],[/android.+;\s(pixel xl|pixel)\s/i],[d,[m,`Google`],[p,v]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[d,/_/g,` `],[m,`Xiaomi`],[p,v]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[d,/_/g,` `],[m,`Xiaomi`],[p,y]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[d,[m,`Meizu`],[p,y]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})\s+build/i],[d,[m,`OnePlus`],[p,v]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[d,[m,`RCA`],[p,y]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[d,[m,`Dell`],[p,y]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[d,[m,`Verizon`],[p,y]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[m,`Barnes & Noble`],d,[p,y]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[d,[m,`NuVision`],[p,y]],[/android.+;\s(k88)\sbuild/i],[d,[m,`ZTE`],[p,y]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[d,[m,`Swiss`],[p,v]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[d,[m,`Swiss`],[p,y]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[d,[m,`Zeki`],[p,y]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[m,`Dragon Touch`],d,[p,y]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[d,[m,`Insignia`],[p,y]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[d,[m,`NextBook`],[p,y]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[m,`Voice`],d,[p,v]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[m,`LvTel`],d,[p,v]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[d,[m,`Envizen`],[p,y]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[m,d,[p,y]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[d,[m,`MachSpeed`],[p,y]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[m,d,[p,y]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[d,[m,`Rotor`],[p,y]],[/android.+(KS(.+))\s+build/i],[d,[m,`Amazon`],[p,y]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[m,d,[p,y]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[p,C.lowerize],m,d],[/(android[\w\.\s\-]{0,9});.+build/i],[d,[m,`Generic`]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[h,[f,`EdgeHTML`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[f,h],[/rv\:([\w\.]{1,9}).+(gecko)/i],[h,f]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[f,h],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[f,[h,w.str,T.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[f,`Windows`],[h,w.str,T.os.windows.version]],[/\((bb)(10);/i],[[f,`BlackBerry`],h],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]*)/i,/linux;.+(sailfish);/i],[f,h],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[f,`Symbian`],h],[/\((series40);/i],[f],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[f,`Firefox OS`],h],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[f,h],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[f,`Chromium OS`],h],[/(sunos)\s?([\w\.\d]*)/i],[[f,`Solaris`],h],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[f,h],[/(haiku)\s(\w+)/i],[f,h],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[h,/_/g,`.`],[f,`iOS`]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[f,`Mac OS`],[h,/_/g,`.`]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]*)/i],[f,h]]},E=function(e,t){if(typeof e==`object`&&(t=e,e=a),!(this instanceof E))return new E(e,t).getResult();var n=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:``),r=t?C.extend(ee,t):ee;return this.getBrowser=function(){var e={name:a,version:a};return w.rgx.call(e,n,r.browser),e.major=C.major(e.version),e},this.getCPU=function(){var e={architecture:a};return w.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:a,model:a,type:a};return w.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:a,version:a};return w.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:a,version:a};return w.rgx.call(e,n,r.os),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 n},this.setUA=function(e){return n=e,this},this};E.VERSION=o,E.BROWSER={NAME:f,MAJOR:u,VERSION:h},E.CPU={ARCHITECTURE:g},E.DEVICE={MODEL:d,VENDOR:m,TYPE:p,CONSOLE:_,MOBILE:v,SMARTTV:b,TABLET:y,WEARABLE:x,EMBEDDED:S},E.ENGINE={NAME:f,VERSION:h},E.OS={NAME:f,VERSION:h},typeof t===c?s===`function`&&n(3)?(r=(function(){return E}).call(t,n,t,e),r!==a&&(e.exports=r)):i&&(i.UAParser=E):(typeof e!==c&&e.exports&&(t=e.exports=E),t.UAParser=E);var te=i&&(i.jQuery||i.Zepto);if(typeof te!==c){var ne=new E;te.ua=ne.getResult(),te.ua.get=function(){return ne.getUA()},te.ua.set=function(e){ne.setUA(e);var t=ne.getResult();for(var n in t)te.ua[n]=t[n]}}})(typeof window==`object`?window:this)}),(function(e,t){(function(t){e.exports=t}).call(t,{})}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=i.DEVICE_TYPES,o=i.defaultData,s=function(e){switch(e){case a.MOBILE:return{isMobile:!0};case a.TABLET:return{isTablet:!0};case a.SMART_TV:return{isSmartTV:!0};case a.CONSOLE:return{isConsole:!0};case a.WEARABLE:return{isWearable:!0};case a.BROWSER:return{isBrowser:!0};default:return o}},c=function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:t.major,browserFullVersion:t.version,browserName:t.name,engineName:n.name||!1,engineVersion:n.version,osName:r.name,osVersion:r.version,userAgent:i}},l=function(e,t,n,i){return r({},e,{vendor:t.vendor,model:t.model,os:n.name,osVersion:n.version,ua:i})},u=function(e,t,n,r){return{isSmartTV:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},d=function(e,t,n,r){return{isConsole:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},f=function(e,t,n,r){return{isWearable:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},p=t.getNavigatorInstance=function(){return typeof window<`u`&&(window.navigator||navigator)?window.navigator||navigator:!1};e.exports={checkType:s,broPayload:c,mobilePayload:l,stvPayload:u,consolePayload:d,wearPayload:f,getNavigatorInstance:p,isIOS13Check:t.isIOS13Check=function(e){var t=p();return t&&t.platform&&(t.platform.indexOf(e)!==-1||t.platform===`MacIntel`&&t.maxTouchPoints>1&&!window.MSStream)}}})])}))(),um=y`
33
+ - This validation runs before any file with validation decorator was parsed by NodeJS.`);var o=this.validatorOptions?this.validatorOptions.groups:void 0,s=this.validatorOptions&&this.validatorOptions.strictGroups||!1,c=this.validatorOptions&&this.validatorOptions.always||!1,l=((a=this.validatorOptions)==null?void 0:a.forbidUnknownValues)===void 0||this.validatorOptions.forbidUnknownValues!==!1,u=this.metadataStorage.getTargetValidationMetadatas(e.constructor,t,c,s,o),d=this.metadataStorage.groupByPropertyName(u);if(l&&!u.length){var f=new If;(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.target===void 0||this.validatorOptions.validationError.target===!0)&&(f.target=e),f.value=void 0,f.property=void 0,f.children=[],f.constraints={unknownValue:`an unknown value was passed to the validate function`},n.push(f)}else this.validatorOptions&&this.validatorOptions.whitelist&&this.whitelist(e,d,n),Object.keys(d).forEach(function(t){var i=e[t],a=d[t].filter(function(e){return e.type===Lf.IS_DEFINED}),o=d[t].filter(function(e){return e.type!==Lf.IS_DEFINED&&e.type!==Lf.WHITELIST});i instanceof Promise&&o.find(function(e){return e.type===Lf.PROMISE_VALIDATION})?r.awaitingPromises.push(i.then(function(i){r.performValidations(e,i,t,a,o,n)})):r.performValidations(e,i,t,a,o,n)})},e.prototype.whitelist=function(e,t,n){var r=this,i=[];Object.keys(e).forEach(function(e){(!t[e]||t[e].length===0)&&i.push(e)}),i.length>0&&(this.validatorOptions&&this.validatorOptions.forbidNonWhitelisted?i.forEach(function(t){var i,a=r.generateValidationError(e,e[t],t);a.constraints=(i={},i[Lf.WHITELIST]=`property ${t} should not exist`,i),a.children=void 0,n.push(a)}):i.forEach(function(t){return delete e[t]}))},e.prototype.stripEmptyErrors=function(e){var t=this;return e.filter(function(e){if(e.children&&(e.children=t.stripEmptyErrors(e.children)),Object.keys(e.constraints).length===0){if(e.children.length===0)return!1;delete e.constraints}return!0})},e.prototype.performValidations=function(e,t,n,r,i,a){var o=i.filter(function(e){return e.type===Lf.CUSTOM_VALIDATION}),s=i.filter(function(e){return e.type===Lf.NESTED_VALIDATION}),c=i.filter(function(e){return e.type===Lf.CONDITIONAL_VALIDATION}),l=this.generateValidationError(e,t,n);a.push(l),this.conditionalValidations(e,t,c)&&(this.customValidations(e,t,r,l),this.mapContexts(e,t,r,l),!(t===void 0&&this.validatorOptions&&this.validatorOptions.skipUndefinedProperties===!0)&&(t===null&&this.validatorOptions&&this.validatorOptions.skipNullProperties===!0||t==null&&this.validatorOptions&&this.validatorOptions.skipMissingProperties===!0||(this.customValidations(e,t,o,l),this.nestedValidations(t,s,l),this.mapContexts(e,t,i,l),this.mapContexts(e,t,o,l))))},e.prototype.generateValidationError=function(e,t,n){var r=new If;return(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.target===void 0||this.validatorOptions.validationError.target===!0)&&(r.target=e),(!this.validatorOptions||!this.validatorOptions.validationError||this.validatorOptions.validationError.value===void 0||this.validatorOptions.validationError.value===!0)&&(r.value=t),r.property=n,r.children=[],r.constraints={},r},e.prototype.conditionalValidations=function(e,t,n){return n.map(function(n){return n.constraints[0](e,t)}).reduce(function(e,t){return e&&t},!0)},e.prototype.customValidations=function(e,t,n,r){var i=this;n.forEach(function(n){var a=function(){return{targetName:e.constructor?e.constructor.name:void 0,property:n.propertyName,object:e,value:t,constraints:n.constraints}};(!n.validateIf||n.validateIf(e,t))&&i.metadataStorage.getTargetValidatorConstraints(n.constraintCls).forEach(function(o){if(!(o.async&&i.ignoreAsyncValidations)&&!(i.validatorOptions&&i.validatorOptions.stopAtFirstError&&Object.keys(r.constraints||{}).length>0)){var s=a();if(!n.each||!(Array.isArray(t)||t instanceof Set||t instanceof Map)){var c=o.instance.validate(t,s);if(Af(c)){var l=c.then(function(a){if(!a){var s=Bf(i.createValidationError(e,t,n,o),2),c=s[0],l=s[1];r.constraints[c]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(l)}else if(!c){var u=Bf(i.createValidationError(e,t,n,o),2),d=u[0],f=u[1];r.constraints[d]=f}}else{var p=Of(t).map(function(e){return o.instance.validate(e,s)});if(p.some(function(e){return Af(e)})){var m=p.map(function(e){return Af(e)?e:Promise.resolve(e)}),h=Promise.all(m).then(function(a){if(!a.every(function(e){return e})){var s=Bf(i.createValidationError(e,t,n,o),2),c=s[0],l=s[1];r.constraints[c]=l,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(h)}else if(!p.every(function(e){return e})){var g=Bf(i.createValidationError(e,t,n,o),2),d=g[0],f=g[1];r.constraints[d]=f}}}})})},e.prototype.nestedValidations=function(e,t,n){var r=this;e!==void 0&&t.forEach(function(i){if((i.type===Lf.NESTED_VALIDATION||i.type===Lf.PROMISE_VALIDATION)&&!(r.validatorOptions&&r.validatorOptions.stopAtFirstError&&Object.keys(n.constraints||{}).length>0)){if(Array.isArray(e)||e instanceof Set||e instanceof Map)(e instanceof Set?Array.from(e):e).forEach(function(i,a){r.performValidations(e,i,a.toString(),[],t,n.children)});else if(e instanceof Object){var a=typeof i.target==`string`?i.target:i.target.name;r.execute(e,a,n.children)}else{var o=Bf(r.createValidationError(i.target,e,i),2),s=o[0],c=o[1];n.constraints[s]=c}}})},e.prototype.mapContexts=function(e,t,n,r){var i=this;return n.forEach(function(e){if(e.context){var t=void 0;e.type===Lf.CUSTOM_VALIDATION&&(t=i.metadataStorage.getTargetValidatorConstraints(e.constraintCls)[0]);var n=i.getConstraintType(e,t);r.constraints[n]&&(r.contexts||(r.contexts={}),r.contexts[n]=Object.assign(r.contexts[n]||{},e.context))}})},e.prototype.createValidationError=function(e,t,n,r){var i=e.constructor?e.constructor.name:void 0,a=this.getConstraintType(n,r),o={targetName:i,property:n.propertyName,object:e,value:t,constraints:n.constraints},s=n.message||``;return!n.message&&(!this.validatorOptions||this.validatorOptions&&!this.validatorOptions.dismissDefaultMessages)&&r&&r.instance.defaultMessage instanceof Function&&(s=r.instance.defaultMessage(o)),[a,zf.replaceMessageSpecialTokens(s,o)]},e.prototype.getConstraintType=function(e,t){return t&&t.name?t.name:e.type},e}(),Hf=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Uf=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Wf=function(){function e(){}return e.prototype.validate=function(e,t,n){return this.coreValidate(e,t,n)},e.prototype.validateOrReject=function(e,t,n){return Hf(this,void 0,void 0,function(){var r;return Uf(this,function(i){switch(i.label){case 0:return[4,this.coreValidate(e,t,n)];case 1:return r=i.sent(),r.length?[2,Promise.reject(r)]:[2]}})})},e.prototype.validateSync=function(e,t,n){var r=typeof e==`string`?t:e,i=typeof e==`string`?n:t,a=typeof e==`string`?e:void 0,o=new Vf(this,i);o.ignoreAsyncValidations=!0;var s=[];return o.execute(r,a,s),o.stripEmptyErrors(s)},e.prototype.coreValidate=function(e,t,n){var r=typeof e==`string`?t:e,i=typeof e==`string`?n:t,a=typeof e==`string`?e:void 0,o=new Vf(this,i),s=[];return o.execute(r,a,s),Promise.all(o.awaitingPromises).then(function(){return o.stripEmptyErrors(s)})},e}(),Gf=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}()),Kf,qf;function Jf(e){if(Kf)try{var t=Kf.get(e);if(t||!qf||!qf.fallback)return t}catch(e){if(!qf||!qf.fallbackOnErrors)throw e}return Gf.get(e)}var Yf=function(){function e(e,t,n){n===void 0&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return Jf(this.target)},enumerable:!1,configurable:!0}),e}();function Xf(e){var t;if(e.validator instanceof Function){if(t=e.validator,Jf(Pf).getTargetValidatorConstraints(e.validator).length>1)throw`More than one implementation of ValidatorConstraintInterface found for validator on: ${e.target.name}:${e.propertyName}`}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):``},e}(),Ff().addConstraintMetadata(new Yf(t,e.name,e.async))}var r={type:e.name&&Lf.isValid(e.name)?e.name:Lf.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};Ff().addValidationMetadata(new Ef(r))}function Zf(e,t){return function(n){return e(t&&t.each?`each value in `:``,n)}}function Qf(e,t){return function(n,r){Xf({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}var $f=Lf.IS_DEFINED;function ep(e){return e!=null}function tp(e){return Qf({name:$f,validator:{validate:function(e){return ep(e)},defaultMessage:Zf(function(e){return e+`$property should not be null or undefined`},e)}},e)}var np=`isOptional`;function X(e){return function(t,n){var r={type:Lf.CONDITIONAL_VALIDATION,name:np,target:t.constructor,propertyName:n,constraints:[function(e,t){return e[n]!==null&&e[n]!==void 0}],validationOptions:e};Ff().addValidationMetadata(new Ef(r))}}function rp(e,t){return function(n,r){var i={type:Lf.CONDITIONAL_VALIDATION,target:n.constructor,propertyName:r,constraints:[e],validationOptions:t};Ff().addValidationMetadata(new Ef(i))}}var ip=function(){return ip=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ip.apply(this,arguments)};function ap(e){var t=ip({},e),n=t.each?`each value in `:``;return t.message=t.message||n+`nested property $property must be either object or array`,function(e,n){var r={type:Lf.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};Ff().addValidationMetadata(new Ef(r))}}var op=`equals`;function sp(e,t){return e===t}function cp(e,t){return Qf({name:op,constraints:[e],validator:{validate:function(e,t){return sp(e,t==null?void 0:t.constraints[0])},defaultMessage:Zf(function(e){return e+`$property must be equal to $constraint1`},t)}},t)}var lp=`isNotEmpty`;function up(e){return e!==``&&e!=null}function dp(e){return Qf({name:lp,validator:{validate:function(e,t){return up(e)},defaultMessage:Zf(function(e){return e+`$property should not be empty`},e)}},e)}function fp(e,t){return typeof e==`number`&&typeof t==`number`&&e<=t}function pp(e,t){return Qf({name:`max`,constraints:[e],validator:{validate:function(e,t){return fp(e,t==null?void 0:t.constraints[0])},defaultMessage:Zf(function(e){return e+`$property must not be greater than $constraint1`},t)}},t)}function mp(e,t){return typeof e==`number`&&typeof t==`number`&&e>=t}function hp(e,t){return Qf({name:`min`,constraints:[e],validator:{validate:function(e,t){return mp(e,t==null?void 0:t.constraints[0])},defaultMessage:Zf(function(e){return e+`$property must not be less than $constraint1`},t)}},t)}var gp=`isBoolean`;function _p(e){return e instanceof Boolean||typeof e==`boolean`}function vp(e){return Qf({name:gp,validator:{validate:function(e,t){return _p(e)},defaultMessage:Zf(function(e){return e+`$property must be a boolean value`},e)}},e)}var yp=`isNumber`;function bp(e,t){if(t===void 0&&(t={}),typeof e!=`number`)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(t.maxDecimalPlaces!==void 0){var n=0;if(e%1!=0&&(n=e.toString().split(`.`)[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}function xp(e,t){return e===void 0&&(e={}),Qf({name:yp,constraints:[e],validator:{validate:function(e,t){return bp(e,t==null?void 0:t.constraints[0])},defaultMessage:Zf(function(e){return e+`$property must be a number conforming to the specified constraints`},t)}},t)}var Sp=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Cp=`isEnum`;function wp(e,t){return Object.keys(t).map(function(e){return t[e]}).includes(e)}function Tp(e){return Object.entries(e).filter(function(e){var t=Sp(e,2),n=t[0];return t[1],isNaN(parseInt(n))}).map(function(e){var t=Sp(e,2);return t[0],t[1]})}function Ep(e,t){return Qf({name:Cp,constraints:[e,Tp(e)],validator:{validate:function(e,t){return wp(e,t==null?void 0:t.constraints[0])},defaultMessage:Zf(function(e){return e+`$property must be one of the following values: $constraint2`},t)}},t)}var Dp=`isInt`;function Op(e){return typeof e==`number`&&Number.isInteger(e)}function kp(e){return Qf({name:Dp,validator:{validate:function(e,t){return Op(e)},defaultMessage:Zf(function(e){return e+`$property must be an integer number`},e)}},e)}var Ap=`isString`;function jp(e){return e instanceof String||typeof e==`string`}function Mp(e){return Qf({name:Ap,validator:{validate:function(e,t){return jp(e)},defaultMessage:Zf(function(e){return e+`$property must be a string`},e)}},e)}var Np=`isArray`;function Pp(e){return Array.isArray(e)}function Fp(e){return Qf({name:Np,validator:{validate:function(e,t){return Pp(e)},defaultMessage:Zf(function(e){return e+`$property must be an array`},e)}},e)}var Ip=`isObject`;function Lp(e){return e!=null&&(typeof e==`object`||typeof e==`function`)&&!Array.isArray(e)}function Rp(e){return Qf({name:Ip,validator:{validate:function(e,t){return Lp(e)},defaultMessage:Zf(function(e){return e+`$property must be an object`},e)}},e)}function zp(e,t,n){return typeof e==`string`?Jf(Wf).validateSync(e,t,n):Jf(Wf).validateSync(e,t)}var Z;(function(e){e[e.PLAIN_TO_CLASS=0]=`PLAIN_TO_CLASS`,e[e.CLASS_TO_PLAIN=1]=`CLASS_TO_PLAIN`,e[e.CLASS_TO_CLASS=2]=`CLASS_TO_CLASS`})(Z||(Z={}));var Bp=new(function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,n){return this.findMetadatas(this._transformMetadatas,e,t).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?n===Z.CLASS_TO_CLASS||n===Z.PLAIN_TO_CLASS:e.options.toPlainOnly!==!0||n===Z.CLASS_TO_PLAIN})},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find(function(e){return e.options&&e.options.name===t})},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),n=t&&t.get(void 0),r=this._exposeMetadatas.get(e),i=r&&r.get(void 0);return n&&i||!n&&!i?`none`:n?`excludeAll`:`exposeAll`},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?t===Z.CLASS_TO_CLASS||t===Z.PLAIN_TO_CLASS:e.options.toPlainOnly!==!0||t===Z.CLASS_TO_PLAIN}).map(function(e){return e.propertyName})},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter(function(e){return!e.options||e.options.toClassOnly===!0&&e.options.toPlainOnly===!0?!0:e.options.toClassOnly===!0?t===Z.CLASS_TO_CLASS||t===Z.PLAIN_TO_CLASS:e.options.toPlainOnly!==!0||t===Z.CLASS_TO_PLAIN}).map(function(e){return e.propertyName})},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var n=e.get(t),r;n&&(r=Array.from(n.values()).filter(function(e){return e.propertyName!==void 0}));for(var i=[],a=0,o=this.getAncestors(t);a<o.length;a++){var s=o[a],c=e.get(s);if(c){var l=Array.from(c.values()).filter(function(e){return e.propertyName!==void 0});i.push.apply(i,l)}}return i.concat(r||[])},e.prototype.findMetadata=function(e,t,n){var r=e.get(t);if(r){var i=r.get(n);if(i)return i}for(var a=0,o=this.getAncestors(t);a<o.length;a++){var s=o[a],c=e.get(s);if(c){var l=c.get(n);if(l)return l}}},e.prototype.findMetadatas=function(e,t,n){var r=e.get(t),i;r&&(i=r.get(n));for(var a=[],o=0,s=this.getAncestors(t);o<s.length;o++){var c=s[o],l=e.get(c);l&&l.has(n)&&a.push.apply(a,l.get(n))}return a.slice().reverse().concat((i||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],n=Object.getPrototypeOf(e.prototype.constructor);n.prototype!==void 0;n=Object.getPrototypeOf(n.prototype.constructor))t.push(n);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}());function Vp(){if(typeof globalThis<`u`)return globalThis;if(typeof global<`u`)return global;if(typeof window<`u`)return window;if(typeof self<`u`)return self}function Hp(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var Up=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function Wp(e){var t=new e;return!(t instanceof Set)&&!(`push`in t)?[]:t}var Gp=function(){function e(e,t){this.transformationType=e,this.options=t,this.recursionStack=new Set}return e.prototype.transform=function(e,t,n,r,i,a){var o=this;if(a===void 0&&(a=0),Array.isArray(t)||t instanceof Set){var s=r&&this.transformationType===Z.PLAIN_TO_CLASS?Wp(r):[];return t.forEach(function(t,r){var i=e?e[r]:void 0;if(!o.options.enableCircularCheck||!o.isCircular(t)){var c=void 0;if(typeof n!=`function`&&n&&n.options&&n.options.discriminator&&n.options.discriminator.property&&n.options.discriminator.subTypes){if(o.transformationType===Z.PLAIN_TO_CLASS){c=n.options.discriminator.subTypes.find(function(e){return e.name===t[n.options.discriminator.property]});var l={newObject:s,object:t,property:void 0},u=n.typeFunction(l);c=c===void 0?u:c.value,n.options.keepDiscriminatorProperty||delete t[n.options.discriminator.property]}o.transformationType===Z.CLASS_TO_CLASS&&(c=t.constructor),o.transformationType===Z.CLASS_TO_PLAIN&&(t[n.options.discriminator.property]=n.options.discriminator.subTypes.find(function(e){return e.value===t.constructor}).name)}else c=n;var d=o.transform(i,t,c,void 0,t instanceof Map,a+1);s instanceof Set?s.add(d):s.push(d)}else o.transformationType===Z.CLASS_TO_CLASS&&(s instanceof Set?s.add(t):s.push(t))}),s}if(n===String&&!i)return t==null?t:String(t);if(n===Number&&!i)return t==null?t:Number(t);if(n===Boolean&&!i)return t==null?t:!!t;if((n===Date||t instanceof Date)&&!i)return t instanceof Date?new Date(t.valueOf()):t==null?t:new Date(t);if(Vp().Buffer&&(n===Buffer||t instanceof Buffer)&&!i)return t==null?t:Buffer.from(t);if(Hp(t)&&!i)return new Promise(function(e,r){t.then(function(t){return e(o.transform(void 0,t,n,void 0,void 0,a+1))},r)});if(!i&&typeof t==`object`&&t&&typeof t.then==`function`)return t;if(typeof t==`object`&&t){!n&&t.constructor!==Object&&(!Array.isArray(t)&&t.constructor===Array||(n=t.constructor)),!n&&e&&(n=e.constructor),this.options.enableCircularCheck&&this.recursionStack.add(t);var c=this.getKeys(n,t,i),l=e||{};!e&&(this.transformationType===Z.PLAIN_TO_CLASS||this.transformationType===Z.CLASS_TO_CLASS)&&(l=i?new Map:n?new n:{});for(var u=function(r){if(r===`__proto__`||r===`constructor`)return`continue`;var o=r,s=r,c=r;if(!d.options.ignoreDecorators&&n){if(d.transformationType===Z.PLAIN_TO_CLASS){var u=Bp.findExposeMetadataByCustomName(n,r);u&&(c=u.propertyName,s=u.propertyName)}else if(d.transformationType===Z.CLASS_TO_PLAIN||d.transformationType===Z.CLASS_TO_CLASS){var u=Bp.findExposeMetadata(n,r);u&&u.options&&u.options.name&&(s=u.options.name)}}var f=void 0;f=d.transformationType===Z.PLAIN_TO_CLASS?t[o]:t instanceof Map?t.get(o):t[o]instanceof Function?t[o]():t[o];var p=void 0,m=f instanceof Map;if(n&&i)p=n;else if(n){var h=Bp.findTypeMetadata(n,c);if(h){var g={newObject:l,object:t,property:c},_=h.typeFunction?h.typeFunction(g):h.reflectedType;h.options&&h.options.discriminator&&h.options.discriminator.property&&h.options.discriminator.subTypes?t[o]instanceof Array?p=h:(d.transformationType===Z.PLAIN_TO_CLASS&&(p=h.options.discriminator.subTypes.find(function(e){if(f&&f instanceof Object&&h.options.discriminator.property in f)return e.name===f[h.options.discriminator.property]}),p=p===void 0?_:p.value,h.options.keepDiscriminatorProperty||f&&f instanceof Object&&h.options.discriminator.property in f&&delete f[h.options.discriminator.property]),d.transformationType===Z.CLASS_TO_CLASS&&(p=f.constructor),d.transformationType===Z.CLASS_TO_PLAIN&&f&&(f[h.options.discriminator.property]=h.options.discriminator.subTypes.find(function(e){return e.value===f.constructor}).name)):p=_,m=m||h.reflectedType===Map}else if(d.options.targetMaps)d.options.targetMaps.filter(function(e){return e.target===n&&!!e.properties[c]}).forEach(function(e){return p=e.properties[c]});else if(d.options.enableImplicitConversion&&d.transformationType===Z.PLAIN_TO_CLASS){var v=Reflect.getMetadata(`design:type`,n.prototype,c);v&&(p=v)}}var y=Array.isArray(t[o])?d.getReflectedType(n,c):void 0,b=e?e[o]:void 0;if(l.constructor.prototype){var x=Object.getOwnPropertyDescriptor(l.constructor.prototype,s);if((d.transformationType===Z.PLAIN_TO_CLASS||d.transformationType===Z.CLASS_TO_CLASS)&&(x&&!x.set||l[s]instanceof Function))return`continue`}if(!d.options.enableCircularCheck||!d.isCircular(f)){var S=d.transformationType===Z.PLAIN_TO_CLASS?s:r,C=void 0;d.transformationType===Z.CLASS_TO_PLAIN?(C=t[S],C=d.applyCustomTransformations(C,n,S,t,d.transformationType),C=t[S]===C?f:C,C=d.transform(b,C,p,y,m,a+1)):f===void 0&&d.options.exposeDefaultValues?C=l[s]:(C=d.transform(b,f,p,y,m,a+1),C=d.applyCustomTransformations(C,n,S,t,d.transformationType)),(C!==void 0||d.options.exposeUnsetFields)&&(l instanceof Map?l.set(s,C):l[s]=C)}else if(d.transformationType===Z.CLASS_TO_CLASS){var C=f;C=d.applyCustomTransformations(C,n,r,t,d.transformationType),(C!==void 0||d.options.exposeUnsetFields)&&(l instanceof Map?l.set(s,C):l[s]=C)}},d=this,f=0,p=c;f<p.length;f++){var m=p[f];u(m)}return this.options.enableCircularCheck&&this.recursionStack.delete(t),l}return t},e.prototype.applyCustomTransformations=function(e,t,n,r,i){var a=this,o=Bp.findTransformMetadatas(t,n,this.transformationType);return this.options.version!==void 0&&(o=o.filter(function(e){return!e.options||a.checkVersion(e.options.since,e.options.until)})),o=this.options.groups&&this.options.groups.length?o.filter(function(e){return!e.options||a.checkGroups(e.options.groups)}):o.filter(function(e){return!e.options||!e.options.groups||!e.options.groups.length}),o.forEach(function(t){e=t.transformFn({value:e,key:n,obj:r,type:i,options:a.options})}),e},e.prototype.isCircular=function(e){return this.recursionStack.has(e)},e.prototype.getReflectedType=function(e,t){if(e){var n=Bp.findTypeMetadata(e,t);return n?n.reflectedType:void 0}},e.prototype.getKeys=function(e,t,n){var r=this,i=Bp.getStrategy(e);i===`none`&&(i=this.options.strategy||`exposeAll`);var a=[];if((i===`exposeAll`||n)&&(a=t instanceof Map?Array.from(t.keys()):Object.keys(t)),n)return a;if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&e){var o=Bp.getExposedProperties(e,this.transformationType),s=Bp.getExcludedProperties(e,this.transformationType);a=Up(Up([],o,!0),s,!0)}if(!this.options.ignoreDecorators&&e){var o=Bp.getExposedProperties(e,this.transformationType);this.transformationType===Z.PLAIN_TO_CLASS&&(o=o.map(function(t){var n=Bp.findExposeMetadata(e,t);return n&&n.options&&n.options.name?n.options.name:t})),a=this.options.excludeExtraneousValues?o:a.concat(o);var c=Bp.getExcludedProperties(e,this.transformationType);c.length>0&&(a=a.filter(function(e){return!c.includes(e)})),this.options.version!==void 0&&(a=a.filter(function(t){var n=Bp.findExposeMetadata(e,t);return!n||!n.options||r.checkVersion(n.options.since,n.options.until)})),a=this.options.groups&&this.options.groups.length?a.filter(function(t){var n=Bp.findExposeMetadata(e,t);return!n||!n.options||r.checkGroups(n.options.groups)}):a.filter(function(t){var n=Bp.findExposeMetadata(e,t);return!n||!n.options||!n.options.groups||!n.options.groups.length})}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(a=a.filter(function(e){return r.options.excludePrefixes.every(function(t){return e.substr(0,t.length)!==t})})),a=a.filter(function(e,t,n){return n.indexOf(e)===t}),a},e.prototype.checkVersion=function(e,t){var n=!0;return n&&e&&(n=this.options.version>=e),n&&t&&(n=this.options.version<t),n},e.prototype.checkGroups=function(e){return!e||this.options.groups.some(function(t){return e.includes(t)})},e}(),Kp={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0},qp=function(){return qp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qp.apply(this,arguments)},Jp=function(){function e(){}return e.prototype.instanceToPlain=function(e,t){return new Gp(Z.CLASS_TO_PLAIN,qp(qp({},Kp),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToPlainFromExist=function(e,t,n){return new Gp(Z.CLASS_TO_PLAIN,qp(qp({},Kp),n)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.plainToInstance=function(e,t,n){return new Gp(Z.PLAIN_TO_CLASS,qp(qp({},Kp),n)).transform(void 0,t,e,void 0,void 0,void 0)},e.prototype.plainToClassFromExist=function(e,t,n){return new Gp(Z.PLAIN_TO_CLASS,qp(qp({},Kp),n)).transform(e,t,void 0,void 0,void 0,void 0)},e.prototype.instanceToInstance=function(e,t){return new Gp(Z.CLASS_TO_CLASS,qp(qp({},Kp),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToClassFromExist=function(e,t,n){return new Gp(Z.CLASS_TO_CLASS,qp(qp({},Kp),n)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.serialize=function(e,t){return JSON.stringify(this.instanceToPlain(e,t))},e.prototype.deserialize=function(e,t,n){var r=JSON.parse(t);return this.plainToInstance(e,r,n)},e.prototype.deserializeArray=function(e,t,n){var r=JSON.parse(t);return this.plainToInstance(e,r,n)},e}();function Yp(e,t){return t===void 0&&(t={}),function(n,r){Bp.addTransformMetadata({target:n.constructor,propertyName:r,transformFn:e,options:t})}}var Xp=new Jp;function Zp(e,t,n){return Xp.plainToInstance(e,t,n)}function Q(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function $(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Qp=class{};$([tp(),Mp(),Q(`design:type`,String)],Qp.prototype,`templateId`,void 0),$([X(),Rp(),Q(`design:type`,typeof Record>`u`?Object:Record)],Qp.prototype,`templateLayout`,void 0);var $p=class{};$([tp(),Mp(),Q(`design:type`,String)],$p.prototype,`id`,void 0),$([tp(),Mp(),Q(`design:type`,String)],$p.prototype,`name`,void 0),$([tp(),Mp(),Q(`design:type`,String)],$p.prototype,`type`,void 0),$([tp(),vp(),Q(`design:type`,Boolean)],$p.prototype,`final`,void 0),$([tp(),vp(),Q(`design:type`,Boolean)],$p.prototype,`releaseClientApp`,void 0),$([X(),Rp(),Q(`design:type`,Object)],$p.prototype,`dataSource`,void 0),$([Yp(({value:e})=>Qi(e)?Zp(Qp,e):void 0),X(),Rp(),rp((e,t)=>Qi(t)),ap(),Q(`design:type`,Qp===void 0?Object:Qp)],$p.prototype,`client`,void 0);var em=e=>Array.isArray(e)&&e.some(e=>e&&typeof e==`object`&&(e.templateId===`PROGRESS`||e.templateId===`GENERIC_PROGRESS`)),tm=()=>Qf({name:`hasProgressStep`,validator:{validate(e){return em(e)},defaultMessage(){return`Workflow client must have at least one step with templateId "${Si}"`}}}),nm=class{};$([tp(),Rp(),Q(`design:type`,typeof Record>`u`?Object:Record)],nm.prototype,`layout`,void 0),$([Fp(),tp(),Yp(({value:e})=>Array.isArray(e)?e.map(e=>Zp(Qp,e)):e),ap({each:!0}),tm(),Q(`design:type`,typeof Array>`u`?Object:Array)],nm.prototype,`steps`,void 0);var rm,im=class{};rm=im,rm.fromPlain=e=>{if(!e)return{validationErrorMessage:`Workflow data is not defined`};try{let t=Zp(rm,e),n=zp(t);return n.length?{validationErrorMessage:JSON.stringify(ua(``,n))}:t}catch(e){let t=e instanceof Error?e.message:String(e);return{validationErrorMessage:`Failed to parse workflow data${t?`: ${t}`:`.`}`}}},$([tp(),Mp(),Q(`design:type`,String)],im.prototype,`id`,void 0),$([tp(),Fp(),Yp(({value:e})=>Array.isArray(e)?e.map(e=>Zp($p,e)):e),ap({each:!0}),Q(`design:type`,Array)],im.prototype,`steps`,void 0),$([tp(),Rp(),Yp(({value:e})=>Ji(e)?Zp(nm,e):e),ap(),Q(`design:type`,nm===void 0?Object:nm)],im.prototype,`client`,void 0),$([X(),Fp(),Mp({each:!0}),Q(`design:type`,Array)],im.prototype,`stepTemplateIds`,void 0),$([X(),Mp(),Q(`design:type`,String)],im.prototype,`name`,void 0),$([X(),Rp(),Q(`design:type`,Object)],im.prototype,`logging`,void 0),$([X(),Mp(),Q(`design:type`,Object)],im.prototype,`error`,void 0),$([X(),Mp(),Q(`design:type`,String)],im.prototype,`defaultLocale`,void 0),$([X(),Rp(),Q(`design:type`,typeof Record>`u`?Object:Record)],im.prototype,`config`,void 0),$([X(),Rp(),Q(`design:type`,typeof Record>`u`?Object:Record)],im.prototype,`metadata`,void 0),$([X(),xp(),Q(`design:type`,Number)],im.prototype,`sessionUpdateTimeout`,void 0),$([X(),vp(),Q(`design:type`,Boolean)],im.prototype,`trackLocation`,void 0);var am=class{};$([X(),Ep(oi),Q(`design:type`,oi===void 0?Object:oi)],am.prototype,`level`,void 0);var om=class{};$([tp(),dp(),Mp(),Q(`design:type`,String)],om.prototype,`id`,void 0),$([tp(),Mp(),dp(),Q(`design:type`,String)],om.prototype,`name`,void 0),$([X(),Mp(),Q(`design:type`,String)],om.prototype,`createdAt`,void 0),$([X(),Mp(),Q(`design:type`,String)],om.prototype,`updatedAt`,void 0),$([X(),Mp(),Q(`design:type`,String)],om.prototype,`string`,void 0),$([X(),Q(`design:type`,Object)],om.prototype,`createdBy`,void 0),$([X(),Q(`design:type`,Object)],om.prototype,`updatedBy`,void 0),$([X(),Mp(),Q(`design:type`,Object)],om.prototype,`step`,void 0),$([X(),Mp(),Q(`design:type`,Object)],om.prototype,`action`,void 0),$([X(),Mp(),Q(`design:type`,Object)],om.prototype,`path`,void 0),$([X(),xp(),Q(`design:type`,Object)],om.prototype,`integer`,void 0),$([X(),xp(),Q(`design:type`,Object)],om.prototype,`decimal`,void 0),$([X(),Q(`design:type`,Object)],om.prototype,`object`,void 0);var sm,cm=class{};sm=cm,sm.fromPlain=e=>{if(!e)return{validationErrorMessage:`Session data is not defined`};try{let t=Zp(sm,e),n=zp(t);return n.length?{validationErrorMessage:JSON.stringify(ua(``,n))}:t}catch(e){let t=e instanceof Error?e.message:String(e);return{validationErrorMessage:`Failed to parse session data${t?`: ${t}`:`.`}`}}},$([tp(),dp(),Mp(),Q(`design:type`,String)],cm.prototype,`id`,void 0),$([tp(),Mp(),Q(`design:type`,String)],cm.prototype,`currentStep`,void 0),$([tp(),Yp(({value:e})=>Ji(e)?Zp(im,e):e),ap(),Q(`design:type`,im===void 0?Object:im)],cm.prototype,`workflow`,void 0),$([tp(),Yp(({value:e})=>(Array.isArray(e)?e:[]).map(e=>Zp(om,e))),ap({each:!0}),Q(`design:type`,Array)],cm.prototype,`properties`,void 0),$([tp(),vp(),Q(`design:type`,Boolean)],cm.prototype,`isProcessingFiles`,void 0),$([X(),Mp(),Q(`design:type`,String)],cm.prototype,`locale`,void 0),$([X(),Q(`design:type`,Object)],cm.prototype,`connectionQualityAssessment`,void 0),$([X(),vp(),Q(`design:type`,Boolean)],cm.prototype,`isErrorFiles`,void 0),$([X(),Mp(),Q(`design:type`,String)],cm.prototype,`shortId`,void 0),$([X(),Mp(),Q(`design:type`,String)],cm.prototype,`deviceId`,void 0),$([X(),Rp(),Q(`design:type`,typeof Record>`u`?Object:Record)],cm.prototype,`deviceMetadata`,void 0),$([X(),Rp(),Q(`design:type`,typeof Record>`u`?Object:Record)],cm.prototype,`metadata`,void 0);var lm,um,dm,fm,pm,mm,hm,gm,{VERY_GOOD:_m,GOOD:vm,FAIR:ym,BAD:bm}=ki,xm=class{};$([xp(),hp(0),Q(`design:type`,Number)],xm.prototype,`maxAverageLatency`,void 0),$([Ep(Oi),Q(`design:type`,Oi===void 0?Object:Oi)],xm.prototype,`action`,void 0);var Sm=class{};$([cp(null),Q(`design:type`,void 0)],Sm.prototype,`maxAverageLatency`,void 0),$([Ep(Oi),Q(`design:type`,Oi===void 0?Object:Oi)],Sm.prototype,`action`,void 0),lm=pm=_m,um=mm=vm,dm=hm=ym,fm=gm=bm;var Cm=class{constructor(){st(this,lm,void 0),st(this,um,void 0),st(this,dm,void 0),st(this,fm,void 0)}};$([tp(),ap(),Yp(({value:e})=>Ji(e)?Zp(xm,e):e),Q(`design:type`,xm===void 0?Object:xm)],Cm.prototype,pm,void 0),$([tp(),ap(),Yp(({value:e})=>Ji(e)?Zp(xm,e):e),Q(`design:type`,xm===void 0?Object:xm)],Cm.prototype,mm,void 0),$([tp(),ap(),Yp(({value:e})=>Ji(e)?Zp(xm,e):e),Q(`design:type`,xm===void 0?Object:xm)],Cm.prototype,hm,void 0),$([tp(),ap(),Yp(({value:e})=>Ji(e)?Zp(Sm,e):e),Q(`design:type`,Sm===void 0?Object:Sm)],Cm.prototype,gm,void 0);var wm=class e{static fromPlain(t){if(!Ji(t))return{validationErrorMessage:`Connection quality config must be an object`};let n=Zp(e,t),r=zp(n);return r.length?{validationErrorMessage:JSON.stringify(ua(``,r))}:n}};$([vp(),Q(`design:type`,Boolean)],wm.prototype,`enabled`,void 0),$([kp(),hp(1),Q(`design:type`,Number)],wm.prototype,`assessmentInterval`,void 0),$([xp(),hp(0),pp(100),Q(`design:type`,Number)],wm.prototype,`maxAllowedPacketLoss`,void 0),$([tp(),Rp(),ap(),Yp(({value:e})=>Ji(e)?Zp(Cm,e):e),Q(`design:type`,Cm===void 0?Object:Cm)],wm.prototype,`levels`,void 0),$([kp(),hp(1),Q(`design:type`,Number)],wm.prototype,`pingPongAttempts`,void 0),$([kp(),hp(1),Q(`design:type`,Number)],wm.prototype,`timeoutPerPingPong`,void 0);var Tm=class e{constructor(){this.currentAssessment=null,this.assessments=[],this.pendingPing=null,this.assessmentTimer=null,this.sessionId=null,this.isMonitoring=!1,this.config=null,this.handleWebSocketMessage=e=>{var t,n;let r=this.pendingPing;if(!r)return;let i=H.decodeMessage(e);if((i==null?void 0:i.command)!==`pong`||typeof((t=i.options)==null?void 0:t.pingId)!=`string`||i.options.pingId!==r.id)return;let a=performance.now()-r.startedAt,o=(n=this.config)==null?void 0:n.timeoutPerPingPong;!o||a>o||(this.pendingPing=null,r.timeoutId!==null&&clearTimeout(r.timeoutId),r.resolve({id:r.id,sentAt:r.sentAt,receivedAt:Date.now(),latency:a,result:`successful`}))}}static getInstance(){return e.instance||(e.instance=new e),e.instance}checkConfig(e){if(!e)return;let t=wm.fromPlain(e);if(`validationErrorMessage`in t)B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Connection quality config is invalid: ${t.validationErrorMessage}`});else if(t.enabled!==!1)return t}setConfig(e){this.config=e}clearConfig(){this.config=null}startConnectionQualityAssessment({sessionId:e,rawConfig:t}){if(this.isMonitoring)return;let n=this.checkConfig(t);n?(this.setConfig(n),this.isMonitoring=!0,this.assessments=[],this.sessionId=e,H.subscribeToPingMessage(this.handleWebSocketMessage),this.runAssessmentAndScheduleNext()):this.clearConfig()}runAssessmentAndScheduleNext(){var e=this;return C(function*(){yield e.runAssessment(),e.isMonitoring&&e.scheduleNextAssessment()})()}scheduleNextAssessment(){var e=this;this.isMonitoring&&this.config&&(this.assessmentTimer=setTimeout(C(function*(){if(e.assessmentTimer=null,e.isMonitoring)try{yield e.runAssessment()}finally{e.isMonitoring&&e.scheduleNextAssessment()}}),this.config.assessmentInterval*1e3))}clearAssessmentTimer(){this.assessmentTimer!==null&&(clearTimeout(this.assessmentTimer),this.assessmentTimer=null)}runAssessment(){var e=this;return C(function*(){if(!e.config)return;let t={id:ei(),sessionId:e.sessionId,startedAt:Date.now(),endedAt:null,status:Ai.IN_PROGRESS,result:null,action:null,pingPongs:[],averageLatency:null,packetLoss:null,config:e.config};e.currentAssessment=t,e.assessments.push(t);for(let n=0;n<e.config.pingPongAttempts;n++){if(!e.isMonitoring){e.cancelAssessment(t);return}let n=yield e.executePingPong(e.config.timeoutPerPingPong);if(!n||!e.isMonitoring){e.cancelAssessment(t),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Connection quality assessment is cancelled, ${JSON.stringify(t)}`});return}t.pingPongs.push(n)}e.completeAssessment(t),e.sessionId&&t.result&&t.status&&t.endedAt&&H.sendConnectionStatusMessage({sessionId:e.sessionId,result:t.result,endedAt:t.endedAt,assessmentId:t.id,assessmentStatus:t.status}),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Connection quality assessment is completed with result: ${t.result}, ${JSON.stringify(t)}`})})()}cancelAssessment(e){e.status=Ai.CANCELLED,e.endedAt=Date.now(),this.sessionId&&H.sendConnectionStatusMessage({sessionId:this.sessionId,endedAt:e.endedAt,assessmentId:e.id,assessmentStatus:e.status})}executePingPong(e){if(this.pendingPing)return Promise.reject(Error(`Another ping-pong exchange is already in progress.`));let t=ei();return new Promise(n=>{let r=H.sendPingMessage(t),i=Date.now(),a=performance.now(),o=setTimeout(()=>{var e;((e=this.pendingPing)==null?void 0:e.id)===t&&(this.pendingPing=null,n({id:t,sentAt:i,receivedAt:null,latency:null,result:`timed_out`}))},e);this.pendingPing={id:t,sentAt:i,startedAt:a,timeoutId:o,resolve:n},r.status===xi.ERROR&&(clearTimeout(o),this.pendingPing=null,n({id:t,sentAt:i,receivedAt:null,latency:null,result:`timed_out`}))})}completeAssessment(e){let t=e.pingPongs.filter(e=>e.result===`successful`&&e.latency!==null),n=e.pingPongs.filter(({result:e})=>e===`timed_out`).length;e.averageLatency=t.length>0?Math.round(t.reduce((e,{latency:t})=>e+t,0)/t.length):null,e.packetLoss=e.pingPongs.length>0?n/e.pingPongs.length*100:null,e.result=this.calculateQualityResult(e.averageLatency,e.packetLoss,e.config),e.action=e.config.levels[e.result].action,e.status=Ai.COMPLETED,e.endedAt=Date.now()}calculateQualityResult(e,t,n){if(e===null||t===null||t>n.maxAllowedPacketLoss)return ki.BAD;let{levels:r}=n;return e<=r[ki.VERY_GOOD].maxAverageLatency?ki.VERY_GOOD:e<=r[ki.GOOD].maxAverageLatency?ki.GOOD:e<=r[ki.FAIR].maxAverageLatency?ki.FAIR:ki.BAD}stopConnectionQualityAssessment(){var e;this.isMonitoring=!1,this.clearAssessmentTimer();let t=this.pendingPing;this.pendingPing=null,t&&(t.timeoutId!==null&&clearTimeout(t.timeoutId),t.resolve(null)),((e=this.currentAssessment)==null?void 0:e.status)===Ai.IN_PROGRESS&&this.cancelAssessment(this.currentAssessment),H.unsubscribeFromPingMessage(this.handleWebSocketMessage),this.sessionId=null}getCurrentConnectionQualityResult(){var e,t;return(e=(t=this.currentAssessment)==null?void 0:t.result)==null?null:e}getCurrentAssessment(){return this.currentAssessment}getAssessments(){return[...this.assessments]}}.getInstance(),Em=(e,t)=>({_isInitialized:!1,_initializationInProgress:!1,_isConnectedToPlatform:!1,_sessionIdFromUrl:null,_ttl:86400,_runSocketConnection:function(){var e=C(function*(e){let{host:n,isSecure:r,port:i}=t().startConfig;if(n&&e&&(yield H.connect({host:n,isSecure:r,port:i,token:e})),!n||!e||!H.isConnected()){let e=new Qa({errorCode:hi.CONNECTION_ISSUE,message:`WebSocket connection issue`}),t=new Ya({errorCode:di.START_SESSION_FAILED,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`WebSocket connection issue`}),{error:t}}return{}});return function(t){return e.apply(this,arguments)}}(),_continueSession:function(){var e=C(function*(e){var n,r;let i=t()._sessionIdFromUrl,a=t().startConfig,o=z(a.apiKey),s;s=i?ro.Force:o?ro.ApiKey:ro.Simple;let c=(n=t().workflow)==null?void 0:n.id,l=i?`Session continued from force session id`:`Session restored from local storage`,u;if(s===ro.Force&&(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session with force session id: ${i}`}),u=i),s===ro.ApiKey){var d;if(!t().sessionRestoreMode)return Di;let e=a.apiKey,n=qi.getAuthTokenLs(),r=n&&((d=n[e])==null?void 0:d.sessionId);if(!r)return Di;r&&(u=r),B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session with api key: ${e}`})}if(s===ro.Simple){if(!t().sessionRestoreMode)return Di;let e=t().getCurrentSessionDataLs();if(!e)return Di;let n=e.sessionId,r=e.workflowId;if(!n||r!==c)return Di;u=n,B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session with session id from LS: ${n}`})}let f=yield t().waitForContinueSession({sessionId:u,locale:e});if(f.error)return s===ro.Simple?(t().removeCurrentSessionDataLsAndStore(),Di):{error:f.error};let p=f.sessionData.currentStep,m=f.sessionData.workflow.steps.find(e=>e.id===p);return(m==null?void 0:m.releaseClientApp)===!0&&m!=null&&(r=m.client)!=null&&r.templateId&&s===ro.Simple?(t().removeCurrentSessionDataLsAndStore(),Di):(t().setCurrentSessionDataLsAndStore({isApiKeyConnection:o,sessionId:f.sessionData.id,workflowId:c,locale:f.sessionData.locale}),Tm.startConnectionQualityAssessment({sessionId:f.sessionData.id,rawConfig:f.sessionData.connectionQualityAssessment}),yield t().setNextStep({workflow:f.sessionData.workflow,properties:f.sessionData.properties,nextStepId:f.sessionData.currentStep,locale:f.sessionData.locale}),t().listener({eventType:ai.MESSAGE,module:`IDV`,logLevel:R.INFO,message:l}),{shouldStartNewSession:!1})});return function(t){return e.apply(this,arguments)}}(),initialize(n){return C(function*(){if(t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Already initialized`}),{};if(t()._initializationInProgress)return{error:new Ga({errorCode:fi.INITIALIZATION_IN_PROGRESS})};e({_initializationInProgress:!0}),yield t().setAndInitFetchService(),e({modulesConfig:n.modulesConfig||{}});let r=[Tf];if(Array.isArray(n==null?void 0:n.includedModules)){let e=n.includedModules.filter(e=>typeof e==`function`&&e.displayName&&!r.some(t=>t.displayName===e.displayName));r=[...r,...e]}let i=yield t().loadModules(r);return i.error?{error:i.error}:(B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully load modules: ${r.map(e=>e.displayName).join(`, `)}`}),e({_initializationInProgress:!1,_isInitialized:!0}),{})})()},configureByApiKey(n){return C(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (configure by api key)`}),{error:new Ja({errorCode:ui.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (configure by api key)`}),{error:new Ja({errorCode:ui.SCENARIO_IN_PROGRESS})};let r=[`apiKey`,`baseUrl`].filter(e=>!(n!=null&&n[e]));if(r.length>0)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Missing parameters: ${r.join(`, `)}`}),{error:new Ja({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`Missing parameters: ${r.join(`, `)}`})};let i=aa(n.baseUrl);if(!i)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Invalid URL: ${n.baseUrl}`}),{error:new Ja({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n.baseUrl}`})};let a=Number(n.ttl);!Number.isNaN(a)&&a>0&&e({_ttl:a});let o=t()._ttl,s={host:i.host,isSecure:i.isSecure,port:i.port,apiKey:n.apiKey,deviceDescriptor:{ttl:o},httpTimeoutMs:n.httpTimeoutMs},c=qi.getAuthTokenLs(),l=c&&c[n.apiKey]&&c[n.apiKey].authToken?c[n.apiKey]:null,u=l&&l.authToken,d=yield t().connectByApiKey(s);if(d.error){let e=new Ja({errorCode:ui.CONNECTION_ISSUE,underlyingBaseError:d.error});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue by api key`}),{error:e}}u&&d.authToken!==u&&(qi.removeAuthTokenLs(n.apiKey),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Removed old session from LS because new api token will not work with old session id`}));let f=l&&d.authToken===l.authToken&&l,p=f?f.tokenExpiresAt:Date.now()+o*1e3;return B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully configure by api key. Token expires at: ${p}`}),t().setApiKeyAuthTokenCollection(n.apiKey,d.authToken,p),e({_isConnectedToPlatform:!0}),t().setStartConfig({host:i.host,isSecure:i.isSecure,apiKey:n.apiKey,port:i.port,httpTimeoutMs:n.httpTimeoutMs}),d})()},configureWithUrl(n){return C(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (configure by url)`}),{error:new Ja({errorCode:ui.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (configure by url)`}),{error:new Ja({errorCode:ui.SCENARIO_IN_PROGRESS})};let r=aa(n);if(!r){let e=`Invalid URL: ${n}`;return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:e}),{error:new Ja({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:e})}}if(!ia(n)){let e=`Missing parameters: authorization`;return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:e}),{error:new Ja({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:e})}}let i=ra(n);i&&(t().removeCurrentSessionDataLsAndStore(),e({_sessionIdFromUrl:i}));let a=yield t().connectByUrl(n);return a.error?(B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue by url: ${a.error.message}`}),{error:new Ja({errorCode:ui.CONNECTION_ISSUE,underlyingBaseError:a.error})}):(e({_isConnectedToPlatform:!0}),t().setStartConfig({host:r.host,isSecure:r.isSecure,port:r.port}),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully configure with url. URL: ${n}`}),a)})()},configureByUserPass(n){return C(function*(){if(!t()._isInitialized)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (configure by user pass)`}),{error:new Ja({errorCode:ui.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (configure by user pass)`}),{error:new Ja({errorCode:ui.SCENARIO_IN_PROGRESS})};let r=[`password`,`userName`,`baseUrl`].filter(e=>!(n!=null&&n[e]));if(r.length>0)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Missing parameters: ${r.join(`, `)}`}),{error:new Ja({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`Missing parameters: ${r.join(`, `)}`})};let i=aa(n.baseUrl);if(!i)return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Invalid URL: ${n.baseUrl}`}),{error:new Ja({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`Invalid URL: ${n.baseUrl}`})};let a={host:i.host,isSecure:i.isSecure,password:n.password,port:i.port,userName:n.userName,httpTimeoutMs:n.httpTimeoutMs},o=yield t().connectByUserPass(a);if(o.error){let e=new Ja({errorCode:ui.CONNECTION_ISSUE,underlyingBaseError:o.error});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue by user pass: ${o.error.message}`}),{error:e}}return B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully configure by user pass`}),e({_isConnectedToPlatform:!0}),t().setStartConfig({host:i.host,isSecure:i.isSecure,port:i.port,httpTimeoutMs:n.httpTimeoutMs}),o})()},getWorkflows(){return C(function*(e={limit:100,skip:0}){if(!t()._isInitialized){let e=new qa({errorCode:li.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (get workflows)`}),{error:e}}if(!t()._isConnectedToPlatform){let e=new qa({errorCode:li.CONNECTION_ISSUE});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue (get workflows)`}),{error:e}}let n=yield t().fetchService.listWorkflows(e);if(n.code!==0){let e=fa(n.code,mi),t=n.data.what,r=new no({errorCode:e}),i=new qa({errorCode:li.WORKFLOW_ISSUE,message:`No workflow list${z(t)&&`: ${t}`}.`,underlyingBaseError:r});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`No workflow list`}),{error:i}}return{results:n.data.items}}).apply(this,arguments)},prepareWorkflowAndPrepareUi(e){return C(function*(){var n;if(!t()._isInitialized){let e=new qa({errorCode:li.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (prepare workflow and prepare ui)`}),{error:e}}if(!t()._isConnectedToPlatform){let e=new qa({errorCode:li.CONNECTION_ISSUE});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue (prepare workflow and prepare ui)`}),{error:e}}if(t().currentScreenConfig){let e=new qa({errorCode:li.SCENARIO_IN_PROGRESS});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (prepare workflow and prepare ui)`}),{error:e}}let r=t()._sessionIdFromUrl,i=yield t().fetchService.getWorkflow(e,r);if(i.code!==0){let e=i.data.what,t=new no(j({errorCode:fa(i.code,mi)},z(e)&&{message:e})),n=new qa({errorCode:li.INTERNAL_ISSUE,underlyingBaseError:t});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Workflow issue${z(e)&&`: ${e}`}.`}),{error:n}}let a=im.fromPlain(i.data);if(`validationErrorMessage`in a){let e=new no({errorCode:mi.DECODING_FAILED,message:a.validationErrorMessage}),t=new qa({errorCode:li.WORKFLOW_ISSUE,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Workflow decoding failed: ${a.validationErrorMessage}`}),{error:t}}B.logSessionEvent({logLevel:R.DEBUG,module:`IDV`,message:`Workflow validated successfully.`});let o=t().externalModules,s=a.stepTemplateIds,{isAllTemplatesSupported:c,unsupportedSteps:l}=Ki(o,s);c||B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Warning. Unsupported steps found: ${l}`});let u=Gi(o,s),d=(n=t().workflow)==null?void 0:n.id;d&&e!==d&&o.forEach(e=>{e.component.deinitialize()});let f=t().modulesConfig;return u.forEach(e=>{e.component.isReady()||e.component.initialize(f)}),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully prepare workflow and prepare ui. Workflow id: ${e}`}),t().setWorkflow(a),{workflow:a}})()},startSession({completion:e,locale:n,metadata:r,location:i}){return C(function*(){var a;if(B.clearSession(),!t()._isInitialized){let e=new Ya({errorCode:di.INITIALIZATION_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Initialization required (start new session)`}),{error:e}}let o=(a=t().workflow)==null?void 0:a.id;if(!o){let e=new Ya({errorCode:di.PREPARED_REQUIRED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Prepared required (start new session)`}),{error:e}}if(t().currentScreenConfig){let e=new Ya({errorCode:di.ALREADY_STARTED});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Scenario in progress (start new session)`}),{error:e}}t().setWorkflowSessionCompletion(t=>{H&&H.close(),e(t)});let s=t().startConfig,c=z(s.apiKey),l=t().apiKeyAuthTokenCollection;if(c&&`tokenExpiresAt`in l){let e=l.tokenExpiresAt&&typeof l.tokenExpiresAt==`number`?l.tokenExpiresAt:0;if(Date.now()>e){B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`API key TTL expired. Trying to connect by api key`});let e=yield t().connectByApiKey({apiKey:s.apiKey,host:s.host,deviceDescriptor:{ttl:t()._ttl},isSecure:s.isSecure,port:s.port,httpTimeoutMs:s.httpTimeoutMs});if(qi.removeAuthTokenLs(s.apiKey),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Removed old session from LS because new api token will not work with old session id`}),e.error){let t=new Qa({errorCode:hi.CONNECTION_ISSUE,underlyingBaseError:e.error});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Connection issue by api key`}),{error:t}}if(e&&`authToken`in e){let n=Date.now()+t()._ttl*1e3;t().setApiKeyAuthTokenCollection(s.apiKey,e.authToken,n),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Successfully connect by api key`})}}}t().setIsProcessing(!0);let u=yield t().fetchService.getConnectionToken(!1);if(!u||typeof u!=`string`){let e=new Qa({errorCode:hi.TOKEN_ERROR}),t=new Ya({errorCode:di.START_SESSION_FAILED,underlyingBaseError:e});return B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Token error`}),{error:t}}B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Successfully get service token`}),t().setServiceSessionToken(u);let d=yield t()._runSocketConnection(u);if(d.error)return{error:d.error};let f=yield t()._continueSession(n);if(`error`in f)return{error:f.error};if(!f.shouldStartNewSession)return{};let p=yield t().waitForStartSession({workflowId:o,locale:n,metadata:r,location:i});return p.error?{error:p.error}:(t().setCurrentSessionDataLsAndStore({isApiKeyConnection:c,sessionId:p.sessionData.id,workflowId:o,locale:p.sessionData.locale}),Tm.startConnectionQualityAssessment({sessionId:p.sessionData.id,rawConfig:p.sessionData.connectionQualityAssessment}),yield t().setNextStep({workflow:p.sessionData.workflow,properties:p.sessionData.properties,nextStepId:p.sessionData.currentStep,locale:p.sessionData.locale}),t().listener({eventType:ai.MESSAGE,module:`IDV`,logLevel:R.INFO,message:ci.DID_START_SESSION}),{})})()},deinitialize(){return C(function*(){if(!t()._isInitialized)return{error:new eo({errorCode:vi.INITIALIZATION_REQUIRED})};if(t().currentScreenConfig)return{error:new eo({errorCode:vi.SCENARIO_IN_PROGRESS})};let n=yield t().deinitializationIdv();return t().resetProps(),e({_isInitialized:!1}),n})()},startIamAuth(e){return C(function*(){return t().setStartConfig({httpTimeoutMs:e.httpTimeoutMs}),yield t().fetchService.startIamAuth(e)})()}});function Dm(e,t,n){let r=n.value;n.value=function(){var e=C(function*(e,t){var n,i;let a=((n=t==null?void 0:t.method)==null?`GET`:n).toUpperCase(),o=t==null||(i=t.headers)==null?void 0:i.authorization,s=yield r.call(this,e,t),c=s.status,l={method:a,url:e,statusCode:c,authHeader:o,response:s.statusText};if(c!==200)return B.logSessionEvent({logLevel:R.ERROR,module:`IDV`,message:JSON.stringify(l)},!0),s;let u=yield s.clone().json();return l=j(j({},l),{},{response:u}),B.logSessionEvent({logLevel:R.DEBUG,module:`IDV`,message:JSON.stringify(l)},!0),s});return function(t,n){return e.apply(this,arguments)}}()}var Om=class{constructor(){this._connectionTokenExpirationBufferMs=6e4,this._httpTimeoutMs=Ei,this._origin=``,this._apiKeyAuthToken={token:``,expiresAt:0},this._connectionToken={token:``,expiresAt:0},this._connect=null,this.abortController=null,this.abortController=null}_setApiKeyAuthToken(e){this._apiKeyAuthToken=e}_setConnectionToken(e){this._connectionToken=e}_getOriginFromConfig(e){return`http${e.isSecure?`s`:``}://${e.host}${e.port?`:${e.port}`:``}`}_getOriginFromUrl(e){try{return new URL(e).origin}catch(e){return``}}_getExpiresAtFromTtl(e){return Date.now()+1e3*e}_getAuthorizationHeaderFromConnectionToken(e){return`Connection ${e}`}_getAuthorizationHeaderFromBasicToken(e){return`Basic ${e}`}_getAuthorizationHeaderFromAuthToken(e){return`Token ${e}`}_getApiKeyAuthTokenFromLs(e){var t,n;let r=qi.getAuthTokenLs(),i=r==null||(t=r[e])==null?void 0:t.authToken,a=Number((r==null||(n=r[e])==null?void 0:n.tokenExpiresAt)||0);return!i||!a||Number.isNaN(a)||a<=Date.now()?null:{token:i,expiresAt:a}}_getApiKeyAuthTokenFromHeader(e){return e.replace(/^Token\s+/i,``)}_requestEphemeralAuthToken(e,t){var n=this;return C(function*(){let r=yield n._fetchEphemeral(e,t);return r.code===0?{code:0,data:{token:n._getApiKeyAuthTokenFromHeader(r.data.authorization),expiresAt:n._getExpiresAtFromTtl(t)}}:r})()}_getValidApiKeyAuthToken(e,t){var n=this;return C(function*(){if(n._apiKeyAuthToken.token)return t||Date.now()<n._apiKeyAuthToken.expiresAt?{code:0,data:n._apiKeyAuthToken}:n._requestEphemeralAuthToken(e.apiKey,e.deviceDescriptor.ttl);let r=n._getApiKeyAuthTokenFromLs(e.apiKey);return r?{code:0,data:r}:n._requestEphemeralAuthToken(e.apiKey,e.deviceDescriptor.ttl)})()}_getResponseTextFromBadResponse(e){return C(function*(){return yield e.text().catch(()=>``)})()}_applyHttpTimeout(e){this._httpTimeoutMs=e&&Number.isFinite(e)&&e>0?e:Ei}_getRequestSignal(e){let t=AbortSignal.timeout(this._httpTimeoutMs);return e?AbortSignal.any([t,e]):t}_httpFetch(e,t){var n=this;return C(function*(){return fetch(e,j(j({},t),{},{signal:n._getRequestSignal(t==null?void 0:t.signal)}))})()}_fetchAndHandleResponse({method:e,url:t,headers:n,body:r,signal:i,validate:a}){var o=this;return C(function*(){let s;try{s=yield o._httpFetch(t,{method:e,headers:n,body:r,signal:i})}catch(n){return{code:4,data:{httpCode:0,method:e,url:t,what:da(n)}}}let c={httpCode:s.status,method:e,url:t};if(!s.ok){let e=yield o._getResponseTextFromBadResponse(s);return e&&(c.what=e),{code:5,data:c}}try{let e=yield s.json();if(!e)return{code:6,data:c};let t=a==null?void 0:a(e);return t&&!t.ok?(t.what&&(c.what=t.what),{code:6,data:c}):{code:0,data:e}}catch(e){return c.what=da(e),{code:6,data:c}}})()}_fetchPing(){var e=this;return C(function*(){return yield e._fetchAndHandleResponse({method:`GET`,url:`${e._origin}/api/ping`,validate:e=>({ok:e.status===`OK`})})})()}_fetchMe(e){var t=this;return C(function*(){return yield t._fetchAndHandleResponse({method:`GET`,url:`${t._origin}/api/user/me`,headers:{authorization:e}})})()}_fetchConnection(e,t){var n=this;return C(function*(){let r=yield n._fetchAndHandleResponse({method:`POST`,url:`${n._origin}/api/device/connection`,headers:{authorization:e,"content-type":`application/json`},body:JSON.stringify(j(j({},sa()),t&&{sessionId:t})),validate:e=>e.token?e.expiresAt?{ok:!0}:{ok:!1,what:`Connection expiresAt is missing`}:{ok:!1,what:`Connection token is missing`}});return r.code===0?{code:0,data:{token:r.data.token,expiresAt:+new Date(r.data.expiresAt),workflows:r.data.workflows}}:r})()}_fetchEphemeral(e,t){var n=this;return C(function*(){return n._fetchAndHandleResponse({method:`POST`,url:`${n._origin}/api/device/ephemeral`,headers:{authorization:`ApiKey ${e}`,"content-type":`application/json`},body:JSON.stringify({ttl:t}),validate:e=>({ok:!!e.authorization})})})()}_fetchSessionState(e,t,n){var r=this;return C(function*(){return r._fetchAndHandleResponse({method:`GET`,url:`${r._origin}/api/sessions/${t}${n?`?locale=${n}`:``}`,headers:{authorization:e,"content-type":`application/json`}})})()}connectByUserPass(e){var t=this;return C(function*(){t._applyHttpTimeout(e.httpTimeoutMs),t._connect={type:`byUserPass`,arg:e},t._origin=t._getOriginFromConfig(e);let n=yield t._fetchPing();if(n.code!==0)return n;let r=`${btoa(`${e.userName}:${e.password}`)}`,i=t._getAuthorizationHeaderFromBasicToken(r),a=yield t._fetchMe(i);if(a.code!==0)return a;let o=yield t._fetchConnection(i);return o.code===0?(t._setConnectionToken(o.data),i=t._getAuthorizationHeaderFromConnectionToken(o.data.token),a=yield t._fetchMe(i),a.code===0?{code:0,data:{workflows:o.data.workflows}}:a):o})()}connectByApiKey(e,t){var n=this;return C(function*(){n._applyHttpTimeout(e.httpTimeoutMs),n._connect={type:`byApiKey`,arg:e},n._origin=n._getOriginFromConfig(e);let r=yield n._fetchPing();if(r.code!==0)return r;let i=yield n._getValidApiKeyAuthToken(e,t);if(i.code!==0)return i;n._setApiKeyAuthToken(i.data);let a=n._getAuthorizationHeaderFromAuthToken(i.data.token),o=yield n._fetchMe(a);if(o.code!==0)return o;let s=yield n._fetchConnection(a);return s.code===0?(n._setConnectionToken(s.data),a=n._getAuthorizationHeaderFromConnectionToken(s.data.token),o=yield n._fetchMe(a),o.code===0?{code:0,data:{authToken:i.data.token,workflows:s.data.workflows}}:o):s})()}connectByUrl(e){var t=this;return C(function*(){t._connect={type:`byUrl`,arg:e},t._origin=t._getOriginFromUrl(e);let n=ra(e),r=ia(e),i=yield t._fetchPing();if(i.code!==0)return i;let a=yield t._fetchMe(r);if(a.code!==0)return a;let o=yield t._fetchConnection(r,n);return o.code===0?(t._setConnectionToken(o.data),r=t._getAuthorizationHeaderFromConnectionToken(o.data.token),a=yield t._fetchMe(r),a.code===0?{code:0,data:{workflows:o.data.workflows}}:a):o})()}getConnectionToken(e){var t=this;return C(function*(){var n,r,i;return+new Date<+new Date(t._connectionToken.expiresAt)-t._connectionTokenExpirationBufferMs?t._connectionToken.token:((n=t._connect)==null?void 0:n.type)===`byUserPass`?(yield t.connectByUserPass(t._connect.arg),t._connectionToken.token):((r=t._connect)==null?void 0:r.type)===`byApiKey`?(yield t.connectByApiKey(t._connect.arg,e),t._connectionToken.token):((i=t._connect)==null?void 0:i.type)===`byUrl`?(yield t.connectByUrl(t._connect.arg),t._connectionToken.token):``})()}startSession({workflowId:e,locale:t,metadata:n,location:r}){var i=this;return C(function*(){let a={locale:t};Qi(n)&&(a.metadata=n),r&&(a.location=r);let o=yield i.getConnectionToken(!1),s=i._getAuthorizationHeaderFromConnectionToken(o);return yield i._fetchAndHandleResponse({method:`POST`,url:`${i._origin}/api/sessions?workflowId=${e}`,headers:{authorization:s,"content-type":`application/json`},body:JSON.stringify(a)})})()}continueSession({sessionId:e,locale:t}){var n=this;return C(function*(){let r=yield n.getConnectionToken(!1),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionState(i,e,t)})()}listWorkflows(){var e=this;return C(function*(t={limit:0,skip:0}){let n=yield e.getConnectionToken(!1),r=e._getAuthorizationHeaderFromConnectionToken(n),i=new URL(`${e._origin}/api/workflows`);return typeof t.limit==`number`&&t.limit>=0&&i.searchParams.set(`limit`,String(t.limit)),typeof t.skip==`number`&&t.skip>=0&&i.searchParams.set(`skip`,String(t.skip)),yield e._fetchAndHandleResponse({method:`GET`,url:i.toString(),headers:{authorization:r}})}).apply(this,arguments)}getWorkflow(e,t,n){var r=this;return C(function*(){let i=yield r.getConnectionToken(!1),a=r._getAuthorizationHeaderFromConnectionToken(i);if(t){let e=yield r._fetchSessionState(a,t,n);return e.code!==0||!Ji(e.data)?e:{code:0,data:e.data.workflow}}return yield r._fetchAndHandleResponse({method:`GET`,url:`${r._origin}/api/workflows/${e}?renderClient=true`,headers:{authorization:a}})})()}pushData({sessionId:e,stepId:t,data:n,type:r}){var i=this;return C(function*(){let a=yield i.getConnectionToken(!0),o=i._getAuthorizationHeaderFromConnectionToken(a),s=new URLSearchParams(j({},r&&{type:r})).toString(),c=`${i._origin}/api/sessions/${e}/step/${t}${s?`?${s}`:``}`;return yield i._fetchAndHandleResponse({method:`POST`,url:c,headers:{authorization:o,"content-type":`application/json`},body:JSON.stringify(n)})})()}getSessionState(e,t){var n=this;return C(function*(){let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchSessionState(i,e,t)})()}pushLogs(e,t){var n=this;return C(function*(){let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r);return yield n._fetchAndHandleResponse({method:`POST`,url:`${n._origin}/api/sessions/${e}/logs`,headers:{authorization:i,"content-type":`application/json`},body:JSON.stringify(t.body)})})()}startIamAuth({applicationId:e,baseUrl:t,metadata:n,locale:r,httpTimeoutMs:i}){var a=this;return C(function*(){a._applyHttpTimeout(i);let o={applicationId:e};return Qi(n)&&(o.metadata=n),r&&(o.locale=r),yield a._fetchAndHandleResponse({method:`POST`,url:`${t}/api/v1/iam/auth/start`,headers:{"content-type":`application/json`},body:JSON.stringify(o)})})()}_startUpload({authorizationHeader:e,body:t}){var n=this;return C(function*(){return n.abortController||(n.abortController=new AbortController),yield n._fetchAndHandleResponse({method:`POST`,url:`${n._origin}/api/v1/files/start-upload`,headers:{"Content-Type":`application/json`,authorization:e},body:JSON.stringify(t),signal:n.abortController.signal})})()}_uploadFileChunk({authorizationHeader:e,uploadId:t,sha256:n,contentRange:r,body:i}){var a=this;return C(function*(){var o;let s=(o=a.abortController)==null?void 0:o.signal,c=`POST`,l=new URL(`${a._origin}/api/v1/files`);l.searchParams.set(`uploadId`,t),l.searchParams.set(`sha256`,n);let u=l.toString(),d={"Content-Type":`application/octet-stream`,"Content-Range":r,authorization:e},f;try{f=yield a._httpFetch(u,{method:c,signal:s,headers:d,body:i})}catch(e){return{code:4,data:{httpCode:0,method:c,url:u,what:da(e)}}}let p={httpCode:f.status,method:c,url:u};if(f.status===204)return{code:0,data:{}};if(f.status===200)try{let e=yield f.json();return{code:0,data:e==null?{}:e}}catch(e){return p.what=da(e),{code:6,data:p}}let m=yield a._getResponseTextFromBadResponse(f);return m&&(p.what=m),{code:5,data:p}})()}_uploadFileInChunks({authorizationHeader:e,file:t,chunkSize:n,uploadId:r,onProgress:i}){var a=this;return C(function*(){let o=t.size,s=0,c=``,l=`POST`,u=`${a._origin}/api/v1/files`;try{for(;s<o;){var d;if((d=a.abortController)!=null&&(d=d.signal)!=null&&d.aborted)return{code:4,data:{httpCode:0,method:l,url:u,what:`Aborted`}};let f=Math.min(s+n,o),p=yield t.slice(s,f).arrayBuffer(),m=yield ma(p),h=`bytes ${s}-${f-1}/${o}`,g=yield a._uploadFileChunk({authorizationHeader:e,uploadId:r,sha256:m,contentRange:h,body:p});if(g.code!==0)return g;s=f,i(s,o),g.data.tempFileId&&(c=g.data.tempFileId)}return c?{code:0,data:{tempFileId:c}}:{code:5,data:{httpCode:0,method:l,url:u,what:`upload finished without tempFileId`}}}catch(e){return{code:4,data:{httpCode:0,method:l,url:u,what:da(e)}}}})()}uploadFileToTemp(e,t){var n=this;return C(function*(){try{let r=yield n.getConnectionToken(!0),i=n._getAuthorizationHeaderFromConnectionToken(r),a={name:e.name,size:e.size},o=yield n._startUpload({authorizationHeader:i,body:a});if(o.code!==0)return o;let{uploadId:s,chunkSize:c}=o.data;return yield n._uploadFileInChunks({authorizationHeader:i,file:e,chunkSize:c,uploadId:s,onProgress:t})}finally{n.abortController=null}})()}abortRequest(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};$([Dm,Q(`design:type`,Function),Q(`design:paramtypes`,[Object,typeof RequestInit>`u`?Object:RequestInit]),Q(`design:returntype`,Promise)],Om.prototype,`_httpFetch`,null);var km,Am=3e4,jm=class e{static isImageLike(e){return typeof e.imageURL==`string`||typeof e.imageId==`string`||typeof e.base64==`string`}static collectAssets(e,t){let n=[],r=e=>{if(!e||typeof e!=`object`)return;if(Array.isArray(e)){for(let t of e)r(t);return}let i=e,a=t(i);if(a)n.push(a);else for(let e of Object.values(i))r(e)};return r(e),n}static collectAssetsOfGuiModule(e){return this.collectAssets(e,e=>e.prepareRequired&&this.isImageLike(e)?e:null)}static collectAssetsOfExternalModule(e){return this.collectAssets(e,e=>{let t=e.idvAsset;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=t;if(this.isImageLike(e))return e}return null})}static checkImage(e,t){var n=this;return C(function*(){if(!t||e.prepareRequired){if(e.base64){if(yield n.checkImageBySrc(e.base64,e.timeout))return;if(n.failedAssets.base64.add(e.base64),e.failurePolicy===`error`){n.failedAssets.blockingAssets.add(`base64 string`);return}}if(!e.imageId){if(e.imageURL){if(yield n.checkImageBySrc(e.imageURL,e.timeout))return;if(n.failedAssets.imageURL.add(e.imageURL),e.failurePolicy===`error`){n.failedAssets.blockingAssets.add(e.imageURL);return}}if(e.failurePolicy===`placeholderImage`){let r=e.placeholderImage;r&&(yield n.checkImage(r,t))}}}})()}static checkImageBySrc(t,n){return C(function*(){return new Promise(r=>{let i=null,a=null,o=!1,s=n?n*1e3:Am,c=e=>{o||(o=!0,l(),r(e))},l=()=>{a!==null&&(clearTimeout(a),a=null),i&&(i.onload=null,i.onerror=null,i=null)};try{if(t.length===0)return c(!1);a=setTimeout(()=>c(!1),s),i=new Image,i.onload=C(function*(){if(!(i!=null&&i.decode))return c(!0);try{yield i.decode()}catch(e){}e.decodedImages.set(t,i),c(!0)}),i.onerror=()=>c(!1),i.src=t}catch(e){c(!1)}})})()}static warmupModuleImages(t,n){var r=this;return C(function*(){if(!t)return r.failedAssets;let i;n?i=e.collectAssetsOfGuiModule(t):(t.preloadAssetsRequired!==!0&&(i=[]),i=e.collectAssetsOfExternalModule(t));let a=i.map(t=>e.checkImage(t,n));return yield Promise.allSettled(a),r.failedAssets})()}static clearFailedAssets(){this.decodedImages.clear(),this.failedAssets={imageURL:new Set,base64:new Set,blockingAssets:new Set}}};km=jm,km.decodedImages=new Map,km.failedAssets={imageURL:new Set,base64:new Set,blockingAssets:new Set};var Mm=(e,t)=>({fetchService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitFetchService:function(){var t=C(function*(){e({fetchService:new Om})});return function(){return t.apply(this,arguments)}}(),setFinalWaitingUi:t=>{e({isFinalWaitingUi:t})},connectByApiKey(e){return C(function*(){let n=yield t().fetchService.connectByApiKey(e,!1);if(n.code!==0){let e=fa(n.code,yi),t=n.data.what,r=new Xa(j({errorCode:e},z(t)&&{message:t}));return{error:new Ka({errorCode:pi.CONNECTION_ISSUE,underlyingBaseError:r})}}return n.data})()},connectByUserPass(e){return C(function*(){let n=yield t().fetchService.connectByUserPass(e);if(n.code!==0){let e=fa(n.code,yi),t=n.data.what;return{error:new Xa(j({errorCode:e},z(t)&&{message:t}))}}return{workflows:n.data.workflows}})()},connectByUrl(e){return C(function*(){let n=yield t().fetchService.connectByUrl(e);if(n.code!==0){let e=fa(n.code,yi),t=n.data.what,r=new Xa(j({errorCode:e},z(t)&&{message:t}));return{workflows:[],error:new Ka({errorCode:pi.CONNECTION_ISSUE,underlyingBaseError:r})}}return{workflows:n.data.workflows}})()},workflowSessionCompletion:()=>{},setWorkflowSessionCompletion:n=>{let r=e=>{var r;let i=(r=t().currentSessionData)==null?void 0:r.sessionId,a=j({results:j(j({},e.results),{},{sessionId:i})},e.error&&{error:e.error});if(Tm.isMonitoring&&Tm.stopConnectionQualityAssessment(),t().removeCurrentSessionDataLsAndStore(),n(a),e.error){let n=JSON.stringify(e.error);t().fetchService.pushLogs(i,{body:{log:n,errorCode:e.error.shortChain,deviceInfo:{platform:`Web`}}})}};e(()=>({workflowSessionCompletion:r}))},loadModules:function(){var n=C(function*(n){try{let t=yield Nm(n);return e(()=>({externalModules:t})),{}}catch(e){return t().resetFetchService(),t().resetProps(),{error:new Ga({errorCode:fi.MODULES_INSTANTIATION_FAILURE})}}});return function(e){return n.apply(this,arguments)}}(),setIsProcessing:t=>{e({isProcessing:t})},getProcessingTemplate:()=>{var e;let n=t().workflow;if(!n)return null;let r=n.client.steps,i=Ii((e=r.find(e=>e.templateId===`GENERIC_PROGRESS`))==null?r.find(e=>e.templateId===Si):e);if(!i)return null;let a=n.client.layout,o=Li(i.templateLayout,a);return o&&(i.templateLayout=o),i},_pushStep:function(){var e=C(function*(e,n,r){let i=null;return yield Bi(function(){var a=C(function*(){var a;let o=(a=t().currentSessionData)==null?void 0:a.sessionId,s=yield t().fetchService.pushData({sessionId:o,stepId:e,data:n,type:r}),c=null;if(s.code===4&&(c=gi.HTTP_ISSUE),s.code!==0&&s.code!==4&&(c=gi.PROVIDER_ERROR),c!==null){let e=new Za({errorCode:gi.HTTP_ISSUE});i=new Ya({errorCode:di.INTERNAL_ISSUE,message:`Error from external module`,underlyingBaseError:e})}return s.code===0?(i=null,s):null});return function(){return a.apply(this,arguments)}}(),()=>null),i?{error:i}:{}});return function(t,n,r){return e.apply(this,arguments)}}(),_findStepById:e=>{let n=t().workflow;if(!n||!e)return null;let r=n.steps.find(t=>t.id===e);return r==null?null:r},_getSessionStateNextStepConditionResult:function(){var e=C(function*(){let e=t().currentSessionData,n=e==null?void 0:e.sessionId,r=e==null?void 0:e.locale,i=yield t().fetchService.getSessionState(n,r),a=i.code;if(a!==0){let e=fa(a,gi),t=i.data.what;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Get session: Failed to get session (from HTTP Get)${z(t)&&`: ${t}`}.`});let n=new Za(j({errorCode:e},z(t)&&{message:t}));return{error:new Ya({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:n}),shouldRetry:!0}}B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Get session: Session data successfully received (from HTTP Get).`});let o=t()._validateSession(i.data);if(`validationErrorMessage`in o){let e=new Za({errorCode:gi.DECODING_FAILED});return{error:new Ya({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:e}),shouldRetry:!0}}let s=o.currentStep,c=o.workflow.steps.find(e=>e.id===s),l=o.isProcessingFiles,u=Ui(c),d=null;if(u&&(d=gi.NOT_DATA_TYPE),l&&(d=gi.IS_PROCESSING),d!==null){(u||l)&&B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Get session: Session is still in processing state (from HTTP Get).`});let e=new Za({errorCode:d});return{error:new Ya({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:e}),shouldRetry:!0}}return{session:o}});return function(){return e.apply(this,arguments)}}(),waitForStartSession(e){return C(function*(){let n,r;if(yield new Promise(i=>{let a=!1,o=()=>{a||(a=!0,H.clearSubscriptions(),i())},s=function(){var i=C(function*(){let i=yield t().fetchService.startSession(e);if(!a){if(i.code!==0){let e=i.data.what;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Start session failed (from HTTP Post)${z(e)&&`: ${e}`}.`});let t=new Qa(j({errorCode:fa(i.code,hi)},z(e)&&{message:e}));r=new Ya({errorCode:di.START_SESSION_FAILED,underlyingBaseError:t}),o()}else B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Start session: session data successfully received (from HTTP Post).`}),n=i.data,o()}});return function(){return i.apply(this,arguments)}}();H.clearSubscriptions(),H.subscribeToMessage(e=>{var t,i;if(a)return;let s=H.decodeMessage(e);if(s&&(s==null?void 0:s.eventType)===`SESSION_STARTED`){if(s.error){let e=s.error.message;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Start session failed (from WebSocket)${z(e)&&`: ${e}`}.`});let t=new $a(j({errorCode:pa(s.error.code)},z(e)&&{message:e})),n=new Qa({errorCode:hi.PROVIDER_ERROR,underlyingBaseError:t});r=new Ya({errorCode:di.START_SESSION_FAILED,underlyingBaseError:n}),o()}else(t=s.options)!=null&&t.session&&(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Start session: session data successfully received (from WebSocket).`}),n=(i=s.options)==null?void 0:i.session,o())}}),s()}),r)return{error:r};let i=t()._validateSession(n);if(`validationErrorMessage`in i){let e=new Qa({errorCode:hi.DECODING_FAILED,message:i.validationErrorMessage});return{error:new Ya({errorCode:di.START_SESSION_FAILED,underlyingBaseError:e})}}return{sessionData:i}})()},waitForContinueSession({sessionId:e,locale:n}){return C(function*(){let r,i;if(yield new Promise(a=>{let o=!1,s=()=>{o||(o=!0,H.clearSubscriptions(),a())},c=function(){var a=C(function*(){let a=yield t().fetchService.continueSession({sessionId:e,locale:n});if(!o){if(a.code!==0){let e=a.data.what;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Continue session failed (from HTTP Get)${z(e)&&`: ${e}`}.`});let t=new Qa(j({errorCode:fa(a.code,hi)},z(e)&&{message:e}));i=new Ya({errorCode:di.START_SESSION_FAILED,underlyingBaseError:t}),s()}else B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session: session data successfully received (from HTTP Get).`}),r=a.data,s()}});return function(){return a.apply(this,arguments)}}();H.clearSubscriptions(),H.subscribeToMessage(e=>{var t,n;if(o)return;let a=H.decodeMessage(e);if(a&&[`SESSION_STATE`,`SESSION_UPDATED`].includes(a==null?void 0:a.eventType)){if(a.error){let e=a.error.message;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Continue session failed (from WebSocket)${z(e)&&`: ${e}`}.`});let t=new $a(j({errorCode:pa(a.error.code)},z(e)&&{message:e})),n=new Qa({errorCode:hi.PROVIDER_ERROR,underlyingBaseError:t});i=new Ya({errorCode:di.START_SESSION_FAILED,underlyingBaseError:n}),s()}else(t=a.options)!=null&&t.session&&(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Continue session: session data successfully received (from WebSocket).`}),r=(n=a.options)==null?void 0:n.session,s())}}),H.subscribeToReconnect(()=>{H.sendSessionGetMessage({sessionId:e,locale:n})}),H.sendSessionGetMessage({sessionId:e,locale:n}),c()}),i)return{error:i};let a=t()._validateSession(r);if(`validationErrorMessage`in a){let e=new Qa({errorCode:hi.DECODING_FAILED,message:a.validationErrorMessage});return{error:new Ya({errorCode:di.START_SESSION_FAILED,underlyingBaseError:e})}}return{sessionData:a}})()},_waitForNextStep:()=>{var e;let n,r,i=!1,a=()=>{},o=()=>{},s=((e=t().workflow)==null||(e=e.client)==null?void 0:e.sessionUpdateTimeout)||60;return new Promise(e=>{let c=1e4,l=Math.round(s*1e3/c),u=0,d,f=!1,p=!1,m=()=>{f||(f=!0,clearTimeout(d),H.clearSubscriptions(),e())};a=()=>{f||p||(p=!0,h({isDeferred:!0}))},o=()=>{f||(i=!0,m())};let h=function(){var e=C(function*({isDeferred:e}){if(f)return;if(e){d=window.setTimeout(()=>{B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: no WebSocket message received, falling back to HTTP Get.`}),h({isDeferred:!1})},c);return}B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: HTTP Get attempt ${u+1}/${l}.`});let i=yield t()._getSessionStateNextStepConditionResult();if(!f){if(u++,`shouldRetry`in i&&u<l){let e=`Wait for next step: retryable error (attempt ${u}/${l}), waiting for next HTTP Get.`;B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:e}),d=window.setTimeout(()=>{h({isDeferred:!1})},c)}else`session`in i?n=i.session:i.error&&(B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Wait for next step: failed to get next step after ${u}/${l} HTTP Get attempts.`}),r=i.error),m()}});return function(t){return e.apply(this,arguments)}}();H.clearSubscriptions(),H.subscribeToMessage(e=>{var i;if(f)return;let a=H.decodeMessage(e);if(!a||![`SESSION_UPDATED`,`SESSION_STATE`].includes(a==null?void 0:a.eventType))return;if(a.error){let e=a.error.message;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Wait for next step failed (from WebSocket)${z(e)&&`: ${e}`}.`});let t=new $a(j({errorCode:pa(a.error.code)},z(e)&&{message:e})),n=new Za({errorCode:gi.PROVIDER_ERROR,underlyingBaseError:t});r=new Ya({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:n}),m();return}let o=(i=a.options)==null?void 0:i.session;if(!o){h({isDeferred:!1});return}let s=t()._validateSession(o);`validationErrorMessage`in s?(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: invalid session from WebSocket, falling back to HTTP Get.`}),clearTimeout(d),h({isDeferred:!1})):Wi(s)||(B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: session data successfully received (from WebSocket).`}),n=s,m())}),H.subscribeToReconnect(()=>{var e,n;B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Wait for next step: WebSocket reconnected, requesting session via WebSocket.`});let r=(e=t().currentSessionData)==null?void 0:e.sessionId,i=(n=t().currentSessionData)==null?void 0:n.locale;H.sendSessionGetMessage({sessionId:r,locale:i})})}).then(C(function*(){if(!i){if(r)t().workflowSessionCompletion({error:r}),t().resetSession();else if(n){let{workflow:e,properties:r,currentStep:i,locale:a}=n;yield t().setNextStep({workflow:e,properties:r,nextStepId:i,locale:a})}}})),{startHttpTimer:a,cancel:o}},_setFinalStepAndStopProcess:e=>{let n=e||t().currentStepId;if(!n)return;let r=t()._findStepById(n);r&&(t().workflowSessionCompletion({results:{finalStep:{id:r.id,name:r.name,final:r.releaseClientApp}}}),t().resetSession(),t().listener({eventType:ai.MESSAGE,logLevel:R.INFO,message:ci.DID_END_SESSION,module:`IDV`}))},_setIamAuthCodeAndStopProcess:e=>{var n,r;let i=e=>{if(!$i(e))return null;let{message:t,code:n}=e;return typeof t==`string`&&t.toLowerCase()!==`none`?t:typeof n==`string`&&n.toLowerCase()!==`none`?n:null},a=(n=e.dataSource)==null?void 0:n.code,o=i((r=e.dataSource)==null?void 0:r.error);t().workflowSessionCompletion({results:{iamAuthCode:{code:a,error:o}}}),t().resetSession(),t().listener({eventType:ai.MESSAGE,logLevel:R.INFO,message:ci.DID_END_SESSION,module:`IDV`})},_redirectUsingFormSubmit:(e,t)=>{let n=document.createElement(`form`);n.method=`POST`,n.action=e,n.hidden=!0;let r=document.createElement(`input`);r.type=`hidden`,r.name=`authorization`,r.value=`Connection ${t}`,n.append(r),document.body.append(n),n.submit()},_redirectAndStopProcess:function(){var e=C(function*(e){var n,r;t().setIsProcessing(!0),t()._stepSocketListenerWhenStepIsRunning(!1);let i=(n=e.dataSource)==null?void 0:n.url,a=yield(r=t().fetchService)==null?void 0:r.getConnectionToken(!0);if(!ka(i)||!a){let e=[];i?ka(i)||e.push(`redirect URL is invalid`):e.push(`redirect URL is missing`),a||e.push(`authorization token is missing`);let n=new Ya({errorCode:di.INTERNAL_ISSUE,message:`Redirect failed: ${e.join(`, `)}`});t().workflowSessionCompletion({error:n}),t().resetSession()}else t()._setFinalStepAndStopProcess(e.id),t()._redirectUsingFormSubmit(i,a)});return function(t){return e.apply(this,arguments)}}(),_stepSocketListenerWhenStepIsRunning:e=>{if(!e){H.clearSubscriptions();return}let n=e=>e===t().currentStepId,r=function(){var e=C(function*(){let e,r=0;for(;r<5&&(r>0&&(yield Oa(1e3*r)),r++,e=yield t()._getSessionStateNextStepConditionResult(),`shouldRetry`in e&&e.shouldRetry););if(e&&`error`in e&&e.error)H.clearSubscriptions(),t().workflowSessionCompletion({error:e.error}),t().resetSession();else if(e&&`session`in e&&!n(e.session.currentStep)){H.clearSubscriptions();let{workflow:n,properties:r,currentStep:i,locale:a}=e.session;yield t().setNextStep({workflow:n,properties:r,nextStepId:i,locale:a})}});return function(){return e.apply(this,arguments)}}(),i=function(){var e=C(function*(e){var i;let a=H.decodeMessage(e);if(!a)return;let{eventType:o}=a;if(![`SESSION_UPDATED`,`DEVICE_TRANSFERRED`].includes(o))return;if(a.error){let e=a.error.message;B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`Error (from WebSocket)${z(e)&&`: ${e}`}.`});let n=new $a(j({errorCode:pa(a.error.code)},z(e)&&{message:e})),r=new Za({errorCode:gi.PROVIDER_ERROR,underlyingBaseError:n}),i=new Ya({errorCode:di.INTERNAL_ISSUE,underlyingBaseError:r});H.clearSubscriptions(),t().workflowSessionCompletion({error:i}),t().resetSession();return}H.clearSubscriptions();let s=(i=a.options)==null?void 0:i.session;if(s){let e=t()._validateSession(s);if(!(`validationErrorMessage`in e)&&!Wi(e)&&!n(e.currentStep)){let{workflow:n,properties:r,currentStep:i,locale:a}=e;yield t().setNextStep({workflow:n,properties:r,nextStepId:i,locale:a});return}}yield r()});return function(t){return e.apply(this,arguments)}}(),a=function(){var e=C(function*(){yield r()});return function(){return e.apply(this,arguments)}}();H.clearSubscriptions(),H.subscribeToMessage(i),H.subscribeToReconnect(a)},setNextStep:function(){var e=C(function*({workflow:e,properties:n,nextStepId:r,locale:i}){t().setWorkflow(e),t().setSessionProperties(n),i&&t().setLocale(i),t().setCurrentStepId(r),B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Attempting to set next step: ${r}`});let a=e.steps.find(e=>e.id===r);if(Ui(a)){B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Step type is PROCESSING, stepId: ${r}, waiting for next step...`}),t()._waitForNextStep().startHttpTimer();return}let o=e=>!!e&&Object.prototype.toString.call(e)===`[object Object]`&&e.templateId;a!=null&&a.releaseClientApp&&(a==null?void 0:a.type)===si.IAM_AUTH_CODE?t()._setIamAuthCodeAndStopProcess(a):a!=null&&a.releaseClientApp&&(a==null?void 0:a.type)===si.REDIRECT?yield t()._redirectAndStopProcess(a):a!=null&&a.releaseClientApp&&!o(a.client)?t()._setFinalStepAndStopProcess(a.id):(a!=null&&a.releaseClientApp&&o(a.client)&&t().setFinalWaitingUi(!0),yield t()._prepareScreenConfigAndShowStep(r),t().setIsProcessing(!1),B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`Next step successfully set: ${r}`}),t()._stepSocketListenerWhenStepIsRunning(!0))});return function(t){return e.apply(this,arguments)}}(),pushStepWaitNextStepAndSet:function(){var e=C(function*(e,n){var r;t()._stepSocketListenerWhenStepIsRunning(!1);let i=t().currentStepId;if(!i)return;if(t().setIsProcessing(!0),((r=t().workflow)==null||(r=r.logging)==null?void 0:r.level)===oi.INFO){var a;let e=B.cutCurrentStepLogs(i),n=(a=t().currentSessionData)==null?void 0:a.sessionId;t().fetchService.pushLogs(n,{body:{step:i,log:e,deviceInfo:{platform:`Web`}}}).catch(()=>{})}if(t().isFinalWaitingUi){t()._setFinalStepAndStopProcess();return}if(e.errorEnumName){let n=e,r=new Ya({errorCode:di.MODULES_ISSUE,message:`Error from external module`,underlyingBaseError:n});t().workflowSessionCompletion({error:r}),t().resetSession();return}let o=t()._waitForNextStep(),s=yield t()._pushStep(i,e,n);s.error?(o.cancel(),t().workflowSessionCompletion({error:s.error}),t().resetSession()):o.startHttpTimer()});return function(t,n){return e.apply(this,arguments)}}(),_prepareScreenConfigAndShowStep:function(){var n=C(function*(n){var r,i,a,o;if(!n)return e(()=>({currentScreenConfig:null}));let s=t().workflow;if(!s)return e(()=>({currentScreenConfig:null}));let c=t().sessionProperties,l=null,u=t()._findStepById(n);if(typeof(u==null||(r=u.client)==null?void 0:r.templateId)==`string`){var d;l=j(j({},u.client),{},{templateId:u.client.templateId,dataSource:(d=u.dataSource)==null?null:d,properties:c,stepType:u.type,locale:t().locale})}if(l){var f;l.sessionId=(f=t().currentSessionData)==null?void 0:f.sessionId,l.serviceToken=t().serviceToken}if(l&&$i(u==null||(i=u.client)==null?void 0:i.templateLayout)){let e=s.client.layout,t=Li(u.client.templateLayout,e);t&&(l.templateLayout=t)}let p=Hi(t().externalModules,s.steps,n);if(l===null||!p){let n=new Ya({errorCode:di.UNKNOWN_STEP,message:`Unsupported step template`});t().workflowSessionCompletion({error:n}),e(()=>({currentScreenConfig:null})),t().resetSession();return}jm.clearFailedAssets(),l=Ea(l);let m=t().externalModules.find(e=>e.id===`idv-gui`),h=!!(m!=null&&(a=m.supportedTemplates)!=null&&a.includes(l.templateId)),g=yield jm.warmupModuleImages(l,h);if(h){let e=t().fetchService;l=j(j({},l),{},{uploadFileToTemp:e==null?void 0:e.uploadFileToTemp.bind(e),abortRequest:e==null?void 0:e.abortRequest.bind(e)})}l=j(j({},l),{},{failedAssets:g});let _=(o=t().currentScreenConfig)==null?void 0:o.templateId;if(typeof _==`string`){let e=t().externalModules.find(e=>e.supportedTemplates.includes(_));try{var v;typeof(e==null||(v=e.component)==null?void 0:v.cancel)==`function`&&e.component.cancel()}catch(t){var y,b;B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`Failed to cancel previous module (${(y=e==null||(b=e.component)==null?void 0:b.displayName)==null?`unknown`:y}): ${da(t)}`})}}e(()=>({currentScreenConfig:l}))});return function(e){return n.apply(this,arguments)}}(),deinitializationIdv:function(){var e=C(function*(){return Tm.isMonitoring&&Tm.stopConnectionQualityAssessment(),Tm.clearConfig(),H.close(),t().resetFetchService(),t().externalModules.forEach(e=>{e.component.deinitialize&&e.component.isReady&&e.component.deinitialize()}),{}});return function(){return e.apply(this,arguments)}}(),resetSession:()=>e(()=>({isFinalWaitingUi:!1,isProcessing:!1,currentStepId:null,currentScreenConfig:null,workflow:null,serviceToken:void 0})),resetFetchService:()=>e(()=>({fetchService:null})),_validateSession:e=>{let t=cm.fromPlain(e);return`validationErrorMessage`in t?B.logSessionEvent({logLevel:R.DEBUG,module:`IDV`,message:`Session data validation failed: ${JSON.stringify(t.validationErrorMessage)}`}):B.logSessionEvent({logLevel:R.DEBUG,module:`IDV`,message:`Session data validated successfully.`}),t}});function Nm(e){return Pm.apply(this,arguments)}function Pm(){return Pm=C(function*(e){let t=[];for(let n of e)n&&t.push({id:n.getIdentifier(),supportedTemplates:n.getSupportedTemplates(),component:n});return t.filter(e=>e!==null)}),Pm.apply(this,arguments)}var Fm=Gr((...e)=>j(j(j({},Sa(...e)),Em(...e)),Mm(...e))),Im=e=>/^[a-z][a-z0-9]*-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)&&e.length<=100,Lm=(e,t)=>{if(!Im(e))throw Error(`Invalid component name: ${e}`);let n=document.createElement(e);return n.style.width=`100%`,n.style.height=`100%`,n.setProps(t),n},Rm=class{constructor(e){this.isPortrait=!1,this.isLandscape=!1,this.orientation=`portrait`,this._handleOrientationChange=()=>{let e=this._getOrientation();this.orientation!==e&&(this.orientation=e,this.isPortrait=this.orientation===`portrait`,this.isLandscape=this.orientation===`landscape`,this.host.requestUpdate())},(this.host=e).addController(this)}_getOrientation(){return window.matchMedia(`(orientation: landscape)`).matches?`landscape`:`portrait`}hostConnected(){typeof window<`u`&&(this._handleOrientationChange(),window.addEventListener(`load`,this._handleOrientationChange),window.addEventListener(`resize`,this._handleOrientationChange))}hostDisconnected(){typeof window<`u`&&(window.removeEventListener(`load`,this._handleOrientationChange),window.removeEventListener(`resize`,this._handleOrientationChange))}},zm=c(((e,t)=>{t.exports=(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(e,t,n){"use strict";e.exports={BROWSER_TYPES:{CHROME:`Chrome`,FIREFOX:`Firefox`,OPERA:`Opera`,YANDEX:`Yandex`,SAFARI:`Safari`,INTERNET_EXPLORER:`Internet Explorer`,EDGE:`Edge`,CHROMIUM:`Chromium`,IE:`IE`,MOBILE_SAFARI:`Mobile Safari`,EDGE_CHROMIUM:`Edge Chromium`},DEVICE_TYPES:{MOBILE:`mobile`,TABLET:`tablet`,SMART_TV:`smarttv`,CONSOLE:`console`,WEARABLE:`wearable`,BROWSER:void 0},OS_TYPES:{IOS:`iOS`,ANDROID:`Android`,WINDOWS_PHONE:`Windows Phone`,WINDOWS:`Windows`,MAC_OS:`Mac OS`},defaultData:{isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1}}}),(function(e,t,n){"use strict";var r=n(2),i=n(0),a=i.BROWSER_TYPES,o=i.OS_TYPES,s=i.DEVICE_TYPES,c=n(4),l=c.checkType,u=c.broPayload,d=c.mobilePayload,f=c.wearPayload,p=c.consolePayload,m=c.stvPayload,h=c.getNavigatorInstance,g=c.isIOS13Check,_=new r,v=_.getBrowser(),y=_.getDevice(),b=_.getEngine(),x=_.getOS(),S=_.getUA(),C=a.CHROME,w=a.CHROMIUM,T=a.IE,ee=a.INTERNET_EXPLORER,E=a.OPERA,te=a.FIREFOX,ne=a.SAFARI,re=a.EDGE,D=a.YANDEX,O=a.MOBILE_SAFARI,ie=s.MOBILE,ae=s.TABLET,oe=s.SMART_TV,se=s.BROWSER,k=s.WEARABLE,ce=s.CONSOLE,le=o.ANDROID,ue=o.WINDOWS_PHONE,de=o.IOS,fe=o.WINDOWS,pe=o.MAC_OS,me=function(){return y.type===ie},he=function(){return y.type===ae},ge=function(){switch(y.type){case ie:case ae:return!0;default:return!1}},_e=function(){return x.name===o.WINDOWS&&x.version===`10`&&typeof S==`string`&&S.indexOf(`Edg/`)!==-1},ve=function(){return y.type===oe},ye=function(){return y.type===se},be=function(){return y.type===k},xe=function(){return y.type===ce},Se=function(){return x.name===le},Ce=function(){return x.name===fe},we=function(){return x.name===pe},Te=function(){return x.name===ue},Ee=function(){return x.name===de},De=function(){return v.name===C},Oe=function(){return v.name===te},ke=function(){return v.name===w},Ae=function(){return v.name===re},je=function(){return v.name===D},Me=function(){return v.name===ne||v.name===O},Ne=function(){return v.name===O},Pe=function(){return v.name===E},A=function(){return v.name===ee||v.name===T},Fe=function(){var e=h(),t=e&&e.userAgent.toLowerCase();return typeof t==`string`&&/electron/.test(t)},Ie=function(){var e=h();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform===`MacIntel`&&e.maxTouchPoints>1)&&!window.MSStream},Le=function(){return g(`iPad`)},Re=function(){return g(`iPhone`)},ze=function(){return g(`iPod`)},Be=function(){return v.major},Ve=function(){return v.version},He=function(){return x.version?x.version:`none`},Ue=function(){return x.name?x.name:`none`},We=function(){return v.name},Ge=function(){return y.vendor?y.vendor:`none`},Ke=function(){return y.model?y.model:`none`},qe=function(){return b.name},Je=function(){return b.version},Ye=function(){return S},Xe=function(){return y.type},Ze=ve(),Qe=xe(),$e=be(),et=Ne()||Le(),tt=ke(),nt=ge()||Le(),rt=me(),it=he()||Le(),at=ye(),ot=Se(),st=Te(),ct=Ee()||Le(),j=De(),lt=Oe(),ut=Me(),dt=Pe(),ft=A(),pt=He(),mt=Ue(),ht=Be(),gt=Ve(),_t=We(),vt=Ge(),yt=Ke(),bt=qe(),xt=Je(),St=Ye(),Ct=Ae()||_e(),wt=je(),Tt=Xe(),Et=Ie(),Dt=Le(),Ot=Re(),kt=ze(),At=Fe(),jt=_e(),Mt=Ae(),Nt=Ce(),Pt=we(),Ft=l(y.type);function It(){var e=Ft.isBrowser,t=Ft.isMobile,n=Ft.isTablet,r=Ft.isSmartTV,i=Ft.isConsole,a=Ft.isWearable;if(e)return u(e,v,b,x,S);if(r)return m(r,b,x,S);if(i)return p(i,b,x,S);if(t||n)return d(Ft,y,x,S);if(a)return f(a,b,x,S)}e.exports={deviceDetect:It,isSmartTV:Ze,isConsole:Qe,isWearable:$e,isMobileSafari:et,isChromium:tt,isMobile:nt,isMobileOnly:rt,isTablet:it,isBrowser:at,isAndroid:ot,isWinPhone:st,isIOS:ct,isChrome:j,isFirefox:lt,isSafari:ut,isOpera:dt,isIE:ft,osVersion:pt,osName:mt,fullBrowserVersion:ht,browserVersion:gt,browserName:_t,mobileVendor:vt,mobileModel:yt,engineName:bt,engineVersion:xt,getUA:St,isEdge:Ct,isYandex:wt,deviceType:Tt,isIOS13:Et,isIPad13:Dt,isIPhone13:Ot,isIPod13:kt,isElectron:At,isEdgeChromium:jt,isLegacyEdge:Mt,isWindows:Nt,isMacOs:Pt}}),(function(e,t,n){var r;(function(i,a){"use strict";var o=`0.7.18`,s=`function`,c=`undefined`,l=`object`,u=`major`,d=`model`,f=`name`,p=`type`,m=`vendor`,h=`version`,g=`architecture`,_=`console`,v=`mobile`,y=`tablet`,b=`smarttv`,x=`wearable`,S=`embedded`,C={extend:function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n},has:function(e,t){return typeof e==`string`&&t.toLowerCase().indexOf(e.toLowerCase())!==-1},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e==`string`?e.replace(/[^\d\.]/g,``).split(`.`)[0]:a},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}},w={rgx:function(e,t){for(var n=0,r,i,o,c,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(r=i=0;r<f.length&&!u;)if(u=f[r++].exec(e),u)for(o=0;o<p.length;o++)d=u[++i],c=p[o],typeof c==l&&c.length>0?c.length==2?typeof c[1]==s?this[c[0]]=c[1].call(this,d):this[c[0]]=c[1]:c.length==3?typeof c[1]===s&&!(c[1].exec&&c[1].test)?this[c[0]]=d?c[1].call(this,d,c[2]):a:this[c[0]]=d?d.replace(c[1],c[2]):a:c.length==4&&(this[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):a):this[c]=d||a;n+=2}},str:function(e,t){for(var n in t)if(typeof t[n]==l&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(C.has(t[n][r],e))return n===`?`?a:n}else if(C.has(t[n],e))return n===`?`?a:n;return e}},T={browser:{oldsafari:{version:{"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`}}},device:{amazon:{model:{"Fire Phone":[`SD`,`KF`]}},sprint:{model:{"Evo Shift 4G":`7373KT`},vendor:{HTC:`APA`,Sprint:`Sprint`}}},os:{windows:{version:{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`}}}},ee={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[f,h],[/(opios)[\/\s]+([\w\.]+)/i],[[f,`Opera Mini`],h],[/\s(opr)\/([\w\.]+)/i],[[f,`Opera`],h],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\/([\w\.-]+)/i],[f,h],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[f,`IE`],h],[/(edge|edgios|edgea)\/((\d+)?[\w\.]+)/i],[[f,`Edge`],h],[/(yabrowser)\/([\w\.]+)/i],[[f,`Yandex`],h],[/(puffin)\/([\w\.]+)/i],[[f,`Puffin`],h],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[f,`UCBrowser`],h],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g,` `],h],[/(micromessenger)\/([\w\.]+)/i],[[f,`WeChat`],h],[/(qqbrowserlite)\/([\w\.]+)/i],[f,h],[/(QQ)\/([\d\.]+)/i],[f,h],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[f,h],[/(BIDUBrowser)[\/\s]?([\w\.]+)/i],[f,h],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[f,h],[/(MetaSr)[\/\s]?([\w\.]+)/i],[f],[/(LBBROWSER)/i],[f],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[h,[f,`MIUI Browser`]],[/;fbav\/([\w\.]+);/i],[h,[f,`Facebook`]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[h,[f,`Chrome Headless`]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[f,/(.+)/,`$1 WebView`],h],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[f,/(.+(?:g|us))(.+)/,`$1 $2`],h],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[h,[f,`Android Browser`]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[f,h],[/(dolfin)\/([\w\.]+)/i],[[f,`Dolphin`],h],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[f,`Chrome`],h],[/(coast)\/([\w\.]+)/i],[[f,`Opera Coast`],h],[/fxios\/([\w\.-]+)/i],[h,[f,`Firefox`]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[h,[f,`Mobile Safari`]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[h,f],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[f,`GSA`],h],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[f,[h,w.str,T.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[f,h],[/(navigator|netscape)\/([\w\.-]+)/i],[[f,`Netscape`],h],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[f,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[g,`amd64`]],[/(ia32(?=;))/i],[[g,C.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[g,`ia32`]],[/windows\s(ce|mobile);\sppc;/i],[[g,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[g,/ower/,``,C.lowerize]],[/(sun4\w)[;\)]/i],[[g,`sparc`]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[g,C.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[d,m,[p,y]],[/applecoremedia\/[\w\.]+ \((ipad)/],[d,[m,`Apple`],[p,y]],[/(apple\s{0,1}tv)/i],[[d,`Apple TV`],[m,`Apple`]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[m,d,[p,y]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[d,[m,`Amazon`],[p,y]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[d,w.str,T.device.amazon.model],[m,`Amazon`],[p,v]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[d,m,[p,v]],[/\((ip[honed|\s\w*]+);/i],[d,[m,`Apple`],[p,v]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[m,d,[p,v]],[/\(bb10;\s(\w+)/i],[d,[m,`BlackBerry`],[p,v]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[d,[m,`Asus`],[p,y]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[m,`Sony`],[d,`Xperia Tablet`],[p,y]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[d,[m,`Sony`],[p,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[m,d,[p,_]],[/android.+;\s(shield)\sbuild/i],[d,[m,`Nvidia`],[p,_]],[/(playstation\s[34portablevi]+)/i],[d,[m,`Sony`],[p,_]],[/(sprint\s(\w+))/i],[[m,w.str,T.device.sprint.vendor],[d,w.str,T.device.sprint.model],[p,v]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[m,d,[p,y]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[m,[d,/_/g,` `],[p,v]],[/(nexus\s9)/i],[d,[m,`HTC`],[p,y]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[d,[m,`Huawei`],[p,v]],[/(microsoft);\s(lumia[\s\w]+)/i],[m,d,[p,v]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[d,[m,`Microsoft`],[p,_]],[/(kin\.[onetw]{3})/i],[[d,/\./g,` `],[m,`Microsoft`],[p,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[d,[m,`Motorola`],[p,v]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[d,[m,`Motorola`],[p,y]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[m,C.trim],[d,C.trim],[p,b]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,`SmartTV`],[m,`Samsung`],[p,b]],[/\(dtv[\);].+(aquos)/i],[d,[m,`Sharp`],[p,b]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[m,`Samsung`],d,[p,y]],[/smart-tv.+(samsung)/i],[m,[p,b],d],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[m,`Samsung`],d,[p,v]],[/sie-(\w*)/i],[d,[m,`Siemens`],[p,v]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[m,`Nokia`],d,[p,v]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[d,[m,`Acer`],[p,y]],[/android.+([vl]k\-?\d{3})\s+build/i],[d,[m,`LG`],[p,y]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[m,`LG`],d,[p,y]],[/(lg) netcast\.tv/i],[m,d,[p,b]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[d,[m,`LG`],[p,v]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[d,[m,`Lenovo`],[p,y]],[/linux;.+((jolla));/i],[m,d,[p,v]],[/((pebble))app\/[\d\.]+\s/i],[m,d,[p,x]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[m,d,[p,v]],[/crkey/i],[[d,`Chromecast`],[m,`Google`]],[/android.+;\s(glass)\s\d/i],[d,[m,`Google`],[p,x]],[/android.+;\s(pixel c)\s/i],[d,[m,`Google`],[p,y]],[/android.+;\s(pixel xl|pixel)\s/i],[d,[m,`Google`],[p,v]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[d,/_/g,` `],[m,`Xiaomi`],[p,v]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[d,/_/g,` `],[m,`Xiaomi`],[p,y]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[d,[m,`Meizu`],[p,y]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})\s+build/i],[d,[m,`OnePlus`],[p,v]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[d,[m,`RCA`],[p,y]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[d,[m,`Dell`],[p,y]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[d,[m,`Verizon`],[p,y]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[m,`Barnes & Noble`],d,[p,y]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[d,[m,`NuVision`],[p,y]],[/android.+;\s(k88)\sbuild/i],[d,[m,`ZTE`],[p,y]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[d,[m,`Swiss`],[p,v]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[d,[m,`Swiss`],[p,y]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[d,[m,`Zeki`],[p,y]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[m,`Dragon Touch`],d,[p,y]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[d,[m,`Insignia`],[p,y]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[d,[m,`NextBook`],[p,y]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[m,`Voice`],d,[p,v]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[m,`LvTel`],d,[p,v]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[d,[m,`Envizen`],[p,y]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[m,d,[p,y]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[d,[m,`MachSpeed`],[p,y]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[m,d,[p,y]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[d,[m,`Rotor`],[p,y]],[/android.+(KS(.+))\s+build/i],[d,[m,`Amazon`],[p,y]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[m,d,[p,y]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[p,C.lowerize],m,d],[/(android[\w\.\s\-]{0,9});.+build/i],[d,[m,`Generic`]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[h,[f,`EdgeHTML`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[f,h],[/rv\:([\w\.]{1,9}).+(gecko)/i],[h,f]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[f,h],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[f,[h,w.str,T.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[f,`Windows`],[h,w.str,T.os.windows.version]],[/\((bb)(10);/i],[[f,`BlackBerry`],h],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]*)/i,/linux;.+(sailfish);/i],[f,h],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[f,`Symbian`],h],[/\((series40);/i],[f],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[f,`Firefox OS`],h],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[f,h],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[f,`Chromium OS`],h],[/(sunos)\s?([\w\.\d]*)/i],[[f,`Solaris`],h],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[f,h],[/(haiku)\s(\w+)/i],[f,h],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[h,/_/g,`.`],[f,`iOS`]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[f,`Mac OS`],[h,/_/g,`.`]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]*)/i],[f,h]]},E=function(e,t){if(typeof e==`object`&&(t=e,e=a),!(this instanceof E))return new E(e,t).getResult();var n=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:``),r=t?C.extend(ee,t):ee;return this.getBrowser=function(){var e={name:a,version:a};return w.rgx.call(e,n,r.browser),e.major=C.major(e.version),e},this.getCPU=function(){var e={architecture:a};return w.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:a,model:a,type:a};return w.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:a,version:a};return w.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:a,version:a};return w.rgx.call(e,n,r.os),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 n},this.setUA=function(e){return n=e,this},this};E.VERSION=o,E.BROWSER={NAME:f,MAJOR:u,VERSION:h},E.CPU={ARCHITECTURE:g},E.DEVICE={MODEL:d,VENDOR:m,TYPE:p,CONSOLE:_,MOBILE:v,SMARTTV:b,TABLET:y,WEARABLE:x,EMBEDDED:S},E.ENGINE={NAME:f,VERSION:h},E.OS={NAME:f,VERSION:h},typeof t===c?s===`function`&&n(3)?(r=(function(){return E}).call(t,n,t,e),r!==a&&(e.exports=r)):i&&(i.UAParser=E):(typeof e!==c&&e.exports&&(t=e.exports=E),t.UAParser=E);var te=i&&(i.jQuery||i.Zepto);if(typeof te!==c){var ne=new E;te.ua=ne.getResult(),te.ua.get=function(){return ne.getUA()},te.ua.set=function(e){ne.setUA(e);var t=ne.getResult();for(var n in t)te.ua[n]=t[n]}}})(typeof window==`object`?window:this)}),(function(e,t){(function(t){e.exports=t}).call(t,{})}),(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=i.DEVICE_TYPES,o=i.defaultData,s=function(e){switch(e){case a.MOBILE:return{isMobile:!0};case a.TABLET:return{isTablet:!0};case a.SMART_TV:return{isSmartTV:!0};case a.CONSOLE:return{isConsole:!0};case a.WEARABLE:return{isWearable:!0};case a.BROWSER:return{isBrowser:!0};default:return o}},c=function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:t.major,browserFullVersion:t.version,browserName:t.name,engineName:n.name||!1,engineVersion:n.version,osName:r.name,osVersion:r.version,userAgent:i}},l=function(e,t,n,i){return r({},e,{vendor:t.vendor,model:t.model,os:n.name,osVersion:n.version,ua:i})},u=function(e,t,n,r){return{isSmartTV:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},d=function(e,t,n,r){return{isConsole:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},f=function(e,t,n,r){return{isWearable:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:r}},p=t.getNavigatorInstance=function(){return typeof window<`u`&&(window.navigator||navigator)?window.navigator||navigator:!1};e.exports={checkType:s,broPayload:c,mobilePayload:l,stvPayload:u,consolePayload:d,wearPayload:f,getNavigatorInstance:p,isIOS13Check:t.isIOS13Check=function(e){var t=p();return t&&t.platform&&(t.platform.indexOf(e)!==-1||t.platform===`MacIntel`&&t.maxTouchPoints>1&&!window.MSStream)}}})])}))(),Bm=y`
34
34
  *,
35
35
  ::after,
36
36
  ::before {
@@ -89,13 +89,13 @@ var RegulaIdv=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Mo
89
89
  background: white;
90
90
  z-index: 1000;
91
91
  }
92
- `,dm,fm=class extends $e{constructor(...e){super(...e),this._currentProgressElement=null,this._currentScreenElement=null,this._currentScreenModuleId=``,this._currentScreenConfig=null,this.orientation=new cm(this),this.store=am.getInitialState(),this.currentScreenConfig=this.store.currentScreenConfig,this.processingScreenFromWorkflow=this.store.getProcessingTemplate(),this.isProcessing=this.store.isProcessing,this.loadedModules=this.store.externalModules,this.modulesConfig=this.store.modulesConfig,this.storeNonce=this.store.nonce,this._listenerFromModule=(e,t,n=R.INFO)=>{let r=JSON.stringify(t);B.logSessionEvent({module:e,logLevel:n,message:r}),this.store.listener({eventType:ai.MESSAGE,logLevel:n,message:r,module:e})},this._isProcessingCallback=e=>{this.store.setIsProcessing(e)},this._performFromModule=(e,t)=>{this.store.setIsProcessing(!1),this.store.pushStepWaitNextStepAndSet(e,t)}}connectedCallback(){super.connectedCallback(),this.unsubscribeFromStore=am.subscribe(e=>{var t;this.currentScreenConfig=e.currentScreenConfig,this.processingScreenFromWorkflow=e.getProcessingTemplate(),this.isProcessing=e.isProcessing,this.loadedModules=e.externalModules,this.modulesConfig=e.modulesConfig,this.storeNonce=e.nonce,B.setTemplateId((t=e.currentScreenConfig)==null?void 0:t.templateId)})}_processingScreen(){let e=this.loadedModules.find(e=>e.supportedTemplates.includes(`PROGRESS`));if(!e||!this.processingScreenFromWorkflow)return Ne`Processing...`;let t={perform:this._performFromModule,moduleProps:this.processingScreenFromWorkflow,modulesConfig:this.modulesConfig,idvEventListener:this._listenerFromModule,isProcessing:this._isProcessingCallback};return this._currentProgressElement||(this._currentProgressElement=sm(e.id,t)),this._currentProgressElement}_isTheSameModuleAndScreen(e){return this._currentScreenModuleId===e.id&&this._currentScreenConfig===this.currentScreenConfig}_currentScreen(){if(!this.currentScreenConfig)return A;let e=this.loadedModules.find(e=>e.supportedTemplates.includes(this.currentScreenConfig.templateId));if(!e)return A;let t={perform:this._performFromModule,moduleProps:this.currentScreenConfig,modulesConfig:this.modulesConfig,idvEventListener:this._listenerFromModule,isProcessing:this._isProcessingCallback,nonce:this.storeNonce};return(!this._currentScreenElement||!this._isTheSameModuleAndScreen(e))&&(this._currentScreenElement=sm(e.id,t),this._currentScreenModuleId=e.id,this._currentScreenConfig=this.currentScreenConfig),this._currentScreenElement}get version(){return`4.0.684-nightly`}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.unsubscribeFromStore)==null||e.call(this),ut.clearLogs()}render(){return!this.currentScreenConfig&&!this.processingScreenFromWorkflow?null:Ne`<div
92
+ `,Vm,Hm=class extends $e{constructor(...e){super(...e),this._currentProgressElement=null,this._currentScreenElement=null,this._currentScreenModuleId=``,this._currentScreenConfig=null,this.orientation=new Rm(this),this.store=Fm.getInitialState(),this.currentScreenConfig=this.store.currentScreenConfig,this.processingScreenFromWorkflow=this.store.getProcessingTemplate(),this.isProcessing=this.store.isProcessing,this.loadedModules=this.store.externalModules,this.modulesConfig=this.store.modulesConfig,this.storeNonce=this.store.nonce,this._listenerFromModule=(e,t,n=R.INFO)=>{let r=JSON.stringify(t);B.logSessionEvent({module:e,logLevel:n,message:r}),this.store.listener({eventType:ai.MESSAGE,logLevel:n,message:r,module:e})},this._isProcessingCallback=e=>{this.store.setIsProcessing(e)},this._performFromModule=(e,t)=>{this.store.setIsProcessing(!1),this.store.pushStepWaitNextStepAndSet(e,t)}}connectedCallback(){super.connectedCallback(),this.unsubscribeFromStore=Fm.subscribe(e=>{var t;this.currentScreenConfig=e.currentScreenConfig,this.processingScreenFromWorkflow=e.getProcessingTemplate(),this.isProcessing=e.isProcessing,this.loadedModules=e.externalModules,this.modulesConfig=e.modulesConfig,this.storeNonce=e.nonce,B.setTemplateId((t=e.currentScreenConfig)==null?void 0:t.templateId)})}_processingScreen(){let e=this.loadedModules.find(e=>e.supportedTemplates.includes(`PROGRESS`));if(!e||!this.processingScreenFromWorkflow)return Ne`Processing...`;let t={perform:this._performFromModule,moduleProps:this.processingScreenFromWorkflow,modulesConfig:this.modulesConfig,idvEventListener:this._listenerFromModule,isProcessing:this._isProcessingCallback};return this._currentProgressElement||(this._currentProgressElement=Lm(e.id,t)),this._currentProgressElement}_isTheSameModuleAndScreen(e){return this._currentScreenModuleId===e.id&&this._currentScreenConfig===this.currentScreenConfig}_currentScreen(){if(!this.currentScreenConfig)return A;let e=this.loadedModules.find(e=>e.supportedTemplates.includes(this.currentScreenConfig.templateId));if(!e)return A;let t={perform:this._performFromModule,moduleProps:this.currentScreenConfig,modulesConfig:this.modulesConfig,idvEventListener:this._listenerFromModule,isProcessing:this._isProcessingCallback,nonce:this.storeNonce};return(!this._currentScreenElement||!this._isTheSameModuleAndScreen(e))&&(this._currentScreenElement=Lm(e.id,t),this._currentScreenModuleId=e.id,this._currentScreenConfig=this.currentScreenConfig),this._currentScreenElement}get version(){return`4.0.686-nightly`}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.unsubscribeFromStore)==null||e.call(this),ut.clearLogs()}render(){return!this.currentScreenConfig&&!this.processingScreenFromWorkflow?null:Ne`<div
93
93
  part="idv"
94
94
  class="idv"
95
- data-device="${lm.isMobile&&this.orientation.isPortrait?`mobile`:`desktop`}"
95
+ data-device="${zm.isMobile&&this.orientation.isPortrait?`mobile`:`desktop`}"
96
96
  >
97
97
  <div class="container">
98
98
  ${this.isProcessing?Ne`<div class="processing-overlay">${this._processingScreen()}</div>`:``}
99
99
  ${this._currentScreen()}
100
100
  </div>
101
- </div>`}};dm=fm,dm.styles=[um],$([lt(),Q(`design:type`,Object)],fm.prototype,`store`,void 0),$([lt(),Q(`design:type`,Object)],fm.prototype,`currentScreenConfig`,void 0),$([lt(),Q(`design:type`,Object)],fm.prototype,`processingScreenFromWorkflow`,void 0),$([lt(),Q(`design:type`,Object)],fm.prototype,`isProcessing`,void 0),$([lt(),Q(`design:type`,Object)],fm.prototype,`loadedModules`,void 0),$([lt(),Q(`design:type`,Object)],fm.prototype,`modulesConfig`,void 0),$([lt(),Q(`design:type`,Object)],fm.prototype,`storeNonce`,void 0);var pm=class{initialize(e){return C(function*(){return am.getState().initialize(e)})()}configure(e){return C(function*(){return`userName`in e?yield am.getState().configureByUserPass(e):`apiKey`in e?yield am.getState().configureByApiKey(e):`url`in e&&Object.keys(e).length===1?yield am.getState().configureWithUrl(e.url):{error:new Ga({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`No valid config found`})}})()}getWorkFlows(e){return C(function*(){return yield am.getState().getWorkflows(e)})()}prepareWorkflow({workflowId:e}){return C(function*(){return yield am.getState().prepareWorkflowAndPrepareUi(e)})()}startWorkflow(e){return C(function*(){var t;let n=(t=am.getState().workflow)!=null&&t.trackLocation?yield aa():null;return new Promise(t=>{let r=e=>{t(e)},i=e==null?void 0:e.locale,a=e==null?void 0:e.metadata,o=$i(i);am.getState().startSession({completion:r,locale:o,metadata:a,location:n}).then(e=>{(e.error||e.results)&&(am.getState().removeCurrentSessionDataLsAndStore(),r(e))})})})()}deinitialize(){return C(function*(){return yield am.getState().deinitialize()})()}startLogin(e){var t=this;return C(function*(){var n,r,i;let{applicationId:a,baseUrl:o,metadata:s,locale:c,httpTimeoutMs:l}=e,u=(e,t)=>(B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`StartLogin: error. Code: ${e}.${t?` Message: ${t}.`:``}`}),new Qa(j({errorCode:e},!!t&&{message:t}))),d=yield am.getState().startIamAuth({applicationId:a,baseUrl:o,metadata:s,locale:c,httpTimeoutMs:l});if(d.code!==0||!Gi(d.data)||!z(d.data.url))return u(bi.START_COMMAND_FAILURE);B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`StartLogin: startIamAuth success. URL: ${d.data.url}`});let f=yield t.configure({url:d.data.url});if(((n=f.error)==null?void 0:n.errorCode)===ui.INITIALIZATION_REQUIRED)return u(bi.INITIALIZATION_REQUIRED);if(((r=f.error)==null?void 0:r.errorCode)===ui.SCENARIO_IN_PROGRESS)return u(bi.ALREADY_IN_PROCESS);if(!(`workflows`in f)||!f.workflows[0]||f.error)return u(bi.MISSING_CONFIGURATION);B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`StartLogin: configure success. Workflow ID: ${f.workflows[0]}`});let p=yield t.prepareWorkflow({workflowId:f.workflows[0]});if(console.log(`prepareResult`,p),p.error)return u(bi.PREPARE_WORKFLOW_FAILURE);B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`StartLogin: prepareWorkflow success.`});let m=yield t.startWorkflow({locale:c});if(m.error)return u(bi.EXECUTION_WORKFLOW_FAILURE);let h=(i=m.results)==null?void 0:i.iamAuthCode;return h!=null&&h.error?u(bi.AUTH_FAILURE,h.error):z(h==null?void 0:h.code)?(B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`StartLogin: startWorkflow success. IAM Auth Code: ${h.code}.`}),h.code):u(bi.MISSING_AUTH_CODE)})()}get version(){var e;return(e=`4.0.684-nightly`)==null?`Version unavailable. Something went wrong`:e}get currentSessionId(){return am.getState().getCurrentSessionId()}set nonce(e){am.getState().setNonce(e)}set eventListener(e){!e||typeof e!=`function`?console.warn(`IdvIntegrationService:: listener is not a function`):am.getState().setListener(e)}set sessionRestoreMode(e){am.getState().setSessionRestoreMode(e)}};return window.customElements.get(`idv-flow`)||window.customElements.define(`idv-flow`,fm),e.BaseError=V,e.BaseLoginError=Qa,e.BaseModule=ba,e.ConnectionError=yi,e.DeinitializationError=vi,e.IdvEventTypesEnum=ai,e.IdvIntegrationService=pm,e.IdvLogLevelEnum=R,e.IdvServiceMessages=ci,e.IdvWebComponent=fm,e.InitializeError=fi,e.LoginError=bi,e.PrepareWorkflowError=li,e.SessionError=gi,e.SocketError=_i,e.StartSessionError=hi,e.WorkflowError=di,e.WorkflowPlatformError=mi,e.registerModule=xa,e})({});
101
+ </div>`}};Vm=Hm,Vm.styles=[Bm],$([lt(),Q(`design:type`,Object)],Hm.prototype,`store`,void 0),$([lt(),Q(`design:type`,Object)],Hm.prototype,`currentScreenConfig`,void 0),$([lt(),Q(`design:type`,Object)],Hm.prototype,`processingScreenFromWorkflow`,void 0),$([lt(),Q(`design:type`,Object)],Hm.prototype,`isProcessing`,void 0),$([lt(),Q(`design:type`,Object)],Hm.prototype,`loadedModules`,void 0),$([lt(),Q(`design:type`,Object)],Hm.prototype,`modulesConfig`,void 0),$([lt(),Q(`design:type`,Object)],Hm.prototype,`storeNonce`,void 0);var Um=class{initialize(e){return C(function*(){return Fm.getState().initialize(e)})()}configure(e){return C(function*(){return`userName`in e?yield Fm.getState().configureByUserPass(e):`apiKey`in e?yield Fm.getState().configureByApiKey(e):`url`in e&&Object.keys(e).length===1?yield Fm.getState().configureWithUrl(e.url):{error:new Ja({errorCode:ui.CONFIG_MISSED_OR_INVALID,message:`No valid config found`})}})()}getWorkFlows(e){return C(function*(){return yield Fm.getState().getWorkflows(e)})()}prepareWorkflow({workflowId:e}){return C(function*(){return yield Fm.getState().prepareWorkflowAndPrepareUi(e)})()}startWorkflow(e){return C(function*(){var t;let n=(t=Fm.getState().workflow)!=null&&t.trackLocation?yield ca():null;return new Promise(t=>{let r=e=>{t(e)},i=e==null?void 0:e.locale,a=e==null?void 0:e.metadata,o=na(i);Fm.getState().startSession({completion:r,locale:o,metadata:a,location:n}).then(e=>{(e.error||e.results)&&(Fm.getState().removeCurrentSessionDataLsAndStore(),r(e))})})})()}deinitialize(){return C(function*(){return yield Fm.getState().deinitialize()})()}startLogin(e){var t=this;return C(function*(){var n,r,i;let{applicationId:a,baseUrl:o,metadata:s,locale:c,httpTimeoutMs:l}=e,u=(e,t)=>(B.logSessionEvent({module:`IDV`,logLevel:R.ERROR,message:`StartLogin: error. Code: ${e}.${t?` Message: ${t}.`:``}`}),new to(j({errorCode:e},!!t&&{message:t}))),d=yield Fm.getState().startIamAuth({applicationId:a,baseUrl:o,metadata:s,locale:c,httpTimeoutMs:l});if(d.code!==0||!Ji(d.data)||!z(d.data.url))return u(bi.START_COMMAND_FAILURE);B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`StartLogin: startIamAuth success. URL: ${d.data.url}`});let f=yield t.configure({url:d.data.url});if(((n=f.error)==null?void 0:n.errorCode)===ui.INITIALIZATION_REQUIRED)return u(bi.INITIALIZATION_REQUIRED);if(((r=f.error)==null?void 0:r.errorCode)===ui.SCENARIO_IN_PROGRESS)return u(bi.ALREADY_IN_PROCESS);if(!(`workflows`in f)||!f.workflows[0]||f.error)return u(bi.MISSING_CONFIGURATION);B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`StartLogin: configure success. Workflow ID: ${f.workflows[0]}`});let p=yield t.prepareWorkflow({workflowId:f.workflows[0]});if(console.log(`prepareResult`,p),p.error)return u(bi.PREPARE_WORKFLOW_FAILURE);B.logSessionEvent({module:`IDV`,logLevel:R.DEBUG,message:`StartLogin: prepareWorkflow success.`});let m=yield t.startWorkflow({locale:c});if(m.error)return u(bi.EXECUTION_WORKFLOW_FAILURE);let h=(i=m.results)==null?void 0:i.iamAuthCode;return h!=null&&h.error?u(bi.AUTH_FAILURE,h.error):z(h==null?void 0:h.code)?(B.logSessionEvent({module:`IDV`,logLevel:R.INFO,message:`StartLogin: startWorkflow success. IAM Auth Code: ${h.code}.`}),h.code):u(bi.MISSING_AUTH_CODE)})()}get version(){var e;return(e=`4.0.686-nightly`)==null?`Version unavailable. Something went wrong`:e}get currentSessionId(){return Fm.getState().getCurrentSessionId()}set nonce(e){Fm.getState().setNonce(e)}set eventListener(e){!e||typeof e!=`function`?console.warn(`IdvIntegrationService:: listener is not a function`):Fm.getState().setListener(e)}set sessionRestoreMode(e){Fm.getState().setSessionRestoreMode(e)}};return window.customElements.get(`idv-flow`)||window.customElements.define(`idv-flow`,Hm),e.BaseError=V,e.BaseLoginError=to,e.BaseModule=Ca,e.ConnectionError=yi,e.DeinitializationError=vi,e.IdvEventTypesEnum=ai,e.IdvIntegrationService=Um,e.IdvLogLevelEnum=R,e.IdvServiceMessages=ci,e.IdvWebComponent=Hm,e.InitializeError=fi,e.LoginError=bi,e.PrepareWorkflowError=li,e.SessionError=gi,e.SocketError=_i,e.StartSessionError=hi,e.WorkflowError=di,e.WorkflowPlatformError=mi,e.registerModule=wa,e})({});