scanbot-web-sdk 5.1.2 → 5.1.3-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/@types/model/barcode/engine-mode.d.ts +5 -1
  2. package/@types/scanbot-sdk.d.ts +8 -0
  3. package/@types/worker/worker-bridge.d.ts +1 -0
  4. package/bundle/ScanbotSDK.min.js +2 -2
  5. package/bundle/ScanbotSDK.ui2.min.js +2 -2
  6. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  7. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  8. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  9. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  10. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  11. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  12. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  13. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  14. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  15. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  16. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  17. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  18. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  19. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  20. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  21. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  22. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  23. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  24. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  25. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  26. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  27. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see ScanbotSDK.min.js.LICENSE.txt */
2
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=20)}([function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return S})),n.d(e,"Fragment",(function(){return y})),n.d(e,"createContext",(function(){return G})),n.d(e,"createElement",(function(){return v})),n.d(e,"createRef",(function(){return b})),n.d(e,"useCallback",(function(){return ft})),n.d(e,"useContext",(function(){return mt})),n.d(e,"useDebugValue",(function(){return gt})),n.d(e,"useEffect",(function(){return ct})),n.d(e,"useErrorBoundary",(function(){return vt})),n.d(e,"useId",(function(){return At})),n.d(e,"useImperativeHandle",(function(){return ht})),n.d(e,"useLayoutEffect",(function(){return ut})),n.d(e,"useMemo",(function(){return pt})),n.d(e,"useReducer",(function(){return lt})),n.d(e,"useRef",(function(){return dt})),n.d(e,"useState",(function(){return st})),n.d(e,"Children",(function(){return Dt})),n.d(e,"PureComponent",(function(){return Ot})),n.d(e,"StrictMode",(function(){return ye})),n.d(e,"Suspense",(function(){return jt})),n.d(e,"SuspenseList",(function(){return Nt})),n.d(e,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",(function(){return ue})),n.d(e,"cloneElement",(function(){return me})),n.d(e,"createFactory",(function(){return he})),n.d(e,"createPortal",(function(){return Yt})),n.d(e,"default",(function(){return Oe})),n.d(e,"findDOMNode",(function(){return ve})),n.d(e,"flushSync",(function(){return be})),n.d(e,"forwardRef",(function(){return Wt})),n.d(e,"hydrate",(function(){return te})),n.d(e,"isElement",(function(){return Ee})),n.d(e,"isFragment",(function(){return fe})),n.d(e,"isValidElement",(function(){return pe})),n.d(e,"lazy",(function(){return zt})),n.d(e,"memo",(function(){return kt})),n.d(e,"render",(function(){return Jt})),n.d(e,"startTransition",(function(){return Se})),n.d(e,"unmountComponentAtNode",(function(){return ge})),n.d(e,"unstable_batchedUpdates",(function(){return Ae})),n.d(e,"useDeferredValue",(function(){return Ce})),n.d(e,"useInsertionEffect",(function(){return xe})),n.d(e,"useSyncExternalStore",(function(){return Le})),n.d(e,"useTransition",(function(){return we})),n.d(e,"version",(function(){return de}));var o,i,r,a,s,l,c,u,d={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function m(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function v(t,e,n){var i,r,a,s={};for(a in e)"key"==a?i=e[a]:"ref"==a?r=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return A(t,s,i,r,null)}function A(t,e,n,o,a){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=i.vnode&&i.vnode(s),s}function b(){return{current:null}}function y(t){return t.children}function S(t,e){this.props=t,this.context=e}function C(t,e){if(null==e)return t.__?C(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?C(t):null}function w(t,e,n){var o,r=t.__v,a=r.__e,s=t.__P;if(s)return(o=m({},r)).__v=r.__v+1,i.vnode&&i.vnode(o),R(s,o,r,t.__n,void 0!==s.ownerSVGElement,32&r.__u?[a]:null,e,null==a?C(r):a,!!(32&r.__u),n),o.__v=r.__v,o.__.__k[o.__i]=o,o.__d=void 0,o.__e!=a&&x(o),o}function x(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return x(t)}}function E(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!L.__r++||s!==i.debounceRendering)&&((s=i.debounceRendering)||l)(L)}function L(){var t,e,n,o=[],r=[];for(a.sort(c);t=a.shift();)t.__d&&(n=a.length,e=w(t,o,r)||e,0===n||a.length>n?(M(o,e,r),r.length=o.length=0,e=void 0,a.sort(c)):e&&i.__c&&i.__c(e,h));e&&M(o,e,r),L.__r=0}function _(t,e,n,o,i,r,a,s,l,c,u){var p,f,m,g,v,A=o&&o.__k||h,b=e.length;for(n.__d=l,O(n,e,A),l=n.__d,p=0;p<b;p++)null!=(m=n.__k[p])&&"boolean"!=typeof m&&"function"!=typeof m&&(f=-1===m.__i?d:A[m.__i]||d,m.__i=p,R(t,m,f,i,r,a,s,l,c,u),g=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&j(f.ref,null,m),u.push(m.ref,m.__c||g,m)),null==v&&null!=g&&(v=g),65536&m.__u||f.__k===m.__k?l=k(m,l,t):"function"==typeof m.type&&void 0!==m.__d?l=m.__d:g&&(l=g.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=l,n.__e=v}function O(t,e,n){var o,i,r,a,s,l=e.length,c=n.length,u=c,d=0;for(t.__k=[],o=0;o<l;o++)null!=(i=t.__k[o]=null==(i=e[o])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?A(null,i,null,null,i):f(i)?A(y,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?A(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,s=P(i,n,a=o+d,u),i.__i=s,r=null,-1!==s&&(u--,(r=n[s])&&(r.__u|=131072)),null==r||null===r.__v?(-1==s&&d--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?d++:s>a?u>l-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==o+d&&(i.__u|=65536))):(r=n[o])&&null==r.key&&r.__e&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=C(r)),V(r,r,!1),n[o]=null,u--);if(u)for(o=0;o<c;o++)null!=(r=n[o])&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=C(r)),V(r,r))}function k(t,e,n){var o,i;if("function"==typeof t.type){for(o=t.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=t,e=k(o[i],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function T(t,e){return e=e||[],null==t||"boolean"==typeof t||(f(t)?t.some((function(t){T(t,e)})):e.push(t)),e}function P(t,e,n,o){var i=t.key,r=t.type,a=n-1,s=n+1,l=e[n];if(null===l||l&&i==l.key&&r===l.type)return n;if(o>(null!=l&&0==(131072&l.__u)?1:0))for(;a>=0||s<e.length;){if(a>=0){if((l=e[a])&&0==(131072&l.__u)&&i==l.key&&r===l.type)return a;a--}if(s<e.length){if((l=e[s])&&0==(131072&l.__u)&&i==l.key&&r===l.type)return s;s++}}return-1}function W(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function B(t,e,n,o,i){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof o&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||W(t.style,e,"");if(n)for(e in n)o&&n[e]===o[e]||W(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?o?n.u=o.u:(n.u=Date.now(),t.addEventListener(e,r?I:D,r)):t.removeEventListener(e,r?I:D,r);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function D(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(i.event?i.event(t):t)}}function I(t){if(this.l)return this.l[t.type+!0](i.event?i.event(t):t)}function R(t,e,n,o,r,a,s,l,c,u){var d,h,p,g,v,A,b,C,w,x,E,L,O,k,T,P=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=e.__e=n.__e]),(d=i.__b)&&d(e);t:if("function"==typeof P)try{if(C=e.props,w=(d=P.contextType)&&o[d.__c],x=d?w?w.props.value:d.__:o,n.__c?b=(h=e.__c=n.__c).__=h.__E:("prototype"in P&&P.prototype.render?e.__c=h=new P(C,x):(e.__c=h=new S(C,x),h.constructor=P,h.render=z),w&&w.sub(h),h.props=C,h.state||(h.state={}),h.context=x,h.__n=o,p=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,P.getDerivedStateFromProps(C,h.__s))),g=h.props,v=h.state,h.__v=e,p)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&C!==g&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(C,x),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(C,h.__s,x)||e.__v===n.__v)){for(e.__v!==n.__v&&(h.props=C,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[],h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(C,h.__s,x),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(g,v,A)}))}if(h.context=x,h.props=C,h.__P=t,h.__e=!1,L=i.__r,O=0,"prototype"in P&&P.prototype.render){for(h.state=h.__s,h.__d=!1,L&&L(e),d=h.render(h.props,h.state,h.context),k=0;k<h._sb.length;k++)h.__h.push(h._sb[k]);h._sb=[]}else do{h.__d=!1,L&&L(e),d=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++O<25);h.state=h.__s,null!=h.getChildContext&&(o=m(m({},o),h.getChildContext())),p||null==h.getSnapshotBeforeUpdate||(A=h.getSnapshotBeforeUpdate(g,v)),_(t,f(T=null!=d&&d.type===y&&null==d.key?d.props.children:d)?T:[T],e,n,o,r,a,s,l,c,u),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),b&&(h.__E=h.__=null)}catch(t){e.__v=null,c||null!=a?(e.__e=l,e.__u|=c?160:32,a[a.indexOf(l)]=null):(e.__e=n.__e,e.__k=n.__k),i.__e(t,e,n)}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=F(n.__e,e,n,o,r,a,s,c,u);(d=i.diffed)&&d(e)}function M(t,e,n){for(var o=0;o<n.length;o++)j(n[o],n[++o],n[++o]);i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function F(t,e,n,i,r,a,s,l,c){var u,h,p,m,v,A,b,y=n.props,S=e.props,w=e.type;if("svg"===w&&(r=!0),null!=a)for(u=0;u<a.length;u++)if((v=a[u])&&"setAttribute"in v==!!w&&(w?v.localName===w:3===v.nodeType)){t=v,a[u]=null;break}if(null==t){if(null===w)return document.createTextNode(S);t=r?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,S.is&&S),a=null,l=!1}if(null===w)y===S||l&&t.data===S||(t.data=S);else{if(a=a&&o.call(t.childNodes),y=n.props||d,!l&&null!=a)for(y={},u=0;u<t.attributes.length;u++)y[(v=t.attributes[u]).name]=v.value;for(u in y)v=y[u],"children"==u||("dangerouslySetInnerHTML"==u?p=v:"key"===u||u in S||B(t,u,null,v,r));for(u in S)v=S[u],"children"==u?m=v:"dangerouslySetInnerHTML"==u?h=v:"value"==u?A=v:"checked"==u?b=v:"key"===u||l&&"function"!=typeof v||y[u]===v||B(t,u,v,y[u],r);if(h)l||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(p&&(t.innerHTML=""),_(t,f(m)?m:[m],e,n,i,r&&"foreignObject"!==w,a,s,a?a[0]:n.__k&&C(n,0),l,c),null!=a)for(u=a.length;u--;)null!=a[u]&&g(a[u]);l||(u="value",void 0!==A&&(A!==t[u]||"progress"===w&&!A||"option"===w&&A!==y[u])&&B(t,u,A,y[u],!1),u="checked",void 0!==b&&b!==t[u]&&B(t,u,b,y[u],!1))}return t}function j(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function V(t,e,n){var o,r;if(i.unmount&&i.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||j(o,null,e)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){i.__e(t,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&V(o[r],e,n||"function"!=typeof t.type);n||null==t.__e||g(t.__e),t.__=t.__e=t.__d=void 0}function z(t,e,n){return this.constructor(t,n)}function N(t,e,n){var r,a,s,l;i.__&&i.__(t,e),a=(r="function"==typeof n)?null:n&&n.__k||e.__k,s=[],l=[],R(e,t=(!r&&n||e).__k=v(y,null,[t]),a||d,d,void 0!==e.ownerSVGElement,!r&&n?[n]:a?null:e.firstChild?o.call(e.childNodes):null,s,!r&&n?n:a?a.__e:e.firstChild,r,l),t.__d=void 0,M(s,t,l)}function U(t,e){N(t,e,U)}function H(t,e,n){var i,r,a,s,l=m({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==a?i=e[a]:"ref"==a?r=e[a]:l[a]=void 0===e[a]&&void 0!==s?s[a]:e[a];return arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):n),A(t.type,l,i||t.key,r||t.ref,null)}function G(t,e){var n={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,o;return this.getChildContext||(n=[],(o={})[e]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,E(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}o=h.slice,i={__e:function(t,e,n,o){for(var i,r,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(t)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,o||{}),a=i.__d),a)return i.__E=i}catch(e){t=e}throw t}},r=0,S.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof t&&(t=t(m({},n),this.props)),t&&m(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),E(this))},S.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),E(this))},S.prototype.render=y,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(t,e){return t.__v.__b-e.__v.__b},L.__r=0,u=0;var Y,X,Q,Z,$=0,q=[],K=[],J=i,tt=J.__b,et=J.__r,nt=J.diffed,ot=J.__c,it=J.unmount,rt=J.__;function at(t,e){J.__h&&J.__h(X,t,$||e),$=0;var n=X.__H||(X.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:K}),n.__[t]}function st(t){return $=1,lt(Et,t)}function lt(t,e,n){var o=at(Y++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Et(void 0,e),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=X,!X.u)){var i=function(t,e,n){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter((function(t){return!!t.__c}));if(i.every((function(t){return!t.__N})))return!r||r.call(this,t,e,n);var a=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}})),!(!a&&o.__c.props===t)&&(!r||r.call(this,t,e,n))};X.u=!0;var r=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(t,e,n){if(this.__e){var o=r;r=void 0,i(t,e,n),r=o}a&&a.call(this,t,e,n)},X.shouldComponentUpdate=i}return o.__N||o.__}function ct(t,e){var n=at(Y++,3);!J.__s&&xt(n.__H,e)&&(n.__=t,n.i=e,X.__H.__h.push(n))}function ut(t,e){var n=at(Y++,4);!J.__s&&xt(n.__H,e)&&(n.__=t,n.i=e,X.__h.push(n))}function dt(t){return $=5,pt((function(){return{current:t}}),[])}function ht(t,e,n){$=6,ut((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function pt(t,e){var n=at(Y++,7);return xt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function ft(t,e){return $=8,pt((function(){return t}),e)}function mt(t){var e=X.context[t.__c],n=at(Y++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(X)),e.props.value):t.__}function gt(t,e){J.useDebugValue&&J.useDebugValue(e?e(t):t)}function vt(t){var e=at(Y++,10),n=st();return e.__=t,X.componentDidCatch||(X.componentDidCatch=function(t,o){e.__&&e.__(t,o),n[1](t)}),[n[0],function(){n[1](void 0)}]}function At(){var t=at(Y++,11);if(!t.__){for(var e=X.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function bt(){for(var t;t=q.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ct),t.__H.__h.forEach(wt),t.__H.__h=[]}catch(e){t.__H.__h=[],J.__e(e,t.__v)}}J.__b=function(t){X=null,tt&&tt(t)},J.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rt&&rt(t,e)},J.__r=function(t){et&&et(t),Y=0;var e=(X=t.__c).__H;e&&(Q===X?(e.__h=[],X.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=K,t.__N=t.i=void 0}))):(e.__h.forEach(Ct),e.__h.forEach(wt),e.__h=[],Y=0)),Q=X},J.diffed=function(t){nt&&nt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==q.push(e)&&Z===J.requestAnimationFrame||((Z=J.requestAnimationFrame)||St)(bt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==K&&(t.__=t.__V),t.i=void 0,t.__V=K}))),Q=X=null},J.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Ct),t.__h=t.__h.filter((function(t){return!t.__||wt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],J.__e(n,t.__v)}})),ot&&ot(t,e)},J.unmount=function(t){it&&it(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{Ct(t)}catch(t){e=t}})),n.__H=void 0,e&&J.__e(e,n.__v))};var yt="function"==typeof requestAnimationFrame;function St(t){var e,n=function(){clearTimeout(o),yt&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);yt&&(e=requestAnimationFrame(n))}function Ct(t){var e=X,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),X=e}function wt(t){var e=X;t.__c=t.__(),X=e}function xt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Et(t,e){return"function"==typeof e?e(t):e}function Lt(t,e){for(var n in e)t[n]=e[n];return t}function _t(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var o in e)if("__source"!==o&&t[o]!==e[o])return!0;return!1}function Ot(t,e){this.props=t,this.context=e}function kt(t,e){function n(t){var n=this.props.ref,o=n==t.ref;return!o&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!o:_t(this.props,t)}function o(e){return this.shouldComponentUpdate=n,v(t,e)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Ot.prototype=new S).isPureReactComponent=!0,Ot.prototype.shouldComponentUpdate=function(t,e){return _t(this.props,t)||_t(this.state,e)};var Tt=i.__b;i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Tt&&Tt(t)};var Pt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Wt(t){function e(e){var n=Lt({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=Pt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Bt=function(t,e){return null==t?null:T(T(t).map(e))},Dt={map:Bt,forEach:Bt,count:function(t){return t?T(t).length:0},only:function(t){var e=T(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:T},It=i.__e;i.__e=function(t,e,n,o){if(t.then)for(var i,r=e;r=r.__;)if((i=r.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);It(t,e,n,o)};var Rt=i.unmount;function Mt(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=Lt({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Mt(t,e,n)}))),t}function Ft(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Ft(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function jt(){this.__u=0,this.t=null,this.__b=null}function Vt(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function zt(t){var e,n,o;function i(i){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){o=t})),o)throw o;if(!n)throw e;return v(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Nt(){this.u=null,this.o=null}i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Rt&&Rt(t)},(jt.prototype=new S).__c=function(t,e){var n=e.__c,o=this;null==o.t&&(o.t=[]),o.t.push(n);var i=Vt(o.__v),r=!1,a=function(){r||(r=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--o.__u){if(o.state.__a){var t=o.state.__a;o.__v.__k[0]=Ft(t,t.__c.__P,t.__c.__O)}var e;for(o.setState({__a:o.__b=null});e=o.t.pop();)e.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(a,a)},jt.prototype.componentWillUnmount=function(){this.t=[]},jt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Mt(this.__b,n,o.__O=o.__P)}this.__b=null}var i=e.__a&&v(y,null,t.fallback);return i&&(i.__u&=-33),[v(y,null,e.__a?null:t.children),i]};var Ut=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function Ht(t){return this.getChildContext=function(){return t.context},t.children}function Gt(t){var e=this,n=t.i;e.componentWillUnmount=function(){N(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),N(v(Ht,{context:e.context},t.__v),e.l)}function Yt(t,e){var n=v(Gt,{__v:t,i:e});return n.containerInfo=e,n}(Nt.prototype=new S).__a=function(t){var e=this,n=Vt(e.__v),o=e.o.get(t);return o[0]++,function(i){var r=function(){e.props.revealOrder?(o.push(i),Ut(e,t,o)):i()};n?n(r):r()}},Nt.prototype.render=function(t){this.u=null,this.o=new Map;var e=T(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Nt.prototype.componentDidUpdate=Nt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ut(t,n,e)}))};var Xt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Qt=/^(?: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]/,Zt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,$t=/[A-Z0-9]/g,qt="undefined"!=typeof document,Kt=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function Jt(t,e,n){return null==e.__k&&(e.textContent=""),N(t,e),"function"==typeof n&&n(),t?t.__c:null}function te(t,e,n){return U(t,e),"function"==typeof n&&n(),t?t.__c:null}S.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(S.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var ee=i.event;function ne(){}function oe(){return this.cancelBubble}function ie(){return this.defaultPrevented}i.event=function(t){return ee&&(t=ee(t)),t.persist=ne,t.isPropagationStopped=oe,t.isDefaultPrevented=ie,t.nativeEvent=t};var re,ae={enumerable:!1,configurable:!0,get:function(){return this.class}},se=i.vnode;i.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,o={};for(var i in e){var r=e[i];if(!("value"===i&&"defaultValue"in e&&null==r||qt&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===r?r="":"translate"===a&&"no"===r?r=!1:"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Kt(e.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":Zt.test(i)?i=a:-1===n.indexOf("-")&&Qt.test(i)?i=i.replace($t,"-$&").toLowerCase():null===r&&(r=void 0):a=i="oninput","oninput"===a&&o[i=a]&&(i="oninputCapture"),o[i]=r}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=T(e.children).forEach((function(t){t.props.selected=-1!=o.value.indexOf(t.props.value)}))),"select"==n&&null!=o.defaultValue&&(o.value=T(e.children).forEach((function(t){t.props.selected=o.multiple?-1!=o.defaultValue.indexOf(t.props.value):o.defaultValue==t.props.value}))),e.class&&!e.className?(o.class=e.class,Object.defineProperty(o,"className",ae)):(e.className&&!e.class||e.class&&e.className)&&(o.class=o.className=e.className),t.props=o}(t),t.$$typeof=Xt,se&&se(t)};var le=i.__r;i.__r=function(t){le&&le(t),re=t.__c};var ce=i.diffed;i.diffed=function(t){ce&&ce(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),re=null};var ue={ReactCurrentDispatcher:{current:{readContext:function(t){return re.__n[t.__c].props.value}}}},de="17.0.2";function he(t){return v.bind(null,t)}function pe(t){return!!t&&t.$$typeof===Xt}function fe(t){return pe(t)&&t.type===y}function me(t){return pe(t)?H.apply(null,arguments):t}function ge(t){return!!t.__k&&(N(null,t),!0)}function ve(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ae=function(t,e){return t(e)},be=function(t,e){return t(e)},ye=y;function Se(t){t()}function Ce(t){return t}function we(){return[!1,Se]}var xe=ut,Ee=pe;function Le(t,e){var n=e(),o=st({h:{__:n,v:e}}),i=o[0].h,r=o[1];return ut((function(){i.__=n,i.v=e,_e(i)&&r({h:i})}),[t,n,e]),ct((function(){return _e(i)&&r({h:i}),t((function(){_e(i)&&r({h:i})}))}),[t]),n}function _e(t){var e,n,o=t.v,i=t.__;try{var r=o();return!((e=i)===(n=r)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(t){return!0}}var Oe={useState:st,useId:At,useReducer:lt,useEffect:ct,useLayoutEffect:ut,useInsertionEffect:ut,useTransition:we,useDeferredValue:Ce,useSyncExternalStore:Le,startTransition:Se,useRef:dt,useImperativeHandle:ht,useMemo:pt,useCallback:ft,useContext:mt,useDebugValue:gt,version:"17.0.2",Children:Dt,render:Jt,hydrate:te,unmountComponentAtNode:ge,createPortal:Yt,createElement:v,createContext:G,createFactory:he,cloneElement:me,createRef:b,Fragment:y,isValidElement:pe,isElement:pe,isFragment:fe,findDOMNode:ve,Component:S,PureComponent:Ot,memo:kt,forwardRef:Wt,flushSync:be,unstable_batchedUpdates:Ae,StrictMode:y,Suspense:jt,SuspenseList:Nt,lazy:zt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ue}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"e",(function(){return l}));var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r=function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};function a(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}Object.create;function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i<r;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))}Object.create},function(t,e){t.exports=window["@mui"]},,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Yt})),n.d(e,"b",(function(){return Xt}));var o=n(1),i=(n(19),n(0)),r=n(17),a=n.n(r),s=n(7),l=n(18),c="undefined"!=typeof t&&void 0!==t.env&&(t.env.REACT_APP_SC_ATTR||t.env.SC_ATTR)||"data-styled",u="active",d="data-styled-version",h="6.1.8",p="/*!sc*/\n",f="undefined"!=typeof window&&"HTMLElement"in window,m=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env&&void 0!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==t.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&t.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env&&void 0!==t.env.SC_DISABLE_SPEEDY&&""!==t.env.SC_DISABLE_SPEEDY&&("false"!==t.env.SC_DISABLE_SPEEDY&&t.env.SC_DISABLE_SPEEDY)),g=(new Set,Object.freeze([])),v=Object.freeze({});function A(t,e,n){return void 0===n&&(n=v),t.theme!==n.theme&&t.theme||e||n.theme}var b=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),y=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,S=/(^-|-$)/g;function C(t){return t.replace(y,"-").replace(S,"")}var w=/(a)(d)/gi,x=function(t){return String.fromCharCode(t+(t>25?39:97))};function E(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=x(e%52)+n;return(x(e%52)+n).replace(w,"$1-$2")}var L,_=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},O=function(t){return _(5381,t)};function k(t){return E(O(t)>>>0)}function T(t){return t.displayName||t.name||"Component"}function P(t){return"string"==typeof t&&!0}var W="function"==typeof Symbol&&Symbol.for,B=W?Symbol.for("react.memo"):60115,D=W?Symbol.for("react.forward_ref"):60112,I={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},R={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F=((L={})[D]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},L[B]=M,L);function j(t){return("type"in(e=t)&&e.type.$$typeof)===B?M:"$$typeof"in t?F[t.$$typeof]:I;var e}var V=Object.defineProperty,z=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,U=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,G=Object.prototype;function Y(t,e,n){if("string"!=typeof e){if(G){var o=H(e);o&&o!==G&&Y(t,o,n)}var i=z(e);N&&(i=i.concat(N(e)));for(var r=j(t),a=j(e),s=0;s<i.length;++s){var l=i[s];if(!(l in R||n&&n[l]||a&&l in a||r&&l in r)){var c=U(e,l);try{V(t,l,c)}catch(t){}}}}return t}function X(t){return"function"==typeof t}function Q(t){return"object"==typeof t&&"styledComponentId"in t}function Z(t,e){return t&&e?"".concat(t," ").concat(e):t||e||""}function $(t,e){if(0===t.length)return"";for(var n=t[0],o=1;o<t.length;o++)n+=e?e+t[o]:t[o];return n}function q(t){return null!==t&&"object"==typeof t&&t.constructor.name===Object.name&&!("props"in t&&t.$$typeof)}function K(t,e,n){if(void 0===n&&(n=!1),!n&&!q(t)&&!Array.isArray(t))return e;if(Array.isArray(e))for(var o=0;o<e.length;o++)t[o]=K(t[o],e[o]);else if(q(e))for(var o in e)t[o]=K(t[o],e[o]);return t}function J(t,e){Object.defineProperty(t,"toString",{value:e})}function tt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):""))}var et=function(){function t(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return t.prototype.indexOfGroup=function(t){for(var e=0,n=0;n<t;n++)e+=this.groupSizes[n];return e},t.prototype.insertRules=function(t,e){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,i=o;t>=i;)if((i<<=1)<0)throw tt(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var r=o;r<i;r++)this.groupSizes[r]=0}for(var a=this.indexOfGroup(t+1),s=(r=0,e.length);r<s;r++)this.tag.insertRule(a,e[r])&&(this.groupSizes[t]++,a++)},t.prototype.clearGroup=function(t){if(t<this.length){var e=this.groupSizes[t],n=this.indexOfGroup(t),o=n+e;this.groupSizes[t]=0;for(var i=n;i<o;i++)this.tag.deleteRule(n)}},t.prototype.getGroup=function(t){var e="";if(t>=this.length||0===this.groupSizes[t])return e;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),i=o+n,r=o;r<i;r++)e+="".concat(this.tag.getRule(r)).concat(p);return e},t}(),nt=new Map,ot=new Map,it=1,rt=function(t){if(nt.has(t))return nt.get(t);for(;ot.has(it);)it++;var e=it++;return nt.set(t,e),ot.set(e,t),e},at=function(t,e){it=e+1,nt.set(t,e),ot.set(e,t)},st="style[".concat(c,"][").concat(d,'="').concat(h,'"]'),lt=new RegExp("^".concat(c,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ct=function(t,e,n){for(var o,i=n.split(","),r=0,a=i.length;r<a;r++)(o=i[r])&&t.registerName(e,o)},ut=function(t,e){for(var n,o=(null!==(n=e.textContent)&&void 0!==n?n:"").split(p),i=[],r=0,a=o.length;r<a;r++){var s=o[r].trim();if(s){var l=s.match(lt);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(at(u,c),ct(t,u,l[3]),t.getTag().insertRules(c,i)),i.length=0}else i.push(s)}}};function dt(){return n.nc}var ht=function(t){var e=document.head,n=t||e,o=document.createElement("style"),i=function(t){var e=Array.from(t.querySelectorAll("style[".concat(c,"]")));return e[e.length-1]}(n),r=void 0!==i?i.nextSibling:null;o.setAttribute(c,u),o.setAttribute(d,h);var a=dt();return a&&o.setAttribute("nonce",a),n.insertBefore(o,r),o},pt=function(){function t(t){this.element=ht(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var e=document.styleSheets,n=0,o=e.length;n<o;n++){var i=e[n];if(i.ownerNode===t)return i}throw tt(17)}(this.element),this.length=0}return t.prototype.insertRule=function(t,e){try{return this.sheet.insertRule(e,t),this.length++,!0}catch(t){return!1}},t.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},t.prototype.getRule=function(t){var e=this.sheet.cssRules[t];return e&&e.cssText?e.cssText:""},t}(),ft=function(){function t(t){this.element=ht(t),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(t,e){if(t<=this.length&&t>=0){var n=document.createTextNode(e);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},t.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},t}(),mt=function(){function t(t){this.rules=[],this.length=0}return t.prototype.insertRule=function(t,e){return t<=this.length&&(this.rules.splice(t,0,e),this.length++,!0)},t.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},t.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},t}(),gt=f,vt={isServer:!f,useCSSOMInjection:!m},At=function(){function t(t,e,n){void 0===t&&(t=v),void 0===e&&(e={});var i=this;this.options=Object(o.a)(Object(o.a)({},vt),t),this.gs=e,this.names=new Map(n),this.server=!!t.isServer,!this.server&&f&&gt&&(gt=!1,function(t){for(var e=document.querySelectorAll(st),n=0,o=e.length;n<o;n++){var i=e[n];i&&i.getAttribute(c)!==u&&(ut(t,i),i.parentNode&&i.parentNode.removeChild(i))}}(this)),J(this,(function(){return function(t){for(var e=t.getTag(),n=e.length,o="",i=function(n){var i=function(t){return ot.get(t)}(n);if(void 0===i)return"continue";var r=t.names.get(i),a=e.getGroup(n);if(void 0===r||0===a.length)return"continue";var s="".concat(c,".g").concat(n,'[id="').concat(i,'"]'),l="";void 0!==r&&r.forEach((function(t){t.length>0&&(l+="".concat(t,","))})),o+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(p)},r=0;r<n;r++)i(r);return o}(i)}))}return t.registerId=function(t){return rt(t)},t.prototype.reconstructWithOptions=function(e,n){return void 0===n&&(n=!0),new t(Object(o.a)(Object(o.a)({},this.options),e),this.gs,n&&this.names||void 0)},t.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(t=function(t){var e=t.useCSSOMInjection,n=t.target;return t.isServer?new mt(n):e?new pt(n):new ft(n)}(this.options),new et(t)));var t},t.prototype.hasNameForId=function(t,e){return this.names.has(t)&&this.names.get(t).has(e)},t.prototype.registerName=function(t,e){if(rt(t),this.names.has(t))this.names.get(t).add(e);else{var n=new Set;n.add(e),this.names.set(t,n)}},t.prototype.insertRules=function(t,e,n){this.registerName(t,e),this.getTag().insertRules(rt(t),n)},t.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},t.prototype.clearRules=function(t){this.getTag().clearGroup(rt(t)),this.clearNames(t)},t.prototype.clearTag=function(){this.tag=void 0},t}(),bt=/&/g,yt=/^\s*\/\/.*$/gm;function St(t,e){return t.map((function(t){return"rule"===t.type&&(t.value="".concat(e," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(e," ")),t.props=t.props.map((function(t){return"".concat(e," ").concat(t)}))),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=St(t.children,e)),t}))}function Ct(t){var e,n,o,i=void 0===t?v:t,r=i.options,a=void 0===r?v:r,l=i.plugins,c=void 0===l?g:l,u=function(t,o,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,"").length>0?".".concat(e):t},d=c.slice();d.push((function(t){t.type===s.a&&t.value.includes("&")&&(t.props[0]=t.props[0].replace(bt,n).replace(o,u))})),a.prefix&&d.push(s.d),d.push(s.g);var h=function(t,i,r,l){void 0===i&&(i=""),void 0===r&&(r=""),void 0===l&&(l="&"),e=l,n=i,o=new RegExp("\\".concat(n,"\\b"),"g");var c=t.replace(yt,""),u=s.b(r||i?"".concat(r," ").concat(i," { ").concat(c," }"):c);a.namespace&&(u=St(u,a.namespace));var h=[];return s.f(u,s.c(d.concat(s.e((function(t){return h.push(t)}))))),h};return h.hash=c.length?c.reduce((function(t,e){return e.name||tt(15),_(t,e.name)}),5381).toString():"",h}var wt=new At,xt=Ct(),Et=i.default.createContext({shouldForwardProp:void 0,styleSheet:wt,stylis:xt}),Lt=(Et.Consumer,i.default.createContext(void 0));function _t(){return Object(i.useContext)(Et)}function Ot(t){var e=Object(i.useState)(t.stylisPlugins),n=e[0],o=e[1],r=_t().styleSheet,s=Object(i.useMemo)((function(){var e=r;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target,r]),l=Object(i.useMemo)((function(){return Ct({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:n})}),[t.enableVendorPrefixes,t.namespace,n]);Object(i.useEffect)((function(){a()(n,t.stylisPlugins)||o(t.stylisPlugins)}),[t.stylisPlugins]);var c=Object(i.useMemo)((function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:s,stylis:l}}),[t.shouldForwardProp,s,l]);return i.default.createElement(Et.Provider,{value:c},i.default.createElement(Lt.Provider,{value:l},t.children))}var kt=function(){function t(t,e){var n=this;this.inject=function(t,e){void 0===e&&(e=xt);var o=n.name+e.hash;t.hasNameForId(n.id,o)||t.insertRules(n.id,o,e(n.rules,o,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=e,J(this,(function(){throw tt(12,String(n.name))}))}return t.prototype.getName=function(t){return void 0===t&&(t=xt),this.name+t.hash},t}(),Tt=function(t){return t>="A"&&t<="Z"};function Pt(t){for(var e="",n=0;n<t.length;n++){var o=t[n];if(1===n&&"-"===o&&"-"===t[0])return t;Tt(o)?e+="-"+o.toLowerCase():e+=o}return e.startsWith("ms-")?"-"+e:e}var Wt=function(t){return null==t||!1===t||""===t},Bt=function(t){var e,n,i=[];for(var r in t){var a=t[r];t.hasOwnProperty(r)&&!Wt(a)&&(Array.isArray(a)&&a.isCss||X(a)?i.push("".concat(Pt(r),":"),a,";"):q(a)?i.push.apply(i,Object(o.e)(Object(o.e)(["".concat(r," {")],Bt(a),!1),["}"],!1)):i.push("".concat(Pt(r),": ").concat((e=r,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||e in l.a||e.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return i};function Dt(t,e,n,o){return Wt(t)?[]:Q(t)?[".".concat(t.styledComponentId)]:X(t)?!X(i=t)||i.prototype&&i.prototype.isReactComponent||!e?[t]:Dt(t(e),e,n,o):t instanceof kt?n?(t.inject(n,o),[t.getName(o)]):[t]:q(t)?Bt(t):Array.isArray(t)?Array.prototype.concat.apply(g,t.map((function(t){return Dt(t,e,n,o)}))):[t.toString()];var i}function It(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(X(n)&&!Q(n))return!1}return!0}var Rt=O(h),Mt=function(){function t(t,e,n){this.rules=t,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&It(t),this.componentId=e,this.baseHash=_(Rt,e),this.baseStyle=n,At.registerId(e)}return t.prototype.generateAndInjectStyles=function(t,e,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,e,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&e.hasNameForId(this.componentId,this.staticRulesId))o=Z(o,this.staticRulesId);else{var i=$(Dt(this.rules,t,e,n)),r=E(_(this.baseHash,i)>>>0);if(!e.hasNameForId(this.componentId,r)){var a=n(i,".".concat(r),void 0,this.componentId);e.insertRules(this.componentId,r,a)}o=Z(o,r),this.staticRulesId=r}else{for(var s=_(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=$(Dt(u,t,e,n));s=_(s,d+c),l+=d}}if(l){var h=E(s>>>0);e.hasNameForId(this.componentId,h)||e.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),o=Z(o,h)}}return o},t}(),Ft=i.default.createContext(void 0);Ft.Consumer;var jt={};new Set;function Vt(t,e,n){var r=Q(t),a=t,s=!P(t),l=e.attrs,c=void 0===l?g:l,u=e.componentId,d=void 0===u?function(t,e){var n="string"!=typeof t?"sc":C(t);jt[n]=(jt[n]||0)+1;var o="".concat(n,"-").concat(k(h+n+jt[n]));return e?"".concat(e,"-").concat(o):o}(e.displayName,e.parentComponentId):u,p=e.displayName,f=void 0===p?function(t){return P(t)?"styled.".concat(t):"Styled(".concat(T(t),")")}(t):p,m=e.displayName&&e.componentId?"".concat(C(e.displayName),"-").concat(e.componentId):e.componentId||d,y=r&&a.attrs?a.attrs.concat(c).filter(Boolean):c,S=e.shouldForwardProp;if(r&&a.shouldForwardProp){var w=a.shouldForwardProp;if(e.shouldForwardProp){var x=e.shouldForwardProp;S=function(t,e){return w(t,e)&&x(t,e)}}else S=w}var E=new Mt(n,m,r?a.componentStyle:void 0);function L(t,e){return function(t,e,n){var r=t.attrs,a=t.componentStyle,s=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,u=t.target,d=i.default.useContext(Ft),h=_t(),p=t.shouldForwardProp||h.shouldForwardProp,f=A(e,d,s)||v,m=function(t,e,n){for(var i,r=Object(o.a)(Object(o.a)({},e),{className:void 0,theme:n}),a=0;a<t.length;a+=1){var s=X(i=t[a])?i(r):i;for(var l in s)r[l]="className"===l?Z(r[l],s[l]):"style"===l?Object(o.a)(Object(o.a)({},r[l]),s[l]):s[l]}return e.className&&(r.className=Z(r.className,e.className)),r}(r,e,f),g=m.as||u,y={};for(var S in m)void 0===m[S]||"$"===S[0]||"as"===S||"theme"===S&&m.theme===f||("forwardedAs"===S?y.as=m.forwardedAs:p&&!p(S,g)||(y[S]=m[S]));var C=function(t,e){var n=_t();return t.generateAndInjectStyles(e,n.styleSheet,n.stylis)}(a,m),w=Z(l,c);return C&&(w+=" "+C),m.className&&(w+=" "+m.className),y[P(g)&&!b.has(g)?"class":"className"]=w,y.ref=n,Object(i.createElement)(g,y)}(_,t,e)}L.displayName=f;var _=i.default.forwardRef(L);return _.attrs=y,_.componentStyle=E,_.displayName=f,_.shouldForwardProp=S,_.foldedComponentIds=r?Z(a.foldedComponentIds,a.styledComponentId):"",_.styledComponentId=m,_.target=r?a.target:t,Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var o=0,i=e;o<i.length;o++)K(t,i[o],!0);return t}({},a.defaultProps,t):t}}),J(_,(function(){return".".concat(_.styledComponentId)})),s&&Y(_,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),_}function zt(t,e){for(var n=[t[0]],o=0,i=e.length;o<i;o+=1)n.push(e[o],t[o+1]);return n}var Nt=function(t){return Object.assign(t,{isCss:!0})};function Ut(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(X(t)||q(t))return Nt(Dt(zt(g,Object(o.e)([t],e,!0))));var i=t;return 0===e.length&&1===i.length&&"string"==typeof i[0]?Dt(i):Nt(Dt(zt(i,e)))}function Ht(t,e,n){if(void 0===n&&(n=v),!e)throw tt(1,e);var i=function(i){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return t(e,n,Ut.apply(void 0,Object(o.e)([i],r,!1)))};return i.attrs=function(i){return Ht(t,e,Object(o.a)(Object(o.a)({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},i.withConfig=function(i){return Ht(t,e,Object(o.a)(Object(o.a)({},n),i))},i}var Gt=function(t){return Ht(Vt,t)},Yt=Gt;b.forEach((function(t){Yt[t]=Gt(t)}));!function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=It(t),At.registerId(this.componentId+1)}t.prototype.createStyles=function(t,e,n,o){var i=o($(Dt(this.rules,e,n,o)),""),r=this.componentId+t;n.insertRules(r,r,i)},t.prototype.removeStyles=function(t,e){e.clearRules(this.componentId+t)},t.prototype.renderStyles=function(t,e,n,o){t>2&&At.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,e,n,o)}}();function Xt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=$(Ut.apply(void 0,Object(o.e)([t],e,!1))),r=k(i);return new kt(r,i)}(function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=dt(),o=$([n&&'nonce="'.concat(n,'"'),"".concat(c,'="true"'),"".concat(d,'="').concat(h,'"')].filter(Boolean)," ");return"<style ".concat(o,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw tt(2);return t._emitSheetCSS()},this.getStyleElement=function(){var e;if(t.sealed)throw tt(2);var n=((e={})[c]="",e[d]=h,e.dangerouslySetInnerHTML={__html:t.instance.toString()},e),r=dt();return r&&(n.nonce=r),[i.default.createElement("style",Object(o.a)({},n,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new At({isServer:!0}),this.sealed=!1}t.prototype.collectStyles=function(t){if(this.sealed)throw tt(2);return i.default.createElement(Ot,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(t){throw tt(3)}})(),"__sc-".concat(c,"__")}).call(this,n(14))},function(t,e,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var r=typeof o;if("string"===r||"number"===r)t.push(o);else if(Array.isArray(o)){if(o.length){var a=i.apply(null,o);a&&t.push(a)}}else if("object"===r)if(o.toString===Object.prototype.toString)for(var s in o)n.call(o,s)&&o[s]&&t.push(s);else t.push(o.toString())}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(o=function(){return i}.apply(e,[]))||(t.exports=o)}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return Y})),n.d(e,"c",(function(){return tt})),n.d(e,"d",(function(){return nt})),n.d(e,"e",(function(){return et})),n.d(e,"f",(function(){return K})),n.d(e,"g",(function(){return J}));var o="-ms-",i="-moz-",r="-webkit-",a="comm",s="rule",l="decl",c="@keyframes",u=Math.abs,d=String.fromCharCode,h=Object.assign;function p(t){return t.trim()}function f(t,e){return(t=e.exec(t))?t[0]:t}function m(t,e,n){return t.replace(e,n)}function g(t,e,n){return t.indexOf(e,n)}function v(t,e){return 0|t.charCodeAt(e)}function A(t,e,n){return t.slice(e,n)}function b(t){return t.length}function y(t){return t.length}function S(t,e){return e.push(t),t}function C(t,e){return t.map(e).join("")}function w(t,e){return t.filter((function(t){return!f(t,e)}))}var x=1,E=1,L=0,_=0,O=0,k="";function T(t,e,n,o,i,r,a,s){return{value:t,root:e,parent:n,type:o,props:i,children:r,line:x,column:E,length:a,return:"",siblings:s}}function P(t,e){return h(T("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function W(t){for(;t.root;)t=P(t.root,{children:[t]});S(t,t.siblings)}function B(){return O=_<L?v(k,_++):0,E++,10===O&&(E=1,x++),O}function D(){return v(k,_)}function I(){return _}function R(t,e){return A(k,t,e)}function M(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function F(t){return x=E=1,L=b(k=t),_=0,[]}function j(t){return k="",t}function V(t){return p(R(_-1,U(91===t?t+2:40===t?t+1:t)))}function z(t){for(;(O=D())&&O<33;)B();return M(t)>2||M(O)>3?"":" "}function N(t,e){for(;--e&&B()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return R(t,I()+(e<6&&32==D()&&32==B()))}function U(t){for(;B();)switch(O){case t:return _;case 34:case 39:34!==t&&39!==t&&U(O);break;case 40:41===t&&U(t);break;case 92:B()}return _}function H(t,e){for(;B()&&t+O!==57&&(t+O!==84||47!==D()););return"/*"+R(e,_-1)+"*"+d(47===t?t:B())}function G(t){for(;!M(D());)B();return R(t,_)}function Y(t){return j(X("",null,null,null,[""],t=F(t),0,[0],t))}function X(t,e,n,o,i,r,a,s,l){for(var c=0,h=0,p=a,f=0,A=0,y=0,C=1,w=1,L=1,T=0,P="",W=i,R=r,M=o,F=P;w;)switch(y=T,T=B()){case 40:if(108!=y&&58==v(F,p-1)){-1!=g(F+=m(V(T),"&","&\f"),"&\f",u(c?s[c-1]:0))&&(L=-1);break}case 34:case 39:case 91:F+=V(T);break;case 9:case 10:case 13:case 32:F+=z(y);break;case 92:F+=N(I()-1,7);continue;case 47:switch(D()){case 42:case 47:S(Z(H(B(),I()),e,n,l),l);break;default:F+="/"}break;case 123*C:s[c++]=b(F)*L;case 125*C:case 59:case 0:switch(T){case 0:case 125:w=0;case 59+h:-1==L&&(F=m(F,/\f/g,"")),A>0&&b(F)-p&&S(A>32?$(F+";",o,n,p-1,l):$(m(F," ","")+";",o,n,p-2,l),l);break;case 59:F+=";";default:if(S(M=Q(F,e,n,c,h,i,s,P,W=[],R=[],p,r),r),123===T)if(0===h)X(F,e,M,M,W,r,p,s,R);else switch(99===f&&110===v(F,3)?100:f){case 100:case 108:case 109:case 115:X(t,M,M,o&&S(Q(t,M,M,0,0,i,s,P,i,W=[],p,R),R),i,R,p,s,o?W:R);break;default:X(F,M,M,M,[""],R,0,s,R)}}c=h=A=0,C=L=1,P=F="",p=a;break;case 58:p=1+b(F),A=y;default:if(C<1)if(123==T)--C;else if(125==T&&0==C++&&125==(O=_>0?v(k,--_):0,E--,10===O&&(E=1,x--),O))continue;switch(F+=d(T),T*C){case 38:L=h>0?1:(F+="\f",-1);break;case 44:s[c++]=(b(F)-1)*L,L=1;break;case 64:45===D()&&(F+=V(B())),f=D(),h=p=b(P=F+=G(I())),T++;break;case 45:45===y&&2==b(F)&&(C=0)}}return r}function Q(t,e,n,o,i,r,a,l,c,d,h,f){for(var g=i-1,v=0===i?r:[""],b=y(v),S=0,C=0,w=0;S<o;++S)for(var x=0,E=A(t,g+1,g=u(C=a[S])),L=t;x<b;++x)(L=p(C>0?v[x]+" "+E:m(E,/&\f/g,v[x])))&&(c[w++]=L);return T(t,e,n,0===i?s:l,c,d,h,f)}function Z(t,e,n,o){return T(t,e,n,a,d(O),A(t,2,-2),0,o)}function $(t,e,n,o,i){return T(t,e,n,l,A(t,0,o),A(t,o+1,-1),o,i)}function q(t,e,n){switch(function(t,e){return 45^v(t,0)?(((e<<2^v(t,0))<<2^v(t,1))<<2^v(t,2))<<2^v(t,3):0}(t,e)){case 5103:return r+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return r+t+t;case 4789:return i+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return r+t+i+t+o+t+t;case 5936:switch(v(t,e+11)){case 114:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return r+t+o+t+t;case 6165:return r+t+o+"flex-"+t+t;case 5187:return r+t+m(t,/(\w+).+(:[^]+)/,r+"box-$1$2"+o+"flex-$1$2")+t;case 5443:return r+t+o+"flex-item-"+m(t,/flex-|-self/g,"")+(f(t,/flex-|baseline/)?"":o+"grid-row-"+m(t,/flex-|-self/g,""))+t;case 4675:return r+t+o+"flex-line-pack"+m(t,/align-content|flex-|-self/g,"")+t;case 5548:return r+t+o+m(t,"shrink","negative")+t;case 5292:return r+t+o+m(t,"basis","preferred-size")+t;case 6060:return r+"box-"+m(t,"-grow","")+r+t+o+m(t,"grow","positive")+t;case 4554:return r+m(t,/([^-])(transform)/g,"$1"+r+"$2")+t;case 6187:return m(m(m(t,/(zoom-|grab)/,r+"$1"),/(image-set)/,r+"$1"),t,"")+t;case 5495:case 3959:return m(t,/(image-set\([^]*)/,r+"$1$`$1");case 4968:return m(m(t,/(.+:)(flex-)?(.*)/,r+"box-pack:$3"+o+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+r+t+t;case 4200:if(!f(t,/flex-|baseline/))return o+"grid-column-align"+A(t,e)+t;break;case 2592:case 3360:return o+m(t,"template-","")+t;case 4384:case 3616:return n&&n.some((function(t,n){return e=n,f(t.props,/grid-\w+-end/)}))?~g(t+(n=n[e].value),"span",0)?t:o+m(t,"-start","")+t+o+"grid-row-span:"+(~g(n,"span",0)?f(n,/\d+/):+f(n,/\d+/)-+f(t,/\d+/))+";":o+m(t,"-start","")+t;case 4896:case 4128:return n&&n.some((function(t){return f(t.props,/grid-\w+-start/)}))?t:o+m(m(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return m(t,/(.+)-inline(.+)/,r+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(b(t)-1-e>6)switch(v(t,e+1)){case 109:if(45!==v(t,e+4))break;case 102:return m(t,/(.+:)(.+)-([^]+)/,"$1"+r+"$2-$3$1"+i+(108==v(t,e+3)?"$3":"$2-$3"))+t;case 115:return~g(t,"stretch",0)?q(m(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return m(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(e,n,i,r,a,s,l){return o+n+":"+i+l+(r?o+n+"-span:"+(a?s:+s-+i)+l:"")+t}));case 4949:if(121===v(t,e+6))return m(t,":",":"+r)+t;break;case 6444:switch(v(t,45===v(t,14)?18:11)){case 120:return m(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+r+(45===v(t,14)?"inline-":"")+"box$3$1"+r+"$2$3$1"+o+"$2box$3")+t;case 100:return m(t,":",":"+o)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return m(t,"scroll-","scroll-snap-")+t}return t}function K(t,e){for(var n="",o=0;o<t.length;o++)n+=e(t[o],o,t,e)||"";return n}function J(t,e,n,o){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case l:return t.return=t.return||t.value;case a:return"";case c:return t.return=t.value+"{"+K(t.children,o)+"}";case s:if(!b(t.value=t.props.join(",")))return""}return b(n=K(t.children,o))?t.return=t.value+"{"+n+"}":""}function tt(t){var e=y(t);return function(n,o,i,r){for(var a="",s=0;s<e;s++)a+=t[s](n,o,i,r)||"";return a}}function et(t){return function(e){e.root||(e=e.return)&&t(e)}}function nt(t,e,n,i){if(t.length>-1&&!t.return)switch(t.type){case l:return void(t.return=q(t.value,t.length,n));case c:return K([P(t,{value:m(t.value,"@","@"+r)})],i);case s:if(t.length)return C(n=t.props,(function(e){switch(f(e,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":W(P(t,{props:[m(e,/:(read-\w+)/,":-moz-$1")]})),W(P(t,{props:[e]})),h(t,{props:w(n,i)});break;case"::placeholder":W(P(t,{props:[m(e,/:(plac\w+)/,":"+r+"input-$1")]})),W(P(t,{props:[m(e,/:(plac\w+)/,":-moz-$1")]})),W(P(t,{props:[m(e,/:(plac\w+)/,o+"input-$1")]})),W(P(t,{props:[e]})),h(t,{props:w(n,i)})}return""}))}}},,function(t,e,n){"use strict";var o,i=function(){return"undefined"==typeof o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var t={};return function(e){if("undefined"==typeof t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n<a.length;n++)if(a[n].identifier===t){e=n;break}return e}function l(t,e){for(var n={},o=[],i=0;i<t.length;i++){var r=t[i],l=e.base?r[0]+e.base:r[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=s(u),h={css:r[1],media:r[2],sourceMap:r[3]};-1!==d?(a[d].references++,a[d].updater(h)):a.push({identifier:u,updater:g(h,e),references:1}),o.push(u)}return o}function c(t){var e=document.createElement("style"),o=t.attributes||{};if("undefined"==typeof o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var u,d=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function h(t,e,n,o){var i=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=d(e,i);else{var r=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function p(t,e,n){var o=n.css,i=n.media,r=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var f=null,m=0;function g(t,e){var n,o,i;if(e.singleton){var r=m++;n=f||(f=c(e)),o=h.bind(null,n,r,!1),i=h.bind(null,n,r,!0)}else n=c(e),o=p.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<n.length;o++){var i=s(n[o]);a[i].references--}for(var r=l(t,e),c=0;c<n.length;c++){var u=s(n[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=r}}}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(o)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);o&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},function(t,e,n){"use strict";(function(t){function n(){if("undefined"!=typeof t&&"undefined"!=typeof t.versions&&"undefined"!=typeof t.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(t){return!1}}Object.defineProperty(e,"__esModule",{value:!0}),e.gatherTransferables=function(t,e){const n=[];return function t(o){if(!o)return;if(o.constructor===ImageData){const t={data:o.data.slice(),width:o.width,height:o.height};return n.push(t.data.buffer),t}if(o.constructor===ArrayBuffer){const t=e?o.slice(0):o;if(n.push(t),e)return o}else if(ArrayBuffer.isView(o)){let t;if(e){t=new(0,o.constructor)(o.buffer.slice(0))}else t=o;if(n.push(t.buffer),e)return o}else if(Array.isArray(o))for(let e=0;e<o.length;++e){const n=t(o[e]);n&&(o[e]=n)}else if(o.constructor===Object)for(const e in o)if(o.hasOwnProperty(e)){const n=t(o[e]);n&&(o[e]=n)}}(t),n},e.isRemote=function(t){return t.startsWith("http:")||t.startsWith("https:")},e.areThreadsAvailable=n,e.getBuildType=function(t){const{allowSimd:e=!0,allowThreads:o=!0}=t||{};let i="";if(e&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(t){return!1}}()){i+="-simd";o&&n()&&(i+="-threads")}return i}}).call(this,n(14))},function(t,e,n){"use strict";var o=n(10),i=n.n(o)()((function(t){return t[1]}));i.push([t.i,"\n.scanbot-shutter-fade-in {\n opacity: 1;\n}\n\n.scanbot-shutter-fade-out {\n opacity: 0;\n}\n\n.scanbot-shutter-rotate {\n animation: scanbot-shutter-rotating linear infinite;\n}\n\n.scanbot-shutter-pulse-fast {\n animation: scanbot-shutter-pulsing 1s ease-in-out infinite;\n}\n\n.scanbot-shutter-button {\n position: relative;\n width: 64px;\n height: 64px;\n left: 50%;\n bottom: 12px;\n transform: translate(-50%, -100%);\n}\n\n.scanbot-shutter-button-part {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n transition: opacity 0.5s ease-in-out;\n}\n\n@keyframes scanbot-shutter-rotating {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes scanbot-shutter-pulsing {\n 0% {\n opacity: 0.25;\n }\n 50% {\n opacity: 0.8;\n }\n 100% {\n opacity: 0.25;\n }\n}\n",""]),e.a=i},function(t,e,n){"use strict";var o=n(10),i=n.n(o)()((function(t){return t[1]}));i.push([t.i,".scanbot-document-hint-text {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n border-radius: 0.25em;\n padding: 0.05em 0.3em 0.05em 0.3em;\n font-family: sans-serif;\n font-size: 0.9em;\n font-weight: 300;\n}\n",""]),e.a=i},function(t,e){var n,o,i=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(t){n=r}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var t=s(h);u=!0;for(var e=c.length;e;){for(l=c,c=[];++d<e;)l&&l[d].run();d=-1,e=c.length}l=null,u=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBridge=void 0;var o=n(11);e.WorkerBridge=class{constructor(t,e){const{requestSuffix:n=""}=e||{},i=(0,o.getBuildType)(e),r=`${t}${t.endsWith("/")?"":"/"}ScanbotSDK.Core${i}.js${n}`;if((0,o.isRemote)(r)){const t=new Blob([`importScripts("${r}")`]);this.instance=new Worker(URL.createObjectURL(t))}else this.instance=new Worker(r);this.continuations={},this.nextTicketId=1,this.instance.onmessage=t=>{const{log:e,logError:n}=t.data;if(e)return void console.log(...e);if(n)return void console.error(...n);const{ticket:o,result:i,error:r}=t.data,{resolve:a,reject:s}=this.continuations[o];delete this.continuations[o],r?s(r):a(i)}}post(t,e,n){return new Promise(((i,r)=>{const a=(0,o.gatherTransferables)(e,n),s=this.nextTicketId++;this.continuations[s]={resolve:i,reject:r},this.instance.postMessage({command:t,args:e,ticket:s},a)}))}postByCopyingArgs(t,e){return this.post(t,e,!0)}postByTransferringArgs(t,e){return this.post(t,e,!1)}destroy(){this.instance.terminate()}}},function(t,e,n){const{render:o,hydrate:i,unmountComponentAtNode:r}=n(0);function a(t){return{render(e){o(e,t)},unmount(){r(t)}}}e.createRoot=a,e.hydrateRoot=function(t,e){return i(e,t),a(t)}},function(t,e){t.exports=function(t,e,n,o){var i=n?n.call(o,t,e):void 0;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<r.length;l++){var c=r[l];if(!s(c))return!1;var u=t[c],d=e[c];if(!1===(i=n?n.call(o,u,d,c):void 0)||void 0===i&&u!==d)return!1}return!0}},function(t,e,n){"use strict";e.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(t,e,n){"use strict";function o(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}n.d(e,"a",(function(){return r}));var i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=o((function(t){return i.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}))},function(t,e,n){"use strict";n.r(e),n.d(e,"ScanbotSDK",(function(){return Ld}));var o={};n.r(o),n.d(o,"SingleScanningMode",(function(){return St})),n.d(o,"Resolution",(function(){return Ct})),n.d(o,"CameraConfiguration",(function(){return wt})),n.d(o,"TopBarConfiguration",(function(){return xt})),n.d(o,"ActionBarConfiguration",(function(){return Et})),n.d(o,"BarcodeUseCase",(function(){return X})),n.d(o,"Palette",(function(){return K})),n.d(o,"StyledText",(function(){return J})),n.d(o,"IconStyle",(function(){return tt})),n.d(o,"PolygonStyle",(function(){return et})),n.d(o,"BackgroundStyle",(function(){return nt})),n.d(o,"ForegroundStyle",(function(){return ot})),n.d(o,"AspectRatio",(function(){return it})),n.d(o,"RoundButton",(function(){return rt})),n.d(o,"BadgedButton",(function(){return at})),n.d(o,"ButtonConfiguration",(function(){return st})),n.d(o,"Sound",(function(){return lt})),n.d(o,"Vibration",(function(){return ct})),n.d(o,"Timeouts",(function(){return ut})),n.d(o,"ViewFinderConfiguration",(function(){return Pt})),n.d(o,"FinderStyle",(function(){return Q})),n.d(o,"FinderCorneredStyle",(function(){return Wt})),n.d(o,"FinderStrokedStyle",(function(){return Bt})),n.d(o,"UserGuidanceConfiguration",(function(){return Dt})),n.d(o,"BarcodeItemErrorState",(function(){return At})),n.d(o,"BarcodeMappedData",(function(){return bt})),n.d(o,"BarcodeInfoMapping",(function(){return yt})),n.d(o,"ExpectedBarcode",(function(){return It})),n.d(o,"BarcodeTextLocalization",(function(){return Rt})),n.d(o,"BarcodeRecognizerConfiguration",(function(){return Mt})),n.d(o,"ArOverlayPolygonConfiguration",(function(){return dt})),n.d(o,"BarcodeItemConfiguration",(function(){return ht})),n.d(o,"BadgeStyle",(function(){return pt})),n.d(o,"ArOverlayGeneralConfiguration",(function(){return ft})),n.d(o,"FindAndPickArOverlayPolygonConfiguration",(function(){return mt})),n.d(o,"FindAndPickBadgeConfiguration",(function(){return gt})),n.d(o,"ArOverlayFindAndPickConfiguration",(function(){return vt})),n.d(o,"BarcodeScannerConfiguration",(function(){return jt})),n.d(o,"BarcodeItem",(function(){return Vt})),n.d(o,"BarcodeScannerResult",(function(){return zt})),n.d(o,"Sheet",(function(){return Lt})),n.d(o,"SwipeToDelete",(function(){return _t})),n.d(o,"ManualCountEditDialog",(function(){return Ot})),n.d(o,"SheetContent",(function(){return kt})),n.d(o,"MultipleScanningMode",(function(){return Tt})),n.d(o,"ScanbotAlertDialog",(function(){return Nt})),n.d(o,"CameraPermissionScreen",(function(){return Ft}));var i={};n.r(i),n.d(i,"ParametricFilter",(function(){return Qt})),n.d(i,"ScanbotBinarizationFilter",(function(){return Kt})),n.d(i,"CustomBinarizationFilter",(function(){return Jt})),n.d(i,"ColorDocumentFilter",(function(){return te})),n.d(i,"BrightnessFilter",(function(){return ee})),n.d(i,"ContrastFilter",(function(){return ne})),n.d(i,"GrayscaleFilter",(function(){return oe})),n.d(i,"LegacyFilter",(function(){return ie})),n.d(i,"WhiteBlackPointFilter",(function(){return re}));var r="5.1.2";class a{}a.VERSION=r,a.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@5.1.2/bundle/",a.DEFAULT_WASM_FOLDER="bin/complete/",a.BUILD_WITH_UI=!1;var s=n(15),l=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class c{constructor(t,e,n){t||(t=a.CDN_PATH+a.DEFAULT_WASM_FOLDER),this.core=new s.WorkerBridge(t,e),this.coreInitializationSuccessful=this.core.postByCopyingArgs("initialize",n)}awaitInitialized(){return l(this,void 0,void 0,(function*(){yield this.getCoreForCommand()}))}postByCopyingArgs(t,e){return l(this,void 0,void 0,(function*(){return(yield this.getCoreForCommand(t)).postByCopyingArgs(t,e)}))}postByTransferringArgs(t,e){return l(this,void 0,void 0,(function*(){return(yield this.getCoreForCommand(t)).postByTransferringArgs(t,e)}))}getCoreForCommand(t=""){return l(this,void 0,void 0,(function*(){const e=yield this.coreInitializationSuccessful;if("getLicenseInfo"===t||e)return this.core;throw new Error("WASM not initialized successfully. This can be due to an invalid license or problems loading the WASM file. Please check the console for more information.")}))}}c.ASM_JS="ScanbotSDK.Core.js";var u=n(11);class d{constructor(){this.container=void 0,this.containerId=void 0}static mapValues(t,e,n){Object.keys(t).forEach((o=>{(null==n?void 0:n.includes(o))||(e[o]=t[o])}))}static mapValuesDeep(t,e){const n=t=>t&&"object"==typeof t&&!Array.isArray(t);Object.keys(t).forEach((o=>{o in e&&n(t[o])&&n(e[o])?d.mapValuesDeep(t[o],e[o]):e[o]=t[o]}))}static _fromJson(t,e){return this.mapValuesDeep(e,t),t}}class h extends d{constructor(t){super(),this.mirrored=!1,this.spinnerColor="black",this.backgroundColor="black",this.videoConstraints={width:{ideal:t.width},height:{ideal:t.height},facingMode:"environment",resizeMode:"none",experimental:{focusMode:"continous",focusDistance:0}}}static mapVideoConstraints(t,e){t.videoConstraints&&this.mapValues(t.videoConstraints,e.videoConstraints)}}h.DEFAULT_VIDEO_RESOLUTION_4K={width:3840,height:2160},h.DEFAULT_VIDEO_RESOLUTION_HD={width:1920,height:1080},h.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE=0,h.DEFAULT_ACCEPTED_ANGLE_SCORE=75,h.DEFAULT_ACCEPTED_SIZE_SCORE=75;const p={OK:"Capturing your document... Please do not move the camera.",OK_SmallSize:"The document is too small. Try moving closer.",OK_BadAngles:"This is a bad camera angle. Hold the device straight over the document.",OK_BadAspectRatio:"Rotate the device sideways, so that the document fits better into the screen.",OK_OffCenter:"Try holding the device at the center of the document.",Error_NothingDetected:"Please hold the device over a document to start scanning.",Error_Brightness:"It is too dark. Try turning on a light.",Error_Noise:"Please move the document to a clear surface."};class f{constructor(t){this.hint=t}}class m{constructor(){this.outline=new g,this.captureButton=new y}}class g{constructor(){this.polygon=new v,this.path=new A,this.label=new b}}class v{constructor(){this.strokeCapturing="green",this.strokeSearching="yellow",this.fillCapturing="transparent",this.fillSearching="transparent"}}class A{constructor(){this.stroke="green",this.strokeWidth=4}}class b{}class y{constructor(){this.color="#FFF"}}class S extends h{constructor(){super(h.DEFAULT_VIDEO_RESOLUTION_4K),this.acceptedBrightnessThreshold=S.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE,this.acceptedAngleScore=S.DEFAULT_ACCEPTED_ANGLE_SCORE,this.acceptedSizeScore=S.DEFAULT_ACCEPTED_SIZE_SCORE,this.autoCaptureEnabled=!0,this.autoCaptureSensitivity=.66,this.autoCaptureDelay=1e3,this.ignoreBadAspectRatio=!0,this.useImageCaptureAPI=!1,this.text=new f(p),this.style=new m,this.onDocumentDetected=function(t){}}static fromJson(t){const e=new S;if(this.mapValues(t,e,["text","style","videoConstraints"]),t.text&&t.text.hint&&this.mapValues(t.text.hint,e.text.hint),t.style){this.mapValues(t.style,e.style,["outline","captureButton"]);const n=t.style.outline;if(n){this.mapValues(n,e.style.outline,["polygon","path","label"]);const t=n.polygon;t&&this.mapValues(t,e.style.outline.polygon);const o=n.path;o&&this.mapValues(o,e.style.outline.path);const i=n.label;i&&this.mapValues(i,e.style.outline.label)}const o=t.style.captureButton;o&&this.mapValues(o,e.style.captureButton)}return this.mapVideoConstraints(t,e),e}}class C{isValid(){return"Okay"===this.status||"Trial"===this.status}static fromJson(t){const e=new C;return e.status=t.licenseStatus,e.description=t.description,e}}var w=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class x{constructor(t,e){this._sdk=t,this._pdfOperation=e}addPage(t){return w(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByCopyingArgs("addPageToPdf",[this._pdfOperation,t])}))}complete(){return w(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("completePdf",[this._pdfOperation])}))}}var E=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};const L=["ROTATION_NONE","ROTATION_90_CLOCKWISE","ROTATION_180","ROTATION_90_COUNTERCLOCKWISE"];class _{constructor(t,e){this._sdk=t,this._token=e}copy(){return E(this,void 0,void 0,(function*(){const t=yield this._sdk.bridge.postByCopyingArgs("imageProcessorCopy",[this._token]);return new _(this._sdk,t)}))}applyFilter(t){return E(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorApplyFilter",[this._token,t])}))}crop(t){return E(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorCrop",[this._token,t])}))}resize(t){return E(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorResize",[this._token,t])}))}rotate(t){return E(this,void 0,void 0,(function*(){if(!L.includes(t))return Promise.reject("Invalid rotation value! It should be one of "+L.join(", "));yield this._sdk.bridge.postByTransferringArgs("imageProcessorRotate",[this._token,t])}))}processedImage(){return E(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("imageProcessorEncodedProcessedImage",[this._token,".jpg"])}))}release(){return E(this,void 0,void 0,(function*(){yield this._sdk.release(this._token,"ImageProcessor"),this._token=null,this._sdk=null}))}get __token(){return this._token}}var O=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class k{constructor(t,e){this._sdk=t,this._tiffOperation=e}addPage(t){return O(this,void 0,void 0,(function*(){let e;e=t instanceof _?t.__token:t,yield this._sdk.bridge.postByCopyingArgs("addPageToTiff",[this._tiffOperation,e])}))}complete(){return O(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("completeTiff",[this._tiffOperation])}))}}class T{constructor(t,e,n,o){this.x=t,this.y=e,this.width=n,this.height=o}scaleDown(t){return new T(this.x/t,this.y/t,this.width/t,this.height/t)}bottom(){return this.y+this.height}static withSize(t,e){return new T(0,0,t,e)}static empty(){return new T(0,0,0,0)}static fromRect(t){return t?new T(t.x,t.y,t.width,t.height):T.empty()}static fromPoint(t,e){return new T(t.x-e/2,t.y-e/2,e,e)}static fromDOMRect(t){return new T(t.x,t.y,t.width,t.height)}}class P{static toPixelSize(t){return t+"px"}static containsString(t,e){return!!t&&-1!==t.indexOf(e)}static copy(t){return JSON.parse(JSON.stringify(t))}static getProperty(t,e){let n;return t&&t.hasOwnProperty(e)&&(n=t[e]),n}static uuid(){let t="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length;for(let o=0;o<5;o++)t+=e.charAt(Math.floor(Math.random()*n));return t}}var W=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class B{static toDataUrl(t){return new Promise(((e,n)=>{const o=new Blob([t],{type:"image/jpeg"}),i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>n(i.error),i.readAsDataURL(o)}))}static getObjectFitSize(t,e,n=!0){const o=e.width/e.height,i=t.width/t.height;let r=0,a=0;(n?o>i:o<i)?(r=t.width,a=r/o):(a=t.height,r=a*o);const s=(t.width-r)/2,l=(t.height-a)/2;return new T(s,l,r,a)}static loadFromUrl(t){return new Promise(((e,n)=>{const o=document.createElement("img");o.src=t,o.onload=()=>W(this,void 0,void 0,(function*(){const t=document.createElement("canvas");t.width=o.width,t.height=o.height;const n=t.getContext("2d");n.drawImage(o,0,0);const i=n.getImageData(0,0,o.width,o.height);e(i)})),o.onerror=n}))}static saveImageData(t){const e=this.createImageDataCanvas(t),n=" ("+t.width+"x"+t.height+")";e.toBlob((t=>this.saveBlob(t,P.uuid()+n+".png")))}static createImageDataCanvas(t){const e=document.createElement("canvas");return e.className="scanbot-sdk-canvas-element",e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t,0,0),e}static saveBlob(t,e){let n=document.createElement("a");n.setAttribute("download",e);let o=URL.createObjectURL(t);n.setAttribute("href",o),n.click()}static convertImageDataWrapperToImageData(t){if(t)return new ImageData(t.data,t.width,t.height)}static wrapperToBase64(t){return B.createImageDataCanvas(B.convertImageDataWrapperToImageData(t)).toDataURL("image/png")}static toBase64(t){return W(this,void 0,void 0,(function*(){const e=yield new Promise((e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(new Blob([t]))}));return e.slice(e.indexOf(",")+1)}))}}class D{saveImageAsJpeg(t,e){if(!t||0===t.length)return void console.log("Data cannot be null or empty");e||(e=P.uuid()+".jpeg");let n=new Blob([t],{type:"image/jpeg"});B.saveBlob(n,e)}isCameraSupported(){return!!navigator.mediaDevices}flash(){let t=this.findFlashElement();t.style.display="block",this.animateFlashOpacity("0.5",(()=>{this.animateFlashOpacity("0.0",(()=>{t.style.opacity="1.0",t.style.display="none"}))}))}findFlashElement(){return this.getOrCreateElement("flash",{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","background-color":"#fff",display:"none","z-index":"5000"})}animateFlashOpacity(t,e){const n=this.getElementByClassName("flash");setTimeout((()=>{n.style.opacity=t,e()}),150)}getOrCreateElement(t,e){let n=this.getElementByClassName(t);return n||(this.createElement(t,e),n=this.getElementByClassName(t)),n}createElement(t,e){let n=document.createElement("div");n.className=t,n.style.cssText=this.cssToString(e),document.body.append(n)}cssToString(t){let e="";return Object.keys(t).forEach((n=>{e+=n+":"+t[n]+";"})),e}getElementByClassName(t){const e=document.getElementsByClassName(t);if(0!==e.length)return e[0]}}function I(t,e,n){return Math.min(Math.max(t,e),n)}class R{constructor(t,e){this.x=t,this.y=e}static toPolygon(t,e){return[R.scaleDownTo(t[0],e),R.scaleDownTo(t[1],e),R.scaleDownTo(t[2],e),R.scaleDownTo(t[3],e)]}static scaleToPoint(t,e,n,o){return new R(o*(t.x-e),o*(t.y-n))}static scaleListToHtmlElement(t,e,n){return t.map((t=>R.scaleToHtmlElement(t,e,n)))}static scaleToHtmlElement(t,e,n){return new R(t.x*(n.clientWidth/e.width),t.y*(n.clientHeight/e.height))}static scaleUpTo(t,e){return new R(t.x*e.width,t.y*e.height)}static scaleDownTo(t,e){return new R(t.x/e.width,t.y/e.height)}static fromHtmlElement(t){return new R(t.offsetLeft,t.offsetTop)}static withScale(t,e,n){return new R(t/n,e/n)}static fromCoordinates(t,e,n,o){if(!t||!e)return new R(0,0);const i=new R(t,e);return o=null!=o?o:1,1===(n=n?n%4:0)?R.withScale(i.y,-i.x,o):2===n?R.withScale(-i.x,-i.y,o):3===n?R.withScale(-i.y,i.x,o):R.withScale(i.x,i.y,o)}static centerOf(t){const e=t.reduce(((t,e)=>t+e.x),0)/t.length,n=t.reduce(((t,e)=>t+e.y),0)/t.length;return new R(e,n)}static smallerSizeOfQuad(t){const e=Math.max(...t.map((t=>t.x)))-Math.min(...t.map((t=>t.x))),n=Math.max(...t.map((t=>t.y)))-Math.min(...t.map((t=>t.y)));return Math.min(e,n)}static empty(){return new R(0,0)}static centerX(t){if(t)return(R.highestX(t)+R.lowestX(t))/2}static highestX(t){if(t)return Math.max(...t.map((t=>t.x)))}static lowestX(t){if(t)return Math.min(...t.map((t=>t.x)))}static lowestY(t){if(t)return Math.min(...t.map((t=>t.y)))}static highestY(t){if(t)return Math.max(...t.map((t=>t.y)))}static width(t){if(t)return R.highestX(t)-R.lowestX(t)}static left(t){if(t)return t.reduce(((t,e)=>t.x<e.x?t:e))}static right(t){if(t)return t.reduce(((t,e)=>t.x>e.x?t:e))}static toSvgString(t){if(void 0!==t)return t.map((t=>`${t.x.toFixed(2)},${t.y.toFixed(2)}`)).join(" ")}static toSvgPathStringWithRoundedCorners(t,e=0){if(void 0===t)return;function n(t,e,n){const o=Math.atan2(t.y-e.y,t.x-e.x);return{x:t.x-n*Math.cos(o),y:t.y-n*Math.sin(o)}}let o="";const i=n(t[0],t[1],R.distance(t[0],t[1])/2);o+=`M ${i.x} ${i.y}`;for(let i=0;i<t.length;i++){const r=t[i],a=t[(i+1)%t.length],s=t[(i+2)%t.length],l=n(a,s,R.distance(a,s)/2),c=Math.abs(Math.atan2(a.y-r.y,a.x-r.x)-Math.atan2(a.y-s.y,a.x-s.x)),u=c>Math.PI?2*Math.PI-c:c,d=Math.min(Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2)),Math.sqrt(Math.pow(a.x-s.x,2)+Math.pow(a.y-s.y,2))),h=Math.min(e,d*Math.tan(u/2)/2),p=Math.abs(h/Math.tan(u/2)),f=(a.x-r.x)*(a.y-s.y)-(a.x-s.x)*(a.y-r.y)<0?1:0,m=n(a,r,p),g=n(a,s,p);o+=` L${m.x} ${m.y}`,o+=` A${h} ${h} 0 0 ${f} ${g.x} ${g.y}`,o+=` L${l.x} ${l.y}`}return o+" Z"}static distance(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}static subtract(t,e){return new R(t.x-e.x,t.y-e.y)}static add(t,e){return new R(t.x+e.x,t.y+e.y)}static multiply(t,e){return new R(t.x*e,t.y*e)}static cross(t,e){return t.x*e.y-t.y*e.x}static clamp(t,e){return new R(I(t.x,0,e.width),I(t.y,0,e.height))}}class M{constructor(t,e,n,o,i,r){this.format=t,this.text=e,this.parsedDocument=n,this.rawBytes=o,this.points=i,this.barcodeImage=r}id(){return this.text+this.format}equals(t){return this.format===t.format&&this.text===t.text}static fromWorker(t){const e=t.quad.map((t=>new R(t[0],t[1])));return new M(t.format,t.text,t.parsedDocument,t.rawBytes,e,t.barcodeImage)}}class F{constructor(t,e){this.barcodes=t,this.imageData=e}static fromWorker(t,e){const n=[];t&&t.forEach((t=>{n.push(M.fromWorker(t))}));const o=B.convertImageDataWrapperToImageData(e);return new F(n,o)}isEmpty(){return 0===this.barcodes.length}}class j{constructor(t,e,n,o){this.value=e,this.confidence=n,this.validated=o,this.name=t}}class V{}class z{static fromWorker(t){let e=new z;e.verificationSuccessful=t.verificationSuccessful;const n=new V,o=t.recognitionSuccessful;return(t.fields||[]).forEach((t=>{switch(t.name){case"DocumentNumber":e.documentNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"IssuingAuthority":e.issuingAuthority=new j(t.name,t.text,t.confidence,t.validated);break;case"DepartmentOfIssuance":e.departmentOfIssuance=new j(t.name,t.text,t.confidence,t.validated);break;case"GivenNames":e.givenNames=new j(t.name,t.text,t.confidence,t.validated);break;case"Surname":e.surname=new j(t.name,t.text,t.confidence,t.validated);break;case"Nationality":e.nationality=new j(t.name,t.text,t.confidence,t.validated);break;case"BirthDate":e.birthDate=new j(t.name,t.text,t.confidence,t.validated);break;case"Gender":e.gender=new j(t.name,t.text,t.confidence,t.validated);break;case"ExpiryDate":e.expiryDate=new j(t.name,t.text,t.confidence,t.validated);break;case"PersonalNumber":e.personalNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"TravelDocType":e.travelDocType=new j(t.name,t.text,t.confidence,t.validated);break;case"TravelDocTypeVariant":e.travelDocTypeVariant=new j(t.name,t.text,t.confidence,t.validated);break;case"DiscreetIssuingStateOrOrganization":e.discreetIssuingStateOrOrganization=new j(t.name,t.text,t.confidence,t.validated);break;case"DocumentTypeCode":e.kindOfDocumentField=new j(t.name,t.text,t.confidence,t.validated);break;case"DocumentType":e.documentType=new j(t.name,t.text,t.confidence,t.validated);break;case"Format":e.format=new j(t.name,t.text,t.confidence,t.validated);break;case"PINCode":e.pinCode=new j(t.name,t.text,t.confidence,t.validated);break;case"LanguageCode":e.languageCode=new j(t.name,t.text,t.confidence,t.validated);break;case"VersionNumber":e.versionNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitGeneral":n.general=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitDocumentNumber":n.documentNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitBirthDate":n.birthDate=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitExpiryDate":n.expiryDate=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitPersonalNumber":n.personalNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"Optional1":e.optional1=new j(t.name,t.text,t.confidence,t.validated);break;case"Optional2":e.optional2=new j(t.name,t.text,t.confidence,t.validated)}})),e.documentType||(e.documentType=new j("DocumentType",t.documentType)),o?e.checkDigits=n:e=void 0,e}}var N=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class U{constructor(t,e,n){this._sdk=t,this._mrzRecognizerToken=e,this.enableFrameAccumulation=n}recognize(t){return N(this,void 0,void 0,(function*(){try{let e=yield this._sdk.bridge.postByTransferringArgs("recognizeMRZ",[yield this._mrzRecognizerToken,t]);if(null===e)return;const n=z.fromWorker(e);return!this.enableFrameAccumulation&&n&&delete n.verificationSuccessful,n}catch(t){return void console.warn(t)}}))}recognizeURL(t){return N(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),o=document.createElement("img");o.src=t,o.onload=()=>N(this,void 0,void 0,(function*(){n.width=o.width,n.height=o.height;const t=n.getContext("2d");t.drawImage(o,0,0);const i=t.getImageData(0,0,o.width,o.height),r=yield this.recognize(i);e(r||void 0)}))}))}))}release(){return N(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[yield this._mrzRecognizerToken])}))}}var H=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class G{constructor(t,e){this._sdk=t,this._OcrEngineToken=e}performOcr(t){return H(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("performOcr",[this._OcrEngineToken,t])}))}recognizeURL(t){return H(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),o=document.createElement("img");o.src=t,o.onload=()=>H(this,void 0,void 0,(function*(){n.width=o.width,n.height=o.height;const t=n.getContext("2d");t.drawImage(o,0,0);const i=t.getImageData(0,0,o.width,o.height),r=yield this.performOcr(i);e(r)}))}))}))}release(){return H(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[this._OcrEngineToken])}))}}class Y{static fromWorker(t){if(!t)return;const e=new Y;return e.text=t.rawText,e.confidence=t.confidence,e.validated=t.validationSuccessful,e}}var X,Q,Z=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class ${constructor(t,e){this._sdk=t,this._textDataScannerToken=e}recognize(t){return Z(this,void 0,void 0,(function*(){try{let e=yield this._sdk.bridge.postByTransferringArgs("recognizeTextLine",[yield this._textDataScannerToken,t]);if(null===e)return;return Y.fromWorker(e)}catch(t){return void console.warn(t)}}))}cleanRecognitionQueue(){return Z(this,void 0,void 0,(function*(){try{yield this._sdk.bridge.postByTransferringArgs("cleanTextLineRecognitionQueue",[yield this._textDataScannerToken])}catch(t){return void console.warn(t)}}))}recognizeURL(t){return Z(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),o=document.createElement("img");o.src=t,o.onload=()=>Z(this,void 0,void 0,(function*(){n.width=o.width,n.height=o.height;const t=n.getContext("2d");t.drawImage(o,0,0);const i=t.getImageData(0,0,o.width,o.height),r=yield this.recognize(i);r&&e(r)}))}))}))}release(){return Z(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[yield this._textDataScannerToken])}))}}class q{}class K extends q{constructor(t={}){super(),this.sbColorPrimary="#C8193C",this.sbColorPrimaryDisabled="#F5F5F5",this.sbColorNegative="#FF3737",this.sbColorPositive="#4EFFB4",this.sbColorWarning="#FFCE5C",this.sbColorSecondary="#FFEDEE",this.sbColorSecondaryDisabled="#F5F5F5",this.sbColorOnPrimary="#FFFFFF",this.sbColorOnSecondary="#C8193C",this.sbColorSurface="#FFFFFF",this.sbColorOutline="#EFEFEF",this.sbColorOnSurfaceVariant="#707070",this.sbColorOnSurface="#000000",this.sbColorSurfaceLow="#00000026",this.sbColorSurfaceHigh="#0000007A",this.sbColorModalOverlay="#000000A3",void 0!==t.sbColorPrimary&&(this.sbColorPrimary=t.sbColorPrimary),void 0!==t.sbColorPrimaryDisabled&&(this.sbColorPrimaryDisabled=t.sbColorPrimaryDisabled),void 0!==t.sbColorNegative&&(this.sbColorNegative=t.sbColorNegative),void 0!==t.sbColorPositive&&(this.sbColorPositive=t.sbColorPositive),void 0!==t.sbColorWarning&&(this.sbColorWarning=t.sbColorWarning),void 0!==t.sbColorSecondary&&(this.sbColorSecondary=t.sbColorSecondary),void 0!==t.sbColorSecondaryDisabled&&(this.sbColorSecondaryDisabled=t.sbColorSecondaryDisabled),void 0!==t.sbColorOnPrimary&&(this.sbColorOnPrimary=t.sbColorOnPrimary),void 0!==t.sbColorOnSecondary&&(this.sbColorOnSecondary=t.sbColorOnSecondary),void 0!==t.sbColorSurface&&(this.sbColorSurface=t.sbColorSurface),void 0!==t.sbColorOutline&&(this.sbColorOutline=t.sbColorOutline),void 0!==t.sbColorOnSurfaceVariant&&(this.sbColorOnSurfaceVariant=t.sbColorOnSurfaceVariant),void 0!==t.sbColorOnSurface&&(this.sbColorOnSurface=t.sbColorOnSurface),void 0!==t.sbColorSurfaceLow&&(this.sbColorSurfaceLow=t.sbColorSurfaceLow),void 0!==t.sbColorSurfaceHigh&&(this.sbColorSurfaceHigh=t.sbColorSurfaceHigh),void 0!==t.sbColorModalOverlay&&(this.sbColorModalOverlay=t.sbColorModalOverlay)}}class J extends q{constructor(t={}){super(),this.visible=!0,this.text="",this.color="#FFFFFF",this.useShadow=!1,void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.color&&(this.color=t.color),void 0!==t.useShadow&&(this.useShadow=t.useShadow)}}class tt extends q{constructor(t={}){super(),this.visible=!0,this.color="#FFFFFF",void 0!==t.visible&&(this.visible=t.visible),void 0!==t.color&&(this.color=t.color)}}class et extends q{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#30FFFFFF",this.strokeWidth=2,this.cornerRadius=0,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class nt extends q{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#FFFFFF30",this.strokeWidth=2,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth)}}class ot extends q{constructor(t={}){super(),this.iconVisible=!0,this.color="#FFFFFF",this.useShadow=!1,void 0!==t.iconVisible&&(this.iconVisible=t.iconVisible),void 0!==t.color&&(this.color=t.color),void 0!==t.useShadow&&(this.useShadow=t.useShadow)}}class it extends q{constructor(t={}){super(),this.width=1,this.height=1,void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height)}}class rt extends q{constructor(t={}){super(),this.visible=!0,this.backgroundColor="#0000007A",this.foregroundColor="#FFFFFF",this.activeBackgroundColor="#FFCE5C",this.activeForegroundColor="#1C1B1F",void 0!==t.visible&&(this.visible=t.visible),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor),void 0!==t.activeBackgroundColor&&(this.activeBackgroundColor=t.activeBackgroundColor),void 0!==t.activeForegroundColor&&(this.activeForegroundColor=t.activeForegroundColor)}}class at extends q{constructor(t={}){super(),this.badgeBackgroundColor="#FFFFFF",this.badgeForegroundColor="#C8193C",this.visible=!0,this.backgroundColor="#0000007A",this.foregroundColor="#FFFFFF",this.activeBackgroundColor="#FFCE5C",this.activeForegroundColor="#1C1B1F",void 0!==t.badgeBackgroundColor&&(this.badgeBackgroundColor=t.badgeBackgroundColor),void 0!==t.badgeForegroundColor&&(this.badgeForegroundColor=t.badgeForegroundColor),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor),void 0!==t.activeBackgroundColor&&(this.activeBackgroundColor=t.activeBackgroundColor),void 0!==t.activeForegroundColor&&(this.activeForegroundColor=t.activeForegroundColor)}}class st extends q{constructor(t={}){super(),this.visible=!0,this.text="",this.background=new nt({}),this.foreground=new ot({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.background&&(this.background=new nt(t.background)),void 0!==t.foreground&&(this.foreground=new ot(t.foreground))}}class lt extends q{constructor(t={}){super(),this.successBeepEnabled=!0,this.soundType="MODERN_BEEP",void 0!==t.successBeepEnabled&&(this.successBeepEnabled=t.successBeepEnabled),void 0!==t.soundType&&(this.soundType=t.soundType)}}class ct extends q{constructor(t={}){super(),this.enabled=!1,void 0!==t.enabled&&(this.enabled=t.enabled)}}class ut extends q{constructor(t={}){super(),this.autoCancelTimeout=0,this.initialScanDelay=0,void 0!==t.autoCancelTimeout&&(this.autoCancelTimeout=t.autoCancelTimeout),void 0!==t.initialScanDelay&&(this.initialScanDelay=t.initialScanDelay)}}class dt extends q{constructor(t={}){super(),this.visible=!0,this.deselected=new et({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),this.selected=new et({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.deselected&&(this.deselected=new et(t.deselected)),void 0!==t.selected&&(this.selected=new et(t.selected))}}class ht extends q{constructor(t={}){super(),this.imageVisible=!0,this.titleSelected=new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleSelected=new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.titleDeselected=new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleDeselected=new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.backgroundSelected=new et({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:0,cornerRadius:10}),this.backgroundDeselected=new et({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:0,cornerRadius:10}),void 0!==t.imageVisible&&(this.imageVisible=t.imageVisible),void 0!==t.titleSelected&&(this.titleSelected=new J(t.titleSelected)),void 0!==t.subtitleSelected&&(this.subtitleSelected=new J(t.subtitleSelected)),void 0!==t.titleDeselected&&(this.titleDeselected=new J(t.titleDeselected)),void 0!==t.subtitleDeselected&&(this.subtitleDeselected=new J(t.subtitleDeselected)),void 0!==t.backgroundSelected&&(this.backgroundSelected=new et(t.backgroundSelected)),void 0!==t.backgroundDeselected&&(this.backgroundDeselected=new et(t.backgroundDeselected))}}class pt extends q{constructor(t={}){if(super(),this.visible=!0,this.foregroundColor="?sbColorOnSurface",void 0!==t.visible&&(this.visible=t.visible),void 0===t.background)throw new Error("background must be present in constructor argument");this.background=new nt(t.background),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor)}}class ft extends q{constructor(t={}){super(),this.visible=!1,this.counterBadge=new pt({background:new nt({}),foregroundColor:"?sbColorOnSurface"}),this.automaticSelectionEnabled=!1,this.barcodeItemInfoPosition="BELOW",this.polygon=new dt({visible:!0,deselected:new et({}),selected:new et({})}),this.barcodeItemConfiguration=new ht({imageVisible:!0,titleSelected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new et({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new et({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.counterBadge&&(this.counterBadge=new pt(t.counterBadge)),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.barcodeItemInfoPosition&&(this.barcodeItemInfoPosition=t.barcodeItemInfoPosition),void 0!==t.polygon&&(this.polygon=new dt(t.polygon)),void 0!==t.barcodeItemConfiguration&&(this.barcodeItemConfiguration=new ht(t.barcodeItemConfiguration))}}class mt extends q{constructor(t={}){super(),this.visible=!0,this.partiallyScanned=new et({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.rejected=new et({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.completed=new et({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.partiallyScanned&&(this.partiallyScanned=new et(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new et(t.rejected)),void 0!==t.completed&&(this.completed=new et(t.completed))}}class gt extends q{constructor(t={}){super(),this.partiallyScanned=new pt({visible:!0,background:new nt({strokeColor:"#FFFFFF30",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.rejected=new pt({visible:!0,background:new nt({strokeColor:"#FFFFFF30",fillColor:"?sbColorNegative",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.completed=new pt({visible:!0,background:new nt({strokeColor:"#FFFFFF30",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),void 0!==t.partiallyScanned&&(this.partiallyScanned=new pt(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new pt(t.rejected)),void 0!==t.completed&&(this.completed=new pt(t.completed))}}class vt extends q{constructor(t={}){super(),this.visible=!1,this.automaticSelectionEnabled=!0,this.polygon=new mt({}),this.badge=new gt({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.polygon&&(this.polygon=new mt(t.polygon)),void 0!==t.badge&&(this.badge=new gt(t.badge))}}class At extends q{constructor(t={}){super(),this.title=new J({text:"Connection Error!",color:"?sbColorOnSurface"}),this.subtitle=new J({text:"There was an issue and the data requested was not fetched. You could try again or discard this result to start a new scan.",color:"?sbColorOnSurfaceVariant"}),this.retryButton=new st({}),this.cancelButton=new st({}),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.subtitle&&(this.subtitle=new J(t.subtitle)),void 0!==t.retryButton&&(this.retryButton=new st(t.retryButton)),void 0!==t.cancelButton&&(this.cancelButton=new st(t.cancelButton))}}class bt extends q{constructor(t={}){if(super(),void 0===t.title)throw new Error("title must be present in constructor argument");if(this.title=t.title,void 0===t.subtitle)throw new Error("subtitle must be present in constructor argument");if(this.subtitle=t.subtitle,void 0===t.barcodeImage)throw new Error("barcodeImage must be present in constructor argument");this.barcodeImage=t.barcodeImage}}class yt extends q{constructor(t={}){super(),this.barcodeItemMapper=null,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.loadingMessage=new J({text:"Loading message for barcode info mapping.",color:"?sbColorPrimary"}),this.errorState=new At({}),void 0!==t.barcodeItemMapper&&(this.barcodeItemMapper=null!=t.barcodeItemMapper?t.barcodeItemMapper:null),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.loadingMessage&&(this.loadingMessage=new J(t.loadingMessage)),void 0!==t.errorState&&(this.errorState=new At(t.errorState))}}class St extends q{constructor(t={}){super(),this._type="SingleScanningMode",this.confirmationSheetEnabled=!1,this.barcodeImageVisible=!0,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.barcodeTitle=new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.barcodeSubtitle=new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.submitButton=new st({visible:!0,text:"?sheetSubmitButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary"})}),this.cancelButton=new st({visible:!0,text:"?singleModeConfirmationCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary"})}),this.barcodeInfoMapping=new yt({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new J({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new At({title:new J({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new J({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new st({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary"})}),cancelButton:new st({text:"?barcodeInfoMappingErrorStateCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary"})})})}),this.arOverlay=new ft({visible:!1,counterBadge:new pt({visible:!0,background:new nt({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new dt({visible:!0,deselected:new et({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new et({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new ht({imageVisible:!0,titleSelected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new J({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),backgroundSelected:new et({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new et({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})})}),void 0!==t.confirmationSheetEnabled&&(this.confirmationSheetEnabled=t.confirmationSheetEnabled),void 0!==t.barcodeImageVisible&&(this.barcodeImageVisible=t.barcodeImageVisible),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.barcodeTitle&&(this.barcodeTitle=new J(t.barcodeTitle)),void 0!==t.barcodeSubtitle&&(this.barcodeSubtitle=new J(t.barcodeSubtitle)),void 0!==t.submitButton&&(this.submitButton=new st(t.submitButton)),void 0!==t.cancelButton&&(this.cancelButton=new st(t.cancelButton)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new yt(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new ft(t.arOverlay))}}class Ct extends q{constructor(t={}){if(super(),void 0===t.width)throw new Error("width must be present in constructor argument");if(this.width=t.width,void 0===t.height)throw new Error("height must be present in constructor argument");this.height=t.height}}class wt extends q{constructor(t={}){super(),this.cameraModule="BACK",this.zoomSteps=[1,2,5],this.defaultZoomFactor=1,this.flashEnabled=!1,this.idealPreviewResolution=new Ct({width:1920,height:1080}),void 0!==t.cameraModule&&(this.cameraModule=t.cameraModule),void 0!==t.zoomSteps&&(this.zoomSteps=t.zoomSteps.map((t=>t))),void 0!==t.defaultZoomFactor&&(this.defaultZoomFactor=t.defaultZoomFactor),void 0!==t.flashEnabled&&(this.flashEnabled=t.flashEnabled),void 0!==t.idealPreviewResolution&&(this.idealPreviewResolution=new Ct(t.idealPreviewResolution))}}class xt extends q{constructor(t={}){super(),this.title=new J({visible:!1,text:"Scan Item",color:"?sbColorOnPrimary"}),this.mode="SOLID",this.backgroundColor="?sbColorPrimary",this.cancelButton=new st({text:"Cancel",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new ot({color:"?sbColorOnPrimary"})}),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.cancelButton&&(this.cancelButton=new st(t.cancelButton))}}class Et extends q{constructor(t={}){super(),this.flashButton=new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),this.zoomButton=new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),this.flipCameraButton=new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),void 0!==t.flashButton&&(this.flashButton=new rt(t.flashButton)),void 0!==t.zoomButton&&(this.zoomButton=new rt(t.zoomButton)),void 0!==t.flipCameraButton&&(this.flipCameraButton=new rt(t.flipCameraButton))}}class Lt extends q{constructor(t={}){super(),this.mode="COLLAPSED_SHEET",this.collapsedVisibleHeight="SMALL",this.listButton=new at({}),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.collapsedVisibleHeight&&(this.collapsedVisibleHeight=t.collapsedVisibleHeight),void 0!==t.listButton&&(this.listButton=new at(t.listButton))}}class _t extends q{constructor(t={}){super(),this.enabled=!0,this.backgroundColor="?sbColorNegative",this.iconColor="?sbColorOnPrimary",void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.iconColor&&(this.iconColor=t.iconColor)}}class Ot extends q{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.title=new J({text:"Update count",color:"?sbColorOnSurface"}),this.info=new J({text:"Adjust the number of items you scanned.",color:"?sbColorOnSurfaceVariant"}),this.updateButton=new st({visible:!0,text:"Update",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),this.cancelButton=new st({visible:!0,text:"Cancel",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),this.clearTextButton=new tt({visible:!0,color:"?sbColorOnSurfaceVariant"}),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.info&&(this.info=new J(t.info)),void 0!==t.updateButton&&(this.updateButton=new st(t.updateButton)),void 0!==t.cancelButton&&(this.cancelButton=new st(t.cancelButton)),void 0!==t.clearTextButton&&(this.clearTextButton=new tt(t.clearTextButton))}}class kt extends q{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.manualCountChangeEnabled=!0,this.manualCountOutlineColor="?sbColorOutline",this.manualCountChangeColor="?sbColorPrimary",this.title=new J({text:"%d items",color:"?sbColorOnSurface"}),this.clearAllButton=new st({visible:!0,text:"Clear all",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.barcodeItemTitle=new J({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),this.barcodeItemSubtitle=new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.barcodeItemImageVisible=!0,this.submitButton=new st({visible:!0,text:"Submit",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.startScanningButton=new st({visible:!0,text:"Start scanning",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),this.placeholderTitle=new J({text:"No barcodes here!",color:"?sbColorOnSurface"}),this.placeholderSubtitle=new J({text:"The barcode list is currently empty. Close this sheet and scan your items to add them.",color:"?sbColorOnSurfaceVariant"}),this.placeholderIconBackground="?sbColorOutline",this.placeholderIcon=new tt({visible:!0,color:"?sbColorOnSurface"}),this.swipeToDelete=new _t({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"}),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.manualCountChangeEnabled&&(this.manualCountChangeEnabled=t.manualCountChangeEnabled),void 0!==t.manualCountOutlineColor&&(this.manualCountOutlineColor=t.manualCountOutlineColor),void 0!==t.manualCountChangeColor&&(this.manualCountChangeColor=t.manualCountChangeColor),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.clearAllButton&&(this.clearAllButton=new st(t.clearAllButton)),void 0!==t.barcodeItemTitle&&(this.barcodeItemTitle=new J(t.barcodeItemTitle)),void 0!==t.barcodeItemSubtitle&&(this.barcodeItemSubtitle=new J(t.barcodeItemSubtitle)),void 0!==t.barcodeItemImageVisible&&(this.barcodeItemImageVisible=t.barcodeItemImageVisible),void 0!==t.submitButton&&(this.submitButton=new st(t.submitButton)),void 0!==t.startScanningButton&&(this.startScanningButton=new st(t.startScanningButton)),void 0!==t.placeholderTitle&&(this.placeholderTitle=new J(t.placeholderTitle)),void 0!==t.placeholderSubtitle&&(this.placeholderSubtitle=new J(t.placeholderSubtitle)),void 0!==t.placeholderIconBackground&&(this.placeholderIconBackground=t.placeholderIconBackground),void 0!==t.placeholderIcon&&(this.placeholderIcon=new tt(t.placeholderIcon)),void 0!==t.swipeToDelete&&(this.swipeToDelete=new _t(t.swipeToDelete))}}class Tt extends q{constructor(t={}){super(),this._type="MultipleScanningMode",this.countingRepeatDelay=1e3,this.mode="COUNTING",this.sheet=new Lt({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new at({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new kt({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new J({text:"?multipleModeSheetTitle",color:"?sbColorOnSurface"}),clearAllButton:new st({visible:!0,text:"?sheetClearAllButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new J({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),barcodeItemSubtitle:new J({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),barcodeItemImageVisible:!0,submitButton:new st({visible:!0,text:"?sheetSubmitButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new st({visible:!0,text:"?sheetStartScanningButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new J({visible:!0,text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface",useShadow:!1}),placeholderSubtitle:new J({visible:!0,text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant",useShadow:!1}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new tt({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new _t({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new Ot({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new J({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new J({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new st({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new st({visible:!0,text:"?manualCountEditDialogCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new tt({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.barcodeInfoMapping=new yt({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new J({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new At({title:new J({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new J({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new st({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new st({visible:!0,text:"?barcodeInfoMappingErrorStateCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})})}),this.arOverlay=new ft({visible:!1,counterBadge:new pt({visible:!0,background:new nt({strokeColor:"#FF000000",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new dt({visible:!0,deselected:new et({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new et({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new ht({imageVisible:!0,titleSelected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new J({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),titleDeselected:new J({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),subtitleDeselected:new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new et({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new et({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})})}),void 0!==t.countingRepeatDelay&&(this.countingRepeatDelay=t.countingRepeatDelay),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.sheet&&(this.sheet=new Lt(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new kt(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new Ot(t.manualCountEditDialog)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new yt(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new ft(t.arOverlay))}}(X||(X={})).From=function(t){const e=t._type;switch(e){case"SingleScanningMode":return new St(t);case"MultipleScanningMode":return new Tt(t);default:throw`Unknown child class name: ${e}`}};class Pt extends q{constructor(t={}){super(),this.visible=!0,this.style=new Wt({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),this.overlayColor="?sbColorSurfaceLow",this.aspectRatio=new it({width:1,height:1}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.style&&(this.style=Q.From(t.style)),void 0!==t.overlayColor&&(this.overlayColor=t.overlayColor),void 0!==t.aspectRatio&&(this.aspectRatio=new it(t.aspectRatio))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"FinderCorneredStyle":return new Wt(t);case"FinderStrokedStyle":return new Bt(t);default:throw`Unknown child class name: ${e}`}}}(Q||(Q={}));class Wt extends q{constructor(t={}){super(),this._type="FinderCorneredStyle",this.strokeColor="#FFFFFFFF",this.strokeWidth=3,this.cornerRadius=10,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class Bt extends q{constructor(t={}){super(),this._type="FinderStrokedStyle",this.strokeColor="#FFFFFFFF",this.strokeWidth=3,this.cornerRadius=10,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class Dt extends q{constructor(t={}){super(),this.visible=!0,this.title=new J({color:"?sbColorOnPrimary"}),this.background=new nt({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow"}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.background&&(this.background=new nt(t.background))}}class It extends q{constructor(t={}){if(super(),this.count=1,void 0===t.barcodeValue)throw new Error("barcodeValue must be present in constructor argument");if(this.barcodeValue=t.barcodeValue,void 0===t.title)throw new Error("title must be present in constructor argument");if(this.title=null!=t.title?t.title:null,void 0===t.image)throw new Error("image must be present in constructor argument");this.image=null!=t.image?t.image:null,void 0!==t.count&&(this.count=t.count)}}class Rt extends q{constructor(t={}){super(),this.cameraPermissionEnableCameraTitle="Camera permission denied!",this.cameraPermissionEnableCameraExplanation="Please allow the usage of the camera to start the scanning process.",this.cameraPermissionCloseButton="Close",this.topBarCancelButton="Cancel",this.topBarTitle="Scan Item",this.userGuidance="Move the finder over a barcode",this.barcodeInfoMappingLoadingMessage="Loading details...",this.barcodeInfoMappingErrorStateTitle="Connection Error!",this.barcodeInfoMappingErrorStateSubtitle="There was an issue and the data requested was not fetched. You could try again or discard this result to start a new scan.",this.barcodeInfoMappingErrorStateRetryButton="Retry",this.barcodeInfoMappingErrorStateCancelButton="Cancel",this.manualCountEditDialogTitle="Update count",this.manualCountEditDialogInfo="Adjust the number of items you scanned.",this.manualCountEditDialogUpdateButton="Update",this.manualCountEditDialogCancelButton="Cancel",this.sheetClearAllButton="Clear all",this.sheetSubmitButton="Submit",this.sheetStartScanningButton="Start scanning",this.sheetPlaceholderTitle="No barcodes here!",this.sheetPlaceholderSubtitle="The barcode list is currently empty. Close this sheet and scan your items to add them.",this.singleModeConfirmationCancelButton="Close",this.multipleModeSheetTitle="%d items",void 0!==t.cameraPermissionEnableCameraTitle&&(this.cameraPermissionEnableCameraTitle=t.cameraPermissionEnableCameraTitle),void 0!==t.cameraPermissionEnableCameraExplanation&&(this.cameraPermissionEnableCameraExplanation=t.cameraPermissionEnableCameraExplanation),void 0!==t.cameraPermissionCloseButton&&(this.cameraPermissionCloseButton=t.cameraPermissionCloseButton),void 0!==t.topBarCancelButton&&(this.topBarCancelButton=t.topBarCancelButton),void 0!==t.topBarTitle&&(this.topBarTitle=t.topBarTitle),void 0!==t.userGuidance&&(this.userGuidance=t.userGuidance),void 0!==t.barcodeInfoMappingLoadingMessage&&(this.barcodeInfoMappingLoadingMessage=t.barcodeInfoMappingLoadingMessage),void 0!==t.barcodeInfoMappingErrorStateTitle&&(this.barcodeInfoMappingErrorStateTitle=t.barcodeInfoMappingErrorStateTitle),void 0!==t.barcodeInfoMappingErrorStateSubtitle&&(this.barcodeInfoMappingErrorStateSubtitle=t.barcodeInfoMappingErrorStateSubtitle),void 0!==t.barcodeInfoMappingErrorStateRetryButton&&(this.barcodeInfoMappingErrorStateRetryButton=t.barcodeInfoMappingErrorStateRetryButton),void 0!==t.barcodeInfoMappingErrorStateCancelButton&&(this.barcodeInfoMappingErrorStateCancelButton=t.barcodeInfoMappingErrorStateCancelButton),void 0!==t.manualCountEditDialogTitle&&(this.manualCountEditDialogTitle=t.manualCountEditDialogTitle),void 0!==t.manualCountEditDialogInfo&&(this.manualCountEditDialogInfo=t.manualCountEditDialogInfo),void 0!==t.manualCountEditDialogUpdateButton&&(this.manualCountEditDialogUpdateButton=t.manualCountEditDialogUpdateButton),void 0!==t.manualCountEditDialogCancelButton&&(this.manualCountEditDialogCancelButton=t.manualCountEditDialogCancelButton),void 0!==t.sheetClearAllButton&&(this.sheetClearAllButton=t.sheetClearAllButton),void 0!==t.sheetSubmitButton&&(this.sheetSubmitButton=t.sheetSubmitButton),void 0!==t.sheetStartScanningButton&&(this.sheetStartScanningButton=t.sheetStartScanningButton),void 0!==t.sheetPlaceholderTitle&&(this.sheetPlaceholderTitle=t.sheetPlaceholderTitle),void 0!==t.sheetPlaceholderSubtitle&&(this.sheetPlaceholderSubtitle=t.sheetPlaceholderSubtitle),void 0!==t.singleModeConfirmationCancelButton&&(this.singleModeConfirmationCancelButton=t.singleModeConfirmationCancelButton),void 0!==t.multipleModeSheetTitle&&(this.multipleModeSheetTitle=t.multipleModeSheetTitle)}}class Mt extends q{constructor(t={}){super(),this.barcodesRegexFilter="",this.barcodeFormats=[],this.gs1Handling="PARSE",this.engineMode="ML_LOW_POWER",this.maximumRecognizerResolution=600,void 0!==t.barcodesRegexFilter&&(this.barcodesRegexFilter=t.barcodesRegexFilter),void 0!==t.barcodeFormats&&(this.barcodeFormats=t.barcodeFormats.map((t=>t))),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.maximumRecognizerResolution&&(this.maximumRecognizerResolution=t.maximumRecognizerResolution)}}class Ft extends q{constructor(t={}){super(),this.background="?sbColorSurface",this.iconBackground="?sbColorOutline",this.icon=new tt({visible:!0,color:"?sbColorOnSurface"}),this.closeButton=new st({text:"Close",background:new nt({}),foreground:new ot({})}),this.enableCameraTitle=new J({text:"Camera permission denied!",color:"?colorOnSurface"}),this.enableCameraExplanation=new J({text:"Please allow the usage of the camera to start the scanning process.",color:"?sbColorOnSurfaceVariant"}),void 0!==t.background&&(this.background=t.background),void 0!==t.iconBackground&&(this.iconBackground=t.iconBackground),void 0!==t.icon&&(this.icon=new tt(t.icon)),void 0!==t.closeButton&&(this.closeButton=new st(t.closeButton)),void 0!==t.enableCameraTitle&&(this.enableCameraTitle=new J(t.enableCameraTitle)),void 0!==t.enableCameraExplanation&&(this.enableCameraExplanation=new J(t.enableCameraExplanation))}}class jt extends q{constructor(t={}){super(),this.version="1.0",this.screen="BarcodeScanner",this.palette=new K({sbColorPrimary:"#C8193C",sbColorPrimaryDisabled:"#F5F5F5",sbColorNegative:"#FF3737",sbColorPositive:"#4EFFB4",sbColorWarning:"#FFCE5C",sbColorSecondary:"#FFEDEE",sbColorSecondaryDisabled:"#F5F5F5",sbColorOnPrimary:"#FFFFFF",sbColorOnSecondary:"#C8193C",sbColorSurface:"#FFFFFF",sbColorOutline:"#EFEFEF",sbColorOnSurfaceVariant:"#707070",sbColorOnSurface:"#000000",sbColorSurfaceLow:"#00000026",sbColorSurfaceHigh:"#0000007A",sbColorModalOverlay:"#000000A3"}),this.localization=new Rt({}),this.backgroundColor="?sbColorSurfaceLow",this.topBar=new xt({title:new J({text:"?topBarTitle",color:"?sbColorOnPrimary"}),mode:"SOLID",backgroundColor:"?sbColorPrimary",cancelButton:new st({visible:!0,text:"?topBarCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})})}),this.actionBar=new Et({flashButton:new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),zoomButton:new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),flipCameraButton:new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.viewFinder=new Pt({visible:!0,style:new Wt({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),overlayColor:"?sbColorSurfaceLow",aspectRatio:new it({width:1,height:1})}),this.userGuidance=new Dt({visible:!0,title:new J({text:"?userGuidance",color:"?sbColorOnPrimary"}),background:new nt({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow",strokeWidth:0})}),this.cameraPermission=new Ft({background:"?sbColorSurface",iconBackground:"?sbColorOutline",icon:new tt({visible:!0,color:"?sbColorOnSurface"}),closeButton:new st({visible:!0,text:"?cameraPermissionCloseButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),enableCameraTitle:new J({text:"?cameraPermissionEnableCameraTitle",color:"?sbColorOnSurface"}),enableCameraExplanation:new J({text:"?cameraPermissionEnableCameraExplanation",color:"?sbColorOnSurfaceVariant"})}),this.cameraConfiguration=new wt({}),this.recognizerConfiguration=new Mt({}),this.useCase=new St({}),this.sound=new lt({successBeepEnabled:!0,soundType:"MODERN_BEEP"}),this.vibration=new ct({enabled:!0}),this.timeouts=new ut({autoCancelTimeout:0,initialScanDelay:0}),void 0!==t.version&&(this.version=t.version),void 0!==t.screen&&(this.screen=t.screen),void 0!==t.palette&&(this.palette=new K(t.palette)),void 0!==t.localization&&(this.localization=new Rt(t.localization)),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.topBar&&(this.topBar=new xt(t.topBar)),void 0!==t.actionBar&&(this.actionBar=new Et(t.actionBar)),void 0!==t.viewFinder&&(this.viewFinder=new Pt(t.viewFinder)),void 0!==t.userGuidance&&(this.userGuidance=new Dt(t.userGuidance)),void 0!==t.cameraPermission&&(this.cameraPermission=new Ft(t.cameraPermission)),void 0!==t.cameraConfiguration&&(this.cameraConfiguration=new wt(t.cameraConfiguration)),void 0!==t.recognizerConfiguration&&(this.recognizerConfiguration=new Mt(t.recognizerConfiguration)),void 0!==t.useCase&&(this.useCase=X.From(t.useCase)),void 0!==t.sound&&(this.sound=new lt(t.sound)),void 0!==t.vibration&&(this.vibration=new ct(t.vibration)),void 0!==t.timeouts&&(this.timeouts=new ut(t.timeouts))}}class Vt extends q{constructor(t={}){if(super(),void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=t.type,void 0===t.count)throw new Error("count must be present in constructor argument");if(this.count=t.count,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.rawBytes)throw new Error("rawBytes must be present in constructor argument");if(this.rawBytes=t.rawBytes,void 0===t.parsedDocument)throw new Error("parsedDocument must be present in constructor argument");this.parsedDocument=null!=t.parsedDocument?t.parsedDocument:null}}class zt extends q{constructor(t={}){super(),this.items=[],void 0!==t.items&&(this.items=t.items.map((t=>new Vt(t))))}}class Nt extends q{constructor(t={}){if(super(),this.title=new J({text:"Title",color:"?sbColorOnSurface"}),this.subtitle=new J({text:"Standard explanation message text.",color:"?sbColorOnSurfaceVariant"}),this.sheetColor="?sbColorSurface",this.modalOverlayColor="?sbColorModalOverlay",this.dividerColor="?sbColorOutline",void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.subtitle&&(this.subtitle=new J(t.subtitle)),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0===t.okButton)throw new Error("okButton must be present in constructor argument");if(this.okButton=new st(t.okButton),void 0===t.cancelButton)throw new Error("cancelButton must be present in constructor argument");this.cancelButton=new st(t.cancelButton)}}class Ut extends h{constructor(t){super(t);const e=new jt;this.finder=e.viewFinder,this.userGuidance=e.userGuidance}static mapFinderConfiguration(t,e){var n,o;h.mapValuesDeep(null!==(n=e.finder)&&void 0!==n?n:{},t.finder),h.mapValuesDeep(null!==(o=e.userGuidance)&&void 0!==o?o:{},t.userGuidance)}}class Ht extends Ut{constructor(){super(h.DEFAULT_VIDEO_RESOLUTION_HD),this.matchSubstring=!1,this.onTextDetected=function(t){},this.finder.aspectRatio.width=6,this.userGuidance.title.text="Please hold the device over the text to start scanning"}static fromJson(t){const e=new Ht;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class Gt extends Ut{constructor(){super(h.DEFAULT_VIDEO_RESOLUTION_HD),this.onTextDetected=function(t){},this.finder.aspectRatio.width=6,this.userGuidance.title.text="Please hold the device over the vehicle identification number to start scanning"}static fromJson(t){const e=new Gt;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class Yt extends Error{constructor(t){super(t.description),this.name="LicenseError"}}class Xt{static throwIfMissingBuffer(t){Xt.throwIfMissing(t,"ImageBuffer may not be null")}static throwIfMissing(t,e){if(!t)throw new Error(e)}}var Qt,Zt=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class $t{constructor(t,e){this._sdk=t,this._token=e}analyze(t){return Zt(this,void 0,void 0,(function*(){Xt.throwIfMissingBuffer(t);return yield this._sdk.bridge.postByCopyingArgs("documentQualityAnalyzerAnalyze",[this._token,t])}))}release(){return Zt(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[this._token])}))}}class qt{_marker(){}}!function(t){t.From=function(t){const e=t._type;switch(e){case"ScanbotBinarizationFilter":return new Kt(t);case"CustomBinarizationFilter":return new Jt(t);case"ColorDocumentFilter":return new te(t);case"BrightnessFilter":return new ee(t);case"ContrastFilter":return new ne(t);case"GrayscaleFilter":return new oe(t);case"LegacyFilter":return new ie(t);case"WhiteBlackPointFilter":return new re(t);default:throw`Unknown child class name: ${e}`}}}(Qt||(Qt={}));class Kt extends qt{constructor(t={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==t.outputMode&&(this.outputMode=t.outputMode)}}class Jt extends qt{constructor(t={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==t.outputMode&&(this.outputMode=t.outputMode),void 0!==t.denoise&&(this.denoise=t.denoise),void 0!==t.radius&&(this.radius=t.radius),void 0!==t.preset&&(this.preset=t.preset)}}class te extends qt{constructor(t={}){super(),this._type="ColorDocumentFilter"}}class ee extends qt{constructor(t={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==t.brightness&&(this.brightness=t.brightness)}}class ne extends qt{constructor(t={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==t.contrast&&(this.contrast=t.contrast)}}class oe extends qt{constructor(t={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==t.borderWidthFraction&&(this.borderWidthFraction=t.borderWidthFraction),void 0!==t.blackOutliersFraction&&(this.blackOutliersFraction=t.blackOutliersFraction),void 0!==t.whiteOutliersFraction&&(this.whiteOutliersFraction=t.whiteOutliersFraction)}}class ie extends qt{constructor(t={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==t.filterType&&(this.filterType=t.filterType)}}class re extends qt{constructor(t={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==t.blackPoint&&(this.blackPoint=t.blackPoint),void 0!==t.whitePoint&&(this.whitePoint=t.whitePoint)}}class ae{static initialize(t=!1){this.verbose=t}static debug(t){this.verbose&&console.log("ScanbotSDK:",t)}static debugWarn(t){this.verbose&&console.warn("ScanbotSDK:",t)}}var se=n(0),le=n(16),ce=n(2),ue=n.n(ce);const de=Object(se.createContext)(null);function he(t){return{getColorValue:e=>{if(e){if(e.startsWith("?")){const n=e.slice(1);if(n in t)return t[n];ae.debugWarn(`Color ${n} not found in palette`)}return e}ae.debugWarn("Color is missing")}}}class pe{static setPalette(t){this.palette=t}static setBarcodeTextLocalization(t){this.barcodeTextLocalization=t}static getColorValue(t){return he(pe.palette).getColorValue(t)}static getLocalizedBarcodeText(t){if(t.startsWith("?")){const e=t.slice(1);if(e in pe.barcodeTextLocalization)return pe.barcodeTextLocalization[e];ae.debugWarn(`Barcode text localization key ${e} not found in localization`)}return t}}pe.palette=(new jt).palette,pe.barcodeTextLocalization=(new jt).localization;const fe="var(--1-sb-dvh, 1vh)";function me(){const t=Object(se.useMemo)((()=>{var t,e;return null===(e=null===(t=null===window||void 0===window?void 0:window.CSS)||void 0===t?void 0:t.supports)||void 0===e?void 0:e.call(t,"height: 100dvh")}),[]),e=()=>{var e=t?"1dvh":window.innerHeight/100+"px";document.documentElement.style.setProperty("--1-sb-dvh",e)};return Object(se.useEffect)((()=>{if(e(),!t)return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}})),null}function ge(t){return{color:pe.getColorValue(t.color),textShadow:t.useShadow?"1px 1px 2px":""}}function ve(t){return t.config.visible?se.default.createElement("span",{ref:t.innerRef,style:Object.assign(Object.assign({},t.style),ge(t.config))},pe.getLocalizedBarcodeText(t.config.text)):null}var Ae=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function be(t){const e=Object(se.useContext)(de).getColorValue,{styleConfig:n}=t,o=Ae(t,["styleConfig"]),i=Object.assign(Object.assign({},t.style),{backgroundColor:e(n.fillColor),borderColor:e(n.strokeColor),borderWidth:n.strokeWidth,borderRadius:n.cornerRadius,borderStyle:"solid"});return se.default.createElement(ce.Box,Object.assign({},o,{style:i}))}function ye(t){var e;return t.visible?se.default.createElement(ce.Button,{variant:"text",onClick:t.onClick,sx:Object.assign(Object.assign({flex:1},ge(t.foreground)),{textTransform:"none",fontSize:18,"&:hover, &:focus, &:active, &":{outline:"none",backgroundColor:"transparent"},px:0}),disableRipple:!0},se.default.createElement(be,{styleConfig:Object.assign(Object.assign({},t.background),{cornerRadius:4}),sx:{borderStyle:"solid",px:"8px"}},null!==(e=t.icon)&&void 0!==e?e:null,pe.getLocalizedBarcodeText(t.text))):se.default.createElement("div",{style:{display:"flex",flex:1}})}const Se=se.default.createContext(null);function Ce(t){const e=t.mode,n="HIDDEN"===e?0:48;Object(se.useEffect)((()=>{if("HIDDEN"===e)return;const n=document.createElement("meta");return n.name="theme-color",n.content=pe.getColorValue(t.backgroundColor),document.head.appendChild(n),()=>{document.head.removeChild(n)}}),[e]);const o="SOLID"===e?0:n,i={height:n,remainingVisibleBodyHeight:"SOLID"===e?`calc(100 * ${fe} - ${n}px)`:`calc(100 * ${fe})`,minTopPaddingForContent:o,minTopPaddingForViewFinder:10+o},r="SOLID"===e?{backgroundColor:pe.getColorValue(t.backgroundColor)}:{backgroundImage:`linear-gradient(to bottom, ${pe.getColorValue(t.backgroundColor)}, #00000000)`,position:"absolute",backgroundColor:"transparent"};return se.default.createElement(se.default.Fragment,null,"HIDDEN"!==e&&se.default.createElement(ce.AppBar,{position:"static",elevation:0,sx:Object.assign({zIndex:1e5,height:n,minHeight:n},r)},se.default.createElement(ce.Toolbar,{variant:"dense",sx:{height:n,minHeight:n}},se.default.createElement(ce.Box,{sx:{flex:1}},t.cancelButton.visible&&se.default.createElement(se.default.Fragment,null,se.default.createElement(ye,Object.assign({onClick:t.onBackPress,icon:t.cancelButton.foreground.iconVisible&&se.default.createElement(ue.a,{sx:{fontSize:12,mr:"5px"}})},t.cancelButton)))),se.default.createElement(ce.Box,null,se.default.createElement(ce.Typography,{variant:"h6",noWrap:!0,component:"div",fontSize:18,fontWeight:600},se.default.createElement(ve,{config:t.title}))),se.default.createElement(ce.Box,{sx:{flex:1}}))),se.default.createElement(Se.Provider,{value:i},t.children))}function we(t){return{textOverflow:"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`,overflow:"hidden",whiteSpace:t>1?"normal":"nowrap",display:t>1?"-webkit-box":"block"}}function xe(t){var e,n;const o=(null===(e=t.barcodeMappedData)||void 0===e?void 0:e.state)||"LOADING",i=(null===(n=t.barcodeMappedData)||void 0===n?void 0:n.value)||{title:"",subtitle:"",barcodeImage:""},r=!t||"LOADED"!==o,a=t.imageSize,s=t.barcodeTitle.visible||t.barcodeSubtitle.visible||t.counterForm,l=t.counterForm&&{"&:hover, &:focus, &:active, &":{borderColor:pe.getColorValue(t.counterForm.manualCountOutlineColor),backgroundColor:"transparent"}};return se.default.createElement(ce.Box,{sx:{display:"flex"},"data-sb-barcode-info":"1"},t.barcodeImageVisible&&se.default.createElement(ce.Box,{sx:{pr:s?"16px":0,display:"flex",alignItems:"center",justifyContent:"center"}},r?se.default.createElement(ce.Skeleton,{variant:"rounded",width:a,height:a,style:{borderRadius:8}}):se.default.createElement("img",{src:i.barcodeImage,alt:i.title,style:{width:a,height:a,borderRadius:8}})),s&&se.default.createElement(ce.Box,{sx:{flex:1,display:"flex",flexDirection:"column",verticalAlign:"middle",justifyContent:"center",m:0,p:0,minWidth:0}},t.barcodeTitle.visible&&se.default.createElement(ce.Box,{display:r?"block":"flex",sx:{alignItems:"center"}},se.default.createElement(ce.Typography,{fontSize:16,fontWeight:"bold",sx:Object.assign(Object.assign({},we(t.maxNumberOfTitleLines)),ge(t.barcodeTitle))},r?se.default.createElement(ce.Skeleton,{variant:"text"}):i.title),t.displayRightArrow&&!r&&se.default.createElement(ue.a,{sx:{fontSize:16,fontWeight:"bold",color:pe.getColorValue(t.barcodeTitle.color)}})),t.barcodeSubtitle.visible&&se.default.createElement(ce.Typography,{fontSize:14,fontWeight:400,sx:Object.assign(Object.assign({},we(t.maxNumberOfSubtitleLines)),ge(t.barcodeSubtitle))},r?se.default.createElement(ce.Skeleton,{variant:"text"}):i.subtitle),t.counterForm&&se.default.createElement(ce.ButtonGroup,{variant:"outlined"},se.default.createElement(ce.Button,{sx:l,onClick:()=>t.counterForm.setCounter(t.counterForm.counter-1),disableRipple:!0},se.default.createElement(ue.a,{sx:{color:pe.getColorValue(t.counterForm.manualCountChangeColor)}})),se.default.createElement(ce.Button,{sx:Object.assign(Object.assign({},l),{color:pe.getColorValue(t.counterForm.manualCountChangeColor),fontWeight:"bold",fontSize:16}),onClick:t.counterForm.onNumberClick,disableRipple:!0},t.counterForm.counter),se.default.createElement(ce.Button,{sx:l,onClick:()=>t.counterForm.setCounter(t.counterForm.counter+1),disableRipple:!0},se.default.createElement(ue.a,{sx:{color:pe.getColorValue(t.counterForm.manualCountChangeColor)}})))))}function Ee(t){const e=Object(se.useContext)(de).getColorValue;return t.visible?se.default.createElement(ce.Button,{onClick:t.onClick,type:t.type,sx:Object.assign(Object.assign({},t.style),{"&:hover, &:focus, &:active, &":{borderStyle:"solid",borderColor:e(t.background.strokeColor),borderWidth:t.background.strokeWidth,backgroundColor:e(t.background.fillColor),textTransform:"none",outline:"none"}}),disableRipple:!0},t.foreground.iconVisible&&t.icon&&se.default.createElement(t.icon,{sx:{color:e(t.foreground.color),pr:2}}),se.default.createElement(ve,{config:{visible:!0,text:t.text,color:t.foreground.color,useShadow:t.foreground.useShadow}})):null}var Le=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function _e(t){var e,{modalOverlayColor:n}=t,o=Le(t,["modalOverlayColor"]);const i={backdrop:{style:{backgroundColor:pe.getColorValue(n)}}},r=Object.assign(Object.assign({},o.PaperProps),{sx:Object.assign(Object.assign({},null===(e=o.PaperProps)||void 0===e?void 0:e.sx),{maxWidth:400})});return se.default.createElement(ce.Dialog,Object.assign({},o,{componentsProps:i,PaperProps:r}))}function Oe(t){const e=Object(se.useContext)(de).getColorValue,n=!t.barcodeMappedData||"LOADED"!==t.barcodeMappedData.state,o={backgroundColor:e(n?t.sheetColorLoading:t.sheetColorLoaded)},[i,r]=se.default.useState(),a=Object(se.useRef)((()=>{}));Object(se.useEffect)((()=>{t.open&&r(!1)}),[t.open]);const s=()=>{a.current=t.handleCancel,r(!0)};return se.default.createElement(_e,{modalOverlayColor:t.modalOverlayColor,open:t.open&&!i,fullWidth:!0,TransitionProps:{onExited:()=>{i&&a.current()}},onClose:()=>{n||s()}},se.default.createElement(ce.DialogContent,{style:o},se.default.createElement(xe,Object.assign({},t,{maxNumberOfTitleLines:2,maxNumberOfSubtitleLines:1,imageSize:68}))),se.default.createElement(ce.DialogActions,{style:o},se.default.createElement(ue.a,{container:!0,spacing:2,sx:{overflow:"hidden"}},se.default.createElement(ue.a,{item:!0,xs:12},se.default.createElement(ue.a,{color:e(t.dividerColor)})),n?se.default.createElement(ue.a,{item:!0,xs:12,sx:{textAlign:"center"}},se.default.createElement(ce.Box,null,se.default.createElement(ce.CircularProgress,{sx:{color:e(t.loadingMessage.color),verticalAlign:"middle",mr:2}}),se.default.createElement(ve,{config:t.loadingMessage}))):se.default.createElement(se.default.Fragment,null,se.default.createElement(ue.a,{item:!0,xs:6},se.default.createElement(Ee,Object.assign({style:{width:"100%"},onClick:s},t.cancelButton))),se.default.createElement(ue.a,{item:!0,xs:6},se.default.createElement(Ee,Object.assign({style:{width:"100%"},onClick:()=>{a.current=t.handleSubmit,r(!0)}},t.submitButton)))))))}function ke(t){const e=Object(se.useRef)(!0);Object(se.useEffect)((()=>(e.current=!0,()=>{e.current=!1})));const[,n]=Object(se.useReducer)((t=>t+1),0),o=Object(se.useRef)();return Object(se.useMemo)((()=>{o.current={loading:!0,value:void 0,error:null}}),[t]),function(t,e){Object(se.useMemo)((()=>{t&&t.then((t=>{e({loading:!1,error:null,value:t})})).catch((t=>{e({loading:!1,error:{reason:t},value:void 0})}))}),[t])}(t,(t=>{o.current=t,e.current&&n()})),t?o.current:null}var Te=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};const Pe=Object(se.createContext)(null);class We{constructor(t,e){this.barcodeItemMapper=t,this.onError=e,this.cache=new Map,this.cacheEntryPendingRetries=[],this.hash=t=>t.id(),this.onEvictionListeners=new Set}mapBarcodeToBarcodeItem(t,e){return Te(this,void 0,void 0,(function*(){return{count:e,rawBytes:yield B.toBase64(t.rawBytes),type:t.format,text:t.text,parsedDocument:t.parsedDocument}}))}getBarcodeMappedData(t){const e=this.hash(t);if(!this.cache.has(e)){const n=(()=>Te(this,void 0,void 0,(function*(){if(this.barcodeItemMapper){const e=yield this.mapBarcodeToBarcodeItem(t,1);return this.barcodeItemMapper(e)}return{title:t.text,subtitle:t.format,barcodeImage:yield B.toDataUrl(t.barcodeImage)}})))();this.cache.set(e,n)}return this.cache.get(e)}useBarcodeMappedData(t){const e=Object(se.useRef)(!1),n=ke(t&&this.getBarcodeMappedData(t));if(Object(se.useEffect)((()=>{n&&n.error&&(e.current=!1,this.cacheEntryPendingRetries.push({barcode:t,retry:()=>{this.cache.delete(this.hash(t)),e.current=!0}}),this.onError((()=>{for(const t of this.cacheEntryPendingRetries)t.retry();this.cacheEntryPendingRetries.length=0}),(()=>{e.current=!0;for(const t of this.cacheEntryPendingRetries)for(const e of this.onEvictionListeners)this.hash(e.barcode)==this.hash(t.barcode)&&e.callback();this.cacheEntryPendingRetries.length=0})))}),[n&&n.error]),!n)return null;let o;return o=n.value?"LOADED":n.error&&!e.current?"RETRY_DIALOG_OPEN":n.error?"FAILED":"LOADING",{value:n.value,state:o}}addOnEvictionListener(t){this.onEvictionListeners.add(t)}removeOnEvictionListener(t){this.onEvictionListeners.delete(t)}}function Be(t){if(!1===t.visible)return null;const e={backgroundColor:t.active?pe.getColorValue(t.activeBackgroundColor):pe.getColorValue(t.backgroundColor),color:t.active?pe.getColorValue(t.activeForegroundColor):pe.getColorValue(t.foregroundColor)};return se.default.createElement(ce.IconButton,{sx:Object.assign(Object.assign({},e),{"&:hover, &:focus":Object.assign({outline:"none"},e),width:48,height:48}),onClick:t.onClick},t.text&&se.default.createElement("span",{style:{fontSize:15}},pe.getLocalizedBarcodeText(t.text)),t.icon&&se.default.createElement(t.icon,{style:{padding:7}}))}var De=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Ie{constructor(){this.audioFile=new Audio}initialize(t){return De(this,void 0,void 0,(function*(){t.successBeepEnabled&&(this.audioFile.src="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAACAE00QSBpc29taXNvMgAAAAhmcmVlAAASCG1kYXQBQCKAo3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWl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CAwMDAwMDAwMCAwMDAwMDAwMA=="))}))}beep(t){t.successBeepEnabled&&this.play()}play(){return De(this,void 0,void 0,(function*(){try{yield this.audioFile.play()}catch(t){}}))}}Ie.INSTANCE=new Ie;var Re=Ie;class Me{constructor(){this.DURATION=200}vibrate(t){t.enabled&&navigator.vibrate&&navigator.vibrate(this.DURATION)}}Me.INSTANCE=new Me;var Fe=Me,je=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Ve extends Error{constructor(t,e,n){super(e),this.name="",this.name=t,this.message=e,this.webApiError=n}static mediaDevicesUndefined(){return new Ve(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? If so, please use a secure context (HTTPS) or use 'localhost' explicitly.")}static enumerateDevicesFailed(){return new Ve(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? Because we're unable to query query navigator.mediaDevices?.enumerateDevices")}static mediaDeviceNotFound(t){return new Ve(this.MESSAGE.ENUMERATE_FAILED,"Does your device even have a camera? Because we were unable to query navigator.mediaDevices?.getUserMedia().",t)}static permissionDenied(t){return new Ve(this.MESSAGE.PERMISSION_DENIED,"Camera permission has not been granted. Please prompt your users again to grant permission.",t)}static unknown(t){return new Ve(this.MESSAGE.UNKNOWN,"\n Unfortunately we were unable to query navigator.mediaDevicess.getUserMedia, \n and unable to determine the reason why. This may be caused by the user to denied the permission prompt. \n Or you may be using an in-app browser that itself has not been granted permission to use the camera.\n Or your users may be using a niche browser that does not support the media API at all!\n ",t)}static tryCheckPermission(){return je(this,void 0,void 0,(function*(){if(!this.permissionState)try{const t=yield navigator.permissions.query({name:"camera"});this.permissionState=t.state}catch(t){this.permissionState=this.PERMISSION_STATE.UNKNOWN}}))}static hasDeniedPermission(){return this.permissionState===this.PERMISSION_STATE.DENIED}static hasCheckedPermission(){return!!this.permissionState}}Ve.PERMISSION_STATE={GRANTED:"granted",DENIED:"denied",PROMPT:"prompt",UNKNOWN:"unknown"},Ve.MESSAGE={DEVICES_UNDEFINED:"MediaError_DevicesUndefined",DEVICE_NOT_FOUND:"MediaError_DeviceNotFound",ENUMERATE_FAILED:"MediaError_EnumerateFailed",PERMISSION_DENIED:"MediaError_PermissionDenied",UNKNOWN:"MediaError_Unknown"};var ze=n(5);const Ne=ze.a.svg`
2
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=20)}([function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return S})),n.d(e,"Fragment",(function(){return y})),n.d(e,"createContext",(function(){return G})),n.d(e,"createElement",(function(){return v})),n.d(e,"createRef",(function(){return b})),n.d(e,"useCallback",(function(){return ft})),n.d(e,"useContext",(function(){return mt})),n.d(e,"useDebugValue",(function(){return gt})),n.d(e,"useEffect",(function(){return ct})),n.d(e,"useErrorBoundary",(function(){return vt})),n.d(e,"useId",(function(){return At})),n.d(e,"useImperativeHandle",(function(){return ht})),n.d(e,"useLayoutEffect",(function(){return ut})),n.d(e,"useMemo",(function(){return pt})),n.d(e,"useReducer",(function(){return lt})),n.d(e,"useRef",(function(){return dt})),n.d(e,"useState",(function(){return st})),n.d(e,"Children",(function(){return Dt})),n.d(e,"PureComponent",(function(){return Ot})),n.d(e,"StrictMode",(function(){return ye})),n.d(e,"Suspense",(function(){return jt})),n.d(e,"SuspenseList",(function(){return Nt})),n.d(e,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",(function(){return ue})),n.d(e,"cloneElement",(function(){return me})),n.d(e,"createFactory",(function(){return he})),n.d(e,"createPortal",(function(){return Yt})),n.d(e,"default",(function(){return Oe})),n.d(e,"findDOMNode",(function(){return ve})),n.d(e,"flushSync",(function(){return be})),n.d(e,"forwardRef",(function(){return Wt})),n.d(e,"hydrate",(function(){return te})),n.d(e,"isElement",(function(){return Ee})),n.d(e,"isFragment",(function(){return fe})),n.d(e,"isValidElement",(function(){return pe})),n.d(e,"lazy",(function(){return zt})),n.d(e,"memo",(function(){return kt})),n.d(e,"render",(function(){return Jt})),n.d(e,"startTransition",(function(){return Se})),n.d(e,"unmountComponentAtNode",(function(){return ge})),n.d(e,"unstable_batchedUpdates",(function(){return Ae})),n.d(e,"useDeferredValue",(function(){return Ce})),n.d(e,"useInsertionEffect",(function(){return xe})),n.d(e,"useSyncExternalStore",(function(){return Le})),n.d(e,"useTransition",(function(){return we})),n.d(e,"version",(function(){return de}));var o,i,r,a,s,l,c,u,d={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function m(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function v(t,e,n){var i,r,a,s={};for(a in e)"key"==a?i=e[a]:"ref"==a?r=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return A(t,s,i,r,null)}function A(t,e,n,o,a){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=i.vnode&&i.vnode(s),s}function b(){return{current:null}}function y(t){return t.children}function S(t,e){this.props=t,this.context=e}function C(t,e){if(null==e)return t.__?C(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?C(t):null}function w(t,e,n){var o,r=t.__v,a=r.__e,s=t.__P;if(s)return(o=m({},r)).__v=r.__v+1,i.vnode&&i.vnode(o),R(s,o,r,t.__n,void 0!==s.ownerSVGElement,32&r.__u?[a]:null,e,null==a?C(r):a,!!(32&r.__u),n),o.__v=r.__v,o.__.__k[o.__i]=o,o.__d=void 0,o.__e!=a&&x(o),o}function x(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return x(t)}}function E(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!L.__r++||s!==i.debounceRendering)&&((s=i.debounceRendering)||l)(L)}function L(){var t,e,n,o=[],r=[];for(a.sort(c);t=a.shift();)t.__d&&(n=a.length,e=w(t,o,r)||e,0===n||a.length>n?(M(o,e,r),r.length=o.length=0,e=void 0,a.sort(c)):e&&i.__c&&i.__c(e,h));e&&M(o,e,r),L.__r=0}function _(t,e,n,o,i,r,a,s,l,c,u){var p,f,m,g,v,A=o&&o.__k||h,b=e.length;for(n.__d=l,O(n,e,A),l=n.__d,p=0;p<b;p++)null!=(m=n.__k[p])&&"boolean"!=typeof m&&"function"!=typeof m&&(f=-1===m.__i?d:A[m.__i]||d,m.__i=p,R(t,m,f,i,r,a,s,l,c,u),g=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&j(f.ref,null,m),u.push(m.ref,m.__c||g,m)),null==v&&null!=g&&(v=g),65536&m.__u||f.__k===m.__k?l=k(m,l,t):"function"==typeof m.type&&void 0!==m.__d?l=m.__d:g&&(l=g.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=l,n.__e=v}function O(t,e,n){var o,i,r,a,s,l=e.length,c=n.length,u=c,d=0;for(t.__k=[],o=0;o<l;o++)null!=(i=t.__k[o]=null==(i=e[o])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?A(null,i,null,null,i):f(i)?A(y,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?A(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,s=P(i,n,a=o+d,u),i.__i=s,r=null,-1!==s&&(u--,(r=n[s])&&(r.__u|=131072)),null==r||null===r.__v?(-1==s&&d--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?d++:s>a?u>l-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==o+d&&(i.__u|=65536))):(r=n[o])&&null==r.key&&r.__e&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=C(r)),V(r,r,!1),n[o]=null,u--);if(u)for(o=0;o<c;o++)null!=(r=n[o])&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=C(r)),V(r,r))}function k(t,e,n){var o,i;if("function"==typeof t.type){for(o=t.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=t,e=k(o[i],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function T(t,e){return e=e||[],null==t||"boolean"==typeof t||(f(t)?t.some((function(t){T(t,e)})):e.push(t)),e}function P(t,e,n,o){var i=t.key,r=t.type,a=n-1,s=n+1,l=e[n];if(null===l||l&&i==l.key&&r===l.type)return n;if(o>(null!=l&&0==(131072&l.__u)?1:0))for(;a>=0||s<e.length;){if(a>=0){if((l=e[a])&&0==(131072&l.__u)&&i==l.key&&r===l.type)return a;a--}if(s<e.length){if((l=e[s])&&0==(131072&l.__u)&&i==l.key&&r===l.type)return s;s++}}return-1}function W(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function B(t,e,n,o,i){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof o&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||W(t.style,e,"");if(n)for(e in n)o&&n[e]===o[e]||W(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?o?n.u=o.u:(n.u=Date.now(),t.addEventListener(e,r?I:D,r)):t.removeEventListener(e,r?I:D,r);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function D(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(i.event?i.event(t):t)}}function I(t){if(this.l)return this.l[t.type+!0](i.event?i.event(t):t)}function R(t,e,n,o,r,a,s,l,c,u){var d,h,p,g,v,A,b,C,w,x,E,L,O,k,T,P=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=e.__e=n.__e]),(d=i.__b)&&d(e);t:if("function"==typeof P)try{if(C=e.props,w=(d=P.contextType)&&o[d.__c],x=d?w?w.props.value:d.__:o,n.__c?b=(h=e.__c=n.__c).__=h.__E:("prototype"in P&&P.prototype.render?e.__c=h=new P(C,x):(e.__c=h=new S(C,x),h.constructor=P,h.render=z),w&&w.sub(h),h.props=C,h.state||(h.state={}),h.context=x,h.__n=o,p=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,P.getDerivedStateFromProps(C,h.__s))),g=h.props,v=h.state,h.__v=e,p)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&C!==g&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(C,x),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(C,h.__s,x)||e.__v===n.__v)){for(e.__v!==n.__v&&(h.props=C,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[],h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(C,h.__s,x),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(g,v,A)}))}if(h.context=x,h.props=C,h.__P=t,h.__e=!1,L=i.__r,O=0,"prototype"in P&&P.prototype.render){for(h.state=h.__s,h.__d=!1,L&&L(e),d=h.render(h.props,h.state,h.context),k=0;k<h._sb.length;k++)h.__h.push(h._sb[k]);h._sb=[]}else do{h.__d=!1,L&&L(e),d=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++O<25);h.state=h.__s,null!=h.getChildContext&&(o=m(m({},o),h.getChildContext())),p||null==h.getSnapshotBeforeUpdate||(A=h.getSnapshotBeforeUpdate(g,v)),_(t,f(T=null!=d&&d.type===y&&null==d.key?d.props.children:d)?T:[T],e,n,o,r,a,s,l,c,u),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),b&&(h.__E=h.__=null)}catch(t){e.__v=null,c||null!=a?(e.__e=l,e.__u|=c?160:32,a[a.indexOf(l)]=null):(e.__e=n.__e,e.__k=n.__k),i.__e(t,e,n)}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=F(n.__e,e,n,o,r,a,s,c,u);(d=i.diffed)&&d(e)}function M(t,e,n){for(var o=0;o<n.length;o++)j(n[o],n[++o],n[++o]);i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function F(t,e,n,i,r,a,s,l,c){var u,h,p,m,v,A,b,y=n.props,S=e.props,w=e.type;if("svg"===w&&(r=!0),null!=a)for(u=0;u<a.length;u++)if((v=a[u])&&"setAttribute"in v==!!w&&(w?v.localName===w:3===v.nodeType)){t=v,a[u]=null;break}if(null==t){if(null===w)return document.createTextNode(S);t=r?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,S.is&&S),a=null,l=!1}if(null===w)y===S||l&&t.data===S||(t.data=S);else{if(a=a&&o.call(t.childNodes),y=n.props||d,!l&&null!=a)for(y={},u=0;u<t.attributes.length;u++)y[(v=t.attributes[u]).name]=v.value;for(u in y)v=y[u],"children"==u||("dangerouslySetInnerHTML"==u?p=v:"key"===u||u in S||B(t,u,null,v,r));for(u in S)v=S[u],"children"==u?m=v:"dangerouslySetInnerHTML"==u?h=v:"value"==u?A=v:"checked"==u?b=v:"key"===u||l&&"function"!=typeof v||y[u]===v||B(t,u,v,y[u],r);if(h)l||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(p&&(t.innerHTML=""),_(t,f(m)?m:[m],e,n,i,r&&"foreignObject"!==w,a,s,a?a[0]:n.__k&&C(n,0),l,c),null!=a)for(u=a.length;u--;)null!=a[u]&&g(a[u]);l||(u="value",void 0!==A&&(A!==t[u]||"progress"===w&&!A||"option"===w&&A!==y[u])&&B(t,u,A,y[u],!1),u="checked",void 0!==b&&b!==t[u]&&B(t,u,b,y[u],!1))}return t}function j(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function V(t,e,n){var o,r;if(i.unmount&&i.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||j(o,null,e)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){i.__e(t,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&V(o[r],e,n||"function"!=typeof t.type);n||null==t.__e||g(t.__e),t.__=t.__e=t.__d=void 0}function z(t,e,n){return this.constructor(t,n)}function N(t,e,n){var r,a,s,l;i.__&&i.__(t,e),a=(r="function"==typeof n)?null:n&&n.__k||e.__k,s=[],l=[],R(e,t=(!r&&n||e).__k=v(y,null,[t]),a||d,d,void 0!==e.ownerSVGElement,!r&&n?[n]:a?null:e.firstChild?o.call(e.childNodes):null,s,!r&&n?n:a?a.__e:e.firstChild,r,l),t.__d=void 0,M(s,t,l)}function U(t,e){N(t,e,U)}function H(t,e,n){var i,r,a,s,l=m({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==a?i=e[a]:"ref"==a?r=e[a]:l[a]=void 0===e[a]&&void 0!==s?s[a]:e[a];return arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):n),A(t.type,l,i||t.key,r||t.ref,null)}function G(t,e){var n={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,o;return this.getChildContext||(n=[],(o={})[e]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,E(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}o=h.slice,i={__e:function(t,e,n,o){for(var i,r,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(t)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,o||{}),a=i.__d),a)return i.__E=i}catch(e){t=e}throw t}},r=0,S.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof t&&(t=t(m({},n),this.props)),t&&m(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),E(this))},S.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),E(this))},S.prototype.render=y,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(t,e){return t.__v.__b-e.__v.__b},L.__r=0,u=0;var Y,X,Q,Z,$=0,q=[],K=[],J=i,tt=J.__b,et=J.__r,nt=J.diffed,ot=J.__c,it=J.unmount,rt=J.__;function at(t,e){J.__h&&J.__h(X,t,$||e),$=0;var n=X.__H||(X.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:K}),n.__[t]}function st(t){return $=1,lt(Et,t)}function lt(t,e,n){var o=at(Y++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Et(void 0,e),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=X,!X.u)){var i=function(t,e,n){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter((function(t){return!!t.__c}));if(i.every((function(t){return!t.__N})))return!r||r.call(this,t,e,n);var a=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}})),!(!a&&o.__c.props===t)&&(!r||r.call(this,t,e,n))};X.u=!0;var r=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(t,e,n){if(this.__e){var o=r;r=void 0,i(t,e,n),r=o}a&&a.call(this,t,e,n)},X.shouldComponentUpdate=i}return o.__N||o.__}function ct(t,e){var n=at(Y++,3);!J.__s&&xt(n.__H,e)&&(n.__=t,n.i=e,X.__H.__h.push(n))}function ut(t,e){var n=at(Y++,4);!J.__s&&xt(n.__H,e)&&(n.__=t,n.i=e,X.__h.push(n))}function dt(t){return $=5,pt((function(){return{current:t}}),[])}function ht(t,e,n){$=6,ut((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function pt(t,e){var n=at(Y++,7);return xt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function ft(t,e){return $=8,pt((function(){return t}),e)}function mt(t){var e=X.context[t.__c],n=at(Y++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(X)),e.props.value):t.__}function gt(t,e){J.useDebugValue&&J.useDebugValue(e?e(t):t)}function vt(t){var e=at(Y++,10),n=st();return e.__=t,X.componentDidCatch||(X.componentDidCatch=function(t,o){e.__&&e.__(t,o),n[1](t)}),[n[0],function(){n[1](void 0)}]}function At(){var t=at(Y++,11);if(!t.__){for(var e=X.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function bt(){for(var t;t=q.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ct),t.__H.__h.forEach(wt),t.__H.__h=[]}catch(e){t.__H.__h=[],J.__e(e,t.__v)}}J.__b=function(t){X=null,tt&&tt(t)},J.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rt&&rt(t,e)},J.__r=function(t){et&&et(t),Y=0;var e=(X=t.__c).__H;e&&(Q===X?(e.__h=[],X.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=K,t.__N=t.i=void 0}))):(e.__h.forEach(Ct),e.__h.forEach(wt),e.__h=[],Y=0)),Q=X},J.diffed=function(t){nt&&nt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==q.push(e)&&Z===J.requestAnimationFrame||((Z=J.requestAnimationFrame)||St)(bt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==K&&(t.__=t.__V),t.i=void 0,t.__V=K}))),Q=X=null},J.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Ct),t.__h=t.__h.filter((function(t){return!t.__||wt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],J.__e(n,t.__v)}})),ot&&ot(t,e)},J.unmount=function(t){it&&it(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{Ct(t)}catch(t){e=t}})),n.__H=void 0,e&&J.__e(e,n.__v))};var yt="function"==typeof requestAnimationFrame;function St(t){var e,n=function(){clearTimeout(o),yt&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);yt&&(e=requestAnimationFrame(n))}function Ct(t){var e=X,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),X=e}function wt(t){var e=X;t.__c=t.__(),X=e}function xt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Et(t,e){return"function"==typeof e?e(t):e}function Lt(t,e){for(var n in e)t[n]=e[n];return t}function _t(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var o in e)if("__source"!==o&&t[o]!==e[o])return!0;return!1}function Ot(t,e){this.props=t,this.context=e}function kt(t,e){function n(t){var n=this.props.ref,o=n==t.ref;return!o&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!o:_t(this.props,t)}function o(e){return this.shouldComponentUpdate=n,v(t,e)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Ot.prototype=new S).isPureReactComponent=!0,Ot.prototype.shouldComponentUpdate=function(t,e){return _t(this.props,t)||_t(this.state,e)};var Tt=i.__b;i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Tt&&Tt(t)};var Pt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Wt(t){function e(e){var n=Lt({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=Pt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Bt=function(t,e){return null==t?null:T(T(t).map(e))},Dt={map:Bt,forEach:Bt,count:function(t){return t?T(t).length:0},only:function(t){var e=T(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:T},It=i.__e;i.__e=function(t,e,n,o){if(t.then)for(var i,r=e;r=r.__;)if((i=r.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);It(t,e,n,o)};var Rt=i.unmount;function Mt(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=Lt({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Mt(t,e,n)}))),t}function Ft(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Ft(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function jt(){this.__u=0,this.t=null,this.__b=null}function Vt(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function zt(t){var e,n,o;function i(i){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){o=t})),o)throw o;if(!n)throw e;return v(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Nt(){this.u=null,this.o=null}i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Rt&&Rt(t)},(jt.prototype=new S).__c=function(t,e){var n=e.__c,o=this;null==o.t&&(o.t=[]),o.t.push(n);var i=Vt(o.__v),r=!1,a=function(){r||(r=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--o.__u){if(o.state.__a){var t=o.state.__a;o.__v.__k[0]=Ft(t,t.__c.__P,t.__c.__O)}var e;for(o.setState({__a:o.__b=null});e=o.t.pop();)e.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(a,a)},jt.prototype.componentWillUnmount=function(){this.t=[]},jt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Mt(this.__b,n,o.__O=o.__P)}this.__b=null}var i=e.__a&&v(y,null,t.fallback);return i&&(i.__u&=-33),[v(y,null,e.__a?null:t.children),i]};var Ut=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function Ht(t){return this.getChildContext=function(){return t.context},t.children}function Gt(t){var e=this,n=t.i;e.componentWillUnmount=function(){N(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),N(v(Ht,{context:e.context},t.__v),e.l)}function Yt(t,e){var n=v(Gt,{__v:t,i:e});return n.containerInfo=e,n}(Nt.prototype=new S).__a=function(t){var e=this,n=Vt(e.__v),o=e.o.get(t);return o[0]++,function(i){var r=function(){e.props.revealOrder?(o.push(i),Ut(e,t,o)):i()};n?n(r):r()}},Nt.prototype.render=function(t){this.u=null,this.o=new Map;var e=T(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Nt.prototype.componentDidUpdate=Nt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ut(t,n,e)}))};var Xt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Qt=/^(?: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]/,Zt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,$t=/[A-Z0-9]/g,qt="undefined"!=typeof document,Kt=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function Jt(t,e,n){return null==e.__k&&(e.textContent=""),N(t,e),"function"==typeof n&&n(),t?t.__c:null}function te(t,e,n){return U(t,e),"function"==typeof n&&n(),t?t.__c:null}S.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(S.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var ee=i.event;function ne(){}function oe(){return this.cancelBubble}function ie(){return this.defaultPrevented}i.event=function(t){return ee&&(t=ee(t)),t.persist=ne,t.isPropagationStopped=oe,t.isDefaultPrevented=ie,t.nativeEvent=t};var re,ae={enumerable:!1,configurable:!0,get:function(){return this.class}},se=i.vnode;i.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,o={};for(var i in e){var r=e[i];if(!("value"===i&&"defaultValue"in e&&null==r||qt&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===r?r="":"translate"===a&&"no"===r?r=!1:"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Kt(e.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":Zt.test(i)?i=a:-1===n.indexOf("-")&&Qt.test(i)?i=i.replace($t,"-$&").toLowerCase():null===r&&(r=void 0):a=i="oninput","oninput"===a&&o[i=a]&&(i="oninputCapture"),o[i]=r}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=T(e.children).forEach((function(t){t.props.selected=-1!=o.value.indexOf(t.props.value)}))),"select"==n&&null!=o.defaultValue&&(o.value=T(e.children).forEach((function(t){t.props.selected=o.multiple?-1!=o.defaultValue.indexOf(t.props.value):o.defaultValue==t.props.value}))),e.class&&!e.className?(o.class=e.class,Object.defineProperty(o,"className",ae)):(e.className&&!e.class||e.class&&e.className)&&(o.class=o.className=e.className),t.props=o}(t),t.$$typeof=Xt,se&&se(t)};var le=i.__r;i.__r=function(t){le&&le(t),re=t.__c};var ce=i.diffed;i.diffed=function(t){ce&&ce(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),re=null};var ue={ReactCurrentDispatcher:{current:{readContext:function(t){return re.__n[t.__c].props.value}}}},de="17.0.2";function he(t){return v.bind(null,t)}function pe(t){return!!t&&t.$$typeof===Xt}function fe(t){return pe(t)&&t.type===y}function me(t){return pe(t)?H.apply(null,arguments):t}function ge(t){return!!t.__k&&(N(null,t),!0)}function ve(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ae=function(t,e){return t(e)},be=function(t,e){return t(e)},ye=y;function Se(t){t()}function Ce(t){return t}function we(){return[!1,Se]}var xe=ut,Ee=pe;function Le(t,e){var n=e(),o=st({h:{__:n,v:e}}),i=o[0].h,r=o[1];return ut((function(){i.__=n,i.v=e,_e(i)&&r({h:i})}),[t,n,e]),ct((function(){return _e(i)&&r({h:i}),t((function(){_e(i)&&r({h:i})}))}),[t]),n}function _e(t){var e,n,o=t.v,i=t.__;try{var r=o();return!((e=i)===(n=r)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(t){return!0}}var Oe={useState:st,useId:At,useReducer:lt,useEffect:ct,useLayoutEffect:ut,useInsertionEffect:ut,useTransition:we,useDeferredValue:Ce,useSyncExternalStore:Le,startTransition:Se,useRef:dt,useImperativeHandle:ht,useMemo:pt,useCallback:ft,useContext:mt,useDebugValue:gt,version:"17.0.2",Children:Dt,render:Jt,hydrate:te,unmountComponentAtNode:ge,createPortal:Yt,createElement:v,createContext:G,createFactory:he,cloneElement:me,createRef:b,Fragment:y,isValidElement:pe,isElement:pe,isFragment:fe,findDOMNode:ve,Component:S,PureComponent:Ot,memo:kt,forwardRef:Wt,flushSync:be,unstable_batchedUpdates:Ae,StrictMode:y,Suspense:jt,SuspenseList:Nt,lazy:zt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ue}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"e",(function(){return l}));var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r=function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};function a(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}Object.create;function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i<r;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))}Object.create},function(t,e){t.exports=window["@mui"]},,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Yt})),n.d(e,"b",(function(){return Xt}));var o=n(1),i=(n(19),n(0)),r=n(17),a=n.n(r),s=n(7),l=n(18),c="undefined"!=typeof t&&void 0!==t.env&&(t.env.REACT_APP_SC_ATTR||t.env.SC_ATTR)||"data-styled",u="active",d="data-styled-version",h="6.1.8",p="/*!sc*/\n",f="undefined"!=typeof window&&"HTMLElement"in window,m=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env&&void 0!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==t.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&t.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env&&void 0!==t.env.SC_DISABLE_SPEEDY&&""!==t.env.SC_DISABLE_SPEEDY&&("false"!==t.env.SC_DISABLE_SPEEDY&&t.env.SC_DISABLE_SPEEDY)),g=(new Set,Object.freeze([])),v=Object.freeze({});function A(t,e,n){return void 0===n&&(n=v),t.theme!==n.theme&&t.theme||e||n.theme}var b=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),y=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,S=/(^-|-$)/g;function C(t){return t.replace(y,"-").replace(S,"")}var w=/(a)(d)/gi,x=function(t){return String.fromCharCode(t+(t>25?39:97))};function E(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=x(e%52)+n;return(x(e%52)+n).replace(w,"$1-$2")}var L,_=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},O=function(t){return _(5381,t)};function k(t){return E(O(t)>>>0)}function T(t){return t.displayName||t.name||"Component"}function P(t){return"string"==typeof t&&!0}var W="function"==typeof Symbol&&Symbol.for,B=W?Symbol.for("react.memo"):60115,D=W?Symbol.for("react.forward_ref"):60112,I={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},R={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F=((L={})[D]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},L[B]=M,L);function j(t){return("type"in(e=t)&&e.type.$$typeof)===B?M:"$$typeof"in t?F[t.$$typeof]:I;var e}var V=Object.defineProperty,z=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,U=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,G=Object.prototype;function Y(t,e,n){if("string"!=typeof e){if(G){var o=H(e);o&&o!==G&&Y(t,o,n)}var i=z(e);N&&(i=i.concat(N(e)));for(var r=j(t),a=j(e),s=0;s<i.length;++s){var l=i[s];if(!(l in R||n&&n[l]||a&&l in a||r&&l in r)){var c=U(e,l);try{V(t,l,c)}catch(t){}}}}return t}function X(t){return"function"==typeof t}function Q(t){return"object"==typeof t&&"styledComponentId"in t}function Z(t,e){return t&&e?"".concat(t," ").concat(e):t||e||""}function $(t,e){if(0===t.length)return"";for(var n=t[0],o=1;o<t.length;o++)n+=e?e+t[o]:t[o];return n}function q(t){return null!==t&&"object"==typeof t&&t.constructor.name===Object.name&&!("props"in t&&t.$$typeof)}function K(t,e,n){if(void 0===n&&(n=!1),!n&&!q(t)&&!Array.isArray(t))return e;if(Array.isArray(e))for(var o=0;o<e.length;o++)t[o]=K(t[o],e[o]);else if(q(e))for(var o in e)t[o]=K(t[o],e[o]);return t}function J(t,e){Object.defineProperty(t,"toString",{value:e})}function tt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):""))}var et=function(){function t(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return t.prototype.indexOfGroup=function(t){for(var e=0,n=0;n<t;n++)e+=this.groupSizes[n];return e},t.prototype.insertRules=function(t,e){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,i=o;t>=i;)if((i<<=1)<0)throw tt(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var r=o;r<i;r++)this.groupSizes[r]=0}for(var a=this.indexOfGroup(t+1),s=(r=0,e.length);r<s;r++)this.tag.insertRule(a,e[r])&&(this.groupSizes[t]++,a++)},t.prototype.clearGroup=function(t){if(t<this.length){var e=this.groupSizes[t],n=this.indexOfGroup(t),o=n+e;this.groupSizes[t]=0;for(var i=n;i<o;i++)this.tag.deleteRule(n)}},t.prototype.getGroup=function(t){var e="";if(t>=this.length||0===this.groupSizes[t])return e;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),i=o+n,r=o;r<i;r++)e+="".concat(this.tag.getRule(r)).concat(p);return e},t}(),nt=new Map,ot=new Map,it=1,rt=function(t){if(nt.has(t))return nt.get(t);for(;ot.has(it);)it++;var e=it++;return nt.set(t,e),ot.set(e,t),e},at=function(t,e){it=e+1,nt.set(t,e),ot.set(e,t)},st="style[".concat(c,"][").concat(d,'="').concat(h,'"]'),lt=new RegExp("^".concat(c,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ct=function(t,e,n){for(var o,i=n.split(","),r=0,a=i.length;r<a;r++)(o=i[r])&&t.registerName(e,o)},ut=function(t,e){for(var n,o=(null!==(n=e.textContent)&&void 0!==n?n:"").split(p),i=[],r=0,a=o.length;r<a;r++){var s=o[r].trim();if(s){var l=s.match(lt);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(at(u,c),ct(t,u,l[3]),t.getTag().insertRules(c,i)),i.length=0}else i.push(s)}}};function dt(){return n.nc}var ht=function(t){var e=document.head,n=t||e,o=document.createElement("style"),i=function(t){var e=Array.from(t.querySelectorAll("style[".concat(c,"]")));return e[e.length-1]}(n),r=void 0!==i?i.nextSibling:null;o.setAttribute(c,u),o.setAttribute(d,h);var a=dt();return a&&o.setAttribute("nonce",a),n.insertBefore(o,r),o},pt=function(){function t(t){this.element=ht(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var e=document.styleSheets,n=0,o=e.length;n<o;n++){var i=e[n];if(i.ownerNode===t)return i}throw tt(17)}(this.element),this.length=0}return t.prototype.insertRule=function(t,e){try{return this.sheet.insertRule(e,t),this.length++,!0}catch(t){return!1}},t.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},t.prototype.getRule=function(t){var e=this.sheet.cssRules[t];return e&&e.cssText?e.cssText:""},t}(),ft=function(){function t(t){this.element=ht(t),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(t,e){if(t<=this.length&&t>=0){var n=document.createTextNode(e);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},t.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},t}(),mt=function(){function t(t){this.rules=[],this.length=0}return t.prototype.insertRule=function(t,e){return t<=this.length&&(this.rules.splice(t,0,e),this.length++,!0)},t.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},t.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},t}(),gt=f,vt={isServer:!f,useCSSOMInjection:!m},At=function(){function t(t,e,n){void 0===t&&(t=v),void 0===e&&(e={});var i=this;this.options=Object(o.a)(Object(o.a)({},vt),t),this.gs=e,this.names=new Map(n),this.server=!!t.isServer,!this.server&&f&&gt&&(gt=!1,function(t){for(var e=document.querySelectorAll(st),n=0,o=e.length;n<o;n++){var i=e[n];i&&i.getAttribute(c)!==u&&(ut(t,i),i.parentNode&&i.parentNode.removeChild(i))}}(this)),J(this,(function(){return function(t){for(var e=t.getTag(),n=e.length,o="",i=function(n){var i=function(t){return ot.get(t)}(n);if(void 0===i)return"continue";var r=t.names.get(i),a=e.getGroup(n);if(void 0===r||0===a.length)return"continue";var s="".concat(c,".g").concat(n,'[id="').concat(i,'"]'),l="";void 0!==r&&r.forEach((function(t){t.length>0&&(l+="".concat(t,","))})),o+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(p)},r=0;r<n;r++)i(r);return o}(i)}))}return t.registerId=function(t){return rt(t)},t.prototype.reconstructWithOptions=function(e,n){return void 0===n&&(n=!0),new t(Object(o.a)(Object(o.a)({},this.options),e),this.gs,n&&this.names||void 0)},t.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(t=function(t){var e=t.useCSSOMInjection,n=t.target;return t.isServer?new mt(n):e?new pt(n):new ft(n)}(this.options),new et(t)));var t},t.prototype.hasNameForId=function(t,e){return this.names.has(t)&&this.names.get(t).has(e)},t.prototype.registerName=function(t,e){if(rt(t),this.names.has(t))this.names.get(t).add(e);else{var n=new Set;n.add(e),this.names.set(t,n)}},t.prototype.insertRules=function(t,e,n){this.registerName(t,e),this.getTag().insertRules(rt(t),n)},t.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},t.prototype.clearRules=function(t){this.getTag().clearGroup(rt(t)),this.clearNames(t)},t.prototype.clearTag=function(){this.tag=void 0},t}(),bt=/&/g,yt=/^\s*\/\/.*$/gm;function St(t,e){return t.map((function(t){return"rule"===t.type&&(t.value="".concat(e," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(e," ")),t.props=t.props.map((function(t){return"".concat(e," ").concat(t)}))),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=St(t.children,e)),t}))}function Ct(t){var e,n,o,i=void 0===t?v:t,r=i.options,a=void 0===r?v:r,l=i.plugins,c=void 0===l?g:l,u=function(t,o,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,"").length>0?".".concat(e):t},d=c.slice();d.push((function(t){t.type===s.a&&t.value.includes("&")&&(t.props[0]=t.props[0].replace(bt,n).replace(o,u))})),a.prefix&&d.push(s.d),d.push(s.g);var h=function(t,i,r,l){void 0===i&&(i=""),void 0===r&&(r=""),void 0===l&&(l="&"),e=l,n=i,o=new RegExp("\\".concat(n,"\\b"),"g");var c=t.replace(yt,""),u=s.b(r||i?"".concat(r," ").concat(i," { ").concat(c," }"):c);a.namespace&&(u=St(u,a.namespace));var h=[];return s.f(u,s.c(d.concat(s.e((function(t){return h.push(t)}))))),h};return h.hash=c.length?c.reduce((function(t,e){return e.name||tt(15),_(t,e.name)}),5381).toString():"",h}var wt=new At,xt=Ct(),Et=i.default.createContext({shouldForwardProp:void 0,styleSheet:wt,stylis:xt}),Lt=(Et.Consumer,i.default.createContext(void 0));function _t(){return Object(i.useContext)(Et)}function Ot(t){var e=Object(i.useState)(t.stylisPlugins),n=e[0],o=e[1],r=_t().styleSheet,s=Object(i.useMemo)((function(){var e=r;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target,r]),l=Object(i.useMemo)((function(){return Ct({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:n})}),[t.enableVendorPrefixes,t.namespace,n]);Object(i.useEffect)((function(){a()(n,t.stylisPlugins)||o(t.stylisPlugins)}),[t.stylisPlugins]);var c=Object(i.useMemo)((function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:s,stylis:l}}),[t.shouldForwardProp,s,l]);return i.default.createElement(Et.Provider,{value:c},i.default.createElement(Lt.Provider,{value:l},t.children))}var kt=function(){function t(t,e){var n=this;this.inject=function(t,e){void 0===e&&(e=xt);var o=n.name+e.hash;t.hasNameForId(n.id,o)||t.insertRules(n.id,o,e(n.rules,o,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=e,J(this,(function(){throw tt(12,String(n.name))}))}return t.prototype.getName=function(t){return void 0===t&&(t=xt),this.name+t.hash},t}(),Tt=function(t){return t>="A"&&t<="Z"};function Pt(t){for(var e="",n=0;n<t.length;n++){var o=t[n];if(1===n&&"-"===o&&"-"===t[0])return t;Tt(o)?e+="-"+o.toLowerCase():e+=o}return e.startsWith("ms-")?"-"+e:e}var Wt=function(t){return null==t||!1===t||""===t},Bt=function(t){var e,n,i=[];for(var r in t){var a=t[r];t.hasOwnProperty(r)&&!Wt(a)&&(Array.isArray(a)&&a.isCss||X(a)?i.push("".concat(Pt(r),":"),a,";"):q(a)?i.push.apply(i,Object(o.e)(Object(o.e)(["".concat(r," {")],Bt(a),!1),["}"],!1)):i.push("".concat(Pt(r),": ").concat((e=r,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||e in l.a||e.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return i};function Dt(t,e,n,o){return Wt(t)?[]:Q(t)?[".".concat(t.styledComponentId)]:X(t)?!X(i=t)||i.prototype&&i.prototype.isReactComponent||!e?[t]:Dt(t(e),e,n,o):t instanceof kt?n?(t.inject(n,o),[t.getName(o)]):[t]:q(t)?Bt(t):Array.isArray(t)?Array.prototype.concat.apply(g,t.map((function(t){return Dt(t,e,n,o)}))):[t.toString()];var i}function It(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(X(n)&&!Q(n))return!1}return!0}var Rt=O(h),Mt=function(){function t(t,e,n){this.rules=t,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&It(t),this.componentId=e,this.baseHash=_(Rt,e),this.baseStyle=n,At.registerId(e)}return t.prototype.generateAndInjectStyles=function(t,e,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,e,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&e.hasNameForId(this.componentId,this.staticRulesId))o=Z(o,this.staticRulesId);else{var i=$(Dt(this.rules,t,e,n)),r=E(_(this.baseHash,i)>>>0);if(!e.hasNameForId(this.componentId,r)){var a=n(i,".".concat(r),void 0,this.componentId);e.insertRules(this.componentId,r,a)}o=Z(o,r),this.staticRulesId=r}else{for(var s=_(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=$(Dt(u,t,e,n));s=_(s,d+c),l+=d}}if(l){var h=E(s>>>0);e.hasNameForId(this.componentId,h)||e.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),o=Z(o,h)}}return o},t}(),Ft=i.default.createContext(void 0);Ft.Consumer;var jt={};new Set;function Vt(t,e,n){var r=Q(t),a=t,s=!P(t),l=e.attrs,c=void 0===l?g:l,u=e.componentId,d=void 0===u?function(t,e){var n="string"!=typeof t?"sc":C(t);jt[n]=(jt[n]||0)+1;var o="".concat(n,"-").concat(k(h+n+jt[n]));return e?"".concat(e,"-").concat(o):o}(e.displayName,e.parentComponentId):u,p=e.displayName,f=void 0===p?function(t){return P(t)?"styled.".concat(t):"Styled(".concat(T(t),")")}(t):p,m=e.displayName&&e.componentId?"".concat(C(e.displayName),"-").concat(e.componentId):e.componentId||d,y=r&&a.attrs?a.attrs.concat(c).filter(Boolean):c,S=e.shouldForwardProp;if(r&&a.shouldForwardProp){var w=a.shouldForwardProp;if(e.shouldForwardProp){var x=e.shouldForwardProp;S=function(t,e){return w(t,e)&&x(t,e)}}else S=w}var E=new Mt(n,m,r?a.componentStyle:void 0);function L(t,e){return function(t,e,n){var r=t.attrs,a=t.componentStyle,s=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,u=t.target,d=i.default.useContext(Ft),h=_t(),p=t.shouldForwardProp||h.shouldForwardProp,f=A(e,d,s)||v,m=function(t,e,n){for(var i,r=Object(o.a)(Object(o.a)({},e),{className:void 0,theme:n}),a=0;a<t.length;a+=1){var s=X(i=t[a])?i(r):i;for(var l in s)r[l]="className"===l?Z(r[l],s[l]):"style"===l?Object(o.a)(Object(o.a)({},r[l]),s[l]):s[l]}return e.className&&(r.className=Z(r.className,e.className)),r}(r,e,f),g=m.as||u,y={};for(var S in m)void 0===m[S]||"$"===S[0]||"as"===S||"theme"===S&&m.theme===f||("forwardedAs"===S?y.as=m.forwardedAs:p&&!p(S,g)||(y[S]=m[S]));var C=function(t,e){var n=_t();return t.generateAndInjectStyles(e,n.styleSheet,n.stylis)}(a,m),w=Z(l,c);return C&&(w+=" "+C),m.className&&(w+=" "+m.className),y[P(g)&&!b.has(g)?"class":"className"]=w,y.ref=n,Object(i.createElement)(g,y)}(_,t,e)}L.displayName=f;var _=i.default.forwardRef(L);return _.attrs=y,_.componentStyle=E,_.displayName=f,_.shouldForwardProp=S,_.foldedComponentIds=r?Z(a.foldedComponentIds,a.styledComponentId):"",_.styledComponentId=m,_.target=r?a.target:t,Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var o=0,i=e;o<i.length;o++)K(t,i[o],!0);return t}({},a.defaultProps,t):t}}),J(_,(function(){return".".concat(_.styledComponentId)})),s&&Y(_,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),_}function zt(t,e){for(var n=[t[0]],o=0,i=e.length;o<i;o+=1)n.push(e[o],t[o+1]);return n}var Nt=function(t){return Object.assign(t,{isCss:!0})};function Ut(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(X(t)||q(t))return Nt(Dt(zt(g,Object(o.e)([t],e,!0))));var i=t;return 0===e.length&&1===i.length&&"string"==typeof i[0]?Dt(i):Nt(Dt(zt(i,e)))}function Ht(t,e,n){if(void 0===n&&(n=v),!e)throw tt(1,e);var i=function(i){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return t(e,n,Ut.apply(void 0,Object(o.e)([i],r,!1)))};return i.attrs=function(i){return Ht(t,e,Object(o.a)(Object(o.a)({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},i.withConfig=function(i){return Ht(t,e,Object(o.a)(Object(o.a)({},n),i))},i}var Gt=function(t){return Ht(Vt,t)},Yt=Gt;b.forEach((function(t){Yt[t]=Gt(t)}));!function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=It(t),At.registerId(this.componentId+1)}t.prototype.createStyles=function(t,e,n,o){var i=o($(Dt(this.rules,e,n,o)),""),r=this.componentId+t;n.insertRules(r,r,i)},t.prototype.removeStyles=function(t,e){e.clearRules(this.componentId+t)},t.prototype.renderStyles=function(t,e,n,o){t>2&&At.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,e,n,o)}}();function Xt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=$(Ut.apply(void 0,Object(o.e)([t],e,!1))),r=k(i);return new kt(r,i)}(function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=dt(),o=$([n&&'nonce="'.concat(n,'"'),"".concat(c,'="true"'),"".concat(d,'="').concat(h,'"')].filter(Boolean)," ");return"<style ".concat(o,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw tt(2);return t._emitSheetCSS()},this.getStyleElement=function(){var e;if(t.sealed)throw tt(2);var n=((e={})[c]="",e[d]=h,e.dangerouslySetInnerHTML={__html:t.instance.toString()},e),r=dt();return r&&(n.nonce=r),[i.default.createElement("style",Object(o.a)({},n,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new At({isServer:!0}),this.sealed=!1}t.prototype.collectStyles=function(t){if(this.sealed)throw tt(2);return i.default.createElement(Ot,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(t){throw tt(3)}})(),"__sc-".concat(c,"__")}).call(this,n(14))},function(t,e,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var r=typeof o;if("string"===r||"number"===r)t.push(o);else if(Array.isArray(o)){if(o.length){var a=i.apply(null,o);a&&t.push(a)}}else if("object"===r)if(o.toString===Object.prototype.toString)for(var s in o)n.call(o,s)&&o[s]&&t.push(s);else t.push(o.toString())}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(o=function(){return i}.apply(e,[]))||(t.exports=o)}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return Y})),n.d(e,"c",(function(){return tt})),n.d(e,"d",(function(){return nt})),n.d(e,"e",(function(){return et})),n.d(e,"f",(function(){return K})),n.d(e,"g",(function(){return J}));var o="-ms-",i="-moz-",r="-webkit-",a="comm",s="rule",l="decl",c="@keyframes",u=Math.abs,d=String.fromCharCode,h=Object.assign;function p(t){return t.trim()}function f(t,e){return(t=e.exec(t))?t[0]:t}function m(t,e,n){return t.replace(e,n)}function g(t,e,n){return t.indexOf(e,n)}function v(t,e){return 0|t.charCodeAt(e)}function A(t,e,n){return t.slice(e,n)}function b(t){return t.length}function y(t){return t.length}function S(t,e){return e.push(t),t}function C(t,e){return t.map(e).join("")}function w(t,e){return t.filter((function(t){return!f(t,e)}))}var x=1,E=1,L=0,_=0,O=0,k="";function T(t,e,n,o,i,r,a,s){return{value:t,root:e,parent:n,type:o,props:i,children:r,line:x,column:E,length:a,return:"",siblings:s}}function P(t,e){return h(T("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function W(t){for(;t.root;)t=P(t.root,{children:[t]});S(t,t.siblings)}function B(){return O=_<L?v(k,_++):0,E++,10===O&&(E=1,x++),O}function D(){return v(k,_)}function I(){return _}function R(t,e){return A(k,t,e)}function M(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function F(t){return x=E=1,L=b(k=t),_=0,[]}function j(t){return k="",t}function V(t){return p(R(_-1,U(91===t?t+2:40===t?t+1:t)))}function z(t){for(;(O=D())&&O<33;)B();return M(t)>2||M(O)>3?"":" "}function N(t,e){for(;--e&&B()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return R(t,I()+(e<6&&32==D()&&32==B()))}function U(t){for(;B();)switch(O){case t:return _;case 34:case 39:34!==t&&39!==t&&U(O);break;case 40:41===t&&U(t);break;case 92:B()}return _}function H(t,e){for(;B()&&t+O!==57&&(t+O!==84||47!==D()););return"/*"+R(e,_-1)+"*"+d(47===t?t:B())}function G(t){for(;!M(D());)B();return R(t,_)}function Y(t){return j(X("",null,null,null,[""],t=F(t),0,[0],t))}function X(t,e,n,o,i,r,a,s,l){for(var c=0,h=0,p=a,f=0,A=0,y=0,C=1,w=1,L=1,T=0,P="",W=i,R=r,M=o,F=P;w;)switch(y=T,T=B()){case 40:if(108!=y&&58==v(F,p-1)){-1!=g(F+=m(V(T),"&","&\f"),"&\f",u(c?s[c-1]:0))&&(L=-1);break}case 34:case 39:case 91:F+=V(T);break;case 9:case 10:case 13:case 32:F+=z(y);break;case 92:F+=N(I()-1,7);continue;case 47:switch(D()){case 42:case 47:S(Z(H(B(),I()),e,n,l),l);break;default:F+="/"}break;case 123*C:s[c++]=b(F)*L;case 125*C:case 59:case 0:switch(T){case 0:case 125:w=0;case 59+h:-1==L&&(F=m(F,/\f/g,"")),A>0&&b(F)-p&&S(A>32?$(F+";",o,n,p-1,l):$(m(F," ","")+";",o,n,p-2,l),l);break;case 59:F+=";";default:if(S(M=Q(F,e,n,c,h,i,s,P,W=[],R=[],p,r),r),123===T)if(0===h)X(F,e,M,M,W,r,p,s,R);else switch(99===f&&110===v(F,3)?100:f){case 100:case 108:case 109:case 115:X(t,M,M,o&&S(Q(t,M,M,0,0,i,s,P,i,W=[],p,R),R),i,R,p,s,o?W:R);break;default:X(F,M,M,M,[""],R,0,s,R)}}c=h=A=0,C=L=1,P=F="",p=a;break;case 58:p=1+b(F),A=y;default:if(C<1)if(123==T)--C;else if(125==T&&0==C++&&125==(O=_>0?v(k,--_):0,E--,10===O&&(E=1,x--),O))continue;switch(F+=d(T),T*C){case 38:L=h>0?1:(F+="\f",-1);break;case 44:s[c++]=(b(F)-1)*L,L=1;break;case 64:45===D()&&(F+=V(B())),f=D(),h=p=b(P=F+=G(I())),T++;break;case 45:45===y&&2==b(F)&&(C=0)}}return r}function Q(t,e,n,o,i,r,a,l,c,d,h,f){for(var g=i-1,v=0===i?r:[""],b=y(v),S=0,C=0,w=0;S<o;++S)for(var x=0,E=A(t,g+1,g=u(C=a[S])),L=t;x<b;++x)(L=p(C>0?v[x]+" "+E:m(E,/&\f/g,v[x])))&&(c[w++]=L);return T(t,e,n,0===i?s:l,c,d,h,f)}function Z(t,e,n,o){return T(t,e,n,a,d(O),A(t,2,-2),0,o)}function $(t,e,n,o,i){return T(t,e,n,l,A(t,0,o),A(t,o+1,-1),o,i)}function q(t,e,n){switch(function(t,e){return 45^v(t,0)?(((e<<2^v(t,0))<<2^v(t,1))<<2^v(t,2))<<2^v(t,3):0}(t,e)){case 5103:return r+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return r+t+t;case 4789:return i+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return r+t+i+t+o+t+t;case 5936:switch(v(t,e+11)){case 114:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return r+t+o+t+t;case 6165:return r+t+o+"flex-"+t+t;case 5187:return r+t+m(t,/(\w+).+(:[^]+)/,r+"box-$1$2"+o+"flex-$1$2")+t;case 5443:return r+t+o+"flex-item-"+m(t,/flex-|-self/g,"")+(f(t,/flex-|baseline/)?"":o+"grid-row-"+m(t,/flex-|-self/g,""))+t;case 4675:return r+t+o+"flex-line-pack"+m(t,/align-content|flex-|-self/g,"")+t;case 5548:return r+t+o+m(t,"shrink","negative")+t;case 5292:return r+t+o+m(t,"basis","preferred-size")+t;case 6060:return r+"box-"+m(t,"-grow","")+r+t+o+m(t,"grow","positive")+t;case 4554:return r+m(t,/([^-])(transform)/g,"$1"+r+"$2")+t;case 6187:return m(m(m(t,/(zoom-|grab)/,r+"$1"),/(image-set)/,r+"$1"),t,"")+t;case 5495:case 3959:return m(t,/(image-set\([^]*)/,r+"$1$`$1");case 4968:return m(m(t,/(.+:)(flex-)?(.*)/,r+"box-pack:$3"+o+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+r+t+t;case 4200:if(!f(t,/flex-|baseline/))return o+"grid-column-align"+A(t,e)+t;break;case 2592:case 3360:return o+m(t,"template-","")+t;case 4384:case 3616:return n&&n.some((function(t,n){return e=n,f(t.props,/grid-\w+-end/)}))?~g(t+(n=n[e].value),"span",0)?t:o+m(t,"-start","")+t+o+"grid-row-span:"+(~g(n,"span",0)?f(n,/\d+/):+f(n,/\d+/)-+f(t,/\d+/))+";":o+m(t,"-start","")+t;case 4896:case 4128:return n&&n.some((function(t){return f(t.props,/grid-\w+-start/)}))?t:o+m(m(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return m(t,/(.+)-inline(.+)/,r+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(b(t)-1-e>6)switch(v(t,e+1)){case 109:if(45!==v(t,e+4))break;case 102:return m(t,/(.+:)(.+)-([^]+)/,"$1"+r+"$2-$3$1"+i+(108==v(t,e+3)?"$3":"$2-$3"))+t;case 115:return~g(t,"stretch",0)?q(m(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return m(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(e,n,i,r,a,s,l){return o+n+":"+i+l+(r?o+n+"-span:"+(a?s:+s-+i)+l:"")+t}));case 4949:if(121===v(t,e+6))return m(t,":",":"+r)+t;break;case 6444:switch(v(t,45===v(t,14)?18:11)){case 120:return m(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+r+(45===v(t,14)?"inline-":"")+"box$3$1"+r+"$2$3$1"+o+"$2box$3")+t;case 100:return m(t,":",":"+o)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return m(t,"scroll-","scroll-snap-")+t}return t}function K(t,e){for(var n="",o=0;o<t.length;o++)n+=e(t[o],o,t,e)||"";return n}function J(t,e,n,o){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case l:return t.return=t.return||t.value;case a:return"";case c:return t.return=t.value+"{"+K(t.children,o)+"}";case s:if(!b(t.value=t.props.join(",")))return""}return b(n=K(t.children,o))?t.return=t.value+"{"+n+"}":""}function tt(t){var e=y(t);return function(n,o,i,r){for(var a="",s=0;s<e;s++)a+=t[s](n,o,i,r)||"";return a}}function et(t){return function(e){e.root||(e=e.return)&&t(e)}}function nt(t,e,n,i){if(t.length>-1&&!t.return)switch(t.type){case l:return void(t.return=q(t.value,t.length,n));case c:return K([P(t,{value:m(t.value,"@","@"+r)})],i);case s:if(t.length)return C(n=t.props,(function(e){switch(f(e,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":W(P(t,{props:[m(e,/:(read-\w+)/,":-moz-$1")]})),W(P(t,{props:[e]})),h(t,{props:w(n,i)});break;case"::placeholder":W(P(t,{props:[m(e,/:(plac\w+)/,":"+r+"input-$1")]})),W(P(t,{props:[m(e,/:(plac\w+)/,":-moz-$1")]})),W(P(t,{props:[m(e,/:(plac\w+)/,o+"input-$1")]})),W(P(t,{props:[e]})),h(t,{props:w(n,i)})}return""}))}}},,function(t,e,n){"use strict";var o,i=function(){return"undefined"==typeof o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var t={};return function(e){if("undefined"==typeof t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n<a.length;n++)if(a[n].identifier===t){e=n;break}return e}function l(t,e){for(var n={},o=[],i=0;i<t.length;i++){var r=t[i],l=e.base?r[0]+e.base:r[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=s(u),h={css:r[1],media:r[2],sourceMap:r[3]};-1!==d?(a[d].references++,a[d].updater(h)):a.push({identifier:u,updater:g(h,e),references:1}),o.push(u)}return o}function c(t){var e=document.createElement("style"),o=t.attributes||{};if("undefined"==typeof o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var u,d=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function h(t,e,n,o){var i=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=d(e,i);else{var r=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function p(t,e,n){var o=n.css,i=n.media,r=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var f=null,m=0;function g(t,e){var n,o,i;if(e.singleton){var r=m++;n=f||(f=c(e)),o=h.bind(null,n,r,!1),i=h.bind(null,n,r,!0)}else n=c(e),o=p.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<n.length;o++){var i=s(n[o]);a[i].references--}for(var r=l(t,e),c=0;c<n.length;c++){var u=s(n[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=r}}}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(o)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);o&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},function(t,e,n){"use strict";(function(t){function n(){if("undefined"!=typeof t&&"undefined"!=typeof t.versions&&"undefined"!=typeof t.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(t){return!1}}Object.defineProperty(e,"__esModule",{value:!0}),e.gatherTransferables=function(t,e){const n=[];return function t(o){if(!o)return;if(o.constructor===ImageData){const t={data:o.data.slice(),width:o.width,height:o.height};return n.push(t.data.buffer),t}if(o.constructor===ArrayBuffer){const t=e?o.slice(0):o;if(n.push(t),e)return o}else if(ArrayBuffer.isView(o)){let t;if(e){t=new(0,o.constructor)(o.buffer.slice(0))}else t=o;if(n.push(t.buffer),e)return o}else if(Array.isArray(o))for(let e=0;e<o.length;++e){const n=t(o[e]);n&&(o[e]=n)}else if(o.constructor===Object)for(const e in o)if(o.hasOwnProperty(e)){const n=t(o[e]);n&&(o[e]=n)}}(t),n},e.isRemote=function(t){return t.startsWith("http:")||t.startsWith("https:")},e.areThreadsAvailable=n,e.getBuildType=function(t){const{allowSimd:e=!0,allowThreads:o=!0}=t||{};let i="";if(e&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(t){return!1}}()){i+="-simd";o&&n()&&(i+="-threads")}return i}}).call(this,n(14))},function(t,e,n){"use strict";var o=n(10),i=n.n(o)()((function(t){return t[1]}));i.push([t.i,"\n.scanbot-shutter-fade-in {\n opacity: 1;\n}\n\n.scanbot-shutter-fade-out {\n opacity: 0;\n}\n\n.scanbot-shutter-rotate {\n animation: scanbot-shutter-rotating linear infinite;\n}\n\n.scanbot-shutter-pulse-fast {\n animation: scanbot-shutter-pulsing 1s ease-in-out infinite;\n}\n\n.scanbot-shutter-button {\n position: relative;\n width: 64px;\n height: 64px;\n left: 50%;\n bottom: 12px;\n transform: translate(-50%, -100%);\n}\n\n.scanbot-shutter-button-part {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n transition: opacity 0.5s ease-in-out;\n}\n\n@keyframes scanbot-shutter-rotating {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes scanbot-shutter-pulsing {\n 0% {\n opacity: 0.25;\n }\n 50% {\n opacity: 0.8;\n }\n 100% {\n opacity: 0.25;\n }\n}\n",""]),e.a=i},function(t,e,n){"use strict";var o=n(10),i=n.n(o)()((function(t){return t[1]}));i.push([t.i,".scanbot-document-hint-text {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n border-radius: 0.25em;\n padding: 0.05em 0.3em 0.05em 0.3em;\n font-family: sans-serif;\n font-size: 0.9em;\n font-weight: 300;\n}\n",""]),e.a=i},function(t,e){var n,o,i=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(t){n=r}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var t=s(h);u=!0;for(var e=c.length;e;){for(l=c,c=[];++d<e;)l&&l[d].run();d=-1,e=c.length}l=null,u=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBridge=void 0;var o=n(11);e.WorkerBridge=class{constructor(t,e){const{requestSuffix:n=""}=e||{},i=(0,o.getBuildType)(e),r=`${t}${t.endsWith("/")?"":"/"}ScanbotSDK.Core${i}.js${n}`;if((0,o.isRemote)(r)){const t=new Blob([`importScripts("${r}")`]);this.instance=new Worker(URL.createObjectURL(t))}else this.instance=new Worker(r);this.continuations={},this.nextTicketId=1,this.instance.onmessage=t=>{const{log:e,logError:n}=t.data;if(e)return void console.log(...e);if(n)return void console.error(...n);const{ticket:o,result:i,error:r}=t.data,{resolve:a,reject:s}=this.continuations[o];delete this.continuations[o],r?s(r):a(i)}}post(t,e,n){return new Promise(((i,r)=>{const a=(0,o.gatherTransferables)(e,n),s=this.nextTicketId++;this.continuations[s]={resolve:i,reject:r},this.instance.postMessage({command:t,args:e,ticket:s},a)}))}postByCopyingArgs(t,e){return this.post(t,e,!0)}postByTransferringArgs(t,e){return this.post(t,e,!1)}destroy(){this.instance.terminate()}}},function(t,e,n){const{render:o,hydrate:i,unmountComponentAtNode:r}=n(0);function a(t){return{render(e){o(e,t)},unmount(){r(t)}}}e.createRoot=a,e.hydrateRoot=function(t,e){return i(e,t),a(t)}},function(t,e){t.exports=function(t,e,n,o){var i=n?n.call(o,t,e):void 0;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<r.length;l++){var c=r[l];if(!s(c))return!1;var u=t[c],d=e[c];if(!1===(i=n?n.call(o,u,d,c):void 0)||void 0===i&&u!==d)return!1}return!0}},function(t,e,n){"use strict";e.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(t,e,n){"use strict";function o(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}n.d(e,"a",(function(){return r}));var i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=o((function(t){return i.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}))},function(t,e,n){"use strict";n.r(e),n.d(e,"ScanbotSDK",(function(){return Ld}));var o={};n.r(o),n.d(o,"SingleScanningMode",(function(){return St})),n.d(o,"Resolution",(function(){return Ct})),n.d(o,"CameraConfiguration",(function(){return wt})),n.d(o,"TopBarConfiguration",(function(){return xt})),n.d(o,"ActionBarConfiguration",(function(){return Et})),n.d(o,"BarcodeUseCase",(function(){return X})),n.d(o,"Palette",(function(){return K})),n.d(o,"StyledText",(function(){return J})),n.d(o,"IconStyle",(function(){return tt})),n.d(o,"PolygonStyle",(function(){return et})),n.d(o,"BackgroundStyle",(function(){return nt})),n.d(o,"ForegroundStyle",(function(){return ot})),n.d(o,"AspectRatio",(function(){return it})),n.d(o,"RoundButton",(function(){return rt})),n.d(o,"BadgedButton",(function(){return at})),n.d(o,"ButtonConfiguration",(function(){return st})),n.d(o,"Sound",(function(){return lt})),n.d(o,"Vibration",(function(){return ct})),n.d(o,"Timeouts",(function(){return ut})),n.d(o,"ViewFinderConfiguration",(function(){return Pt})),n.d(o,"FinderStyle",(function(){return Q})),n.d(o,"FinderCorneredStyle",(function(){return Wt})),n.d(o,"FinderStrokedStyle",(function(){return Bt})),n.d(o,"UserGuidanceConfiguration",(function(){return Dt})),n.d(o,"BarcodeItemErrorState",(function(){return At})),n.d(o,"BarcodeMappedData",(function(){return bt})),n.d(o,"BarcodeInfoMapping",(function(){return yt})),n.d(o,"ExpectedBarcode",(function(){return It})),n.d(o,"BarcodeTextLocalization",(function(){return Rt})),n.d(o,"BarcodeRecognizerConfiguration",(function(){return Mt})),n.d(o,"ArOverlayPolygonConfiguration",(function(){return dt})),n.d(o,"BarcodeItemConfiguration",(function(){return ht})),n.d(o,"BadgeStyle",(function(){return pt})),n.d(o,"ArOverlayGeneralConfiguration",(function(){return ft})),n.d(o,"FindAndPickArOverlayPolygonConfiguration",(function(){return mt})),n.d(o,"FindAndPickBadgeConfiguration",(function(){return gt})),n.d(o,"ArOverlayFindAndPickConfiguration",(function(){return vt})),n.d(o,"BarcodeScannerConfiguration",(function(){return jt})),n.d(o,"BarcodeItem",(function(){return Vt})),n.d(o,"BarcodeScannerResult",(function(){return zt})),n.d(o,"Sheet",(function(){return Lt})),n.d(o,"SwipeToDelete",(function(){return _t})),n.d(o,"ManualCountEditDialog",(function(){return Ot})),n.d(o,"SheetContent",(function(){return kt})),n.d(o,"MultipleScanningMode",(function(){return Tt})),n.d(o,"ScanbotAlertDialog",(function(){return Nt})),n.d(o,"CameraPermissionScreen",(function(){return Ft}));var i={};n.r(i),n.d(i,"ParametricFilter",(function(){return Qt})),n.d(i,"ScanbotBinarizationFilter",(function(){return Kt})),n.d(i,"CustomBinarizationFilter",(function(){return Jt})),n.d(i,"ColorDocumentFilter",(function(){return te})),n.d(i,"BrightnessFilter",(function(){return ee})),n.d(i,"ContrastFilter",(function(){return ne})),n.d(i,"GrayscaleFilter",(function(){return oe})),n.d(i,"LegacyFilter",(function(){return ie})),n.d(i,"WhiteBlackPointFilter",(function(){return re}));var r="5.1.3-dev.2";class a{}a.VERSION=r,a.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@5.1.3-dev.2/bundle/",a.DEFAULT_WASM_FOLDER="bin/complete/",a.BUILD_WITH_UI=!1;var s=n(15),l=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class c{constructor(t,e,n){t||(t=a.CDN_PATH+a.DEFAULT_WASM_FOLDER),this.core=new s.WorkerBridge(t,e),this.coreInitializationSuccessful=this.core.postByCopyingArgs("initialize",n)}awaitInitialized(){return l(this,void 0,void 0,(function*(){yield this.getCoreForCommand()}))}postByCopyingArgs(t,e){return l(this,void 0,void 0,(function*(){return(yield this.getCoreForCommand(t)).postByCopyingArgs(t,e)}))}postByTransferringArgs(t,e){return l(this,void 0,void 0,(function*(){return(yield this.getCoreForCommand(t)).postByTransferringArgs(t,e)}))}getCoreForCommand(t=""){return l(this,void 0,void 0,(function*(){const e=yield this.coreInitializationSuccessful;if("getLicenseInfo"===t||e)return this.core;throw new Error("WASM not initialized successfully. This can be due to an invalid license or problems loading the WASM file. Please check the console for more information.")}))}destroy(){this.core.destroy(),this.core=void 0}}c.ASM_JS="ScanbotSDK.Core.js";var u=n(11);class d{constructor(){this.container=void 0,this.containerId=void 0}static mapValues(t,e,n){Object.keys(t).forEach((o=>{(null==n?void 0:n.includes(o))||(e[o]=t[o])}))}static mapValuesDeep(t,e){const n=t=>t&&"object"==typeof t&&!Array.isArray(t);Object.keys(t).forEach((o=>{o in e&&n(t[o])&&n(e[o])?d.mapValuesDeep(t[o],e[o]):e[o]=t[o]}))}static _fromJson(t,e){return this.mapValuesDeep(e,t),t}}class h extends d{constructor(t){super(),this.mirrored=!1,this.spinnerColor="black",this.backgroundColor="black",this.videoConstraints={width:{ideal:t.width},height:{ideal:t.height},facingMode:"environment",resizeMode:"none",experimental:{focusMode:"continous",focusDistance:0}}}static mapVideoConstraints(t,e){t.videoConstraints&&this.mapValues(t.videoConstraints,e.videoConstraints)}}h.DEFAULT_VIDEO_RESOLUTION_4K={width:3840,height:2160},h.DEFAULT_VIDEO_RESOLUTION_HD={width:1920,height:1080},h.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE=0,h.DEFAULT_ACCEPTED_ANGLE_SCORE=75,h.DEFAULT_ACCEPTED_SIZE_SCORE=75;const p={OK:"Capturing your document... Please do not move the camera.",OK_SmallSize:"The document is too small. Try moving closer.",OK_BadAngles:"This is a bad camera angle. Hold the device straight over the document.",OK_BadAspectRatio:"Rotate the device sideways, so that the document fits better into the screen.",OK_OffCenter:"Try holding the device at the center of the document.",Error_NothingDetected:"Please hold the device over a document to start scanning.",Error_Brightness:"It is too dark. Try turning on a light.",Error_Noise:"Please move the document to a clear surface."};class f{constructor(t){this.hint=t}}class m{constructor(){this.outline=new g,this.captureButton=new y}}class g{constructor(){this.polygon=new v,this.path=new A,this.label=new b}}class v{constructor(){this.strokeCapturing="green",this.strokeSearching="yellow",this.fillCapturing="transparent",this.fillSearching="transparent"}}class A{constructor(){this.stroke="green",this.strokeWidth=4}}class b{}class y{constructor(){this.color="#FFF"}}class S extends h{constructor(){super(h.DEFAULT_VIDEO_RESOLUTION_4K),this.acceptedBrightnessThreshold=S.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE,this.acceptedAngleScore=S.DEFAULT_ACCEPTED_ANGLE_SCORE,this.acceptedSizeScore=S.DEFAULT_ACCEPTED_SIZE_SCORE,this.autoCaptureEnabled=!0,this.autoCaptureSensitivity=.66,this.autoCaptureDelay=1e3,this.ignoreBadAspectRatio=!0,this.useImageCaptureAPI=!1,this.text=new f(p),this.style=new m,this.onDocumentDetected=function(t){}}static fromJson(t){const e=new S;if(this.mapValues(t,e,["text","style","videoConstraints"]),t.text&&t.text.hint&&this.mapValues(t.text.hint,e.text.hint),t.style){this.mapValues(t.style,e.style,["outline","captureButton"]);const n=t.style.outline;if(n){this.mapValues(n,e.style.outline,["polygon","path","label"]);const t=n.polygon;t&&this.mapValues(t,e.style.outline.polygon);const o=n.path;o&&this.mapValues(o,e.style.outline.path);const i=n.label;i&&this.mapValues(i,e.style.outline.label)}const o=t.style.captureButton;o&&this.mapValues(o,e.style.captureButton)}return this.mapVideoConstraints(t,e),e}}class C{isValid(){return"Okay"===this.status||"Trial"===this.status}static fromJson(t){const e=new C;return e.status=t.licenseStatus,e.description=t.description,e}}var w=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class x{constructor(t,e){this._sdk=t,this._pdfOperation=e}addPage(t){return w(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByCopyingArgs("addPageToPdf",[this._pdfOperation,t])}))}complete(){return w(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("completePdf",[this._pdfOperation])}))}}var E=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};const L=["ROTATION_NONE","ROTATION_90_CLOCKWISE","ROTATION_180","ROTATION_90_COUNTERCLOCKWISE"];class _{constructor(t,e){this._sdk=t,this._token=e}copy(){return E(this,void 0,void 0,(function*(){const t=yield this._sdk.bridge.postByCopyingArgs("imageProcessorCopy",[this._token]);return new _(this._sdk,t)}))}applyFilter(t){return E(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorApplyFilter",[this._token,t])}))}crop(t){return E(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorCrop",[this._token,t])}))}resize(t){return E(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorResize",[this._token,t])}))}rotate(t){return E(this,void 0,void 0,(function*(){if(!L.includes(t))return Promise.reject("Invalid rotation value! It should be one of "+L.join(", "));yield this._sdk.bridge.postByTransferringArgs("imageProcessorRotate",[this._token,t])}))}processedImage(){return E(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("imageProcessorEncodedProcessedImage",[this._token,".jpg"])}))}release(){return E(this,void 0,void 0,(function*(){yield this._sdk.release(this._token,"ImageProcessor"),this._token=null,this._sdk=null}))}get __token(){return this._token}}var O=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class k{constructor(t,e){this._sdk=t,this._tiffOperation=e}addPage(t){return O(this,void 0,void 0,(function*(){let e;e=t instanceof _?t.__token:t,yield this._sdk.bridge.postByCopyingArgs("addPageToTiff",[this._tiffOperation,e])}))}complete(){return O(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("completeTiff",[this._tiffOperation])}))}}class T{constructor(t,e,n,o){this.x=t,this.y=e,this.width=n,this.height=o}scaleDown(t){return new T(this.x/t,this.y/t,this.width/t,this.height/t)}bottom(){return this.y+this.height}static withSize(t,e){return new T(0,0,t,e)}static empty(){return new T(0,0,0,0)}static fromRect(t){return t?new T(t.x,t.y,t.width,t.height):T.empty()}static fromPoint(t,e){return new T(t.x-e/2,t.y-e/2,e,e)}static fromDOMRect(t){return new T(t.x,t.y,t.width,t.height)}}class P{static toPixelSize(t){return t+"px"}static containsString(t,e){return!!t&&-1!==t.indexOf(e)}static copy(t){return JSON.parse(JSON.stringify(t))}static getProperty(t,e){let n;return t&&t.hasOwnProperty(e)&&(n=t[e]),n}static uuid(){let t="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length;for(let o=0;o<5;o++)t+=e.charAt(Math.floor(Math.random()*n));return t}}var W=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class B{static toDataUrl(t){return new Promise(((e,n)=>{const o=new Blob([t],{type:"image/jpeg"}),i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>n(i.error),i.readAsDataURL(o)}))}static getObjectFitSize(t,e,n=!0){const o=e.width/e.height,i=t.width/t.height;let r=0,a=0;(n?o>i:o<i)?(r=t.width,a=r/o):(a=t.height,r=a*o);const s=(t.width-r)/2,l=(t.height-a)/2;return new T(s,l,r,a)}static loadFromUrl(t){return new Promise(((e,n)=>{const o=document.createElement("img");o.src=t,o.onload=()=>W(this,void 0,void 0,(function*(){const t=document.createElement("canvas");t.width=o.width,t.height=o.height;const n=t.getContext("2d");n.drawImage(o,0,0);const i=n.getImageData(0,0,o.width,o.height);e(i)})),o.onerror=n}))}static saveImageData(t){const e=this.createImageDataCanvas(t),n=" ("+t.width+"x"+t.height+")";e.toBlob((t=>this.saveBlob(t,P.uuid()+n+".png")))}static createImageDataCanvas(t){const e=document.createElement("canvas");return e.className="scanbot-sdk-canvas-element",e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t,0,0),e}static saveBlob(t,e){let n=document.createElement("a");n.setAttribute("download",e);let o=URL.createObjectURL(t);n.setAttribute("href",o),n.click()}static convertImageDataWrapperToImageData(t){if(t)return new ImageData(t.data,t.width,t.height)}static wrapperToBase64(t){return B.createImageDataCanvas(B.convertImageDataWrapperToImageData(t)).toDataURL("image/png")}static toBase64(t){return W(this,void 0,void 0,(function*(){const e=yield new Promise((e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(new Blob([t]))}));return e.slice(e.indexOf(",")+1)}))}}class D{saveImageAsJpeg(t,e){if(!t||0===t.length)return void console.log("Data cannot be null or empty");e||(e=P.uuid()+".jpeg");let n=new Blob([t],{type:"image/jpeg"});B.saveBlob(n,e)}isCameraSupported(){return!!navigator.mediaDevices}flash(){let t=this.findFlashElement();t.style.display="block",this.animateFlashOpacity("0.5",(()=>{this.animateFlashOpacity("0.0",(()=>{t.style.opacity="1.0",t.style.display="none"}))}))}findFlashElement(){return this.getOrCreateElement("flash",{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","background-color":"#fff",display:"none","z-index":"5000"})}animateFlashOpacity(t,e){const n=this.getElementByClassName("flash");setTimeout((()=>{n.style.opacity=t,e()}),150)}getOrCreateElement(t,e){let n=this.getElementByClassName(t);return n||(this.createElement(t,e),n=this.getElementByClassName(t)),n}createElement(t,e){let n=document.createElement("div");n.className=t,n.style.cssText=this.cssToString(e),document.body.append(n)}cssToString(t){let e="";return Object.keys(t).forEach((n=>{e+=n+":"+t[n]+";"})),e}getElementByClassName(t){const e=document.getElementsByClassName(t);if(0!==e.length)return e[0]}}function I(t,e,n){return Math.min(Math.max(t,e),n)}class R{constructor(t,e){this.x=t,this.y=e}static toPolygon(t,e){return[R.scaleDownTo(t[0],e),R.scaleDownTo(t[1],e),R.scaleDownTo(t[2],e),R.scaleDownTo(t[3],e)]}static scaleToPoint(t,e,n,o){return new R(o*(t.x-e),o*(t.y-n))}static scaleListToHtmlElement(t,e,n){return t.map((t=>R.scaleToHtmlElement(t,e,n)))}static scaleToHtmlElement(t,e,n){return new R(t.x*(n.clientWidth/e.width),t.y*(n.clientHeight/e.height))}static scaleUpTo(t,e){return new R(t.x*e.width,t.y*e.height)}static scaleDownTo(t,e){return new R(t.x/e.width,t.y/e.height)}static fromHtmlElement(t){return new R(t.offsetLeft,t.offsetTop)}static withScale(t,e,n){return new R(t/n,e/n)}static fromCoordinates(t,e,n,o){if(!t||!e)return new R(0,0);const i=new R(t,e);return o=null!=o?o:1,1===(n=n?n%4:0)?R.withScale(i.y,-i.x,o):2===n?R.withScale(-i.x,-i.y,o):3===n?R.withScale(-i.y,i.x,o):R.withScale(i.x,i.y,o)}static centerOf(t){const e=t.reduce(((t,e)=>t+e.x),0)/t.length,n=t.reduce(((t,e)=>t+e.y),0)/t.length;return new R(e,n)}static smallerSizeOfQuad(t){const e=Math.max(...t.map((t=>t.x)))-Math.min(...t.map((t=>t.x))),n=Math.max(...t.map((t=>t.y)))-Math.min(...t.map((t=>t.y)));return Math.min(e,n)}static empty(){return new R(0,0)}static centerX(t){if(t)return(R.highestX(t)+R.lowestX(t))/2}static highestX(t){if(t)return Math.max(...t.map((t=>t.x)))}static lowestX(t){if(t)return Math.min(...t.map((t=>t.x)))}static lowestY(t){if(t)return Math.min(...t.map((t=>t.y)))}static highestY(t){if(t)return Math.max(...t.map((t=>t.y)))}static width(t){if(t)return R.highestX(t)-R.lowestX(t)}static left(t){if(t)return t.reduce(((t,e)=>t.x<e.x?t:e))}static right(t){if(t)return t.reduce(((t,e)=>t.x>e.x?t:e))}static toSvgString(t){if(void 0!==t)return t.map((t=>`${t.x.toFixed(2)},${t.y.toFixed(2)}`)).join(" ")}static toSvgPathStringWithRoundedCorners(t,e=0){if(void 0===t)return;function n(t,e,n){const o=Math.atan2(t.y-e.y,t.x-e.x);return{x:t.x-n*Math.cos(o),y:t.y-n*Math.sin(o)}}let o="";const i=n(t[0],t[1],R.distance(t[0],t[1])/2);o+=`M ${i.x} ${i.y}`;for(let i=0;i<t.length;i++){const r=t[i],a=t[(i+1)%t.length],s=t[(i+2)%t.length],l=n(a,s,R.distance(a,s)/2),c=Math.abs(Math.atan2(a.y-r.y,a.x-r.x)-Math.atan2(a.y-s.y,a.x-s.x)),u=c>Math.PI?2*Math.PI-c:c,d=Math.min(Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2)),Math.sqrt(Math.pow(a.x-s.x,2)+Math.pow(a.y-s.y,2))),h=Math.min(e,d*Math.tan(u/2)/2),p=Math.abs(h/Math.tan(u/2)),f=(a.x-r.x)*(a.y-s.y)-(a.x-s.x)*(a.y-r.y)<0?1:0,m=n(a,r,p),g=n(a,s,p);o+=` L${m.x} ${m.y}`,o+=` A${h} ${h} 0 0 ${f} ${g.x} ${g.y}`,o+=` L${l.x} ${l.y}`}return o+" Z"}static distance(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}static subtract(t,e){return new R(t.x-e.x,t.y-e.y)}static add(t,e){return new R(t.x+e.x,t.y+e.y)}static multiply(t,e){return new R(t.x*e,t.y*e)}static cross(t,e){return t.x*e.y-t.y*e.x}static clamp(t,e){return new R(I(t.x,0,e.width),I(t.y,0,e.height))}}class M{constructor(t,e,n,o,i,r){this.format=t,this.text=e,this.parsedDocument=n,this.rawBytes=o,this.points=i,this.barcodeImage=r}id(){return this.text+this.format}equals(t){return this.format===t.format&&this.text===t.text}static fromWorker(t){const e=t.quad.map((t=>new R(t[0],t[1])));return new M(t.format,t.text,t.parsedDocument,t.rawBytes,e,t.barcodeImage)}}class F{constructor(t,e){this.barcodes=t,this.imageData=e}static fromWorker(t,e){const n=[];t&&t.forEach((t=>{n.push(M.fromWorker(t))}));const o=B.convertImageDataWrapperToImageData(e);return new F(n,o)}isEmpty(){return 0===this.barcodes.length}}class j{constructor(t,e,n,o){this.value=e,this.confidence=n,this.validated=o,this.name=t}}class V{}class z{static fromWorker(t){let e=new z;e.verificationSuccessful=t.verificationSuccessful;const n=new V,o=t.recognitionSuccessful;return(t.fields||[]).forEach((t=>{switch(t.name){case"DocumentNumber":e.documentNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"IssuingAuthority":e.issuingAuthority=new j(t.name,t.text,t.confidence,t.validated);break;case"DepartmentOfIssuance":e.departmentOfIssuance=new j(t.name,t.text,t.confidence,t.validated);break;case"GivenNames":e.givenNames=new j(t.name,t.text,t.confidence,t.validated);break;case"Surname":e.surname=new j(t.name,t.text,t.confidence,t.validated);break;case"Nationality":e.nationality=new j(t.name,t.text,t.confidence,t.validated);break;case"BirthDate":e.birthDate=new j(t.name,t.text,t.confidence,t.validated);break;case"Gender":e.gender=new j(t.name,t.text,t.confidence,t.validated);break;case"ExpiryDate":e.expiryDate=new j(t.name,t.text,t.confidence,t.validated);break;case"PersonalNumber":e.personalNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"TravelDocType":e.travelDocType=new j(t.name,t.text,t.confidence,t.validated);break;case"TravelDocTypeVariant":e.travelDocTypeVariant=new j(t.name,t.text,t.confidence,t.validated);break;case"DiscreetIssuingStateOrOrganization":e.discreetIssuingStateOrOrganization=new j(t.name,t.text,t.confidence,t.validated);break;case"DocumentTypeCode":e.kindOfDocumentField=new j(t.name,t.text,t.confidence,t.validated);break;case"DocumentType":e.documentType=new j(t.name,t.text,t.confidence,t.validated);break;case"Format":e.format=new j(t.name,t.text,t.confidence,t.validated);break;case"PINCode":e.pinCode=new j(t.name,t.text,t.confidence,t.validated);break;case"LanguageCode":e.languageCode=new j(t.name,t.text,t.confidence,t.validated);break;case"VersionNumber":e.versionNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitGeneral":n.general=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitDocumentNumber":n.documentNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitBirthDate":n.birthDate=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitExpiryDate":n.expiryDate=new j(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitPersonalNumber":n.personalNumber=new j(t.name,t.text,t.confidence,t.validated);break;case"Optional1":e.optional1=new j(t.name,t.text,t.confidence,t.validated);break;case"Optional2":e.optional2=new j(t.name,t.text,t.confidence,t.validated)}})),e.documentType||(e.documentType=new j("DocumentType",t.documentType)),o?e.checkDigits=n:e=void 0,e}}var N=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class U{constructor(t,e,n){this._sdk=t,this._mrzRecognizerToken=e,this.enableFrameAccumulation=n}recognize(t){return N(this,void 0,void 0,(function*(){try{let e=yield this._sdk.bridge.postByTransferringArgs("recognizeMRZ",[yield this._mrzRecognizerToken,t]);if(null===e)return;const n=z.fromWorker(e);return!this.enableFrameAccumulation&&n&&delete n.verificationSuccessful,n}catch(t){return void console.warn(t)}}))}recognizeURL(t){return N(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),o=document.createElement("img");o.src=t,o.onload=()=>N(this,void 0,void 0,(function*(){n.width=o.width,n.height=o.height;const t=n.getContext("2d");t.drawImage(o,0,0);const i=t.getImageData(0,0,o.width,o.height),r=yield this.recognize(i);e(r||void 0)}))}))}))}release(){return N(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[yield this._mrzRecognizerToken])}))}}var H=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class G{constructor(t,e){this._sdk=t,this._OcrEngineToken=e}performOcr(t){return H(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("performOcr",[this._OcrEngineToken,t])}))}recognizeURL(t){return H(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),o=document.createElement("img");o.src=t,o.onload=()=>H(this,void 0,void 0,(function*(){n.width=o.width,n.height=o.height;const t=n.getContext("2d");t.drawImage(o,0,0);const i=t.getImageData(0,0,o.width,o.height),r=yield this.performOcr(i);e(r)}))}))}))}release(){return H(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[this._OcrEngineToken])}))}}class Y{static fromWorker(t){if(!t)return;const e=new Y;return e.text=t.rawText,e.confidence=t.confidence,e.validated=t.validationSuccessful,e}}var X,Q,Z=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class ${constructor(t,e){this._sdk=t,this._textDataScannerToken=e}recognize(t){return Z(this,void 0,void 0,(function*(){try{let e=yield this._sdk.bridge.postByTransferringArgs("recognizeTextLine",[yield this._textDataScannerToken,t]);if(null===e)return;return Y.fromWorker(e)}catch(t){return void console.warn(t)}}))}cleanRecognitionQueue(){return Z(this,void 0,void 0,(function*(){try{yield this._sdk.bridge.postByTransferringArgs("cleanTextLineRecognitionQueue",[yield this._textDataScannerToken])}catch(t){return void console.warn(t)}}))}recognizeURL(t){return Z(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),o=document.createElement("img");o.src=t,o.onload=()=>Z(this,void 0,void 0,(function*(){n.width=o.width,n.height=o.height;const t=n.getContext("2d");t.drawImage(o,0,0);const i=t.getImageData(0,0,o.width,o.height),r=yield this.recognize(i);r&&e(r)}))}))}))}release(){return Z(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[yield this._textDataScannerToken])}))}}class q{}class K extends q{constructor(t={}){super(),this.sbColorPrimary="#C8193C",this.sbColorPrimaryDisabled="#F5F5F5",this.sbColorNegative="#FF3737",this.sbColorPositive="#4EFFB4",this.sbColorWarning="#FFCE5C",this.sbColorSecondary="#FFEDEE",this.sbColorSecondaryDisabled="#F5F5F5",this.sbColorOnPrimary="#FFFFFF",this.sbColorOnSecondary="#C8193C",this.sbColorSurface="#FFFFFF",this.sbColorOutline="#EFEFEF",this.sbColorOnSurfaceVariant="#707070",this.sbColorOnSurface="#000000",this.sbColorSurfaceLow="#00000026",this.sbColorSurfaceHigh="#0000007A",this.sbColorModalOverlay="#000000A3",void 0!==t.sbColorPrimary&&(this.sbColorPrimary=t.sbColorPrimary),void 0!==t.sbColorPrimaryDisabled&&(this.sbColorPrimaryDisabled=t.sbColorPrimaryDisabled),void 0!==t.sbColorNegative&&(this.sbColorNegative=t.sbColorNegative),void 0!==t.sbColorPositive&&(this.sbColorPositive=t.sbColorPositive),void 0!==t.sbColorWarning&&(this.sbColorWarning=t.sbColorWarning),void 0!==t.sbColorSecondary&&(this.sbColorSecondary=t.sbColorSecondary),void 0!==t.sbColorSecondaryDisabled&&(this.sbColorSecondaryDisabled=t.sbColorSecondaryDisabled),void 0!==t.sbColorOnPrimary&&(this.sbColorOnPrimary=t.sbColorOnPrimary),void 0!==t.sbColorOnSecondary&&(this.sbColorOnSecondary=t.sbColorOnSecondary),void 0!==t.sbColorSurface&&(this.sbColorSurface=t.sbColorSurface),void 0!==t.sbColorOutline&&(this.sbColorOutline=t.sbColorOutline),void 0!==t.sbColorOnSurfaceVariant&&(this.sbColorOnSurfaceVariant=t.sbColorOnSurfaceVariant),void 0!==t.sbColorOnSurface&&(this.sbColorOnSurface=t.sbColorOnSurface),void 0!==t.sbColorSurfaceLow&&(this.sbColorSurfaceLow=t.sbColorSurfaceLow),void 0!==t.sbColorSurfaceHigh&&(this.sbColorSurfaceHigh=t.sbColorSurfaceHigh),void 0!==t.sbColorModalOverlay&&(this.sbColorModalOverlay=t.sbColorModalOverlay)}}class J extends q{constructor(t={}){super(),this.visible=!0,this.text="",this.color="#FFFFFF",this.useShadow=!1,void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.color&&(this.color=t.color),void 0!==t.useShadow&&(this.useShadow=t.useShadow)}}class tt extends q{constructor(t={}){super(),this.visible=!0,this.color="#FFFFFF",void 0!==t.visible&&(this.visible=t.visible),void 0!==t.color&&(this.color=t.color)}}class et extends q{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#30FFFFFF",this.strokeWidth=2,this.cornerRadius=0,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class nt extends q{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#FFFFFF30",this.strokeWidth=2,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth)}}class ot extends q{constructor(t={}){super(),this.iconVisible=!0,this.color="#FFFFFF",this.useShadow=!1,void 0!==t.iconVisible&&(this.iconVisible=t.iconVisible),void 0!==t.color&&(this.color=t.color),void 0!==t.useShadow&&(this.useShadow=t.useShadow)}}class it extends q{constructor(t={}){super(),this.width=1,this.height=1,void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height)}}class rt extends q{constructor(t={}){super(),this.visible=!0,this.backgroundColor="#0000007A",this.foregroundColor="#FFFFFF",this.activeBackgroundColor="#FFCE5C",this.activeForegroundColor="#1C1B1F",void 0!==t.visible&&(this.visible=t.visible),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor),void 0!==t.activeBackgroundColor&&(this.activeBackgroundColor=t.activeBackgroundColor),void 0!==t.activeForegroundColor&&(this.activeForegroundColor=t.activeForegroundColor)}}class at extends q{constructor(t={}){super(),this.badgeBackgroundColor="#FFFFFF",this.badgeForegroundColor="#C8193C",this.visible=!0,this.backgroundColor="#0000007A",this.foregroundColor="#FFFFFF",this.activeBackgroundColor="#FFCE5C",this.activeForegroundColor="#1C1B1F",void 0!==t.badgeBackgroundColor&&(this.badgeBackgroundColor=t.badgeBackgroundColor),void 0!==t.badgeForegroundColor&&(this.badgeForegroundColor=t.badgeForegroundColor),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor),void 0!==t.activeBackgroundColor&&(this.activeBackgroundColor=t.activeBackgroundColor),void 0!==t.activeForegroundColor&&(this.activeForegroundColor=t.activeForegroundColor)}}class st extends q{constructor(t={}){super(),this.visible=!0,this.text="",this.background=new nt({}),this.foreground=new ot({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.background&&(this.background=new nt(t.background)),void 0!==t.foreground&&(this.foreground=new ot(t.foreground))}}class lt extends q{constructor(t={}){super(),this.successBeepEnabled=!0,this.soundType="MODERN_BEEP",void 0!==t.successBeepEnabled&&(this.successBeepEnabled=t.successBeepEnabled),void 0!==t.soundType&&(this.soundType=t.soundType)}}class ct extends q{constructor(t={}){super(),this.enabled=!1,void 0!==t.enabled&&(this.enabled=t.enabled)}}class ut extends q{constructor(t={}){super(),this.autoCancelTimeout=0,this.initialScanDelay=0,void 0!==t.autoCancelTimeout&&(this.autoCancelTimeout=t.autoCancelTimeout),void 0!==t.initialScanDelay&&(this.initialScanDelay=t.initialScanDelay)}}class dt extends q{constructor(t={}){super(),this.visible=!0,this.deselected=new et({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),this.selected=new et({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.deselected&&(this.deselected=new et(t.deselected)),void 0!==t.selected&&(this.selected=new et(t.selected))}}class ht extends q{constructor(t={}){super(),this.imageVisible=!0,this.titleSelected=new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleSelected=new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.titleDeselected=new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleDeselected=new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.backgroundSelected=new et({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:0,cornerRadius:10}),this.backgroundDeselected=new et({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:0,cornerRadius:10}),void 0!==t.imageVisible&&(this.imageVisible=t.imageVisible),void 0!==t.titleSelected&&(this.titleSelected=new J(t.titleSelected)),void 0!==t.subtitleSelected&&(this.subtitleSelected=new J(t.subtitleSelected)),void 0!==t.titleDeselected&&(this.titleDeselected=new J(t.titleDeselected)),void 0!==t.subtitleDeselected&&(this.subtitleDeselected=new J(t.subtitleDeselected)),void 0!==t.backgroundSelected&&(this.backgroundSelected=new et(t.backgroundSelected)),void 0!==t.backgroundDeselected&&(this.backgroundDeselected=new et(t.backgroundDeselected))}}class pt extends q{constructor(t={}){if(super(),this.visible=!0,this.foregroundColor="?sbColorOnSurface",void 0!==t.visible&&(this.visible=t.visible),void 0===t.background)throw new Error("background must be present in constructor argument");this.background=new nt(t.background),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor)}}class ft extends q{constructor(t={}){super(),this.visible=!1,this.counterBadge=new pt({background:new nt({}),foregroundColor:"?sbColorOnSurface"}),this.automaticSelectionEnabled=!1,this.barcodeItemInfoPosition="BELOW",this.polygon=new dt({visible:!0,deselected:new et({}),selected:new et({})}),this.barcodeItemConfiguration=new ht({imageVisible:!0,titleSelected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new et({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new et({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.counterBadge&&(this.counterBadge=new pt(t.counterBadge)),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.barcodeItemInfoPosition&&(this.barcodeItemInfoPosition=t.barcodeItemInfoPosition),void 0!==t.polygon&&(this.polygon=new dt(t.polygon)),void 0!==t.barcodeItemConfiguration&&(this.barcodeItemConfiguration=new ht(t.barcodeItemConfiguration))}}class mt extends q{constructor(t={}){super(),this.visible=!0,this.partiallyScanned=new et({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.rejected=new et({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.completed=new et({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.partiallyScanned&&(this.partiallyScanned=new et(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new et(t.rejected)),void 0!==t.completed&&(this.completed=new et(t.completed))}}class gt extends q{constructor(t={}){super(),this.partiallyScanned=new pt({visible:!0,background:new nt({strokeColor:"#FFFFFF30",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.rejected=new pt({visible:!0,background:new nt({strokeColor:"#FFFFFF30",fillColor:"?sbColorNegative",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.completed=new pt({visible:!0,background:new nt({strokeColor:"#FFFFFF30",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),void 0!==t.partiallyScanned&&(this.partiallyScanned=new pt(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new pt(t.rejected)),void 0!==t.completed&&(this.completed=new pt(t.completed))}}class vt extends q{constructor(t={}){super(),this.visible=!1,this.automaticSelectionEnabled=!0,this.polygon=new mt({}),this.badge=new gt({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.polygon&&(this.polygon=new mt(t.polygon)),void 0!==t.badge&&(this.badge=new gt(t.badge))}}class At extends q{constructor(t={}){super(),this.title=new J({text:"Connection Error!",color:"?sbColorOnSurface"}),this.subtitle=new J({text:"There was an issue and the data requested was not fetched. You could try again or discard this result to start a new scan.",color:"?sbColorOnSurfaceVariant"}),this.retryButton=new st({}),this.cancelButton=new st({}),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.subtitle&&(this.subtitle=new J(t.subtitle)),void 0!==t.retryButton&&(this.retryButton=new st(t.retryButton)),void 0!==t.cancelButton&&(this.cancelButton=new st(t.cancelButton))}}class bt extends q{constructor(t={}){if(super(),void 0===t.title)throw new Error("title must be present in constructor argument");if(this.title=t.title,void 0===t.subtitle)throw new Error("subtitle must be present in constructor argument");if(this.subtitle=t.subtitle,void 0===t.barcodeImage)throw new Error("barcodeImage must be present in constructor argument");this.barcodeImage=t.barcodeImage}}class yt extends q{constructor(t={}){super(),this.barcodeItemMapper=null,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.loadingMessage=new J({text:"Loading message for barcode info mapping.",color:"?sbColorPrimary"}),this.errorState=new At({}),void 0!==t.barcodeItemMapper&&(this.barcodeItemMapper=null!=t.barcodeItemMapper?t.barcodeItemMapper:null),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.loadingMessage&&(this.loadingMessage=new J(t.loadingMessage)),void 0!==t.errorState&&(this.errorState=new At(t.errorState))}}class St extends q{constructor(t={}){super(),this._type="SingleScanningMode",this.confirmationSheetEnabled=!1,this.barcodeImageVisible=!0,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.barcodeTitle=new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.barcodeSubtitle=new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.submitButton=new st({visible:!0,text:"?sheetSubmitButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary"})}),this.cancelButton=new st({visible:!0,text:"?singleModeConfirmationCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary"})}),this.barcodeInfoMapping=new yt({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new J({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new At({title:new J({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new J({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new st({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary"})}),cancelButton:new st({text:"?barcodeInfoMappingErrorStateCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary"})})})}),this.arOverlay=new ft({visible:!1,counterBadge:new pt({visible:!0,background:new nt({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new dt({visible:!0,deselected:new et({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new et({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new ht({imageVisible:!0,titleSelected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new J({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),backgroundSelected:new et({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new et({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})})}),void 0!==t.confirmationSheetEnabled&&(this.confirmationSheetEnabled=t.confirmationSheetEnabled),void 0!==t.barcodeImageVisible&&(this.barcodeImageVisible=t.barcodeImageVisible),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.barcodeTitle&&(this.barcodeTitle=new J(t.barcodeTitle)),void 0!==t.barcodeSubtitle&&(this.barcodeSubtitle=new J(t.barcodeSubtitle)),void 0!==t.submitButton&&(this.submitButton=new st(t.submitButton)),void 0!==t.cancelButton&&(this.cancelButton=new st(t.cancelButton)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new yt(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new ft(t.arOverlay))}}class Ct extends q{constructor(t={}){if(super(),void 0===t.width)throw new Error("width must be present in constructor argument");if(this.width=t.width,void 0===t.height)throw new Error("height must be present in constructor argument");this.height=t.height}}class wt extends q{constructor(t={}){super(),this.cameraModule="BACK",this.zoomSteps=[1,2,5],this.defaultZoomFactor=1,this.flashEnabled=!1,this.idealPreviewResolution=new Ct({width:1920,height:1080}),void 0!==t.cameraModule&&(this.cameraModule=t.cameraModule),void 0!==t.zoomSteps&&(this.zoomSteps=t.zoomSteps.map((t=>t))),void 0!==t.defaultZoomFactor&&(this.defaultZoomFactor=t.defaultZoomFactor),void 0!==t.flashEnabled&&(this.flashEnabled=t.flashEnabled),void 0!==t.idealPreviewResolution&&(this.idealPreviewResolution=new Ct(t.idealPreviewResolution))}}class xt extends q{constructor(t={}){super(),this.title=new J({visible:!1,text:"Scan Item",color:"?sbColorOnPrimary"}),this.mode="SOLID",this.backgroundColor="?sbColorPrimary",this.cancelButton=new st({text:"Cancel",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new ot({color:"?sbColorOnPrimary"})}),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.cancelButton&&(this.cancelButton=new st(t.cancelButton))}}class Et extends q{constructor(t={}){super(),this.flashButton=new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),this.zoomButton=new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),this.flipCameraButton=new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),void 0!==t.flashButton&&(this.flashButton=new rt(t.flashButton)),void 0!==t.zoomButton&&(this.zoomButton=new rt(t.zoomButton)),void 0!==t.flipCameraButton&&(this.flipCameraButton=new rt(t.flipCameraButton))}}class Lt extends q{constructor(t={}){super(),this.mode="COLLAPSED_SHEET",this.collapsedVisibleHeight="SMALL",this.listButton=new at({}),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.collapsedVisibleHeight&&(this.collapsedVisibleHeight=t.collapsedVisibleHeight),void 0!==t.listButton&&(this.listButton=new at(t.listButton))}}class _t extends q{constructor(t={}){super(),this.enabled=!0,this.backgroundColor="?sbColorNegative",this.iconColor="?sbColorOnPrimary",void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.iconColor&&(this.iconColor=t.iconColor)}}class Ot extends q{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.title=new J({text:"Update count",color:"?sbColorOnSurface"}),this.info=new J({text:"Adjust the number of items you scanned.",color:"?sbColorOnSurfaceVariant"}),this.updateButton=new st({visible:!0,text:"Update",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),this.cancelButton=new st({visible:!0,text:"Cancel",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),this.clearTextButton=new tt({visible:!0,color:"?sbColorOnSurfaceVariant"}),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.info&&(this.info=new J(t.info)),void 0!==t.updateButton&&(this.updateButton=new st(t.updateButton)),void 0!==t.cancelButton&&(this.cancelButton=new st(t.cancelButton)),void 0!==t.clearTextButton&&(this.clearTextButton=new tt(t.clearTextButton))}}class kt extends q{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.manualCountChangeEnabled=!0,this.manualCountOutlineColor="?sbColorOutline",this.manualCountChangeColor="?sbColorPrimary",this.title=new J({text:"%d items",color:"?sbColorOnSurface"}),this.clearAllButton=new st({visible:!0,text:"Clear all",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.barcodeItemTitle=new J({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),this.barcodeItemSubtitle=new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.barcodeItemImageVisible=!0,this.submitButton=new st({visible:!0,text:"Submit",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.startScanningButton=new st({visible:!0,text:"Start scanning",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),this.placeholderTitle=new J({text:"No barcodes here!",color:"?sbColorOnSurface"}),this.placeholderSubtitle=new J({text:"The barcode list is currently empty. Close this sheet and scan your items to add them.",color:"?sbColorOnSurfaceVariant"}),this.placeholderIconBackground="?sbColorOutline",this.placeholderIcon=new tt({visible:!0,color:"?sbColorOnSurface"}),this.swipeToDelete=new _t({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"}),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.manualCountChangeEnabled&&(this.manualCountChangeEnabled=t.manualCountChangeEnabled),void 0!==t.manualCountOutlineColor&&(this.manualCountOutlineColor=t.manualCountOutlineColor),void 0!==t.manualCountChangeColor&&(this.manualCountChangeColor=t.manualCountChangeColor),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.clearAllButton&&(this.clearAllButton=new st(t.clearAllButton)),void 0!==t.barcodeItemTitle&&(this.barcodeItemTitle=new J(t.barcodeItemTitle)),void 0!==t.barcodeItemSubtitle&&(this.barcodeItemSubtitle=new J(t.barcodeItemSubtitle)),void 0!==t.barcodeItemImageVisible&&(this.barcodeItemImageVisible=t.barcodeItemImageVisible),void 0!==t.submitButton&&(this.submitButton=new st(t.submitButton)),void 0!==t.startScanningButton&&(this.startScanningButton=new st(t.startScanningButton)),void 0!==t.placeholderTitle&&(this.placeholderTitle=new J(t.placeholderTitle)),void 0!==t.placeholderSubtitle&&(this.placeholderSubtitle=new J(t.placeholderSubtitle)),void 0!==t.placeholderIconBackground&&(this.placeholderIconBackground=t.placeholderIconBackground),void 0!==t.placeholderIcon&&(this.placeholderIcon=new tt(t.placeholderIcon)),void 0!==t.swipeToDelete&&(this.swipeToDelete=new _t(t.swipeToDelete))}}class Tt extends q{constructor(t={}){super(),this._type="MultipleScanningMode",this.countingRepeatDelay=1e3,this.mode="COUNTING",this.sheet=new Lt({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new at({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new kt({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new J({text:"?multipleModeSheetTitle",color:"?sbColorOnSurface"}),clearAllButton:new st({visible:!0,text:"?sheetClearAllButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new J({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),barcodeItemSubtitle:new J({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),barcodeItemImageVisible:!0,submitButton:new st({visible:!0,text:"?sheetSubmitButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new st({visible:!0,text:"?sheetStartScanningButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new J({visible:!0,text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface",useShadow:!1}),placeholderSubtitle:new J({visible:!0,text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant",useShadow:!1}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new tt({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new _t({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new Ot({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new J({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new J({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new st({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new st({visible:!0,text:"?manualCountEditDialogCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new tt({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.barcodeInfoMapping=new yt({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new J({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new At({title:new J({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new J({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new st({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new nt({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new st({visible:!0,text:"?barcodeInfoMappingErrorStateCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})})}),this.arOverlay=new ft({visible:!1,counterBadge:new pt({visible:!0,background:new nt({strokeColor:"#FF000000",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new dt({visible:!0,deselected:new et({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new et({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new ht({imageVisible:!0,titleSelected:new J({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new J({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),titleDeselected:new J({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),subtitleDeselected:new J({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new et({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new et({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})})}),void 0!==t.countingRepeatDelay&&(this.countingRepeatDelay=t.countingRepeatDelay),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.sheet&&(this.sheet=new Lt(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new kt(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new Ot(t.manualCountEditDialog)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new yt(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new ft(t.arOverlay))}}(X||(X={})).From=function(t){const e=t._type;switch(e){case"SingleScanningMode":return new St(t);case"MultipleScanningMode":return new Tt(t);default:throw`Unknown child class name: ${e}`}};class Pt extends q{constructor(t={}){super(),this.visible=!0,this.style=new Wt({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),this.overlayColor="?sbColorSurfaceLow",this.aspectRatio=new it({width:1,height:1}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.style&&(this.style=Q.From(t.style)),void 0!==t.overlayColor&&(this.overlayColor=t.overlayColor),void 0!==t.aspectRatio&&(this.aspectRatio=new it(t.aspectRatio))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"FinderCorneredStyle":return new Wt(t);case"FinderStrokedStyle":return new Bt(t);default:throw`Unknown child class name: ${e}`}}}(Q||(Q={}));class Wt extends q{constructor(t={}){super(),this._type="FinderCorneredStyle",this.strokeColor="#FFFFFFFF",this.strokeWidth=3,this.cornerRadius=10,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class Bt extends q{constructor(t={}){super(),this._type="FinderStrokedStyle",this.strokeColor="#FFFFFFFF",this.strokeWidth=3,this.cornerRadius=10,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class Dt extends q{constructor(t={}){super(),this.visible=!0,this.title=new J({color:"?sbColorOnPrimary"}),this.background=new nt({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow"}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.background&&(this.background=new nt(t.background))}}class It extends q{constructor(t={}){if(super(),this.count=1,void 0===t.barcodeValue)throw new Error("barcodeValue must be present in constructor argument");if(this.barcodeValue=t.barcodeValue,void 0===t.title)throw new Error("title must be present in constructor argument");if(this.title=null!=t.title?t.title:null,void 0===t.image)throw new Error("image must be present in constructor argument");this.image=null!=t.image?t.image:null,void 0!==t.count&&(this.count=t.count)}}class Rt extends q{constructor(t={}){super(),this.cameraPermissionEnableCameraTitle="Camera permission denied!",this.cameraPermissionEnableCameraExplanation="Please allow the usage of the camera to start the scanning process.",this.cameraPermissionCloseButton="Close",this.topBarCancelButton="Cancel",this.topBarTitle="Scan Item",this.userGuidance="Move the finder over a barcode",this.barcodeInfoMappingLoadingMessage="Loading details...",this.barcodeInfoMappingErrorStateTitle="Connection Error!",this.barcodeInfoMappingErrorStateSubtitle="There was an issue and the data requested was not fetched. You could try again or discard this result to start a new scan.",this.barcodeInfoMappingErrorStateRetryButton="Retry",this.barcodeInfoMappingErrorStateCancelButton="Cancel",this.manualCountEditDialogTitle="Update count",this.manualCountEditDialogInfo="Adjust the number of items you scanned.",this.manualCountEditDialogUpdateButton="Update",this.manualCountEditDialogCancelButton="Cancel",this.sheetClearAllButton="Clear all",this.sheetSubmitButton="Submit",this.sheetStartScanningButton="Start scanning",this.sheetPlaceholderTitle="No barcodes here!",this.sheetPlaceholderSubtitle="The barcode list is currently empty. Close this sheet and scan your items to add them.",this.singleModeConfirmationCancelButton="Close",this.multipleModeSheetTitle="%d items",void 0!==t.cameraPermissionEnableCameraTitle&&(this.cameraPermissionEnableCameraTitle=t.cameraPermissionEnableCameraTitle),void 0!==t.cameraPermissionEnableCameraExplanation&&(this.cameraPermissionEnableCameraExplanation=t.cameraPermissionEnableCameraExplanation),void 0!==t.cameraPermissionCloseButton&&(this.cameraPermissionCloseButton=t.cameraPermissionCloseButton),void 0!==t.topBarCancelButton&&(this.topBarCancelButton=t.topBarCancelButton),void 0!==t.topBarTitle&&(this.topBarTitle=t.topBarTitle),void 0!==t.userGuidance&&(this.userGuidance=t.userGuidance),void 0!==t.barcodeInfoMappingLoadingMessage&&(this.barcodeInfoMappingLoadingMessage=t.barcodeInfoMappingLoadingMessage),void 0!==t.barcodeInfoMappingErrorStateTitle&&(this.barcodeInfoMappingErrorStateTitle=t.barcodeInfoMappingErrorStateTitle),void 0!==t.barcodeInfoMappingErrorStateSubtitle&&(this.barcodeInfoMappingErrorStateSubtitle=t.barcodeInfoMappingErrorStateSubtitle),void 0!==t.barcodeInfoMappingErrorStateRetryButton&&(this.barcodeInfoMappingErrorStateRetryButton=t.barcodeInfoMappingErrorStateRetryButton),void 0!==t.barcodeInfoMappingErrorStateCancelButton&&(this.barcodeInfoMappingErrorStateCancelButton=t.barcodeInfoMappingErrorStateCancelButton),void 0!==t.manualCountEditDialogTitle&&(this.manualCountEditDialogTitle=t.manualCountEditDialogTitle),void 0!==t.manualCountEditDialogInfo&&(this.manualCountEditDialogInfo=t.manualCountEditDialogInfo),void 0!==t.manualCountEditDialogUpdateButton&&(this.manualCountEditDialogUpdateButton=t.manualCountEditDialogUpdateButton),void 0!==t.manualCountEditDialogCancelButton&&(this.manualCountEditDialogCancelButton=t.manualCountEditDialogCancelButton),void 0!==t.sheetClearAllButton&&(this.sheetClearAllButton=t.sheetClearAllButton),void 0!==t.sheetSubmitButton&&(this.sheetSubmitButton=t.sheetSubmitButton),void 0!==t.sheetStartScanningButton&&(this.sheetStartScanningButton=t.sheetStartScanningButton),void 0!==t.sheetPlaceholderTitle&&(this.sheetPlaceholderTitle=t.sheetPlaceholderTitle),void 0!==t.sheetPlaceholderSubtitle&&(this.sheetPlaceholderSubtitle=t.sheetPlaceholderSubtitle),void 0!==t.singleModeConfirmationCancelButton&&(this.singleModeConfirmationCancelButton=t.singleModeConfirmationCancelButton),void 0!==t.multipleModeSheetTitle&&(this.multipleModeSheetTitle=t.multipleModeSheetTitle)}}class Mt extends q{constructor(t={}){super(),this.barcodesRegexFilter="",this.barcodeFormats=[],this.gs1Handling="PARSE",this.engineMode="ML_LOW_POWER",this.maximumRecognizerResolution=600,void 0!==t.barcodesRegexFilter&&(this.barcodesRegexFilter=t.barcodesRegexFilter),void 0!==t.barcodeFormats&&(this.barcodeFormats=t.barcodeFormats.map((t=>t))),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.maximumRecognizerResolution&&(this.maximumRecognizerResolution=t.maximumRecognizerResolution)}}class Ft extends q{constructor(t={}){super(),this.background="?sbColorSurface",this.iconBackground="?sbColorOutline",this.icon=new tt({visible:!0,color:"?sbColorOnSurface"}),this.closeButton=new st({text:"Close",background:new nt({}),foreground:new ot({})}),this.enableCameraTitle=new J({text:"Camera permission denied!",color:"?colorOnSurface"}),this.enableCameraExplanation=new J({text:"Please allow the usage of the camera to start the scanning process.",color:"?sbColorOnSurfaceVariant"}),void 0!==t.background&&(this.background=t.background),void 0!==t.iconBackground&&(this.iconBackground=t.iconBackground),void 0!==t.icon&&(this.icon=new tt(t.icon)),void 0!==t.closeButton&&(this.closeButton=new st(t.closeButton)),void 0!==t.enableCameraTitle&&(this.enableCameraTitle=new J(t.enableCameraTitle)),void 0!==t.enableCameraExplanation&&(this.enableCameraExplanation=new J(t.enableCameraExplanation))}}class jt extends q{constructor(t={}){super(),this.version="1.0",this.screen="BarcodeScanner",this.palette=new K({sbColorPrimary:"#C8193C",sbColorPrimaryDisabled:"#F5F5F5",sbColorNegative:"#FF3737",sbColorPositive:"#4EFFB4",sbColorWarning:"#FFCE5C",sbColorSecondary:"#FFEDEE",sbColorSecondaryDisabled:"#F5F5F5",sbColorOnPrimary:"#FFFFFF",sbColorOnSecondary:"#C8193C",sbColorSurface:"#FFFFFF",sbColorOutline:"#EFEFEF",sbColorOnSurfaceVariant:"#707070",sbColorOnSurface:"#000000",sbColorSurfaceLow:"#00000026",sbColorSurfaceHigh:"#0000007A",sbColorModalOverlay:"#000000A3"}),this.localization=new Rt({}),this.backgroundColor="?sbColorSurfaceLow",this.topBar=new xt({title:new J({text:"?topBarTitle",color:"?sbColorOnPrimary"}),mode:"SOLID",backgroundColor:"?sbColorPrimary",cancelButton:new st({visible:!0,text:"?topBarCancelButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new ot({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})})}),this.actionBar=new Et({flashButton:new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),zoomButton:new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),flipCameraButton:new rt({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.viewFinder=new Pt({visible:!0,style:new Wt({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),overlayColor:"?sbColorSurfaceLow",aspectRatio:new it({width:1,height:1})}),this.userGuidance=new Dt({visible:!0,title:new J({text:"?userGuidance",color:"?sbColorOnPrimary"}),background:new nt({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow",strokeWidth:0})}),this.cameraPermission=new Ft({background:"?sbColorSurface",iconBackground:"?sbColorOutline",icon:new tt({visible:!0,color:"?sbColorOnSurface"}),closeButton:new st({visible:!0,text:"?cameraPermissionCloseButton",background:new nt({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new ot({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),enableCameraTitle:new J({text:"?cameraPermissionEnableCameraTitle",color:"?sbColorOnSurface"}),enableCameraExplanation:new J({text:"?cameraPermissionEnableCameraExplanation",color:"?sbColorOnSurfaceVariant"})}),this.cameraConfiguration=new wt({}),this.recognizerConfiguration=new Mt({}),this.useCase=new St({}),this.sound=new lt({successBeepEnabled:!0,soundType:"MODERN_BEEP"}),this.vibration=new ct({enabled:!0}),this.timeouts=new ut({autoCancelTimeout:0,initialScanDelay:0}),void 0!==t.version&&(this.version=t.version),void 0!==t.screen&&(this.screen=t.screen),void 0!==t.palette&&(this.palette=new K(t.palette)),void 0!==t.localization&&(this.localization=new Rt(t.localization)),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.topBar&&(this.topBar=new xt(t.topBar)),void 0!==t.actionBar&&(this.actionBar=new Et(t.actionBar)),void 0!==t.viewFinder&&(this.viewFinder=new Pt(t.viewFinder)),void 0!==t.userGuidance&&(this.userGuidance=new Dt(t.userGuidance)),void 0!==t.cameraPermission&&(this.cameraPermission=new Ft(t.cameraPermission)),void 0!==t.cameraConfiguration&&(this.cameraConfiguration=new wt(t.cameraConfiguration)),void 0!==t.recognizerConfiguration&&(this.recognizerConfiguration=new Mt(t.recognizerConfiguration)),void 0!==t.useCase&&(this.useCase=X.From(t.useCase)),void 0!==t.sound&&(this.sound=new lt(t.sound)),void 0!==t.vibration&&(this.vibration=new ct(t.vibration)),void 0!==t.timeouts&&(this.timeouts=new ut(t.timeouts))}}class Vt extends q{constructor(t={}){if(super(),void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=t.type,void 0===t.count)throw new Error("count must be present in constructor argument");if(this.count=t.count,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.rawBytes)throw new Error("rawBytes must be present in constructor argument");if(this.rawBytes=t.rawBytes,void 0===t.parsedDocument)throw new Error("parsedDocument must be present in constructor argument");this.parsedDocument=null!=t.parsedDocument?t.parsedDocument:null}}class zt extends q{constructor(t={}){super(),this.items=[],void 0!==t.items&&(this.items=t.items.map((t=>new Vt(t))))}}class Nt extends q{constructor(t={}){if(super(),this.title=new J({text:"Title",color:"?sbColorOnSurface"}),this.subtitle=new J({text:"Standard explanation message text.",color:"?sbColorOnSurfaceVariant"}),this.sheetColor="?sbColorSurface",this.modalOverlayColor="?sbColorModalOverlay",this.dividerColor="?sbColorOutline",void 0!==t.title&&(this.title=new J(t.title)),void 0!==t.subtitle&&(this.subtitle=new J(t.subtitle)),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0===t.okButton)throw new Error("okButton must be present in constructor argument");if(this.okButton=new st(t.okButton),void 0===t.cancelButton)throw new Error("cancelButton must be present in constructor argument");this.cancelButton=new st(t.cancelButton)}}class Ut extends h{constructor(t){super(t);const e=new jt;this.finder=e.viewFinder,this.userGuidance=e.userGuidance}static mapFinderConfiguration(t,e){var n,o;h.mapValuesDeep(null!==(n=e.finder)&&void 0!==n?n:{},t.finder),h.mapValuesDeep(null!==(o=e.userGuidance)&&void 0!==o?o:{},t.userGuidance)}}class Ht extends Ut{constructor(){super(h.DEFAULT_VIDEO_RESOLUTION_HD),this.matchSubstring=!1,this.onTextDetected=function(t){},this.finder.aspectRatio.width=6,this.userGuidance.title.text="Please hold the device over the text to start scanning"}static fromJson(t){const e=new Ht;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class Gt extends Ut{constructor(){super(h.DEFAULT_VIDEO_RESOLUTION_HD),this.onTextDetected=function(t){},this.finder.aspectRatio.width=6,this.userGuidance.title.text="Please hold the device over the vehicle identification number to start scanning"}static fromJson(t){const e=new Gt;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class Yt extends Error{constructor(t){super(t.description),this.name="LicenseError"}}class Xt{static throwIfMissingBuffer(t){Xt.throwIfMissing(t,"ImageBuffer may not be null")}static throwIfMissing(t,e){if(!t)throw new Error(e)}}var Qt,Zt=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class $t{constructor(t,e){this._sdk=t,this._token=e}analyze(t){return Zt(this,void 0,void 0,(function*(){Xt.throwIfMissingBuffer(t);return yield this._sdk.bridge.postByCopyingArgs("documentQualityAnalyzerAnalyze",[this._token,t])}))}release(){return Zt(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[this._token])}))}}class qt{_marker(){}}!function(t){t.From=function(t){const e=t._type;switch(e){case"ScanbotBinarizationFilter":return new Kt(t);case"CustomBinarizationFilter":return new Jt(t);case"ColorDocumentFilter":return new te(t);case"BrightnessFilter":return new ee(t);case"ContrastFilter":return new ne(t);case"GrayscaleFilter":return new oe(t);case"LegacyFilter":return new ie(t);case"WhiteBlackPointFilter":return new re(t);default:throw`Unknown child class name: ${e}`}}}(Qt||(Qt={}));class Kt extends qt{constructor(t={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==t.outputMode&&(this.outputMode=t.outputMode)}}class Jt extends qt{constructor(t={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==t.outputMode&&(this.outputMode=t.outputMode),void 0!==t.denoise&&(this.denoise=t.denoise),void 0!==t.radius&&(this.radius=t.radius),void 0!==t.preset&&(this.preset=t.preset)}}class te extends qt{constructor(t={}){super(),this._type="ColorDocumentFilter"}}class ee extends qt{constructor(t={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==t.brightness&&(this.brightness=t.brightness)}}class ne extends qt{constructor(t={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==t.contrast&&(this.contrast=t.contrast)}}class oe extends qt{constructor(t={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==t.borderWidthFraction&&(this.borderWidthFraction=t.borderWidthFraction),void 0!==t.blackOutliersFraction&&(this.blackOutliersFraction=t.blackOutliersFraction),void 0!==t.whiteOutliersFraction&&(this.whiteOutliersFraction=t.whiteOutliersFraction)}}class ie extends qt{constructor(t={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==t.filterType&&(this.filterType=t.filterType)}}class re extends qt{constructor(t={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==t.blackPoint&&(this.blackPoint=t.blackPoint),void 0!==t.whitePoint&&(this.whitePoint=t.whitePoint)}}class ae{static initialize(t=!1){this.verbose=t}static debug(t){this.verbose&&console.log("ScanbotSDK:",t)}static debugWarn(t){this.verbose&&console.warn("ScanbotSDK:",t)}}var se=n(0),le=n(16),ce=n(2),ue=n.n(ce);const de=Object(se.createContext)(null);function he(t){return{getColorValue:e=>{if(e){if(e.startsWith("?")){const n=e.slice(1);if(n in t)return t[n];ae.debugWarn(`Color ${n} not found in palette`)}return e}ae.debugWarn("Color is missing")}}}class pe{static setPalette(t){this.palette=t}static setBarcodeTextLocalization(t){this.barcodeTextLocalization=t}static getColorValue(t){return he(pe.palette).getColorValue(t)}static getLocalizedBarcodeText(t){if(t.startsWith("?")){const e=t.slice(1);if(e in pe.barcodeTextLocalization)return pe.barcodeTextLocalization[e];ae.debugWarn(`Barcode text localization key ${e} not found in localization`)}return t}}pe.palette=(new jt).palette,pe.barcodeTextLocalization=(new jt).localization;const fe="var(--1-sb-dvh, 1vh)";function me(){const t=Object(se.useMemo)((()=>{var t,e;return null===(e=null===(t=null===window||void 0===window?void 0:window.CSS)||void 0===t?void 0:t.supports)||void 0===e?void 0:e.call(t,"height: 100dvh")}),[]),e=()=>{var e=t?"1dvh":window.innerHeight/100+"px";document.documentElement.style.setProperty("--1-sb-dvh",e)};return Object(se.useEffect)((()=>{if(e(),!t)return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}})),null}function ge(t){return{color:pe.getColorValue(t.color),textShadow:t.useShadow?"1px 1px 2px":""}}function ve(t){return t.config.visible?se.default.createElement("span",{ref:t.innerRef,style:Object.assign(Object.assign({},t.style),ge(t.config))},pe.getLocalizedBarcodeText(t.config.text)):null}var Ae=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function be(t){const e=Object(se.useContext)(de).getColorValue,{styleConfig:n}=t,o=Ae(t,["styleConfig"]),i=Object.assign(Object.assign({},t.style),{backgroundColor:e(n.fillColor),borderColor:e(n.strokeColor),borderWidth:n.strokeWidth,borderRadius:n.cornerRadius,borderStyle:"solid"});return se.default.createElement(ce.Box,Object.assign({},o,{style:i}))}function ye(t){var e;return t.visible?se.default.createElement(ce.Button,{variant:"text",onClick:t.onClick,sx:Object.assign(Object.assign({flex:1},ge(t.foreground)),{textTransform:"none",fontSize:18,"&:hover, &:focus, &:active, &":{outline:"none",backgroundColor:"transparent"},px:0}),disableRipple:!0},se.default.createElement(be,{styleConfig:Object.assign(Object.assign({},t.background),{cornerRadius:4}),sx:{borderStyle:"solid",px:"8px"}},null!==(e=t.icon)&&void 0!==e?e:null,pe.getLocalizedBarcodeText(t.text))):se.default.createElement("div",{style:{display:"flex",flex:1}})}const Se=se.default.createContext(null);function Ce(t){const e=t.mode,n="HIDDEN"===e?0:48;Object(se.useEffect)((()=>{if("HIDDEN"===e)return;const n=document.createElement("meta");return n.name="theme-color",n.content=pe.getColorValue(t.backgroundColor),document.head.appendChild(n),()=>{document.head.removeChild(n)}}),[e]);const o="SOLID"===e?0:n,i={height:n,remainingVisibleBodyHeight:"SOLID"===e?`calc(100 * ${fe} - ${n}px)`:`calc(100 * ${fe})`,minTopPaddingForContent:o,minTopPaddingForViewFinder:10+o},r="SOLID"===e?{backgroundColor:pe.getColorValue(t.backgroundColor)}:{backgroundImage:`linear-gradient(to bottom, ${pe.getColorValue(t.backgroundColor)}, #00000000)`,position:"absolute",backgroundColor:"transparent"};return se.default.createElement(se.default.Fragment,null,"HIDDEN"!==e&&se.default.createElement(ce.AppBar,{position:"static",elevation:0,sx:Object.assign({zIndex:1e5,height:n,minHeight:n},r)},se.default.createElement(ce.Toolbar,{variant:"dense",sx:{height:n,minHeight:n}},se.default.createElement(ce.Box,{sx:{flex:1}},t.cancelButton.visible&&se.default.createElement(se.default.Fragment,null,se.default.createElement(ye,Object.assign({onClick:t.onBackPress,icon:t.cancelButton.foreground.iconVisible&&se.default.createElement(ue.a,{sx:{fontSize:12,mr:"5px"}})},t.cancelButton)))),se.default.createElement(ce.Box,null,se.default.createElement(ce.Typography,{variant:"h6",noWrap:!0,component:"div",fontSize:18,fontWeight:600},se.default.createElement(ve,{config:t.title}))),se.default.createElement(ce.Box,{sx:{flex:1}}))),se.default.createElement(Se.Provider,{value:i},t.children))}function we(t){return{textOverflow:"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`,overflow:"hidden",whiteSpace:t>1?"normal":"nowrap",display:t>1?"-webkit-box":"block"}}function xe(t){var e,n;const o=(null===(e=t.barcodeMappedData)||void 0===e?void 0:e.state)||"LOADING",i=(null===(n=t.barcodeMappedData)||void 0===n?void 0:n.value)||{title:"",subtitle:"",barcodeImage:""},r=!t||"LOADED"!==o,a=t.imageSize,s=t.barcodeTitle.visible||t.barcodeSubtitle.visible||t.counterForm,l=t.counterForm&&{"&:hover, &:focus, &:active, &":{borderColor:pe.getColorValue(t.counterForm.manualCountOutlineColor),backgroundColor:"transparent"}};return se.default.createElement(ce.Box,{sx:{display:"flex"},"data-sb-barcode-info":"1"},t.barcodeImageVisible&&se.default.createElement(ce.Box,{sx:{pr:s?"16px":0,display:"flex",alignItems:"center",justifyContent:"center"}},r?se.default.createElement(ce.Skeleton,{variant:"rounded",width:a,height:a,style:{borderRadius:8}}):se.default.createElement("img",{src:i.barcodeImage,alt:i.title,style:{width:a,height:a,borderRadius:8}})),s&&se.default.createElement(ce.Box,{sx:{flex:1,display:"flex",flexDirection:"column",verticalAlign:"middle",justifyContent:"center",m:0,p:0,minWidth:0}},t.barcodeTitle.visible&&se.default.createElement(ce.Box,{display:r?"block":"flex",sx:{alignItems:"center"}},se.default.createElement(ce.Typography,{fontSize:16,fontWeight:"bold",sx:Object.assign(Object.assign({},we(t.maxNumberOfTitleLines)),ge(t.barcodeTitle))},r?se.default.createElement(ce.Skeleton,{variant:"text"}):i.title),t.displayRightArrow&&!r&&se.default.createElement(ue.a,{sx:{fontSize:16,fontWeight:"bold",color:pe.getColorValue(t.barcodeTitle.color)}})),t.barcodeSubtitle.visible&&se.default.createElement(ce.Typography,{fontSize:14,fontWeight:400,sx:Object.assign(Object.assign({},we(t.maxNumberOfSubtitleLines)),ge(t.barcodeSubtitle))},r?se.default.createElement(ce.Skeleton,{variant:"text"}):i.subtitle),t.counterForm&&se.default.createElement(ce.ButtonGroup,{variant:"outlined"},se.default.createElement(ce.Button,{sx:l,onClick:()=>t.counterForm.setCounter(t.counterForm.counter-1),disableRipple:!0},se.default.createElement(ue.a,{sx:{color:pe.getColorValue(t.counterForm.manualCountChangeColor)}})),se.default.createElement(ce.Button,{sx:Object.assign(Object.assign({},l),{color:pe.getColorValue(t.counterForm.manualCountChangeColor),fontWeight:"bold",fontSize:16}),onClick:t.counterForm.onNumberClick,disableRipple:!0},t.counterForm.counter),se.default.createElement(ce.Button,{sx:l,onClick:()=>t.counterForm.setCounter(t.counterForm.counter+1),disableRipple:!0},se.default.createElement(ue.a,{sx:{color:pe.getColorValue(t.counterForm.manualCountChangeColor)}})))))}function Ee(t){const e=Object(se.useContext)(de).getColorValue;return t.visible?se.default.createElement(ce.Button,{onClick:t.onClick,type:t.type,sx:Object.assign(Object.assign({},t.style),{"&:hover, &:focus, &:active, &":{borderStyle:"solid",borderColor:e(t.background.strokeColor),borderWidth:t.background.strokeWidth,backgroundColor:e(t.background.fillColor),textTransform:"none",outline:"none"}}),disableRipple:!0},t.foreground.iconVisible&&t.icon&&se.default.createElement(t.icon,{sx:{color:e(t.foreground.color),pr:2}}),se.default.createElement(ve,{config:{visible:!0,text:t.text,color:t.foreground.color,useShadow:t.foreground.useShadow}})):null}var Le=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function _e(t){var e,{modalOverlayColor:n}=t,o=Le(t,["modalOverlayColor"]);const i={backdrop:{style:{backgroundColor:pe.getColorValue(n)}}},r=Object.assign(Object.assign({},o.PaperProps),{sx:Object.assign(Object.assign({},null===(e=o.PaperProps)||void 0===e?void 0:e.sx),{maxWidth:400})});return se.default.createElement(ce.Dialog,Object.assign({},o,{componentsProps:i,PaperProps:r}))}function Oe(t){const e=Object(se.useContext)(de).getColorValue,n=!t.barcodeMappedData||"LOADED"!==t.barcodeMappedData.state,o={backgroundColor:e(n?t.sheetColorLoading:t.sheetColorLoaded)},[i,r]=se.default.useState(),a=Object(se.useRef)((()=>{}));Object(se.useEffect)((()=>{t.open&&r(!1)}),[t.open]);const s=()=>{a.current=t.handleCancel,r(!0)};return se.default.createElement(_e,{modalOverlayColor:t.modalOverlayColor,open:t.open&&!i,fullWidth:!0,TransitionProps:{onExited:()=>{i&&a.current()}},onClose:()=>{n||s()}},se.default.createElement(ce.DialogContent,{style:o},se.default.createElement(xe,Object.assign({},t,{maxNumberOfTitleLines:2,maxNumberOfSubtitleLines:1,imageSize:68}))),se.default.createElement(ce.DialogActions,{style:o},se.default.createElement(ue.a,{container:!0,spacing:2,sx:{overflow:"hidden"}},se.default.createElement(ue.a,{item:!0,xs:12},se.default.createElement(ue.a,{color:e(t.dividerColor)})),n?se.default.createElement(ue.a,{item:!0,xs:12,sx:{textAlign:"center"}},se.default.createElement(ce.Box,null,se.default.createElement(ce.CircularProgress,{sx:{color:e(t.loadingMessage.color),verticalAlign:"middle",mr:2}}),se.default.createElement(ve,{config:t.loadingMessage}))):se.default.createElement(se.default.Fragment,null,se.default.createElement(ue.a,{item:!0,xs:6},se.default.createElement(Ee,Object.assign({style:{width:"100%"},onClick:s},t.cancelButton))),se.default.createElement(ue.a,{item:!0,xs:6},se.default.createElement(Ee,Object.assign({style:{width:"100%"},onClick:()=>{a.current=t.handleSubmit,r(!0)}},t.submitButton)))))))}function ke(t){const e=Object(se.useRef)(!0);Object(se.useEffect)((()=>(e.current=!0,()=>{e.current=!1})));const[,n]=Object(se.useReducer)((t=>t+1),0),o=Object(se.useRef)();return Object(se.useMemo)((()=>{o.current={loading:!0,value:void 0,error:null}}),[t]),function(t,e){Object(se.useMemo)((()=>{t&&t.then((t=>{e({loading:!1,error:null,value:t})})).catch((t=>{e({loading:!1,error:{reason:t},value:void 0})}))}),[t])}(t,(t=>{o.current=t,e.current&&n()})),t?o.current:null}var Te=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};const Pe=Object(se.createContext)(null);class We{constructor(t,e){this.barcodeItemMapper=t,this.onError=e,this.cache=new Map,this.cacheEntryPendingRetries=[],this.hash=t=>t.id(),this.onEvictionListeners=new Set}mapBarcodeToBarcodeItem(t,e){return Te(this,void 0,void 0,(function*(){return{count:e,rawBytes:yield B.toBase64(t.rawBytes),type:t.format,text:t.text,parsedDocument:t.parsedDocument}}))}getBarcodeMappedData(t){const e=this.hash(t);if(!this.cache.has(e)){const n=(()=>Te(this,void 0,void 0,(function*(){if(this.barcodeItemMapper){const e=yield this.mapBarcodeToBarcodeItem(t,1);return this.barcodeItemMapper(e)}return{title:t.text,subtitle:t.format,barcodeImage:yield B.toDataUrl(t.barcodeImage)}})))();this.cache.set(e,n)}return this.cache.get(e)}useBarcodeMappedData(t){const e=Object(se.useRef)(!1),n=ke(t&&this.getBarcodeMappedData(t));if(Object(se.useEffect)((()=>{n&&n.error&&(e.current=!1,this.cacheEntryPendingRetries.push({barcode:t,retry:()=>{this.cache.delete(this.hash(t)),e.current=!0}}),this.onError((()=>{for(const t of this.cacheEntryPendingRetries)t.retry();this.cacheEntryPendingRetries.length=0}),(()=>{e.current=!0;for(const t of this.cacheEntryPendingRetries)for(const e of this.onEvictionListeners)this.hash(e.barcode)==this.hash(t.barcode)&&e.callback();this.cacheEntryPendingRetries.length=0})))}),[n&&n.error]),!n)return null;let o;return o=n.value?"LOADED":n.error&&!e.current?"RETRY_DIALOG_OPEN":n.error?"FAILED":"LOADING",{value:n.value,state:o}}addOnEvictionListener(t){this.onEvictionListeners.add(t)}removeOnEvictionListener(t){this.onEvictionListeners.delete(t)}}function Be(t){if(!1===t.visible)return null;const e={backgroundColor:t.active?pe.getColorValue(t.activeBackgroundColor):pe.getColorValue(t.backgroundColor),color:t.active?pe.getColorValue(t.activeForegroundColor):pe.getColorValue(t.foregroundColor)};return se.default.createElement(ce.IconButton,{sx:Object.assign(Object.assign({},e),{"&:hover, &:focus":Object.assign({outline:"none"},e),width:48,height:48}),onClick:t.onClick},t.text&&se.default.createElement("span",{style:{fontSize:15}},pe.getLocalizedBarcodeText(t.text)),t.icon&&se.default.createElement(t.icon,{style:{padding:7}}))}var De=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Ie{constructor(){this.audioFile=new Audio}initialize(t){return De(this,void 0,void 0,(function*(){t.successBeepEnabled&&(this.audioFile.src="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAACAE00QSBpc29taXNvMgAAAAhmcmVlAAASCG1kYXQBQCKAo3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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AgMDAwMDAwMDAgMDAwMDA4NDAgMDAwMDAyMEYgMDAwMDAwMDAwMDAwMERCMSAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMA=="))}))}beep(t){t.successBeepEnabled&&this.play()}play(){return De(this,void 0,void 0,(function*(){try{yield this.audioFile.play()}catch(t){}}))}}Ie.INSTANCE=new Ie;var Re=Ie;class Me{constructor(){this.DURATION=200}vibrate(t){t.enabled&&navigator.vibrate&&navigator.vibrate(this.DURATION)}}Me.INSTANCE=new Me;var Fe=Me,je=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Ve extends Error{constructor(t,e,n){super(e),this.name="",this.name=t,this.message=e,this.webApiError=n}static mediaDevicesUndefined(){return new Ve(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? If so, please use a secure context (HTTPS) or use 'localhost' explicitly.")}static enumerateDevicesFailed(){return new Ve(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? Because we're unable to query query navigator.mediaDevices?.enumerateDevices")}static mediaDeviceNotFound(t){return new Ve(this.MESSAGE.ENUMERATE_FAILED,"Does your device even have a camera? Because we were unable to query navigator.mediaDevices?.getUserMedia().",t)}static permissionDenied(t){return new Ve(this.MESSAGE.PERMISSION_DENIED,"Camera permission has not been granted. Please prompt your users again to grant permission.",t)}static unknown(t){return new Ve(this.MESSAGE.UNKNOWN,"\n Unfortunately we were unable to query navigator.mediaDevicess.getUserMedia, \n and unable to determine the reason why. This may be caused by the user to denied the permission prompt. \n Or you may be using an in-app browser that itself has not been granted permission to use the camera.\n Or your users may be using a niche browser that does not support the media API at all!\n ",t)}static tryCheckPermission(){return je(this,void 0,void 0,(function*(){if(!this.permissionState)try{const t=yield navigator.permissions.query({name:"camera"});this.permissionState=t.state}catch(t){this.permissionState=this.PERMISSION_STATE.UNKNOWN}}))}static hasDeniedPermission(){return this.permissionState===this.PERMISSION_STATE.DENIED}static hasCheckedPermission(){return!!this.permissionState}}Ve.PERMISSION_STATE={GRANTED:"granted",DENIED:"denied",PROMPT:"prompt",UNKNOWN:"unknown"},Ve.MESSAGE={DEVICES_UNDEFINED:"MediaError_DevicesUndefined",DEVICE_NOT_FOUND:"MediaError_DeviceNotFound",ENUMERATE_FAILED:"MediaError_EnumerateFailed",PERMISSION_DENIED:"MediaError_PermissionDenied",UNKNOWN:"MediaError_Unknown"};var ze=n(5);const Ne=ze.a.svg`
3
3
  animation: rotate 2s linear infinite;
4
4
  width: 50px;
5
5
  height: 50px;
@@ -34,4 +34,4 @@
34
34
  `;return se.default.createElement("div",{style:{top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100}},se.default.createElement(t,{width:"101",height:"100",viewBox:"0 0 101 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"},se.default.createElement("circle",{cx:"50.5",cy:"50",r:"50",fill:"#3E3E3E","fill-opacity":"0.35"}),se.default.createElement("path",{d:"M90.5153 49.6094C91.715 49.6094 92.6933 50.5827 92.6321 51.7808C92.1218 61.7815 88.0988 71.3096 81.2342 78.6635C73.8743 86.548 63.7963 91.3454 53.036 92.0868C42.2757 92.8282 31.6351 89.4582 23.2634 82.6576C15.455 76.3147 10.1633 67.4283 8.28624 57.5922C8.06135 56.4138 8.89694 55.3155 10.0853 55.1509C11.2737 54.9864 12.3642 55.8183 12.5959 56.9954C14.3176 65.7412 19.0487 73.6367 26.0026 79.2856C33.5201 85.3922 43.0751 88.4183 52.7374 87.7526C62.3998 87.0869 71.4494 82.7789 78.0584 75.699C84.1719 69.1497 87.7754 60.68 88.2814 51.7807C88.3495 50.5829 89.3156 49.6094 90.5153 49.6094Z",fill:"white"}),se.default.createElement("path",{d:"M40.7013 23.4514C40.2751 22.2667 40.8885 20.9518 42.1022 20.6166C45.5928 19.6526 49.2351 19.3251 52.8537 19.6567C57.2305 20.0577 61.4662 21.4131 65.2628 23.6273C69.0594 25.8416 72.3246 28.861 74.8286 32.4731C77.3326 36.0851 79.0146 40.2021 79.7562 44.5341C80.4978 48.8662 80.281 53.3082 79.121 57.5475C77.9611 61.7868 75.8862 65.7204 73.0423 69.0714C70.1985 72.4225 66.6548 75.1095 62.6606 76.9436C59.3583 78.4599 55.8145 79.3627 52.202 79.6146C50.9459 79.7022 49.9301 78.6662 49.9379 77.4072C49.9457 76.1481 50.9746 75.1443 52.2293 75.0398C55.1749 74.7942 58.0613 74.0382 60.758 72.8C64.1467 71.244 67.1532 68.9642 69.5659 66.1212C71.9787 63.2781 73.7391 59.9408 74.7232 56.3442C75.7073 52.7475 75.8912 48.9789 75.262 45.3035C74.6328 41.6281 73.2058 38.1353 71.0814 35.0708C68.957 32.0062 66.1867 29.4445 62.9657 27.5659C59.7446 25.6873 56.151 24.5374 52.4377 24.1972C49.4828 23.9265 46.5092 24.1737 43.6497 24.9219C42.4316 25.2406 41.1274 24.6362 40.7013 23.4514Z",fill:"white"}),se.default.createElement("path",{d:"M39.9232 61.6554C39.1643 62.5529 37.8105 62.673 37.0094 61.813C35.7171 60.4259 34.6502 58.8388 33.8523 57.1092C32.7564 54.7336 32.1944 52.1468 32.206 49.5307C32.2175 46.9146 32.8022 44.3328 33.9189 41.967C35.0356 39.6011 36.6573 37.5088 38.6697 35.8372C40.6822 34.1656 43.0365 32.9554 45.567 32.2916C48.0975 31.6279 50.7428 31.5268 53.3166 31.9954C55.8904 32.464 58.3303 33.4911 60.4644 35.0042C62.0183 36.1059 63.3827 37.4458 64.5093 38.9707C65.2077 39.916 64.8412 41.2247 63.8197 41.8061C62.7982 42.3875 61.5108 42.0174 60.7778 41.0986C59.9824 40.1015 59.0489 39.2181 58.0027 38.4763C56.3759 37.3229 54.5161 36.5401 52.5541 36.1828C50.5922 35.8256 48.5758 35.9027 46.6469 36.4086C44.7179 36.9146 42.9233 37.8371 41.3893 39.1113C39.8553 40.3855 38.6192 41.9804 37.7679 43.7838C36.9167 45.5872 36.471 47.5552 36.4622 49.5494C36.4534 51.5436 36.8818 53.5154 37.7172 55.3262C38.2544 56.4908 38.9515 57.5705 39.7858 58.5353C40.5545 59.4244 40.6821 60.7579 39.9232 61.6554Z",fill:"white"})))}}class kc extends se.default.Component{render(){return this.props.text?se.default.createElement("div",{style:{position:"absolute",top:this.props.top,bottom:this.props.bottom,display:"flex",width:"100%",justifyContent:"center"}},se.default.createElement("div",{style:{padding:"5px 10px",borderRadius:5,backgroundColor:on.TransparentGray,color:on.White,fontWeight:500,fontSize:13}},this.props.text)):null}}class Tc extends se.default.Component{constructor(t){super(t),this.state={element:t.element}}style(t){this.customStyle=t,this.forceUpdate()}update(t){this.setState({element:t})}formatText(t,e){if("None"!==e)return"Text"===e?t.text:t.format+" ("+t.text+")"}render(){var t,e,n,o,i;const r=this.state.element,a=this.props.configuration.style,s=this.formatText(r.code,this.props.configuration.textFormat),l=R.width(null!==(t=this.props.animateToPoints)&&void 0!==t?t:r.points);if(!s)return null;if(!r.points)return null;const c=null!==(n=null===(e=this.customStyle)||void 0===e?void 0:e.backgroundColor)&&void 0!==n?n:r.highlighted?a.highlightedTextBackgroundColor:a.textBackgroundColor,u=null!==(i=null===(o=this.customStyle)||void 0===o?void 0:o.textColor)&&void 0!==i?i:r.highlighted?a.highlightedTextColor:a.textColor;return se.default.createElement(nc.div,{ref:t=>this.label=t,onClick:()=>{this.props.onClick&&this.props.onClick(r)},style:{x:R.lowestX(r.points),y:R.highestY(r.points)+3,backgroundColor:c,fontSize:12,width:l,overflow:"hidden",color:u,borderRadius:5,position:"absolute",padding:"3px 7px",textAlign:"center",maxHeight:50,lineBreak:"anywhere",lineHeight:"22px",WebkitLineClamp:2,display:"-webkit-box",WebkitBoxOrient:"vertical"},animate:this.props.animateToPoints?{x:R.lowestX(this.props.animateToPoints),y:R.highestY(this.props.animateToPoints)+30}:{}},s)}}class Pc{constructor(){this.defaultFillColor="rgba(255, 0, 0, 0.3)",this.defaultHighlightedFillColor="rgba(0, 255, 0, 0.3)",this.polygonStrokeColor="rgba(255, 0, 0, 1)",this.polygonFillColor=this.defaultFillColor,this.polygonStrokeWidth=1,this.polygonCornerRadius=0,this.highlightedPolygonStrokeColor="rgba(0, 255, 0, 1)",this.highlightedPolygonFillColor=this.defaultHighlightedFillColor,this.highlightedPolygonStrokeWidth=2,this.highlightedPolygonCornerRadius=0,this.textColor="white",this.textBackgroundColor="rgba(255, 0, 0, 0.9)",this.highlightedTextColor="white",this.highlightedTextBackgroundColor="rgba(0, 255, 0, 0.9)"}}class Wc{constructor(){this.visible=!1,this.textFormat="Text",this.automaticSelectionEnabled=!1,this.style=new Pc}}class Bc{constructor(){this.topLabelTop=20,this.sheetHeight="95%",this.sheetTopMargin="10%"}}class Dc{constructor(){this.enabled=!1,this.style=new Bc}}class Ic extends Ut{constructor(){super(h.DEFAULT_VIDEO_RESOLUTION_HD),this.captureDelay=1e3,this.overlay=new Wc,this.scanAndCount=new Dc,this.gs1Handling="PARSE",this.onBarcodesDetected=function(t){}}static fromJson(t){const e=new Ic;return this.mapValues(t,e,["style","videoConstraints","overlay","scanAndCount","finder","userGuidance"]),this.mapFinderConfiguration(e,t),t.overlay&&(this.mapValues(t.overlay,e.overlay,["style"]),t.overlay.style&&this.mapValues(t.overlay.style,e.overlay.style)),t.scanAndCount&&(this.mapValues(t.scanAndCount,e.scanAndCount,["style"]),t.scanAndCount.style&&this.mapValues(t.scanAndCount.style,e.scanAndCount.style)),this.mapVideoConstraints(t,e),e}}class Rc{static warn(t){console.warn("[ScanbotSDK]",t)}}class Mc{constructor(t,e){this.p1=t,this.p2=e}}class Fc{static convertLinesToViewportLines(t,e){if(e&&t)return e.map((e=>new Mc(new R(e.p1.x*t.width,e.p1.y*t.height),new R(e.p2.x*t.width,e.p2.y*t.height))))}static convertToViewportPointsFromParentSize(t,e){return e?Ze.isEmpty(t)?void 0:e.map((e=>R.scaleUpTo(e,t))):Ze.toPolygon(t)}static calculateScale(t){let e,n=0,o=0;return 1>t.width/t.height?(e=t.height/1,n=(1-t.width/e)/2):(e=t.width/1,o=(1-t.height/e)/2),{x:n,y:o,containerScale:e}}static findScale(t,e){let n,o=0,i=0;return e.ratio(!0)>t.ratio(!0)?(n=t.width/e.width,i=(e.height-t.height/n)/2):(n=t.height/e.height,o=(e.width-t.width/n)/2),{x:o,y:i,scale:n}}static preventDefaultCallback(t){t.preventDefault()}static disableScreenMovement(){document.addEventListener("touchmove",Fc.preventDefaultCallback,{passive:!1}),document.body.scrollTop=document.documentElement.scrollTop=0,document.documentElement.style.overflow="hidden"}static enableScreenMovement(){document.removeEventListener("touchmove",Fc.preventDefaultCallback),document.documentElement.style.overflow="auto"}static findContainerOrThrow(t){var e;const n=null!==(e=t.container)&&void 0!==e?e:document.getElementById(t.containerId);if(!n)throw Error("Unable to initialize scanner: Cannot find container element either from 'container' property or with the containerId property provided.");return n}}var jc=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Vc{static postBlob(t,e){return jc(this,void 0,void 0,(function*(){const n=yield fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e});return yield n.json()}))}static postImage(t,e){return jc(this,void 0,void 0,(function*(){const n=B.convertImageDataWrapperToImageData(e),o=B.createImageDataCanvas(n),i=yield new Promise((t=>o.toBlob((e=>t(e)))));return yield Vc.postBlob(t,i)}))}static recognizeBarcodes(t,e){return jc(this,void 0,void 0,(function*(){const n=yield Vc.postImage(t,e);return F.fromWorker(n,e)}))}}var zc=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Nc extends Ye{constructor(t){var e;super(t),this.shouldComputeSize=!0,this.paused=!1,this.barcodes=[],this.detectionRunning=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),this.backendurl=void 0,this.desiredRecognitionResolution=void 0,this.desiredRecognitionResolution=this.configuration.desiredRecognitionResolution,Object.assign(this.state,{isFinderVisible:null===(e=this.configuration.finder.visible)||void 0===e||e,zoom:void 0,action:"manual",image:void 0,bottomHintText:void 0})}get configuration(){return this._configuration||(this._configuration=Ic.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t){return zc(this,void 0,void 0,(function*(){const e=Fc.findContainerOrThrow(t);return new Promise(((n,o)=>{Object(se.render)(se.default.createElement(Nc,{container:e,configuration:t,onSuccess:n,onFailure:o}),e)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return zc(this,void 0,void 0,(function*(){Rc.warn("Barcode detection resumed"),yield this.resume()}))}pauseDetection(){Rc.warn("Barcode detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return zc(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return zc(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return zc(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n,o,i,r;return zc(this,void 0,void 0,(function*(){if(!this.enabled)return;if(this.paused)return;if(null===(t=this.configuration.scanAndCount)||void 0===t?void 0:t.enabled)return;if(this.detectionRunning)return;let a=!1;try{this.detectionRunning=!0;const t=yield this.recognizeBarcodes(!0,this.shouldComputeSize,this.configuration.returnBarcodeImage);if(this.shouldComputeSize=!1,!t)return;const s=t.barcodeResult;s.isEmpty()?this.configuration._onDetectionFailed&&(null===(e=this.configuration)||void 0===e||e._onDetectionFailed(null==s?void 0:s.imageData)):(a=!0,this.configuration.overlay.visible||this.configuration.onBarcodesDetected(s)),null===(n=this.overlay)||void 0===n||n.update(null===(o=this.finder)||void 0===o?void 0:o.holeRect,this.camera,t.barcodeResult.imageData,null!==(i=this.configuration.container)&&void 0!==i?i:this.configuration.containerId,t.barcodeResult.barcodes)}catch(t){console.log(t)}finally{this.detectionRunning=!1;const t=()=>requestAnimationFrame(this.detect.bind(this)),e=(null===(r=this.configuration.overlay)||void 0===r?void 0:r.visible)?0:this.configuration.captureDelay;a&&0!=e?setTimeout(t,e):t()}}))}setUseBackendService(t){console.log("Now using backend service for recognition: ",t),this.backendurl=t}recognizeBarcodes(t,e,n){var o,i,r,a,s,l;return zc(this,void 0,void 0,(function*(){window&&window.__SB_DEBUG_BARCODESCANNER_FORCE_DETERMINISTIC_MODE&&(t=!1);const c=t?Ye.DEFAULT_DETECTION_RESOLUTION:Ye.DETECTION_RESULTION_4K,u=null!==(o=this.desiredRecognitionResolution)&&void 0!==o?o:c;this.camera.finderFrame=null===(i=this.finder)||void 0===i?void 0:i.holeRect;const d=yield null===(r=this.camera)||void 0===r?void 0:r.createImageData(u);if(!d)return;e&&this.forceUpdate(),(null===(a=this.configuration.scanAndCount)||void 0===a?void 0:a.enabled)&&(this.setState({image:B.wrapperToBase64(d)}),void 0!==this.desiredRecognitionResolution?console.log("Recognizing barcodes with custom resolution:",this.desiredRecognitionResolution):console.log("Recognizing barcodes with max resolution:",Ye.DETECTION_RESULTION_4K,"(the actual resolution depends on your device and may be lower)"));const h=this.configuration.engineMode,p=this.configuration.barcodeFormats;let f;if(this.backendurl&&this.backendurl.length>0)f=yield Vc.recognizeBarcodes(this.backendurl,d);else{const e=yield this.bridge.postByTransferringArgs("recognizeBarcodes",[d,{live:t,engineMode:h,barcodeFormats:p,returnBarcodeImage:n,gs1Handling:this.configuration.gs1Handling}]);if(!this.enabled)return;if(null===e)return void(null===(l=(s=this.props).onLicenseError)||void 0===l||l.call(s));f=F.fromWorker(e.result,e.originalImage)}return this.configuration.barcodesRegexFilter&&(f.barcodes=f.barcodes.filter((t=>{var e;return null===(e=t.text)||void 0===e?void 0:e.match(this.configuration.barcodesRegexFilter)}))),{imageData:d,originalImage:undefined,barcodeResult:f}}))}setRecognitionResolution(t){this.desiredRecognitionResolution=t}getResolution(){return zc(this,void 0,void 0,(function*(){return new Promise(((t,e)=>{const n=this.camera.videoSize();n.width>0&&n.height>0?t(Ze.fromJson(n)):this.camera.didLoadVideo=()=>{const e=this.camera.videoSize();t(Ze.fromJson(e))}}))}))}saveExtractedImageData(){this.camera.saveExtractedData()}setFinderVisible(t){this.setState({isFinderVisible:t})}setZoom(t){this.setState({zoom:t})}setCameraDirection(t){this.camera.setDirection(t)}updateTorch(t){this.camera.videoStream.updateTorch(t)}getCapabilities(){return this.camera.videoStream.getCapabilities()}render(){var t,e,n,o,i,r,a;const s=(null===(t=this.configuration.scanAndCount)||void 0===t?void 0:t.enabled)?"Tap the shutter button to scan":void 0;return se.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),se.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},se.default.createElement(qe,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,zoom:null!==(n=this.state.zoom)&&void 0!==n?n:this.configuration.zoom,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),se.default.createElement(kc,{top:null===(o=this.configuration.scanAndCount)||void 0===o?void 0:o.style.topLabelTop,text:s}),se.default.createElement(_c,{ref:t=>this.scannedImage=t,image:this.state.image}),this.state.isFinderVisible&&se.default.createElement(Ke,{ref:t=>{this.finder=t},padding:this.props.viewFinderPadding,guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}),se.default.createElement(kc,{bottom:100,text:this.state.bottomHintText}),se.default.createElement(Oc,{visible:"processing"===this.state.action}),(null===(i=this.configuration.overlay)||void 0===i?void 0:i.visible)&&se.default.createElement(fc,{ref:t=>{t&&(this.overlay=t)},configuration:this.configuration.overlay,onPolygonSelected:t=>{const e=new F([t],void 0);this.configuration.onBarcodesDetected(e)},onBarcodeFound:(t,e,n)=>{var o;(null===(o=this.configuration.overlay)||void 0===o?void 0:o.onBarcodeFound)&&this.configuration.overlay.onBarcodeFound(t,e,n)},LabelComponent:Tc,labelComponentConfig:{}}),(null===(r=this.configuration.scanAndCount)||void 0===r?void 0:r.enabled)&&se.default.createElement(Ec,{ref:t=>this.bottomActionBar=t,action:this.state.action,isShowingImage:void 0!==this.state.image,onBurgerClick:()=>{this.popup.push(nn.PushBottom,this.barcodes)},onShutterButtonClick:()=>zc(this,void 0,void 0,(function*(){(new D).flash(),this.setState({action:"processing"});const t=(new Date).getTime(),e=yield this.recognizeBarcodes(!1,!1,!0);console.log("Recognition took:",((new Date).getTime()-t)/1e3),this.recognition=e;const n=this.countLabelText(e.barcodeResult.barcodes);this.setState({action:"manual",bottomHintText:n}),this.scannedImage.update(e.barcodeResult),this.barcodes.push(...e.barcodeResult.barcodes),this.bottomActionBar.update(this.barcodes),e.barcodeResult.barcodes.length>0&&this.configuration.onBarcodesDetected(e.barcodeResult)})),onScanMoreClick:()=>{this.resetCountImage()}}),se.default.createElement(rn,{ref:t=>this.popup=t,style:null===(a=this.configuration.scanAndCount)||void 0===a?void 0:a.style,onDeleteClick:()=>{if(confirm("Are you sure you want to delete all scanned barcodes?")){for(;this.barcodes.length>0;)this.barcodes.pop();console.log("Cleared barcodes",this.barcodes.length),this.popup.update(this.barcodes),this.bottomActionBar.update(void 0),this.resetCountImage(),this.popup.reset()}}}))}resetCountImage(){this.scannedImage.reset(),this.setState({image:void 0,bottomHintText:void 0})}countLabelText(t){return 0==t.length?"No codes scanned. Try again?":1==t.length?"1 Code Scanned":`${t.length} Codes Scanned`}}function Uc(t,e){return t&&(t.hasFacingOptions&&e.flipCameraButton.visible||t.isTorchAvailable&&e.flashButton.visible)||e.zoomButton.visible}function Hc(t){const e=t.zoomSteps.findIndex((e=>e==t.defaultZoomFactor)),[n,o]=Object(se.useState)(t.torchEnabledInitially),[i,r]=Object(se.useState)(e),a=t.zoomSteps[i],[s,l]=Object(se.useState)("BACK"==t.initialCameraModule?"environment":"user"),c=function(t){var e,n;const o=null===(n=null===(e=null==t?void 0:t.camera)||void 0===e?void 0:e.video)||void 0===n?void 0:n.parentElement,i=()=>o?o.getBoundingClientRect():null,[r,a]=Object(se.useState)(i());return Object(se.useEffect)((()=>{if(o){const t=()=>a(i());t();const e=new ResizeObserver(t);return e.observe(o),()=>{e.disconnect()}}}),[o]),r}(t.scanner),u=!!c;if(Object(se.useEffect)((()=>{var e;(null===(e=t.capabilities)||void 0===e?void 0:e.isTorchAvailable)&&u&&t.scanner.setTorchState(n)}),[t.capabilities,u,n]),Object(se.useEffect)((()=>{var e;u&&(null===(e=t.scanner)||void 0===e||e.setZoom(a))}),[u,a]),!t.capabilities||!c)return null;if(!Uc(t.capabilities,t.config))return null;const d=c.height-t.bottomPadding-48;return se.default.createElement(ce.Box,{style:{position:"absolute",marginTop:d,marginLeft:c.width/2,transform:"translateX(-50%)",display:"flex",justifyContent:"center",zIndex:1e3}},se.default.createElement(Be,Object.assign({},t.config.flashButton,{visible:t.capabilities.isTorchAvailable&&t.config.flashButton.visible,icon:n?ce.FlashlightOn:ce.FlashlightOff,active:n,onClick:()=>o(!n)})),se.default.createElement("div",{style:{width:20}}),se.default.createElement(Be,Object.assign({},t.config.zoomButton,{text:`${a.toFixed(1)}x`,active:i!==e,onClick:()=>r((i+1)%t.zoomSteps.length)})),se.default.createElement("div",{style:{width:20}}),se.default.createElement(Be,Object.assign({},t.config.flipCameraButton,{visible:t.capabilities.hasFacingOptions&&t.config.flipCameraButton.visible,active:"user"===s,icon:ce.FlipCameraIos,onClick:()=>{var e;const n="environment"===s?"user":"environment";l(n),null===(e=t.scanner)||void 0===e||e.setCameraDirection(n)}})))}var Gc=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};class Yc extends Tc{constructor(){super(...arguments),this.count=0,this.setCount=t=>{this.count=t,this.forceUpdate()}}render(){var t;const{barcodeItemConfiguration:e,barcodeItemInfoPosition:n,counterBadge:o}=this.props,i=this.state.element,r=null!==(t=this.props.animateToPoints)&&void 0!==t?t:i.points,a=i.code,s=i.highlighted,l=10,c=(R.lowestY(r)+R.highestY(r))/2,u=(R.lowestX(r)+R.highestX(r))/2,d=(()=>{const t={badgeY:c,badgeStyle:{transform:"translateX(-50%) translateY(-50%)"}};return"BELOW"===n?Object.assign(Object.assign({},t),{labelY:Math.max(R.highestY(r)+l,o?c-24-l:-1/0),labelStyle:{transform:"translateX(-50%)"}}):"ABOVE"===n?Object.assign(Object.assign({},t),{labelY:Math.min(R.lowestY(r)-l,o.visible?c+24+l:1/0),labelStyle:{transform:"translateX(-50%) translateY(-100%)"}}):"STACKED"===n?{badgeY:c,badgeStyle:{transform:"translateX(-50%) translateY(calc(-100% - 5px))"},labelY:c,labelStyle:{transform:o.visible?"translateX(-50%) translateY(5px)":"translateX(-50%) translateY(-50%)"}}:"DISABLED"===n?Object.assign(Object.assign({},t),{labelY:0,labelStyle:{display:"none"}}):void 0})(),h=!1===e.titleDeselected.visible&&!1===e.subtitleDeselected.visible,p={x:u,y:Math.round(d.labelY)},f={x:u,y:Math.round(d.badgeY)},m={duration:.25,easing:"linear"};return se.default.createElement(se.default.Fragment,null,se.default.createElement(nc.div,{ref:t=>this.label=t,style:Object.assign(Object.assign({},p),{position:"absolute",width:"100%",zIndex:100}),animate:this.props.animateToPoints?p:{},transition:m},se.default.createElement(be,{sx:Object.assign({p:1,maxWidth:232,cursor:"pointer",display:h?"inline-block":"block",zIndex:1500},d.labelStyle),styleConfig:s?e.backgroundSelected:e.backgroundDeselected,"data-sb-ar-barcode-info":"1",onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(i)}},se.default.createElement(Xc,{barcode:a,barcodeImageVisible:e.imageVisible,maxNumberOfTitleLines:1,maxNumberOfSubtitleLines:1,imageSize:42,displayRightArrow:!0,barcodeTitle:s?e.titleSelected:e.titleDeselected,barcodeSubtitle:s?e.subtitleSelected:e.subtitleDeselected}))),o.visible&&this.count>0&&se.default.createElement(nc.div,{style:Object.assign({position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100},f),animate:this.props.animateToPoints?f:{},transition:m},se.default.createElement(be,{styleConfig:Object.assign(Object.assign({},o.background),{cornerRadius:24+o.background.strokeWidth}),style:Object.assign(Object.assign({},d.badgeStyle),{width:48,height:48,color:pe.getColorValue(o.foregroundColor),display:"flex",justifyContent:"center",alignItems:"center",zIndex:1500,cursor:"pointer"}),onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(i)}},se.default.createElement(ce.Typography,{fontSize:16,fontWeight:"500"},"x",this.count))))}}function Xc(t){var{barcode:e}=t,n=Gc(t,["barcode"]);const o=Object(se.useContext)(Pe).useBarcodeMappedData(e);return se.default.createElement(xe,Object.assign({barcodeMappedData:o},n))}function Qc(t){const e=Object(se.useRef)(),n=Object(se.useRef)(null),[o,i]=(Object(se.useContext)(Se),Object(se.useState)(void 0)),[r,a]=Object(se.useState)(!1);Object(se.useEffect)((()=>{var n,o;t.scanningPaused?null===(n=e.current)||void 0===n||n.pause():null===(o=e.current)||void 0===o||o.resume()}),[t.scanningPaused]);const s=function(t){const e=new Wc;return e.visible=t.visible,t.polygon.visible?(e.style.highlightedPolygonFillColor=pe.getColorValue(t.polygon.selected.fillColor),e.style.highlightedPolygonStrokeColor=pe.getColorValue(t.polygon.selected.strokeColor),e.style.highlightedPolygonStrokeWidth=t.polygon.selected.strokeWidth,e.style.highlightedPolygonCornerRadius=t.polygon.selected.cornerRadius,e.style.polygonFillColor=pe.getColorValue(t.polygon.deselected.fillColor),e.style.polygonStrokeColor=pe.getColorValue(t.polygon.deselected.strokeColor),e.style.polygonStrokeWidth=t.polygon.deselected.strokeWidth,e.style.polygonCornerRadius=t.polygon.deselected.cornerRadius):(e.style.highlightedPolygonFillColor="transparent",e.style.highlightedPolygonStrokeColor="transparent",e.style.polygonFillColor="transparent",e.style.polygonStrokeColor="transparent"),e.automaticSelectionEnabled=!1,e}(t.arOverlay),l=Object.assign(Object.assign({},t.barcodeScannerViewConfig),{onBarcodesDetected:o=>{var i,r,a,s,l,c;null===(i=n.current)||void 0===i||i.update(null===(a=null===(r=e.current)||void 0===r?void 0:r.finder)||void 0===a?void 0:a.holeRect,null===(s=e.current)||void 0===s?void 0:s.camera,o.imageData,t.containerId,o.barcodes),null===(c=(l=t.barcodeScannerViewConfig).onBarcodesDetected)||void 0===c||c.call(l,o)},_onDetectionFailed:o=>{var i,r,a,s,l,c;null===(i=n.current)||void 0===i||i.update(null===(a=null===(r=e.current)||void 0===r?void 0:r.finder)||void 0===a?void 0:a.holeRect,null===(s=e.current)||void 0===s?void 0:s.camera,o,t.containerId,[]),null===(c=(l=t.barcodeScannerViewConfig)._onDetectionFailed)||void 0===c||c.call(l,o)}});return Object(se.useEffect)((()=>{const e=Uc(o,t.actionBarConfig);t.setActionButtonsVisible(e),a(e)}),[o,t.actionBarConfig]),se.default.createElement(se.default.Fragment,null,t.arOverlay.visible&&se.default.createElement(fc,{style:{zIndex:1e3,position:"absolute"},ref:n,LabelComponent:Yc,labelComponentConfig:t.arOverlay,onBarcodeFound:t.arOnBarcodeEnter,onPolygonClick:t.arOnBarcodeClick,configuration:s}),se.default.createElement(Hc,{config:t.actionBarConfig,scanner:e.current,capabilities:o,bottomPadding:t.actionBarBottomPadding,torchEnabledInitially:t.cameraConfiguration.flashEnabled,zoomSteps:t.cameraConfiguration.zoomSteps,defaultZoomFactor:t.cameraConfiguration.defaultZoomFactor,initialCameraModule:t.cameraConfiguration.cameraModule}),se.default.createElement(Nc,{ref:e,viewFinderPadding:t.viewFinderPadding,configuration:l,onSuccess:()=>class{static setFromScanner(t,e){var n;if(!t.current)return;const o=t.current.getCapabilities();e({hasFacingOptions:o.facingMode&&o.facingMode.length>0,isTorchAvailable:null!==(n=t.current.getActiveCameraInfo().supportsTorchControl)&&void 0!==n&&n})}}.setFromScanner(e,i),onFailure:t.onCameraPermissionDenied,onLicenseError:t.onLicenseError}))}function Zc(t){return Object(se.useMemo)((()=>{const e=(new Ic).videoConstraints;return e.facingMode="FRONT"===t.cameraConfiguration.cameraModule?"user":"environment",e.width={ideal:t.cameraConfiguration.idealPreviewResolution.width},e.height={ideal:t.cameraConfiguration.idealPreviewResolution.height},{videoConstraints:e,backgroundColor:pe.getColorValue(t.backgroundColor),userGuidance:t.userGuidance,finder:t.viewFinder,barcodesRegexFilter:new RegExp(t.recognizerConfiguration.barcodesRegexFilter),desiredRecognitionResolution:t.recognizerConfiguration.maximumRecognizerResolution,engineMode:t.recognizerConfiguration.engineMode,barcodeFormats:t.recognizerConfiguration.barcodeFormats,gs1Handling:t.recognizerConfiguration.gs1Handling}}),[t])}var $c=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};function qc(t){const[e,n]=Object(se.useState)(null),[o,i]=Object(se.useState)(!0),r=Object(se.useMemo)((()=>"__sb_"+Math.random()),[]),a=Object(se.useContext)(Pe),s=t.configuration.useCase,l=Object.assign(Object.assign({},Zc(t.configuration)),{onBarcodesDetected:e=>{e.barcodes.length>0&&!s.arOverlay.visible&&t.scanningEnabled.current&&n(e.barcodes[0])},onError:t.onError,returnBarcodeImage:!s.barcodeInfoMapping.barcodeItemMapper,containerId:r,captureDelay:0}),c=n=>$c(this,void 0,void 0,(function*(){let o;o=null===e?[]:[yield a.mapBarcodeToBarcodeItem(n,1)];const i={items:o};t.onSubmit(i)}));Object(se.useEffect)((()=>{e&&(Re.INSTANCE.beep(t.configuration.sound),Fe.INSTANCE.vibrate(t.configuration.vibration))}),[e]),Object(se.useEffect)((()=>{null===e||s.confirmationSheetEnabled||c(e)}),[e,s.confirmationSheetEnabled]);const u=a.useBarcodeMappedData(e);Object(se.useEffect)((()=>{"FAILED"===(null==u?void 0:u.state)&&n(null)}),[null==u?void 0:u.state]);const d=Object(se.useContext)(Se);return se.default.createElement(se.default.Fragment,null,se.default.createElement(Oe,Object.assign({open:!!u&&["LOADED","LOADING"].includes(u.state)&&s.confirmationSheetEnabled,handleCancel:()=>{n(null)},handleSubmit:()=>{c(e)},barcodeMappedData:u},{sheetColorLoaded:(h=s).sheetColor,sheetColorLoading:h.barcodeInfoMapping.sheetColor,barcodeImageVisible:h.barcodeImageVisible,barcodeTitle:h.barcodeTitle,barcodeSubtitle:h.barcodeSubtitle,cancelButton:h.cancelButton,submitButton:h.submitButton,dividerColor:h.dividerColor,loadingMessage:h.barcodeInfoMapping.loadingMessage},{displayRightArrow:!1,modalOverlayColor:s.modalOverlayColor})),se.default.createElement(ce.Box,{id:r,sx:{width:"100%",height:d.remainingVisibleBodyHeight}},se.default.createElement(Qc,{cameraConfiguration:t.configuration.cameraConfiguration,scanningPaused:null!==e,setActionButtonsVisible:i,viewFinderPadding:{minTopPadding:d.minTopPaddingForViewFinder,minBottomPadding:o?80:0},barcodeScannerViewConfig:l,arOnBarcodeClick:t=>n(t),arOnBarcodeEnter:e=>{s.arOverlay.automaticSelectionEnabled&&t.scanningEnabled.current&&n(e)},arOverlay:Object.assign(Object.assign({},s.arOverlay),{counterBadge:Object.assign(Object.assign({},s.arOverlay.counterBadge),{visible:!1})}),containerId:r,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:16,onCameraPermissionDenied:t.onCameraPermissionDenied,onLicenseError:t.onError})));var h}function Kc(t){const e=Object.assign(Object.assign({},t.title),{text:pe.getLocalizedBarcodeText(t.title.text).replace("%d",t.numBarcodes.toString())});return se.default.createElement(se.default.Fragment,null,se.default.createElement(ye,Object.assign({},t.leftButton)),se.default.createElement(ce.Typography,{sx:{flex:2,textAlign:"center",fontWeight:600,fontSize:18}},se.default.createElement(ve,{config:e})),se.default.createElement(ye,Object.assign({},t.rightButton)))}function Jc(){return se.default.createElement("div",{style:{width:30,height:6,backgroundColor:ce.grey[300],borderRadius:3,position:"absolute",top:8,left:"calc(50% - 15px)"},"data-sb-drawer-puller":"1"})}function tu(t){return se.default.createElement(ce.Box,Object.assign({sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",paddingTop:2,paddingBottom:1,touchAction:"none"},ref:t.innerRef},t.dragProps),se.default.createElement(Jc,null),se.default.createElement(Kc,Object.assign({},t.drawerHeaderContentProps)))}function eu(t){return se.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"38",viewBox:"0 0 41 38",fill:"none"},se.default.createElement("path",{d:"M4.09514 37.0902V10.6304L0.019043 1.87823L3.18969 0.348877L7.76144 10.6304H32.6886L37.2484 0.348877L40.419 1.87823L36.3549 10.6304V37.0902H4.09514ZM15.994 22.013H24.494C24.9461 22.013 25.3211 21.8632 25.619 21.5637C25.9169 21.2641 26.0658 20.8871 26.0658 20.4325C26.0658 19.9779 25.9169 19.6038 25.619 19.3101C25.3211 19.0164 24.9461 18.8695 24.494 18.8695H15.994C15.5419 18.8695 15.167 19.0193 14.8691 19.3189C14.5712 19.6184 14.4223 19.9955 14.4223 20.45C14.4223 20.9046 14.5712 21.2788 14.8691 21.5725C15.167 21.8662 15.5419 22.013 15.994 22.013ZM7.50164 33.6837H32.9364V14.0489H7.50164V33.6837Z",fill:t.color}))}function nu(t){return 0!==t.numBarcodes?null:se.default.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"column",marginTop:"auto",marginBottom:"auto",overflowY:"scroll"}},t.style.placeholderIcon.visible&&se.default.createElement(ce.Avatar,{style:{backgroundColor:pe.getColorValue(t.style.placeholderIconBackground),width:100,height:100}},se.default.createElement(eu,{color:pe.getColorValue(t.style.placeholderIcon.color)})),se.default.createElement(ce.Typography,{style:{marginTop:20},variant:"h6"},se.default.createElement(ve,{config:t.style.placeholderTitle})),se.default.createElement(ce.Typography,{style:{marginTop:20,paddingLeft:"10%",paddingRight:"10%",maxWidth:400,textAlign:"center"},variant:"body2"},se.default.createElement(ve,{config:t.style.placeholderSubtitle})),t.onStartClick&&t.style.startScanningButton.visible&&se.default.createElement(Ee,Object.assign({style:{width:"60%",marginTop:20}},t.style.startScanningButton,{visible:!0,onClick:t.onStartClick})))}function ou(t,e,n){const o=Object(se.useRef)(),i=Object(se.useRef)(null),[r,a]=Object(se.useState)(),[s,l]=Object(se.useState)(!1),c=Object(se.useRef)([]),u=t=>{let n="none";if(c.current.length>0){const e=200,o=((t,e)=>{let n=t[0],o=Math.abs(n.time-e);for(let i=1;i<t.length;i++){const r=Math.abs(t[i].time-e);r<o&&(n=t[i],o=r)}return n})(c.current,t.timeStamp-e),i=o.y-t.clientY,r=100;i>r?n="up":i<-r&&(n="down")}c.current.splice(0,c.current.length),e(new R(t.clientX,t.clientY),n)},d={onPointerDown:t=>{t.target.setPointerCapture(t.pointerId),l(!0),i.current=new R(t.clientX,t.clientY),a(R.empty()),t.stopPropagation()},onPointerMove:e=>{if(!s)return;const n=new R(e.clientX,e.clientY);o.current=e,a(n),t(n),c.current.push({x:e.clientX,y:e.clientY,time:e.timeStamp})},onPointerUp:t=>{t.target.releasePointerCapture(t.pointerId),l(!1),u(t)},onPointerCancel:t=>{t.target.releasePointerCapture(t.pointerId),l(!1),n()}};return{startPoint:i,currentPoint:r,props:d,stop:()=>{o.current.stopPropagation()},dragOngoing:s}}function iu(t){const[e,n]=Object(se.useState)(0),[o,i]=Object(se.useState)(!1),r=Object(se.useRef)(null),a=Object(se.useContext)(Se).height,s=t=>{n(t),i(!0),setTimeout((()=>{i(!1)}),500)},l=e=>{const n=e-c.startPoint.current.y;return I((t.isOpen?100:0)-100*n/(window.innerHeight-a-t.closedSheetVisibleHeight),0,100)},c=ou((t=>{n(l(t.y))}),((e,n)=>{if(e.y===c.startPoint.current.y)return;let o;o=l(e.y)<50?"swipe-to-close":"swipe-to-open","up"===n&&(o="swipe-to-open"),"down"===n&&(o="swipe-to-close"),t.onSwipe(o)}),(()=>{}));return Object(se.useEffect)((()=>{o||c.dragOngoing||!r||(t.isOpen||0===e?t.isOpen&&100!==e&&s(100):s(0))}),[t.isOpen,e,c.dragOngoing]),se.createElement("div",null,se.createElement(ue.a,{variant:"persistent",anchor:"bottom",open:!0,onClose:()=>{},onOpen:()=>{},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},PaperProps:{style:{height:`calc((100 * ${fe} - ${a}px - ${t.closedSheetVisibleHeight}px) * ${e} / 100 + ${t.closedSheetVisibleHeight}px)`,overflow:"hidden",borderRadius:10,borderBottomLeftRadius:0,borderBottomRightRadius:0,transition:o?"height 500ms":void 0,backgroundColor:pe.getColorValue(t.contentStyle.sheetColor)},elevation:24}},se.createElement(tu,{innerRef:t=>{r.current=t},drawerHeaderContentProps:t.drawerHeaderContentProps,dragProps:c.props}),t.children,se.createElement(nu,{numBarcodes:t.numBarcodes,style:t.contentStyle,onStartClick:()=>t.onSwipe("swipe-to-close")})))}var ru=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};function au(t){var{inputRef:e}=t,n=ru(t,["inputRef"]);const o=Object.assign(Object.assign({},n),{style:Object.assign(Object.assign({},n.style||{}),{border:"none",display:"block",outlineWidth:0,width:"100%"})});return se.default.createElement("input",Object.assign({},o,{ref:e}))}function su(t){const e=!!t.barcode,[n,o]=se.default.useState(""),i=se.default.useRef(null),r={backgroundColor:pe.getColorValue(t.dialogStyling.sheetColor)};return Object(se.useEffect)((()=>{e&&o(String(t.barcode.count))}),[e]),se.default.createElement(se.default.Fragment,null,se.default.createElement(_e,{open:e,modalOverlayColor:t.dialogStyling.modalOverlayColor,TransitionProps:{onEnter:()=>{var t;return null===(t=i.current)||void 0===t?void 0:t.focus()}},onClose:t.onCancel,PaperProps:{component:"form",onSubmit:e=>{e.preventDefault(),t.setCounter({type:"setCount",barcodes:[t.barcode.barcode],computeNewCount:()=>parseInt(n)||0})}}},se.default.createElement(ce.DialogContent,{style:r},se.default.createElement(ce.Typography,{fontSize:16,fontWeight:500,textAlign:"center"},se.default.createElement(ve,{config:t.dialogStyling.title})),se.default.createElement(ce.Typography,{fontSize:14,textAlign:"center"},se.default.createElement(ve,{config:t.dialogStyling.info})),se.default.createElement(ce.Box,{sx:{display:"flex",border:"2px solid",borderColor:pe.getColorValue(t.dialogStyling.dividerColor),mh:2,mb:0,p:1,borderRadius:1}},se.default.createElement(au,{inputRef:i,value:n,onChange:t=>{const e=parseInt(t.target.value.replaceAll(/[^0-9]/g,""));o(e>=0?e.toString():"")},type:"text",pattern:"[0-9]*"}),t.dialogStyling.clearTextButton.visible&&se.default.createElement(ue.a,{sx:{marginLeft:"auto",paddingLeft:1},onClick:()=>o(""),htmlColor:pe.getColorValue(t.dialogStyling.clearTextButton.color)}))),se.default.createElement(ce.DialogActions,{sx:Object.assign(Object.assign({},r),{pt:0})},se.default.createElement(ue.a,{container:!0,spacing:2},se.default.createElement(ue.a,{item:!0,xs:12},se.default.createElement(ue.a,{color:pe.getColorValue(t.dialogStyling.dividerColor)})),se.default.createElement(ue.a,{item:!0,xs:6},se.default.createElement(Ee,Object.assign({style:{width:"100%"},onClick:t.onCancel},t.dialogStyling.cancelButton))),se.default.createElement(ue.a,{item:!0,xs:6},se.default.createElement(Ee,Object.assign({icon:ce.Replay,style:{width:"100%"},onClick:()=>{},type:"submit"},t.dialogStyling.updateButton)))))))}function lu(t){return se.default.createElement("div",{style:{top:0,width:"100%",marginTop:"1px",marginLeft:"1px",height:"calc(100% - 2px)",position:"absolute",backgroundColor:pe.getColorValue(t.config.backgroundColor),display:"flex",alignItems:"right",justifyContent:"right"}},se.default.createElement(ue.a,{style:{height:"100%",color:pe.getColorValue(t.config.iconColor),paddingRight:t.visibleOffset/2,cursor:"pointer"}}))}const cu=0,uu=800,du=1200;function hu(t){switch(t){case"mobile":return Object(ce.useMediaQuery)("(min-width:"+cu+"px) and (max-width:"+(uu-1)+"px)");case"tablet":return Object(ce.useMediaQuery)("(min-width:"+uu+"px) and (max-width:"+(du-1)+"px)");case"desktop":return Object(ce.useMediaQuery)("(min-width:"+du+"px)")}}const pu=150;function fu(t){const[e,n]=Object(se.useState)(0),[o,i]=Object(se.useState)(!1);let r;const a=ou((t=>{let e=a.startPoint.current.x-t.x;e<0?a.stop():n(-e)}),(t=>{if(t.x===a.startPoint.current.x)return;const e=a.startPoint.current.x-t.x;c(e>75?pu:0)}),(()=>{c(0)})),s=Object(se.useContext)(Pe),l=s.useBarcodeMappedData(t.barcode);Object(se.useEffect)((()=>{const e={barcode:t.barcode,callback:()=>t.onDelete(t.barcode)};return s.addOnEvictionListener(e),()=>{s.removeOnEvictionListener(e)}}),[]);const c=e=>{const o=e>=pu,a=-r.getBoundingClientRect().width;n(o?a:0),i(!0),setTimeout((()=>{i(!1),o&&t.onDelete(t.barcode)}),200)},u=hu("desktop")&&t.swipeToDeleteConfig.enabled,d=!u&&t.swipeToDeleteConfig.enabled;return Object(se.useEffect)((()=>{d||c(0)}),[d]),se.default.createElement(ce.Box,{sx:{px:2},style:{width:"100%",paddingRight:0},ref:t=>r=t},se.default.createElement(lu,{config:t.swipeToDeleteConfig,visibleOffset:pu}),se.default.createElement(ce.Box,Object.assign({sx:{width:"100%",backgroundColor:pe.getColorValue(t.sheetColor),transform:`translateX(${e}px)`,transition:o?"transform 200ms ease-in-out":void 0,touchAction:"pan-y",display:"flex",alignItems:"center",paddingTop:"16px",paddingBottom:"16px",columnGap:"16px"}},d?a.props:{}),se.default.createElement(xe,Object.assign({barcodeMappedData:l},t)),null!==t.readonlyCount&&se.default.createElement(ce.Box,{sx:{fontSize:18,marginTop:"auto",flex:1,textAlign:"right",color:pe.getColorValue("?sbColorOnSurfaceVariant")}},"x",t.readonlyCount),u&&se.default.createElement(ue.a,{sx:{height:"100%",marginLeft:"auto",cursor:"pointer",color:pe.getColorValue("?sbColorOnSurface")},onClick:()=>t.onDelete(t.barcode)}),se.default.createElement(ce.Box,{sx:{width:"0px"}})))}function mu(t){const e=pe.getColorValue(t.sheetContent.dividerColor),n=t.sheetContent.manualCountChangeEnabled&&"COUNTING"===t.mode;return se.default.createElement(se.default.Fragment,null,se.default.createElement(ce.Divider,{style:{borderColor:e}}),t.barcodes.length>0&&se.default.createElement(ue.a,{sx:{width:"auto",flex:1,overflowY:"auto",overflowX:"hidden"},role:"presentation"},se.default.createElement(ue.a,{sx:{p:0}},t.barcodes.map((({barcode:o,count:i})=>se.default.createElement(ue.a,{key:o.format+o.text,sx:{padding:0,borderBottom:`1px solid ${e}`}},se.default.createElement(fu,{barcode:o,onDelete:()=>t.onBarcodeChange({type:"remove",barcode:o}),counterForm:n&&{counter:i,manualCountChangeColor:t.sheetContent.manualCountChangeColor,manualCountOutlineColor:t.sheetContent.manualCountOutlineColor,setCounter:e=>{t.onBarcodeChange({type:"setCount",barcodes:[o],computeNewCount:()=>e})},onNumberClick:()=>t.onNumberClick({barcode:o,count:i})},readonlyCount:"COUNTING"!==t.mode||t.sheetContent.manualCountChangeEnabled?null:i,maxNumberOfTitleLines:1,maxNumberOfSubtitleLines:1,displayRightArrow:!1,imageSize:n?84:40,barcodeImageVisible:t.sheetContent.barcodeItemImageVisible,barcodeTitle:t.sheetContent.barcodeItemTitle,barcodeSubtitle:t.sheetContent.barcodeItemSubtitle,swipeToDeleteConfig:t.sheetContent.swipeToDelete,sheetColor:t.sheetContent.sheetColor})))))))}function gu(t){return se.default.createElement(ce.Badge,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:t.count,showZero:!0,color:"primary",overlap:"circular",slotProps:{badge:{style:{backgroundColor:t.backgroundColor,color:t.foregroundColor,fontWeight:"bold"}}}},t.children)}function vu(t){if(!t.buttonStyling.visible)return null;return se.default.createElement(ce.Box,{style:t.style},se.default.createElement(gu,{count:t.count,backgroundColor:pe.getColorValue(t.buttonStyling.badgeBackgroundColor),foregroundColor:pe.getColorValue(t.buttonStyling.badgeForegroundColor)},se.default.createElement(ce.IconButton,{sx:{backgroundColor:pe.getColorValue(t.buttonStyling.backgroundColor),width:60,height:60,"&:hover, &:focus":{backgroundColor:pe.getColorValue(t.buttonStyling.activeBackgroundColor),outline:"none"}},onClick:t.onClick,disableRipple:!0,disableFocusRipple:!0},se.default.createElement(ue.a,{sx:{color:pe.getColorValue(t.buttonStyling.foregroundColor),fontSize:"24pt","&:hover, &:focus":{color:pe.getColorValue(t.buttonStyling.activeForegroundColor)}}}))))}const Au=(t,e)=>t.format===e.format&&t.text===e.text;function bu(t,e){switch(e.type){case"setCount":{let n=[...t];for(const t of e.barcodes){const o=n.findIndex((e=>Au(e.barcode,t)));if(-1===o)n.push({barcode:t,count:e.computeNewCount(0)});else{const t=n[o];n[o]=Object.assign(Object.assign({},t),{count:e.computeNewCount(t.count)})}}return n}case"remove":return t.map((t=>Object.assign(Object.assign({},t),{count:Au(t.barcode,e.barcode)?0:t.count})));case"clear":return t.map((t=>Object.assign(Object.assign({},t),{count:0})));case"setHtmlElements":let n=!1;const o=t.map((t=>Au(t.barcode,e.barcode)?(n=!0,Object.assign(Object.assign({},t),{polygonElement:e.polygonElement,labelElement:e.labelElement})):t));return n||o.push({barcode:e.barcode,count:0,labelElement:e.labelElement,polygonElement:e.polygonElement}),o}}var yu=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};function Su(t){const e=Object(se.useRef)(),[n,o]=Object(se.useReducer)(bu,[]),[i,r]=Object(se.useState)(),a=Object(se.useRef)(new Date("2001-01-01")),[s,l]=se.default.useState(null),[c,u]=Object(se.useState)(!1),d=Object(se.useMemo)((()=>"__sb_"+Math.random()),[]),[h,p]=Object(se.useState)(!0),f=Object(se.useContext)(Pe),m=t.configuration.useCase,g=Object(se.useRef)(Object.assign(Object.assign({},Zc(t.configuration)),{onBarcodesDetected:e=>{if(!((new Date).getTime()-a.current.getTime()<m.countingRepeatDelay)&&t.scanningEnabled.current)if(!m.arOverlay.visible||m.arOverlay.automaticSelectionEnabled){let n=!1;o({type:"setCount",barcodes:e.barcodes,computeNewCount:e=>{let o="COUNTING"===m.mode?e+1:1;return o===e||n||(a.current=new Date,Re.INSTANCE.beep(t.configuration.sound),Fe.INSTANCE.vibrate(t.configuration.vibration)),o}})}else o({type:"setCount",barcodes:e.barcodes,computeNewCount:t=>t})},_onDetectionFailed(t){},onError:t.onError,returnBarcodeImage:!0,captureDelay:1e3/60}));Object(se.useEffect)((()=>{g.current.container=e.current}),[e]),Object(se.useEffect)((()=>{for(const t of n){if(t.polygonElement){const e=t.count>0?m.arOverlay.polygon.selected:m.arOverlay.polygon.deselected;t.polygonElement.style({fill:m.arOverlay.polygon.visible?pe.getColorValue(e.fillColor):"transparent",stroke:m.arOverlay.polygon.visible?pe.getColorValue(e.strokeColor):"transparent",strokeWidth:e.strokeWidth,cornerRadius:e.cornerRadius})}t.labelElement&&(t.labelElement.update(Object.assign(Object.assign({},t.labelElement.state.element),{highlighted:t.count>0})),t.labelElement.setCount(t.count))}}),[n]);const v=n.reduce(((t,e)=>t+e.count),0),A=se.default.createElement(mu,{barcodes:n.filter((t=>t.count>0)),onBarcodeChange:o,sheetContent:m.sheetContent,onNumberClick:t=>l(t),mode:m.mode}),b={numBarcodes:v,leftButton:Object.assign(Object.assign({},m.sheetContent.clearAllButton),{onClick:()=>o({type:"clear"})}),rightButton:Object.assign(Object.assign({},m.sheetContent.submitButton),{onClick:()=>yu(this,void 0,void 0,(function*(){const e=n.filter((t=>t.count>0)).map((t=>f.mapBarcodeToBarcodeItem(t.barcode,"COUNTING"===m.mode?t.count:1)));t.onSubmit({items:yield Promise.all(e)})}))}),title:m.sheetContent.title},y=hu("mobile"),S="BUTTON"!==m.sheet.mode&&y?"SMALL"===m.sheet.collapsedVisibleHeight?69:128:0,C=y&&"BUTTON"===m.sheet.mode,w=C?76:0,x=(h?80:0)+w,E=Object(se.useContext)(Se);return se.default.createElement(se.default.Fragment,null,se.default.createElement(ue.a,{container:!0,sx:{display:"flex",flexDirection:y?"column":"row",height:`calc(${E.remainingVisibleBodyHeight} - ${S}px)`},alignItems:"stretch"},se.default.createElement(ue.a,{id:d,item:!0,ref:e,component:"div",xs:y?12:7,zIndex:100},C&&se.default.createElement(vu,{style:{position:"absolute",marginTop:`calc(${E.remainingVisibleBodyHeight} - 60px - 8px)`,width:"100%",display:"flex",justifyContent:"center",zIndex:1100},count:v,onClick:()=>u(!c),buttonStyling:m.sheet.listButton}),se.default.createElement(Qc,{viewFinderPadding:{minTopPadding:E.minTopPaddingForContent,minBottomPadding:x},arOverlay:Object.assign(Object.assign({},m.arOverlay),{counterBadge:Object.assign(Object.assign({},m.arOverlay.counterBadge),{visible:m.arOverlay.counterBadge.visible&&"COUNTING"===m.mode})}),containerId:d,barcodeScannerViewConfig:g.current,onCameraPermissionDenied:t.onCameraPermissionDenied,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:16+w,setActionButtonsVisible:p,arOnBarcodeClick:e=>{o({type:"setCount",barcodes:[e],computeNewCount:e=>{const n="UNIQUE"===m.mode?1-e:e+1;return n>0&&(Re.INSTANCE.beep(t.configuration.sound),Fe.INSTANCE.vibrate(t.configuration.vibration)),n}})},arOnBarcodeEnter:(t,e,n)=>{n&&e&&o({type:"setHtmlElements",barcode:t,labelElement:n,polygonElement:e})},scanningPaused:c&&y,cameraConfiguration:t.configuration.cameraConfiguration,onLicenseError:t.onError}),y&&se.default.createElement(iu,{closedSheetVisibleHeight:S,sheetStyle:m.sheet,contentStyle:m.sheetContent,manualCountEditDialog:m.manualCountEditDialog,numBarcodes:v,onBarcodeChange:t=>o(t),drawerHeaderContentProps:b,isOpen:c,onSwipe:t=>{u("swipe-to-open"===t)}},A)),function(t){switch(t){case"mobile":return Object(ce.useMediaQuery)("(min-width:"+cu+"px)");case"tablet":return Object(ce.useMediaQuery)("(min-width:"+uu+"px)");case"desktop":return Object(ce.useMediaQuery)("(min-width:"+du+"px)")}}("tablet")&&se.default.createElement(ue.a,{item:!0,xs:y?12:5,component:"div",style:{paddingTop:E.minTopPaddingForContent,height:"100%",flexDirection:"column",display:"flex",backgroundColor:pe.getColorValue(m.sheetContent.sheetColor)},zIndex:1050},se.default.createElement(ue.a,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},zIndex:50},se.default.createElement(Kc,Object.assign({},b))),A,se.default.createElement(nu,{numBarcodes:v,style:m.sheetContent}))),se.default.createElement(su,{barcode:s,dialogStyling:m.manualCountEditDialog,onCancel:()=>l(null),setCounter:t=>{o(t),l(null)}}))}const Cu=Object(se.createContext)(null),wu={didCatch:!1,error:null};class xu extends se.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=wu}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(null!==t){for(var e,n,o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];null===(e=(n=this.props).onReset)||void 0===e||e.call(n,{args:i,reason:"imperative-api"}),this.setState(wu)}}componentDidCatch(t,e){var n,o;null===(n=(o=this.props).onError)||void 0===n||n.call(o,t,e)}componentDidUpdate(t,e){const{didCatch:n}=this.state,{resetKeys:o}=this.props;var i,r;n&&null!==e.error&&function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.length!==e.length||t.some(((t,n)=>!Object.is(t,e[n])))}(t.resetKeys,o)&&(null===(i=(r=this.props).onReset)||void 0===i||i.call(r,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(wu))}render(){const{children:t,fallbackRender:e,FallbackComponent:n,fallback:o}=this.props,{didCatch:i,error:r}=this.state;let a=t;if(i){const t={error:r,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof e)a=e(t);else if(n)a=Object(se.createElement)(n,t);else{if(null!==o&&!Object(se.isValidElement)(o))throw r;a=o}}return Object(se.createElement)(Cu.Provider,{value:{didCatch:i,error:r,resetErrorBoundary:this.resetErrorBoundary}},a)}}function Eu(t){const e=Object(se.useContext)(de).getColorValue,n={backgroundColor:e(t.sheetColor)};return se.default.createElement(_e,{modalOverlayColor:t.modalOverlayColor,open:t.open},se.default.createElement(ce.DialogContent,{sx:Object.assign(Object.assign({},n),{p:2,pb:1,textAlign:"center"})},se.default.createElement(ce.Typography,{sx:{fontSize:"16pt",fontWeight:"bold"}},se.default.createElement(ve,{config:t.title})),se.default.createElement(ce.Typography,{sx:{fontSize:"14pt",lineHeight:"16pt"}},se.default.createElement(ve,{config:t.subtitle}))),se.default.createElement(ce.DialogActions,{sx:Object.assign(Object.assign({},n),{pt:1})},se.default.createElement(ue.a,{container:!0,spacing:2},se.default.createElement(ue.a,{item:!0,xs:12},se.default.createElement(ue.a,{color:e(t.dividerColor)})),se.default.createElement(ue.a,{item:!0,xs:6},se.default.createElement(Ee,Object.assign({style:{width:"100%"},onClick:t.handleCancel},t.cancelButton))),se.default.createElement(ue.a,{item:!0,xs:6},se.default.createElement(Ee,Object.assign({icon:ce.Replay,style:{width:"100%"},onClick:t.handleRetry},t.retryButton))))))}function Lu(t){const e=Object(se.useContext)(Se);return se.default.createElement(ce.Box,{sx:{paddingTop:e.minTopPaddingForContent+"px",overflowY:"scroll",backgroundColor:pe.getColorValue(t.config.background)}},se.default.createElement(ce.Box,{sx:{height:e.remainingVisibleBodyHeight,marginLeft:"auto",marginRight:"auto",maxWidth:280,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},t.config.icon.visible&&se.default.createElement(ce.Box,null,se.default.createElement(ce.Avatar,{sx:{width:100,height:100,backgroundColor:pe.getColorValue(t.config.iconBackground),margin:"24px"}},se.default.createElement(ue.a,{sx:{fontSize:50,color:pe.getColorValue(t.config.icon.color)}}))),se.default.createElement(ce.Typography,{sx:{fontSize:20,textAlign:"center"}},se.default.createElement(ve,{config:t.config.enableCameraTitle})),se.default.createElement(ce.Typography,{sx:{fontSize:16,textAlign:"center",paddingTop:"12px"}},se.default.createElement(ve,{config:t.config.enableCameraExplanation})),se.default.createElement(ce.Box,{sx:{paddingTop:"16px"}},se.default.createElement(ye,Object.assign({},t.config.closeButton,{onClick:t.onAppClose})))))}function _u(t){const e=Object(se.useRef)(Object(ce.createTheme)({palette:{primary:{main:on.ScanbotPrimary},secondary:{main:on.DarkGray}}})),[n,o]=Object(se.useState)(!1),[i,r]=Object(se.useState)(!1),[a,s]=Object(se.useState)(t.configuration.timeouts.initialScanDelay<=0),l=Object(se.useRef)(!1),c=Object(se.useRef)(),u=Object(se.useRef)(),d=Object(se.useMemo)((()=>new We(t.configuration.useCase.barcodeInfoMapping.barcodeItemMapper,((t,e)=>{o(!0),c.current=()=>{o(!1),t()},u.current=()=>{o(!1),e()}}))),[]);let h;if(Object(se.useMemo)((()=>{pe.setPalette(t.configuration.palette),pe.setBarcodeTextLocalization(t.configuration.localization)}),[t.configuration]),Object(se.useEffect)((()=>{if(t.configuration.timeouts.autoCancelTimeout>0){const e=setTimeout((()=>{t.onClose()}),t.configuration.timeouts.autoCancelTimeout);return()=>{clearTimeout(e)}}}),[]),Object(se.useEffect)((()=>{if(t.configuration.timeouts.initialScanDelay>0){const e=setTimeout((()=>{s(!0)}),t.configuration.timeouts.initialScanDelay);return()=>{clearTimeout(e)}}}),[]),Object(se.useEffect)((()=>{l.current=!n&&a}),[n,a]),"SingleScanningMode"===t.configuration.useCase._type)h=se.default.createElement(qc,{configuration:t.configuration,onClose:t.onClose,onSubmit:t.onSubmit,onError:t.onError,onCameraPermissionDenied:()=>r(!0),scanningEnabled:l});else{if("MultipleScanningMode"!==t.configuration.useCase._type)throw new Error("Unsupported use case type");h=se.default.createElement(Su,{configuration:t.configuration,onSubmit:t.onSubmit,onError:t.onError,onCameraPermissionDenied:()=>r(!0),scanningEnabled:l})}return se.default.createElement(se.default.Fragment,null,se.default.createElement(me,null),se.default.createElement(xu,{onError:t.onError,fallback:se.default.createElement("div",null,"Error")},se.default.createElement(de.Provider,{value:he(t.configuration.palette)},se.default.createElement(Pe.Provider,{value:d},se.default.createElement(ce.ThemeProvider,{theme:e.current},se.default.createElement(Eu,Object.assign({open:n,handleCancel:u.current,handleRetry:c.current,modalOverlayColor:t.configuration.useCase.barcodeInfoMapping.modalOverlayColor,dividerColor:t.configuration.useCase.barcodeInfoMapping.dividerColor,sheetColor:t.configuration.useCase.barcodeInfoMapping.sheetColor},t.configuration.useCase.barcodeInfoMapping.errorState)),se.default.createElement(ue.a,{sx:{height:`100 * ${fe}`,width:"100vw",backgroundColor:pe.getColorValue(t.configuration.backgroundColor)}},se.default.createElement(Ce,Object.assign({onBackPress:t.onClose},t.configuration.topBar),!i&&h,i&&se.default.createElement(Lu,{onAppClose:t.onClose,config:t.configuration.cameraPermission}))))))))}var Ou=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class ku{static createBarcodeScanner(t){return new Promise(((e,n)=>{Re.INSTANCE.initialize(t.sound);const o=ku.createContainer("barcode-scanner-controller"),i=Object(le.createRoot)(o),r=()=>Ou(this,void 0,void 0,(function*(){return new Promise((t=>{window.setTimeout((()=>{i.unmount(),document.body.removeChild(o),t()}),0)}))})),a=t=>Ou(this,void 0,void 0,(function*(){yield r(),n(t)}));i.render(se.default.createElement(_u,{configuration:t,onClose:()=>Ou(this,void 0,void 0,(function*(){yield r(),e(null)})),onSubmit:t=>Ou(this,void 0,void 0,(function*(){yield r(),e(t)})),onError:a})),(()=>{Ou(this,void 0,void 0,(function*(){try{const t=yield Ed.instance.getLicenseInfo();t.isValid()||(yield a(new Yt(t)))}catch(t){yield a(t)}}))})()}))}static createContainer(t){const e=document.createElement("div");return e.id=t,e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.zIndex="1000",e.style.top="0",e.style.backgroundColor="rgba(0, 0, 0, 0.5)",document.body.appendChild(e),e}}ku.Config=o;var Tu=ku,Pu=n(13),Wu={insert:"head",singleton:!1};gc()(Pu.a,Wu),Pu.a.locals;class Bu extends se.default.Component{constructor(){super(...arguments),this.LINE_COUNT=4}render(){return se.default.createElement("svg",{style:{width:"100%",height:"100%",position:"absolute",overflow:"visible",fill:this.props.polygonStyle.fill}},this.fill())}fill(){if(!this.props.points||0===this.props.points.length)return null;const t=[];for(let e=0;e<this.LINE_COUNT;e++){const n=this.props.points[e],o=this.props.points[(e+1)%this.LINE_COUNT];t.push(se.default.createElement("line",{key:e,style:this.props.polygonStyle,className:this.props.polygonClasses,x1:n.x,y1:n.y,x2:o.x,y2:o.y}))}return t}setFrame(){window.requestAnimationFrame((()=>this.forceUpdate()))}}Bu.CLASSNAME="scanbot-document-outline";class Du extends se.default.Component{constructor(t){super(t),this.state={points:[],animatedPoints:[],isOk:!1,isVisible:!1}}update(t,e,n,o){const i={points:t,animatedPoints:e,isOk:n,isVisible:o};this.setState(i)}pointStringOrLatestValidPoints(t){return t&&t.length>0?R.toSvgString(t):R.toSvgString(this.latestValidPoints)}render(){var t;this.state.points&&(this.latestValidPoints=this.state.points);const e=null!==(t=this.props.style)&&void 0!==t?t:{},n=yc()(Bu.CLASSNAME,{[`${Bu.CLASSNAME}-ok`]:this.state.isOk},{[`${Bu.CLASSNAME}-visible`]:this.state.isVisible},{[`${Bu.CLASSNAME}-hidden`]:!this.state.isVisible});return se.default.createElement(nc.polygon,{ref:t=>this.polygon=t,style:{strokeWidth:e.strokeWidth||2},animate:{points:this.pointStringOrLatestValidPoints(this.state.animatedPoints),opacity:this.state.isVisible?1:0,stroke:this.state.isOk?e.strokeCapturing:e.strokeSearching,fill:this.state.isOk?e.fillCapturing:e.fillSearching},onClick:()=>{},fill:"transparent",className:n})}}var Iu=Du;class Ru extends se.default.Component{constructor(t){super(t),this.state={path:void 0}}render(){var t,e;return this.state.path?se.default.createElement(nc.path,{pathLength:"1",strokeDasharray:"1 1",initial:{strokeDashoffset:1},animate:{strokeDashoffset:0},transition:{duration:this.props.duration/1e3,ease:"easeInOut",repeat:0,repeatType:"loop",repeatDelay:1},stroke:(null===(t=this.props.style)||void 0===t?void 0:t.stroke)||"white",strokeWidth:(null===(e=this.props.style)||void 0===e?void 0:e.strokeWidth)||2,fill:"none",d:this.state.path,className:`${Bu.CLASSNAME}-path`}):null}animate(t){const e="M"+R.toSvgString(t)+"z";this.setState({path:e})}clear(){this.setState({path:void 0})}}class Mu extends se.default.Component{render(){return se.default.createElement(nc.svg,{style:{width:"100%",height:"100%",position:"absolute",overflow:"visible"}},se.default.createElement(Iu,{ref:t=>this.polygon=t,style:this.props.polygonStyle}),se.default.createElement(Ru,{ref:t=>this.path=t,style:this.props.pathStyle,duration:this.props.autoCaptureSensitivity}))}update(t,e,n){var o;const i="processing"!==n&&!!t,r=null!==(o=this.previous)&&void 0!==o?o:t,a=this.previous?t:void 0;this.polygon.update(r,a,e,i),this.previous=t,this.previous&&"capturing"===n?this.animateCapturing():this.clearAnimation()}animateCapturing(){this.path.animate(this.previous)}clearAnimation(){this.path.clear()}}class Fu extends se.default.Component{constructor(){super(...arguments),this.hintLabelClassName="scanbot-document-hint-text",this.state={text:"Initializing...",ok:!1,validPoints:!1}}render(){const{ok:t,text:e,validPoints:n}=this.state,o="searching"===this.props.action||"capturing"===this.props.action,i="processing"!==this.props.action&&n,r=yc()({[this.hintLabelClassName]:!0,[`${this.hintLabelClassName}-visible`]:i,[`${this.hintLabelClassName}-hidden`]:!i});return se.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",left:0,top:0}},se.default.createElement(Mu,{ref:t=>{this.polygon=t},action:this.props.action,style:{width:"100%",height:"100%"},polygonStyle:this.props.style.polygon,pathStyle:this.props.style.path,isOk:t,isVisible:i,autoCaptureSensitivity:this.props.autoCaptureSensitivity}),o&&se.default.createElement("label",{ref:t=>this.label=t,style:this.props.style.label,className:r,dangerouslySetInnerHTML:{__html:e}}))}update(t,e,n){this.polygon.update(e,t,this.props.action),this.label&&(this.label.innerHTML=n)}}class ju{static isConvex(t){if(t.length<4)return!0;let e=!1,n=t.length;for(let o=0;o<n;o++){const i=t[(o+2)%n].x-t[(o+1)%n].x,r=t[(o+2)%n].y-t[(o+1)%n].y,a=t[o].x-t[(o+1)%n].x,s=i*(t[o].y-t[(o+1)%n].y)-r*a;if(0==o)e=s>0;else if(e!=s>0)return!1}return!0}static distanceBetweenPoints(t,e){return Math.pow(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2),.5)}static intersection(t,e){const n=t[0],o=R.subtract(t[1],n),i=e[0],r=R.subtract(e[1],i);if(0===R.cross(o,r))return;const a=R.cross(R.subtract(i,n),o)/R.cross(o,r);return R.add(i,R.multiply(r,a))}}class Vu{constructor(t,e=Vu.DEFAULT_SENSITIVITY){this.maxDistance=this.calculateMaxDistance(t),this.sensitivity=e}check(t){let e=!1;if(this.lastPolygon){for(var n=0;n<4;n++)if(this.isPointMoved(t[n],this.lastPolygon[n])){e=!0;break}}else e=!0;return e}reset(){this.lastPolygon=void 0}update(t){this.lastPolygon=t}isPointMoved(t,e){return ju.distanceBetweenPoints(t,e)/this.maxDistance>this.sensitivity}calculateMaxDistance(t){let e=new R(0,0),n=new R(t.width,t.height);return ju.distanceBetweenPoints(e,n)}}Vu.DEFAULT_SENSITIVITY=.5;var zu=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Nu extends Ye{constructor(t){if(super(t),this.preventAutoCapture=!1,this.defaultCaptureButtonClick=()=>zu(this,void 0,void 0,(function*(){const t=yield this.detectAndCrop();this.configuration.onDocumentDetected(t)})),Object.assign(this.state,{action:this.defaultAction}),!this.isSupported()){throw Error("Camera can only be accessed if the content is served via HTTPS, or on localhost. Check DocumentScannerView.isSupported() before creating the scanner.")}if(!Ed.instance)throw Error("Initialize the SDK by calling ScanbotSDK.initialize() before using the document scanner.")}get defaultAction(){return this.isAutoCaptureEnabled()?"searching":"manual"}get enabled(){return("searching"==this.state.action||"capturing"==this.state.action||"manual"==this.state.action)&&!this.disposed}get configuration(){return this._configuration||(this._configuration=S.fromJson(this.props.configuration)),this._configuration}get autoCaptureSensitivity(){return 3e3*(1-this.configuration.autoCaptureSensitivity)}static create(t){return zu(this,void 0,void 0,(function*(){const e=document.getElementById(t.containerId);if(!e)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((n,o)=>{Object(se.render)(se.default.createElement(Nu,{container:e,configuration:t,onSuccess:n,onFailure:o}),e)}))}))}detectAndCrop(){var t;return zu(this,void 0,void 0,(function*(){try{if(this.enabled){this.setState({action:"processing"});const e=yield null===(t=this.camera)||void 0===t?void 0:t.createImageData(Nu.DETECT_AND_CROP_RESOLUTION,this.configuration.useImageCaptureAPI);if(!e)return;ae.debug("Detect & Crop document of size: "+e.height*e.width);const n=new Ze(e.width,e.height),o=yield this.bridge.postByTransferringArgs("detectAndCropDocument",[e]);return o.videoSize=n,o}}finally{this.setState({action:this.defaultAction})}}))}enableAutoCapture(){this.updateAutoCapture(!0)}disableAutoCapture(){this.updateAutoCapture(!1)}updateAutoCapture(t){this._configuration?this._configuration.autoCaptureEnabled=t:this.props.configuration.autoCaptureEnabled=t,this.setState({action:this.defaultAction})}isAutoCaptureEnabled(){return this._configuration?this._configuration.autoCaptureEnabled:this.props.configuration.autoCaptureEnabled}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return zu(this,void 0,void 0,(function*(){t.componentDidMount.call(this),this.detect(),this.recognizer=yield this.bridge.postByTransferringArgs("createDocumentDetector",[{useCombinedDetector:!1,acceptedBrightnessThreshold:this.configuration.acceptedBrightnessThreshold,acceptedAngleScore:this.configuration.acceptedAngleScore,acceptedSizeScore:this.configuration.acceptedSizeScore}])}))}componentWillUnmount(){const t=Object.create(null,{componentWillUnmount:{get:()=>super.componentWillUnmount}});return zu(this,void 0,void 0,(function*(){t.componentWillUnmount.call(this),this.handleAutoCapture(!1),yield Ed.instance.release(this.recognizer,"Document Scanner")}))}detect(){var t,e;return zu(this,void 0,void 0,(function*(){try{if(!this.enabled)return;const t=yield this.detectInWebWorker();if(!t||!this.enabled)return;if(!this.outline)return;const e=this.getStatusString(t),n="OK"===e;let o=this.scalePolygonPointsToPixels(t.polygon);this.outline.update(n,o,P.getProperty(this.configuration.text.hint,e)),yield this.handleAutoCapture(n,o)}catch(n){null===(e=(t=this.configuration).onError)||void 0===e||e.call(t,n)}finally{requestAnimationFrame(this.detect.bind(this))}}))}getStatusString(t){return this.configuration.ignoreBadAspectRatio&&"OK_BadAspectRatio"===t.detectionStatus?"OK":t.detectionStatus}detectInWebWorker(){var t;return zu(this,void 0,void 0,(function*(){const e=yield null===(t=this.camera)||void 0===t?void 0:t.createImageData(Ye.DEFAULT_DETECTION_RESOLUTION);if(!e||!this.enabled)return;const n=[this.recognizer,e];return yield this.bridge.postByCopyingArgs("documentDetectorDetect",n)}))}handleAutoCapture(t,e){return zu(this,void 0,void 0,(function*(){if(this.configuration.autoCaptureEnabled&&!this.preventAutoCapture)if(t&&!this.autoCaptureToken&&e){if(this.updateButton("capturing"),!this.polygonMovementPredicate){const t=this.getCameraFrameSize();this.polygonMovementPredicate=new Vu(t)}if(this.runMovementPredicate(e))return this.updateButton("searching"),clearTimeout(this.autoCaptureToken),void(this.autoCaptureToken=void 0);this.autoCaptureToken=setTimeout((()=>zu(this,void 0,void 0,(function*(){if(this.autoCaptureToken=void 0,!this.enabled)return;if(!this.configuration.autoCaptureEnabled)return;const t=yield this.detectAndCrop();if(t.polygon){const e=this.scalePolygonPointsToPixels(t.polygon);if(this.runMovementPredicate(e))return}t.success&&this.configuration.onDocumentDetected&&(this.configuration.onDocumentDetected(t),this.preventAutoCapture=!0,setTimeout((()=>{this.preventAutoCapture=!1}),this.configuration.autoCaptureDelay))}))),this.autoCaptureSensitivity)}else!t&&this.autoCaptureToken&&(this.updateButton("searching"),clearTimeout(this.autoCaptureToken),this.autoCaptureToken=void 0)}))}updateButton(t){this.setState({action:t})}render(){var t,e,n;const{action:o}=this.state,{configuration:i}=this,r=null===(t=i.style)||void 0===t?void 0:t.captureButton;return se.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),se.default.createElement(qe,{configuration:this.configuration,videoConstraints:i.videoConstraints,mirrored:i.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}}),se.default.createElement(Fu,{ref:t=>{this.outline=t},style:null===(n=i.style)||void 0===n?void 0:n.outline,action:o,autoCaptureSensitivity:this.autoCaptureSensitivity}),se.default.createElement(Cc,{color:(null==r?void 0:r.color)?r.color:"FFF",action:o,onClick:this.enabled?i.onCaptureButtonClick||this.defaultCaptureButtonClick:()=>{}}))}scalePolygonPointsToPixels(t){if(t){const e=this.getCameraFrameSize(),n=Ze.fromHtmlElement(this.camera.video),o=Fc.findScale(n,e);t=(t=Fc.convertToViewportPointsFromParentSize(e,t)).map((t=>R.scaleToPoint(t,o.x,o.y,o.scale)))}return t}runMovementPredicate(t){const e=this.polygonMovementPredicate.check(t);return this.polygonMovementPredicate.update(t),e}getCameraFrameSize(){return this.camera.calculateFrameSize(Ye.DEFAULT_DETECTION_RESOLUTION,this.camera.videoSize().width,this.camera.videoSize().height)}}Nu.DETECT_AND_CROP_RESOLUTION=0;var Uu=Nu;class Hu extends Ut{constructor(){super(h.DEFAULT_VIDEO_RESOLUTION_HD),this.onMrzDetected=function(t){},this.finder.aspectRatio.width=4,this.userGuidance.title.text="Please hold the device over the MRZ code to start scanning"}static fromJson(t){const e=new Hu;return this.mapValues(t,e,["style","videoConstraints","finder","userGuidance"]),this.mapFinderConfiguration(e,t),this.mapVideoConstraints(t,e),e}}var Gu=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Yu extends Ye{constructor(t){super(t),this.shouldComputeSize=!0,this.paused=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),Object.assign(this.state,{isFinderVisible:!0})}get configuration(){return this._configuration||(this._configuration=Hu.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t,e){return Gu(this,void 0,void 0,(function*(){const n=document.getElementById(t.containerId);if(!n)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((o,i)=>{Object(se.render)(se.default.createElement(Yu,{container:n,configuration:t,onSuccess:o,onFailure:i,mrzRecognizer:e}),n)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return Gu(this,void 0,void 0,(function*(){Rc.warn("Mrz detection resumed"),yield this.resume()}))}pauseDetection(){Rc.warn("Mrz detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return Gu(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),this.props.mrzRecognizer.release(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return Gu(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return Gu(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n;return Gu(this,void 0,void 0,(function*(){const o=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let i=!1;try{this.camera.finderFrame=null===(t=this.finder)||void 0===t?void 0:t.holeRect;const r=yield null===(e=this.camera)||void 0===e?void 0:e.createImageData(Yu.FRAME_RESOLUTION);if(!r)return;o&&this.forceUpdate();const a=yield this.props.mrzRecognizer.recognize(r);if(!this.enabled)return;if(null===a)return;a?(i=!0,this.configuration.onMrzDetected(a)):this.configuration._onDetectionFailed&&(null===(n=this.configuration)||void 0===n||n._onDetectionFailed(r))}catch(t){console.log(t)}finally{i?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}setFinderVisible(t){this.setState({isFinderVisible:t})}render(){var t;return se.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),se.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},se.default.createElement(qe,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.state.isFinderVisible&&se.default.createElement(Ke,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}Yu.FRAME_RESOLUTION=1200;var Xu=Yu;class Qu{constructor(){this.disabled=!1,this.color="transparent"}}class Zu{constructor(){this.color="white",this.border="1px solid lightgray",this.size=20}}class $u{constructor(){this.color="#1ec31e",this.width=4}}class qu{constructor(){this.padding=10}}class Ku{constructor(){this.margin=15,this.size=100,this.zoom=1.5}}class Ju{constructor(){this.width=2,this.color="white"}}class td{constructor(){this.size=20,this.color="white"}}class ed extends d{constructor(){super(),this.disableScroll=!0,this.rotations=0,this.style=new qu,this.style.magneticLines=new Qu,this.style.polygon=new $u,this.style.polygon.handles=new Zu,this.style.magnifier=new Ku,this.style.magnifier.border=new Ju,this.style.magnifier.crosshair=new td}static fromJson(t){const e=new ed;return this.mapValues(t,e,["style"]),t.style&&(this.mapValues(t.style,e.style,["polygon","magneticLines","magnifier"]),t.style.polygon&&(this.mapValues(t.style.polygon,e.style.polygon,["handles"]),t.style.polygon.handles&&this.mapValues(t.style.polygon.handles,e.style.polygon.handles)),t.style.magneticLines&&this.mapValues(t.style.magneticLines,e.style.magneticLines,[]),t.style.magnifier&&(this.mapValues(t.style.magnifier,e.style.magnifier,["border","crosshair"]),t.style.magnifier.border&&this.mapValues(t.style.magnifier.border,e.style.magnifier.border,[]),t.style.magnifier.crosshair&&this.mapValues(t.style.magnifier.crosshair,e.style.magnifier.crosshair,[]))),e}}class nd extends se.default.Component{constructor(){super(...arguments),this.BUFFER=4}fromPoint(t){return se.default.createElement("svg",{style:{width:"100%",height:"100%",position:"absolute"}},se.default.createElement("line",{x1:t.p1.x.toString(),y1:t.p1.y.toString(),x2:t.p2.x.toString(),y2:t.p2.y.toString(),style:{stroke:this.props.style.color,strokeWidth:2}}))}componentDidUpdate(t,e,n){this.props.style.disabled||this.snapToClosestIfAnyAreClose()}render(){var t,e,n,o,i,r;return se.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},null===(n=null===(e=null===(t=this.props.lines)||void 0===t?void 0:t.horizontal)||void 0===e?void 0:e.scaled)||void 0===n?void 0:n.map((t=>this.fromPoint(t))),null===(r=null===(i=null===(o=this.props.lines)||void 0===o?void 0:o.vertical)||void 0===i?void 0:i.scaled)||void 0===r?void 0:r.map((t=>this.fromPoint(t))))}snapToClosestIfAnyAreClose(){var t,e,n,o;const i=this.props.movingLine;let r=null===(e=null===(t=this.props.lines)||void 0===t?void 0:t.vertical)||void 0===e?void 0:e.scaled;if(i.isHorizontal&&(r=null===(o=null===(n=this.props.lines)||void 0===n?void 0:n.horizontal)||void 0===o?void 0:o.scaled),!r)return;const a=this.midPoint(i.points[0].coordinates,i.points[1].coordinates),s=r.map((t=>({distance:this.distanceToLine(t,a),mLine:t})));s.sort(((t,e)=>t.distance-e.distance)),s[0].distance<this.BUFFER&&this.props.snapTo({magneticLine:s[0].mLine,polygonLine:i})}distanceToLine(t,e){const n=e.x-t.p1.x,o=e.y-t.p1.y,i=t.p2.x-t.p1.x,r=t.p2.y-t.p1.y,a=i*i+r*r;if(0===a)return 1/0;const s=(n*i+o*r)/a;let l;return l=s<=0?t.p1:s>=1?t.p2:new R(t.p1.x+s*i,t.p1.y+s*r),R.distance(e,l)}midPoint(t,e){return new R((t.x+e.x)/2,(t.y+e.y)/2)}}class od extends se.default.Component{constructor(){super(...arguments),this.POINT_COUNT=4,this.items=[],this.DRAG_BUFFER=5}get pointSize(){var t,e;return(null===(t=this.props.style)||void 0===t?void 0:t.size)?(null===(e=this.props)||void 0===e?void 0:e.scale)?this.props.style.size/this.props.scale:this.props.style.size:0}get pointStyle(){var t,e;return{width:this.pointSize+"px",height:this.pointSize+"px",border:null===(t=this.props.style)||void 0===t?void 0:t.border,borderRadius:this.pointSize/2+"px",backgroundColor:null===(e=this.props.style)||void 0===e?void 0:e.color,position:"absolute",cursor:"pointer",zIndex:500}}nextIndex(t){return(t+1)%this.POINT_COUNT}previousIndex(t){return(t-1+this.POINT_COUNT)%this.POINT_COUNT}isHorizontal(t){return t%2==0}isOutOfBounds(t,e){return t<-this.DRAG_BUFFER||t>e+this.DRAG_BUFFER}get invisibleHandleStyle(){return{width:"50px",height:"50px",opacity:0,position:"relative",top:this.pointSize/2-25+"px",left:this.pointSize/2-25+"px",borderRadius:"25px"}}}class id extends od{create(){if(!this.props.points||4!==this.props.points.length)return null;const t=[];for(let e=0;e<this.POINT_COUNT;e++){const n=this.props.points[e],o=se.default.createElement("div",{style:Object.assign(Object.assign({},this.pointStyle),{left:n.x-this.pointSize/2+"px",top:n.y-this.pointSize/2+"px"}),key:e.toString(),ref:t=>this.items[e]=t,onPointerDown:t=>this.cornerTouchStart(t,e),onPointerUp:t=>this.cornerTouchEnd(t),onPointerMove:t=>this.cornerTouchMove(t,e),"data-sb-cropping-corner":e},se.default.createElement("div",{style:Object.assign({},this.invisibleHandleStyle)}));t.push(o)}return t}cornerTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=R.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),o=this.items[e],i=R.fromHtmlElement(o);this.parentOffset=new R(n.x-i.x,n.y-i.y),this.props.cornerMoveStart({index:e,point:this.props.points[e]})}cornerTouchMove(t,e){if(!this.parentOffset)return;const n=R.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),{x:o,y:i}=(r={x:n.x-this.parentOffset.x,y:n.y-this.parentOffset.y},a=this.pointSize,s=this.props.containerSize,new R(I(r.x,-a/2,s.width-a/2),I(r.y,-a/2,s.height-a/2)));var r,a,s;const l=this.pointSize/2,c=this.props.points[e];this.props.points[e]=new R(o+l,i+l),ju.isConvex(this.props.points)?this.props.cornerMoved({index:e,point:this.props.points[e]}):this.props.points[e]=c}cornerTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null,this.props.cornerMoveEnd()}render(){return se.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",cursor:"pointer",zIndex:500,userSelect:"none",msUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none"}},this.create())}}class rd extends od{create(){if(!this.props.points||4!==this.props.points.length)return null;const t=[];for(let e=0;e<this.POINT_COUNT;e++){const n=this.props.points[e];let o=this.props.points[this.nextIndex(e)];const i=se.default.createElement("div",{style:Object.assign(Object.assign({},this.pointStyle),{left:n.x+(o.x-n.x)/2-this.pointSize/2+"px",top:n.y+(o.y-n.y)/2-this.pointSize/2+"px"}),key:e.toString(),ref:t=>this.items[e]=t,onPointerDown:t=>this.lineTouchStart(t,e),onPointerMove:t=>this.lineTouchMove(t,e),onPointerUp:t=>this.lineTouchEnd(t),"data-sb-cropping-side":e},se.default.createElement("div",{style:this.invisibleHandleStyle}));t.push(i)}return t}lineTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=R.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),o=this.items[e],i=R.fromHtmlElement(o),r=this.props.points[e],a=this.props.points[this.nextIndex(e)];this.point0Start=P.copy(this.props.points[this.previousIndex(e)]),this.point1Start=P.copy(r),this.point2Start=P.copy(a),this.point3Start=P.copy(this.props.points[this.nextIndex(this.nextIndex(e))]),this.point1Offset=new R(r.x-i.x,r.y-i.y),this.point2Offset=new R(a.x-i.x,a.y-i.y),this.parentOffset=new R(n.x-i.x,n.y-i.y)}lineTouchMove(t,e){if(!this.parentOffset)return;const n=R.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),o=this.props.points[this.previousIndex(e)];let i=new R(null,null),r=new R(null,null);const a=this.props.points[this.nextIndex(e+1)],s=n.x-this.parentOffset.x,l=n.y-this.parentOffset.y;if(this.isHorizontal(e)){const t=l+this.point1Offset.y,e=l+this.point2Offset.y,n=t-this.point1Start.y;i.x=this.point1Start.x+(this.point1Start.x-this.point0Start.x)*(n/(this.point1Start.y-this.point0Start.y)),r.x=this.point2Start.x+(this.point2Start.x-this.point3Start.x)*(n/(this.point2Start.y-this.point3Start.y)),i.y=t,r.y=e}else{const t=s+this.point1Offset.x,e=s+this.point2Offset.x,n=t-this.point1Start.x;i.y=this.point1Start.y+(this.point1Start.y-this.point0Start.y)*(n/(this.point1Start.x-this.point0Start.x)),r.y=this.point2Start.y+(this.point2Start.y-this.point3Start.y)*(n/(this.point2Start.x-this.point3Start.x)),i.x=t,r.x=e}i=R.clamp(i,this.props.containerSize),r=R.clamp(r,this.props.containerSize),this.isNearOpposingPoint(this.point1Start,i,o,this.isHorizontal(e)?"y":"x")||this.isNearOpposingPoint(this.point1Start,r,a,this.isHorizontal(e)?"y":"x")||this.areEdgesCrossing(o,i,r,a)||ju.isConvex([o,i,r,a])&&(this.props.points[e].x=i.x,this.props.points[e].y=i.y,this.props.points[this.nextIndex(e)].x=r.x,this.props.points[this.nextIndex(e)].y=r.y,this.props.lineMoved({points:[{index:e,coordinates:i},{index:this.nextIndex(e),coordinates:r}],previousPoint:o,nextPoint:a,isHorizontal:this.isHorizontal(e)}))}lineTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null}isNearOpposingPoint(t,e,n,o){if(t[o]>n[o]){if(e[o]-10<n[o])return!0}else if(e[o]>n[o]-10)return!0;return!1}areEdgesCrossing(t,e,n,o){const i=t.x,r=t.y,a=e.x,s=e.y,l=n.x,c=n.y,u=o.x,d=o.y;return((i-l)*(s-c)-(r-c)*(a-l))*((i-u)*(s-d)-(r-d)*(a-u))<0&&((l-i)*(d-r)-(c-r)*(u-i))*((l-a)*(d-s)-(c-s)*(u-a))<0}render(){return se.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},this.create())}}class ad extends se.default.Component{render(){return se.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},se.default.createElement(id,{ref:t=>this.corners=t,style:this.props.style,containerSize:this.props.containerSize,scale:this.props.scale,rotations:this.props.rotations,points:this.props.coordinatePoints,cornerMoveStart:this.props.cornerMoveStart,cornerMoved:this.props.cornerMoved,cornerMoveEnd:this.props.cornerMoveEnd}),se.default.createElement(rd,{ref:t=>this.lines=t,style:this.props.style,containerSize:this.props.containerSize,scale:this.props.scale,rotations:this.props.rotations,points:this.props.coordinatePoints,lineMoved:this.props.lineMoved}))}setFrame(){for(let t=0;t<this.corners.POINT_COUNT;t++){const e=this.props.coordinatePoints[t];this.corners.items[t]&&(this.corners.items[t].style.left=e.x-this.corners.pointSize/2+"px",this.corners.items[t].style.top=e.y-this.corners.pointSize/2+"px");let n=this.props.coordinatePoints[this.corners.nextIndex(t)];this.lines.items[t]&&(this.lines.items[t].style.left=e.x+(n.x-e.x)/2-this.corners.pointSize/2+"px",this.lines.items[t].style.top=e.y+(n.y-e.y)/2-this.corners.pointSize/2+"px")}}snapTo(t){const e=[t.polygonLine.previousPoint,t.polygonLine.points[0].coordinates],n=[t.polygonLine.points[1].coordinates,t.polygonLine.nextPoint],o=[t.magneticLine.p1,t.magneticLine.p2];this.props.coordinatePoints[t.polygonLine.points[0].index]=ju.intersection(e,o),this.props.coordinatePoints[t.polygonLine.points[1].index]=ju.intersection(n,o),this.props.cornerMoveEnd(),this.setFrame()}}class sd extends se.default.Component{constructor(t){super(t),this.state={movingLine:void 0}}render(){return se.default.createElement("div",null,se.default.createElement(ad,{ref:t=>this.handles=t,containerSize:this.props.size,coordinatePoints:this.props.points,rotations:this.props.rotations,scale:this.props.scale,style:this.props.handleStyle,cornerMoveStart:this.props.cornerMoveStart,cornerMoved:t=>{this.setFrame(),this.props.cornerMoved(t)},cornerMoveEnd:this.props.cornerMoveEnd,lineMoved:t=>{this.setFrame(),this.setState({movingLine:t})}}),se.default.createElement(nd,{style:this.props.magneticLineStyle,lines:this.props.magneticLines,movingLine:this.state.movingLine,snapTo:t=>{var e,n;null===(e=this.handles)||void 0===e||e.snapTo(t),null===(n=this.polygon)||void 0===n||n.setFrame()}}),se.default.createElement(Bu,{size:this.props.size,points:this.props.points,polygonStyle:this.props.polygonStyle,polygonClasses:this.props.polygonClasses,ref:t=>this.polygon=t}))}setFrame(){var t,e;null===(t=this.polygon)||void 0===t||t.setFrame(),null===(e=this.handles)||void 0===e||e.setFrame()}}class ld extends se.default.Component{render(){return se.default.createElement("img",{ref:t=>this.image=t,style:{width:"100%",height:"100%",objectFit:"cover",position:"absolute"},src:this.props.src,alt:".",onLoad:t=>{t.target&&this.props.onImageLoaded(t.target)}})}}class cd extends se.default.Component{constructor(){super(...arguments),this.animating=!1}width(){return this.container.offsetWidth-2*this.container.offsetLeft}height(){return this.container.offsetHeight-2*this.container.offsetTop}isAnimating(){return this.animating}render(){const{size:t,imageMargin:e,rotations:n,scale:o,duration:i}=this.props,r=90*(n-1),a=90*n;this.previousScale||(this.previousScale=1);const s=ze.b`
35
35
  from {transform: rotate(${r}deg) scale(${this.previousScale}); }
36
36
  to {transform: rotate(${a}deg) scale(${o});
37
- }`,l=ze.a.div`position: absolute; animation: ${s} ${i}s;`;return this.previousScale=o,se.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"},ref:t=>this.container=t},se.default.createElement(l,{style:{width:this.calculate(t,"width"),height:this.calculate(t,"height"),transform:`rotate(${a}deg) scale(${o})`,marginTop:this.marginWithAspect(e,"y",t),marginLeft:this.marginWithAspect(e,"x",t)},onAnimationStart:()=>{this.animating=!0},onAnimationEnd:()=>{this.animating=!1}},this.props.children))}marginWithAspect(t,e,n){if(!t||!n)return 0;n.width,n.height;return t[e]}calculate(t,e){return t?t[e]:"100%"}}class ud extends se.default.Component{componentDidMount(){Fc.disableScreenMovement()}componentWillUnmount(){Fc.enableScreenMovement()}render(){return se.default.createElement("div",null)}}class dd{constructor(t,e){this.element=t,this.size=e}}class hd{}class pd extends se.default.Component{render(){return se.default.createElement("div",{style:this.props.style},se.default.createElement("svg",null,this.vertical(),this.horizontal()))}half(){return this.props.size/2}vertical(){const t=this.half();return se.default.createElement("line",{x1:t,y1:0,x2:t,y2:this.props.size,stroke:this.props.color,strokeWidth:"2"})}horizontal(){const t=this.half();return se.default.createElement("line",{x1:0,y1:t,x2:this.props.size,y2:t,stroke:this.props.color,strokeWidth:"2"})}}class fd extends se.default.Component{get crosshairSize(){var t,e;return null===(e=null===(t=this.props.style)||void 0===t?void 0:t.crosshair)||void 0===e?void 0:e.size}constructor(t){super(t),this.MAX_ROTATIONS=4,this.state={frame:T.empty(),cropImageFitSize:Ze.empty(),rotation:{count:0,scale:1},margin:{left:this.props.style.margin,top:this.props.style.margin},container:{width:0},scale:{width:1,height:1}}}style(){return{container:{marginLeft:this.state.margin.left,marginTop:this.state.margin.top,width:this.state.frame.width,height:this.state.frame.height,borderRadius:this.props.style.size/2,border:this.props.style.border.width+"px solid "+this.props.style.border.color,position:"absolute",overflow:"hidden",zIndex:50,transform:"rotate("+90*this.state.rotation.count+"deg)"},image:{width:this.state.cropImageFitSize.width*this.props.style.zoom,height:this.state.cropImageFitSize.height*this.props.style.zoom,marginLeft:-this.state.frame.x,marginTop:-this.state.frame.y,objectFit:"cover"},crosshair:{margin:"auto",position:"absolute",width:this.crosshairSize,height:this.crosshairSize,top:this.state.frame.height/2-this.crosshairSize/2,left:this.state.frame.width/2-this.crosshairSize/2}}}render(){return this.state.visible?se.default.createElement("div",{style:this.style().container},se.default.createElement("img",{style:this.style().image,ref:t=>this.destination=t,src:this.props.src,alt:"."}),se.default.createElement(pd,{style:this.style().crosshair,size:this.crosshairSize,color:this.props.style.crosshair.color})):null}update(t){if(!this.state.visible)return;this.destination.src=t.source.element.src;const e=T.fromPoint(R.scaleUpTo(t.origin,new Ze(this.props.style.zoom,this.props.style.zoom)),this.props.style.size),n=t.container.width-(this.props.style.margin+this.props.style.size),o=this.isPointTopLeft(t.origin,t.source.size,t.rotations);this.setState({frame:e,cropImageFitSize:t.source.size,rotation:{count:t.rotations,scale:t.scale},margin:{left:o?n:this.props.style.margin},container:{width:t.container.width},scale:{width:t.source.size.width/t.container.width,height:t.source.size.height/t.container.height}})}isPointTopLeft(t,e,n){const o=t.x,i=t.y,r=this.normalizeRotations(n),a=this.state.container.width/4;return 0===r?o<a&&i<a:1===r?o<a&&i>e.height-a:2===r?o>e.width-a&&i>e.height-a:o>e.width-a&&i<a}setIsVisible(t,e){this.setState({visible:t},e)}normalizeRotations(t){return t%this.MAX_ROTATIONS}}var md=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class gd extends se.default.Component{constructor(t){super(t),this.onResizeCallback=()=>{},this.MAX_ROTATIONS=4,this.BASE_SCALE=1,this.state={image:void 0,polygon:void 0,calculatedSize:Ze.empty(),animation:{rotations:0,scale:1,duration:0},points:[],magneticLines:{horizontal:{original:[],scaled:[]},vertical:{original:[],scaled:[]}},imageMargin:R.empty()},this.onResizeCallback=this.onResize.bind(this)}static create(t){return md(this,void 0,void 0,(function*(){const e=document.getElementById(t.containerId);if(!e)throw Error("Unable to initialize cropping component: Cannot find container element with the id provided.");return new Promise(((n,o)=>{Object(se.render)(se.default.createElement(gd,{onReady:n,onError:o,container:e,configuration:ed.fromJson(t)}),e)}))}))}componentDidMount(){var t,e,n;return md(this,void 0,void 0,(function*(){const o=null===(t=this.configuration)||void 0===t?void 0:t.image,i=yield this.detectContour(o);this.setState({image:yield B.toDataUrl(o),polygon:null!==(n=null===(e=this.configuration)||void 0===e?void 0:e.polygon)&&void 0!==n?n:i.polygon,magneticLines:{vertical:{original:i.verticalLines},horizontal:{original:i.horizontalLines}}}),this.props.onReady&&this.props.onReady(this),addEventListener("resize",this.onResizeCallback),addEventListener("orientationchange",this.onResizeCallback)}))}componentWillUnmount(){return md(this,void 0,void 0,(function*(){removeEventListener("resize",this.onResizeCallback),removeEventListener("orientationchange",this.onResizeCallback)}))}onImageLoaded(t){return md(this,void 0,void 0,(function*(){Ze.isEmpty(this.state.calculatedSize)&&(this.htmlImage=t,this.initializeSizes())}))}onResize(){const t=this.state.points.map((t=>new R(t.x/this.state.calculatedSize.width,t.y/this.state.calculatedSize.height)));this.initializeSizes(t)}initializeSizes(t,e,n){const o=new Ze(this.htmlImage.naturalWidth,this.htmlImage.naturalHeight),i=new Ze(this.container.width(),this.container.height()),r=B.getObjectFitSize(i,o),a=new Ze(r.width,r.height),s=null!=t?t:this.state.polygon,l=Fc.convertToViewportPointsFromParentSize(a,s),c=null!=e?e:this.state.magneticLines.horizontal.original,u=null!=n?n:this.state.magneticLines.vertical.original,d=Fc.convertLinesToViewportLines(a,c),h=Fc.convertLinesToViewportLines(a,u);this.setState({calculatedSize:a,points:l,magneticLines:{horizontal:{original:c,scaled:d},vertical:{original:u,scaled:h}},animation:{duration:0,rotations:this.rotations,scale:this.calculateScale(0,this.rotations,a)},imageMargin:this.calculateMargin(a)})}render(){var t,e,n,o,i,r;const a=Bu.CLASSNAME,s=yc()({[a]:!0,[`${a}-visible`]:!0}),l=this.configuration.style.polygon.width,c=(null===(t=this.state.animation)||void 0===t?void 0:t.scale)?l/this.state.animation.scale:l,u=this.configuration.style.padding||0,d=`calc(100% - 2*${u}px)`;return se.default.createElement("div",{style:{position:"relative",width:d,height:d,padding:u}},se.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.configuration.disableScroll&&se.default.createElement(ud,null),se.default.createElement(fd,{ref:t=>this.magnifier=t,style:this.configuration.style.magnifier}),se.default.createElement(cd,{ref:t=>this.container=t,size:this.state.calculatedSize,rotations:null===(e=this.state.animation)||void 0===e?void 0:e.rotations,scale:null===(n=this.state.animation)||void 0===n?void 0:n.scale,duration:null===(o=this.state.animation)||void 0===o?void 0:o.duration,imageMargin:this.state.imageMargin},se.default.createElement(ld,{src:this.state.image,onImageLoaded:t=>this.onImageLoaded(t)}),se.default.createElement(sd,{style:{width:"100%",height:"100%",zIndex:500},size:this.state.calculatedSize,polygonStyle:{cursor:"pointer",stroke:this.configuration.style.polygon.color,strokeWidth:`${c}px`},handleStyle:this.configuration.style.polygon.handles,magneticLineStyle:this.configuration.style.magneticLines,polygonClasses:s,points:this.state.points,rotations:null===(i=this.state.animation)||void 0===i?void 0:i.rotations,scale:null===(r=this.state.animation)||void 0===r?void 0:r.scale,magneticLines:this.state.magneticLines,cornerMoveStart:this.showMagnifier.bind(this),cornerMoved:this.updateMagnifier.bind(this),cornerMoveEnd:this.hideMagnifier.bind(this)}))))}showMagnifier(t){var e;null===(e=this.magnifier)||void 0===e||e.setIsVisible(!0,(()=>{var e;null===(e=this.magnifier)||void 0===e||e.update(this.magnifierOptions(t))}))}updateMagnifier(t){var e;null===(e=this.magnifier)||void 0===e||e.update(this.magnifierOptions(t))}magnifierOptions(t){const e=new hd;return e.source=new dd(this.htmlImage,this.state.calculatedSize),e.container=new Ze(this.container.width(),this.container.height()),e.origin=t.point,e.rotations=this.state.animation.rotations,e.scale=this.state.animation.scale,e}hideMagnifier(){var t;null===(t=this.magnifier)||void 0===t||t.setIsVisible(!1)}apply(){var t;return md(this,void 0,void 0,(function*(){const e=R.toPolygon(this.state.points,this.state.calculatedSize),n=this.toCcwRotations(this.rotations);return{image:yield Ed.instance.cropAndRotateImageCcw(null===(t=this.configuration)||void 0===t?void 0:t.image,e,n),polygon:e,rotations:this.rotations}}))}toCcwRotations(t){return this.MAX_ROTATIONS-t%this.MAX_ROTATIONS}rotate(t){return md(this,void 0,void 0,(function*(){if(this.container.isAnimating())return void console.warn("Unable to rotate: previous rotation animation in progress");const e=this.calculateScale(this.rotations,t,this.state.calculatedSize);this.setState({animation:{rotations:this.rotations+t,scale:e,duration:1}})}))}detect(){var t;return md(this,void 0,void 0,(function*(){const e=yield this.detectContour(null===(t=this.configuration)||void 0===t?void 0:t.image);this.initializeSizes(e.polygon,e.horizontalLines,e.verticalLines)}))}dispose(){const{container:t}=this.props;if(!t)throw Error("Component wasn't created with openCroppingView. Remove component from render tree to dispose.");Object(se.render)(null,t)}get rotations(){var t,e;const n=null===(t=this.state.animation)||void 0===t?void 0:t.rotations;return n&&0!==n?n:null!==(e=this.configuration.rotations)&&void 0!==e?e:0}get configuration(){return this._configuration||(this._configuration=ed.fromJson(this.props.configuration)),this._configuration}calculateScale(t,e,n){return e?(t+e)%2==0?this.BASE_SCALE:this.calculateRatio(n):this.BASE_SCALE}calculateRatio(t){return Math.min(this.container.width()/t.height,this.container.height()/t.width)}calculateMargin(t){return t.width>t.height?{x:0,y:this.container.height()/2-t.height/2}:{x:this.container.width()/2-t.width/2,y:0}}detectContour(t){return Ed.instance.detectAndCropDocument(t)}}var vd=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Ad extends Ye{constructor(t){super(t),this.shouldComputeSize=!0,this.paused=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),Object.assign(this.state,{isFinderVisible:!0})}get configuration(){return this.props.configuration}get enabled(){return!this.disposed}static create(t,e,n){return vd(this,void 0,void 0,(function*(){const o=document.getElementById(t.containerId);if(!o)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((i,r)=>{Object(se.render)(se.default.createElement(Ad,{container:o,configuration:t,onTextDetected:e,onSuccess:i,onFailure:r,textDataScanner:n}),o)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return vd(this,void 0,void 0,(function*(){Rc.warn("TextData detection resumed"),yield this.resume()}))}pauseDetection(){Rc.warn("TextData detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return vd(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),this.props.textDataScanner.release(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return vd(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return vd(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.props.textDataScanner.cleanRecognitionQueue(),this.paused=!0}detect(){var t,e;return vd(this,void 0,void 0,(function*(){const n=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let o=!1;try{this.camera.finderFrame=null===(t=this.finder)||void 0===t?void 0:t.holeRect;const i=yield null===(e=this.camera)||void 0===e?void 0:e.createImageData(Ad.FRAME_RESOLUTION);if(!i)return;n&&this.forceUpdate();const r=yield this.props.textDataScanner.recognize(i);if(!this.enabled)return;if(null===r)return;r&&(o=!0,this.props.onTextDetected(r))}catch(t){console.log(t)}finally{o?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}render(){var t;return se.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),se.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},se.default.createElement(qe,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.state.isFinderVisible&&se.default.createElement(Ke,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}Ad.FRAME_RESOLUTION=1200;var bd=Ad,yd=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},Sd=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};const{ParametricFilter:Cd}=i,wd=Sd(i,["ParametricFilter"]);class xd{static get UI(){if(!a.BUILD_WITH_UI)throw new Error("UI components are not included in Scanbot.min.js. Please use ScanbotSDK.ui2.min.js instead.");return xd._ui2}static initialize(t){var e;return yd(this,void 0,void 0,(function*(){const n=new xd,o=t.engine||xd.defaultEnginePath,i=!!t.allowThreads,r=null!==(e=t.requestSuffix)&&void 0!==e?e:`?${n.version}`,s=[t.licenseKey,o,window.location.hostname,a.CDN_PATH+a.DEFAULT_WASM_FOLDER,{captureConsole:!1,allowThreads:i,profileTfjsKernels:!1,requestSuffix:r}];return n.bridge=new c(o,{allowSimd:!0,allowThreads:i,requestSuffix:r},s),xd.instance=n,window.scanbotSdk=n,ae.initialize(t.verboseLogging),t.allowThreads&&!Object(u.areThreadsAvailable)()&&(ae.debugWarn("Threads are not available in this environment. The SDK will run in single-threaded mode."),window.hasOwnProperty("crossOriginIsolated")&&!window.crossOriginIsolated&&ae.debugWarn("The site is not cross-origin isolated. This prevents multithreading in the ScanbotSDK. To enable multithreading, you need to set the 'Cross-Origin-Opener-Policy' and 'Cross-Origin-Embedder-Policy' http headers. See our documentation for details.")),n}))}createDocumentScanner(t){return yd(this,void 0,void 0,(function*(){let e;try{return e=yield Uu.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createMrzScanner(t){return yd(this,void 0,void 0,(function*(){let e;try{const n=new U(this,this.bridge.postByTransferringArgs("createMRZRecognizer",[null==t?void 0:t.accumulatedFrameVerificationConfiguration]),!0);return e=yield Xu.create(t,n),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createBarcodeScanner(t){return yd(this,void 0,void 0,(function*(){let e;try{return e=yield Nc.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}openCroppingView(t){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),yield gd.create(t)}))}createTextDataScanner(t){return yd(this,void 0,void 0,(function*(){try{const e={languages:(t=Ht.fromJson(t)).supportedLanguages,ocrResolutionLimit:t.ocrResolutionLimit,validationPattern:t.validationPattern,matchSubstring:t.matchSubstring,allowedCharacters:t.allowedCharacters},n=yield this.createGenericTextLineScanner(t,t.onTextDetected,e,t.validatorPreset);return yield this.licenseCheck(),n}catch(t){throw t}}))}createVINScanner(t){return yd(this,void 0,void 0,(function*(){let e;try{t=Gt.fromJson(t);const n="VehicleIdentificationNumber",o={ocrResolutionLimit:t.ocrResolutionLimit},i=e=>{""!==e.text&&t.onTextDetected(e)};return e=yield this.createGenericTextLineScanner(t,i,o,n),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}toDataUrl(t){return yd(this,void 0,void 0,(function*(){return Xt.throwIfMissingBuffer(t),yield B.toDataUrl(t)}))}applyFilter(t,e){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),Xt.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("applyFilter",[t,e])}))}rotateImageCcw(t,e){return yd(this,void 0,void 0,(function*(){return Xt.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("rotateImageCcw",[t,e])}))}cropAndRotateImageCcw(t,e,n){return yd(this,void 0,void 0,(function*(){return Xt.throwIfMissingBuffer(t),Xt.throwIfMissing(e,"Polygon may not be null"),yield this.bridge.postByCopyingArgs("cropAndRotateImageCcw",[t,e,n])}))}detectDocument(t,e,n,o){return yd(this,void 0,void 0,(function*(){yield this.licenseCheck(),Xt.throwIfMissingBuffer(t);const i=yield this.bridge.postByTransferringArgs("createDocumentDetector",[{useCombinedDetector:!1,acceptedBrightnessThreshold:o||S.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE,acceptedAngleScore:e||S.DEFAULT_ACCEPTED_ANGLE_SCORE,acceptedSizeScore:n||S.DEFAULT_ACCEPTED_SIZE_SCORE}]);return yield this.bridge.postByCopyingArgs("documentDetectorDetect",[i,t])}))}detectAndCropDocument(t){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),Xt.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("detectAndCropDocument",[t])}))}detectBarcodes(t,e,n,o,i){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),Xt.throwIfMissingBuffer(t),new Promise((r=>{const a=document.createElement("canvas"),s=document.createElement("img");s.src=t,s.onload=()=>yd(this,void 0,void 0,(function*(){a.width=s.width,a.height=s.height;const t=a.getContext("2d");t.drawImage(s,0,0);const l=t.getImageData(0,0,s.width,s.height),{result:c,originalImage:u}=yield this.bridge.postByTransferringArgs("recognizeBarcodes",[l,{engineMode:e,barcodeFormats:n,returnBarcodeImage:o,gs1Handling:i}]);r(F.fromWorker(c,B.convertImageDataWrapperToImageData(u)))}))}))}))}createSimpleMRZRecognizer(){return yd(this,void 0,void 0,(function*(){return new U(this,yield this.bridge.postByTransferringArgs("createMRZRecognizer",[]),!1)}))}createOcrEngine(t){return yd(this,void 0,void 0,(function*(){return new G(this,yield this.bridge.postByCopyingArgs("createOcrEngine",[t]))}))}createDocumentQualityAnalyzer(t){return yd(this,void 0,void 0,(function*(){const e=yield this.bridge.postByTransferringArgs("createDocumentQualityAnalyzer",[null!=t?t:{}]);return new $t(this,e)}))}createImageProcessor(t){return yd(this,void 0,void 0,(function*(){Xt.throwIfMissingBuffer(t);const e=yield this.bridge.postByCopyingArgs("imageProcessorCreate",[t]);return new _(this,e)}))}getLicenseInfo(){return yd(this,void 0,void 0,(function*(){const t=yield this.bridge.postByTransferringArgs("getLicenseInfo",[]);return C.fromJson(t)}))}beginPdf(t={}){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new x(this,yield this.bridge.postByCopyingArgs("beginPdf",[t]))}))}beginTiff(t={}){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new k(this,yield this.bridge.postByCopyingArgs("beginTiff",[t]))}))}get version(){return a.VERSION}get utils(){return this._utils||(this._utils=new D),this._utils}release(t,e){return yd(this,void 0,void 0,(function*(){t&&(console.log("Releasing object: "+e||!1),yield this.bridge.postByTransferringArgs("releaseObject",[t]))}))}licenseCheck(){return yd(this,void 0,void 0,(function*(){const t=yield this.getLicenseInfo();if(!t.isValid())throw console.error(`LicenseError: ${t.status}`),new Yt(t)}))}createGenericTextLineScanner(t,e,n,o){return yd(this,void 0,void 0,(function*(){o&&(n.validatorPreset=o);const i=this.bridge.postByCopyingArgs("createGenericTextLineScanner",[n]),r=new $(this,i);return yield bd.create(t,e,r)}))}}xd.defaultEnginePath="",xd._ui2=a.BUILD_WITH_UI?Tu:void 0,xd.imageFilters=wd;var Ed=xd;const Ld=xd},function(t,e,n){"use strict";n.r(e);var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return o.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}));e.default=i}])}));
37
+ }`,l=ze.a.div`position: absolute; animation: ${s} ${i}s;`;return this.previousScale=o,se.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"},ref:t=>this.container=t},se.default.createElement(l,{style:{width:this.calculate(t,"width"),height:this.calculate(t,"height"),transform:`rotate(${a}deg) scale(${o})`,marginTop:this.marginWithAspect(e,"y",t),marginLeft:this.marginWithAspect(e,"x",t)},onAnimationStart:()=>{this.animating=!0},onAnimationEnd:()=>{this.animating=!1}},this.props.children))}marginWithAspect(t,e,n){if(!t||!n)return 0;n.width,n.height;return t[e]}calculate(t,e){return t?t[e]:"100%"}}class ud extends se.default.Component{componentDidMount(){Fc.disableScreenMovement()}componentWillUnmount(){Fc.enableScreenMovement()}render(){return se.default.createElement("div",null)}}class dd{constructor(t,e){this.element=t,this.size=e}}class hd{}class pd extends se.default.Component{render(){return se.default.createElement("div",{style:this.props.style},se.default.createElement("svg",null,this.vertical(),this.horizontal()))}half(){return this.props.size/2}vertical(){const t=this.half();return se.default.createElement("line",{x1:t,y1:0,x2:t,y2:this.props.size,stroke:this.props.color,strokeWidth:"2"})}horizontal(){const t=this.half();return se.default.createElement("line",{x1:0,y1:t,x2:this.props.size,y2:t,stroke:this.props.color,strokeWidth:"2"})}}class fd extends se.default.Component{get crosshairSize(){var t,e;return null===(e=null===(t=this.props.style)||void 0===t?void 0:t.crosshair)||void 0===e?void 0:e.size}constructor(t){super(t),this.MAX_ROTATIONS=4,this.state={frame:T.empty(),cropImageFitSize:Ze.empty(),rotation:{count:0,scale:1},margin:{left:this.props.style.margin,top:this.props.style.margin},container:{width:0},scale:{width:1,height:1}}}style(){return{container:{marginLeft:this.state.margin.left,marginTop:this.state.margin.top,width:this.state.frame.width,height:this.state.frame.height,borderRadius:this.props.style.size/2,border:this.props.style.border.width+"px solid "+this.props.style.border.color,position:"absolute",overflow:"hidden",zIndex:50,transform:"rotate("+90*this.state.rotation.count+"deg)"},image:{width:this.state.cropImageFitSize.width*this.props.style.zoom,height:this.state.cropImageFitSize.height*this.props.style.zoom,marginLeft:-this.state.frame.x,marginTop:-this.state.frame.y,objectFit:"cover"},crosshair:{margin:"auto",position:"absolute",width:this.crosshairSize,height:this.crosshairSize,top:this.state.frame.height/2-this.crosshairSize/2,left:this.state.frame.width/2-this.crosshairSize/2}}}render(){return this.state.visible?se.default.createElement("div",{style:this.style().container},se.default.createElement("img",{style:this.style().image,ref:t=>this.destination=t,src:this.props.src,alt:"."}),se.default.createElement(pd,{style:this.style().crosshair,size:this.crosshairSize,color:this.props.style.crosshair.color})):null}update(t){if(!this.state.visible)return;this.destination.src=t.source.element.src;const e=T.fromPoint(R.scaleUpTo(t.origin,new Ze(this.props.style.zoom,this.props.style.zoom)),this.props.style.size),n=t.container.width-(this.props.style.margin+this.props.style.size),o=this.isPointTopLeft(t.origin,t.source.size,t.rotations);this.setState({frame:e,cropImageFitSize:t.source.size,rotation:{count:t.rotations,scale:t.scale},margin:{left:o?n:this.props.style.margin},container:{width:t.container.width},scale:{width:t.source.size.width/t.container.width,height:t.source.size.height/t.container.height}})}isPointTopLeft(t,e,n){const o=t.x,i=t.y,r=this.normalizeRotations(n),a=this.state.container.width/4;return 0===r?o<a&&i<a:1===r?o<a&&i>e.height-a:2===r?o>e.width-a&&i>e.height-a:o>e.width-a&&i<a}setIsVisible(t,e){this.setState({visible:t},e)}normalizeRotations(t){return t%this.MAX_ROTATIONS}}var md=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class gd extends se.default.Component{constructor(t){super(t),this.onResizeCallback=()=>{},this.MAX_ROTATIONS=4,this.BASE_SCALE=1,this.state={image:void 0,polygon:void 0,calculatedSize:Ze.empty(),animation:{rotations:0,scale:1,duration:0},points:[],magneticLines:{horizontal:{original:[],scaled:[]},vertical:{original:[],scaled:[]}},imageMargin:R.empty()},this.onResizeCallback=this.onResize.bind(this)}static create(t){return md(this,void 0,void 0,(function*(){const e=document.getElementById(t.containerId);if(!e)throw Error("Unable to initialize cropping component: Cannot find container element with the id provided.");return new Promise(((n,o)=>{Object(se.render)(se.default.createElement(gd,{onReady:n,onError:o,container:e,configuration:ed.fromJson(t)}),e)}))}))}componentDidMount(){var t,e,n;return md(this,void 0,void 0,(function*(){const o=null===(t=this.configuration)||void 0===t?void 0:t.image,i=yield this.detectContour(o);this.setState({image:yield B.toDataUrl(o),polygon:null!==(n=null===(e=this.configuration)||void 0===e?void 0:e.polygon)&&void 0!==n?n:i.polygon,magneticLines:{vertical:{original:i.verticalLines},horizontal:{original:i.horizontalLines}}}),this.props.onReady&&this.props.onReady(this),addEventListener("resize",this.onResizeCallback),addEventListener("orientationchange",this.onResizeCallback)}))}componentWillUnmount(){return md(this,void 0,void 0,(function*(){removeEventListener("resize",this.onResizeCallback),removeEventListener("orientationchange",this.onResizeCallback)}))}onImageLoaded(t){return md(this,void 0,void 0,(function*(){Ze.isEmpty(this.state.calculatedSize)&&(this.htmlImage=t,this.initializeSizes())}))}onResize(){const t=this.state.points.map((t=>new R(t.x/this.state.calculatedSize.width,t.y/this.state.calculatedSize.height)));this.initializeSizes(t)}initializeSizes(t,e,n){const o=new Ze(this.htmlImage.naturalWidth,this.htmlImage.naturalHeight),i=new Ze(this.container.width(),this.container.height()),r=B.getObjectFitSize(i,o),a=new Ze(r.width,r.height),s=null!=t?t:this.state.polygon,l=Fc.convertToViewportPointsFromParentSize(a,s),c=null!=e?e:this.state.magneticLines.horizontal.original,u=null!=n?n:this.state.magneticLines.vertical.original,d=Fc.convertLinesToViewportLines(a,c),h=Fc.convertLinesToViewportLines(a,u);this.setState({calculatedSize:a,points:l,magneticLines:{horizontal:{original:c,scaled:d},vertical:{original:u,scaled:h}},animation:{duration:0,rotations:this.rotations,scale:this.calculateScale(0,this.rotations,a)},imageMargin:this.calculateMargin(a)})}render(){var t,e,n,o,i,r;const a=Bu.CLASSNAME,s=yc()({[a]:!0,[`${a}-visible`]:!0}),l=this.configuration.style.polygon.width,c=(null===(t=this.state.animation)||void 0===t?void 0:t.scale)?l/this.state.animation.scale:l,u=this.configuration.style.padding||0,d=`calc(100% - 2*${u}px)`;return se.default.createElement("div",{style:{position:"relative",width:d,height:d,padding:u}},se.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.configuration.disableScroll&&se.default.createElement(ud,null),se.default.createElement(fd,{ref:t=>this.magnifier=t,style:this.configuration.style.magnifier}),se.default.createElement(cd,{ref:t=>this.container=t,size:this.state.calculatedSize,rotations:null===(e=this.state.animation)||void 0===e?void 0:e.rotations,scale:null===(n=this.state.animation)||void 0===n?void 0:n.scale,duration:null===(o=this.state.animation)||void 0===o?void 0:o.duration,imageMargin:this.state.imageMargin},se.default.createElement(ld,{src:this.state.image,onImageLoaded:t=>this.onImageLoaded(t)}),se.default.createElement(sd,{style:{width:"100%",height:"100%",zIndex:500},size:this.state.calculatedSize,polygonStyle:{cursor:"pointer",stroke:this.configuration.style.polygon.color,strokeWidth:`${c}px`},handleStyle:this.configuration.style.polygon.handles,magneticLineStyle:this.configuration.style.magneticLines,polygonClasses:s,points:this.state.points,rotations:null===(i=this.state.animation)||void 0===i?void 0:i.rotations,scale:null===(r=this.state.animation)||void 0===r?void 0:r.scale,magneticLines:this.state.magneticLines,cornerMoveStart:this.showMagnifier.bind(this),cornerMoved:this.updateMagnifier.bind(this),cornerMoveEnd:this.hideMagnifier.bind(this)}))))}showMagnifier(t){var e;null===(e=this.magnifier)||void 0===e||e.setIsVisible(!0,(()=>{var e;null===(e=this.magnifier)||void 0===e||e.update(this.magnifierOptions(t))}))}updateMagnifier(t){var e;null===(e=this.magnifier)||void 0===e||e.update(this.magnifierOptions(t))}magnifierOptions(t){const e=new hd;return e.source=new dd(this.htmlImage,this.state.calculatedSize),e.container=new Ze(this.container.width(),this.container.height()),e.origin=t.point,e.rotations=this.state.animation.rotations,e.scale=this.state.animation.scale,e}hideMagnifier(){var t;null===(t=this.magnifier)||void 0===t||t.setIsVisible(!1)}apply(){var t;return md(this,void 0,void 0,(function*(){const e=R.toPolygon(this.state.points,this.state.calculatedSize),n=this.toCcwRotations(this.rotations);return{image:yield Ed.instance.cropAndRotateImageCcw(null===(t=this.configuration)||void 0===t?void 0:t.image,e,n),polygon:e,rotations:this.rotations}}))}toCcwRotations(t){return this.MAX_ROTATIONS-t%this.MAX_ROTATIONS}rotate(t){return md(this,void 0,void 0,(function*(){if(this.container.isAnimating())return void console.warn("Unable to rotate: previous rotation animation in progress");const e=this.calculateScale(this.rotations,t,this.state.calculatedSize);this.setState({animation:{rotations:this.rotations+t,scale:e,duration:1}})}))}detect(){var t;return md(this,void 0,void 0,(function*(){const e=yield this.detectContour(null===(t=this.configuration)||void 0===t?void 0:t.image);this.initializeSizes(e.polygon,e.horizontalLines,e.verticalLines)}))}dispose(){const{container:t}=this.props;if(!t)throw Error("Component wasn't created with openCroppingView. Remove component from render tree to dispose.");Object(se.render)(null,t)}get rotations(){var t,e;const n=null===(t=this.state.animation)||void 0===t?void 0:t.rotations;return n&&0!==n?n:null!==(e=this.configuration.rotations)&&void 0!==e?e:0}get configuration(){return this._configuration||(this._configuration=ed.fromJson(this.props.configuration)),this._configuration}calculateScale(t,e,n){return e?(t+e)%2==0?this.BASE_SCALE:this.calculateRatio(n):this.BASE_SCALE}calculateRatio(t){return Math.min(this.container.width()/t.height,this.container.height()/t.width)}calculateMargin(t){return t.width>t.height?{x:0,y:this.container.height()/2-t.height/2}:{x:this.container.width()/2-t.width/2,y:0}}detectContour(t){return Ed.instance.detectAndCropDocument(t)}}var vd=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};class Ad extends Ye{constructor(t){super(t),this.shouldComputeSize=!0,this.paused=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),Object.assign(this.state,{isFinderVisible:!0})}get configuration(){return this.props.configuration}get enabled(){return!this.disposed}static create(t,e,n){return vd(this,void 0,void 0,(function*(){const o=document.getElementById(t.containerId);if(!o)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((i,r)=>{Object(se.render)(se.default.createElement(Ad,{container:o,configuration:t,onTextDetected:e,onSuccess:i,onFailure:r,textDataScanner:n}),o)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return vd(this,void 0,void 0,(function*(){Rc.warn("TextData detection resumed"),yield this.resume()}))}pauseDetection(){Rc.warn("TextData detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return vd(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),this.props.textDataScanner.release(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return vd(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return vd(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.props.textDataScanner.cleanRecognitionQueue(),this.paused=!0}detect(){var t,e;return vd(this,void 0,void 0,(function*(){const n=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let o=!1;try{this.camera.finderFrame=null===(t=this.finder)||void 0===t?void 0:t.holeRect;const i=yield null===(e=this.camera)||void 0===e?void 0:e.createImageData(Ad.FRAME_RESOLUTION);if(!i)return;n&&this.forceUpdate();const r=yield this.props.textDataScanner.recognize(i);if(!this.enabled)return;if(null===r)return;r&&(o=!0,this.props.onTextDetected(r))}catch(t){console.log(t)}finally{o?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}render(){var t;return se.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),se.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},se.default.createElement(qe,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.state.isFinderVisible&&se.default.createElement(Ke,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}Ad.FRAME_RESOLUTION=1200;var bd=Ad,yd=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},Sd=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};const{ParametricFilter:Cd}=i,wd=Sd(i,["ParametricFilter"]);class xd{static get UI(){if(!a.BUILD_WITH_UI)throw new Error("UI components are not included in Scanbot.min.js. Please use ScanbotSDK.ui2.min.js instead.");return xd._ui2}static initialize(t){var e;return yd(this,void 0,void 0,(function*(){const n=new xd,o=t.engine||xd.defaultEnginePath,i=!!t.allowThreads,r=null!==(e=t.requestSuffix)&&void 0!==e?e:`?${n.version}`,s=[t.licenseKey,o,window.location.hostname,a.CDN_PATH+a.DEFAULT_WASM_FOLDER,{captureConsole:!1,allowThreads:i,profileTfjsKernels:!1,requestSuffix:r}];return n.bridge=new c(o,{allowSimd:!0,allowThreads:i,requestSuffix:r},s),xd.instance=n,window.scanbotSdk=n,ae.initialize(t.verboseLogging),t.allowThreads&&!Object(u.areThreadsAvailable)()&&(ae.debugWarn("Threads are not available in this environment. The SDK will run in single-threaded mode."),window.hasOwnProperty("crossOriginIsolated")&&!window.crossOriginIsolated&&ae.debugWarn("The site is not cross-origin isolated. This prevents multithreading in the ScanbotSDK. To enable multithreading, you need to set the 'Cross-Origin-Opener-Policy' and 'Cross-Origin-Embedder-Policy' http headers. See our documentation for details.")),n}))}createDocumentScanner(t){return yd(this,void 0,void 0,(function*(){let e;try{return e=yield Uu.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createMrzScanner(t){return yd(this,void 0,void 0,(function*(){let e;try{const n=new U(this,this.bridge.postByTransferringArgs("createMRZRecognizer",[null==t?void 0:t.accumulatedFrameVerificationConfiguration]),!0);return e=yield Xu.create(t,n),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createBarcodeScanner(t){return yd(this,void 0,void 0,(function*(){let e;try{return e=yield Nc.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}openCroppingView(t){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),yield gd.create(t)}))}createTextDataScanner(t){return yd(this,void 0,void 0,(function*(){try{const e={languages:(t=Ht.fromJson(t)).supportedLanguages,ocrResolutionLimit:t.ocrResolutionLimit,validationPattern:t.validationPattern,matchSubstring:t.matchSubstring,allowedCharacters:t.allowedCharacters},n=yield this.createGenericTextLineScanner(t,t.onTextDetected,e,t.validatorPreset);return yield this.licenseCheck(),n}catch(t){throw t}}))}createVINScanner(t){return yd(this,void 0,void 0,(function*(){let e;try{t=Gt.fromJson(t);const n="VehicleIdentificationNumber",o={ocrResolutionLimit:t.ocrResolutionLimit},i=e=>{""!==e.text&&t.onTextDetected(e)};return e=yield this.createGenericTextLineScanner(t,i,o,n),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}toDataUrl(t){return yd(this,void 0,void 0,(function*(){return Xt.throwIfMissingBuffer(t),yield B.toDataUrl(t)}))}applyFilter(t,e){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),Xt.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("applyFilter",[t,e])}))}rotateImageCcw(t,e){return yd(this,void 0,void 0,(function*(){return Xt.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("rotateImageCcw",[t,e])}))}cropAndRotateImageCcw(t,e,n){return yd(this,void 0,void 0,(function*(){return Xt.throwIfMissingBuffer(t),Xt.throwIfMissing(e,"Polygon may not be null"),yield this.bridge.postByCopyingArgs("cropAndRotateImageCcw",[t,e,n])}))}detectDocument(t,e,n,o){return yd(this,void 0,void 0,(function*(){yield this.licenseCheck(),Xt.throwIfMissingBuffer(t);const i=yield this.bridge.postByTransferringArgs("createDocumentDetector",[{useCombinedDetector:!1,acceptedBrightnessThreshold:o||S.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE,acceptedAngleScore:e||S.DEFAULT_ACCEPTED_ANGLE_SCORE,acceptedSizeScore:n||S.DEFAULT_ACCEPTED_SIZE_SCORE}]);return yield this.bridge.postByCopyingArgs("documentDetectorDetect",[i,t])}))}detectAndCropDocument(t){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),Xt.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("detectAndCropDocument",[t])}))}detectBarcodes(t,e,n,o,i){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),Xt.throwIfMissingBuffer(t),new Promise((r=>{const a=document.createElement("canvas"),s=document.createElement("img");s.src=t,s.onload=()=>yd(this,void 0,void 0,(function*(){a.width=s.width,a.height=s.height;const t=a.getContext("2d");t.drawImage(s,0,0);const l=t.getImageData(0,0,s.width,s.height),{result:c,originalImage:u}=yield this.bridge.postByTransferringArgs("recognizeBarcodes",[l,{engineMode:e,barcodeFormats:n,returnBarcodeImage:o,gs1Handling:i}]);r(F.fromWorker(c,B.convertImageDataWrapperToImageData(u)))}))}))}))}createSimpleMRZRecognizer(){return yd(this,void 0,void 0,(function*(){return new U(this,yield this.bridge.postByTransferringArgs("createMRZRecognizer",[]),!1)}))}createOcrEngine(t){return yd(this,void 0,void 0,(function*(){return new G(this,yield this.bridge.postByCopyingArgs("createOcrEngine",[t]))}))}createDocumentQualityAnalyzer(t){return yd(this,void 0,void 0,(function*(){const e=yield this.bridge.postByTransferringArgs("createDocumentQualityAnalyzer",[null!=t?t:{}]);return new $t(this,e)}))}createImageProcessor(t){return yd(this,void 0,void 0,(function*(){Xt.throwIfMissingBuffer(t);const e=yield this.bridge.postByCopyingArgs("imageProcessorCreate",[t]);return new _(this,e)}))}getLicenseInfo(){return yd(this,void 0,void 0,(function*(){const t=yield this.bridge.postByTransferringArgs("getLicenseInfo",[]);return C.fromJson(t)}))}beginPdf(t={}){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new x(this,yield this.bridge.postByCopyingArgs("beginPdf",[t]))}))}beginTiff(t={}){return yd(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new k(this,yield this.bridge.postByCopyingArgs("beginTiff",[t]))}))}get version(){return a.VERSION}get utils(){return this._utils||(this._utils=new D),this._utils}release(t,e){return yd(this,void 0,void 0,(function*(){t&&(console.log("Releasing object: "+e||!1),yield this.bridge.postByTransferringArgs("releaseObject",[t]))}))}licenseCheck(){return yd(this,void 0,void 0,(function*(){const t=yield this.getLicenseInfo();if(!t.isValid())throw console.error(`LicenseError: ${t.status}`),new Yt(t)}))}createGenericTextLineScanner(t,e,n,o){return yd(this,void 0,void 0,(function*(){o&&(n.validatorPreset=o);const i=this.bridge.postByCopyingArgs("createGenericTextLineScanner",[n]),r=new $(this,i);return yield bd.create(t,e,r)}))}destroy(){this.bridge.destroy(),xd.instance=void 0}}xd.defaultEnginePath="",xd._ui2=a.BUILD_WITH_UI?Tu:void 0,xd.imageFilters=wd;var Ed=xd;const Ld=xd},function(t,e,n){"use strict";n.r(e);var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return o.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}));e.default=i}])}));