scanbot-web-sdk 6.0.0-dev.4 → 6.0.0-dev.6

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 (40) hide show
  1. package/@types/core/bridge/compiled/BarcodeDocumentTypes.d.ts +59 -0
  2. package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +19 -67
  3. package/@types/core/bridge/compiled/BarcodeTypes.d.ts +1 -5
  4. package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +14 -7
  5. package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +12 -0
  6. package/@types/core/bridge/compiled/GenericDocument.d.ts +10 -0
  7. package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +9 -41
  8. package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +1 -24
  9. package/@types/core/bridge/worker-bridge.d.ts +24 -28
  10. package/@types/core/worker/ScanbotSDK.Core.d.ts +3 -2
  11. package/@types/core-types.d.ts +2 -1
  12. package/@types/cropping-view.d.ts +2 -3
  13. package/@types/scanbot-sdk.d.ts +19 -18
  14. package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -1
  15. package/@types/worker/worker-bridge.d.ts +24 -28
  16. package/bundle/ScanbotSDK.min.js +4 -4
  17. package/bundle/ScanbotSDK.ui2.min.js +4 -4
  18. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  19. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  20. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  21. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  22. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  23. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  24. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  25. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  26. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  27. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  28. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  29. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  30. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  31. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  32. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  33. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  34. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  35. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  36. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  37. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  38. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  39. package/package.json +1 -1
  40. /package/@types/core/bridge/compiled/{ImageProcessorTypes.d.ts → ImageTypes.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see ScanbotSDK.ui2.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 r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},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=119)}([function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return s.a})),n.d(e,"Fragment",(function(){return s.b})),n.d(e,"createContext",(function(){return s.d})),n.d(e,"createElement",(function(){return s.e})),n.d(e,"createRef",(function(){return s.f})),n.d(e,"useCallback",(function(){return E})),n.d(e,"useContext",(function(){return L})),n.d(e,"useDebugValue",(function(){return j})),n.d(e,"useEffect",(function(){return C})),n.d(e,"useErrorBoundary",(function(){return k})),n.d(e,"useId",(function(){return _})),n.d(e,"useImperativeHandle",(function(){return w})),n.d(e,"useLayoutEffect",(function(){return S})),n.d(e,"useMemo",(function(){return O})),n.d(e,"useReducer",(function(){return A})),n.d(e,"useRef",(function(){return x})),n.d(e,"useState",(function(){return y})),n.d(e,"Children",(function(){return G})),n.d(e,"PureComponent",(function(){return z})),n.d(e,"StrictMode",(function(){return Pt})),n.d(e,"Suspense",(function(){return q})),n.d(e,"SuspenseList",(function(){return tt})),n.d(e,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",(function(){return St})),n.d(e,"cloneElement",(function(){return Lt})),n.d(e,"createFactory",(function(){return wt})),n.d(e,"createPortal",(function(){return ot})),n.d(e,"default",(function(){return zt})),n.d(e,"findDOMNode",(function(){return kt})),n.d(e,"flushSync",(function(){return Tt})),n.d(e,"forwardRef",(function(){return H})),n.d(e,"hydrate",(function(){return ht})),n.d(e,"isElement",(function(){return It})),n.d(e,"isFragment",(function(){return Et})),n.d(e,"isValidElement",(function(){return Ot})),n.d(e,"lazy",(function(){return J})),n.d(e,"memo",(function(){return N})),n.d(e,"render",(function(){return dt})),n.d(e,"startTransition",(function(){return Rt})),n.d(e,"unmountComponentAtNode",(function(){return jt})),n.d(e,"unstable_batchedUpdates",(function(){return _t})),n.d(e,"useDeferredValue",(function(){return Dt})),n.d(e,"useInsertionEffect",(function(){return Ft})),n.d(e,"useSyncExternalStore",(function(){return Mt})),n.d(e,"useTransition",(function(){return Bt})),n.d(e,"version",(function(){return xt}));var r,o,i,a,s=n(12),l=0,c=[],u=[],d=s.h,h=d.__b,p=d.__r,f=d.diffed,m=d.__c,g=d.unmount,v=d.__;function b(t,e){d.__h&&d.__h(o,t,l||e),l=0;var n=o.__H||(o.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:u}),n.__[t]}function y(t){return l=1,A(I,t)}function A(t,e,n){var i=b(r++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):I(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.u)){var a=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return!!t.__c}));if(r.every((function(t){return!t.__N})))return!s||s.call(this,t,e,n);var o=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(o=!0)}})),!(!o&&i.__c.props===t)&&(!s||s.call(this,t,e,n))};o.u=!0;var s=o.shouldComponentUpdate,l=o.componentWillUpdate;o.componentWillUpdate=function(t,e,n){if(this.__e){var r=s;s=void 0,a(t,e,n),s=r}l&&l.call(this,t,e,n)},o.shouldComponentUpdate=a}return i.__N||i.__}function C(t,e){var n=b(r++,3);!d.__s&&F(n.__H,e)&&(n.__=t,n.i=e,o.__H.__h.push(n))}function S(t,e){var n=b(r++,4);!d.__s&&F(n.__H,e)&&(n.__=t,n.i=e,o.__h.push(n))}function x(t){return l=5,O((function(){return{current:t}}),[])}function w(t,e,n){l=6,S((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 O(t,e){var n=b(r++,7);return F(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function E(t,e){return l=8,O((function(){return t}),e)}function L(t){var e=o.context[t.__c],n=b(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(o)),e.props.value):t.__}function j(t,e){d.useDebugValue&&d.useDebugValue(e?e(t):t)}function k(t){var e=b(r++,10),n=y();return e.__=t,o.componentDidCatch||(o.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function _(){var t=b(r++,11);if(!t.__){for(var e=o.__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 T(){for(var t;t=c.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(D),t.__H.__h.forEach(B),t.__H.__h=[]}catch(e){t.__H.__h=[],d.__e(e,t.__v)}}d.__b=function(t){o=null,h&&h(t)},d.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),v&&v(t,e)},d.__r=function(t){p&&p(t),r=0;var e=(o=t.__c).__H;e&&(i===o?(e.__h=[],o.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=u,t.__N=t.i=void 0}))):(e.__h.forEach(D),e.__h.forEach(B),e.__h=[],r=0)),i=o},d.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==c.push(e)&&a===d.requestAnimationFrame||((a=d.requestAnimationFrame)||R)(T)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==u&&(t.__=t.__V),t.i=void 0,t.__V=u}))),i=o=null},d.__c=function(t,e){e.some((function(t){try{t.__h.forEach(D),t.__h=t.__h.filter((function(t){return!t.__||B(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],d.__e(n,t.__v)}})),m&&m(t,e)},d.unmount=function(t){g&&g(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{D(t)}catch(t){e=t}})),n.__H=void 0,e&&d.__e(e,n.__v))};var P="function"==typeof requestAnimationFrame;function R(t){var e,n=function(){clearTimeout(r),P&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);P&&(e=requestAnimationFrame(n))}function D(t){var e=o,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),o=e}function B(t){var e=o;t.__c=t.__(),o=e}function F(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function I(t,e){return"function"==typeof e?e(t):e}function M(t,e){for(var n in e)t[n]=e[n];return t}function W(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function z(t,e){this.props=t,this.context=e}function N(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:W(this.props,t)}function r(e){return this.shouldComponentUpdate=n,Object(s.e)(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(z.prototype=new s.a).isPureReactComponent=!0,z.prototype.shouldComponentUpdate=function(t,e){return W(this.props,t)||W(this.state,e)};var V=s.h.__b;s.h.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),V&&V(t)};var U="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function H(t){function e(e){var n=M({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=U,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var $=function(t,e){return null==t?null:Object(s.j)(Object(s.j)(t).map(e))},G={map:$,forEach:$,count:function(t){return t?Object(s.j)(t).length:0},only:function(t){var e=Object(s.j)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:s.j},Y=s.h.__e;s.h.__e=function(t,e,n,r){if(t.then)for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);Y(t,e,n,r)};var Q=s.h.unmount;function Z(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=M({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Z(t,e,n)}))),t}function X(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return X(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 q(){this.__u=0,this.t=null,this.__b=null}function K(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function J(t){var e,n,r;function o(o){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return Object(s.e)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function tt(){this.u=null,this.o=null}s.h.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Q&&Q(t)},(q.prototype=new s.a).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=K(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=X(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Z(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&Object(s.e)(s.b,null,t.fallback);return o&&(o.__u&=-33),[Object(s.e)(s.b,null,e.__a?null:t.children),o]};var et=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 nt(t){return this.getChildContext=function(){return t.context},t.children}function rt(t){var e=this,n=t.i;e.componentWillUnmount=function(){Object(s.i)(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)}}),Object(s.i)(Object(s.e)(nt,{context:e.context},t.__v),e.l)}function ot(t,e){var n=Object(s.e)(rt,{__v:t,i:e});return n.containerInfo=e,n}(tt.prototype=new s.a).__a=function(t){var e=this,n=K(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),et(e,t,r)):o()};n?n(i):i()}},tt.prototype.render=function(t){this.u=null,this.o=new Map;var e=Object(s.j)(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},tt.prototype.componentDidUpdate=tt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){et(t,n,e)}))};var it="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,at=/^(?: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]/,st=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,lt=/[A-Z0-9]/g,ct="undefined"!=typeof document,ut=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function dt(t,e,n){return null==e.__k&&(e.textContent=""),Object(s.i)(t,e),"function"==typeof n&&n(),t?t.__c:null}function ht(t,e,n){return Object(s.g)(t,e),"function"==typeof n&&n(),t?t.__c:null}s.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(s.a.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var pt=s.h.event;function ft(){}function mt(){return this.cancelBubble}function gt(){return this.defaultPrevented}s.h.event=function(t){return pt&&(t=pt(t)),t.persist=ft,t.isPropagationStopped=mt,t.isDefaultPrevented=gt,t.nativeEvent=t};var vt,bt={enumerable:!1,configurable:!0,get:function(){return this.class}},yt=s.h.vnode;s.h.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={};for(var o in e){var i=e[o];if(!("value"===o&&"defaultValue"in e&&null==i||ct&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===i?i="":"translate"===a&&"no"===i?i=!1:"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||ut(e.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":st.test(o)?o=a:-1===n.indexOf("-")&&at.test(o)?o=o.replace(lt,"-$&").toLowerCase():null===i&&(i=void 0):a=o="oninput","oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=Object(s.j)(e.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=Object(s.j)(e.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",bt)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=it,yt&&yt(t)};var At=s.h.__r;s.h.__r=function(t){At&&At(t),vt=t.__c};var Ct=s.h.diffed;s.h.diffed=function(t){Ct&&Ct(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),vt=null};var St={ReactCurrentDispatcher:{current:{readContext:function(t){return vt.__n[t.__c].props.value}}}},xt="17.0.2";function wt(t){return s.e.bind(null,t)}function Ot(t){return!!t&&t.$$typeof===it}function Et(t){return Ot(t)&&t.type===s.b}function Lt(t){return Ot(t)?s.c.apply(null,arguments):t}function jt(t){return!!t.__k&&(Object(s.i)(null,t),!0)}function kt(t){return t&&(t.base||1===t.nodeType&&t)||null}var _t=function(t,e){return t(e)},Tt=function(t,e){return t(e)},Pt=s.b;function Rt(t){t()}function Dt(t){return t}function Bt(){return[!1,Rt]}var Ft=S,It=Ot;function Mt(t,e){var n=e(),r=y({h:{__:n,v:e}}),o=r[0].h,i=r[1];return S((function(){o.__=n,o.v=e,Wt(o)&&i({h:o})}),[t,n,e]),C((function(){return Wt(o)&&i({h:o}),t((function(){Wt(o)&&i({h:o})}))}),[t]),n}function Wt(t){var e,n,r=t.v,o=t.__;try{var i=r();return!((e=o)===(n=i)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(t){return!0}}var zt={useState:y,useId:_,useReducer:A,useEffect:C,useLayoutEffect:S,useInsertionEffect:Ft,useTransition:Bt,useDeferredValue:Dt,useSyncExternalStore:Mt,startTransition:Rt,useRef:x,useImperativeHandle:w,useMemo:O,useCallback:E,useContext:L,useDebugValue:j,version:"17.0.2",Children:G,render:dt,hydrate:ht,unmountComponentAtNode:jt,createPortal:ot,createElement:s.e,createContext:s.d,createFactory:wt,cloneElement:Lt,createRef:s.f,Fragment:s.b,isValidElement:Ot,isElement:It,isFragment:Et,findDOMNode:kt,Component:s.a,PureComponent:z,memo:N,forwardRef:H,flushSync:Tt,unstable_batchedUpdates:_t,StrictMode:Pt,Suspense:q,SuspenseList:tt,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:St}},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"j",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"a",(function(){return l})),n.d(e,"d",(function(){return c})),n.d(e,"h",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return h})),n.d(e,"i",(function(){return p})),n.d(e,"l",(function(){return f})),n.d(e,"k",(function(){return m}));var r=n(13);class o extends r.a{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 i extends r.a{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 a extends r.a{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 s extends r.a{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#FFFFFF30",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 l extends r.a{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 c extends r.a{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 u extends r.a{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 d extends r.a{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 h extends r.a{constructor(t={}){super(),this.visible=!0,this.text="",this.background=new l({}),this.foreground=new c({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.background&&(this.background=new l(t.background)),void 0!==t.foreground&&(this.foreground=new c(t.foreground))}}class p extends r.a{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 f extends r.a{constructor(t={}){super(),this.enabled=!1,void 0!==t.enabled&&(this.enabled=t.enabled)}}class m extends r.a{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)}}},function(t,e,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"e",(function(){return l}));var r=function(t,e){return r=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])},r(t,e)};function o(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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}Object.create;function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}Object.create},function(t,e,n){n(0),t.exports=n(120)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{_marker(){}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return l}));var r=n(0),o=n(30),i=n(34);const a=Object(r.createContext)(null);function s(t){return{getColorValue:e=>{if(e){if(e.startsWith("?")){const n=e.slice(1);if(n in t)return t[n];i.a.debugWarn(`Color ${n} not found in palette`)}return e}i.a.debugWarn("Color is missing")}}}class l{static setPalette(t){this.palette=t}static setBarcodeTextLocalization(t){this.barcodeTextLocalization=t}static getColorValue(t){return s(l.palette).getColorValue(t)}static getPolygonColorValues(t,e){return new o.PolygonStyle({fillColor:e?l.getColorValue(t.fillColor):"transparent",strokeColor:e?l.getColorValue(t.strokeColor):"transparent",strokeWidth:t.strokeWidth,cornerRadius:t.cornerRadius})}static getLocalizedBarcodeText(t,e=[]){if(t.startsWith("?")){const e=t.slice(1);e in l.barcodeTextLocalization?t=l.barcodeTextLocalization[e]:i.a.debugWarn(`Barcode text localization key ${e} not found in localization`)}for(let n of e)t=t.replace("%d",n);return t}}l.palette=(new o.BarcodeScannerConfiguration).palette,l.barcodeTextLocalization=(new o.BarcodeScannerConfiguration).localization},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(58);class o{constructor(t,e){this.x=t,this.y=e}static toPolygon(t,e){return[o.scaleDownTo(t[0],e),o.scaleDownTo(t[1],e),o.scaleDownTo(t[2],e),o.scaleDownTo(t[3],e)]}static scaleToPoint(t,e,n,r){return new o(r*(t.x-e),r*(t.y-n))}static scaleListToHtmlElement(t,e,n){return t.map((t=>o.scaleToHtmlElement(t,e,n)))}static scaleToHtmlElement(t,e,n){return new o(t.x*(n.clientWidth/e.width),t.y*(n.clientHeight/e.height))}static scaleUpTo(t,e){return new o(t.x*e.width,t.y*e.height)}static scaleDownTo(t,e){return new o(t.x/e.width,t.y/e.height)}static fromHtmlElement(t){return new o(t.offsetLeft,t.offsetTop)}static withScale(t,e,n){return new o(t/n,e/n)}static fromCoordinates(t,e,n,r){if(!t||!e)return new o(0,0);const i=new o(t,e);return r=null!=r?r:1,1===(n=n?n%4:0)?o.withScale(i.y,-i.x,r):2===n?o.withScale(-i.x,-i.y,r):3===n?o.withScale(-i.y,i.x,r):o.withScale(i.x,i.y,r)}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 o(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 o(0,0)}static centerX(t){if(t)return(o.highestX(t)+o.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 o.highestX(t)-o.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 r=Math.atan2(t.y-e.y,t.x-e.x);return{x:t.x-n*Math.cos(r),y:t.y-n*Math.sin(r)}}let r="";const i=n(t[0],t[1],o.distance(t[0],t[1])/2);r+=`M ${i.x} ${i.y}`;for(let i=0;i<t.length;i++){const a=t[i],s=t[(i+1)%t.length],l=t[(i+2)%t.length],c=n(s,l,o.distance(s,l)/2),u=Math.abs(Math.atan2(s.y-a.y,s.x-a.x)-Math.atan2(s.y-l.y,s.x-l.x)),d=u>Math.PI?2*Math.PI-u:u,h=Math.min(Math.sqrt(Math.pow(s.x-a.x,2)+Math.pow(s.y-a.y,2)),Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2))),p=Math.min(e,h*Math.tan(d/2)/2),f=Math.abs(p/Math.tan(d/2)),m=(s.x-a.x)*(s.y-l.y)-(s.x-l.x)*(s.y-a.y)<0?1:0,g=n(s,a,f),v=n(s,l,f);r+=` L${g.x} ${g.y}`,r+=` A${p} ${p} 0 0 ${m} ${v.x} ${v.y}`,r+=` L${c.x} ${c.y}`}return r+" 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 o(t.x-e.x,t.y-e.y)}static add(t,e){return new o(t.x+e.x,t.y+e.y)}static multiply(t,e){return new o(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 o(Object(r.a)(t.x,0,e.width),Object(r.a)(t.y,0,e.height))}}},function(t,e,n){"use strict";var r=n(86);e.a=r.a},function(t,e,n){"use strict";function r(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=r(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}e.a=function(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=r(t))&&(o&&(o+=" "),o+=e);return o}},function(t,e,n){"use strict";n.d(e,"b",(function(){return A}));var r=n(2),o=n(7),i=n(55),a=n(110),s=n(132),l=n(96);const c=["ownerState"],u=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(t){return"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t}const p=Object(s.a)(),f=t=>t?t.charAt(0).toLowerCase()+t.slice(1):t;function m({defaultTheme:t,theme:e,themeId:n}){return r=e,0===Object.keys(r).length?t:e[n]||e;var r}function g(t){return t?(e,n)=>n[t]:null}function v(t,e){let{ownerState:n}=e,i=Object(o.a)(e,c);const a="function"==typeof t?t(Object(r.a)({ownerState:n},i)):t;if(Array.isArray(a))return a.flatMap((t=>v(t,Object(r.a)({ownerState:n},i))));if(a&&"object"==typeof a&&Array.isArray(a.variants)){const{variants:t=[]}=a;let e=Object(o.a)(a,u);return t.forEach((t=>{let o=!0;"function"==typeof t.props?o=t.props(Object(r.a)({ownerState:n},i)):Object.keys(t.props).forEach((e=>{(null==n?void 0:n[e])!==t.props[e]&&i[e]!==t.props[e]&&(o=!1)})),o&&(Array.isArray(e)||(e=[e]),e.push("function"==typeof t.style?t.style(Object(r.a)({ownerState:n},i)):t.style))})),e}return a}var b=n(61),y=n(40);const A=t=>h(t)&&"classes"!==t,C=function(t={}){const{themeId:e,defaultTheme:n=p,rootShouldForwardProp:s=h,slotShouldForwardProp:c=h}=t,u=t=>Object(l.a)(Object(r.a)({},t,{theme:m(Object(r.a)({},t,{defaultTheme:n,themeId:e}))}));return u.__mui_systemSx=!0,(t,l={})=>{Object(i.b)(t,(t=>t.filter((t=>!(null!=t&&t.__mui_systemSx)))));const{name:p,slot:b,skipVariantsResolver:y,skipSx:A,overridesResolver:C=g(f(b))}=l,S=Object(o.a)(l,d),x=void 0!==y?y:b&&"Root"!==b&&"root"!==b||!1,w=A||!1;let O=h;"Root"===b||"root"===b?O=s:b?O=c:function(t){return"string"==typeof t&&t.charCodeAt(0)>96}(t)&&(O=void 0);const E=Object(i.a)(t,Object(r.a)({shouldForwardProp:O,label:undefined},S)),L=t=>"function"==typeof t&&t.__emotion_real!==t||Object(a.b)(t)?o=>v(t,Object(r.a)({},o,{theme:m({theme:o.theme,defaultTheme:n,themeId:e})})):t,j=(o,...i)=>{let a=L(o);const s=i?i.map(L):[];p&&C&&s.push((t=>{const o=m(Object(r.a)({},t,{defaultTheme:n,themeId:e}));if(!o.components||!o.components[p]||!o.components[p].styleOverrides)return null;const i=o.components[p].styleOverrides,a={};return Object.entries(i).forEach((([e,n])=>{a[e]=v(n,Object(r.a)({},t,{theme:o}))})),C(t,a)})),p&&!x&&s.push((t=>{var o;const i=m(Object(r.a)({},t,{defaultTheme:n,themeId:e}));return v({variants:null==i||null==(o=i.components)||null==(o=o[p])?void 0:o.variants},Object(r.a)({},t,{theme:i}))})),w||s.push(u);const l=s.length-i.length;if(Array.isArray(o)&&l>0){const t=new Array(l).fill("");a=[...o,...t],a.raw=[...o.raw,...t]}const c=E(a,...s);return t.muiName&&(c.muiName=t.muiName),c};return E.withConfig&&(j.withConfig=E.withConfig),j}}({themeId:y.a,defaultTheme:b.a,rootShouldForwardProp:A});e.a=C},function(t,e,n){"use strict";n.d(e,"a",(function(){return C})),n.d(e,"b",(function(){return A})),n.d(e,"c",(function(){return H})),n.d(e,"d",(function(){return $})),n.d(e,"e",(function(){return v})),n.d(e,"f",(function(){return y})),n.d(e,"g",(function(){return U})),n.d(e,"h",(function(){return o})),n.d(e,"i",(function(){return V})),n.d(e,"j",(function(){return _}));var r,o,i,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 o,i,a,s={};for(a in e)"key"==a?o=e[a]:"ref"==a?i=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?r.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 b(t,s,o,i,null)}function b(t,e,n,r,a){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++i:a,__i:-1,__u:0};return null==a&&null!=o.vnode&&o.vnode(s),s}function y(){return{current:null}}function A(t){return t.children}function C(t,e){this.props=t,this.context=e}function S(t,e){if(null==e)return t.__?S(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?S(t):null}function x(t,e,n){var r,i=t.__v,a=i.__e,s=t.__P;if(s)return(r=m({},i)).__v=i.__v+1,o.vnode&&o.vnode(r),F(s,r,i,t.__n,void 0!==s.ownerSVGElement,32&i.__u?[a]:null,e,null==a?S(i):a,!!(32&i.__u),n),r.__v=i.__v,r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=a&&w(r),r}function w(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 w(t)}}function O(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!E.__r++||s!==o.debounceRendering)&&((s=o.debounceRendering)||l)(E)}function E(){var t,e,n,r=[],i=[];for(a.sort(c);t=a.shift();)t.__d&&(n=a.length,e=x(t,r,i)||e,0===n||a.length>n?(I(r,e,i),i.length=r.length=0,e=void 0,a.sort(c)):e&&o.__c&&o.__c(e,h));e&&I(r,e,i),E.__r=0}function L(t,e,n,r,o,i,a,s,l,c,u){var p,f,m,g,v,b=r&&r.__k||h,y=e.length;for(n.__d=l,j(n,e,b),l=n.__d,p=0;p<y;p++)null!=(m=n.__k[p])&&"boolean"!=typeof m&&"function"!=typeof m&&(f=-1===m.__i?d:b[m.__i]||d,m.__i=p,F(t,m,f,o,i,a,s,l,c,u),g=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&W(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 j(t,e,n){var r,o,i,a,s,l=e.length,c=n.length,u=c,d=0;for(t.__k=[],r=0;r<l;r++)null!=(o=t.__k[r]=null==(o=e[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?b(null,o,null,null,o):f(o)?b(A,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?b(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=t,o.__b=t.__b+1,s=T(o,n,a=r+d,u),o.__i=s,i=null,-1!==s&&(u--,(i=n[s])&&(i.__u|=131072)),null==i||null===i.__v?(-1==s&&d--,"function"!=typeof o.type&&(o.__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!==r+d&&(o.__u|=65536))):(i=n[r])&&null==i.key&&i.__e&&0==(131072&i.__u)&&(i.__e==t.__d&&(t.__d=S(i)),z(i,i,!1),n[r]=null,u--);if(u)for(r=0;r<c;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==t.__d&&(t.__d=S(i)),z(i,i))}function k(t,e,n){var r,o;if("function"==typeof t.type){for(r=t.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=t,e=k(r[o],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,e){return e=e||[],null==t||"boolean"==typeof t||(f(t)?t.some((function(t){_(t,e)})):e.push(t)),e}function T(t,e,n,r){var o=t.key,i=t.type,a=n-1,s=n+1,l=e[n];if(null===l||l&&o==l.key&&i===l.type)return n;if(r>(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)&&o==l.key&&i===l.type)return a;a--}if(s<e.length){if((l=e[s])&&0==(131072&l.__u)&&o==l.key&&i===l.type)return s;s++}}return-1}function P(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 R(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||P(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||P(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=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+i]=n,n?r?n.u=r.u:(n.u=Date.now(),t.addEventListener(e,i?B:D,i)):t.removeEventListener(e,i?B:D,i);else{if(o)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(o.event?o.event(t):t)}}function B(t){if(this.l)return this.l[t.type+!0](o.event?o.event(t):t)}function F(t,e,n,r,i,a,s,l,c,u){var d,h,p,g,v,b,y,S,x,w,O,E,j,k,_,T=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=e.__e=n.__e]),(d=o.__b)&&d(e);t:if("function"==typeof T)try{if(S=e.props,x=(d=T.contextType)&&r[d.__c],w=d?x?x.props.value:d.__:r,n.__c?y=(h=e.__c=n.__c).__=h.__E:("prototype"in T&&T.prototype.render?e.__c=h=new T(S,w):(e.__c=h=new C(S,w),h.constructor=T,h.render=N),x&&x.sub(h),h.props=S,h.state||(h.state={}),h.context=w,h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,T.getDerivedStateFromProps(S,h.__s))),g=h.props,v=h.state,h.__v=e,p)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==T.getDerivedStateFromProps&&S!==g&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(S,w),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(S,h.__s,w)||e.__v===n.__v)){for(e.__v!==n.__v&&(h.props=S,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),O=0;O<h._sb.length;O++)h.__h.push(h._sb[O]);h._sb=[],h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(S,h.__s,w),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(g,v,b)}))}if(h.context=w,h.props=S,h.__P=t,h.__e=!1,E=o.__r,j=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,E&&E(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,E&&E(e),d=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++j<25);h.state=h.__s,null!=h.getChildContext&&(r=m(m({},r),h.getChildContext())),p||null==h.getSnapshotBeforeUpdate||(b=h.getSnapshotBeforeUpdate(g,v)),L(t,f(_=null!=d&&d.type===A&&null==d.key?d.props.children:d)?_:[_],e,n,r,i,a,s,l,c,u),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),y&&(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),o.__e(t,e,n)}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=M(n.__e,e,n,r,i,a,s,c,u);(d=o.diffed)&&d(e)}function I(t,e,n){for(var r=0;r<n.length;r++)W(n[r],n[++r],n[++r]);o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function M(t,e,n,o,i,a,s,l,c){var u,h,p,m,v,b,y,A=n.props,C=e.props,x=e.type;if("svg"===x&&(i=!0),null!=a)for(u=0;u<a.length;u++)if((v=a[u])&&"setAttribute"in v==!!x&&(x?v.localName===x:3===v.nodeType)){t=v,a[u]=null;break}if(null==t){if(null===x)return document.createTextNode(C);t=i?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,C.is&&C),a=null,l=!1}if(null===x)A===C||l&&t.data===C||(t.data=C);else{if(a=a&&r.call(t.childNodes),A=n.props||d,!l&&null!=a)for(A={},u=0;u<t.attributes.length;u++)A[(v=t.attributes[u]).name]=v.value;for(u in A)v=A[u],"children"==u||("dangerouslySetInnerHTML"==u?p=v:"key"===u||u in C||R(t,u,null,v,i));for(u in C)v=C[u],"children"==u?m=v:"dangerouslySetInnerHTML"==u?h=v:"value"==u?b=v:"checked"==u?y=v:"key"===u||l&&"function"!=typeof v||A[u]===v||R(t,u,v,A[u],i);if(h)l||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(p&&(t.innerHTML=""),L(t,f(m)?m:[m],e,n,o,i&&"foreignObject"!==x,a,s,a?a[0]:n.__k&&S(n,0),l,c),null!=a)for(u=a.length;u--;)null!=a[u]&&g(a[u]);l||(u="value",void 0!==b&&(b!==t[u]||"progress"===x&&!b||"option"===x&&b!==A[u])&&R(t,u,b,A[u],!1),u="checked",void 0!==y&&y!==t[u]&&R(t,u,y,A[u],!1))}return t}function W(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function z(t,e,n){var r,i;if(o.unmount&&o.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||W(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){o.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&z(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||g(t.__e),t.__=t.__e=t.__d=void 0}function N(t,e,n){return this.constructor(t,n)}function V(t,e,n){var i,a,s,l;o.__&&o.__(t,e),a=(i="function"==typeof n)?null:n&&n.__k||e.__k,s=[],l=[],F(e,t=(!i&&n||e).__k=v(A,null,[t]),a||d,d,void 0!==e.ownerSVGElement,!i&&n?[n]:a?null:e.firstChild?r.call(e.childNodes):null,s,!i&&n?n:a?a.__e:e.firstChild,i,l),t.__d=void 0,I(s,t,l)}function U(t,e){V(t,e,U)}function H(t,e,n){var o,i,a,s,l=m({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==a?o=e[a]:"ref"==a?i=e[a]:l[a]=void 0===e[a]&&void 0!==s?s[a]:e[a];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),b(t.type,l,o||t.key,i||t.ref,null)}function $(t,e){var n={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,O(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}r=h.slice,o={__e:function(t,e,n,r){for(var o,i,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),a=o.__d),a)return o.__E=o}catch(e){t=e}throw t}},i=0,C.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),O(this))},C.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),O(this))},C.prototype.render=A,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(t,e){return t.__v.__b-e.__v.__b},E.__r=0,u=0},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{}},function(t,e,n){"use strict";n.d(e,"b",(function(){return p})),n.d(e,"a",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return b})),n.d(e,"e",(function(){return y}));var r=n(31),o=n(20),i=n(45);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(t){const e={};return n=>(void 0===e[n]&&(e[n]=t(n)),e[n])}((t=>{if(t.length>2){if(!l[t])return[t];t=l[t]}const[e,n]=t.split(""),r=a[e],o=s[n]||"";return Array.isArray(o)?o.map((t=>r+t)):[r+o]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function p(t,e,n,r){var i;const a=null!=(i=Object(o.b)(t,e,!1))?i:n;return"number"==typeof a?t=>"string"==typeof t?t:a*t:Array.isArray(a)?t=>"string"==typeof t?t:a[t]:"function"==typeof a?a:()=>{}}function f(t){return p(t,"spacing",8)}function m(t,e){if("string"==typeof e||null==e)return e;const n=t(Math.abs(e));return e>=0?n:"number"==typeof n?-n:`-${n}`}function g(t,e,n,o){if(-1===e.indexOf(n))return null;const i=function(t,e){return n=>t.reduce(((t,r)=>(t[r]=m(e,n),t)),{})}(c(n),o),a=t[n];return Object(r.b)(t,a,i)}function v(t,e){const n=f(t.theme);return Object.keys(t).map((r=>g(t,e,r,n))).reduce(i.a,{})}function b(t){return v(t,u)}function y(t){return v(t,d)}function A(t){return v(t,h)}b.propTypes={},b.filterProps=u,y.propTypes={},y.filterProps=d,A.propTypes={},A.filterProps=h},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(126),o=n(61),i=n(40);function a({props:t,name:e}){return Object(r.a)({props:t,name:e,defaultTheme:o.a,themeId:i.a})}},,function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"a",(function(){return d}));var r=n(1),o=n(13);class i extends o.a{constructor(t={}){super(),this.visible=!0,this.deselected=new r.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),this.selected=new r.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.deselected&&(this.deselected=new r.g(t.deselected)),void 0!==t.selected&&(this.selected=new r.g(t.selected))}}class a extends o.a{constructor(t={}){super(),this.imageVisible=!0,this.titleSelected=new r.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleSelected=new r.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.titleDeselected=new r.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleDeselected=new r.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.backgroundSelected=new r.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:0,cornerRadius:10}),this.backgroundDeselected=new r.g({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:0,cornerRadius:10}),void 0!==t.imageVisible&&(this.imageVisible=t.imageVisible),void 0!==t.titleSelected&&(this.titleSelected=new r.j(t.titleSelected)),void 0!==t.subtitleSelected&&(this.subtitleSelected=new r.j(t.subtitleSelected)),void 0!==t.titleDeselected&&(this.titleDeselected=new r.j(t.titleDeselected)),void 0!==t.subtitleDeselected&&(this.subtitleDeselected=new r.j(t.subtitleDeselected)),void 0!==t.backgroundSelected&&(this.backgroundSelected=new r.g(t.backgroundSelected)),void 0!==t.backgroundDeselected&&(this.backgroundDeselected=new r.g(t.backgroundDeselected))}}class s extends o.a{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 r.a(t.background),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor)}}class l extends o.a{constructor(t={}){super(),this.visible=!1,this.counterBadge=new s({background:new r.a({}),foregroundColor:"?sbColorOnSurface"}),this.automaticSelectionEnabled=!1,this.barcodeItemInfoPosition="BELOW",this.polygon=new i({visible:!0,deselected:new r.g({}),selected:new r.g({})}),this.barcodeItemConfiguration=new a({imageVisible:!0,titleSelected:new r.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new r.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new r.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new r.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new r.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new r.g({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.counterBadge&&(this.counterBadge=new s(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 i(t.polygon)),void 0!==t.barcodeItemConfiguration&&(this.barcodeItemConfiguration=new a(t.barcodeItemConfiguration))}}class c extends o.a{constructor(t={}){super(),this.visible=!0,this.partiallyScanned=new r.g({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.rejected=new r.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.completed=new r.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.partiallyScanned&&(this.partiallyScanned=new r.g(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new r.g(t.rejected)),void 0!==t.completed&&(this.completed=new r.g(t.completed))}}class u extends o.a{constructor(t={}){super(),this.partiallyScanned=new s({visible:!0,background:new r.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.rejected=new s({visible:!0,background:new r.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorNegative",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.completed=new s({visible:!0,background:new r.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),void 0!==t.partiallyScanned&&(this.partiallyScanned=new s(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new s(t.rejected)),void 0!==t.completed&&(this.completed=new s(t.completed))}}class d extends o.a{constructor(t={}){super(),this.visible=!1,this.automaticSelectionEnabled=!0,this.polygon=new c({}),this.badge=new u({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.polygon&&(this.polygon=new c(t.polygon)),void 0!==t.badge&&(this.badge=new u(t.badge))}}},function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeConfigs",(function(){return w})),n.d(e,"BarcodeScannerTypes",(function(){return O})),n.d(e,"BarcodeTypes",(function(){return r})),n.d(e,"CheckRecognizerTypes",(function(){return o})),n.d(e,"CommonFieldType",(function(){return i})),n.d(e,"DocumentDetectorTypes",(function(){return a})),n.d(e,"DocumentQualityAnalyzerTypes",(function(){return s})),n.d(e,"EhicTypes",(function(){return l})),n.d(e,"GenericDocument",(function(){return j})),n.d(e,"GenericDocumentRecognizerConfigs",(function(){return c})),n.d(e,"GenericDocumentRecognizerTypes",(function(){return d})),n.d(e,"GenericDocumentTypes",(function(){return h})),n.d(e,"GenericTextLineScannerTypes",(function(){return p})),n.d(e,"Geometry",(function(){return F})),n.d(e,"ImageProcessorTypes",(function(){return f})),n.d(e,"LicensePlateScannerTypes",(function(){return m})),n.d(e,"MedicalCertificateTypes",(function(){return g})),n.d(e,"MRZTypes",(function(){return b})),n.d(e,"OcrElements",(function(){return y})),n.d(e,"ParametricFilters",(function(){return A})),n.d(e,"PdfConfig",(function(){return C})),n.d(e,"TiffTypes",(function(){return S})),n.d(e,"FrameUtilities",(function(){return v})),n.d(e,"FrameAccumulationTypes",(function(){return u})),n.d(e,"PartiallyConstructible",(function(){return E.a}));var r={};n.r(r),n.d(r,"BarcodeFormats",(function(){return L}));var o={};n.r(o),n.d(o,"RecognitionResult",(function(){return k}));var i={};n.r(i);var a={};n.r(a),n.d(a,"DocumentDetectorParameters",(function(){return I})),n.d(a,"DocumentDetectorConfiguration",(function(){return M})),n.d(a,"DocumentDetectionScores",(function(){return W})),n.d(a,"DocumentDetectionResult",(function(){return z}));var s={};n.r(s),n.d(s,"DocumentQualityThreshold",(function(){return N})),n.d(s,"DocumentQualityAnalyzerConfiguration",(function(){return V})),n.d(s,"DocumentQualityAnalyzerResult",(function(){return U}));var l={};n.r(l),n.d(l,"RecognitionResult",(function(){return H})),n.d(l,"RecognizerParameters",(function(){return $}));var c={};n.r(c),n.d(c,"GDRConfig",(function(){return _})),n.d(c,"DateValidationConfig",(function(){return G})),n.d(c,"EuropeanHealthInsuranceCardConfig",(function(){return Y})),n.d(c,"MRZFallbackConfig",(function(){return Q})),n.d(c,"GDRGroupConfig",(function(){return Z}));var u={};n.r(u),n.d(u,"ResultAccumulationConfig",(function(){return X}));var d={};n.r(d),n.d(d,"RecognitionResult",(function(){return q})),n.d(d,"RecognitionParameters",(function(){return K})),n.d(d,"GenericDocumentRecognizerParameters",(function(){return J}));var h={};n.r(h),n.d(h,"DocumentTypes",(function(){return tt}));var p={};n.r(p),n.d(p,"WordBox",(function(){return et})),n.d(p,"SymbolBox",(function(){return nt})),n.d(p,"ScannerResult",(function(){return rt})),n.d(p,"ContentValidator",(function(){return T})),n.d(p,"DefaultContentValidator",(function(){return ot})),n.d(p,"PresetContentValidator",(function(){return it})),n.d(p,"PatternContentValidator",(function(){return at})),n.d(p,"ScannerConfiguration",(function(){return st}));var f={};n.r(f);var m={};n.r(m),n.d(m,"ScannerConfiguration",(function(){return lt})),n.d(m,"ScannerResult",(function(){return ct}));var g={};n.r(g),n.d(g,"RecognitionParameters",(function(){return ut})),n.d(g,"CheckBox",(function(){return dt})),n.d(g,"DateRecord",(function(){return ht})),n.d(g,"PatientInfoField",(function(){return pt})),n.d(g,"PatientInfoBox",(function(){return ft})),n.d(g,"RecognitionResult",(function(){return mt}));var v={};n.r(v),n.d(v,"AccumulatedResultsVerifierConfig",(function(){return gt}));var b={};n.r(b),n.d(b,"RecognitionResult",(function(){return vt})),n.d(b,"RecognizerConfiguration",(function(){return bt}));var y={};n.r(y),n.d(y,"OcrElement",(function(){return P})),n.d(y,"Glyph",(function(){return yt})),n.d(y,"Word",(function(){return At})),n.d(y,"Line",(function(){return Ct})),n.d(y,"Block",(function(){return St})),n.d(y,"Page",(function(){return xt}));var A={};n.r(A),n.d(A,"ParametricFilter",(function(){return R})),n.d(A,"ScanbotBinarizationFilter",(function(){return wt})),n.d(A,"CustomBinarizationFilter",(function(){return Ot})),n.d(A,"ColorDocumentFilter",(function(){return Et})),n.d(A,"BrightnessFilter",(function(){return Lt})),n.d(A,"ContrastFilter",(function(){return jt})),n.d(A,"GrayscaleFilter",(function(){return kt})),n.d(A,"LegacyFilter",(function(){return _t})),n.d(A,"WhiteBlackPointFilter",(function(){return Tt}));var C={};n.r(C),n.d(C,"PdfAttributes",(function(){return Pt})),n.d(C,"PdfConfig",(function(){return Rt}));var S={};n.r(S),n.d(S,"UserFieldValue",(function(){return D})),n.d(S,"UserFieldDoubleValue",(function(){return Dt})),n.d(S,"UserFieldStringValue",(function(){return Bt})),n.d(S,"UserFieldIntValue",(function(){return Ft})),n.d(S,"UserField",(function(){return It})),n.d(S,"TIFFWriterParameters",(function(){return Mt}));var x,w=n(60),O=n(64),E=n(5);class L extends E.a{constructor(t={}){super()}}(x=L||(L={})).oned=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],x.twod=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],x.postal=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],x.pharma=["CODE_32","PHARMA_CODE","PHARMA_CODE_TWO_TRACK","PZN"],x.common=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],x.all=["AUSTRALIA_POST","AZTEC","CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","JAPAN_POST","MAXICODE","MICRO_PDF_417","MICRO_QR_CODE","MSI_PLESSEY","PDF_417","PHARMA_CODE","PHARMA_CODE_TWO_TRACK","PZN","QR_CODE","RMQR_CODE","ROYAL_MAIL","ROYAL_TNT_POST","UPC_A","UPC_E","USPS_INTELLIGENT_MAIL"];var j=n(38);class k extends E.a{constructor(t={}){if(super(),this.status="FAIL",void 0!==t.status&&(this.status=t.status),void 0===t.check)throw new Error("check must be present in constructor argument");this.check=null!=t.check?new j.GenericDocument(t.check):null}}var _,T,P,R,D,B,F=n(39);class I extends E.a{constructor(t={}){super(),this.isLive=!1,this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.acceptedAspectRatioScore=85,this.aspectRatios=[],void 0!==t.isLive&&(this.isLive=t.isLive),void 0!==t.acceptedAngleScore&&(this.acceptedAngleScore=t.acceptedAngleScore),void 0!==t.acceptedSizeScore&&(this.acceptedSizeScore=t.acceptedSizeScore),void 0!==t.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=t.acceptedBrightnessThreshold),void 0!==t.acceptedAspectRatioScore&&(this.acceptedAspectRatioScore=t.acceptedAspectRatioScore),void 0!==t.aspectRatios&&(this.aspectRatios=t.aspectRatios.map((t=>new F.AspectRatio(t))))}}class M extends E.a{constructor(t={}){super(),this.engineMode="ML",this.parameters=new I({}),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.parameters&&(this.parameters=new I(t.parameters))}}class W extends E.a{constructor(t={}){if(super(),void 0===t.totalScore)throw new Error("totalScore must be present in constructor argument");if(this.totalScore=t.totalScore,void 0===t.distanceScore)throw new Error("distanceScore must be present in constructor argument");if(this.distanceScore=t.distanceScore,void 0===t.angleScore)throw new Error("angleScore must be present in constructor argument");if(this.angleScore=t.angleScore,void 0===t.sizeScore)throw new Error("sizeScore must be present in constructor argument");if(this.sizeScore=t.sizeScore,void 0===t.aspectRatioScore)throw new Error("aspectRatioScore must be present in constructor argument");if(this.aspectRatioScore=t.aspectRatioScore,void 0===t.lineCoverageScore)throw new Error("lineCoverageScore must be present in constructor argument");if(this.lineCoverageScore=t.lineCoverageScore,void 0===t.widthScore)throw new Error("widthScore must be present in constructor argument");if(this.widthScore=t.widthScore,void 0===t.heightScore)throw new Error("heightScore must be present in constructor argument");this.heightScore=t.heightScore}}class z extends E.a{constructor(t={}){if(super(),this.status="NOT_ACQUIRED",this.averageBrightness=0,void 0!==t.status&&(this.status=t.status),void 0===t.detectionScores)throw new Error("detectionScores must be present in constructor argument");if(this.detectionScores=new W(t.detectionScores),void 0===t.points)throw new Error("points must be present in constructor argument");if(this.points=t.points.map((t=>({x:t.x,y:t.y}))),void 0===t.horizontalLines)throw new Error("horizontalLines must be present in constructor argument");if(this.horizontalLines=t.horizontalLines.map((t=>new F.LineSegmentInt(t))),void 0===t.verticalLines)throw new Error("verticalLines must be present in constructor argument");if(this.verticalLines=t.verticalLines.map((t=>new F.LineSegmentInt(t))),void 0===t.pointsNormalized)throw new Error("pointsNormalized must be present in constructor argument");if(this.pointsNormalized=t.pointsNormalized.map((t=>({x:t.x,y:t.y}))),void 0===t.horizontalLinesNormalized)throw new Error("horizontalLinesNormalized must be present in constructor argument");if(this.horizontalLinesNormalized=t.horizontalLinesNormalized.map((t=>new F.LineSegmentFloat(t))),void 0===t.verticalLinesNormalized)throw new Error("verticalLinesNormalized must be present in constructor argument");if(this.verticalLinesNormalized=t.verticalLinesNormalized.map((t=>new F.LineSegmentFloat(t))),void 0===t.aspectRatio)throw new Error("aspectRatio must be present in constructor argument");this.aspectRatio=t.aspectRatio,void 0!==t.averageBrightness&&(this.averageBrightness=t.averageBrightness)}}class N extends E.a{constructor(t={}){if(super(),void 0===t.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=t.symbolQuality,void 0===t.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=t.symbolRatio}}class V extends E.a{constructor(t={}){super(),this.qualityThresholds=[new N({symbolQuality:.5,symbolRatio:.5}),new N({symbolQuality:.7,symbolRatio:.3}),new N({symbolQuality:.85,symbolRatio:.3}),new N({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==t.qualityThresholds&&(this.qualityThresholds=t.qualityThresholds.map((t=>new N(t)))),void 0!==t.qualityIndices&&(this.qualityIndices=t.qualityIndices.map((t=>t))),void 0!==t.maxImageSize&&(this.maxImageSize=t.maxImageSize),void 0!==t.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=t.minEstimatedNumberOfSymbolsForDocument),void 0!==t.minProcessedFraction&&(this.minProcessedFraction=t.minProcessedFraction),void 0!==t.maxProcessedFraction&&(this.maxProcessedFraction=t.maxProcessedFraction),void 0!==t.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=t.earlyStopIfNSymbolsFound),void 0!==t.tileSize&&(this.tileSize=t.tileSize)}}class U extends E.a{constructor(t={}){if(super(),void 0===t.documentFound)throw new Error("documentFound must be present in constructor argument");if(this.documentFound=t.documentFound,void 0===t.quality)throw new Error("quality must be present in constructor argument");this.quality=null!=t.quality?t.quality:null}}class H extends E.a{constructor(t={}){if(super(),this.status="FAILED_DETECTION",void 0===t.fields)throw new Error("fields must be present in constructor argument");this.fields=t.fields.map((t=>new H.Field(t))),void 0!==t.status&&(this.status=t.status)}}!function(t){class e extends E.a{constructor(t={}){if(super(),this.validationStatus="NOT_VALIDATED",void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=t.type,void 0===t.value)throw new Error("value must be present in constructor argument");if(this.value=t.value,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");this.confidence=t.confidence,void 0!==t.validationStatus&&(this.validationStatus=t.validationStatus)}}t.Field=e}(H||(H={}));class $ extends E.a{constructor(t={}){super(),this.allowedCountries=[],this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.maxCountryDetectionAttempts=5,this.minEqualFrameCount=4,this.maxAccumulatedFrameCount=10,void 0!==t.allowedCountries&&(this.allowedCountries=t.allowedCountries.map((t=>t))),void 0!==t.minBirthYear&&(this.minBirthYear=t.minBirthYear),void 0!==t.maxBirthYear&&(this.maxBirthYear=t.maxBirthYear),void 0!==t.minExpirationYear&&(this.minExpirationYear=t.minExpirationYear),void 0!==t.maxExpirationYear&&(this.maxExpirationYear=t.maxExpirationYear),void 0!==t.maxCountryDetectionAttempts&&(this.maxCountryDetectionAttempts=t.maxCountryDetectionAttempts),void 0!==t.minEqualFrameCount&&(this.minEqualFrameCount=t.minEqualFrameCount),void 0!==t.maxAccumulatedFrameCount&&(this.maxAccumulatedFrameCount=t.maxAccumulatedFrameCount)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"DateValidationConfig":return new G(t);case"EuropeanHealthInsuranceCardConfig":return new Y(t);case"MRZFallbackConfig":return new Q(t);case"GDRGroupConfig":return new Z(t);default:throw`Unknown child class name: ${e}`}}}(_||(_={}));class G extends E.a{constructor(t={}){super(),this._type="DateValidationConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.documentTypes=[],void 0!==t.minBirthYear&&(this.minBirthYear=t.minBirthYear),void 0!==t.maxBirthYear&&(this.maxBirthYear=t.maxBirthYear),void 0!==t.minExpirationYear&&(this.minExpirationYear=t.minExpirationYear),void 0!==t.maxExpirationYear&&(this.maxExpirationYear=t.maxExpirationYear),void 0!==t.documentTypes&&(this.documentTypes=t.documentTypes.map((t=>t)))}}class Y extends E.a{constructor(t={}){super(),this._type="EuropeanHealthInsuranceCardConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.expectedCountry=null,void 0!==t.minBirthYear&&(this.minBirthYear=t.minBirthYear),void 0!==t.maxBirthYear&&(this.maxBirthYear=t.maxBirthYear),void 0!==t.minExpirationYear&&(this.minExpirationYear=t.minExpirationYear),void 0!==t.maxExpirationYear&&(this.maxExpirationYear=t.maxExpirationYear),void 0!==t.expectedCountry&&(this.expectedCountry=null!=t.expectedCountry?t.expectedCountry:null)}}class Q extends E.a{constructor(t={}){super(),this._type="MRZFallbackConfig",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==t.acceptedCountries&&(this.acceptedCountries=t.acceptedCountries.map((t=>t))),void 0!==t.acceptedMRZTypes&&(this.acceptedMRZTypes=t.acceptedMRZTypes.map((t=>t)))}}class Z extends E.a{constructor(t={}){if(super(),this._type="GDRGroupConfig",void 0===t.acceptedDocumentTypes)throw new Error("acceptedDocumentTypes must be present in constructor argument");this.acceptedDocumentTypes=t.acceptedDocumentTypes.map((t=>t))}}class X extends E.a{constructor(t={}){super(),this.confirmationMethod="EXACT",this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==t.confirmationMethod&&(this.confirmationMethod=t.confirmationMethod),void 0!==t.minConfirmations&&(this.minConfirmations=t.minConfirmations),void 0!==t.minConfidenceForStableField&&(this.minConfidenceForStableField=t.minConfidenceForStableField),void 0!==t.autoClearThreshold&&(this.autoClearThreshold=t.autoClearThreshold)}}class q extends E.a{constructor(t={}){if(super(),void 0===t.status)throw new Error("status must be present in constructor argument");if(this.status=t.status,void 0===t.document)throw new Error("document must be present in constructor argument");if(this.document=null!=t.document?new j.GenericDocument(t.document):null,void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=null!=t.quad?t.quad.map((t=>({x:t.x,y:t.y}))):null}}class K extends E.a{constructor(t={}){super(),this.mode="LIVE",void 0!==t.mode&&(this.mode=t.mode)}}class J extends E.a{constructor(t={}){if(super(),this.resultAccumulationConfig=new X({}),this.fieldExcludeList=[],void 0!==t.resultAccumulationConfig&&(this.resultAccumulationConfig=new X(t.resultAccumulationConfig)),void 0!==t.fieldExcludeList&&(this.fieldExcludeList=t.fieldExcludeList.map((t=>t))),void 0===t.configurations)throw new Error("configurations must be present in constructor argument");this.configurations=t.configurations.map((t=>_.From(t)))}}class tt extends E.a{constructor(t={}){super()}}(tt||(tt={})).all=["DeIdCardFront","DeIdCardBack","DePassport","DeDriverLicenseFront","DeDriverLicenseBack","DeResidencePermitFront","DeResidencePermitBack","EuropeanHealthInsuranceCard","DeHealthInsuranceCardFront"];class et extends E.a{constructor(t={}){if(super(),this.recognitionConfidence=0,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.boundingRect)throw new Error("boundingRect must be present in constructor argument");this.boundingRect={x:t.boundingRect.x,y:t.boundingRect.y,width:t.boundingRect.width,height:t.boundingRect.height},void 0!==t.recognitionConfidence&&(this.recognitionConfidence=t.recognitionConfidence)}}class nt extends E.a{constructor(t={}){if(super(),void 0===t.symbol)throw new Error("symbol must be present in constructor argument");if(this.symbol=t.symbol,void 0===t.boundingRect)throw new Error("boundingRect must be present in constructor argument");if(this.boundingRect={x:t.boundingRect.x,y:t.boundingRect.y,width:t.boundingRect.width,height:t.boundingRect.height},void 0===t.recognitionConfidence)throw new Error("recognitionConfidence must be present in constructor argument");this.recognitionConfidence=t.recognitionConfidence}}class rt extends E.a{constructor(t={}){if(super(),this.confidence=0,this.validationSuccessful=!1,void 0===t.rawText)throw new Error("rawText must be present in constructor argument");if(this.rawText=t.rawText,void 0===t.wordBoxes)throw new Error("wordBoxes must be present in constructor argument");if(this.wordBoxes=t.wordBoxes.map((t=>new et(t))),void 0===t.symbolBoxes)throw new Error("symbolBoxes must be present in constructor argument");this.symbolBoxes=t.symbolBoxes.map((t=>new nt(t))),void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.validationSuccessful&&(this.validationSuccessful=t.validationSuccessful)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"DefaultContentValidator":return new ot(t);case"PresetContentValidator":return new it(t);case"PatternContentValidator":return new at(t);default:throw`Unknown child class name: ${e}`}}}(T||(T={}));class ot extends E.a{constructor(t={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==t.allowedCharacters&&(this.allowedCharacters=t.allowedCharacters)}}class it extends E.a{constructor(t={}){if(super(),this._type="PresetContentValidator",void 0===t.preset)throw new Error("preset must be present in constructor argument");this.preset=t.preset}}class at extends E.a{constructor(t={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==t.allowedCharacters&&(this.allowedCharacters=t.allowedCharacters),void 0===t.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=t.pattern,void 0!==t.matchSubstring&&(this.matchSubstring=t.matchSubstring)}}class st extends E.a{constructor(t={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new ot({}),void 0!==t.ocrResolutionLimit&&(this.ocrResolutionLimit=t.ocrResolutionLimit),void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=t.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==t.validator&&(this.validator=T.From(t.validator))}}class lt extends E.a{constructor(t={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualScanningResult=2,this.scannerStrategy="ML",void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualScanningResult&&(this.minimumNumberOfRequiredFramesWithEqualScanningResult=t.minimumNumberOfRequiredFramesWithEqualScanningResult),void 0!==t.scannerStrategy&&(this.scannerStrategy=t.scannerStrategy)}}class ct extends E.a{constructor(t={}){if(super(),this.confidence=0,this.validationSuccessful=!1,this.croppedImage=null,void 0===t.countryCode)throw new Error("countryCode must be present in constructor argument");if(this.countryCode=t.countryCode,void 0===t.licensePlate)throw new Error("licensePlate must be present in constructor argument");if(this.licensePlate=t.licensePlate,void 0===t.rawText)throw new Error("rawText must be present in constructor argument");this.rawText=t.rawText,void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.validationSuccessful&&(this.validationSuccessful=t.validationSuccessful),void 0!==t.croppedImage&&(this.croppedImage=null!=t.croppedImage?t.croppedImage:null)}}class ut extends E.a{constructor(t={}){super(),this.shouldCropDocument=!0,this.recognizePatientInfoBox=!0,this.recognizeBarcode=!0,this.extractCroppedImage=!1,this.preprocessInput=!1,void 0!==t.shouldCropDocument&&(this.shouldCropDocument=t.shouldCropDocument),void 0!==t.recognizePatientInfoBox&&(this.recognizePatientInfoBox=t.recognizePatientInfoBox),void 0!==t.recognizeBarcode&&(this.recognizeBarcode=t.recognizeBarcode),void 0!==t.extractCroppedImage&&(this.extractCroppedImage=t.extractCroppedImage),void 0!==t.preprocessInput&&(this.preprocessInput=t.preprocessInput)}}class dt extends E.a{constructor(t={}){if(super(),this.type="UNKNOWN",this.checked=!1,this.checkedConfidence=0,void 0!==t.type&&(this.type=t.type),void 0!==t.checked&&(this.checked=t.checked),void 0!==t.checkedConfidence&&(this.checkedConfidence=t.checkedConfidence),void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=t.quad.map((t=>({x:t.x,y:t.y})))}}class ht extends E.a{constructor(t={}){if(super(),this.value="",this.rawString="",this.type="UNDEFINED",this.recognitionConfidence=0,void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0!==t.value&&(this.value=t.value),void 0!==t.rawString&&(this.rawString=t.rawString),void 0!==t.type&&(this.type=t.type),void 0!==t.recognitionConfidence&&(this.recognitionConfidence=t.recognitionConfidence)}}class pt extends E.a{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.value)throw new Error("value must be present in constructor argument");if(this.value=t.value,void 0===t.recognitionConfidence)throw new Error("recognitionConfidence must be present in constructor argument");this.recognitionConfidence=t.recognitionConfidence}}class ft extends E.a{constructor(t={}){if(super(),this.hasContents=!1,void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0===t.fields)throw new Error("fields must be present in constructor argument");this.fields=t.fields.map((t=>new pt(t))),void 0!==t.hasContents&&(this.hasContents=t.hasContents)}}class mt extends E.a{constructor(t={}){if(super(),this.recognitionSuccessful=!1,this.formType="UNKNOWN",this.clockwiseRotations=0,this.croppedImage=null,this.scaleX=1,this.scaleY=1,void 0!==t.recognitionSuccessful&&(this.recognitionSuccessful=t.recognitionSuccessful),void 0===t.patientInfoBox)throw new Error("patientInfoBox must be present in constructor argument");if(this.patientInfoBox=new ft(t.patientInfoBox),void 0===t.checkBoxes)throw new Error("checkBoxes must be present in constructor argument");if(this.checkBoxes=t.checkBoxes.map((t=>new dt(t))),void 0===t.dates)throw new Error("dates must be present in constructor argument");if(this.dates=t.dates.map((t=>new ht(t))),void 0!==t.formType&&(this.formType=t.formType),void 0!==t.clockwiseRotations&&(this.clockwiseRotations=t.clockwiseRotations),void 0!==t.croppedImage&&(this.croppedImage=null!=t.croppedImage?t.croppedImage:null),void 0!==t.scaleX&&(this.scaleX=t.scaleX),void 0!==t.scaleY&&(this.scaleY=t.scaleY),void 0===t.documentRoi)throw new Error("documentRoi must be present in constructor argument");this.documentRoi=new z(t.documentRoi)}}class gt extends E.a{constructor(t={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=t.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class vt extends E.a{constructor(t={}){if(super(),this.recognitionSuccessful=!1,void 0!==t.recognitionSuccessful&&(this.recognitionSuccessful=t.recognitionSuccessful),void 0===t.rawMRZ)throw new Error("rawMRZ must be present in constructor argument");if(this.rawMRZ=t.rawMRZ,void 0===t.document)throw new Error("document must be present in constructor argument");this.document=null!=t.document?new j.GenericDocument(t.document):null}}class bt extends E.a{constructor(t={}){super(),this.accumulatedResultsVerifierConfig=new gt({}),void 0!==t.accumulatedResultsVerifierConfig&&(this.accumulatedResultsVerifierConfig=new gt(t.accumulatedResultsVerifierConfig))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"Glyph":return new yt(t);case"Word":return new At(t);case"Line":return new Ct(t);case"Block":return new St(t);case"Page":return new xt(t);default:throw`Unknown child class name: ${e}`}}}(P||(P={}));class yt extends E.a{constructor(t={}){if(super(),this._type="Glyph",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");this.roi=t.roi.map((t=>({x:t.x,y:t.y})))}}class At extends E.a{constructor(t={}){if(super(),this._type="Word",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.glyphs)throw new Error("glyphs must be present in constructor argument");this.glyphs=t.glyphs.map((t=>new yt(t)))}}class Ct extends E.a{constructor(t={}){if(super(),this._type="Line",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.words)throw new Error("words must be present in constructor argument");this.words=t.words.map((t=>new At(t)))}}class St extends E.a{constructor(t={}){if(super(),this._type="Block",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.lines)throw new Error("lines must be present in constructor argument");this.lines=t.lines.map((t=>new Ct(t)))}}class xt extends E.a{constructor(t={}){if(super(),this._type="Page",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.blocks)throw new Error("blocks must be present in constructor argument");this.blocks=t.blocks.map((t=>new St(t)))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"ScanbotBinarizationFilter":return new wt(t);case"CustomBinarizationFilter":return new Ot(t);case"ColorDocumentFilter":return new Et(t);case"BrightnessFilter":return new Lt(t);case"ContrastFilter":return new jt(t);case"GrayscaleFilter":return new kt(t);case"LegacyFilter":return new _t(t);case"WhiteBlackPointFilter":return new Tt(t);default:throw`Unknown child class name: ${e}`}}}(R||(R={}));class wt extends E.a{constructor(t={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==t.outputMode&&(this.outputMode=t.outputMode)}}class Ot extends E.a{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 Et extends E.a{constructor(t={}){super(),this._type="ColorDocumentFilter"}}class Lt extends E.a{constructor(t={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==t.brightness&&(this.brightness=t.brightness)}}class jt extends E.a{constructor(t={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==t.contrast&&(this.contrast=t.contrast)}}class kt extends E.a{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 _t extends E.a{constructor(t={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==t.filterType&&(this.filterType=t.filterType)}}class Tt extends E.a{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 Pt extends E.a{constructor(t={}){super(),this.author="Created with ❤️ with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==t.author&&(this.author=t.author),void 0!==t.creator&&(this.creator=t.creator),void 0!==t.title&&(this.title=t.title),void 0!==t.subject&&(this.subject=t.subject),void 0!==t.keywords&&(this.keywords=t.keywords)}}class Rt extends E.a{constructor(t={}){super(),this.attributes=new Pt({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==t.attributes&&(this.attributes=new Pt(t.attributes)),void 0!==t.pageSize&&(this.pageSize=t.pageSize),void 0!==t.pageDirection&&(this.pageDirection=t.pageDirection),void 0!==t.pageFit&&(this.pageFit=t.pageFit),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.resamplingMethod&&(this.resamplingMethod=t.resamplingMethod)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"UserFieldDoubleValue":return new Dt(t);case"UserFieldStringValue":return new Bt(t);case"UserFieldIntValue":return new Ft(t);default:throw`Unknown child class name: ${e}`}}}(D||(D={}));class Dt extends E.a{constructor(t={}){if(super(),this._type="UserFieldDoubleValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class Bt extends E.a{constructor(t={}){if(super(),this._type="UserFieldStringValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class Ft extends E.a{constructor(t={}){if(super(),this._type="UserFieldIntValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class It extends E.a{constructor(t={}){if(super(),void 0===t.tag)throw new Error("tag must be present in constructor argument");if(this.tag=t.tag,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.value)throw new Error("value must be present in constructor argument");this.value=D.From(t.value)}}class Mt extends E.a{constructor(t={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==t.compression&&(this.compression=t.compression),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.zipCompressionLevel&&(this.zipCompressionLevel=t.zipCompressionLevel),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.userFields&&(this.userFields=t.userFields.map((t=>new It(t)))),void 0!==t.binarizationFilter&&(this.binarizationFilter=null!=t.binarizationFilter?R.From(t.binarizationFilter):null)}}(B=Mt||(Mt={})).defaultCompression="LZW",B.binaryDocumentOptimizedCompression="CCITTFAX4"},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a}));var r=n(86),o=n(31);function i(t,e,n=!0){if(!e||"string"!=typeof e)return null;if(t&&t.vars&&n){const n=`vars.${e}`.split(".").reduce(((t,e)=>t&&t[e]?t[e]:null),t);if(null!=n)return n}return e.split(".").reduce(((t,e)=>t&&null!=t[e]?t[e]:null),t)}function a(t,e,n,r=n){let o;return o="function"==typeof t?t(n):Array.isArray(t)?t[n]||r:i(t,n)||r,e&&(o=e(o,r,t)),o}e.a=function(t){const{prop:e,cssProperty:n=t.prop,themeKey:s,transform:l}=t,c=t=>{if(null==t[e])return null;const c=t[e],u=i(t.theme,s)||{};return Object(o.b)(t,c,(t=>{let o=a(u,l,t);return t===o&&"string"==typeof t&&(o=a(u,l,`${e}${"default"===t?"":Object(r.a)(t)}`,t)),!1===n?o:{[n]:o}}))};return c.propTypes={},c.filterProps=[e],c}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(8);class o{constructor(t,e){this.width=t,this.height=e}isPortrait(){return this.height>this.width}ratio(t){return t?this.height/this.width:this.width/this.height}ratioDiff(t,e){return this.ratio(e)/t.ratio(e)}static isEmpty(t){return!t||(0===t.width||0===t.height)}static toPolygon(t){return[new r.a(0,0),new r.a(t.width,0),new r.a(t.width,t.height),new r.a(0,t.height)]}static fromHtmlElement(t){return t?new o(t.clientWidth,t.clientHeight):new o(0,0)}static fromJson(t){return new o(t.width,t.height)}static subtractFrom(t,e){return new o(t.width-e,t.height-e)}static empty(){return new o(0,0)}}},,,function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a}));var r=n(0),o=n(6);function i(t){return{color:o.b.getColorValue(t.color),textShadow:t.useShadow?"1px 1px 2px":""}}function a(t){return t.config.visible?r.default.createElement("span",{ref:t.innerRef,style:Object.assign(Object.assign({},t.style),i(t.config))},o.b.getLocalizedBarcodeText(t.config.text)):null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return d}));var r=n(0),o=n(77);const i=n(29).c.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 r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},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=119)}([function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return s.a})),n.d(e,"Fragment",(function(){return s.b})),n.d(e,"createContext",(function(){return s.d})),n.d(e,"createElement",(function(){return s.e})),n.d(e,"createRef",(function(){return s.f})),n.d(e,"useCallback",(function(){return E})),n.d(e,"useContext",(function(){return L})),n.d(e,"useDebugValue",(function(){return j})),n.d(e,"useEffect",(function(){return C})),n.d(e,"useErrorBoundary",(function(){return k})),n.d(e,"useId",(function(){return _})),n.d(e,"useImperativeHandle",(function(){return w})),n.d(e,"useLayoutEffect",(function(){return S})),n.d(e,"useMemo",(function(){return O})),n.d(e,"useReducer",(function(){return A})),n.d(e,"useRef",(function(){return x})),n.d(e,"useState",(function(){return y})),n.d(e,"Children",(function(){return G})),n.d(e,"PureComponent",(function(){return z})),n.d(e,"StrictMode",(function(){return Pt})),n.d(e,"Suspense",(function(){return q})),n.d(e,"SuspenseList",(function(){return tt})),n.d(e,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",(function(){return St})),n.d(e,"cloneElement",(function(){return Lt})),n.d(e,"createFactory",(function(){return wt})),n.d(e,"createPortal",(function(){return ot})),n.d(e,"default",(function(){return zt})),n.d(e,"findDOMNode",(function(){return kt})),n.d(e,"flushSync",(function(){return Tt})),n.d(e,"forwardRef",(function(){return H})),n.d(e,"hydrate",(function(){return ht})),n.d(e,"isElement",(function(){return It})),n.d(e,"isFragment",(function(){return Et})),n.d(e,"isValidElement",(function(){return Ot})),n.d(e,"lazy",(function(){return J})),n.d(e,"memo",(function(){return N})),n.d(e,"render",(function(){return dt})),n.d(e,"startTransition",(function(){return Rt})),n.d(e,"unmountComponentAtNode",(function(){return jt})),n.d(e,"unstable_batchedUpdates",(function(){return _t})),n.d(e,"useDeferredValue",(function(){return Dt})),n.d(e,"useInsertionEffect",(function(){return Ft})),n.d(e,"useSyncExternalStore",(function(){return Mt})),n.d(e,"useTransition",(function(){return Bt})),n.d(e,"version",(function(){return xt}));var r,o,i,a,s=n(12),l=0,c=[],u=[],d=s.h,h=d.__b,p=d.__r,f=d.diffed,m=d.__c,g=d.unmount,v=d.__;function b(t,e){d.__h&&d.__h(o,t,l||e),l=0;var n=o.__H||(o.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:u}),n.__[t]}function y(t){return l=1,A(I,t)}function A(t,e,n){var i=b(r++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):I(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.u)){var a=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return!!t.__c}));if(r.every((function(t){return!t.__N})))return!s||s.call(this,t,e,n);var o=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(o=!0)}})),!(!o&&i.__c.props===t)&&(!s||s.call(this,t,e,n))};o.u=!0;var s=o.shouldComponentUpdate,l=o.componentWillUpdate;o.componentWillUpdate=function(t,e,n){if(this.__e){var r=s;s=void 0,a(t,e,n),s=r}l&&l.call(this,t,e,n)},o.shouldComponentUpdate=a}return i.__N||i.__}function C(t,e){var n=b(r++,3);!d.__s&&F(n.__H,e)&&(n.__=t,n.i=e,o.__H.__h.push(n))}function S(t,e){var n=b(r++,4);!d.__s&&F(n.__H,e)&&(n.__=t,n.i=e,o.__h.push(n))}function x(t){return l=5,O((function(){return{current:t}}),[])}function w(t,e,n){l=6,S((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 O(t,e){var n=b(r++,7);return F(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function E(t,e){return l=8,O((function(){return t}),e)}function L(t){var e=o.context[t.__c],n=b(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(o)),e.props.value):t.__}function j(t,e){d.useDebugValue&&d.useDebugValue(e?e(t):t)}function k(t){var e=b(r++,10),n=y();return e.__=t,o.componentDidCatch||(o.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function _(){var t=b(r++,11);if(!t.__){for(var e=o.__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 T(){for(var t;t=c.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(D),t.__H.__h.forEach(B),t.__H.__h=[]}catch(e){t.__H.__h=[],d.__e(e,t.__v)}}d.__b=function(t){o=null,h&&h(t)},d.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),v&&v(t,e)},d.__r=function(t){p&&p(t),r=0;var e=(o=t.__c).__H;e&&(i===o?(e.__h=[],o.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=u,t.__N=t.i=void 0}))):(e.__h.forEach(D),e.__h.forEach(B),e.__h=[],r=0)),i=o},d.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==c.push(e)&&a===d.requestAnimationFrame||((a=d.requestAnimationFrame)||R)(T)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==u&&(t.__=t.__V),t.i=void 0,t.__V=u}))),i=o=null},d.__c=function(t,e){e.some((function(t){try{t.__h.forEach(D),t.__h=t.__h.filter((function(t){return!t.__||B(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],d.__e(n,t.__v)}})),m&&m(t,e)},d.unmount=function(t){g&&g(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{D(t)}catch(t){e=t}})),n.__H=void 0,e&&d.__e(e,n.__v))};var P="function"==typeof requestAnimationFrame;function R(t){var e,n=function(){clearTimeout(r),P&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);P&&(e=requestAnimationFrame(n))}function D(t){var e=o,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),o=e}function B(t){var e=o;t.__c=t.__(),o=e}function F(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function I(t,e){return"function"==typeof e?e(t):e}function M(t,e){for(var n in e)t[n]=e[n];return t}function W(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function z(t,e){this.props=t,this.context=e}function N(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:W(this.props,t)}function r(e){return this.shouldComponentUpdate=n,Object(s.e)(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(z.prototype=new s.a).isPureReactComponent=!0,z.prototype.shouldComponentUpdate=function(t,e){return W(this.props,t)||W(this.state,e)};var V=s.h.__b;s.h.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),V&&V(t)};var U="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function H(t){function e(e){var n=M({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=U,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var $=function(t,e){return null==t?null:Object(s.j)(Object(s.j)(t).map(e))},G={map:$,forEach:$,count:function(t){return t?Object(s.j)(t).length:0},only:function(t){var e=Object(s.j)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:s.j},Y=s.h.__e;s.h.__e=function(t,e,n,r){if(t.then)for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);Y(t,e,n,r)};var Q=s.h.unmount;function Z(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=M({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Z(t,e,n)}))),t}function X(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return X(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 q(){this.__u=0,this.t=null,this.__b=null}function K(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function J(t){var e,n,r;function o(o){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return Object(s.e)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function tt(){this.u=null,this.o=null}s.h.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Q&&Q(t)},(q.prototype=new s.a).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=K(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=X(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Z(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&Object(s.e)(s.b,null,t.fallback);return o&&(o.__u&=-33),[Object(s.e)(s.b,null,e.__a?null:t.children),o]};var et=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 nt(t){return this.getChildContext=function(){return t.context},t.children}function rt(t){var e=this,n=t.i;e.componentWillUnmount=function(){Object(s.i)(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)}}),Object(s.i)(Object(s.e)(nt,{context:e.context},t.__v),e.l)}function ot(t,e){var n=Object(s.e)(rt,{__v:t,i:e});return n.containerInfo=e,n}(tt.prototype=new s.a).__a=function(t){var e=this,n=K(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),et(e,t,r)):o()};n?n(i):i()}},tt.prototype.render=function(t){this.u=null,this.o=new Map;var e=Object(s.j)(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},tt.prototype.componentDidUpdate=tt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){et(t,n,e)}))};var it="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,at=/^(?: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]/,st=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,lt=/[A-Z0-9]/g,ct="undefined"!=typeof document,ut=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function dt(t,e,n){return null==e.__k&&(e.textContent=""),Object(s.i)(t,e),"function"==typeof n&&n(),t?t.__c:null}function ht(t,e,n){return Object(s.g)(t,e),"function"==typeof n&&n(),t?t.__c:null}s.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(s.a.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var pt=s.h.event;function ft(){}function mt(){return this.cancelBubble}function gt(){return this.defaultPrevented}s.h.event=function(t){return pt&&(t=pt(t)),t.persist=ft,t.isPropagationStopped=mt,t.isDefaultPrevented=gt,t.nativeEvent=t};var vt,bt={enumerable:!1,configurable:!0,get:function(){return this.class}},yt=s.h.vnode;s.h.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={};for(var o in e){var i=e[o];if(!("value"===o&&"defaultValue"in e&&null==i||ct&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===i?i="":"translate"===a&&"no"===i?i=!1:"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||ut(e.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":st.test(o)?o=a:-1===n.indexOf("-")&&at.test(o)?o=o.replace(lt,"-$&").toLowerCase():null===i&&(i=void 0):a=o="oninput","oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=Object(s.j)(e.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=Object(s.j)(e.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",bt)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=it,yt&&yt(t)};var At=s.h.__r;s.h.__r=function(t){At&&At(t),vt=t.__c};var Ct=s.h.diffed;s.h.diffed=function(t){Ct&&Ct(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),vt=null};var St={ReactCurrentDispatcher:{current:{readContext:function(t){return vt.__n[t.__c].props.value}}}},xt="17.0.2";function wt(t){return s.e.bind(null,t)}function Ot(t){return!!t&&t.$$typeof===it}function Et(t){return Ot(t)&&t.type===s.b}function Lt(t){return Ot(t)?s.c.apply(null,arguments):t}function jt(t){return!!t.__k&&(Object(s.i)(null,t),!0)}function kt(t){return t&&(t.base||1===t.nodeType&&t)||null}var _t=function(t,e){return t(e)},Tt=function(t,e){return t(e)},Pt=s.b;function Rt(t){t()}function Dt(t){return t}function Bt(){return[!1,Rt]}var Ft=S,It=Ot;function Mt(t,e){var n=e(),r=y({h:{__:n,v:e}}),o=r[0].h,i=r[1];return S((function(){o.__=n,o.v=e,Wt(o)&&i({h:o})}),[t,n,e]),C((function(){return Wt(o)&&i({h:o}),t((function(){Wt(o)&&i({h:o})}))}),[t]),n}function Wt(t){var e,n,r=t.v,o=t.__;try{var i=r();return!((e=o)===(n=i)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(t){return!0}}var zt={useState:y,useId:_,useReducer:A,useEffect:C,useLayoutEffect:S,useInsertionEffect:Ft,useTransition:Bt,useDeferredValue:Dt,useSyncExternalStore:Mt,startTransition:Rt,useRef:x,useImperativeHandle:w,useMemo:O,useCallback:E,useContext:L,useDebugValue:j,version:"17.0.2",Children:G,render:dt,hydrate:ht,unmountComponentAtNode:jt,createPortal:ot,createElement:s.e,createContext:s.d,createFactory:wt,cloneElement:Lt,createRef:s.f,Fragment:s.b,isValidElement:Ot,isElement:It,isFragment:Et,findDOMNode:kt,Component:s.a,PureComponent:z,memo:N,forwardRef:H,flushSync:Tt,unstable_batchedUpdates:_t,StrictMode:Pt,Suspense:q,SuspenseList:tt,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:St}},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"j",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"a",(function(){return l})),n.d(e,"d",(function(){return c})),n.d(e,"h",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return h})),n.d(e,"i",(function(){return p})),n.d(e,"l",(function(){return f})),n.d(e,"k",(function(){return m}));var r=n(13);class o extends r.a{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 i extends r.a{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 a extends r.a{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 s extends r.a{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#FFFFFF30",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 l extends r.a{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 c extends r.a{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 u extends r.a{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 d extends r.a{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 h extends r.a{constructor(t={}){super(),this.visible=!0,this.text="",this.background=new l({}),this.foreground=new c({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.background&&(this.background=new l(t.background)),void 0!==t.foreground&&(this.foreground=new c(t.foreground))}}class p extends r.a{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 f extends r.a{constructor(t={}){super(),this.enabled=!1,void 0!==t.enabled&&(this.enabled=t.enabled)}}class m extends r.a{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)}}},function(t,e,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"e",(function(){return l}));var r=function(t,e){return r=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])},r(t,e)};function o(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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}Object.create;function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}Object.create},function(t,e,n){n(0),t.exports=n(120)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{_marker(){}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return l}));var r=n(0),o=n(30),i=n(34);const a=Object(r.createContext)(null);function s(t){return{getColorValue:e=>{if(e){if(e.startsWith("?")){const n=e.slice(1);if(n in t)return t[n];i.a.debugWarn(`Color ${n} not found in palette`)}return e}i.a.debugWarn("Color is missing")}}}class l{static setPalette(t){this.palette=t}static setBarcodeTextLocalization(t){this.barcodeTextLocalization=t}static getColorValue(t){return s(l.palette).getColorValue(t)}static getPolygonColorValues(t,e){return new o.PolygonStyle({fillColor:e?l.getColorValue(t.fillColor):"transparent",strokeColor:e?l.getColorValue(t.strokeColor):"transparent",strokeWidth:t.strokeWidth,cornerRadius:t.cornerRadius})}static getLocalizedBarcodeText(t,e=[]){if(t.startsWith("?")){const e=t.slice(1);e in l.barcodeTextLocalization?t=l.barcodeTextLocalization[e]:i.a.debugWarn(`Barcode text localization key ${e} not found in localization`)}for(let n of e)t=t.replace("%d",n);return t}}l.palette=(new o.BarcodeScannerConfiguration).palette,l.barcodeTextLocalization=(new o.BarcodeScannerConfiguration).localization},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(58);class o{constructor(t,e){this.x=t,this.y=e}static toPolygon(t,e){return[o.scaleDownTo(t[0],e),o.scaleDownTo(t[1],e),o.scaleDownTo(t[2],e),o.scaleDownTo(t[3],e)]}static scaleToPoint(t,e,n,r){return new o(r*(t.x-e),r*(t.y-n))}static scaleListToHtmlElement(t,e,n){return t.map((t=>o.scaleToHtmlElement(t,e,n)))}static scaleToHtmlElement(t,e,n){return new o(t.x*(n.clientWidth/e.width),t.y*(n.clientHeight/e.height))}static scaleUpTo(t,e){return new o(t.x*e.width,t.y*e.height)}static scaleDownTo(t,e){return new o(t.x/e.width,t.y/e.height)}static fromHtmlElement(t){return new o(t.offsetLeft,t.offsetTop)}static withScale(t,e,n){return new o(t/n,e/n)}static fromCoordinates(t,e,n,r){if(!t||!e)return new o(0,0);const i=new o(t,e);return r=null!=r?r:1,1===(n=n?n%4:0)?o.withScale(i.y,-i.x,r):2===n?o.withScale(-i.x,-i.y,r):3===n?o.withScale(-i.y,i.x,r):o.withScale(i.x,i.y,r)}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 o(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 o(0,0)}static centerX(t){if(t)return(o.highestX(t)+o.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 o.highestX(t)-o.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 r=Math.atan2(t.y-e.y,t.x-e.x);return{x:t.x-n*Math.cos(r),y:t.y-n*Math.sin(r)}}let r="";const i=n(t[0],t[1],o.distance(t[0],t[1])/2);r+=`M ${i.x} ${i.y}`;for(let i=0;i<t.length;i++){const a=t[i],s=t[(i+1)%t.length],l=t[(i+2)%t.length],c=n(s,l,o.distance(s,l)/2),u=Math.abs(Math.atan2(s.y-a.y,s.x-a.x)-Math.atan2(s.y-l.y,s.x-l.x)),d=u>Math.PI?2*Math.PI-u:u,h=Math.min(Math.sqrt(Math.pow(s.x-a.x,2)+Math.pow(s.y-a.y,2)),Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2))),p=Math.min(e,h*Math.tan(d/2)/2),f=Math.abs(p/Math.tan(d/2)),m=(s.x-a.x)*(s.y-l.y)-(s.x-l.x)*(s.y-a.y)<0?1:0,g=n(s,a,f),v=n(s,l,f);r+=` L${g.x} ${g.y}`,r+=` A${p} ${p} 0 0 ${m} ${v.x} ${v.y}`,r+=` L${c.x} ${c.y}`}return r+" 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 o(t.x-e.x,t.y-e.y)}static add(t,e){return new o(t.x+e.x,t.y+e.y)}static multiply(t,e){return new o(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 o(Object(r.a)(t.x,0,e.width),Object(r.a)(t.y,0,e.height))}}},function(t,e,n){"use strict";var r=n(86);e.a=r.a},function(t,e,n){"use strict";function r(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=r(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}e.a=function(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=r(t))&&(o&&(o+=" "),o+=e);return o}},function(t,e,n){"use strict";n.d(e,"b",(function(){return A}));var r=n(2),o=n(7),i=n(55),a=n(110),s=n(132),l=n(96);const c=["ownerState"],u=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(t){return"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t}const p=Object(s.a)(),f=t=>t?t.charAt(0).toLowerCase()+t.slice(1):t;function m({defaultTheme:t,theme:e,themeId:n}){return r=e,0===Object.keys(r).length?t:e[n]||e;var r}function g(t){return t?(e,n)=>n[t]:null}function v(t,e){let{ownerState:n}=e,i=Object(o.a)(e,c);const a="function"==typeof t?t(Object(r.a)({ownerState:n},i)):t;if(Array.isArray(a))return a.flatMap((t=>v(t,Object(r.a)({ownerState:n},i))));if(a&&"object"==typeof a&&Array.isArray(a.variants)){const{variants:t=[]}=a;let e=Object(o.a)(a,u);return t.forEach((t=>{let o=!0;"function"==typeof t.props?o=t.props(Object(r.a)({ownerState:n},i)):Object.keys(t.props).forEach((e=>{(null==n?void 0:n[e])!==t.props[e]&&i[e]!==t.props[e]&&(o=!1)})),o&&(Array.isArray(e)||(e=[e]),e.push("function"==typeof t.style?t.style(Object(r.a)({ownerState:n},i)):t.style))})),e}return a}var b=n(61),y=n(40);const A=t=>h(t)&&"classes"!==t,C=function(t={}){const{themeId:e,defaultTheme:n=p,rootShouldForwardProp:s=h,slotShouldForwardProp:c=h}=t,u=t=>Object(l.a)(Object(r.a)({},t,{theme:m(Object(r.a)({},t,{defaultTheme:n,themeId:e}))}));return u.__mui_systemSx=!0,(t,l={})=>{Object(i.b)(t,(t=>t.filter((t=>!(null!=t&&t.__mui_systemSx)))));const{name:p,slot:b,skipVariantsResolver:y,skipSx:A,overridesResolver:C=g(f(b))}=l,S=Object(o.a)(l,d),x=void 0!==y?y:b&&"Root"!==b&&"root"!==b||!1,w=A||!1;let O=h;"Root"===b||"root"===b?O=s:b?O=c:function(t){return"string"==typeof t&&t.charCodeAt(0)>96}(t)&&(O=void 0);const E=Object(i.a)(t,Object(r.a)({shouldForwardProp:O,label:undefined},S)),L=t=>"function"==typeof t&&t.__emotion_real!==t||Object(a.b)(t)?o=>v(t,Object(r.a)({},o,{theme:m({theme:o.theme,defaultTheme:n,themeId:e})})):t,j=(o,...i)=>{let a=L(o);const s=i?i.map(L):[];p&&C&&s.push((t=>{const o=m(Object(r.a)({},t,{defaultTheme:n,themeId:e}));if(!o.components||!o.components[p]||!o.components[p].styleOverrides)return null;const i=o.components[p].styleOverrides,a={};return Object.entries(i).forEach((([e,n])=>{a[e]=v(n,Object(r.a)({},t,{theme:o}))})),C(t,a)})),p&&!x&&s.push((t=>{var o;const i=m(Object(r.a)({},t,{defaultTheme:n,themeId:e}));return v({variants:null==i||null==(o=i.components)||null==(o=o[p])?void 0:o.variants},Object(r.a)({},t,{theme:i}))})),w||s.push(u);const l=s.length-i.length;if(Array.isArray(o)&&l>0){const t=new Array(l).fill("");a=[...o,...t],a.raw=[...o.raw,...t]}const c=E(a,...s);return t.muiName&&(c.muiName=t.muiName),c};return E.withConfig&&(j.withConfig=E.withConfig),j}}({themeId:y.a,defaultTheme:b.a,rootShouldForwardProp:A});e.a=C},function(t,e,n){"use strict";n.d(e,"a",(function(){return C})),n.d(e,"b",(function(){return A})),n.d(e,"c",(function(){return H})),n.d(e,"d",(function(){return $})),n.d(e,"e",(function(){return v})),n.d(e,"f",(function(){return y})),n.d(e,"g",(function(){return U})),n.d(e,"h",(function(){return o})),n.d(e,"i",(function(){return V})),n.d(e,"j",(function(){return _}));var r,o,i,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 o,i,a,s={};for(a in e)"key"==a?o=e[a]:"ref"==a?i=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?r.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 b(t,s,o,i,null)}function b(t,e,n,r,a){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++i:a,__i:-1,__u:0};return null==a&&null!=o.vnode&&o.vnode(s),s}function y(){return{current:null}}function A(t){return t.children}function C(t,e){this.props=t,this.context=e}function S(t,e){if(null==e)return t.__?S(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?S(t):null}function x(t,e,n){var r,i=t.__v,a=i.__e,s=t.__P;if(s)return(r=m({},i)).__v=i.__v+1,o.vnode&&o.vnode(r),F(s,r,i,t.__n,void 0!==s.ownerSVGElement,32&i.__u?[a]:null,e,null==a?S(i):a,!!(32&i.__u),n),r.__v=i.__v,r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=a&&w(r),r}function w(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 w(t)}}function O(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!E.__r++||s!==o.debounceRendering)&&((s=o.debounceRendering)||l)(E)}function E(){var t,e,n,r=[],i=[];for(a.sort(c);t=a.shift();)t.__d&&(n=a.length,e=x(t,r,i)||e,0===n||a.length>n?(I(r,e,i),i.length=r.length=0,e=void 0,a.sort(c)):e&&o.__c&&o.__c(e,h));e&&I(r,e,i),E.__r=0}function L(t,e,n,r,o,i,a,s,l,c,u){var p,f,m,g,v,b=r&&r.__k||h,y=e.length;for(n.__d=l,j(n,e,b),l=n.__d,p=0;p<y;p++)null!=(m=n.__k[p])&&"boolean"!=typeof m&&"function"!=typeof m&&(f=-1===m.__i?d:b[m.__i]||d,m.__i=p,F(t,m,f,o,i,a,s,l,c,u),g=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&W(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 j(t,e,n){var r,o,i,a,s,l=e.length,c=n.length,u=c,d=0;for(t.__k=[],r=0;r<l;r++)null!=(o=t.__k[r]=null==(o=e[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?b(null,o,null,null,o):f(o)?b(A,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?b(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=t,o.__b=t.__b+1,s=T(o,n,a=r+d,u),o.__i=s,i=null,-1!==s&&(u--,(i=n[s])&&(i.__u|=131072)),null==i||null===i.__v?(-1==s&&d--,"function"!=typeof o.type&&(o.__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!==r+d&&(o.__u|=65536))):(i=n[r])&&null==i.key&&i.__e&&0==(131072&i.__u)&&(i.__e==t.__d&&(t.__d=S(i)),z(i,i,!1),n[r]=null,u--);if(u)for(r=0;r<c;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==t.__d&&(t.__d=S(i)),z(i,i))}function k(t,e,n){var r,o;if("function"==typeof t.type){for(r=t.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=t,e=k(r[o],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,e){return e=e||[],null==t||"boolean"==typeof t||(f(t)?t.some((function(t){_(t,e)})):e.push(t)),e}function T(t,e,n,r){var o=t.key,i=t.type,a=n-1,s=n+1,l=e[n];if(null===l||l&&o==l.key&&i===l.type)return n;if(r>(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)&&o==l.key&&i===l.type)return a;a--}if(s<e.length){if((l=e[s])&&0==(131072&l.__u)&&o==l.key&&i===l.type)return s;s++}}return-1}function P(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 R(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||P(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||P(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=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+i]=n,n?r?n.u=r.u:(n.u=Date.now(),t.addEventListener(e,i?B:D,i)):t.removeEventListener(e,i?B:D,i);else{if(o)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(o.event?o.event(t):t)}}function B(t){if(this.l)return this.l[t.type+!0](o.event?o.event(t):t)}function F(t,e,n,r,i,a,s,l,c,u){var d,h,p,g,v,b,y,S,x,w,O,E,j,k,_,T=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=e.__e=n.__e]),(d=o.__b)&&d(e);t:if("function"==typeof T)try{if(S=e.props,x=(d=T.contextType)&&r[d.__c],w=d?x?x.props.value:d.__:r,n.__c?y=(h=e.__c=n.__c).__=h.__E:("prototype"in T&&T.prototype.render?e.__c=h=new T(S,w):(e.__c=h=new C(S,w),h.constructor=T,h.render=N),x&&x.sub(h),h.props=S,h.state||(h.state={}),h.context=w,h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,T.getDerivedStateFromProps(S,h.__s))),g=h.props,v=h.state,h.__v=e,p)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==T.getDerivedStateFromProps&&S!==g&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(S,w),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(S,h.__s,w)||e.__v===n.__v)){for(e.__v!==n.__v&&(h.props=S,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),O=0;O<h._sb.length;O++)h.__h.push(h._sb[O]);h._sb=[],h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(S,h.__s,w),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(g,v,b)}))}if(h.context=w,h.props=S,h.__P=t,h.__e=!1,E=o.__r,j=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,E&&E(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,E&&E(e),d=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++j<25);h.state=h.__s,null!=h.getChildContext&&(r=m(m({},r),h.getChildContext())),p||null==h.getSnapshotBeforeUpdate||(b=h.getSnapshotBeforeUpdate(g,v)),L(t,f(_=null!=d&&d.type===A&&null==d.key?d.props.children:d)?_:[_],e,n,r,i,a,s,l,c,u),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),y&&(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),o.__e(t,e,n)}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=M(n.__e,e,n,r,i,a,s,c,u);(d=o.diffed)&&d(e)}function I(t,e,n){for(var r=0;r<n.length;r++)W(n[r],n[++r],n[++r]);o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function M(t,e,n,o,i,a,s,l,c){var u,h,p,m,v,b,y,A=n.props,C=e.props,x=e.type;if("svg"===x&&(i=!0),null!=a)for(u=0;u<a.length;u++)if((v=a[u])&&"setAttribute"in v==!!x&&(x?v.localName===x:3===v.nodeType)){t=v,a[u]=null;break}if(null==t){if(null===x)return document.createTextNode(C);t=i?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,C.is&&C),a=null,l=!1}if(null===x)A===C||l&&t.data===C||(t.data=C);else{if(a=a&&r.call(t.childNodes),A=n.props||d,!l&&null!=a)for(A={},u=0;u<t.attributes.length;u++)A[(v=t.attributes[u]).name]=v.value;for(u in A)v=A[u],"children"==u||("dangerouslySetInnerHTML"==u?p=v:"key"===u||u in C||R(t,u,null,v,i));for(u in C)v=C[u],"children"==u?m=v:"dangerouslySetInnerHTML"==u?h=v:"value"==u?b=v:"checked"==u?y=v:"key"===u||l&&"function"!=typeof v||A[u]===v||R(t,u,v,A[u],i);if(h)l||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(p&&(t.innerHTML=""),L(t,f(m)?m:[m],e,n,o,i&&"foreignObject"!==x,a,s,a?a[0]:n.__k&&S(n,0),l,c),null!=a)for(u=a.length;u--;)null!=a[u]&&g(a[u]);l||(u="value",void 0!==b&&(b!==t[u]||"progress"===x&&!b||"option"===x&&b!==A[u])&&R(t,u,b,A[u],!1),u="checked",void 0!==y&&y!==t[u]&&R(t,u,y,A[u],!1))}return t}function W(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function z(t,e,n){var r,i;if(o.unmount&&o.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||W(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){o.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&z(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||g(t.__e),t.__=t.__e=t.__d=void 0}function N(t,e,n){return this.constructor(t,n)}function V(t,e,n){var i,a,s,l;o.__&&o.__(t,e),a=(i="function"==typeof n)?null:n&&n.__k||e.__k,s=[],l=[],F(e,t=(!i&&n||e).__k=v(A,null,[t]),a||d,d,void 0!==e.ownerSVGElement,!i&&n?[n]:a?null:e.firstChild?r.call(e.childNodes):null,s,!i&&n?n:a?a.__e:e.firstChild,i,l),t.__d=void 0,I(s,t,l)}function U(t,e){V(t,e,U)}function H(t,e,n){var o,i,a,s,l=m({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==a?o=e[a]:"ref"==a?i=e[a]:l[a]=void 0===e[a]&&void 0!==s?s[a]:e[a];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),b(t.type,l,o||t.key,i||t.ref,null)}function $(t,e){var n={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,O(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}r=h.slice,o={__e:function(t,e,n,r){for(var o,i,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),a=o.__d),a)return o.__E=o}catch(e){t=e}throw t}},i=0,C.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),O(this))},C.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),O(this))},C.prototype.render=A,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(t,e){return t.__v.__b-e.__v.__b},E.__r=0,u=0},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{}},function(t,e,n){"use strict";n.d(e,"b",(function(){return p})),n.d(e,"a",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return b})),n.d(e,"e",(function(){return y}));var r=n(31),o=n(20),i=n(45);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(t){const e={};return n=>(void 0===e[n]&&(e[n]=t(n)),e[n])}((t=>{if(t.length>2){if(!l[t])return[t];t=l[t]}const[e,n]=t.split(""),r=a[e],o=s[n]||"";return Array.isArray(o)?o.map((t=>r+t)):[r+o]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function p(t,e,n,r){var i;const a=null!=(i=Object(o.b)(t,e,!1))?i:n;return"number"==typeof a?t=>"string"==typeof t?t:a*t:Array.isArray(a)?t=>"string"==typeof t?t:a[t]:"function"==typeof a?a:()=>{}}function f(t){return p(t,"spacing",8)}function m(t,e){if("string"==typeof e||null==e)return e;const n=t(Math.abs(e));return e>=0?n:"number"==typeof n?-n:`-${n}`}function g(t,e,n,o){if(-1===e.indexOf(n))return null;const i=function(t,e){return n=>t.reduce(((t,r)=>(t[r]=m(e,n),t)),{})}(c(n),o),a=t[n];return Object(r.b)(t,a,i)}function v(t,e){const n=f(t.theme);return Object.keys(t).map((r=>g(t,e,r,n))).reduce(i.a,{})}function b(t){return v(t,u)}function y(t){return v(t,d)}function A(t){return v(t,h)}b.propTypes={},b.filterProps=u,y.propTypes={},y.filterProps=d,A.propTypes={},A.filterProps=h},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(126),o=n(61),i=n(40);function a({props:t,name:e}){return Object(r.a)({props:t,name:e,defaultTheme:o.a,themeId:i.a})}},,function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"a",(function(){return d}));var r=n(1),o=n(13);class i extends o.a{constructor(t={}){super(),this.visible=!0,this.deselected=new r.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),this.selected=new r.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.deselected&&(this.deselected=new r.g(t.deselected)),void 0!==t.selected&&(this.selected=new r.g(t.selected))}}class a extends o.a{constructor(t={}){super(),this.imageVisible=!0,this.titleSelected=new r.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleSelected=new r.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.titleDeselected=new r.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleDeselected=new r.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.backgroundSelected=new r.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:0,cornerRadius:10}),this.backgroundDeselected=new r.g({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:0,cornerRadius:10}),void 0!==t.imageVisible&&(this.imageVisible=t.imageVisible),void 0!==t.titleSelected&&(this.titleSelected=new r.j(t.titleSelected)),void 0!==t.subtitleSelected&&(this.subtitleSelected=new r.j(t.subtitleSelected)),void 0!==t.titleDeselected&&(this.titleDeselected=new r.j(t.titleDeselected)),void 0!==t.subtitleDeselected&&(this.subtitleDeselected=new r.j(t.subtitleDeselected)),void 0!==t.backgroundSelected&&(this.backgroundSelected=new r.g(t.backgroundSelected)),void 0!==t.backgroundDeselected&&(this.backgroundDeselected=new r.g(t.backgroundDeselected))}}class s extends o.a{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 r.a(t.background),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor)}}class l extends o.a{constructor(t={}){super(),this.visible=!1,this.counterBadge=new s({background:new r.a({}),foregroundColor:"?sbColorOnSurface"}),this.automaticSelectionEnabled=!1,this.barcodeItemInfoPosition="BELOW",this.polygon=new i({visible:!0,deselected:new r.g({}),selected:new r.g({})}),this.barcodeItemConfiguration=new a({imageVisible:!0,titleSelected:new r.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new r.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new r.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new r.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new r.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new r.g({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.counterBadge&&(this.counterBadge=new s(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 i(t.polygon)),void 0!==t.barcodeItemConfiguration&&(this.barcodeItemConfiguration=new a(t.barcodeItemConfiguration))}}class c extends o.a{constructor(t={}){super(),this.visible=!0,this.partiallyScanned=new r.g({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.rejected=new r.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.completed=new r.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.partiallyScanned&&(this.partiallyScanned=new r.g(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new r.g(t.rejected)),void 0!==t.completed&&(this.completed=new r.g(t.completed))}}class u extends o.a{constructor(t={}){super(),this.partiallyScanned=new s({visible:!0,background:new r.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.rejected=new s({visible:!0,background:new r.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorNegative",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.completed=new s({visible:!0,background:new r.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),void 0!==t.partiallyScanned&&(this.partiallyScanned=new s(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new s(t.rejected)),void 0!==t.completed&&(this.completed=new s(t.completed))}}class d extends o.a{constructor(t={}){super(),this.visible=!1,this.automaticSelectionEnabled=!0,this.polygon=new c({}),this.badge=new u({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.polygon&&(this.polygon=new c(t.polygon)),void 0!==t.badge&&(this.badge=new u(t.badge))}}},function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeConfigs",(function(){return E})),n.d(e,"BarcodeScannerTypes",(function(){return L})),n.d(e,"BarcodeTypes",(function(){return r})),n.d(e,"BarcodeDocumentTypes",(function(){return o})),n.d(e,"CheckRecognizerTypes",(function(){return i})),n.d(e,"CommonFieldType",(function(){return a})),n.d(e,"DocumentDetectorTypes",(function(){return s})),n.d(e,"DocumentQualityAnalyzerTypes",(function(){return l})),n.d(e,"EhicTypes",(function(){return c})),n.d(e,"GenericDocument",(function(){return T})),n.d(e,"GenericDocumentRecognizerConfigs",(function(){return u})),n.d(e,"GenericDocumentRecognizerTypes",(function(){return h})),n.d(e,"GenericDocumentTypes",(function(){return p})),n.d(e,"GenericTextLineScannerTypes",(function(){return f})),n.d(e,"Geometry",(function(){return W})),n.d(e,"LicensePlateScannerTypes",(function(){return m})),n.d(e,"MedicalCertificateTypes",(function(){return g})),n.d(e,"MRZTypes",(function(){return b})),n.d(e,"OcrElements",(function(){return y})),n.d(e,"ParametricFilters",(function(){return A})),n.d(e,"PdfConfig",(function(){return C})),n.d(e,"TiffTypes",(function(){return S})),n.d(e,"FrameUtilities",(function(){return v})),n.d(e,"FrameAccumulationTypes",(function(){return d})),n.d(e,"ImageTypes",(function(){return x})),n.d(e,"PartiallyConstructible",(function(){return j.a}));var r={};n.r(r),n.d(r,"BarcodeFormats",(function(){return k}));var o={};n.r(o),n.d(o,"BarcodeDocumentFormats",(function(){return _}));var i={};n.r(i),n.d(i,"RecognitionResult",(function(){return P}));var a={};n.r(a);var s={};n.r(s),n.d(s,"DocumentDetectorParameters",(function(){return z})),n.d(s,"DocumentDetectorConfiguration",(function(){return N})),n.d(s,"DocumentDetectionScores",(function(){return V})),n.d(s,"DocumentDetectionResult",(function(){return U}));var l={};n.r(l),n.d(l,"DocumentQualityThreshold",(function(){return H})),n.d(l,"DocumentQualityAnalyzerConfiguration",(function(){return $})),n.d(l,"DocumentQualityAnalyzerResult",(function(){return G}));var c={};n.r(c),n.d(c,"RecognitionResult",(function(){return Y})),n.d(c,"RecognizerParameters",(function(){return Q}));var u={};n.r(u),n.d(u,"GDRConfig",(function(){return R})),n.d(u,"DateValidationConfig",(function(){return Z})),n.d(u,"EuropeanHealthInsuranceCardConfig",(function(){return X})),n.d(u,"MRZFallbackConfig",(function(){return q})),n.d(u,"GDRGroupConfig",(function(){return K}));var d={};n.r(d),n.d(d,"ResultAccumulationConfig",(function(){return J}));var h={};n.r(h),n.d(h,"RecognitionResult",(function(){return tt})),n.d(h,"RecognitionParameters",(function(){return et})),n.d(h,"GenericDocumentRecognizerParameters",(function(){return nt}));var p={};n.r(p),n.d(p,"DocumentTypes",(function(){return rt}));var f={};n.r(f),n.d(f,"WordBox",(function(){return ot})),n.d(f,"SymbolBox",(function(){return it})),n.d(f,"ScannerResult",(function(){return at})),n.d(f,"ContentValidator",(function(){return D})),n.d(f,"DefaultContentValidator",(function(){return st})),n.d(f,"PresetContentValidator",(function(){return lt})),n.d(f,"PatternContentValidator",(function(){return ct})),n.d(f,"ScannerConfiguration",(function(){return ut}));var m={};n.r(m),n.d(m,"ScannerConfiguration",(function(){return dt})),n.d(m,"ScannerResult",(function(){return ht}));var g={};n.r(g),n.d(g,"RecognitionParameters",(function(){return pt})),n.d(g,"CheckBox",(function(){return ft})),n.d(g,"DateRecord",(function(){return mt})),n.d(g,"PatientInfoField",(function(){return gt})),n.d(g,"PatientInfoBox",(function(){return vt})),n.d(g,"RecognitionResult",(function(){return bt}));var v={};n.r(v),n.d(v,"AccumulatedResultsVerifierConfig",(function(){return yt}));var b={};n.r(b),n.d(b,"RecognitionResult",(function(){return At})),n.d(b,"RecognizerConfiguration",(function(){return Ct}));var y={};n.r(y),n.d(y,"OcrElement",(function(){return B})),n.d(y,"Glyph",(function(){return St})),n.d(y,"Word",(function(){return xt})),n.d(y,"Line",(function(){return wt})),n.d(y,"Block",(function(){return Ot})),n.d(y,"Page",(function(){return Et}));var A={};n.r(A),n.d(A,"ParametricFilter",(function(){return F})),n.d(A,"ScanbotBinarizationFilter",(function(){return Lt})),n.d(A,"CustomBinarizationFilter",(function(){return jt})),n.d(A,"ColorDocumentFilter",(function(){return kt})),n.d(A,"BrightnessFilter",(function(){return _t})),n.d(A,"ContrastFilter",(function(){return Tt})),n.d(A,"GrayscaleFilter",(function(){return Pt})),n.d(A,"LegacyFilter",(function(){return Rt})),n.d(A,"WhiteBlackPointFilter",(function(){return Dt}));var C={};n.r(C),n.d(C,"PdfAttributes",(function(){return Bt})),n.d(C,"PdfConfig",(function(){return Ft}));var S={};n.r(S),n.d(S,"UserFieldValue",(function(){return I})),n.d(S,"UserFieldDoubleValue",(function(){return It})),n.d(S,"UserFieldStringValue",(function(){return Mt})),n.d(S,"UserFieldIntValue",(function(){return Wt})),n.d(S,"UserField",(function(){return zt})),n.d(S,"TIFFWriterParameters",(function(){return Nt}));var x={};n.r(x);var w,O,E=n(60),L=n(66),j=n(5);class k extends j.a{constructor(t={}){super()}}(w=k||(k={})).oned=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],w.twod=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],w.postal=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],w.pharma=["CODE_32","PHARMA_CODE","PHARMA_CODE_TWO_TRACK","PZN"],w.common=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],w.all=["AUSTRALIA_POST","AZTEC","CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","JAPAN_POST","MAXICODE","MICRO_PDF_417","MICRO_QR_CODE","MSI_PLESSEY","PDF_417","PHARMA_CODE","PHARMA_CODE_TWO_TRACK","PZN","QR_CODE","RMQR_CODE","ROYAL_MAIL","ROYAL_TNT_POST","UPC_A","UPC_E","USPS_INTELLIGENT_MAIL"];class _ extends j.a{constructor(t={}){super()}}(O=_||(_={})).all=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],O.documentBarcodeFormats={AAMVA:["PDF_417"],ID_CARD_PDF_417:["PDF_417"],SEPA:["QR_CODE"],MEDICAL_CERTIFICATE:["PDF_417"],DE_MEDICAL_PLAN:["DATA_MATRIX"],BOARDING_PASS:["PDF_417","AZTEC"],VCARD:["QR_CODE"],SWISS_QR:["QR_CODE"],GS1:["CODE_128","AZTEC","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","ITF","MICRO_PDF_417","PDF_417","QR_CODE","UPC_A","UPC_E"],HIBC:["CODE_39","CODE_128","AZTEC","DATA_MATRIX","MICRO_PDF_417","PDF_417","QR_CODE"]};var T=n(38);class P extends j.a{constructor(t={}){if(super(),this.status="FAIL",void 0!==t.status&&(this.status=t.status),void 0===t.check)throw new Error("check must be present in constructor argument");this.check=null!=t.check?new T.GenericDocument(t.check):null}}var R,D,B,F,I,M,W=n(39);class z extends j.a{constructor(t={}){super(),this.isLive=!1,this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.acceptedAspectRatioScore=85,this.aspectRatios=[],this.ignoreOrientationMismatch=!1,void 0!==t.isLive&&(this.isLive=t.isLive),void 0!==t.acceptedAngleScore&&(this.acceptedAngleScore=t.acceptedAngleScore),void 0!==t.acceptedSizeScore&&(this.acceptedSizeScore=t.acceptedSizeScore),void 0!==t.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=t.acceptedBrightnessThreshold),void 0!==t.acceptedAspectRatioScore&&(this.acceptedAspectRatioScore=t.acceptedAspectRatioScore),void 0!==t.aspectRatios&&(this.aspectRatios=t.aspectRatios.map((t=>new W.AspectRatio(t)))),void 0!==t.ignoreOrientationMismatch&&(this.ignoreOrientationMismatch=t.ignoreOrientationMismatch)}}class N extends j.a{constructor(t={}){super(),this.engineMode="ML",this.parameters=new z({}),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.parameters&&(this.parameters=new z(t.parameters))}}class V extends j.a{constructor(t={}){if(super(),void 0===t.totalScore)throw new Error("totalScore must be present in constructor argument");if(this.totalScore=t.totalScore,void 0===t.distanceScore)throw new Error("distanceScore must be present in constructor argument");if(this.distanceScore=t.distanceScore,void 0===t.angleScore)throw new Error("angleScore must be present in constructor argument");if(this.angleScore=t.angleScore,void 0===t.sizeScore)throw new Error("sizeScore must be present in constructor argument");if(this.sizeScore=t.sizeScore,void 0===t.aspectRatioScore)throw new Error("aspectRatioScore must be present in constructor argument");if(this.aspectRatioScore=t.aspectRatioScore,void 0===t.lineCoverageScore)throw new Error("lineCoverageScore must be present in constructor argument");if(this.lineCoverageScore=t.lineCoverageScore,void 0===t.widthScore)throw new Error("widthScore must be present in constructor argument");if(this.widthScore=t.widthScore,void 0===t.heightScore)throw new Error("heightScore must be present in constructor argument");this.heightScore=t.heightScore}}class U extends j.a{constructor(t={}){if(super(),this.status="NOT_ACQUIRED",this.averageBrightness=0,void 0!==t.status&&(this.status=t.status),void 0===t.detectionScores)throw new Error("detectionScores must be present in constructor argument");if(this.detectionScores=new V(t.detectionScores),void 0===t.points)throw new Error("points must be present in constructor argument");if(this.points=t.points.map((t=>({x:t.x,y:t.y}))),void 0===t.horizontalLines)throw new Error("horizontalLines must be present in constructor argument");if(this.horizontalLines=t.horizontalLines.map((t=>new W.LineSegmentInt(t))),void 0===t.verticalLines)throw new Error("verticalLines must be present in constructor argument");if(this.verticalLines=t.verticalLines.map((t=>new W.LineSegmentInt(t))),void 0===t.pointsNormalized)throw new Error("pointsNormalized must be present in constructor argument");if(this.pointsNormalized=t.pointsNormalized.map((t=>({x:t.x,y:t.y}))),void 0===t.horizontalLinesNormalized)throw new Error("horizontalLinesNormalized must be present in constructor argument");if(this.horizontalLinesNormalized=t.horizontalLinesNormalized.map((t=>new W.LineSegmentFloat(t))),void 0===t.verticalLinesNormalized)throw new Error("verticalLinesNormalized must be present in constructor argument");if(this.verticalLinesNormalized=t.verticalLinesNormalized.map((t=>new W.LineSegmentFloat(t))),void 0===t.aspectRatio)throw new Error("aspectRatio must be present in constructor argument");this.aspectRatio=t.aspectRatio,void 0!==t.averageBrightness&&(this.averageBrightness=t.averageBrightness)}}class H extends j.a{constructor(t={}){if(super(),void 0===t.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=t.symbolQuality,void 0===t.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=t.symbolRatio}}class $ extends j.a{constructor(t={}){super(),this.qualityThresholds=[new H({symbolQuality:.5,symbolRatio:.5}),new H({symbolQuality:.7,symbolRatio:.3}),new H({symbolQuality:.85,symbolRatio:.3}),new H({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.detectOrientation=!1,this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==t.qualityThresholds&&(this.qualityThresholds=t.qualityThresholds.map((t=>new H(t)))),void 0!==t.qualityIndices&&(this.qualityIndices=t.qualityIndices.map((t=>t))),void 0!==t.detectOrientation&&(this.detectOrientation=t.detectOrientation),void 0!==t.maxImageSize&&(this.maxImageSize=t.maxImageSize),void 0!==t.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=t.minEstimatedNumberOfSymbolsForDocument),void 0!==t.minProcessedFraction&&(this.minProcessedFraction=t.minProcessedFraction),void 0!==t.maxProcessedFraction&&(this.maxProcessedFraction=t.maxProcessedFraction),void 0!==t.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=t.earlyStopIfNSymbolsFound),void 0!==t.tileSize&&(this.tileSize=t.tileSize)}}class G extends j.a{constructor(t={}){if(super(),void 0===t.documentFound)throw new Error("documentFound must be present in constructor argument");if(this.documentFound=t.documentFound,void 0===t.quality)throw new Error("quality must be present in constructor argument");if(this.quality=null!=t.quality?t.quality:null,void 0===t.orientation)throw new Error("orientation must be present in constructor argument");this.orientation=null!=t.orientation?t.orientation:null}}class Y extends j.a{constructor(t={}){if(super(),this.status="FAILED_DETECTION",void 0===t.fields)throw new Error("fields must be present in constructor argument");this.fields=t.fields.map((t=>new Y.Field(t))),void 0!==t.status&&(this.status=t.status)}}!function(t){class e extends j.a{constructor(t={}){if(super(),this.validationStatus="NOT_VALIDATED",void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=t.type,void 0===t.value)throw new Error("value must be present in constructor argument");if(this.value=t.value,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");this.confidence=t.confidence,void 0!==t.validationStatus&&(this.validationStatus=t.validationStatus)}}t.Field=e}(Y||(Y={}));class Q extends j.a{constructor(t={}){super(),this.allowedCountries=[],this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.maxCountryDetectionAttempts=5,this.minEqualFrameCount=4,this.maxAccumulatedFrameCount=10,void 0!==t.allowedCountries&&(this.allowedCountries=t.allowedCountries.map((t=>t))),void 0!==t.minBirthYear&&(this.minBirthYear=t.minBirthYear),void 0!==t.maxBirthYear&&(this.maxBirthYear=t.maxBirthYear),void 0!==t.minExpirationYear&&(this.minExpirationYear=t.minExpirationYear),void 0!==t.maxExpirationYear&&(this.maxExpirationYear=t.maxExpirationYear),void 0!==t.maxCountryDetectionAttempts&&(this.maxCountryDetectionAttempts=t.maxCountryDetectionAttempts),void 0!==t.minEqualFrameCount&&(this.minEqualFrameCount=t.minEqualFrameCount),void 0!==t.maxAccumulatedFrameCount&&(this.maxAccumulatedFrameCount=t.maxAccumulatedFrameCount)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"DateValidationConfig":return new Z(t);case"EuropeanHealthInsuranceCardConfig":return new X(t);case"MRZFallbackConfig":return new q(t);case"GDRGroupConfig":return new K(t);default:throw`Unknown child class name: ${e}`}}}(R||(R={}));class Z extends j.a{constructor(t={}){if(super(),this._type="DateValidationConfig",this.minYear=0,this.maxYear=2999,void 0!==t.minYear&&(this.minYear=t.minYear),void 0!==t.maxYear&&(this.maxYear=t.maxYear),void 0===t.fieldTypeName)throw new Error("fieldTypeName must be present in constructor argument");this.fieldTypeName=t.fieldTypeName}}class X extends j.a{constructor(t={}){super(),this._type="EuropeanHealthInsuranceCardConfig",this.expectedCountry=null,void 0!==t.expectedCountry&&(this.expectedCountry=null!=t.expectedCountry?t.expectedCountry:null)}}class q extends j.a{constructor(t={}){super(),this._type="MRZFallbackConfig",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==t.acceptedCountries&&(this.acceptedCountries=t.acceptedCountries.map((t=>t))),void 0!==t.acceptedMRZTypes&&(this.acceptedMRZTypes=t.acceptedMRZTypes.map((t=>t)))}}class K extends j.a{constructor(t={}){if(super(),this._type="GDRGroupConfig",void 0===t.acceptedDocumentTypes)throw new Error("acceptedDocumentTypes must be present in constructor argument");this.acceptedDocumentTypes=t.acceptedDocumentTypes.map((t=>t))}}class J extends j.a{constructor(t={}){super(),this.confirmationMethod="EXACT",this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==t.confirmationMethod&&(this.confirmationMethod=t.confirmationMethod),void 0!==t.minConfirmations&&(this.minConfirmations=t.minConfirmations),void 0!==t.minConfidenceForStableField&&(this.minConfidenceForStableField=t.minConfidenceForStableField),void 0!==t.autoClearThreshold&&(this.autoClearThreshold=t.autoClearThreshold)}}class tt extends j.a{constructor(t={}){if(super(),void 0===t.status)throw new Error("status must be present in constructor argument");if(this.status=t.status,void 0===t.document)throw new Error("document must be present in constructor argument");if(this.document=null!=t.document?new T.GenericDocument(t.document):null,void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=null!=t.quad?t.quad.map((t=>({x:t.x,y:t.y}))):null}}class et extends j.a{constructor(t={}){super(),this.mode="LIVE",void 0!==t.mode&&(this.mode=t.mode)}}class nt extends j.a{constructor(t={}){if(super(),this.resultAccumulationConfig=new J({}),this.fieldExcludeList=[],void 0!==t.resultAccumulationConfig&&(this.resultAccumulationConfig=new J(t.resultAccumulationConfig)),void 0!==t.fieldExcludeList&&(this.fieldExcludeList=t.fieldExcludeList.map((t=>t))),void 0===t.configurations)throw new Error("configurations must be present in constructor argument");this.configurations=t.configurations.map((t=>R.From(t)))}}class rt extends j.a{constructor(t={}){super()}}(rt||(rt={})).all=["DeIdCardFront","DeIdCardBack","DePassport","DeDriverLicenseFront","DeDriverLicenseBack","DeResidencePermitFront","DeResidencePermitBack","EuropeanHealthInsuranceCard","DeHealthInsuranceCardFront"];class ot extends j.a{constructor(t={}){if(super(),this.recognitionConfidence=0,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.boundingRect)throw new Error("boundingRect must be present in constructor argument");this.boundingRect={x:t.boundingRect.x,y:t.boundingRect.y,width:t.boundingRect.width,height:t.boundingRect.height},void 0!==t.recognitionConfidence&&(this.recognitionConfidence=t.recognitionConfidence)}}class it extends j.a{constructor(t={}){if(super(),void 0===t.symbol)throw new Error("symbol must be present in constructor argument");if(this.symbol=t.symbol,void 0===t.boundingRect)throw new Error("boundingRect must be present in constructor argument");if(this.boundingRect={x:t.boundingRect.x,y:t.boundingRect.y,width:t.boundingRect.width,height:t.boundingRect.height},void 0===t.recognitionConfidence)throw new Error("recognitionConfidence must be present in constructor argument");this.recognitionConfidence=t.recognitionConfidence}}class at extends j.a{constructor(t={}){if(super(),this.confidence=0,this.validationSuccessful=!1,void 0===t.rawText)throw new Error("rawText must be present in constructor argument");if(this.rawText=t.rawText,void 0===t.wordBoxes)throw new Error("wordBoxes must be present in constructor argument");if(this.wordBoxes=t.wordBoxes.map((t=>new ot(t))),void 0===t.symbolBoxes)throw new Error("symbolBoxes must be present in constructor argument");this.symbolBoxes=t.symbolBoxes.map((t=>new it(t))),void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.validationSuccessful&&(this.validationSuccessful=t.validationSuccessful)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"DefaultContentValidator":return new st(t);case"PresetContentValidator":return new lt(t);case"PatternContentValidator":return new ct(t);default:throw`Unknown child class name: ${e}`}}}(D||(D={}));class st extends j.a{constructor(t={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==t.allowedCharacters&&(this.allowedCharacters=t.allowedCharacters)}}class lt extends j.a{constructor(t={}){if(super(),this._type="PresetContentValidator",void 0===t.preset)throw new Error("preset must be present in constructor argument");this.preset=t.preset}}class ct extends j.a{constructor(t={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==t.allowedCharacters&&(this.allowedCharacters=t.allowedCharacters),void 0===t.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=t.pattern,void 0!==t.matchSubstring&&(this.matchSubstring=t.matchSubstring)}}class ut extends j.a{constructor(t={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new st({}),void 0!==t.ocrResolutionLimit&&(this.ocrResolutionLimit=t.ocrResolutionLimit),void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=t.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==t.validator&&(this.validator=D.From(t.validator))}}class dt extends j.a{constructor(t={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualScanningResult=2,this.scannerStrategy="ML",void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualScanningResult&&(this.minimumNumberOfRequiredFramesWithEqualScanningResult=t.minimumNumberOfRequiredFramesWithEqualScanningResult),void 0!==t.scannerStrategy&&(this.scannerStrategy=t.scannerStrategy)}}class ht extends j.a{constructor(t={}){if(super(),this.confidence=0,this.validationSuccessful=!1,this.croppedImage=null,void 0===t.countryCode)throw new Error("countryCode must be present in constructor argument");if(this.countryCode=t.countryCode,void 0===t.licensePlate)throw new Error("licensePlate must be present in constructor argument");if(this.licensePlate=t.licensePlate,void 0===t.rawText)throw new Error("rawText must be present in constructor argument");this.rawText=t.rawText,void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.validationSuccessful&&(this.validationSuccessful=t.validationSuccessful),void 0!==t.croppedImage&&(this.croppedImage=null!=t.croppedImage?t.croppedImage:null)}}class pt extends j.a{constructor(t={}){super(),this.shouldCropDocument=!0,this.recognizePatientInfoBox=!0,this.recognizeBarcode=!0,this.extractCroppedImage=!1,this.preprocessInput=!1,void 0!==t.shouldCropDocument&&(this.shouldCropDocument=t.shouldCropDocument),void 0!==t.recognizePatientInfoBox&&(this.recognizePatientInfoBox=t.recognizePatientInfoBox),void 0!==t.recognizeBarcode&&(this.recognizeBarcode=t.recognizeBarcode),void 0!==t.extractCroppedImage&&(this.extractCroppedImage=t.extractCroppedImage),void 0!==t.preprocessInput&&(this.preprocessInput=t.preprocessInput)}}class ft extends j.a{constructor(t={}){if(super(),this.type="UNKNOWN",this.checked=!1,this.checkedConfidence=0,void 0!==t.type&&(this.type=t.type),void 0!==t.checked&&(this.checked=t.checked),void 0!==t.checkedConfidence&&(this.checkedConfidence=t.checkedConfidence),void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=t.quad.map((t=>({x:t.x,y:t.y})))}}class mt extends j.a{constructor(t={}){if(super(),this.value="",this.rawString="",this.type="UNDEFINED",this.recognitionConfidence=0,void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0!==t.value&&(this.value=t.value),void 0!==t.rawString&&(this.rawString=t.rawString),void 0!==t.type&&(this.type=t.type),void 0!==t.recognitionConfidence&&(this.recognitionConfidence=t.recognitionConfidence)}}class gt extends j.a{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.value)throw new Error("value must be present in constructor argument");if(this.value=t.value,void 0===t.recognitionConfidence)throw new Error("recognitionConfidence must be present in constructor argument");this.recognitionConfidence=t.recognitionConfidence}}class vt extends j.a{constructor(t={}){if(super(),this.hasContents=!1,void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0===t.fields)throw new Error("fields must be present in constructor argument");this.fields=t.fields.map((t=>new gt(t))),void 0!==t.hasContents&&(this.hasContents=t.hasContents)}}class bt extends j.a{constructor(t={}){if(super(),this.recognitionSuccessful=!1,this.formType="UNKNOWN",this.clockwiseRotations=0,this.croppedImage=null,this.scaleX=1,this.scaleY=1,void 0!==t.recognitionSuccessful&&(this.recognitionSuccessful=t.recognitionSuccessful),void 0===t.patientInfoBox)throw new Error("patientInfoBox must be present in constructor argument");if(this.patientInfoBox=new vt(t.patientInfoBox),void 0===t.checkBoxes)throw new Error("checkBoxes must be present in constructor argument");if(this.checkBoxes=t.checkBoxes.map((t=>new ft(t))),void 0===t.dates)throw new Error("dates must be present in constructor argument");if(this.dates=t.dates.map((t=>new mt(t))),void 0!==t.formType&&(this.formType=t.formType),void 0!==t.clockwiseRotations&&(this.clockwiseRotations=t.clockwiseRotations),void 0!==t.croppedImage&&(this.croppedImage=null!=t.croppedImage?t.croppedImage:null),void 0!==t.scaleX&&(this.scaleX=t.scaleX),void 0!==t.scaleY&&(this.scaleY=t.scaleY),void 0===t.documentRoi)throw new Error("documentRoi must be present in constructor argument");this.documentRoi=new U(t.documentRoi)}}class yt extends j.a{constructor(t={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=t.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class At extends j.a{constructor(t={}){if(super(),this.recognitionSuccessful=!1,void 0!==t.recognitionSuccessful&&(this.recognitionSuccessful=t.recognitionSuccessful),void 0===t.rawMRZ)throw new Error("rawMRZ must be present in constructor argument");if(this.rawMRZ=t.rawMRZ,void 0===t.document)throw new Error("document must be present in constructor argument");this.document=null!=t.document?new T.GenericDocument(t.document):null}}class Ct extends j.a{constructor(t={}){super(),this.accumulatedResultsVerifierConfig=new yt({}),void 0!==t.accumulatedResultsVerifierConfig&&(this.accumulatedResultsVerifierConfig=new yt(t.accumulatedResultsVerifierConfig))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"Glyph":return new St(t);case"Word":return new xt(t);case"Line":return new wt(t);case"Block":return new Ot(t);case"Page":return new Et(t);default:throw`Unknown child class name: ${e}`}}}(B||(B={}));class St extends j.a{constructor(t={}){if(super(),this._type="Glyph",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");this.roi=t.roi.map((t=>({x:t.x,y:t.y})))}}class xt extends j.a{constructor(t={}){if(super(),this._type="Word",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.glyphs)throw new Error("glyphs must be present in constructor argument");this.glyphs=t.glyphs.map((t=>new St(t)))}}class wt extends j.a{constructor(t={}){if(super(),this._type="Line",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.words)throw new Error("words must be present in constructor argument");this.words=t.words.map((t=>new xt(t)))}}class Ot extends j.a{constructor(t={}){if(super(),this._type="Block",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.lines)throw new Error("lines must be present in constructor argument");this.lines=t.lines.map((t=>new wt(t)))}}class Et extends j.a{constructor(t={}){if(super(),this._type="Page",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.blocks)throw new Error("blocks must be present in constructor argument");this.blocks=t.blocks.map((t=>new Ot(t)))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"ScanbotBinarizationFilter":return new Lt(t);case"CustomBinarizationFilter":return new jt(t);case"ColorDocumentFilter":return new kt(t);case"BrightnessFilter":return new _t(t);case"ContrastFilter":return new Tt(t);case"GrayscaleFilter":return new Pt(t);case"LegacyFilter":return new Rt(t);case"WhiteBlackPointFilter":return new Dt(t);default:throw`Unknown child class name: ${e}`}}}(F||(F={}));class Lt extends j.a{constructor(t={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==t.outputMode&&(this.outputMode=t.outputMode)}}class jt extends j.a{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 kt extends j.a{constructor(t={}){super(),this._type="ColorDocumentFilter"}}class _t extends j.a{constructor(t={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==t.brightness&&(this.brightness=t.brightness)}}class Tt extends j.a{constructor(t={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==t.contrast&&(this.contrast=t.contrast)}}class Pt extends j.a{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 Rt extends j.a{constructor(t={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==t.filterType&&(this.filterType=t.filterType)}}class Dt extends j.a{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 Bt extends j.a{constructor(t={}){super(),this.author="Created with ❤️ with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==t.author&&(this.author=t.author),void 0!==t.creator&&(this.creator=t.creator),void 0!==t.title&&(this.title=t.title),void 0!==t.subject&&(this.subject=t.subject),void 0!==t.keywords&&(this.keywords=t.keywords)}}class Ft extends j.a{constructor(t={}){super(),this.attributes=new Bt({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==t.attributes&&(this.attributes=new Bt(t.attributes)),void 0!==t.pageSize&&(this.pageSize=t.pageSize),void 0!==t.pageDirection&&(this.pageDirection=t.pageDirection),void 0!==t.pageFit&&(this.pageFit=t.pageFit),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.resamplingMethod&&(this.resamplingMethod=t.resamplingMethod)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"UserFieldDoubleValue":return new It(t);case"UserFieldStringValue":return new Mt(t);case"UserFieldIntValue":return new Wt(t);default:throw`Unknown child class name: ${e}`}}}(I||(I={}));class It extends j.a{constructor(t={}){if(super(),this._type="UserFieldDoubleValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class Mt extends j.a{constructor(t={}){if(super(),this._type="UserFieldStringValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class Wt extends j.a{constructor(t={}){if(super(),this._type="UserFieldIntValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class zt extends j.a{constructor(t={}){if(super(),void 0===t.tag)throw new Error("tag must be present in constructor argument");if(this.tag=t.tag,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.value)throw new Error("value must be present in constructor argument");this.value=I.From(t.value)}}class Nt extends j.a{constructor(t={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==t.compression&&(this.compression=t.compression),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.zipCompressionLevel&&(this.zipCompressionLevel=t.zipCompressionLevel),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.userFields&&(this.userFields=t.userFields.map((t=>new zt(t)))),void 0!==t.binarizationFilter&&(this.binarizationFilter=null!=t.binarizationFilter?F.From(t.binarizationFilter):null)}}(M=Nt||(Nt={})).defaultCompression="LZW",M.binaryDocumentOptimizedCompression="CCITTFAX4"},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a}));var r=n(86),o=n(31);function i(t,e,n=!0){if(!e||"string"!=typeof e)return null;if(t&&t.vars&&n){const n=`vars.${e}`.split(".").reduce(((t,e)=>t&&t[e]?t[e]:null),t);if(null!=n)return n}return e.split(".").reduce(((t,e)=>t&&null!=t[e]?t[e]:null),t)}function a(t,e,n,r=n){let o;return o="function"==typeof t?t(n):Array.isArray(t)?t[n]||r:i(t,n)||r,e&&(o=e(o,r,t)),o}e.a=function(t){const{prop:e,cssProperty:n=t.prop,themeKey:s,transform:l}=t,c=t=>{if(null==t[e])return null;const c=t[e],u=i(t.theme,s)||{};return Object(o.b)(t,c,(t=>{let o=a(u,l,t);return t===o&&"string"==typeof t&&(o=a(u,l,`${e}${"default"===t?"":Object(r.a)(t)}`,t)),!1===n?o:{[n]:o}}))};return c.propTypes={},c.filterProps=[e],c}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(8);class o{constructor(t,e){this.width=t,this.height=e}isPortrait(){return this.height>this.width}ratio(t){return t?this.height/this.width:this.width/this.height}ratioDiff(t,e){return this.ratio(e)/t.ratio(e)}static isEmpty(t){return!t||(0===t.width||0===t.height)}static toPolygon(t){return[new r.a(0,0),new r.a(t.width,0),new r.a(t.width,t.height),new r.a(0,t.height)]}static fromHtmlElement(t){return t?new o(t.clientWidth,t.clientHeight):new o(0,0)}static fromJson(t){return new o(t.width,t.height)}static subtractFrom(t,e){return new o(t.width-e,t.height-e)}static empty(){return new o(0,0)}}},,,function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a}));var r=n(0),o=n(6);function i(t){return{color:o.b.getColorValue(t.color),textShadow:t.useShadow?"1px 1px 2px":""}}function a(t){return t.config.visible?r.default.createElement("span",{ref:t.innerRef,style:Object.assign(Object.assign({},t.style),i(t.config))},o.b.getLocalizedBarcodeText(t.config.text)):null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return d}));var r=n(0),o=n(77);const i=n(29).c.svg`
3
3
  animation: rotate 2s linear infinite;
4
4
  width: 50px;
5
5
  height: 50px;
@@ -28,7 +28,7 @@
28
28
  stroke-dashoffset: -120;
29
29
  }
30
30
  }
31
- `;var a=t=>r.default.createElement(i,{viewBox:"0 0 50 50"},r.default.createElement("circle",{className:"path",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"3",stroke:t.color||"black"})),s=n(46),l=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class c{}class u{constructor(){this.videoReady=!1,this.sdkReady=!1}}class d extends r.default.Component{constructor(t){super(t),this.onVideoReady=()=>{this.setState({videoReady:!0},(()=>{const{onSuccess:t}=this.props;t&&t(this)}))},this.onVideoError=t=>{if(!0===this.state.videoReady){const{onError:e}=this.props.configuration;e?e(t):console.error(t)}else{const{onFailure:e}=this.props;e&&e(t),this.dispose()}},this.state=new u,this.bridge.awaitInitialized().then((()=>{this.setState({sdkReady:!0})}))}get bridge(){return o.a.instance.bridge}dispose(){const{container:t}=this.props;t&&Object(r.render)(null,t)}componentDidMount(){this.disposed=!1}componentWillUnmount(){this.disposed=!0}isSupported(){return"localhost"===location.hostname||"https:"===location.protocol}swapCameraFacing(t){this.camera.swapCameraFacing(t)}switchCamera(t,e){return l(this,void 0,void 0,(function*(){this.camera.switchCamera(t,e)}))}getActiveCameraInfo(){return this.camera.getActiveCameraInfo()}fetchAvailableCameras(){return s.a.INSTANCE.load()}renderSpinner(t){return this.state.videoReady&&this.state.sdkReady?null:r.default.createElement("div",{"data-sb-spinner":"1",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:500}},r.default.createElement(a,{color:t}))}setTorchState(t){return this.camera.setTorchState(t)}}d.DEFAULT_DETECTION_RESOLUTION=600,d.DETECTION_RESULTION_4K=3840},,,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Mt})),n.d(e,"b",(function(){return Ut})),n.d(e,"c",(function(){return Gt})),n.d(e,"d",(function(){return Yt}));var r=n(3),o=(n(109),n(0)),i=n(97),a=n.n(i),s=n(52),l=n(98),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 b(t,e,n){return void 0===n&&(n=v),t.theme!==n.theme&&t.theme||e||n.theme}var y=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"]),A=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,C=/(^-|-$)/g;function S(t){return t.replace(A,"-").replace(C,"")}var x=/(a)(d)/gi,w=function(t){return String.fromCharCode(t+(t>25?39:97))};function O(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=w(e%52)+n;return(w(e%52)+n).replace(x,"$1-$2")}var E,L=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},j=function(t){return L(5381,t)};function k(t){return O(j(t)>>>0)}function _(t){return t.displayName||t.name||"Component"}function T(t){return"string"==typeof t&&!0}var P="function"==typeof Symbol&&Symbol.for,R=P?Symbol.for("react.memo"):60115,D=P?Symbol.for("react.forward_ref"):60112,B={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},F={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},I={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},M=((E={})[D]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E[R]=I,E);function W(t){return("type"in(e=t)&&e.type.$$typeof)===R?I:"$$typeof"in t?M[t.$$typeof]:B;var e}var z=Object.defineProperty,N=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,U=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,$=Object.prototype;function G(t,e,n){if("string"!=typeof e){if($){var r=H(e);r&&r!==$&&G(t,r,n)}var o=N(e);V&&(o=o.concat(V(e)));for(var i=W(t),a=W(e),s=0;s<o.length;++s){var l=o[s];if(!(l in F||n&&n[l]||a&&l in a||i&&l in i)){var c=U(e,l);try{z(t,l,c)}catch(t){}}}}return t}function Y(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 X(t,e){if(0===t.length)return"";for(var n=t[0],r=1;r<t.length;r++)n+=e?e+t[r]:t[r];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 r=0;r<e.length;r++)t[r]=K(t[r],e[r]);else if(q(e))for(var r in e)t[r]=K(t[r],e[r]);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,r=n.length,o=r;t>=o;)if((o<<=1)<0)throw tt(16,"".concat(t));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(t+1),s=(i=0,e.length);i<s;i++)this.tag.insertRule(a,e[i])&&(this.groupSizes[t]++,a++)},t.prototype.clearGroup=function(t){if(t<this.length){var e=this.groupSizes[t],n=this.indexOfGroup(t),r=n+e;this.groupSizes[t]=0;for(var o=n;o<r;o++)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],r=this.indexOfGroup(t),o=r+n,i=r;i<o;i++)e+="".concat(this.tag.getRule(i)).concat(p);return e},t}(),nt=new Map,rt=new Map,ot=1,it=function(t){if(nt.has(t))return nt.get(t);for(;rt.has(ot);)ot++;var e=ot++;return nt.set(t,e),rt.set(e,t),e},at=function(t,e){ot=e+1,nt.set(t,e),rt.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 r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&t.registerName(e,r)},ut=function(t,e){for(var n,r=(null!==(n=e.textContent)&&void 0!==n?n:"").split(p),o=[],i=0,a=r.length;i<a;i++){var s=r[i].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,o)),o.length=0}else o.push(s)}}};function dt(){return n.nc}var ht=function(t){var e=document.head,n=t||e,r=document.createElement("style"),o=function(t){var e=Array.from(t.querySelectorAll("style[".concat(c,"]")));return e[e.length-1]}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(c,u),r.setAttribute(d,h);var a=dt();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},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,r=e.length;n<r;n++){var o=e[n];if(o.ownerNode===t)return o}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},bt=function(){function t(t,e,n){void 0===t&&(t=v),void 0===e&&(e={});var o=this;this.options=Object(r.a)(Object(r.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,r=e.length;n<r;n++){var o=e[n];o&&o.getAttribute(c)!==u&&(ut(t,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),J(this,(function(){return function(t){for(var e=t.getTag(),n=e.length,r="",o=function(n){var o=function(t){return rt.get(t)}(n);if(void 0===o)return"continue";var i=t.names.get(o),a=e.getGroup(n);if(void 0===i||0===a.length)return"continue";var s="".concat(c,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==i&&i.forEach((function(t){t.length>0&&(l+="".concat(t,","))})),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(p)},i=0;i<n;i++)o(i);return r}(o)}))}return t.registerId=function(t){return it(t)},t.prototype.reconstructWithOptions=function(e,n){return void 0===n&&(n=!0),new t(Object(r.a)(Object(r.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(it(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(it(t),n)},t.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},t.prototype.clearRules=function(t){this.getTag().clearGroup(it(t)),this.clearNames(t)},t.prototype.clearTag=function(){this.tag=void 0},t}(),yt=/&/g,At=/^\s*\/\/.*$/gm;function Ct(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=Ct(t.children,e)),t}))}function St(t){var e,n,r,o=void 0===t?v:t,i=o.options,a=void 0===i?v:i,l=o.plugins,c=void 0===l?g:l,u=function(t,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.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(yt,n).replace(r,u))})),a.prefix&&d.push(s.d),d.push(s.g);var h=function(t,o,i,l){void 0===o&&(o=""),void 0===i&&(i=""),void 0===l&&(l="&"),e=l,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=t.replace(At,""),u=s.b(i||o?"".concat(i," ").concat(o," { ").concat(c," }"):c);a.namespace&&(u=Ct(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),L(t,e.name)}),5381).toString():"",h}var xt=new bt,wt=St(),Ot=o.default.createContext({shouldForwardProp:void 0,styleSheet:xt,stylis:wt}),Et=(Ot.Consumer,o.default.createContext(void 0));function Lt(){return Object(o.useContext)(Ot)}function jt(t){var e=Object(o.useState)(t.stylisPlugins),n=e[0],r=e[1],i=Lt().styleSheet,s=Object(o.useMemo)((function(){var e=i;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,i]),l=Object(o.useMemo)((function(){return St({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:n})}),[t.enableVendorPrefixes,t.namespace,n]);Object(o.useEffect)((function(){a()(n,t.stylisPlugins)||r(t.stylisPlugins)}),[t.stylisPlugins]);var c=Object(o.useMemo)((function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:s,stylis:l}}),[t.shouldForwardProp,s,l]);return o.default.createElement(Ot.Provider,{value:c},o.default.createElement(Et.Provider,{value:l},t.children))}var kt=function(){function t(t,e){var n=this;this.inject=function(t,e){void 0===e&&(e=wt);var r=n.name+e.hash;t.hasNameForId(n.id,r)||t.insertRules(n.id,r,e(n.rules,r,"@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=wt),this.name+t.hash},t}(),_t=function(t){return t>="A"&&t<="Z"};function Tt(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(1===n&&"-"===r&&"-"===t[0])return t;_t(r)?e+="-"+r.toLowerCase():e+=r}return e.startsWith("ms-")?"-"+e:e}var Pt=function(t){return null==t||!1===t||""===t},Rt=function(t){var e,n,o=[];for(var i in t){var a=t[i];t.hasOwnProperty(i)&&!Pt(a)&&(Array.isArray(a)&&a.isCss||Y(a)?o.push("".concat(Tt(i),":"),a,";"):q(a)?o.push.apply(o,Object(r.e)(Object(r.e)(["".concat(i," {")],Rt(a),!1),["}"],!1)):o.push("".concat(Tt(i),": ").concat((e=i,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 o};function Dt(t,e,n,r){return Pt(t)?[]:Q(t)?[".".concat(t.styledComponentId)]:Y(t)?!Y(o=t)||o.prototype&&o.prototype.isReactComponent||!e?[t]:Dt(t(e),e,n,r):t instanceof kt?n?(t.inject(n,r),[t.getName(r)]):[t]:q(t)?Rt(t):Array.isArray(t)?Array.prototype.concat.apply(g,t.map((function(t){return Dt(t,e,n,r)}))):[t.toString()];var o}function Bt(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(Y(n)&&!Q(n))return!1}return!0}var Ft=j(h),It=function(){function t(t,e,n){this.rules=t,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Bt(t),this.componentId=e,this.baseHash=L(Ft,e),this.baseStyle=n,bt.registerId(e)}return t.prototype.generateAndInjectStyles=function(t,e,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,e,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&e.hasNameForId(this.componentId,this.staticRulesId))r=Z(r,this.staticRulesId);else{var o=X(Dt(this.rules,t,e,n)),i=O(L(this.baseHash,o)>>>0);if(!e.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);e.insertRules(this.componentId,i,a)}r=Z(r,i),this.staticRulesId=i}else{for(var s=L(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=X(Dt(u,t,e,n));s=L(s,d+c),l+=d}}if(l){var h=O(s>>>0);e.hasNameForId(this.componentId,h)||e.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),r=Z(r,h)}}return r},t}(),Mt=o.default.createContext(void 0);Mt.Consumer;var Wt={};new Set;function zt(t,e,n){var i=Q(t),a=t,s=!T(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":S(t);Wt[n]=(Wt[n]||0)+1;var r="".concat(n,"-").concat(k(h+n+Wt[n]));return e?"".concat(e,"-").concat(r):r}(e.displayName,e.parentComponentId):u,p=e.displayName,f=void 0===p?function(t){return T(t)?"styled.".concat(t):"Styled(".concat(_(t),")")}(t):p,m=e.displayName&&e.componentId?"".concat(S(e.displayName),"-").concat(e.componentId):e.componentId||d,A=i&&a.attrs?a.attrs.concat(c).filter(Boolean):c,C=e.shouldForwardProp;if(i&&a.shouldForwardProp){var x=a.shouldForwardProp;if(e.shouldForwardProp){var w=e.shouldForwardProp;C=function(t,e){return x(t,e)&&w(t,e)}}else C=x}var O=new It(n,m,i?a.componentStyle:void 0);function E(t,e){return function(t,e,n){var i=t.attrs,a=t.componentStyle,s=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,u=t.target,d=o.default.useContext(Mt),h=Lt(),p=t.shouldForwardProp||h.shouldForwardProp,f=b(e,d,s)||v,m=function(t,e,n){for(var o,i=Object(r.a)(Object(r.a)({},e),{className:void 0,theme:n}),a=0;a<t.length;a+=1){var s=Y(o=t[a])?o(i):o;for(var l in s)i[l]="className"===l?Z(i[l],s[l]):"style"===l?Object(r.a)(Object(r.a)({},i[l]),s[l]):s[l]}return e.className&&(i.className=Z(i.className,e.className)),i}(i,e,f),g=m.as||u,A={};for(var C in m)void 0===m[C]||"$"===C[0]||"as"===C||"theme"===C&&m.theme===f||("forwardedAs"===C?A.as=m.forwardedAs:p&&!p(C,g)||(A[C]=m[C]));var S=function(t,e){var n=Lt();return t.generateAndInjectStyles(e,n.styleSheet,n.stylis)}(a,m),x=Z(l,c);return S&&(x+=" "+S),m.className&&(x+=" "+m.className),A[T(g)&&!y.has(g)?"class":"className"]=x,A.ref=n,Object(o.createElement)(g,A)}(L,t,e)}E.displayName=f;var L=o.default.forwardRef(E);return L.attrs=A,L.componentStyle=O,L.displayName=f,L.shouldForwardProp=C,L.foldedComponentIds=i?Z(a.foldedComponentIds,a.styledComponentId):"",L.styledComponentId=m,L.target=i?a.target:t,Object.defineProperty(L,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=i?function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++)K(t,o[r],!0);return t}({},a.defaultProps,t):t}}),J(L,(function(){return".".concat(L.styledComponentId)})),s&&G(L,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),L}function Nt(t,e){for(var n=[t[0]],r=0,o=e.length;r<o;r+=1)n.push(e[r],t[r+1]);return n}var Vt=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(Y(t)||q(t))return Vt(Dt(Nt(g,Object(r.e)([t],e,!0))));var o=t;return 0===e.length&&1===o.length&&"string"==typeof o[0]?Dt(o):Vt(Dt(Nt(o,e)))}function Ht(t,e,n){if(void 0===n&&(n=v),!e)throw tt(1,e);var o=function(o){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return t(e,n,Ut.apply(void 0,Object(r.e)([o],i,!1)))};return o.attrs=function(o){return Ht(t,e,Object(r.a)(Object(r.a)({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ht(t,e,Object(r.a)(Object(r.a)({},n),o))},o}var $t=function(t){return Ht(zt,t)},Gt=$t;y.forEach((function(t){Gt[t]=$t(t)}));!function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=Bt(t),bt.registerId(this.componentId+1)}t.prototype.createStyles=function(t,e,n,r){var o=r(X(Dt(this.rules,e,n,r)),""),i=this.componentId+t;n.insertRules(i,i,o)},t.prototype.removeStyles=function(t,e){e.clearRules(this.componentId+t)},t.prototype.renderStyles=function(t,e,n,r){t>2&&bt.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,e,n,r)}}();function Yt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=X(Ut.apply(void 0,Object(r.e)([t],e,!1))),i=k(o);return new kt(i,o)}(function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=dt(),r=X([n&&'nonce="'.concat(n,'"'),"".concat(c,'="true"'),"".concat(d,'="').concat(h,'"')].filter(Boolean)," ");return"<style ".concat(r,">").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),i=dt();return i&&(n.nonce=i),[o.default.createElement("style",Object(r.a)({},n,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new bt({isServer:!0}),this.sealed=!1}t.prototype.collectStyles=function(t){if(this.sealed)throw tt(2);return o.default.createElement(jt,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(t){throw tt(3)}})(),"__sc-".concat(c,"__")}).call(this,n(92))},function(t,e,n){"use strict";n.r(e),n.d(e,"SingleScanningMode",(function(){return c})),n.d(e,"Resolution",(function(){return u})),n.d(e,"CameraConfiguration",(function(){return d})),n.d(e,"TopBarConfiguration",(function(){return p.a})),n.d(e,"ActionBarConfiguration",(function(){return f})),n.d(e,"BarcodeUseCase",(function(){return h})),n.d(e,"Palette",(function(){return o.f})),n.d(e,"StyledText",(function(){return o.j})),n.d(e,"IconStyle",(function(){return o.e})),n.d(e,"PolygonStyle",(function(){return o.g})),n.d(e,"BackgroundStyle",(function(){return o.a})),n.d(e,"ForegroundStyle",(function(){return o.d})),n.d(e,"RoundButton",(function(){return o.h})),n.d(e,"BadgedButton",(function(){return o.b})),n.d(e,"ButtonConfiguration",(function(){return o.c})),n.d(e,"Sound",(function(){return o.i})),n.d(e,"Vibration",(function(){return o.l})),n.d(e,"Timeouts",(function(){return o.k})),n.d(e,"ViewFinderConfiguration",(function(){return O})),n.d(e,"FinderStyle",(function(){return x})),n.d(e,"FinderCorneredStyle",(function(){return E})),n.d(e,"FinderStrokedStyle",(function(){return L})),n.d(e,"UserGuidanceConfiguration",(function(){return j})),n.d(e,"BarcodeItemErrorState",(function(){return a})),n.d(e,"BarcodeMappedData",(function(){return s})),n.d(e,"BarcodeInfoMapping",(function(){return l})),n.d(e,"ExpectedBarcode",(function(){return C})),n.d(e,"FindAndPickScanningMode",(function(){return S})),n.d(e,"BarcodeTextLocalization",(function(){return k})),n.d(e,"BarcodeRecognizerConfiguration",(function(){return _})),n.d(e,"ArOverlayPolygonConfiguration",(function(){return r.c})),n.d(e,"BarcodeItemConfiguration",(function(){return r.e})),n.d(e,"BadgeStyle",(function(){return r.d})),n.d(e,"ArOverlayGeneralConfiguration",(function(){return r.b})),n.d(e,"FindAndPickArOverlayPolygonConfiguration",(function(){return r.f})),n.d(e,"FindAndPickBadgeConfiguration",(function(){return r.g})),n.d(e,"ArOverlayFindAndPickConfiguration",(function(){return r.a})),n.d(e,"BarcodeScannerConfiguration",(function(){return P})),n.d(e,"BarcodeScannerUIItem",(function(){return D})),n.d(e,"BarcodeScannerUIResult",(function(){return B})),n.d(e,"OcrResult",(function(){return F.OcrResult})),n.d(e,"FieldParsedData",(function(){return F.FieldParsedData})),n.d(e,"FieldType",(function(){return F.FieldType})),n.d(e,"Field",(function(){return F.Field})),n.d(e,"GenericDocumentType",(function(){return F.GenericDocumentType})),n.d(e,"GenericDocument",(function(){return F.GenericDocument})),n.d(e,"Sheet",(function(){return m})),n.d(e,"SwipeToDelete",(function(){return g})),n.d(e,"ManualCountEditDialog",(function(){return v})),n.d(e,"SheetContent",(function(){return b})),n.d(e,"MultipleScanningMode",(function(){return y})),n.d(e,"ScanbotAlertDialog",(function(){return A})),n.d(e,"CameraPermissionScreen",(function(){return T})),n.d(e,"BarcodeItem",(function(){return R.BarcodeItem})),n.d(e,"BarcodeDocumentFormats",(function(){return R.BarcodeDocumentFormats}));var r=n(18),o=n(1),i=n(13);class a extends i.a{constructor(t={}){super(),this.title=new o.j({text:"Connection Error!",color:"?sbColorOnSurface"}),this.subtitle=new o.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 o.c({}),this.cancelButton=new o.c({}),void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.subtitle&&(this.subtitle=new o.j(t.subtitle)),void 0!==t.retryButton&&(this.retryButton=new o.c(t.retryButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton))}}class s extends i.a{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 l extends i.a{constructor(t={}){super(),this.barcodeItemMapper=null,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.loadingMessage=new o.j({text:"Loading message for barcode info mapping.",color:"?sbColorPrimary"}),this.errorState=new a({}),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 o.j(t.loadingMessage)),void 0!==t.errorState&&(this.errorState=new a(t.errorState))}}class c extends i.a{constructor(t={}){super(),this._type="SingleScanningMode",this.confirmationSheetEnabled=!1,this.barcodeImageVisible=!0,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.barcodeTitle=new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.barcodeSubtitle=new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.submitButton=new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary"})}),this.cancelButton=new o.c({visible:!0,text:"?singleModeConfirmationCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary"})}),this.barcodeInfoMapping=new l({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new o.j({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new a({title:new o.j({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary"})}),cancelButton:new o.c({text:"?barcodeInfoMappingErrorStateCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary"})})})}),this.arOverlay=new r.b({visible:!1,counterBadge:new r.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new r.c({visible:!0,deselected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new r.e({imageVisible:!0,titleSelected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),backgroundSelected:new o.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new o.g({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 o.j(t.barcodeTitle)),void 0!==t.barcodeSubtitle&&(this.barcodeSubtitle=new o.j(t.barcodeSubtitle)),void 0!==t.submitButton&&(this.submitButton=new o.c(t.submitButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new l(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new r.b(t.arOverlay))}}class u extends i.a{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 d extends i.a{constructor(t={}){super(),this.cameraModule="BACK",this.zoomSteps=[1,2,5],this.defaultZoomFactor=1,this.flashEnabled=!1,this.idealPreviewResolution=new u({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 u(t.idealPreviewResolution))}}var h,p=n(54);class f extends i.a{constructor(t={}){super(),this.flashButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),this.zoomButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),this.flipCameraButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),void 0!==t.flashButton&&(this.flashButton=new o.h(t.flashButton)),void 0!==t.zoomButton&&(this.zoomButton=new o.h(t.zoomButton)),void 0!==t.flipCameraButton&&(this.flipCameraButton=new o.h(t.flipCameraButton))}}class m extends i.a{constructor(t={}){super(),this.mode="COLLAPSED_SHEET",this.collapsedVisibleHeight="SMALL",this.listButton=new o.b({}),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.collapsedVisibleHeight&&(this.collapsedVisibleHeight=t.collapsedVisibleHeight),void 0!==t.listButton&&(this.listButton=new o.b(t.listButton))}}class g extends i.a{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 v extends i.a{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.title=new o.j({text:"Update count",color:"?sbColorOnSurface"}),this.info=new o.j({text:"Adjust the number of items you scanned.",color:"?sbColorOnSurfaceVariant"}),this.updateButton=new o.c({visible:!0,text:"Update",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),this.cancelButton=new o.c({visible:!0,text:"Cancel",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),this.clearTextButton=new o.e({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 o.j(t.title)),void 0!==t.info&&(this.info=new o.j(t.info)),void 0!==t.updateButton&&(this.updateButton=new o.c(t.updateButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton)),void 0!==t.clearTextButton&&(this.clearTextButton=new o.e(t.clearTextButton))}}class b extends i.a{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.manualCountChangeEnabled=!0,this.manualCountOutlineColor="?sbColorOutline",this.manualCountChangeColor="?sbColorPrimary",this.title=new o.j({text:"%d items",color:"?sbColorOnSurface"}),this.clearAllButton=new o.c({visible:!0,text:"Clear all",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.barcodeItemTitle=new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),this.barcodeItemSubtitle=new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.barcodeItemImageVisible=!0,this.submitButton=new o.c({visible:!0,text:"Submit",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.startScanningButton=new o.c({visible:!0,text:"Start scanning",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),this.placeholderTitle=new o.j({text:"No barcodes here!",color:"?sbColorOnSurface"}),this.placeholderSubtitle=new o.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 o.e({visible:!0,color:"?sbColorOnSurface"}),this.swipeToDelete=new g({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 o.j(t.title)),void 0!==t.clearAllButton&&(this.clearAllButton=new o.c(t.clearAllButton)),void 0!==t.barcodeItemTitle&&(this.barcodeItemTitle=new o.j(t.barcodeItemTitle)),void 0!==t.barcodeItemSubtitle&&(this.barcodeItemSubtitle=new o.j(t.barcodeItemSubtitle)),void 0!==t.barcodeItemImageVisible&&(this.barcodeItemImageVisible=t.barcodeItemImageVisible),void 0!==t.submitButton&&(this.submitButton=new o.c(t.submitButton)),void 0!==t.startScanningButton&&(this.startScanningButton=new o.c(t.startScanningButton)),void 0!==t.placeholderTitle&&(this.placeholderTitle=new o.j(t.placeholderTitle)),void 0!==t.placeholderSubtitle&&(this.placeholderSubtitle=new o.j(t.placeholderSubtitle)),void 0!==t.placeholderIconBackground&&(this.placeholderIconBackground=t.placeholderIconBackground),void 0!==t.placeholderIcon&&(this.placeholderIcon=new o.e(t.placeholderIcon)),void 0!==t.swipeToDelete&&(this.swipeToDelete=new g(t.swipeToDelete))}}class y extends i.a{constructor(t={}){super(),this._type="MultipleScanningMode",this.countingRepeatDelay=1e3,this.mode="COUNTING",this.sheet=new m({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new o.b({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new b({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new o.j({text:"?multipleModeSheetTitle",color:"?sbColorOnSurface"}),clearAllButton:new o.c({visible:!0,text:"?sheetClearAllButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),barcodeItemSubtitle:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),barcodeItemImageVisible:!0,submitButton:new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new o.c({visible:!0,text:"?sheetStartScanningButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new o.j({visible:!0,text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface",useShadow:!1}),placeholderSubtitle:new o.j({visible:!0,text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant",useShadow:!1}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new o.e({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new g({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new v({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new o.j({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new o.j({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new o.c({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?manualCountEditDialogCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new o.e({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.barcodeInfoMapping=new l({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new o.j({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new a({title:new o.j({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})})}),this.arOverlay=new r.b({visible:!1,counterBadge:new r.d({visible:!0,background:new o.a({strokeColor:"#FF000000",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new r.c({visible:!0,deselected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new r.e({imageVisible:!0,titleSelected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),titleDeselected:new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),subtitleDeselected:new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new o.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new o.g({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 m(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new b(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new v(t.manualCountEditDialog)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new l(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new r.b(t.arOverlay))}}class A extends i.a{constructor(t={}){if(super(),this.title=new o.j({text:"Title",color:"?sbColorOnSurface"}),this.subtitle=new o.j({text:"Standard explanation message text.",color:"?sbColorOnSurfaceVariant"}),this.sheetColor="?sbColorSurface",this.modalOverlayColor="?sbColorModalOverlay",this.dividerColor="?sbColorOutline",void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.subtitle&&(this.subtitle=new o.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 o.c(t.okButton),void 0===t.cancelButton)throw new Error("cancelButton must be present in constructor argument");this.cancelButton=new o.c(t.cancelButton)}}class C extends i.a{constructor(t={}){if(super(),this.count=1,void 0===t.barcodeValue)throw new Error("barcodeValue must be present in constructor argument");this.barcodeValue=t.barcodeValue,void 0!==t.title&&(this.title=null!=t.title?t.title:null),void 0!==t.image&&(this.image=null!=t.image?t.image:null),void 0!==t.count&&(this.count=t.count)}}class S extends i.a{constructor(t={}){super(),this._type="FindAndPickScanningMode",this.scanningCompletedColor="?sbColorPositive",this.scanningPartiallyColor="?sbColorWarning",this.scanningNotScannedColor="?sbColorOutline",this.allowPartialScan=!1,this.expectedBarcodes=[],this.countingRepeatDelay=1e3,this.sheet=new m({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new o.b({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new b({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new o.j({visible:!0,text:"?findAndPickSheetTitle",color:"?sbColorOnSurface",useShadow:!1}),clearAllButton:new o.c({visible:!0,text:"?sheetResetButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),barcodeItemSubtitle:new o.j({text:"?findAndPickSheetBarcodeItemSubtitle",color:"?sbColorOnSurfaceVariant"}),barcodeItemImageVisible:!0,submitButton:new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new o.c({visible:!0,text:"?sheetStartScanningButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new o.j({text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface"}),placeholderSubtitle:new o.j({text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant"}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new o.e({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new g({enabled:!1,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new v({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new o.j({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new o.j({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new o.c({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?manualCountEditDialogCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new o.e({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.arOverlay=new r.a({visible:!1,automaticSelectionEnabled:!0,polygon:new r.f({partiallyScanned:new o.g({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),rejected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),completed:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),badge:new r.g({partiallyScanned:new r.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),rejected:new r.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorSurface",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),completed:new r.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"})})}),this.partialScannedAlertDialogEnabled=!0,this.partialScannedAlertDialog=new A({title:new o.j({text:"?findAndPickPartialAlertTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?findAndPickPartialAlertSubtitle",color:"?sbColorOnSurfaceVariant"}),sheetColor:"?sbColorSurface",modalOverlayColor:"?sbColorModalOverlay",dividerColor:"?sbColorOutline",okButton:new o.c({visible:!0,text:"?findAndPickPartialAlertSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?findAndPickPartialAlertCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})}),this.confirmationAlertDialogEnabled=!1,this.confirmationAlertDialog=new A({title:new o.j({text:"?findAndPickCompleteAlertTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?findAndPickCompleteAlertSubtitle",color:"?sbColorOnSurfaceVariant"}),sheetColor:"?sbColorSurface",modalOverlayColor:"?sbColorModalOverlay",dividerColor:"?sbColorOutline",okButton:new o.c({visible:!0,text:"?findAndPickCompleteAlertSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?findAndPickCompleteAlertCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})}),void 0!==t.scanningCompletedColor&&(this.scanningCompletedColor=t.scanningCompletedColor),void 0!==t.scanningPartiallyColor&&(this.scanningPartiallyColor=t.scanningPartiallyColor),void 0!==t.scanningNotScannedColor&&(this.scanningNotScannedColor=t.scanningNotScannedColor),void 0!==t.allowPartialScan&&(this.allowPartialScan=t.allowPartialScan),void 0!==t.expectedBarcodes&&(this.expectedBarcodes=t.expectedBarcodes.map((t=>new C(t)))),void 0!==t.countingRepeatDelay&&(this.countingRepeatDelay=t.countingRepeatDelay),void 0!==t.sheet&&(this.sheet=new m(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new b(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new v(t.manualCountEditDialog)),void 0!==t.arOverlay&&(this.arOverlay=new r.a(t.arOverlay)),void 0!==t.partialScannedAlertDialogEnabled&&(this.partialScannedAlertDialogEnabled=t.partialScannedAlertDialogEnabled),void 0!==t.partialScannedAlertDialog&&(this.partialScannedAlertDialog=new A(t.partialScannedAlertDialog)),void 0!==t.confirmationAlertDialogEnabled&&(this.confirmationAlertDialogEnabled=t.confirmationAlertDialogEnabled),void 0!==t.confirmationAlertDialog&&(this.confirmationAlertDialog=new A(t.confirmationAlertDialog))}}(h||(h={})).From=function(t){const e=t._type;switch(e){case"SingleScanningMode":return new c(t);case"MultipleScanningMode":return new y(t);case"FindAndPickScanningMode":return new S(t);default:throw`Unknown child class name: ${e}`}};var x,w=n(39);class O extends i.a{constructor(t={}){super(),this.visible=!0,this.style=new E({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),this.overlayColor="?sbColorSurfaceLow",this.aspectRatio=new w.AspectRatio({width:1,height:1}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.style&&(this.style=x.From(t.style)),void 0!==t.overlayColor&&(this.overlayColor=t.overlayColor),void 0!==t.aspectRatio&&(this.aspectRatio=new w.AspectRatio(t.aspectRatio))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"FinderCorneredStyle":return new E(t);case"FinderStrokedStyle":return new L(t);default:throw`Unknown child class name: ${e}`}}}(x||(x={}));class E extends i.a{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 L extends i.a{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 j extends i.a{constructor(t={}){super(),this.visible=!0,this.title=new o.j({color:"?sbColorOnPrimary"}),this.background=new o.a({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow"}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.background&&(this.background=new o.a(t.background))}}class k extends i.a{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.sheetResetButton="Reset",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",this.findAndPickSheetTitle="%d/%d scanned",this.findAndPickSheetBarcodeItemSubtitle="%d/%d added",this.findAndPickPartialAlertTitle="Incomplete scan!",this.findAndPickPartialAlertSubtitle="Some codes are yet to be scanned. Proceed with submission anyway?",this.findAndPickPartialAlertCancelButton="Cancel",this.findAndPickPartialAlertSubmitButton="Yes, Submit",this.findAndPickCompleteAlertTitle="All codes found!",this.findAndPickCompleteAlertSubtitle="You have successfully scanned all codes. Proceed with submission?",this.findAndPickCompleteAlertCancelButton="Dismiss",this.findAndPickCompleteAlertSubmitButton="Submit",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.sheetResetButton&&(this.sheetResetButton=t.sheetResetButton),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),void 0!==t.findAndPickSheetTitle&&(this.findAndPickSheetTitle=t.findAndPickSheetTitle),void 0!==t.findAndPickSheetBarcodeItemSubtitle&&(this.findAndPickSheetBarcodeItemSubtitle=t.findAndPickSheetBarcodeItemSubtitle),void 0!==t.findAndPickPartialAlertTitle&&(this.findAndPickPartialAlertTitle=t.findAndPickPartialAlertTitle),void 0!==t.findAndPickPartialAlertSubtitle&&(this.findAndPickPartialAlertSubtitle=t.findAndPickPartialAlertSubtitle),void 0!==t.findAndPickPartialAlertCancelButton&&(this.findAndPickPartialAlertCancelButton=t.findAndPickPartialAlertCancelButton),void 0!==t.findAndPickPartialAlertSubmitButton&&(this.findAndPickPartialAlertSubmitButton=t.findAndPickPartialAlertSubmitButton),void 0!==t.findAndPickCompleteAlertTitle&&(this.findAndPickCompleteAlertTitle=t.findAndPickCompleteAlertTitle),void 0!==t.findAndPickCompleteAlertSubtitle&&(this.findAndPickCompleteAlertSubtitle=t.findAndPickCompleteAlertSubtitle),void 0!==t.findAndPickCompleteAlertCancelButton&&(this.findAndPickCompleteAlertCancelButton=t.findAndPickCompleteAlertCancelButton),void 0!==t.findAndPickCompleteAlertSubmitButton&&(this.findAndPickCompleteAlertSubmitButton=t.findAndPickCompleteAlertSubmitButton)}}class _ extends i.a{constructor(t={}){super(),this.barcodesRegexFilter="",this.barcodeFormats=[],this.gs1Handling="PARSE",this.engineMode="NEXT_GEN_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 T extends i.a{constructor(t={}){super(),this.background="?sbColorSurface",this.iconBackground="?sbColorOutline",this.icon=new o.e({visible:!0,color:"?sbColorOnSurface"}),this.closeButton=new o.c({text:"Close",background:new o.a({}),foreground:new o.d({})}),this.enableCameraTitle=new o.j({text:"Camera permission denied!",color:"?colorOnSurface"}),this.enableCameraExplanation=new o.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 o.e(t.icon)),void 0!==t.closeButton&&(this.closeButton=new o.c(t.closeButton)),void 0!==t.enableCameraTitle&&(this.enableCameraTitle=new o.j(t.enableCameraTitle)),void 0!==t.enableCameraExplanation&&(this.enableCameraExplanation=new o.j(t.enableCameraExplanation))}}class P extends i.a{constructor(t={}){super(),this.version="1.0",this.screen="BarcodeScanner",this.palette=new o.f({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 k({}),this.backgroundColor="?sbColorSurfaceLow",this.topBar=new p.a({title:new o.j({text:"?topBarTitle",color:"?sbColorOnPrimary"}),mode:"SOLID",backgroundColor:"?sbColorPrimary",cancelButton:new o.c({visible:!0,text:"?topBarCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})})}),this.actionBar=new f({flashButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),zoomButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),flipCameraButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.viewFinder=new O({visible:!0,style:new E({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),overlayColor:"?sbColorSurfaceLow",aspectRatio:new w.AspectRatio({width:1,height:1})}),this.userGuidance=new j({visible:!0,title:new o.j({text:"?userGuidance",color:"?sbColorOnPrimary"}),background:new o.a({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow",strokeWidth:0})}),this.cameraPermission=new T({background:"?sbColorSurface",iconBackground:"?sbColorOutline",icon:new o.e({visible:!0,color:"?sbColorOnSurface"}),closeButton:new o.c({visible:!0,text:"?cameraPermissionCloseButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),enableCameraTitle:new o.j({text:"?cameraPermissionEnableCameraTitle",color:"?sbColorOnSurface"}),enableCameraExplanation:new o.j({text:"?cameraPermissionEnableCameraExplanation",color:"?sbColorOnSurfaceVariant"})}),this.cameraConfiguration=new d({}),this.recognizerConfiguration=new _({}),this.useCase=new c({}),this.sound=new o.i({successBeepEnabled:!0,soundType:"MODERN_BEEP"}),this.vibration=new o.l({enabled:!0}),this.timeouts=new o.k({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 o.f(t.palette)),void 0!==t.localization&&(this.localization=new k(t.localization)),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.topBar&&(this.topBar=new p.a(t.topBar)),void 0!==t.actionBar&&(this.actionBar=new f(t.actionBar)),void 0!==t.viewFinder&&(this.viewFinder=new O(t.viewFinder)),void 0!==t.userGuidance&&(this.userGuidance=new j(t.userGuidance)),void 0!==t.cameraPermission&&(this.cameraPermission=new T(t.cameraPermission)),void 0!==t.cameraConfiguration&&(this.cameraConfiguration=new d(t.cameraConfiguration)),void 0!==t.recognizerConfiguration&&(this.recognizerConfiguration=new _(t.recognizerConfiguration)),void 0!==t.useCase&&(this.useCase=h.From(t.useCase)),void 0!==t.sound&&(this.sound=new o.i(t.sound)),void 0!==t.vibration&&(this.vibration=new o.l(t.vibration)),void 0!==t.timeouts&&(this.timeouts=new o.k(t.timeouts))}}var R=n(64);class D extends i.a{constructor(t={}){if(super(),void 0===t.barcode)throw new Error("barcode must be present in constructor argument");if(this.barcode=new R.BarcodeItem(t.barcode),void 0===t.count)throw new Error("count must be present in constructor argument");this.count=t.count}}class B extends i.a{constructor(t={}){super(),this.items=[],void 0!==t.items&&(this.items=t.items.map((t=>new D(t))))}}var F=n(38)},function(t,e,n){"use strict";n.d(e,"e",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return l}));n(2),n(110),n(45);const r={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${r[t]}px)`};function i(t,e,n){const i=t.theme||{};if(Array.isArray(e)){const t=i.breakpoints||o;return e.reduce(((r,o,i)=>(r[t.up(t.keys[i])]=n(e[i]),r)),{})}if("object"==typeof e){const t=i.breakpoints||o;return Object.keys(e).reduce(((o,i)=>{if(-1!==Object.keys(t.values||r).indexOf(i)){o[t.up(i)]=n(e[i],i)}else{const t=i;o[t]=e[t]}return o}),{})}return n(e)}function a(t={}){var e;return(null==(e=t.keys)?void 0:e.reduce(((e,n)=>(e[t.up(n)]={},e)),{}))||{}}function s(t,e){return t.reduce(((t,e)=>{const n=t[e];return(!n||0===Object.keys(n).length)&&delete t[e],t}),e)}function l({values:t,breakpoints:e,base:n}){const r=n||function(t,e){if("object"!=typeof t)return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach(((e,r)=>{r<t.length&&(n[e]=!0)})):r.forEach((e=>{null!=t[e]&&(n[e]=!0)})),n}(t,e),o=Object.keys(r);if(0===o.length)return t;let i;return o.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[i],i=r):"object"==typeof t?(e[n]=null!=t[n]?t[n]:t[i],i=n):e[n]=t,e)),{})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(71);class o extends r.a{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)}}o.DEFAULT_VIDEO_RESOLUTION_4K={width:3840,height:2160},o.DEFAULT_VIDEO_RESOLUTION_HD={width:1920,height:1080},o.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE=0,o.DEFAULT_ACCEPTED_ANGLE_SCORE=75,o.DEFAULT_ACCEPTED_SIZE_SCORE=75},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class o extends Error{constructor(t,e,n){super(e),this.name="",this.name=t,this.message=e,this.webApiError=n}static mediaDevicesUndefined(){return new o(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 o(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 o(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 o(this.MESSAGE.PERMISSION_DENIED,"Camera permission has not been granted. Please prompt your users again to grant permission.",t)}static unknown(t){return new o(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 r(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}static createFromDOMException(t){return t instanceof DOMException?"NotAllowedError"===t.name?o.permissionDenied("Specifically, the native 'NotAllowedError' was thrown."):"NotFoundError"===t.name?o.mediaDeviceNotFound("Specifically, the native 'NotFoundError' was thrown."):void 0:o.unknown(null==t?void 0:t.message)}}o.PERMISSION_STATE={GRANTED:"granted",DENIED:"denied",PROMPT:"prompt",UNKNOWN:"unknown"},o.MESSAGE={DEVICES_UNDEFINED:"MediaError_DevicesUndefined",DEVICE_NOT_FOUND:"MediaError_DeviceNotFound",ENUMERATE_FAILED:"MediaError_EnumerateFailed",PERMISSION_DENIED:"MediaError_PermissionDenied",UNKNOWN:"MediaError_Unknown"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{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)}}},,function(t,e,n){"use strict";var r=n(128);e.a=r.a},,function(t,e,n){"use strict";n.r(e),n.d(e,"OcrResult",(function(){return o})),n.d(e,"FieldParsedData",(function(){return i})),n.d(e,"FieldType",(function(){return a})),n.d(e,"Field",(function(){return s})),n.d(e,"GenericDocumentType",(function(){return l})),n.d(e,"GenericDocument",(function(){return c}));var r=n(5);class o extends r.a{constructor(t={}){if(super(),void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");this.confidence=t.confidence}}class i extends r.a{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.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class a extends r.a{constructor(t={}){if(super(),void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.fullName)throw new Error("fullName must be present in constructor argument");if(this.fullName=t.fullName,void 0===t.normalizedName)throw new Error("normalizedName must be present in constructor argument");if(this.normalizedName=t.normalizedName,void 0===t.commonType)throw new Error("commonType must be present in constructor argument");this.commonType=null!=t.commonType?t.commonType:null}}class s extends r.a{constructor(t={}){if(super(),this.confidenceWeight=1,this.image=null,this.validationStatus="NONE",this.parsedData=[],void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=new a(t.type),void 0===t.value)throw new Error("value must be present in constructor argument");if(this.value=null!=t.value?new o(t.value):null,void 0!==t.confidenceWeight&&(this.confidenceWeight=t.confidenceWeight),void 0!==t.image&&(this.image=null!=t.image?t.image:null),void 0===t.polygonInRoot)throw new Error("polygonInRoot must be present in constructor argument");this.polygonInRoot=t.polygonInRoot.map((t=>({x:t.x,y:t.y}))),void 0!==t.validationStatus&&(this.validationStatus=t.validationStatus),void 0!==t.parsedData&&(this.parsedData=t.parsedData.map((t=>new i(t))))}}class l extends r.a{constructor(t={}){if(super(),void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.fullName)throw new Error("fullName must be present in constructor argument");if(this.fullName=t.fullName,void 0===t.normalizedName)throw new Error("normalizedName must be present in constructor argument");this.normalizedName=t.normalizedName}}class c extends r.a{constructor(t={}){if(super(),this.crop=null,this.confidence=0,this.confidenceWeight=0,void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=new l(t.type),void 0===t.fields)throw new Error("fields must be present in constructor argument");if(this.fields=t.fields.map((t=>new s(t))),void 0===t.children)throw new Error("children must be present in constructor argument");if(this.children=t.children.map((t=>new c(t))),void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=null!=t.quad?t.quad.map((t=>({x:t.x,y:t.y}))):null,void 0===t.quadInRoot)throw new Error("quadInRoot must be present in constructor argument");this.quadInRoot=null!=t.quadInRoot?t.quadInRoot.map((t=>({x:t.x,y:t.y}))):null,void 0!==t.crop&&(this.crop=null!=t.crop?t.crop:null),void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.confidenceWeight&&(this.confidenceWeight=t.confidenceWeight)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"LineSegmentInt",(function(){return o})),n.d(e,"LineSegmentFloat",(function(){return i})),n.d(e,"AspectRatio",(function(){return a}));var r=n(5);class o extends r.a{constructor(t={}){if(super(),void 0===t.start)throw new Error("start must be present in constructor argument");if(this.start={x:t.start.x,y:t.start.y},void 0===t.end)throw new Error("end must be present in constructor argument");this.end={x:t.end.x,y:t.end.y}}}class i extends r.a{constructor(t={}){if(super(),void 0===t.start)throw new Error("start must be present in constructor argument");if(this.start={x:t.start.x,y:t.start.y},void 0===t.end)throw new Error("end must be present in constructor argument");this.end={x:t.end.x,y:t.end.y}}}class a extends r.a{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)}}},function(t,e,n){"use strict";e.a="$$material"},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}scaleDown(t){return new r(this.x/t,this.y/t,this.width/t,this.height/t)}bottom(){return this.y+this.height}static withSize(t,e){return new r(0,0,t,e)}static empty(){return new r(0,0,0,0)}static fromRect(t){return t?new r(t.x,t.y,t.width,t.height):r.empty()}static fromPoint(t,e){return new r(t.x-e/2,t.y-e/2,e,e)}static fromDOMRect(t){return new r(t.x,t.y,t.width,t.height)}}},function(t,e,n){"use strict";var r=n(130);e.a=r.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(32),o=n(30);class i extends r.a{constructor(t){super(t);const e=new o.BarcodeScannerConfiguration;this.finder=e.viewFinder,this.userGuidance=e.userGuidance}static mapFinderConfiguration(t,e){var n,o;r.a.mapValuesDeep(null!==(n=e.finder)&&void 0!==n?n:{},t.finder),r.a.mapValuesDeep(null!==(o=e.userGuidance)&&void 0!==o?o:{},t.userGuidance)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(0),o=n(33),i=n(46),a=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class s extends r.default.Component{constructor(t){super(t),this.orientationchangeCallback=this.orientationChanged.bind(this),this.state={orientation:window.orientation,stream:void 0}}orientationChanged(t){this.setState({orientation:window.orientation})}setDeviceIdInConstraints(t){var e,n;return a(this,void 0,void 0,(function*(){const r=this.props.preferredCamera;if(r)try{const e=(yield navigator.mediaDevices.enumerateDevices()).find((t=>t.deviceId===r||t.label===r));if(e)return Object.assign(Object.assign({},t),{deviceId:e.deviceId})}catch(t){throw o.a.enumerateDevicesFailed()}else{const r={user:"front",environment:"back"},o=(null===(e=null==t?void 0:t.facingMode)||void 0===e?void 0:e.ideal)||(null===(n=null==t?void 0:t.facingMode)||void 0===n?void 0:n.exact)||(null==t?void 0:t.facingMode);if("string"==typeof o&&o in r){yield i.a.INSTANCE.load();const e=i.a.INSTANCE.getMainCamera(r[o]);if(e)return Object.assign(Object.assign({},t),{deviceId:e.deviceId})}}return t}))}componentDidMount(){return a(this,void 0,void 0,(function*(){window.addEventListener("orientationchange",this.orientationchangeCallback),yield this.refreshStream()}))}refreshStream(){var t,e,n,r,i,s,l,c;return a(this,void 0,void 0,(function*(){if(console.log("refreshStream",this),o.a.hasCheckedPermission()||(yield o.a.tryCheckPermission()),o.a.hasDeniedPermission())return void(null===(e=(t=this.props).onError)||void 0===e||e.call(t,o.a.permissionDenied()));const a={video:yield this.setDeviceIdInConstraints(this.props.videoConstraints)};try{if(!navigator.mediaDevices){const t=o.a.unknown();return null===(r=(n=this.props).onError)||void 0===r||r.call(n,t),void console.log(t)}this.stopCurrentStreams();try{const t=yield navigator.mediaDevices.getUserMedia(a);this.setState({stream:t},(()=>{var e,n,r,o;null===(n=(e=this.props).onStreamChanged)||void 0===n||n.call(e,t),null===(o=(r=this.props).onReady)||void 0===o||o.call(r)}))}catch(t){const e=o.a.mediaDeviceNotFound();return null===(s=(i=this.props).onError)||void 0===s||s.call(i,e),void console.error(e)}}catch(t){const e=o.a.createFromDOMException(t);return null===(c=(l=this.props).onError)||void 0===c||c.call(l,e),void console.error(e)}}))}stopCurrentStreams(){const t=this.state.stream,e=null==t?void 0:t.getTracks();e&&e.forEach((t=>{t.stop()}))}componentWillUnmount(){window.removeEventListener("orientationchange",this.orientationchangeCallback),this.state.stream&&(this.state.stream.getVideoTracks&&this.state.stream.getAudioTracks&&(this.state.stream.getVideoTracks().forEach((t=>t.stop())),this.state.stream.getAudioTracks().forEach((t=>t.stop()))),this.setState({stream:void 0}))}render(){return this.props.children}updateTorch(t){return a(this,void 0,void 0,(function*(){const e=[{torch:t}];yield this.state.stream.getVideoTracks()[0].applyConstraints({advanced:e})}))}getCapabilities(){if(this.state.stream.getVideoTracks){const t=this.getVideoTrack();return s.getMediaTrackCapabilities(t)}}static getMediaTrackCapabilities(t){if(t&&t.getCapabilities)return t.getCapabilities()}getVideoTrack(){const t=this.state.stream.getVideoTracks();if(t.length>0)return t[0]}}var l=n(21),c=n(41),u=n(34),d=n(65);class h{static isSupported(){return!!document.createElement("canvas").getContext("webgl")}constructor(){this._type="WebGL",this.canvas=document.createElement("canvas");const t=this.gl=this.canvas.getContext("webgl",{willReadFrequently:!0}),e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);const n=t.createShader(t.VERTEX_SHADER);t.shaderSource(n,"attribute vec2 p;void main(){ gl_Position = vec4(p,0,1);}"),t.compileShader(n);const r=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(r,"precision mediump float;uniform sampler2D texture; uniform vec2 scale; uniform vec2 offset; void main() { gl_FragColor=texture2D( texture, gl_FragCoord.xy * scale + offset );}"),t.compileShader(r);const o=this.program=t.createProgram();t.attachShader(o,n),t.attachShader(o,r),t.linkProgram(o),t.useProgram(o),t.uniform1i(t.getUniformLocation(o,"texture"),0),t.bindBuffer(t.ARRAY_BUFFER,t.createBuffer()),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW),t.enableVertexAttribArray(0),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0)}getImageData(t,e,n,r,o,i,a,s){let l,c;if(i=Math.floor(i),a=Math.floor(a),e=Math.floor(e),n=Math.floor(n),r=Math.floor(r),o=Math.floor(o),t instanceof HTMLVideoElement)[c,l]=[t.videoWidth,t.videoHeight];else{if(!(t instanceof HTMLCanvasElement))throw new Error("Unsupported source type");[c,l]=[t.width,t.height]}(c<e+r||l<n+o)&&u.a.debug("Crop region exceeds source video dimensions. This can happen when the screen is resized or rotated and the video has not yet changed its size. Most likely, the frame we analyzed now contains some garbage data. This is not a problem, unless it happens very frequently.");const h=this.gl;this.canvas.width=i,this.canvas.height=a,h.viewport(0,0,i,a);const p=[r/(i*c),o/(a*l)],f=[e/c,n/l];return h.uniform2fv(h.getUniformLocation(this.program,"scale"),p),h.uniform2fv(h.getUniformLocation(this.program,"offset"),f),h.texImage2D(h.TEXTURE_2D,0,h.RGB,h.RGB,h.UNSIGNED_BYTE,t),h.drawArrays(h.TRIANGLES,0,6),(null==s?void 0:s.byteLength)!==i*a*4&&(s=new Uint8ClampedArray(i*a*4),d.a.INSTANCE.values.set("WebGLNumBufferAllocations",(d.a.INSTANCE.values.get("WebGLNumBufferAllocations")||0)+1)),h.readPixels(0,0,i,a,h.RGBA,h.UNSIGNED_BYTE,s),new ImageData(s,i,a)}}class p{constructor(){this._type="TwoD",this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0,alpha:!1}),this.ctx.imageSmoothingEnabled=!1}getImageData(t,e,n,r,o,i,a,s){return this.canvas.width=i,this.canvas.height=a,this.ctx.drawImage(t,e,n,r,o,0,0,i,a),this.ctx.getImageData(0,0,i,a)}}var f=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class m extends r.default.Component{constructor(t){super(t),this.videoLoaded=!1,this.reloadCanvas=!0,this.swapCameraEnabled=!0,this.activeCamera=void 0,this.save=!1,this._reusableImageBuffer=null,this.onStreamChanged=t=>{this.video.srcObject=t,this.updateCameraInfo(t),this.video.addEventListener("resize",(t=>{this.reloadCanvas=!0}),!1),this.video.addEventListener("loadeddata",(t=>{this.videoLoaded=!0,this.didLoadVideo&&this.didLoadVideo()}),!1)},this.state={facingModeBack:"environment"===this.props.videoConstraints.facingMode,mirrored:this.props.mirrored,deviceId:void 0}}videoSize(){const{clientVideoWidth:t,clientVideoHeight:e}=this.calculateClientVideoConstraints();return new l.a(t,e)}saveExtractedData(){this.save=!0}zoom(){var t;return null!==(t=this.props.zoom)&&void 0!==t?t:1}imageCapture(){if(this.capture)return this.capture;const t=this.videoStream.getVideoTrack();return this.capture=new ImageCapture(t),this.capture}set reusableImageBuffer(t){this._reusableImageBuffer=t}createImageData(t=0,e){return f(this,void 0,void 0,(function*(){if(!this.video||!this.videoLoaded)return;const n=this.getCanvasRenderingContext();if(!n)return;if(e){const t=yield this.imageCapture().takePhoto(),e=yield createImageBitmap(t);u.a.debug("Bitmap size: "+e.width*e.height);const r=this.windowSize(),o=e.height/(r.height+r.y),i=r.width*o,a=r.height*o,s=e.width/2-i/2,l=r.y*o,d=new c.a(s,l,i,a);return u.a.debug("Frame size: "+d.x+"-"+d.y+"-"+d.width+"-"+d.height),n.getImageData(this.video,d.x,d.y,e.width,e.height,d.width,d.height,this._reusableImageBuffer)}let{videoWidth:r,videoHeight:o}=this.video,{clientVideoWidth:i,clientVideoHeight:a,coef:s}=this.calculateClientVideoConstraints();if(0===s)return;const l=this.finderFrame||new c.a(0,0,i,a),d=this.zoom(),h=(r-i/d)/2,p=(o-a/d)/2,f=l.x/s+h,m=l.y/s+p,g=this.finderFrame?s:d,v=l.width/g,b=l.height/g,y=this.calculateFrameSize(t,v,b);return n.getImageData(this.video,f,m,v,b,y.width,y.height,this._reusableImageBuffer)}))}windowSize(){var t;const e=this.props.configuration,n=null!==(t=e.container)&&void 0!==t?t:document.getElementById(e.containerId);if(!n)throw new Error("Container DOM element is required to calculate window size and snap image.");return c.a.fromDOMRect(n.getBoundingClientRect())}calculateClientVideoConstraints(){let{videoWidth:t,videoHeight:e}=this.video,n=this.video.getBoundingClientRect(),r=t,o=e,i=1;return n.width/n.height<=t/e?(i=n.height/e,i>0&&(r=n.width/i)):(i=n.width/t,i>0&&(o=n.height/i)),{clientVideoWidth:r,clientVideoHeight:o,coef:i}}calculateFrameSize(t,e,n){let r=e,o=n;if(t>0&&0!=e&&0!=n){const i=e/n;e>n?(r=e>t?t:e,o=r/i):(o=n>t?t:n,r=o*i)}return new l.a(r,o)}getCanvasRenderingContext(){return this.video?0===this.video.videoWidth?null:(this.canvas&&!this.reloadCanvas||(this.canvas&&this.releaseCanvas(),this.canvas=h.isSupported()?new h:new p,this.reloadCanvas=!1),this.canvas):null}releaseCanvas(){this.canvas&&(this.canvas=null)}componentWillUnmount(){this.releaseCanvas(),this.video=null,this.videoStream=null}style(){var t;const e={display:"block",width:100*this.zoom()+"%",height:100*this.zoom()+"%",left:`${this.zoomMargin()}%`,top:`${this.zoomMargin()}%`,position:"relative",objectFit:"cover",backgroundColor:null===(t=this.props.configuration)||void 0===t?void 0:t.backgroundColor};return this.state.mirrored&&(e.transform="scaleX(-1)"),e}zoomMargin(){const t=this.zoom();return 1===t?0:(1-t)/2*100}render(){const{videoConstraints:t,onReady:e,onError:n}=this.props;return r.default.createElement(s,{videoConstraints:t,preferredCamera:this.state.deviceId||this.props.preferredCamera,onReady:e,onStreamChanged:this.onStreamChanged,onError:n,ref:t=>{this.videoStream=t}},r.default.createElement("video",{autoPlay:!0,muted:!0,playsInline:!0,className:"scanbot-camera-view",ref:t=>{this.video=t},style:this.style()}))}setDirection(t){this.props.videoConstraints.facingMode={ideal:t},this.setState({facingModeBack:"environment"===t,mirrored:"user"===t},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0}))))}swapCameraFacing(t){if(this.swapCameraEnabled){this.swapCameraEnabled=!1;const e=!this.state.facingModeBack,n=e?"environment":"user";this.props.videoConstraints.facingMode=!0===t?{exact:n}:{ideal:n},this.setState({facingModeBack:e,mirrored:!e},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0}))))}}switchCamera(t,e){return f(this,void 0,void 0,(function*(){this.swapCameraEnabled&&(this.swapCameraEnabled=!1,this.props.videoConstraints.facingMode=void 0,this.setState({facingModeBack:void 0,mirrored:null!=e?e:this.state.mirrored,deviceId:t},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0})))))}))}updateCameraInfo(t){this.activeCamera=i.a.getCameraInfoFromStream(t)}getActiveCameraInfo(){return this.activeCamera}setTorchState(t){if(this.activeCamera&&this.activeCamera.supportsTorchControl){return this.videoStream.getVideoTrack().applyConstraints({advanced:[{torch:t}]})}return Promise.reject("Torch is not supported for current camera.")}}},function(t,e,n){"use strict";var r=n(110);e.a=function(t,e){return e?Object(r.a)(t,e,{clone:!1}):t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(33),o=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class i{static get INSTANCE(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this.listOfCameras=[],this.strategy="FAST_DEFERRED"}initialize(t){if(t&&(this.strategy=t),"SLOW"===t||"FAST"===t){const e=t;this.load(e)}}load(t){return o(this,void 0,void 0,(function*(){if(!t)if("SLOW_DEFERRED"===this.strategy||"SLOW"===this.strategy)t="SLOW";else if("FAST_DEFERRED"===this.strategy||"FAST"===this.strategy)t="FAST";else if("NONE"===this.strategy)return this.listOfCameras;let e;if("SLOW"===t)e=this.loadSlow();else{if("FAST"!==t)throw new Error(`Unknown mode ${t}`);e=this.loadFast()}try{return this.listOfCameras=yield e,this.listOfCameras}catch(t){throw this.loadSlowResult=void 0,r.a.createFromDOMException(t)}}))}loadSlow(){return this.loadSlowResult=this.loadSlowResult||(()=>o(this,void 0,void 0,(function*(){yield this.assertPermissionsAreOk();const t=[];for(const e of yield this.getVideoDevices()){let n;try{n=yield this.getUserMedia({video:{deviceId:e.deviceId}}),t.push(i.getCameraInfoFromStream(n))}finally{this.stopStream(n),yield new Promise((t=>setTimeout(t,0)))}}return t})))(),this.loadSlowResult}loadFast(){return this.loadFastResult=this.loadFastResult||(()=>o(this,void 0,void 0,(function*(){yield this.assertPermissionsAreOk();const t=[];for(const e of yield this.getVideoDevices()){const n=i.guessparseCameraLabelFacingMode(e.label),r=i.guessparseCameraLabelMaxNumPixels(e.label);t.push({maxNumPixels:r,facingMode:n,supportsTorchControl:void 0,deviceId:e.deviceId,label:e.label})}return t})))(),this.loadFastResult}getMainCamera(t){var e,n,r,o,i,a;return null!==(a=null===(i=null===(o=null===(r=null===(n=null===(e=this.listOfCameras)||void 0===e?void 0:e.filter((e=>e.facingMode===t)))||void 0===n?void 0:n.map(((t,e)=>({camera:t,index:e}))))||void 0===r?void 0:r.sort(((t,e)=>{var n;return-(+t.camera.supportsTorchControl||0)-(+e.camera.supportsTorchControl||0)||-((t.camera.maxNumPixels||0)-(e.camera.maxNumPixels||0))||(null===(n=t.camera.label)||void 0===n?void 0:n.localeCompare(e.camera.label))||t.index-e.index})))||void 0===o?void 0:o[0])||void 0===i?void 0:i.camera)&&void 0!==a?a:null}getVideoDevices(){return o(this,void 0,void 0,(function*(){let t=yield navigator.mediaDevices.enumerateDevices();if(t=t.filter((t=>"videoinput"===t.kind)),t.some((t=>""===t.label))){let e;try{e=yield this.getUserMedia({video:{facingMode:{ideal:"environment"}},audio:!1}),t=yield navigator.mediaDevices.enumerateDevices(),t=t.filter((t=>"videoinput"===t.kind))}finally{this.stopStream(e)}}return t}))}stopStream(t){null==t||t.getTracks().forEach((t=>t.stop()))}static guessparseCameraLabelFacingMode(t){return function(t){const e=["rear","back","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक"];for(const n of e)if(t.toLowerCase().includes(n.toLowerCase()))return!0;return!1}(t)?"back":"front"}static guessparseCameraLabelMaxNumPixels(t){const e=RegExp(/\b([0-9]+)mp?\b/).exec(t.toLowerCase()),n=e?1e6*parseInt(e[1],10):NaN;return Number.isNaN(n)?void 0:n}assertPermissionsAreOk(){return o(this,void 0,void 0,(function*(){if(r.a.hasCheckedPermission()||(yield r.a.tryCheckPermission()),r.a.hasDeniedPermission())throw r.a.permissionDenied();if(!navigator.mediaDevices)throw r.a.unknown()}))}static getCameraInfoFromStream(t){var e;return null===(e=t.getVideoTracks().map((t=>{var e,n,r,o,i,a;const s=null===(e=t.getCapabilities)||void 0===e?void 0:e.call(t),l=null===(n=t.getSettings)||void 0===n?void 0:n.call(t),c=t.label;let u=function(t){if("user"===(null==t?void 0:t.toLowerCase()))return"front";if("environment"===(null==t?void 0:t.toLowerCase()))return"back";return"unknown"}(null!==(o=null===(r=null==s?void 0:s.facingMode)||void 0===r?void 0:r[0])&&void 0!==o?o:l.facingMode);"unknown"===u&&(u=this.guessparseCameraLabelFacingMode(c));let d=function(t){var e,n;let r=(null===(e=null==t?void 0:t.width)||void 0===e?void 0:e.max)*(null===(n=null==t?void 0:t.height)||void 0===n?void 0:n.max);if(!r||Number.isNaN(r))return;return r}(s);Number.isNaN(d)&&(d=this.guessparseCameraLabelMaxNumPixels(c));return{facingMode:u,maxNumPixels:d,supportsTorchControl:null!==(a=null!==(i=null==s?void 0:s.torch)&&void 0!==i?i:"torch"in l)&&void 0!==a&&a,label:c,deviceId:l.deviceId}})).sort(((t,e)=>e.maxNumPixels-t.maxNumPixels)))||void 0===e?void 0:e[0]}getUserMedia(t){return o(this,void 0,void 0,(function*(){try{return yield navigator.mediaDevices.getUserMedia(t)}catch(t){throw r.a.mediaDeviceNotFound()}}))}}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(93)},function(t,e,n){"use strict";var r=n(111);e.a=r.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(0),o=n(41),i=n(6),a=n(24);class s extends r.default.Component{get style(){return this.props.configuration.style}get holeRect(){return this.holePosition}constructor(t){super(t),this.holePosition=o.a.empty(),this.resizeObserver=new ResizeObserver((()=>{this.updateWindowSize()})),this.componentDidUpdate=t=>{var e,n,r,o;(null===(e=this.props.padding)||void 0===e?void 0:e.minTopPadding)===(null===(n=t.padding)||void 0===n?void 0:n.minTopPadding)&&(null===(r=this.props.padding)||void 0===r?void 0:r.minBottomPadding)===(null===(o=t.padding)||void 0===o?void 0:o.minBottomPadding)&&this.props.configuration===t.configuration&&this.props.guidanceConfiguration===t.guidanceConfiguration||this.setState({shouldUpdateCanvas:!0}),this.updateCanvas()},this.updateWindowSize=()=>{this.setState({shouldUpdateCanvas:!0})},this.getVideoSize=()=>{var t;return null!==(t=this.holeCanvas.getBoundingClientRect())&&void 0!==t?t:new DOMRect},this.scaleForRetinaDisplay=t=>{if(window.devicePixelRatio>1){var e=t.width,n=t.height;t.width=e*window.devicePixelRatio,t.height=n*window.devicePixelRatio,t.style.width=e+"px",t.style.height=n+"px",t.getContext("2d").scale(window.devicePixelRatio,window.devicePixelRatio)}},this.updateCanvas=()=>{var t,e,n,r,o;if(!this.state.shouldUpdateCanvas)return;this.setState({shouldUpdateCanvas:!1});const i=this.getVideoSize().width,a=this.getVideoSize().height;this.holeCanvas.width=i,this.holeCanvas.height=a,this.crosshairCanvas.width=i,this.crosshairCanvas.height=a,this.scaleForRetinaDisplay(this.crosshairCanvas);const s=i-2*this.props.configuration.style.strokeWidth,l=Math.max(20,(i-s)/2),c=Math.min(s,i-2*l),u=this.props.configuration.aspectRatio.width/this.props.configuration.aspectRatio.height;this.holePosition.width=c,this.holePosition.height=this.holePosition.width/u,this.holePosition.x=i/2-c/2;const d=(null===(t=this.guidanceText)||void 0===t?void 0:t.clientHeight)+this.guidanceTextTopPadding||0,h=Math.max(10,null!==(n=null===(e=this.props.padding)||void 0===e?void 0:e.minTopPadding)&&void 0!==n?n:0),p=a-h-Math.max(10,null!==(o=null===(r=this.props.padding)||void 0===r?void 0:r.minBottomPadding)&&void 0!==o?o:0)-d;this.holePosition.height>p?(this.holePosition.height=p,this.holePosition.width=this.holePosition.height*u,this.holePosition.x=i/2-this.holePosition.width/2,this.holePosition.y=h):this.holePosition.y=h+(p-this.holePosition.height)/1.9;const f=this.holeCanvas.getContext("2d");f.save(),this.drawBackground(f),f.globalCompositeOperation="destination-out",this.drawHole();const m=this.crosshairCanvas.getContext("2d");m.globalCompositeOperation="source-over","FinderStrokedStyle"===this.props.configuration.style._type?this.drawHoleOutline():"FinderCorneredStyle"===this.props.configuration.style._type&&this.drawHoleCorners(),f.restore(),m.restore()},this.drawBackground=t=>{const{width:e,height:n}=this.getVideoSize();t.clearRect(0,0,e,n),t.beginPath(),t.rect(0,0,e,n),t.fillStyle=i.b.getColorValue(this.props.configuration.overlayColor),t.fill()},this.drawHole=()=>{const t=this.holeCanvas.getContext("2d"),e=this.cornerRadius(),n=this.holePosition.x,r=this.holePosition.y,o=this.holePosition.width,i=this.holePosition.height;t.beginPath(),t.fillStyle="black",t.moveTo(n+e,r),t.arcTo(n+o,r,n+o,r+i,e),t.arcTo(n+o,r+i,n,r+i,e),t.arcTo(n,r+i,n,r,e),t.arcTo(n,r,n+o,r,e),t.closePath(),t.fill()},this.drawCrosshair=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x+this.holePosition.width/2,n=this.holePosition.y+this.holePosition.height/2;t.beginPath(),t.moveTo(e-10,n),t.lineTo(e+10,n),t.moveTo(e,n-10),t.lineTo(e,n+10),t.strokeStyle="white",t.fillStyle="white",t.lineWidth=1,t.stroke()},this.drawHoleCorners=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x,n=this.holePosition.y,r=this.holePosition.width,o=this.holePosition.height,a=15,s=this.style.strokeWidth,l=this.cornerRadius();t.beginPath(),t.moveTo(e,n+a),t.arcTo(e,n,e+r,n,l),t.lineTo(e+a,n),t.moveTo(e+r-a,n),t.arcTo(e+r,n,e+r,n+o,l),t.lineTo(e+r,n+a),t.moveTo(e+r,n+o-a),t.arcTo(e+r,n+o,e,n+o,l),t.lineTo(e+r-a,n+o),t.moveTo(e,n+o-a),t.arcTo(e,n+o,e+r,n+o,l),t.lineTo(e+a,n+o),t.strokeStyle=i.b.getColorValue(this.style.strokeColor),t.lineWidth=s,t.stroke()},this.drawHoleOutline=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x,n=this.holePosition.y,r=this.holePosition.width,o=this.holePosition.height,a=this.cornerRadius(),s=this.style.strokeWidth;t.beginPath(),t.moveTo(e+a,n),t.arcTo(e+r,n,e+r,n+o,a),t.moveTo(e+r,n+a),t.arcTo(e+r,n+o,e,n+o,a),t.moveTo(e+r-a,n+o),t.arcTo(e,n+o,e,n,a),t.moveTo(e,n+o-a),t.arcTo(e,n,e+r,n,a),t.strokeStyle=i.b.getColorValue(this.style.strokeColor),t.lineWidth=s,t.stroke()},this.guidanceTextTopPadding=20,this.render=()=>r.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",textAlign:"left"},onClick:t=>{const e=this.holePosition;t.clientX>this.holePosition.x&&t.clientX<e.x+e.width&&t.clientY>e.y&&t.clientY<e.y+e.height&&console.log("Clicked inside hole, possibly click events need to be diverted")}},r.default.createElement("canvas",{ref:t=>{this.holeCanvas=t},style:{position:"absolute",width:"100%",height:"100%"}}),r.default.createElement("canvas",{ref:t=>{this.crosshairCanvas=t},style:{position:"absolute",width:"100%",height:"100%"}}),this.guidance.visible&&r.default.createElement("div",{ref:t=>{this.guidanceText=t},style:{position:"absolute",display:"block",top:this.holePosition.y+this.holePosition.height+this.guidanceTextTopPadding,left:0,width:"100%",textAlign:"center"}},r.default.createElement(a.a,{style:{display:"inline-block",backgroundColor:i.b.getColorValue(this.guidance.background.fillColor),borderStyle:"solid",borderColor:i.b.getColorValue(this.guidance.background.strokeColor),borderWidth:this.style.strokeWidth,borderRadius:4,padding:"4px 8px",flex:1},config:this.guidance.title}))),this.state={shouldUpdateCanvas:!0}}componentDidMount(){this.updateWindowSize(),this.resizeObserver.observe(this.holeCanvas)}componentWillUnmount(){this.resizeObserver.disconnect()}bottomOfGuidanceText(){var t,e;return this.holeRect.bottom()+(null!==(e=null===(t=this.guidanceText)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0)+this.guidanceTextTopPadding}get guidance(){return this.props.guidanceConfiguration}cornerRadius(){return Math.max(0,Math.min(this.style.cornerRadius,this.holePosition.width/2,this.holePosition.height/2))}}},function(t,e,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&t.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&t.push(s);else t.push(r.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return G})),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 r="-ms-",o="-moz-",i="-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 b(t,e,n){return t.slice(e,n)}function y(t){return t.length}function A(t){return t.length}function C(t,e){return e.push(t),t}function S(t,e){return t.map(e).join("")}function x(t,e){return t.filter((function(t){return!f(t,e)}))}var w=1,O=1,E=0,L=0,j=0,k="";function _(t,e,n,r,o,i,a,s){return{value:t,root:e,parent:n,type:r,props:o,children:i,line:w,column:O,length:a,return:"",siblings:s}}function T(t,e){return h(_("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function P(t){for(;t.root;)t=T(t.root,{children:[t]});C(t,t.siblings)}function R(){return j=L<E?v(k,L++):0,O++,10===j&&(O=1,w++),j}function D(){return v(k,L)}function B(){return L}function F(t,e){return b(k,t,e)}function I(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 M(t){return w=O=1,E=y(k=t),L=0,[]}function W(t){return k="",t}function z(t){return p(F(L-1,U(91===t?t+2:40===t?t+1:t)))}function N(t){for(;(j=D())&&j<33;)R();return I(t)>2||I(j)>3?"":" "}function V(t,e){for(;--e&&R()&&!(j<48||j>102||j>57&&j<65||j>70&&j<97););return F(t,B()+(e<6&&32==D()&&32==R()))}function U(t){for(;R();)switch(j){case t:return L;case 34:case 39:34!==t&&39!==t&&U(j);break;case 40:41===t&&U(t);break;case 92:R()}return L}function H(t,e){for(;R()&&t+j!==57&&(t+j!==84||47!==D()););return"/*"+F(e,L-1)+"*"+d(47===t?t:R())}function $(t){for(;!I(D());)R();return F(t,L)}function G(t){return W(Y("",null,null,null,[""],t=M(t),0,[0],t))}function Y(t,e,n,r,o,i,a,s,l){for(var c=0,h=0,p=a,f=0,b=0,A=0,S=1,x=1,E=1,_=0,T="",P=o,F=i,I=r,M=T;x;)switch(A=_,_=R()){case 40:if(108!=A&&58==v(M,p-1)){-1!=g(M+=m(z(_),"&","&\f"),"&\f",u(c?s[c-1]:0))&&(E=-1);break}case 34:case 39:case 91:M+=z(_);break;case 9:case 10:case 13:case 32:M+=N(A);break;case 92:M+=V(B()-1,7);continue;case 47:switch(D()){case 42:case 47:C(Z(H(R(),B()),e,n,l),l);break;default:M+="/"}break;case 123*S:s[c++]=y(M)*E;case 125*S:case 59:case 0:switch(_){case 0:case 125:x=0;case 59+h:-1==E&&(M=m(M,/\f/g,"")),b>0&&y(M)-p&&C(b>32?X(M+";",r,n,p-1,l):X(m(M," ","")+";",r,n,p-2,l),l);break;case 59:M+=";";default:if(C(I=Q(M,e,n,c,h,o,s,T,P=[],F=[],p,i),i),123===_)if(0===h)Y(M,e,I,I,P,i,p,s,F);else switch(99===f&&110===v(M,3)?100:f){case 100:case 108:case 109:case 115:Y(t,I,I,r&&C(Q(t,I,I,0,0,o,s,T,o,P=[],p,F),F),o,F,p,s,r?P:F);break;default:Y(M,I,I,I,[""],F,0,s,F)}}c=h=b=0,S=E=1,T=M="",p=a;break;case 58:p=1+y(M),b=A;default:if(S<1)if(123==_)--S;else if(125==_&&0==S++&&125==(j=L>0?v(k,--L):0,O--,10===j&&(O=1,w--),j))continue;switch(M+=d(_),_*S){case 38:E=h>0?1:(M+="\f",-1);break;case 44:s[c++]=(y(M)-1)*E,E=1;break;case 64:45===D()&&(M+=z(R())),f=D(),h=p=y(T=M+=$(B())),_++;break;case 45:45===A&&2==y(M)&&(S=0)}}return i}function Q(t,e,n,r,o,i,a,l,c,d,h,f){for(var g=o-1,v=0===o?i:[""],y=A(v),C=0,S=0,x=0;C<r;++C)for(var w=0,O=b(t,g+1,g=u(S=a[C])),E=t;w<y;++w)(E=p(S>0?v[w]+" "+O:m(O,/&\f/g,v[w])))&&(c[x++]=E);return _(t,e,n,0===o?s:l,c,d,h,f)}function Z(t,e,n,r){return _(t,e,n,a,d(j),b(t,2,-2),0,r)}function X(t,e,n,r,o){return _(t,e,n,l,b(t,0,r),b(t,r+1,-1),r,o)}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 i+"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 i+t+t;case 4789:return o+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return i+t+o+t+r+t+t;case 5936:switch(v(t,e+11)){case 114:return i+t+r+m(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return i+t+r+m(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return i+t+r+m(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return i+t+r+t+t;case 6165:return i+t+r+"flex-"+t+t;case 5187:return i+t+m(t,/(\w+).+(:[^]+)/,i+"box-$1$2"+r+"flex-$1$2")+t;case 5443:return i+t+r+"flex-item-"+m(t,/flex-|-self/g,"")+(f(t,/flex-|baseline/)?"":r+"grid-row-"+m(t,/flex-|-self/g,""))+t;case 4675:return i+t+r+"flex-line-pack"+m(t,/align-content|flex-|-self/g,"")+t;case 5548:return i+t+r+m(t,"shrink","negative")+t;case 5292:return i+t+r+m(t,"basis","preferred-size")+t;case 6060:return i+"box-"+m(t,"-grow","")+i+t+r+m(t,"grow","positive")+t;case 4554:return i+m(t,/([^-])(transform)/g,"$1"+i+"$2")+t;case 6187:return m(m(m(t,/(zoom-|grab)/,i+"$1"),/(image-set)/,i+"$1"),t,"")+t;case 5495:case 3959:return m(t,/(image-set\([^]*)/,i+"$1$`$1");case 4968:return m(m(t,/(.+:)(flex-)?(.*)/,i+"box-pack:$3"+r+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+i+t+t;case 4200:if(!f(t,/flex-|baseline/))return r+"grid-column-align"+b(t,e)+t;break;case 2592:case 3360:return r+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:r+m(t,"-start","")+t+r+"grid-row-span:"+(~g(n,"span",0)?f(n,/\d+/):+f(n,/\d+/)-+f(t,/\d+/))+";":r+m(t,"-start","")+t;case 4896:case 4128:return n&&n.some((function(t){return f(t.props,/grid-\w+-start/)}))?t:r+m(m(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return m(t,/(.+)-inline(.+)/,i+"$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(y(t)-1-e>6)switch(v(t,e+1)){case 109:if(45!==v(t,e+4))break;case 102:return m(t,/(.+:)(.+)-([^]+)/,"$1"+i+"$2-$3$1"+o+(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,o,i,a,s,l){return r+n+":"+o+l+(i?r+n+"-span:"+(a?s:+s-+o)+l:"")+t}));case 4949:if(121===v(t,e+6))return m(t,":",":"+i)+t;break;case 6444:switch(v(t,45===v(t,14)?18:11)){case 120:return m(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+i+(45===v(t,14)?"inline-":"")+"box$3$1"+i+"$2$3$1"+r+"$2box$3")+t;case 100:return m(t,":",":"+r)+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="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function J(t,e,n,r){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,r)+"}";case s:if(!y(t.value=t.props.join(",")))return""}return y(n=K(t.children,r))?t.return=t.value+"{"+n+"}":""}function tt(t){var e=A(t);return function(n,r,o,i){for(var a="",s=0;s<e;s++)a+=t[s](n,r,o,i)||"";return a}}function et(t){return function(e){e.root||(e=e.return)&&t(e)}}function nt(t,e,n,o){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([T(t,{value:m(t.value,"@","@"+i)})],o);case s:if(t.length)return S(n=t.props,(function(e){switch(f(e,o=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":P(T(t,{props:[m(e,/:(read-\w+)/,":-moz-$1")]})),P(T(t,{props:[e]})),h(t,{props:x(n,o)});break;case"::placeholder":P(T(t,{props:[m(e,/:(plac\w+)/,":"+i+"input-$1")]})),P(T(t,{props:[m(e,/:(plac\w+)/,":-moz-$1")]})),P(T(t,{props:[m(e,/:(plac\w+)/,r+"input-$1")]})),P(T(t,{props:[e]})),h(t,{props:x(n,o)})}return""}))}}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1),o=n(13);class i extends o.a{constructor(t={}){super(),this.title=new r.j({visible:!1,text:"Scan Item",color:"?sbColorOnPrimary"}),this.mode="SOLID",this.backgroundColor="?sbColorPrimary",this.cancelButton=new r.c({text:"Cancel",background:new r.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new r.d({color:"?sbColorOnPrimary"})}),void 0!==t.title&&(this.title=new r.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 r.c(t.cancelButton))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=n(29);function o(t,e){let n;return n=e?Object(r.c)(t).withConfig({displayName:e.label,shouldForwardProp:e.shouldForwardProp}):Object(r.c)(t),n}const i=(t,e)=>{t.componentStyle&&(t.componentStyle.rules=e(t.componentStyle.rules))}},function(t,e,n){"use strict";var r=n(112);e.a=r.a},function(t,e,n){"use strict";var r=n(131);e.a=r.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=n(8);function o(t,e,n){return Math.min(Math.max(t,e),n)}function i(t,e,n){return new r.a(o(t.x,-e/2,n.width-e/2),o(t.y,-e/2,n.height-e/2))}},,function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeFormatConfigurationBase",(function(){return r})),n.d(e,"BarcodeFormatOneDConfigurationBase",(function(){return o})),n.d(e,"BarcodeFormatCodabarConfiguration",(function(){return l})),n.d(e,"BarcodeFormatCode11Configuration",(function(){return c})),n.d(e,"BarcodeFormatCode39Configuration",(function(){return u})),n.d(e,"BarcodeFormatCode93Configuration",(function(){return d})),n.d(e,"BarcodeFormatCode128Configuration",(function(){return h})),n.d(e,"BarcodeFormatCode2Of5Configuration",(function(){return p})),n.d(e,"BarcodeFormatDataBarConfiguration",(function(){return f})),n.d(e,"BarcodeFormatDataBarExpandedConfiguration",(function(){return m})),n.d(e,"BarcodeFormatDataBarLimitedConfiguration",(function(){return g})),n.d(e,"BarcodeFormatITFConfiguration",(function(){return v})),n.d(e,"BarcodeFormatMSIPlesseyConfiguration",(function(){return b})),n.d(e,"BarcodeFormatUpcEanConfiguration",(function(){return y})),n.d(e,"BarcodeFormatPharmaCodeConfiguration",(function(){return A})),n.d(e,"BarcodeFormatTwoDConfigurationBase",(function(){return i})),n.d(e,"BarcodeFormatAztecConfiguration",(function(){return C})),n.d(e,"BarcodeFormatQRCodeConfiguration",(function(){return S})),n.d(e,"BarcodeFormatPDF417Configuration",(function(){return x})),n.d(e,"BarcodeFormatMicroPDF417Configuration",(function(){return w})),n.d(e,"BarcodeFormatDataMatrixConfiguration",(function(){return O})),n.d(e,"BarcodeFormatMaxiCodeConfiguration",(function(){return E})),n.d(e,"BarcodeFormatFourStateConfigurationBase",(function(){return a})),n.d(e,"BarcodeFormatAustraliaPostConfiguration",(function(){return L})),n.d(e,"BarcodeFormatJapanPostConfiguration",(function(){return j})),n.d(e,"BarcodeFormatRoyalMailConfiguration",(function(){return k})),n.d(e,"BarcodeFormatRoyalTNTPostConfiguration",(function(){return _})),n.d(e,"BarcodeFormatUSPSIntelligentMailConfiguration",(function(){return T})),n.d(e,"BarcodeFormatPharmaCodeTwoTrackConfiguration",(function(){return P})),n.d(e,"BarcodeFormatGS1CompositeConfiguration",(function(){return R})),n.d(e,"BarcodeFormatCommonOneDConfiguration",(function(){return D})),n.d(e,"BarcodeFormatCommonTwoDConfiguration",(function(){return B})),n.d(e,"BarcodeFormatCommonFourStateConfiguration",(function(){return F})),n.d(e,"BarcodeFormatCommonConfiguration",(function(){return I}));var r,o,i,a,s=n(5);!function(t){t.From=function(t){const e=t._type;switch(e){case"BarcodeFormatCodabarConfiguration":return new l(t);case"BarcodeFormatCode11Configuration":return new c(t);case"BarcodeFormatCode39Configuration":return new u(t);case"BarcodeFormatCode93Configuration":return new d(t);case"BarcodeFormatCode128Configuration":return new h(t);case"BarcodeFormatCode2Of5Configuration":return new p(t);case"BarcodeFormatDataBarConfiguration":return new f(t);case"BarcodeFormatDataBarExpandedConfiguration":return new m(t);case"BarcodeFormatDataBarLimitedConfiguration":return new g(t);case"BarcodeFormatITFConfiguration":return new v(t);case"BarcodeFormatMSIPlesseyConfiguration":return new b(t);case"BarcodeFormatUpcEanConfiguration":return new y(t);case"BarcodeFormatPharmaCodeConfiguration":return new A(t);case"BarcodeFormatAztecConfiguration":return new C(t);case"BarcodeFormatQRCodeConfiguration":return new S(t);case"BarcodeFormatPDF417Configuration":return new x(t);case"BarcodeFormatMicroPDF417Configuration":return new w(t);case"BarcodeFormatDataMatrixConfiguration":return new O(t);case"BarcodeFormatMaxiCodeConfiguration":return new E(t);case"BarcodeFormatAustraliaPostConfiguration":return new L(t);case"BarcodeFormatJapanPostConfiguration":return new j(t);case"BarcodeFormatRoyalMailConfiguration":return new k(t);case"BarcodeFormatRoyalTNTPostConfiguration":return new _(t);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new T(t);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new P(t);case"BarcodeFormatGS1CompositeConfiguration":return new R(t);case"BarcodeFormatCommonOneDConfiguration":return new D(t);case"BarcodeFormatCommonTwoDConfiguration":return new B(t);case"BarcodeFormatCommonFourStateConfiguration":return new F(t);case"BarcodeFormatCommonConfiguration":return new I(t);default:throw`Unknown child class name: ${e}`}}}(r||(r={})),function(t){t.From=function(t){const e=t._type;switch(e){case"BarcodeFormatCodabarConfiguration":return new l(t);case"BarcodeFormatCode11Configuration":return new c(t);case"BarcodeFormatCode39Configuration":return new u(t);case"BarcodeFormatCode93Configuration":return new d(t);case"BarcodeFormatCode128Configuration":return new h(t);case"BarcodeFormatCode2Of5Configuration":return new p(t);case"BarcodeFormatDataBarConfiguration":return new f(t);case"BarcodeFormatDataBarExpandedConfiguration":return new m(t);case"BarcodeFormatDataBarLimitedConfiguration":return new g(t);case"BarcodeFormatITFConfiguration":return new v(t);case"BarcodeFormatMSIPlesseyConfiguration":return new b(t);case"BarcodeFormatUpcEanConfiguration":return new y(t);case"BarcodeFormatPharmaCodeConfiguration":return new A(t);default:throw`Unknown child class name: ${e}`}}}(o||(o={}));class l extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCodabarConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.returnStartEnd&&(this.returnStartEnd=t.returnStartEnd)}}class c extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode11Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.checksum&&(this.checksum=t.checksum)}}class u extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode39Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.code32&&(this.code32=t.code32),void 0!==t.code39&&(this.code39=t.code39),void 0!==t.pzn&&(this.pzn=t.pzn),void 0!==t.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=t.tryCode39ExtendedMode),void 0!==t.useCode39CheckDigit&&(this.useCode39CheckDigit=t.useCode39CheckDigit)}}class d extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode93Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class h extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode128Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class p extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode2Of5Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.iata2of5&&(this.iata2of5=t.iata2of5),void 0!==t.code25&&(this.code25=t.code25),void 0!==t.industrial2of5&&(this.industrial2of5=t.industrial2of5),void 0!==t.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=t.useIATA2OF5Checksum)}}class f extends s.a{constructor(t={}){super(),this._type="BarcodeFormatDataBarConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class m extends s.a{constructor(t={}){super(),this._type="BarcodeFormatDataBarExpandedConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class g extends s.a{constructor(t={}){super(),this._type="BarcodeFormatDataBarLimitedConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class v extends s.a{constructor(t={}){super(),this._type="BarcodeFormatITFConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class b extends s.a{constructor(t={}){super(),this._type="BarcodeFormatMSIPlesseyConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.checksumAlgorithms&&(this.checksumAlgorithms=t.checksumAlgorithms.map((t=>t)))}}class y extends s.a{constructor(t={}){super(),this._type="BarcodeFormatUpcEanConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.ean8&&(this.ean8=t.ean8),void 0!==t.ean13&&(this.ean13=t.ean13),void 0!==t.upca&&(this.upca=t.upca),void 0!==t.upce&&(this.upce=t.upce),void 0!==t.extensions&&(this.extensions=t.extensions)}}class A extends s.a{constructor(t={}){super(),this._type="BarcodeFormatPharmaCodeConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue),void 0!==t.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=t.allowNarrowBarsOnly),void 0!==t.allowWideBarsOnly&&(this.allowWideBarsOnly=t.allowWideBarsOnly)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"BarcodeFormatAztecConfiguration":return new C(t);case"BarcodeFormatQRCodeConfiguration":return new S(t);case"BarcodeFormatPDF417Configuration":return new x(t);case"BarcodeFormatMicroPDF417Configuration":return new w(t);case"BarcodeFormatDataMatrixConfiguration":return new O(t);case"BarcodeFormatMaxiCodeConfiguration":return new E(t);default:throw`Unknown child class name: ${e}`}}}(i||(i={}));class C extends s.a{constructor(t={}){super(),this._type="BarcodeFormatAztecConfiguration",this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class S extends s.a{constructor(t={}){super(),this._type="BarcodeFormatQRCodeConfiguration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.qr&&(this.qr=t.qr),void 0!==t.microQr&&(this.microQr=t.microQr),void 0!==t.rmqr&&(this.rmqr=t.rmqr)}}class x extends s.a{constructor(t={}){super(),this._type="BarcodeFormatPDF417Configuration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class w extends s.a{constructor(t={}){super(),this._type="BarcodeFormatMicroPDF417Configuration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class O extends s.a{constructor(t={}){super(),this._type="BarcodeFormatDataMatrixConfiguration",this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class E extends s.a{constructor(t={}){super(),this._type="BarcodeFormatMaxiCodeConfiguration",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"BarcodeFormatAustraliaPostConfiguration":return new L(t);case"BarcodeFormatJapanPostConfiguration":return new j(t);case"BarcodeFormatRoyalMailConfiguration":return new k(t);case"BarcodeFormatRoyalTNTPostConfiguration":return new _(t);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new T(t);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new P(t);default:throw`Unknown child class name: ${e}`}}}(a||(a={}));class L extends s.a{constructor(t={}){super(),this._type="BarcodeFormatAustraliaPostConfiguration",this.regexFilter="",this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=t.australiaPostCustomerFormat)}}class j extends s.a{constructor(t={}){super(),this._type="BarcodeFormatJapanPostConfiguration",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class k extends s.a{constructor(t={}){super(),this._type="BarcodeFormatRoyalMailConfiguration",this.regexFilter="",this.stripCheckDigits=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits)}}class _ extends s.a{constructor(t={}){super(),this._type="BarcodeFormatRoyalTNTPostConfiguration",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class T extends s.a{constructor(t={}){super(),this._type="BarcodeFormatUSPSIntelligentMailConfiguration",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class P extends s.a{constructor(t={}){super(),this._type="BarcodeFormatPharmaCodeTwoTrackConfiguration",this.regexFilter="",this.minimumValue=364,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue)}}class R extends s.a{constructor(t={}){super(),this._type="BarcodeFormatGS1CompositeConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class D extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCommonOneDConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class B extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCommonTwoDConfiguration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class F extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCommonFourStateConfiguration",this.regexFilter="",this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class I extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCommonConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}},function(t,e,n){"use strict";var r=n(107);const o=Object(r.a)();e.a=o},function(t,e,n){"use strict";var r=n(14),o=n(20),i=n(45);var a=function(...t){const e=t.reduce(((t,e)=>(e.filterProps.forEach((n=>{t[n]=e})),t)),{}),n=t=>Object.keys(t).reduce(((n,r)=>e[r]?Object(i.a)(n,e[r](t)):n),{});return n.propTypes={},n.filterProps=t.reduce(((t,e)=>t.concat(e.filterProps)),[]),n},s=n(31);function l(t){return"number"!=typeof t?t:`${t}px solid`}function c(t,e){return Object(o.a)({prop:t,themeKey:"borders",transform:e})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),b=c("borderBottomColor"),y=c("borderLeftColor"),A=c("outline",l),C=c("outlineColor"),S=t=>{if(void 0!==t.borderRadius&&null!==t.borderRadius){const e=Object(r.b)(t.theme,"shape.borderRadius",4,"borderRadius"),n=t=>({borderRadius:Object(r.c)(e,t)});return Object(s.b)(t,t.borderRadius,n)}return null};S.propTypes={},S.filterProps=["borderRadius"];a(u,d,h,p,f,m,g,v,b,y,S,A,C);const x=t=>{if(void 0!==t.gap&&null!==t.gap){const e=Object(r.b)(t.theme,"spacing",8,"gap"),n=t=>({gap:Object(r.c)(e,t)});return Object(s.b)(t,t.gap,n)}return null};x.propTypes={},x.filterProps=["gap"];const w=t=>{if(void 0!==t.columnGap&&null!==t.columnGap){const e=Object(r.b)(t.theme,"spacing",8,"columnGap"),n=t=>({columnGap:Object(r.c)(e,t)});return Object(s.b)(t,t.columnGap,n)}return null};w.propTypes={},w.filterProps=["columnGap"];const O=t=>{if(void 0!==t.rowGap&&null!==t.rowGap){const e=Object(r.b)(t.theme,"spacing",8,"rowGap"),n=t=>({rowGap:Object(r.c)(e,t)});return Object(s.b)(t,t.rowGap,n)}return null};O.propTypes={},O.filterProps=["rowGap"];a(x,w,O,Object(o.a)({prop:"gridColumn"}),Object(o.a)({prop:"gridRow"}),Object(o.a)({prop:"gridAutoFlow"}),Object(o.a)({prop:"gridAutoColumns"}),Object(o.a)({prop:"gridAutoRows"}),Object(o.a)({prop:"gridTemplateColumns"}),Object(o.a)({prop:"gridTemplateRows"}),Object(o.a)({prop:"gridTemplateAreas"}),Object(o.a)({prop:"gridArea"}));function E(t,e){return"grey"===e?e:t}a(Object(o.a)({prop:"color",themeKey:"palette",transform:E}),Object(o.a)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:E}),Object(o.a)({prop:"backgroundColor",themeKey:"palette",transform:E}));function L(t){return t<=1&&0!==t?100*t+"%":t}const j=Object(o.a)({prop:"width",transform:L}),k=t=>{if(void 0!==t.maxWidth&&null!==t.maxWidth){const e=e=>{var n,r;const o=(null==(n=t.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[e])||s.e[e];return o?"px"!==(null==(r=t.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:L(e)}};return Object(s.b)(t,t.maxWidth,e)}return null};k.filterProps=["maxWidth"];const _=Object(o.a)({prop:"minWidth",transform:L}),T=Object(o.a)({prop:"height",transform:L}),P=Object(o.a)({prop:"maxHeight",transform:L}),R=Object(o.a)({prop:"minHeight",transform:L});Object(o.a)({prop:"size",cssProperty:"width",transform:L}),Object(o.a)({prop:"size",cssProperty:"height",transform:L});a(j,k,_,T,P,R,Object(o.a)({prop:"boxSizing"}));const D={border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:S},color:{themeKey:"palette",transform:E},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:E},backgroundColor:{themeKey:"palette",transform:E},p:{style:r.e},pt:{style:r.e},pr:{style:r.e},pb:{style:r.e},pl:{style:r.e},px:{style:r.e},py:{style:r.e},padding:{style:r.e},paddingTop:{style:r.e},paddingRight:{style:r.e},paddingBottom:{style:r.e},paddingLeft:{style:r.e},paddingX:{style:r.e},paddingY:{style:r.e},paddingInline:{style:r.e},paddingInlineStart:{style:r.e},paddingInlineEnd:{style:r.e},paddingBlock:{style:r.e},paddingBlockStart:{style:r.e},paddingBlockEnd:{style:r.e},m:{style:r.d},mt:{style:r.d},mr:{style:r.d},mb:{style:r.d},ml:{style:r.d},mx:{style:r.d},my:{style:r.d},margin:{style:r.d},marginTop:{style:r.d},marginRight:{style:r.d},marginBottom:{style:r.d},marginLeft:{style:r.d},marginX:{style:r.d},marginY:{style:r.d},marginInline:{style:r.d},marginInlineStart:{style:r.d},marginInlineEnd:{style:r.d},marginBlock:{style:r.d},marginBlockStart:{style:r.d},marginBlockEnd:{style:r.d},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:x},rowGap:{style:O},columnGap:{style:w},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:L},maxWidth:{style:k},minWidth:{transform:L},height:{transform:L},maxHeight:{transform:L},minHeight:{transform:L},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};e.a=D},function(t,e,n){"use strict";(function(t){function r(t,e=!1){const n=[];if(e)return n;return function t(e){if(e)if(e.constructor===ImageData)n.push(e.data.buffer);else if(e.constructor===ArrayBuffer)n.push(e);else if(ArrayBuffer.isView(e))n.push(e.buffer);else if(Array.isArray(e))for(let n=0;n<e.length;++n)t(e[n]);else if(e.constructor===Object)for(const n in e)e.hasOwnProperty(n)&&t(e[n])}(t),n}function o(t){return t.startsWith("http:")||t.startsWith("https:")}function i(){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}}function a(t){const{allowSimd:e=!0,allowThreads:n=!0}=t||{};let r="";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}}()){r+="-simd";n&&i()&&(r+="-threads")}return r}n.d(e,"b",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return a}))}).call(this,n(92))},function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeItem",(function(){return a})),n.d(e,"BarcodeDocumentFormats",(function(){return s})),n.d(e,"BarcodeScannerConfiguration",(function(){return l})),n.d(e,"BarcodeScannerResult",(function(){return c}));var r=n(60),o=n(5),i=n(38);class a extends o.a{constructor(t={}){if(super(),this.format="NONE",this.isUpsideDown=!1,this.sourceImage=null,this.isGS1Message=!1,this.isGS1CompositePart=!1,this.dataBarStackSize=1,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0!==t.format&&(this.format=t.format),void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0!==t.isUpsideDown&&(this.isUpsideDown=t.isUpsideDown),void 0!==t.sourceImage&&(this.sourceImage=null!=t.sourceImage?t.sourceImage:null),void 0===t.rawBytes)throw new Error("rawBytes must be present in constructor argument");if(this.rawBytes=t.rawBytes,void 0===t.upcEanExtension)throw new Error("upcEanExtension must be present in constructor argument");if(this.upcEanExtension=t.upcEanExtension,void 0!==t.isGS1Message&&(this.isGS1Message=t.isGS1Message),void 0!==t.isGS1CompositePart&&(this.isGS1CompositePart=t.isGS1CompositePart),void 0!==t.dataBarStackSize&&(this.dataBarStackSize=t.dataBarStackSize),void 0===t.parsedDocument)throw new Error("parsedDocument must be present in constructor argument");this.parsedDocument=null!=t.parsedDocument?new i.GenericDocument(t.parsedDocument):null}}class s extends o.a{constructor(t={}){super()}}!function(t){t.all=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],t.documentBarcodeFormats={AAMVA:["PDF_417"],ID_CARD_PDF_417:["PDF_417"],SEPA:["QR_CODE"],MEDICAL_CERTIFICATE:["PDF_417"],DE_MEDICAL_PLAN:["DATA_MATRIX"],BOARDING_PASS:["PDF_417","AZTEC"],VCARD:["QR_CODE"],SWISS_QR:["QR_CODE"],GS1:["CODE_128","AZTEC","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","ITF","MICRO_PDF_417","PDF_417","QR_CODE","UPC_A","UPC_E"],HIBC:["CODE_39","CODE_128","AZTEC","DATA_MATRIX","MICRO_PDF_417","PDF_417","QR_CODE"]}}(s||(s={}));class l extends o.a{constructor(t={}){super(),this.barcodeFormatConfigurations=[new r.BarcodeFormatCommonConfiguration({})],this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.returnBarcodeImage=!0,void 0!==t.barcodeFormatConfigurations&&(this.barcodeFormatConfigurations=t.barcodeFormatConfigurations.map((t=>r.BarcodeFormatConfigurationBase.From(t)))),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.live&&(this.live=t.live),void 0!==t.acceptedDocumentFormats&&(this.acceptedDocumentFormats=t.acceptedDocumentFormats.map((t=>t))),void 0!==t.returnBarcodeImage&&(this.returnBarcodeImage=t.returnBarcodeImage)}}class c extends o.a{constructor(t={}){if(super(),void 0===t.barcodes)throw new Error("barcodes must be present in constructor argument");if(this.barcodes=t.barcodes.map((t=>new a(t))),void 0===t.success)throw new Error("success must be present in constructor argument");this.success=t.success}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{constructor(){this.values=new Map}}r.INSTANCE=new r},,function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(0),i=n(7),a=n(10),s=n(159),l=n(9),c=n(16),u=n(11),d=n(158),h=n(124);function p(t){return Object(h.a)("MuiSvgIcon",t)}Object(d.a)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var f=n(4);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=Object(u.a)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,"inherit"!==n.color&&e[`color${Object(l.a)(n.color)}`],e[`fontSize${Object(l.a)(n.fontSize)}`]]}})((({theme:t,ownerState:e})=>{var n,r,o,i,a,s,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=t.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=t.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=t.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=t.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:null!=(d=null==(h=(t.vars||t).palette)||null==(h=h[e.color])?void 0:h.main)?d:{action:null==(p=(t.vars||t).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.disabled,inherit:void 0}[e.color]}})),v=o.forwardRef((function(t,e){const n=Object(c.a)({props:t,name:"MuiSvgIcon"}),{children:u,className:d,color:h="inherit",component:v="svg",fontSize:b="medium",htmlColor:y,inheritViewBox:A=!1,titleAccess:C,viewBox:S="0 0 24 24"}=n,x=Object(i.a)(n,m),w=o.isValidElement(u)&&"svg"===u.type,O=Object(r.a)({},n,{color:h,component:v,fontSize:b,instanceFontSize:t.fontSize,inheritViewBox:A,viewBox:S,hasSvgAsChild:w}),E={};A||(E.viewBox=S);const L=(t=>{const{color:e,fontSize:n,classes:r}=t,o={root:["root","inherit"!==e&&`color${Object(l.a)(e)}`,`fontSize${Object(l.a)(n)}`]};return Object(s.a)(o,p,r)})(O);return Object(f.jsxs)(g,Object(r.a)({as:v,className:Object(a.a)(L.root,d),focusable:"false",color:y,"aria-hidden":!C||void 0,role:C?"img":void 0,ref:e},E,x,w&&u.props,{ownerState:O,children:[w?u.props.children:u,C?Object(f.jsx)("title",{children:C}):null]}))}));v.muiName="SvgIcon";var b=v;function y(t,e){function n(n,o){return Object(f.jsx)(b,Object(r.a)({"data-testid":`${e}Icon`,ref:o},n,{children:t}))}return n.muiName=b.muiName,o.memo(o.forwardRef(n))}},function(t,e,n){"use strict";var r=n(0),o=n(108);let i=!0,a=!1;const s=new o.a,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(t){t.metaKey||t.altKey||t.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function h(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch(t){}return i||function(t){const{type:e,tagName:n}=t;return!("INPUT"!==n||!l[e]||t.readOnly)||"TEXTAREA"===n&&!t.readOnly||!!t.isContentEditable}(e)}e.a=function(){const t=r.useCallback((t=>{var e;null!=t&&((e=t.ownerDocument).addEventListener("keydown",c,!0),e.addEventListener("mousedown",u,!0),e.addEventListener("pointerdown",u,!0),e.addEventListener("touchstart",u,!0),e.addEventListener("visibilitychange",d,!0))}),[]),e=r.useRef(!1);return{isFocusVisibleRef:e,onFocus:function(t){return!!h(t)&&(e.current=!0,!0)},onBlur:function(){return!!e.current&&(a=!0,s.start(100,(()=>{a=!1})),e.current=!1,!0)},ref:t}}},function(t,e,n){"use strict";e.a=function(t,e=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{t.apply(this,r)}),e)}return r.clear=()=>{clearTimeout(n)},r}},function(t,e,n){"use strict";var r=n(0);e.a=function(t,e){var n,o;return r.isValidElement(t)&&-1!==e.indexOf(null!=(n=t.type.muiName)?n:null==(o=t.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{constructor(){this.container=void 0,this.containerId=void 0}static mapValues(t,e,n){Object.keys(t).forEach((r=>{(null==n?void 0:n.includes(r))||(e[r]=t[r])}))}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])?r.mapValuesDeep(t[o],e[o]):e[o]=t[o]}))}static _fromJson(t,e){return this.mapValuesDeep(e,t),t}}},function(t,e,n){"use strict";var r=n(132),o=n(73);const i=Object(r.a)();e.a=function(t=i){return Object(o.a)(t)}},function(t,e,n){"use strict";var r=n(0),o=n(29);e.a=function(t=null){const e=r.useContext(o.a);return e&&(n=e,0!==Object.keys(n).length)?e:t;var n}},function(t,e,n){"use strict";var r,o=function(){return"undefined"==typeof r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=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={},r=[],o=0;o<t.length;o++){var i=t[o],l=e.base?i[0]+e.base:i[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=s(u),h={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(a[d].references++,a[d].updater(h)):a.push({identifier:u,updater:g(h,e),references:1}),r.push(u)}return r}function c(t){var e=document.createElement("style"),r=t.attributes||{};if("undefined"==typeof r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var a=i(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,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=d(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function p(t,e,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var f=null,m=0;function g(t,e){var n,r,o;if(e.singleton){var i=m++;n=f||(f=c(e)),r=h.bind(null,n,i,!1),o=h.bind(null,n,i,!0)}else n=c(e),r=p.bind(null,n,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<n.length;r++){var o=s(n[r]);a[o].references--}for(var i=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=i}}}},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,r){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);r&&o[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";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},function(t,e,n){"use strict";var r="6.0.0-dev.4";class o{}o.VERSION=r,o.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@6.0.0-dev.4/bundle/",o.DEFAULT_WASM_FOLDER="bin/complete/",o.BUILD_WITH_UI=!0;var i=n(63);class a{constructor(t,e){this.errorInWorker=null,this.createProxy=t=>new Proxy({},{get:(e,n,r)=>(...e)=>this.post(n,e,t)}),this.handleUnrecoverableError=t=>{this.errorInWorker=t;for(const e in this.continuations)this.continuations[e].reject(t),delete this.continuations[e]},this.copyArgs=this.createProxy("copy"),this.transferArgs=this.createProxy("transfer");const{requestSuffix:n=""}=e||{},r=Object(i.c)(e),o=`${t}${t.endsWith("/")?"":"/"}ScanbotSDK.Core${r}.js${n}`;if(Object(i.d)(o)){const t=new Blob([`importScripts("${o}")`]);this.instance=new Worker(URL.createObjectURL(t))}else this.instance=new Worker(o);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:r,result:o,recoverableError:i,unrecoverableError:a}=t.data,s=this.continuations[r];if(!s)return;const{resolve:l,reject:c}=s;delete this.continuations[r],a?(c(a),this.handleUnrecoverableError(a)):i?c(i):l(o)},this.instance.onerror=t=>{this.handleUnrecoverableError(t.error)}}post(t,e,n){return this.errorInWorker?Promise.reject(this.errorInWorker):new Promise(((r,o)=>{const a=Object(i.b)(e,"copy"==n),s=this.nextTicketId++;this.continuations[s]={resolve:r,reject:o},this.instance.postMessage({command:t,args:e,ticket:s},a)}))}destroy(){this.instance.terminate()}}var s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class l extends Error{}class c extends Error{}class u{constructor(t,e,n){this.copyArgs=this.createProxy("copy"),this.transferArgs=this.createProxy("transfer"),t||(t=o.CDN_PATH+o.DEFAULT_WASM_FOLDER),this.core=new a(t,e),this.coreInitializationSuccessful=(()=>s(this,void 0,void 0,(function*(){if(yield this.core.copyArgs.initialize(...n)){let e;try{e=yield this.core.copyArgs.version()}catch(t){e="Error"}const n=o.VERSION;return e!==n?new c(`Version mismatch! \nVersion of ScanbotSDK.(ui2.)min.js is "${n}" \nbut the version of the loaded ScanbotSDK.Core*.js file is "${e}". \nThe ScanbotSDK.Core*.js file was loaded from ${t}.`):"OK"}return new l("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.")})))()}awaitInitialized(){return s(this,void 0,void 0,(function*(){yield this.getCoreForCommand()}))}createProxy(t){return new Proxy({},{get:(e,n,r)=>(...e)=>s(this,void 0,void 0,(function*(){const r=yield this.getCoreForCommand(n),o="copy"===t?r.copyArgs:r.transferArgs;return yield o[n](...e)}))})}getCoreForCommand(t=""){return s(this,void 0,void 0,(function*(){const e=yield this.coreInitializationSuccessful;if("OK"===e||"getLicenseInfo"===t&&e instanceof l)return this.core;throw e}))}destroy(){this.core.destroy(),this.core=void 0}}class d{isValid(){return"Okay"===this.status||"Trial"===this.status}static fromJson(t){const e=new d;return e.status=t.licenseStatus,e.description=t.description,e}}var h=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class p{constructor(t,e){this._sdk=t,this._pdfOperation=e}addPage(t,e="COPY_IMAGE"){return h(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);yield n.addPageToPdf(this._pdfOperation,t)}))}complete(){return h(this,void 0,void 0,(function*(){return yield this._sdk.bridge.copyArgs.completePdf(this._pdfOperation)}))}}var f=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class m{constructor(t,e){this._sdk=t,this._tiffOperation=e}addPage(t,e={}){return f(this,void 0,void 0,(function*(){const{binarize:n="ENABLED_IF_BINARIZATION_FILTER_SET",consumeImage:r="COPY_IMAGE"}=e,o=this._sdk.getBridge(r);yield o.addPageToTiff(this._tiffOperation,t,n)}))}complete(){return f(this,void 0,void 0,(function*(){return yield this._sdk.bridge.copyArgs.completeTiff(this._tiffOperation)}))}}var g=n(41);class v{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){if(t&&t.hasOwnProperty(e))return t[e]}static uuid(){let t="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length;for(let r=0;r<5;r++)t+=e.charAt(Math.floor(Math.random()*n));return t}}var b=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class y{static toDataUrl(t){return new Promise(((e,n)=>{const r=new Blob([t],{type:"image/jpeg"}),o=new FileReader;o.onload=()=>e(o.result),o.onerror=()=>n(o.error),o.readAsDataURL(r)}))}static getObjectFitSize(t,e,n=!0){const r=e.width/e.height,o=t.width/t.height;let i=0,a=0;(n?r>o:r<o)?(i=t.width,a=i/r):(a=t.height,i=a*r);const s=(t.width-i)/2,l=(t.height-a)/2;return new g.a(s,l,i,a)}static loadFromUrl(t){return new Promise(((e,n)=>{const r=document.createElement("img");r.src=t,r.onload=()=>b(this,void 0,void 0,(function*(){const t=document.createElement("canvas");t.width=r.width,t.height=r.height;const n=t.getContext("2d");n.drawImage(r,0,0);const o=n.getImageData(0,0,r.width,r.height);e(o)})),r.onerror=n}))}static saveImageData(t){const e=this.createImageDataCanvas(t),n=" ("+t.width+"x"+t.height+")";e.toBlob((t=>this.saveBlob(t,v.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 r=URL.createObjectURL(t);n.setAttribute("href",r),n.click()}static convertImageDataWrapperToImageData(t){if(t)return new ImageData(t.data,t.width,t.height)}static wrapperToBase64(t){return y.createImageDataCanvas(y.convertImageDataWrapperToImageData(t)).toDataURL("image/png")}static toBase64(t){return b(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 A{saveImageAsJpeg(t,e){if(!t||0===t.length)return void console.log("Data cannot be null or empty");e||(e=v.uuid()+".jpeg");let n=new Blob([t],{type:"image/jpeg"});y.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]}}var C=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class S{constructor(t,e){this._sdk=t,this._mrzRecognizerToken=e}recognize(t,e="COPY_IMAGE"){return C(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.recognizeMRZ(yield this._mrzRecognizerToken,t)}))}recognizeURL(t){return C(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),r=document.createElement("img");r.src=t,r.onload=()=>C(this,void 0,void 0,(function*(){n.width=r.width,n.height=r.height;const t=n.getContext("2d");t.drawImage(r,0,0);const o=t.getImageData(0,0,r.width,r.height),i=yield this.recognize(o);e(i||void 0)}))}))}))}release(){return C(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(yield this._mrzRecognizerToken)}))}}var x=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class w{constructor(t,e){this._sdk=t,this._OcrEngineToken=e}performOcr(t,e="COPY_IMAGE"){return x(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.performOcr(this._OcrEngineToken,t)}))}recognizeURL(t){return x(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),r=document.createElement("img");r.src=t,r.onload=()=>x(this,void 0,void 0,(function*(){n.width=r.width,n.height=r.height;const t=n.getContext("2d");t.drawImage(r,0,0);const o=t.getImageData(0,0,r.width,r.height),i=yield this.performOcr(o);e(i)}))}))}))}release(){return x(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._OcrEngineToken)}))}}var O=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class E{constructor(t,e){this._sdk=t,this._textDataScannerToken=e}recognize(t,e="COPY_IMAGE"){return O(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.recognizeTextLine(yield this._textDataScannerToken,t)}))}cleanRecognitionQueue(){return O(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.cleanTextLineRecognitionQueue(yield this._textDataScannerToken)}))}recognizeURL(t){return O(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),r=document.createElement("img");r.src=t,r.onload=()=>O(this,void 0,void 0,(function*(){n.width=r.width,n.height=r.height;const t=n.getContext("2d");t.drawImage(r,0,0);const o=t.getImageData(0,0,r.width,r.height),i=yield this.recognize(o,"CONSUME_IMAGE");i&&e(i)}))}))}))}release(){return O(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(yield this._textDataScannerToken)}))}}var L=n(32),j=n(43),k=n(19);class _ extends j.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_HD),this.ocrConfiguration=new k.GenericTextLineScannerTypes.ScannerConfiguration,this.onTextDetected=function(t){},this.finder.aspectRatio=new k.Geometry.AspectRatio({width:6,height:1}),this.userGuidance.title.text="Please hold the device over the text to start scanning"}static fromJson(t){const e=new _;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class T extends j.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_HD),this.ocrConfiguration=new k.GenericTextLineScannerTypes.ScannerConfiguration,this.onTextDetected=function(t){},this.finder.aspectRatio=new k.Geometry.AspectRatio({width:6,height:1}),this.userGuidance.title.text="Please hold the device over the vehicle identification number to start scanning"}static fromJson(t){const e=new T;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class P extends Error{constructor(t){super(t.description),this.name="LicenseError"}}class R{static throwIfMissingBuffer(t){R.throwIfMissing(t,"ImageBuffer may not be null")}static throwIfMissing(t,e){if(!t)throw new Error(e)}}var D=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class B{constructor(t,e){this._sdk=t,this._token=e}analyze(t,e="COPY_IMAGE"){return D(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const n=this._sdk.getBridge(e);return yield n.documentQualityAnalyzerAnalyze(this._token,t)}))}release(){return D(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._token)}))}}var F=n(34),I=n(0),M=n(94),W=n(30),z=n(2),N=n(7);var V=I.createContext(null);function U(){return I.useContext(V)}var H="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",$=n(4);var G=function(t){const{children:e,theme:n}=t,r=U(),o=I.useMemo((()=>{const t=null===r?n:function(t,e){if("function"==typeof e)return e(t);return Object(z.a)({},t,e)}(r,n);return null!=t&&(t[H]=null!==r),t}),[n,r]);return Object($.jsx)(V.Provider,{value:o,children:e})},Y=n(29),Q=n(73);const Z={};function X(t,e,n,r=!1){return I.useMemo((()=>{const o=t&&e[t]||e;if("function"==typeof n){const i=n(o),a=t?Object(z.a)({},e,{[t]:i}):i;return r?()=>a:a}return t?Object(z.a)({},e,{[t]:n}):Object(z.a)({},e,n)}),[t,e,n,r])}var q=function(t){const{children:e,theme:n,themeId:r}=t,o=Object(Q.a)(Z),i=U()||Z,a=X(r,o,n),s=X(r,i,n,!0);return Object($.jsx)(G,{theme:s,children:Object($.jsx)(Y.a.Provider,{value:a,children:e})})},K=n(40);const J=["theme"];function tt(t){let{theme:e}=t,n=Object(N.a)(t,J);const r=e[K.a];return Object($.jsx)(q,Object(z.a)({},n,{themeId:r?K.a:void 0,theme:r||e}))}var et=n(10),nt=n(55),rt=n(96),ot=n(110),it=n(62);const at=["sx"];function st(t){const{sx:e}=t,n=Object(N.a)(t,at),{systemProps:r,otherProps:o}=(t=>{var e,n;const r={systemProps:{},otherProps:{}},o=null!=(e=null==t||null==(n=t.theme)?void 0:n.unstable_sxConfig)?e:it.a;return Object.keys(t).forEach((e=>{o[e]?r.systemProps[e]=t[e]:r.otherProps[e]=t[e]})),r})(n);let i;return i=Array.isArray(e)?[r,...e]:"function"==typeof e?(...t)=>{const n=e(...t);return Object(ot.b)(n)?Object(z.a)({},r,n):r}:Object(z.a)({},r,e),Object(z.a)({},o,{sx:i})}var lt=n(72);const ct=["className","component"];var ut=n(125),dt=n(107),ht=n(158);var pt=Object(ht.a)("MuiBox",["root"]);const ft=Object(dt.a)();var mt=function(t={}){const{themeId:e,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=t,i=Object(nt.a)("div",{shouldForwardProp:t=>"theme"!==t&&"sx"!==t&&"as"!==t})(rt.a);return I.forwardRef((function(t,a){const s=Object(lt.a)(n),l=st(t),{className:c,component:u="div"}=l,d=Object(N.a)(l,ct);return Object($.jsx)(i,Object(z.a)({as:u,ref:a,className:Object(et.a)(c,o?o(r):r),theme:e&&s[e]||s},d))}))}({themeId:K.a,defaultTheme:ft,defaultClassName:pt.root,generateClassName:ut.a.generate}),gt=n(6),vt=n(159),bt=n(11),yt=n(16),At=n(9),Ct=n(162);var St=t=>{let e;return e=t<1?5.11916*t**2:4.5*Math.log(t+1)+2,(e/100).toFixed(2)},xt=n(124);function wt(t){return Object(xt.a)("MuiPaper",t)}Object(ht.a)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Ot=["className","component","elevation","square","variant"],Et=Object(bt.a)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,"elevation"===n.variant&&e[`elevation${n.elevation}`]]}})((({theme:t,ownerState:e})=>{var n;return Object(z.a)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},"outlined"===e.variant&&{border:`1px solid ${(t.vars||t).palette.divider}`},"elevation"===e.variant&&Object(z.a)({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:`linear-gradient(${Object(Ct.a)("#fff",St(e.elevation))}, ${Object(Ct.a)("#fff",St(e.elevation))})`},t.vars&&{backgroundImage:null==(n=t.vars.overlays)?void 0:n[e.elevation]}))}));var Lt=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:s="elevation"}=n,l=Object(N.a)(n,Ot),c=Object(z.a)({},n,{component:o,elevation:i,square:a,variant:s}),u=(t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded","elevation"===r&&`elevation${n}`]};return Object(vt.a)(i,wt,o)})(c);return Object($.jsx)(Et,Object(z.a)({as:o,ownerState:c,className:Object(et.a)(u.root,r),ref:e},l))}));function jt(t){return Object(xt.a)("MuiAppBar",t)}Object(ht.a)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const kt=["className","color","enableColorOnDark","position"],_t=(t,e)=>t?`${null==t?void 0:t.replace(")","")}, ${e})`:e,Tt=Object(bt.a)(Lt,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${Object(At.a)(n.position)}`],e[`color${Object(At.a)(n.color)}`]]}})((({theme:t,ownerState:e})=>{const n="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return Object(z.a)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===e.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===e.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===e.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===e.position&&{position:"static"},"relative"===e.position&&{position:"relative"},!t.vars&&Object(z.a)({},"default"===e.color&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&"default"!==e.color&&"inherit"!==e.color&&"transparent"!==e.color&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},"inherit"===e.color&&{color:"inherit"},"dark"===t.palette.mode&&!e.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===e.color&&Object(z.a)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&Object(z.a)({},"default"===e.color&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:_t(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:_t(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:_t(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:_t(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===e.color?"inherit":"var(--AppBar-color)"},"transparent"===e.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}));var Pt=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiAppBar"}),{className:r,color:o="primary",enableColorOnDark:i=!1,position:a="fixed"}=n,s=Object(N.a)(n,kt),l=Object(z.a)({},n,{color:o,position:a,enableColorOnDark:i}),c=(t=>{const{color:e,position:n,classes:r}=t,o={root:["root",`color${Object(At.a)(e)}`,`position${Object(At.a)(n)}`]};return Object(vt.a)(o,jt,r)})(l);return Object($.jsx)(Tt,Object(z.a)({square:!0,component:"header",ownerState:l,elevation:4,className:Object(et.a)(c.root,r,"fixed"===a&&"mui-fixed"),ref:e},s))}));function Rt(t){return Object(xt.a)("MuiToolbar",t)}Object(ht.a)("MuiToolbar",["root","gutters","regular","dense"]);const Dt=["className","component","disableGutters","variant"],Bt=Object(bt.a)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})((({theme:t,ownerState:e})=>Object(z.a)({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===e.variant&&{minHeight:48})),(({theme:t,ownerState:e})=>"regular"===e.variant&&t.mixins.toolbar));var Ft=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiToolbar"}),{className:r,component:o="div",disableGutters:i=!1,variant:a="regular"}=n,s=Object(N.a)(n,Dt),l=Object(z.a)({},n,{component:o,disableGutters:i,variant:a}),c=(t=>{const{classes:e,disableGutters:n,variant:r}=t,o={root:["root",!n&&"gutters",r]};return Object(vt.a)(o,Rt,e)})(l);return Object($.jsx)(Bt,Object(z.a)({as:o,className:Object(et.a)(c.root,r),ref:e,ownerState:l},s))}));function It(t){return Object(xt.a)("MuiTypography",t)}Object(ht.a)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Mt=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Wt=Object(bt.a)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],"inherit"!==n.align&&e[`align${Object(At.a)(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})((({theme:t,ownerState:e})=>Object(z.a)({margin:0},"inherit"===e.variant&&{font:"inherit"},"inherit"!==e.variant&&t.typography[e.variant],"inherit"!==e.align&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16}))),zt={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Nt={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var Vt=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiTypography"}),r=(t=>Nt[t]||t)(n.color),o=st(Object(z.a)({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:h=zt}=o,p=Object(N.a)(o,Mt),f=Object(z.a)({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:h}),m=s||(u?"p":h[d]||zt[d])||"span",g=(t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=t,s={root:["root",i,"inherit"!==t.align&&`align${Object(At.a)(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Object(vt.a)(s,It,a)})(f);return Object($.jsx)(Wt,Object(z.a)({as:m,ref:e,ownerState:f,className:Object(et.a)(g.root,a)},p))})),Ut=n(100),Ht=n.n(Ut);const $t="var(--1-sb-dvh, 1vh)";function Gt(){const t=Object(I.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(I.useEffect)((()=>{if(e(),!t)return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}})),null}var Yt=n(54),Qt=n(24),Zt=n(127),Xt=n(36),qt=n(42),Kt=n(68);function Jt(t,e){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jt(t,e)}function te(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jt(t,e)}var ee=I.default.createContext(null);function ne(t,e){var n=Object.create(null);return t&&I.Children.map(t,(function(t){return t})).forEach((function(t){n[t.key]=function(t){return e&&Object(I.isValidElement)(t)?e(t):t}(t)})),n}function re(t,e,n){return null!=n[e]?n[e]:t.props[e]}function oe(t,e,n){var r=ne(t.children),o=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var r,o=Object.create(null),i=[];for(var a in t)a in e?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in e){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(e,r);return Object.keys(o).forEach((function(i){var a=o[i];if(Object(I.isValidElement)(a)){var s=i in e,l=i in r,c=e[i],u=Object(I.isValidElement)(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&Object(I.isValidElement)(c)&&(o[i]=Object(I.cloneElement)(a,{onExited:n.bind(null,a),in:c.props.in,exit:re(a,"exit",t),enter:re(a,"enter",t)})):o[i]=Object(I.cloneElement)(a,{in:!1}):o[i]=Object(I.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:re(a,"exit",t),enter:re(a,"enter",t)})}})),o}var ie=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))},ae=function(t){function e(e,n){var r,o=(r=t.call(this,e,n)||this).handleExited.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}te(e,t);var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(t,e){var n,r,o=e.children,i=e.handleExited;return{children:e.firstRender?(n=t,r=i,ne(n.children,(function(t){return Object(I.cloneElement)(t,{onExited:r.bind(null,t),in:!0,appear:re(t,"appear",n),enter:re(t,"enter",n),exit:re(t,"exit",n)})}))):oe(t,o,i),firstRender:!1}},n.handleExited=function(t,e){var n=ne(this.props.children);t.key in n||(t.props.onExited&&t.props.onExited(e),this.mounted&&this.setState((function(e){var n=Object(z.a)({},e.children);return delete n[t.key],{children:n}})))},n.render=function(){var t=this.props,e=t.component,n=t.childFactory,r=Object(N.a)(t,["component","childFactory"]),o=this.state.contextValue,i=ie(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===e?I.default.createElement(ee.Provider,{value:o},i):I.default.createElement(ee.Provider,{value:o},I.default.createElement(e,r,i))},e}(I.default.Component);ae.propTypes={},ae.defaultProps={component:"div",childFactory:function(t){return t}};var se=ae,le=n(108);var ce=function(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=t,[u,d]=I.useState(!1),h=Object(et.a)(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+i,left:-a/2+o},f=Object(et.a)(n.child,u&&n.childLeaving,r&&n.childPulsate);return s||u||d(!0),I.useEffect((()=>{if(!s&&null!=l){const t=setTimeout(l,c);return()=>{clearTimeout(t)}}}),[l,s,c]),Object($.jsx)("span",{className:h,style:p,children:Object($.jsx)("span",{className:f})})};var ue=Object(ht.a)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const de=["center","classes","className"];let he,pe,fe,me,ge=t=>t;const ve=Object(Y.d)(he||(he=ge`
31
+ `;var a=t=>r.default.createElement(i,{viewBox:"0 0 50 50"},r.default.createElement("circle",{className:"path",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"3",stroke:t.color||"black"})),s=n(46),l=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class c{}class u{constructor(){this.videoReady=!1,this.sdkReady=!1}}class d extends r.default.Component{constructor(t){super(t),this.onVideoReady=()=>{this.setState({videoReady:!0},(()=>{const{onSuccess:t}=this.props;t&&t(this)}))},this.onVideoError=t=>{if(!0===this.state.videoReady){const{onError:e}=this.props.configuration;e?e(t):console.error(t)}else{const{onFailure:e}=this.props;e&&e(t),this.dispose()}},this.state=new u,this.bridge.awaitInitialized().then((()=>{this.setState({sdkReady:!0})}))}get bridge(){return o.a.instance.bridge}dispose(){const{container:t}=this.props;t&&Object(r.render)(null,t)}componentDidMount(){this.disposed=!1}componentWillUnmount(){this.disposed=!0}isSupported(){return"localhost"===location.hostname||"https:"===location.protocol}swapCameraFacing(t){this.camera.swapCameraFacing(t)}switchCamera(t,e){return l(this,void 0,void 0,(function*(){this.camera.switchCamera(t,e)}))}getActiveCameraInfo(){return this.camera.getActiveCameraInfo()}fetchAvailableCameras(){return s.a.INSTANCE.load()}renderSpinner(t){return this.state.videoReady&&this.state.sdkReady?null:r.default.createElement("div",{"data-sb-spinner":"1",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:500}},r.default.createElement(a,{color:t}))}setTorchState(t){return this.camera.setTorchState(t)}}d.DEFAULT_DETECTION_RESOLUTION=600,d.DETECTION_RESULTION_4K=3840},,,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Mt})),n.d(e,"b",(function(){return Ut})),n.d(e,"c",(function(){return Gt})),n.d(e,"d",(function(){return Yt}));var r=n(3),o=(n(109),n(0)),i=n(97),a=n.n(i),s=n(52),l=n(98),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 b(t,e,n){return void 0===n&&(n=v),t.theme!==n.theme&&t.theme||e||n.theme}var y=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"]),A=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,C=/(^-|-$)/g;function S(t){return t.replace(A,"-").replace(C,"")}var x=/(a)(d)/gi,w=function(t){return String.fromCharCode(t+(t>25?39:97))};function O(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=w(e%52)+n;return(w(e%52)+n).replace(x,"$1-$2")}var E,L=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},j=function(t){return L(5381,t)};function k(t){return O(j(t)>>>0)}function _(t){return t.displayName||t.name||"Component"}function T(t){return"string"==typeof t&&!0}var P="function"==typeof Symbol&&Symbol.for,R=P?Symbol.for("react.memo"):60115,D=P?Symbol.for("react.forward_ref"):60112,B={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},F={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},I={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},M=((E={})[D]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E[R]=I,E);function W(t){return("type"in(e=t)&&e.type.$$typeof)===R?I:"$$typeof"in t?M[t.$$typeof]:B;var e}var z=Object.defineProperty,N=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,U=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,$=Object.prototype;function G(t,e,n){if("string"!=typeof e){if($){var r=H(e);r&&r!==$&&G(t,r,n)}var o=N(e);V&&(o=o.concat(V(e)));for(var i=W(t),a=W(e),s=0;s<o.length;++s){var l=o[s];if(!(l in F||n&&n[l]||a&&l in a||i&&l in i)){var c=U(e,l);try{z(t,l,c)}catch(t){}}}}return t}function Y(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 X(t,e){if(0===t.length)return"";for(var n=t[0],r=1;r<t.length;r++)n+=e?e+t[r]:t[r];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 r=0;r<e.length;r++)t[r]=K(t[r],e[r]);else if(q(e))for(var r in e)t[r]=K(t[r],e[r]);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,r=n.length,o=r;t>=o;)if((o<<=1)<0)throw tt(16,"".concat(t));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(t+1),s=(i=0,e.length);i<s;i++)this.tag.insertRule(a,e[i])&&(this.groupSizes[t]++,a++)},t.prototype.clearGroup=function(t){if(t<this.length){var e=this.groupSizes[t],n=this.indexOfGroup(t),r=n+e;this.groupSizes[t]=0;for(var o=n;o<r;o++)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],r=this.indexOfGroup(t),o=r+n,i=r;i<o;i++)e+="".concat(this.tag.getRule(i)).concat(p);return e},t}(),nt=new Map,rt=new Map,ot=1,it=function(t){if(nt.has(t))return nt.get(t);for(;rt.has(ot);)ot++;var e=ot++;return nt.set(t,e),rt.set(e,t),e},at=function(t,e){ot=e+1,nt.set(t,e),rt.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 r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&t.registerName(e,r)},ut=function(t,e){for(var n,r=(null!==(n=e.textContent)&&void 0!==n?n:"").split(p),o=[],i=0,a=r.length;i<a;i++){var s=r[i].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,o)),o.length=0}else o.push(s)}}};function dt(){return n.nc}var ht=function(t){var e=document.head,n=t||e,r=document.createElement("style"),o=function(t){var e=Array.from(t.querySelectorAll("style[".concat(c,"]")));return e[e.length-1]}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(c,u),r.setAttribute(d,h);var a=dt();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},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,r=e.length;n<r;n++){var o=e[n];if(o.ownerNode===t)return o}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},bt=function(){function t(t,e,n){void 0===t&&(t=v),void 0===e&&(e={});var o=this;this.options=Object(r.a)(Object(r.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,r=e.length;n<r;n++){var o=e[n];o&&o.getAttribute(c)!==u&&(ut(t,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),J(this,(function(){return function(t){for(var e=t.getTag(),n=e.length,r="",o=function(n){var o=function(t){return rt.get(t)}(n);if(void 0===o)return"continue";var i=t.names.get(o),a=e.getGroup(n);if(void 0===i||0===a.length)return"continue";var s="".concat(c,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==i&&i.forEach((function(t){t.length>0&&(l+="".concat(t,","))})),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(p)},i=0;i<n;i++)o(i);return r}(o)}))}return t.registerId=function(t){return it(t)},t.prototype.reconstructWithOptions=function(e,n){return void 0===n&&(n=!0),new t(Object(r.a)(Object(r.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(it(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(it(t),n)},t.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},t.prototype.clearRules=function(t){this.getTag().clearGroup(it(t)),this.clearNames(t)},t.prototype.clearTag=function(){this.tag=void 0},t}(),yt=/&/g,At=/^\s*\/\/.*$/gm;function Ct(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=Ct(t.children,e)),t}))}function St(t){var e,n,r,o=void 0===t?v:t,i=o.options,a=void 0===i?v:i,l=o.plugins,c=void 0===l?g:l,u=function(t,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.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(yt,n).replace(r,u))})),a.prefix&&d.push(s.d),d.push(s.g);var h=function(t,o,i,l){void 0===o&&(o=""),void 0===i&&(i=""),void 0===l&&(l="&"),e=l,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=t.replace(At,""),u=s.b(i||o?"".concat(i," ").concat(o," { ").concat(c," }"):c);a.namespace&&(u=Ct(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),L(t,e.name)}),5381).toString():"",h}var xt=new bt,wt=St(),Ot=o.default.createContext({shouldForwardProp:void 0,styleSheet:xt,stylis:wt}),Et=(Ot.Consumer,o.default.createContext(void 0));function Lt(){return Object(o.useContext)(Ot)}function jt(t){var e=Object(o.useState)(t.stylisPlugins),n=e[0],r=e[1],i=Lt().styleSheet,s=Object(o.useMemo)((function(){var e=i;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,i]),l=Object(o.useMemo)((function(){return St({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:n})}),[t.enableVendorPrefixes,t.namespace,n]);Object(o.useEffect)((function(){a()(n,t.stylisPlugins)||r(t.stylisPlugins)}),[t.stylisPlugins]);var c=Object(o.useMemo)((function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:s,stylis:l}}),[t.shouldForwardProp,s,l]);return o.default.createElement(Ot.Provider,{value:c},o.default.createElement(Et.Provider,{value:l},t.children))}var kt=function(){function t(t,e){var n=this;this.inject=function(t,e){void 0===e&&(e=wt);var r=n.name+e.hash;t.hasNameForId(n.id,r)||t.insertRules(n.id,r,e(n.rules,r,"@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=wt),this.name+t.hash},t}(),_t=function(t){return t>="A"&&t<="Z"};function Tt(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(1===n&&"-"===r&&"-"===t[0])return t;_t(r)?e+="-"+r.toLowerCase():e+=r}return e.startsWith("ms-")?"-"+e:e}var Pt=function(t){return null==t||!1===t||""===t},Rt=function(t){var e,n,o=[];for(var i in t){var a=t[i];t.hasOwnProperty(i)&&!Pt(a)&&(Array.isArray(a)&&a.isCss||Y(a)?o.push("".concat(Tt(i),":"),a,";"):q(a)?o.push.apply(o,Object(r.e)(Object(r.e)(["".concat(i," {")],Rt(a),!1),["}"],!1)):o.push("".concat(Tt(i),": ").concat((e=i,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 o};function Dt(t,e,n,r){return Pt(t)?[]:Q(t)?[".".concat(t.styledComponentId)]:Y(t)?!Y(o=t)||o.prototype&&o.prototype.isReactComponent||!e?[t]:Dt(t(e),e,n,r):t instanceof kt?n?(t.inject(n,r),[t.getName(r)]):[t]:q(t)?Rt(t):Array.isArray(t)?Array.prototype.concat.apply(g,t.map((function(t){return Dt(t,e,n,r)}))):[t.toString()];var o}function Bt(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(Y(n)&&!Q(n))return!1}return!0}var Ft=j(h),It=function(){function t(t,e,n){this.rules=t,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Bt(t),this.componentId=e,this.baseHash=L(Ft,e),this.baseStyle=n,bt.registerId(e)}return t.prototype.generateAndInjectStyles=function(t,e,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,e,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&e.hasNameForId(this.componentId,this.staticRulesId))r=Z(r,this.staticRulesId);else{var o=X(Dt(this.rules,t,e,n)),i=O(L(this.baseHash,o)>>>0);if(!e.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);e.insertRules(this.componentId,i,a)}r=Z(r,i),this.staticRulesId=i}else{for(var s=L(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=X(Dt(u,t,e,n));s=L(s,d+c),l+=d}}if(l){var h=O(s>>>0);e.hasNameForId(this.componentId,h)||e.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),r=Z(r,h)}}return r},t}(),Mt=o.default.createContext(void 0);Mt.Consumer;var Wt={};new Set;function zt(t,e,n){var i=Q(t),a=t,s=!T(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":S(t);Wt[n]=(Wt[n]||0)+1;var r="".concat(n,"-").concat(k(h+n+Wt[n]));return e?"".concat(e,"-").concat(r):r}(e.displayName,e.parentComponentId):u,p=e.displayName,f=void 0===p?function(t){return T(t)?"styled.".concat(t):"Styled(".concat(_(t),")")}(t):p,m=e.displayName&&e.componentId?"".concat(S(e.displayName),"-").concat(e.componentId):e.componentId||d,A=i&&a.attrs?a.attrs.concat(c).filter(Boolean):c,C=e.shouldForwardProp;if(i&&a.shouldForwardProp){var x=a.shouldForwardProp;if(e.shouldForwardProp){var w=e.shouldForwardProp;C=function(t,e){return x(t,e)&&w(t,e)}}else C=x}var O=new It(n,m,i?a.componentStyle:void 0);function E(t,e){return function(t,e,n){var i=t.attrs,a=t.componentStyle,s=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,u=t.target,d=o.default.useContext(Mt),h=Lt(),p=t.shouldForwardProp||h.shouldForwardProp,f=b(e,d,s)||v,m=function(t,e,n){for(var o,i=Object(r.a)(Object(r.a)({},e),{className:void 0,theme:n}),a=0;a<t.length;a+=1){var s=Y(o=t[a])?o(i):o;for(var l in s)i[l]="className"===l?Z(i[l],s[l]):"style"===l?Object(r.a)(Object(r.a)({},i[l]),s[l]):s[l]}return e.className&&(i.className=Z(i.className,e.className)),i}(i,e,f),g=m.as||u,A={};for(var C in m)void 0===m[C]||"$"===C[0]||"as"===C||"theme"===C&&m.theme===f||("forwardedAs"===C?A.as=m.forwardedAs:p&&!p(C,g)||(A[C]=m[C]));var S=function(t,e){var n=Lt();return t.generateAndInjectStyles(e,n.styleSheet,n.stylis)}(a,m),x=Z(l,c);return S&&(x+=" "+S),m.className&&(x+=" "+m.className),A[T(g)&&!y.has(g)?"class":"className"]=x,A.ref=n,Object(o.createElement)(g,A)}(L,t,e)}E.displayName=f;var L=o.default.forwardRef(E);return L.attrs=A,L.componentStyle=O,L.displayName=f,L.shouldForwardProp=C,L.foldedComponentIds=i?Z(a.foldedComponentIds,a.styledComponentId):"",L.styledComponentId=m,L.target=i?a.target:t,Object.defineProperty(L,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=i?function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++)K(t,o[r],!0);return t}({},a.defaultProps,t):t}}),J(L,(function(){return".".concat(L.styledComponentId)})),s&&G(L,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),L}function Nt(t,e){for(var n=[t[0]],r=0,o=e.length;r<o;r+=1)n.push(e[r],t[r+1]);return n}var Vt=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(Y(t)||q(t))return Vt(Dt(Nt(g,Object(r.e)([t],e,!0))));var o=t;return 0===e.length&&1===o.length&&"string"==typeof o[0]?Dt(o):Vt(Dt(Nt(o,e)))}function Ht(t,e,n){if(void 0===n&&(n=v),!e)throw tt(1,e);var o=function(o){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return t(e,n,Ut.apply(void 0,Object(r.e)([o],i,!1)))};return o.attrs=function(o){return Ht(t,e,Object(r.a)(Object(r.a)({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ht(t,e,Object(r.a)(Object(r.a)({},n),o))},o}var $t=function(t){return Ht(zt,t)},Gt=$t;y.forEach((function(t){Gt[t]=$t(t)}));!function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=Bt(t),bt.registerId(this.componentId+1)}t.prototype.createStyles=function(t,e,n,r){var o=r(X(Dt(this.rules,e,n,r)),""),i=this.componentId+t;n.insertRules(i,i,o)},t.prototype.removeStyles=function(t,e){e.clearRules(this.componentId+t)},t.prototype.renderStyles=function(t,e,n,r){t>2&&bt.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,e,n,r)}}();function Yt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=X(Ut.apply(void 0,Object(r.e)([t],e,!1))),i=k(o);return new kt(i,o)}(function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=dt(),r=X([n&&'nonce="'.concat(n,'"'),"".concat(c,'="true"'),"".concat(d,'="').concat(h,'"')].filter(Boolean)," ");return"<style ".concat(r,">").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),i=dt();return i&&(n.nonce=i),[o.default.createElement("style",Object(r.a)({},n,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new bt({isServer:!0}),this.sealed=!1}t.prototype.collectStyles=function(t){if(this.sealed)throw tt(2);return o.default.createElement(jt,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(t){throw tt(3)}})(),"__sc-".concat(c,"__")}).call(this,n(92))},function(t,e,n){"use strict";n.r(e),n.d(e,"SingleScanningMode",(function(){return c})),n.d(e,"Resolution",(function(){return u})),n.d(e,"CameraConfiguration",(function(){return d})),n.d(e,"TopBarConfiguration",(function(){return p.a})),n.d(e,"ActionBarConfiguration",(function(){return f})),n.d(e,"BarcodeUseCase",(function(){return h})),n.d(e,"Palette",(function(){return o.f})),n.d(e,"StyledText",(function(){return o.j})),n.d(e,"IconStyle",(function(){return o.e})),n.d(e,"PolygonStyle",(function(){return o.g})),n.d(e,"BackgroundStyle",(function(){return o.a})),n.d(e,"ForegroundStyle",(function(){return o.d})),n.d(e,"RoundButton",(function(){return o.h})),n.d(e,"BadgedButton",(function(){return o.b})),n.d(e,"ButtonConfiguration",(function(){return o.c})),n.d(e,"Sound",(function(){return o.i})),n.d(e,"Vibration",(function(){return o.l})),n.d(e,"Timeouts",(function(){return o.k})),n.d(e,"ViewFinderConfiguration",(function(){return O})),n.d(e,"FinderStyle",(function(){return x})),n.d(e,"FinderCorneredStyle",(function(){return E})),n.d(e,"FinderStrokedStyle",(function(){return L})),n.d(e,"UserGuidanceConfiguration",(function(){return j})),n.d(e,"BarcodeItemErrorState",(function(){return a})),n.d(e,"BarcodeMappedData",(function(){return s})),n.d(e,"BarcodeInfoMapping",(function(){return l})),n.d(e,"ExpectedBarcode",(function(){return C})),n.d(e,"FindAndPickScanningMode",(function(){return S})),n.d(e,"BarcodeTextLocalization",(function(){return k})),n.d(e,"BarcodeRecognizerConfiguration",(function(){return _})),n.d(e,"ArOverlayPolygonConfiguration",(function(){return r.c})),n.d(e,"BarcodeItemConfiguration",(function(){return r.e})),n.d(e,"BadgeStyle",(function(){return r.d})),n.d(e,"ArOverlayGeneralConfiguration",(function(){return r.b})),n.d(e,"FindAndPickArOverlayPolygonConfiguration",(function(){return r.f})),n.d(e,"FindAndPickBadgeConfiguration",(function(){return r.g})),n.d(e,"ArOverlayFindAndPickConfiguration",(function(){return r.a})),n.d(e,"BarcodeScannerConfiguration",(function(){return P})),n.d(e,"BarcodeScannerUIItem",(function(){return D})),n.d(e,"BarcodeScannerUIResult",(function(){return B})),n.d(e,"OcrResult",(function(){return F.OcrResult})),n.d(e,"FieldParsedData",(function(){return F.FieldParsedData})),n.d(e,"FieldType",(function(){return F.FieldType})),n.d(e,"Field",(function(){return F.Field})),n.d(e,"GenericDocumentType",(function(){return F.GenericDocumentType})),n.d(e,"GenericDocument",(function(){return F.GenericDocument})),n.d(e,"Sheet",(function(){return m})),n.d(e,"SwipeToDelete",(function(){return g})),n.d(e,"ManualCountEditDialog",(function(){return v})),n.d(e,"SheetContent",(function(){return b})),n.d(e,"MultipleScanningMode",(function(){return y})),n.d(e,"ScanbotAlertDialog",(function(){return A})),n.d(e,"CameraPermissionScreen",(function(){return T})),n.d(e,"BarcodeItem",(function(){return R.BarcodeItem}));var r=n(18),o=n(1),i=n(13);class a extends i.a{constructor(t={}){super(),this.title=new o.j({text:"Connection Error!",color:"?sbColorOnSurface"}),this.subtitle=new o.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 o.c({}),this.cancelButton=new o.c({}),void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.subtitle&&(this.subtitle=new o.j(t.subtitle)),void 0!==t.retryButton&&(this.retryButton=new o.c(t.retryButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton))}}class s extends i.a{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 l extends i.a{constructor(t={}){super(),this.barcodeItemMapper=null,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.loadingMessage=new o.j({text:"Loading message for barcode info mapping.",color:"?sbColorPrimary"}),this.errorState=new a({}),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 o.j(t.loadingMessage)),void 0!==t.errorState&&(this.errorState=new a(t.errorState))}}class c extends i.a{constructor(t={}){super(),this._type="SingleScanningMode",this.confirmationSheetEnabled=!1,this.barcodeImageVisible=!0,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.barcodeTitle=new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.barcodeSubtitle=new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.submitButton=new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary"})}),this.cancelButton=new o.c({visible:!0,text:"?singleModeConfirmationCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary"})}),this.barcodeInfoMapping=new l({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new o.j({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new a({title:new o.j({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary"})}),cancelButton:new o.c({text:"?barcodeInfoMappingErrorStateCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary"})})})}),this.arOverlay=new r.b({visible:!1,counterBadge:new r.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new r.c({visible:!0,deselected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new r.e({imageVisible:!0,titleSelected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),backgroundSelected:new o.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new o.g({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 o.j(t.barcodeTitle)),void 0!==t.barcodeSubtitle&&(this.barcodeSubtitle=new o.j(t.barcodeSubtitle)),void 0!==t.submitButton&&(this.submitButton=new o.c(t.submitButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new l(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new r.b(t.arOverlay))}}class u extends i.a{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 d extends i.a{constructor(t={}){super(),this.cameraModule="BACK",this.zoomSteps=[1,2,5],this.defaultZoomFactor=1,this.flashEnabled=!1,this.idealPreviewResolution=new u({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 u(t.idealPreviewResolution))}}var h,p=n(54);class f extends i.a{constructor(t={}){super(),this.flashButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),this.zoomButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),this.flipCameraButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),void 0!==t.flashButton&&(this.flashButton=new o.h(t.flashButton)),void 0!==t.zoomButton&&(this.zoomButton=new o.h(t.zoomButton)),void 0!==t.flipCameraButton&&(this.flipCameraButton=new o.h(t.flipCameraButton))}}class m extends i.a{constructor(t={}){super(),this.mode="COLLAPSED_SHEET",this.collapsedVisibleHeight="SMALL",this.listButton=new o.b({}),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.collapsedVisibleHeight&&(this.collapsedVisibleHeight=t.collapsedVisibleHeight),void 0!==t.listButton&&(this.listButton=new o.b(t.listButton))}}class g extends i.a{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 v extends i.a{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.title=new o.j({text:"Update count",color:"?sbColorOnSurface"}),this.info=new o.j({text:"Adjust the number of items you scanned.",color:"?sbColorOnSurfaceVariant"}),this.updateButton=new o.c({visible:!0,text:"Update",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),this.cancelButton=new o.c({visible:!0,text:"Cancel",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),this.clearTextButton=new o.e({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 o.j(t.title)),void 0!==t.info&&(this.info=new o.j(t.info)),void 0!==t.updateButton&&(this.updateButton=new o.c(t.updateButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton)),void 0!==t.clearTextButton&&(this.clearTextButton=new o.e(t.clearTextButton))}}class b extends i.a{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.manualCountChangeEnabled=!0,this.manualCountOutlineColor="?sbColorOutline",this.manualCountChangeColor="?sbColorPrimary",this.title=new o.j({text:"%d items",color:"?sbColorOnSurface"}),this.clearAllButton=new o.c({visible:!0,text:"Clear all",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.barcodeItemTitle=new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),this.barcodeItemSubtitle=new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.barcodeItemImageVisible=!0,this.submitButton=new o.c({visible:!0,text:"Submit",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.startScanningButton=new o.c({visible:!0,text:"Start scanning",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),this.placeholderTitle=new o.j({text:"No barcodes here!",color:"?sbColorOnSurface"}),this.placeholderSubtitle=new o.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 o.e({visible:!0,color:"?sbColorOnSurface"}),this.swipeToDelete=new g({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 o.j(t.title)),void 0!==t.clearAllButton&&(this.clearAllButton=new o.c(t.clearAllButton)),void 0!==t.barcodeItemTitle&&(this.barcodeItemTitle=new o.j(t.barcodeItemTitle)),void 0!==t.barcodeItemSubtitle&&(this.barcodeItemSubtitle=new o.j(t.barcodeItemSubtitle)),void 0!==t.barcodeItemImageVisible&&(this.barcodeItemImageVisible=t.barcodeItemImageVisible),void 0!==t.submitButton&&(this.submitButton=new o.c(t.submitButton)),void 0!==t.startScanningButton&&(this.startScanningButton=new o.c(t.startScanningButton)),void 0!==t.placeholderTitle&&(this.placeholderTitle=new o.j(t.placeholderTitle)),void 0!==t.placeholderSubtitle&&(this.placeholderSubtitle=new o.j(t.placeholderSubtitle)),void 0!==t.placeholderIconBackground&&(this.placeholderIconBackground=t.placeholderIconBackground),void 0!==t.placeholderIcon&&(this.placeholderIcon=new o.e(t.placeholderIcon)),void 0!==t.swipeToDelete&&(this.swipeToDelete=new g(t.swipeToDelete))}}class y extends i.a{constructor(t={}){super(),this._type="MultipleScanningMode",this.countingRepeatDelay=1e3,this.mode="COUNTING",this.sheet=new m({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new o.b({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new b({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new o.j({text:"?multipleModeSheetTitle",color:"?sbColorOnSurface"}),clearAllButton:new o.c({visible:!0,text:"?sheetClearAllButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),barcodeItemSubtitle:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),barcodeItemImageVisible:!0,submitButton:new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new o.c({visible:!0,text:"?sheetStartScanningButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new o.j({visible:!0,text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface",useShadow:!1}),placeholderSubtitle:new o.j({visible:!0,text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant",useShadow:!1}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new o.e({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new g({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new v({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new o.j({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new o.j({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new o.c({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?manualCountEditDialogCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new o.e({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.barcodeInfoMapping=new l({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new o.j({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new a({title:new o.j({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})})}),this.arOverlay=new r.b({visible:!1,counterBadge:new r.d({visible:!0,background:new o.a({strokeColor:"#FF000000",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new r.c({visible:!0,deselected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new r.e({imageVisible:!0,titleSelected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),titleDeselected:new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),subtitleDeselected:new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new o.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new o.g({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 m(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new b(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new v(t.manualCountEditDialog)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new l(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new r.b(t.arOverlay))}}class A extends i.a{constructor(t={}){if(super(),this.title=new o.j({text:"Title",color:"?sbColorOnSurface"}),this.subtitle=new o.j({text:"Standard explanation message text.",color:"?sbColorOnSurfaceVariant"}),this.sheetColor="?sbColorSurface",this.modalOverlayColor="?sbColorModalOverlay",this.dividerColor="?sbColorOutline",void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.subtitle&&(this.subtitle=new o.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 o.c(t.okButton),void 0===t.cancelButton)throw new Error("cancelButton must be present in constructor argument");this.cancelButton=new o.c(t.cancelButton)}}class C extends i.a{constructor(t={}){if(super(),this.count=1,void 0===t.barcodeValue)throw new Error("barcodeValue must be present in constructor argument");this.barcodeValue=t.barcodeValue,void 0!==t.title&&(this.title=null!=t.title?t.title:null),void 0!==t.image&&(this.image=null!=t.image?t.image:null),void 0!==t.count&&(this.count=t.count)}}class S extends i.a{constructor(t={}){super(),this._type="FindAndPickScanningMode",this.scanningCompletedColor="?sbColorPositive",this.scanningPartiallyColor="?sbColorWarning",this.scanningNotScannedColor="?sbColorOutline",this.allowPartialScan=!1,this.expectedBarcodes=[],this.countingRepeatDelay=1e3,this.sheet=new m({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new o.b({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new b({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new o.j({visible:!0,text:"?findAndPickSheetTitle",color:"?sbColorOnSurface",useShadow:!1}),clearAllButton:new o.c({visible:!0,text:"?sheetResetButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),barcodeItemSubtitle:new o.j({text:"?findAndPickSheetBarcodeItemSubtitle",color:"?sbColorOnSurfaceVariant"}),barcodeItemImageVisible:!0,submitButton:new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new o.c({visible:!0,text:"?sheetStartScanningButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new o.j({text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface"}),placeholderSubtitle:new o.j({text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant"}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new o.e({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new g({enabled:!1,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new v({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new o.j({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new o.j({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new o.c({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?manualCountEditDialogCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new o.e({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.arOverlay=new r.a({visible:!1,automaticSelectionEnabled:!0,polygon:new r.f({partiallyScanned:new o.g({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),rejected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),completed:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),badge:new r.g({partiallyScanned:new r.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),rejected:new r.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorSurface",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),completed:new r.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"})})}),this.partialScannedAlertDialogEnabled=!0,this.partialScannedAlertDialog=new A({title:new o.j({text:"?findAndPickPartialAlertTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?findAndPickPartialAlertSubtitle",color:"?sbColorOnSurfaceVariant"}),sheetColor:"?sbColorSurface",modalOverlayColor:"?sbColorModalOverlay",dividerColor:"?sbColorOutline",okButton:new o.c({visible:!0,text:"?findAndPickPartialAlertSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?findAndPickPartialAlertCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})}),this.confirmationAlertDialogEnabled=!1,this.confirmationAlertDialog=new A({title:new o.j({text:"?findAndPickCompleteAlertTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?findAndPickCompleteAlertSubtitle",color:"?sbColorOnSurfaceVariant"}),sheetColor:"?sbColorSurface",modalOverlayColor:"?sbColorModalOverlay",dividerColor:"?sbColorOutline",okButton:new o.c({visible:!0,text:"?findAndPickCompleteAlertSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?findAndPickCompleteAlertCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})}),void 0!==t.scanningCompletedColor&&(this.scanningCompletedColor=t.scanningCompletedColor),void 0!==t.scanningPartiallyColor&&(this.scanningPartiallyColor=t.scanningPartiallyColor),void 0!==t.scanningNotScannedColor&&(this.scanningNotScannedColor=t.scanningNotScannedColor),void 0!==t.allowPartialScan&&(this.allowPartialScan=t.allowPartialScan),void 0!==t.expectedBarcodes&&(this.expectedBarcodes=t.expectedBarcodes.map((t=>new C(t)))),void 0!==t.countingRepeatDelay&&(this.countingRepeatDelay=t.countingRepeatDelay),void 0!==t.sheet&&(this.sheet=new m(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new b(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new v(t.manualCountEditDialog)),void 0!==t.arOverlay&&(this.arOverlay=new r.a(t.arOverlay)),void 0!==t.partialScannedAlertDialogEnabled&&(this.partialScannedAlertDialogEnabled=t.partialScannedAlertDialogEnabled),void 0!==t.partialScannedAlertDialog&&(this.partialScannedAlertDialog=new A(t.partialScannedAlertDialog)),void 0!==t.confirmationAlertDialogEnabled&&(this.confirmationAlertDialogEnabled=t.confirmationAlertDialogEnabled),void 0!==t.confirmationAlertDialog&&(this.confirmationAlertDialog=new A(t.confirmationAlertDialog))}}(h||(h={})).From=function(t){const e=t._type;switch(e){case"SingleScanningMode":return new c(t);case"MultipleScanningMode":return new y(t);case"FindAndPickScanningMode":return new S(t);default:throw`Unknown child class name: ${e}`}};var x,w=n(39);class O extends i.a{constructor(t={}){super(),this.visible=!0,this.style=new E({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),this.overlayColor="?sbColorSurfaceLow",this.aspectRatio=new w.AspectRatio({width:1,height:1}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.style&&(this.style=x.From(t.style)),void 0!==t.overlayColor&&(this.overlayColor=t.overlayColor),void 0!==t.aspectRatio&&(this.aspectRatio=new w.AspectRatio(t.aspectRatio))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"FinderCorneredStyle":return new E(t);case"FinderStrokedStyle":return new L(t);default:throw`Unknown child class name: ${e}`}}}(x||(x={}));class E extends i.a{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 L extends i.a{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 j extends i.a{constructor(t={}){super(),this.visible=!0,this.title=new o.j({color:"?sbColorOnPrimary"}),this.background=new o.a({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow"}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.background&&(this.background=new o.a(t.background))}}class k extends i.a{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.sheetResetButton="Reset",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",this.findAndPickSheetTitle="%d/%d scanned",this.findAndPickSheetBarcodeItemSubtitle="%d/%d added",this.findAndPickPartialAlertTitle="Incomplete scan!",this.findAndPickPartialAlertSubtitle="Some codes are yet to be scanned. Proceed with submission anyway?",this.findAndPickPartialAlertCancelButton="Cancel",this.findAndPickPartialAlertSubmitButton="Yes, Submit",this.findAndPickCompleteAlertTitle="All codes found!",this.findAndPickCompleteAlertSubtitle="You have successfully scanned all codes. Proceed with submission?",this.findAndPickCompleteAlertCancelButton="Dismiss",this.findAndPickCompleteAlertSubmitButton="Submit",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.sheetResetButton&&(this.sheetResetButton=t.sheetResetButton),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),void 0!==t.findAndPickSheetTitle&&(this.findAndPickSheetTitle=t.findAndPickSheetTitle),void 0!==t.findAndPickSheetBarcodeItemSubtitle&&(this.findAndPickSheetBarcodeItemSubtitle=t.findAndPickSheetBarcodeItemSubtitle),void 0!==t.findAndPickPartialAlertTitle&&(this.findAndPickPartialAlertTitle=t.findAndPickPartialAlertTitle),void 0!==t.findAndPickPartialAlertSubtitle&&(this.findAndPickPartialAlertSubtitle=t.findAndPickPartialAlertSubtitle),void 0!==t.findAndPickPartialAlertCancelButton&&(this.findAndPickPartialAlertCancelButton=t.findAndPickPartialAlertCancelButton),void 0!==t.findAndPickPartialAlertSubmitButton&&(this.findAndPickPartialAlertSubmitButton=t.findAndPickPartialAlertSubmitButton),void 0!==t.findAndPickCompleteAlertTitle&&(this.findAndPickCompleteAlertTitle=t.findAndPickCompleteAlertTitle),void 0!==t.findAndPickCompleteAlertSubtitle&&(this.findAndPickCompleteAlertSubtitle=t.findAndPickCompleteAlertSubtitle),void 0!==t.findAndPickCompleteAlertCancelButton&&(this.findAndPickCompleteAlertCancelButton=t.findAndPickCompleteAlertCancelButton),void 0!==t.findAndPickCompleteAlertSubmitButton&&(this.findAndPickCompleteAlertSubmitButton=t.findAndPickCompleteAlertSubmitButton)}}class _ extends i.a{constructor(t={}){super(),this.barcodesRegexFilter="",this.barcodeFormats=[],this.gs1Handling="PARSE",this.engineMode="NEXT_GEN_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 T extends i.a{constructor(t={}){super(),this.background="?sbColorSurface",this.iconBackground="?sbColorOutline",this.icon=new o.e({visible:!0,color:"?sbColorOnSurface"}),this.closeButton=new o.c({text:"Close",background:new o.a({}),foreground:new o.d({})}),this.enableCameraTitle=new o.j({text:"Camera permission denied!",color:"?colorOnSurface"}),this.enableCameraExplanation=new o.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 o.e(t.icon)),void 0!==t.closeButton&&(this.closeButton=new o.c(t.closeButton)),void 0!==t.enableCameraTitle&&(this.enableCameraTitle=new o.j(t.enableCameraTitle)),void 0!==t.enableCameraExplanation&&(this.enableCameraExplanation=new o.j(t.enableCameraExplanation))}}class P extends i.a{constructor(t={}){super(),this.version="1.0",this.screen="BarcodeScanner",this.palette=new o.f({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 k({}),this.backgroundColor="?sbColorSurfaceLow",this.topBar=new p.a({title:new o.j({text:"?topBarTitle",color:"?sbColorOnPrimary"}),mode:"SOLID",backgroundColor:"?sbColorPrimary",cancelButton:new o.c({visible:!0,text:"?topBarCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})})}),this.actionBar=new f({flashButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),zoomButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),flipCameraButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.viewFinder=new O({visible:!0,style:new E({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),overlayColor:"?sbColorSurfaceLow",aspectRatio:new w.AspectRatio({width:1,height:1})}),this.userGuidance=new j({visible:!0,title:new o.j({text:"?userGuidance",color:"?sbColorOnPrimary"}),background:new o.a({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow",strokeWidth:0})}),this.cameraPermission=new T({background:"?sbColorSurface",iconBackground:"?sbColorOutline",icon:new o.e({visible:!0,color:"?sbColorOnSurface"}),closeButton:new o.c({visible:!0,text:"?cameraPermissionCloseButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),enableCameraTitle:new o.j({text:"?cameraPermissionEnableCameraTitle",color:"?sbColorOnSurface"}),enableCameraExplanation:new o.j({text:"?cameraPermissionEnableCameraExplanation",color:"?sbColorOnSurfaceVariant"})}),this.cameraConfiguration=new d({}),this.recognizerConfiguration=new _({}),this.useCase=new c({}),this.sound=new o.i({successBeepEnabled:!0,soundType:"MODERN_BEEP"}),this.vibration=new o.l({enabled:!0}),this.timeouts=new o.k({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 o.f(t.palette)),void 0!==t.localization&&(this.localization=new k(t.localization)),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.topBar&&(this.topBar=new p.a(t.topBar)),void 0!==t.actionBar&&(this.actionBar=new f(t.actionBar)),void 0!==t.viewFinder&&(this.viewFinder=new O(t.viewFinder)),void 0!==t.userGuidance&&(this.userGuidance=new j(t.userGuidance)),void 0!==t.cameraPermission&&(this.cameraPermission=new T(t.cameraPermission)),void 0!==t.cameraConfiguration&&(this.cameraConfiguration=new d(t.cameraConfiguration)),void 0!==t.recognizerConfiguration&&(this.recognizerConfiguration=new _(t.recognizerConfiguration)),void 0!==t.useCase&&(this.useCase=h.From(t.useCase)),void 0!==t.sound&&(this.sound=new o.i(t.sound)),void 0!==t.vibration&&(this.vibration=new o.l(t.vibration)),void 0!==t.timeouts&&(this.timeouts=new o.k(t.timeouts))}}var R=n(66);class D extends i.a{constructor(t={}){if(super(),void 0===t.barcode)throw new Error("barcode must be present in constructor argument");if(this.barcode=new R.BarcodeItem(t.barcode),void 0===t.count)throw new Error("count must be present in constructor argument");this.count=t.count}}class B extends i.a{constructor(t={}){super(),this.items=[],void 0!==t.items&&(this.items=t.items.map((t=>new D(t))))}}var F=n(38)},function(t,e,n){"use strict";n.d(e,"e",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return l}));n(2),n(110),n(45);const r={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${r[t]}px)`};function i(t,e,n){const i=t.theme||{};if(Array.isArray(e)){const t=i.breakpoints||o;return e.reduce(((r,o,i)=>(r[t.up(t.keys[i])]=n(e[i]),r)),{})}if("object"==typeof e){const t=i.breakpoints||o;return Object.keys(e).reduce(((o,i)=>{if(-1!==Object.keys(t.values||r).indexOf(i)){o[t.up(i)]=n(e[i],i)}else{const t=i;o[t]=e[t]}return o}),{})}return n(e)}function a(t={}){var e;return(null==(e=t.keys)?void 0:e.reduce(((e,n)=>(e[t.up(n)]={},e)),{}))||{}}function s(t,e){return t.reduce(((t,e)=>{const n=t[e];return(!n||0===Object.keys(n).length)&&delete t[e],t}),e)}function l({values:t,breakpoints:e,base:n}){const r=n||function(t,e){if("object"!=typeof t)return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach(((e,r)=>{r<t.length&&(n[e]=!0)})):r.forEach((e=>{null!=t[e]&&(n[e]=!0)})),n}(t,e),o=Object.keys(r);if(0===o.length)return t;let i;return o.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[i],i=r):"object"==typeof t?(e[n]=null!=t[n]?t[n]:t[i],i=n):e[n]=t,e)),{})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(71);class o extends r.a{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)}}o.DEFAULT_VIDEO_RESOLUTION_4K={width:3840,height:2160},o.DEFAULT_VIDEO_RESOLUTION_HD={width:1920,height:1080},o.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE=0,o.DEFAULT_ACCEPTED_ANGLE_SCORE=75,o.DEFAULT_ACCEPTED_SIZE_SCORE=75},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class o extends Error{constructor(t,e,n){super(e),this.name="",this.name=t,this.message=e,this.webApiError=n}static mediaDevicesUndefined(){return new o(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 o(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 o(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 o(this.MESSAGE.PERMISSION_DENIED,"Camera permission has not been granted. Please prompt your users again to grant permission.",t)}static unknown(t){return new o(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 r(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}static createFromDOMException(t){return t instanceof DOMException?"NotAllowedError"===t.name?o.permissionDenied("Specifically, the native 'NotAllowedError' was thrown."):"NotFoundError"===t.name?o.mediaDeviceNotFound("Specifically, the native 'NotFoundError' was thrown."):void 0:o.unknown(null==t?void 0:t.message)}}o.PERMISSION_STATE={GRANTED:"granted",DENIED:"denied",PROMPT:"prompt",UNKNOWN:"unknown"},o.MESSAGE={DEVICES_UNDEFINED:"MediaError_DevicesUndefined",DEVICE_NOT_FOUND:"MediaError_DeviceNotFound",ENUMERATE_FAILED:"MediaError_EnumerateFailed",PERMISSION_DENIED:"MediaError_PermissionDenied",UNKNOWN:"MediaError_Unknown"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{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)}}},,function(t,e,n){"use strict";var r=n(128);e.a=r.a},,function(t,e,n){"use strict";n.r(e),n.d(e,"OcrResult",(function(){return o})),n.d(e,"FieldParsedData",(function(){return i})),n.d(e,"FieldType",(function(){return a})),n.d(e,"Field",(function(){return s})),n.d(e,"GenericDocumentType",(function(){return l})),n.d(e,"GenericDocument",(function(){return c}));var r=n(5);class o extends r.a{constructor(t={}){if(super(),void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");this.confidence=t.confidence}}class i extends r.a{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.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class a extends r.a{constructor(t={}){if(super(),this.listIndex=null,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.fullName)throw new Error("fullName must be present in constructor argument");if(this.fullName=t.fullName,void 0===t.normalizedName)throw new Error("normalizedName must be present in constructor argument");if(this.normalizedName=t.normalizedName,void 0===t.commonType)throw new Error("commonType must be present in constructor argument");this.commonType=null!=t.commonType?t.commonType:null,void 0!==t.listIndex&&(this.listIndex=null!=t.listIndex?t.listIndex:null)}}class s extends r.a{constructor(t={}){if(super(),this.confidenceWeight=1,this.image=null,this.validationStatus="NONE",this.parsedData=[],void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=new a(t.type),void 0===t.value)throw new Error("value must be present in constructor argument");if(this.value=null!=t.value?new o(t.value):null,void 0!==t.confidenceWeight&&(this.confidenceWeight=t.confidenceWeight),void 0!==t.image&&(this.image=null!=t.image?t.image:null),void 0===t.polygonInRoot)throw new Error("polygonInRoot must be present in constructor argument");this.polygonInRoot=t.polygonInRoot.map((t=>({x:t.x,y:t.y}))),void 0!==t.validationStatus&&(this.validationStatus=t.validationStatus),void 0!==t.parsedData&&(this.parsedData=t.parsedData.map((t=>new i(t))))}}class l extends r.a{constructor(t={}){if(super(),this.listIndex=null,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.fullName)throw new Error("fullName must be present in constructor argument");if(this.fullName=t.fullName,void 0===t.normalizedName)throw new Error("normalizedName must be present in constructor argument");this.normalizedName=t.normalizedName,void 0!==t.listIndex&&(this.listIndex=null!=t.listIndex?t.listIndex:null)}}class c extends r.a{constructor(t={}){if(super(),this.crop=null,this.confidence=0,this.confidenceWeight=0,void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=new l(t.type),void 0===t.fields)throw new Error("fields must be present in constructor argument");if(this.fields=t.fields.map((t=>new s(t))),void 0===t.children)throw new Error("children must be present in constructor argument");if(this.children=t.children.map((t=>new c(t))),void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=null!=t.quad?t.quad.map((t=>({x:t.x,y:t.y}))):null,void 0===t.quadInRoot)throw new Error("quadInRoot must be present in constructor argument");this.quadInRoot=null!=t.quadInRoot?t.quadInRoot.map((t=>({x:t.x,y:t.y}))):null,void 0!==t.crop&&(this.crop=null!=t.crop?t.crop:null),void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.confidenceWeight&&(this.confidenceWeight=t.confidenceWeight)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"LineSegmentInt",(function(){return o})),n.d(e,"LineSegmentFloat",(function(){return i})),n.d(e,"AspectRatio",(function(){return a}));var r=n(5);class o extends r.a{constructor(t={}){if(super(),void 0===t.start)throw new Error("start must be present in constructor argument");if(this.start={x:t.start.x,y:t.start.y},void 0===t.end)throw new Error("end must be present in constructor argument");this.end={x:t.end.x,y:t.end.y}}}class i extends r.a{constructor(t={}){if(super(),void 0===t.start)throw new Error("start must be present in constructor argument");if(this.start={x:t.start.x,y:t.start.y},void 0===t.end)throw new Error("end must be present in constructor argument");this.end={x:t.end.x,y:t.end.y}}}class a extends r.a{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)}}},function(t,e,n){"use strict";e.a="$$material"},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}scaleDown(t){return new r(this.x/t,this.y/t,this.width/t,this.height/t)}bottom(){return this.y+this.height}static withSize(t,e){return new r(0,0,t,e)}static empty(){return new r(0,0,0,0)}static fromRect(t){return t?new r(t.x,t.y,t.width,t.height):r.empty()}static fromPoint(t,e){return new r(t.x-e/2,t.y-e/2,e,e)}static fromDOMRect(t){return new r(t.x,t.y,t.width,t.height)}}},function(t,e,n){"use strict";var r=n(130);e.a=r.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(32),o=n(30);class i extends r.a{constructor(t){super(t);const e=new o.BarcodeScannerConfiguration;this.finder=e.viewFinder,this.userGuidance=e.userGuidance}static mapFinderConfiguration(t,e){var n,o;r.a.mapValuesDeep(null!==(n=e.finder)&&void 0!==n?n:{},t.finder),r.a.mapValuesDeep(null!==(o=e.userGuidance)&&void 0!==o?o:{},t.userGuidance)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(0),o=n(33),i=n(46),a=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class s extends r.default.Component{constructor(t){super(t),this.orientationchangeCallback=this.orientationChanged.bind(this),this.state={orientation:window.orientation,stream:void 0}}orientationChanged(t){this.setState({orientation:window.orientation})}setDeviceIdInConstraints(t){var e,n;return a(this,void 0,void 0,(function*(){const r=this.props.preferredCamera;if(r)try{const e=(yield navigator.mediaDevices.enumerateDevices()).find((t=>t.deviceId===r||t.label===r));if(e)return Object.assign(Object.assign({},t),{deviceId:e.deviceId})}catch(t){throw o.a.enumerateDevicesFailed()}else{const r={user:"front",environment:"back"},o=(null===(e=null==t?void 0:t.facingMode)||void 0===e?void 0:e.ideal)||(null===(n=null==t?void 0:t.facingMode)||void 0===n?void 0:n.exact)||(null==t?void 0:t.facingMode);if("string"==typeof o&&o in r){yield i.a.INSTANCE.load();const e=i.a.INSTANCE.getMainCamera(r[o]);if(e)return Object.assign(Object.assign({},t),{deviceId:e.deviceId})}}return t}))}componentDidMount(){return a(this,void 0,void 0,(function*(){window.addEventListener("orientationchange",this.orientationchangeCallback),yield this.refreshStream()}))}refreshStream(){var t,e,n,r,i,s,l,c;return a(this,void 0,void 0,(function*(){if(console.log("refreshStream",this),o.a.hasCheckedPermission()||(yield o.a.tryCheckPermission()),o.a.hasDeniedPermission())return void(null===(e=(t=this.props).onError)||void 0===e||e.call(t,o.a.permissionDenied()));const a={video:yield this.setDeviceIdInConstraints(this.props.videoConstraints)};try{if(!navigator.mediaDevices){const t=o.a.unknown();return null===(r=(n=this.props).onError)||void 0===r||r.call(n,t),void console.log(t)}this.stopCurrentStreams();try{const t=yield navigator.mediaDevices.getUserMedia(a);this.setState({stream:t},(()=>{var e,n,r,o;null===(n=(e=this.props).onStreamChanged)||void 0===n||n.call(e,t),null===(o=(r=this.props).onReady)||void 0===o||o.call(r)}))}catch(t){const e=o.a.mediaDeviceNotFound();return null===(s=(i=this.props).onError)||void 0===s||s.call(i,e),void console.error(e)}}catch(t){const e=o.a.createFromDOMException(t);return null===(c=(l=this.props).onError)||void 0===c||c.call(l,e),void console.error(e)}}))}stopCurrentStreams(){const t=this.state.stream,e=null==t?void 0:t.getTracks();e&&e.forEach((t=>{t.stop()}))}componentWillUnmount(){window.removeEventListener("orientationchange",this.orientationchangeCallback),this.state.stream&&(this.state.stream.getVideoTracks&&this.state.stream.getAudioTracks&&(this.state.stream.getVideoTracks().forEach((t=>t.stop())),this.state.stream.getAudioTracks().forEach((t=>t.stop()))),this.setState({stream:void 0}))}render(){return this.props.children}updateTorch(t){return a(this,void 0,void 0,(function*(){const e=[{torch:t}];yield this.state.stream.getVideoTracks()[0].applyConstraints({advanced:e})}))}getCapabilities(){if(this.state.stream.getVideoTracks){const t=this.getVideoTrack();return s.getMediaTrackCapabilities(t)}}static getMediaTrackCapabilities(t){if(t&&t.getCapabilities)return t.getCapabilities()}getVideoTrack(){const t=this.state.stream.getVideoTracks();if(t.length>0)return t[0]}}var l=n(21),c=n(41),u=n(34),d=n(64);class h{static isSupported(){return!!document.createElement("canvas").getContext("webgl")}constructor(){this._type="WebGL",this.canvas=document.createElement("canvas");const t=this.gl=this.canvas.getContext("webgl",{willReadFrequently:!0}),e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);const n=t.createShader(t.VERTEX_SHADER);t.shaderSource(n,"attribute vec2 p;void main(){ gl_Position = vec4(p,0,1);}"),t.compileShader(n);const r=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(r,"precision mediump float;uniform sampler2D texture; uniform vec2 scale; uniform vec2 offset; void main() { gl_FragColor=texture2D( texture, gl_FragCoord.xy * scale + offset );}"),t.compileShader(r);const o=this.program=t.createProgram();t.attachShader(o,n),t.attachShader(o,r),t.linkProgram(o),t.useProgram(o),t.uniform1i(t.getUniformLocation(o,"texture"),0),t.bindBuffer(t.ARRAY_BUFFER,t.createBuffer()),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW),t.enableVertexAttribArray(0),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0)}getImageData(t,e,n,r,o,i,a,s){let l,c;if(i=Math.floor(i),a=Math.floor(a),e=Math.floor(e),n=Math.floor(n),r=Math.floor(r),o=Math.floor(o),t instanceof HTMLVideoElement)[c,l]=[t.videoWidth,t.videoHeight];else{if(!(t instanceof HTMLCanvasElement))throw new Error("Unsupported source type");[c,l]=[t.width,t.height]}(c<e+r||l<n+o)&&u.a.debug("Crop region exceeds source video dimensions. This can happen when the screen is resized or rotated and the video has not yet changed its size. Most likely, the frame we analyzed now contains some garbage data. This is not a problem, unless it happens very frequently.");const h=this.gl;this.canvas.width=i,this.canvas.height=a,h.viewport(0,0,i,a);const p=[r/(i*c),o/(a*l)],f=[e/c,n/l];return h.uniform2fv(h.getUniformLocation(this.program,"scale"),p),h.uniform2fv(h.getUniformLocation(this.program,"offset"),f),h.texImage2D(h.TEXTURE_2D,0,h.RGB,h.RGB,h.UNSIGNED_BYTE,t),h.drawArrays(h.TRIANGLES,0,6),(null==s?void 0:s.byteLength)!==i*a*4&&(s=new Uint8ClampedArray(i*a*4),d.a.INSTANCE.values.set("WebGLNumBufferAllocations",(d.a.INSTANCE.values.get("WebGLNumBufferAllocations")||0)+1)),h.readPixels(0,0,i,a,h.RGBA,h.UNSIGNED_BYTE,s),new ImageData(s,i,a)}}class p{constructor(){this._type="TwoD",this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0,alpha:!1}),this.ctx.imageSmoothingEnabled=!1}getImageData(t,e,n,r,o,i,a,s){return this.canvas.width=i,this.canvas.height=a,this.ctx.drawImage(t,e,n,r,o,0,0,i,a),this.ctx.getImageData(0,0,i,a)}}var f=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class m extends r.default.Component{constructor(t){super(t),this.videoLoaded=!1,this.reloadCanvas=!0,this.swapCameraEnabled=!0,this.activeCamera=void 0,this.save=!1,this._reusableImageBuffer=null,this.onStreamChanged=t=>{this.video.srcObject=t,this.updateCameraInfo(t),this.video.addEventListener("resize",(t=>{this.reloadCanvas=!0}),!1),this.video.addEventListener("loadeddata",(t=>{this.videoLoaded=!0,this.didLoadVideo&&this.didLoadVideo()}),!1)},this.state={facingModeBack:"environment"===this.props.videoConstraints.facingMode,mirrored:this.props.mirrored,deviceId:void 0}}videoSize(){const{clientVideoWidth:t,clientVideoHeight:e}=this.calculateClientVideoConstraints();return new l.a(t,e)}saveExtractedData(){this.save=!0}zoom(){var t;return null!==(t=this.props.zoom)&&void 0!==t?t:1}imageCapture(){if(this.capture)return this.capture;const t=this.videoStream.getVideoTrack();return this.capture=new ImageCapture(t),this.capture}set reusableImageBuffer(t){this._reusableImageBuffer=t}createImageData(t=0,e){return f(this,void 0,void 0,(function*(){if(!this.video||!this.videoLoaded)return;const n=this.getCanvasRenderingContext();if(!n)return;if(e){const t=yield this.imageCapture().takePhoto(),e=yield createImageBitmap(t);u.a.debug("Bitmap size: "+e.width*e.height);const r=this.windowSize(),o=e.height/(r.height+r.y),i=r.width*o,a=r.height*o,s=e.width/2-i/2,l=r.y*o,d=new c.a(s,l,i,a);return u.a.debug("Frame size: "+d.x+"-"+d.y+"-"+d.width+"-"+d.height),n.getImageData(this.video,d.x,d.y,e.width,e.height,d.width,d.height,this._reusableImageBuffer)}let{videoWidth:r,videoHeight:o}=this.video,{clientVideoWidth:i,clientVideoHeight:a,coef:s}=this.calculateClientVideoConstraints();if(0===s)return;const l=this.finderFrame||new c.a(0,0,i,a),d=this.zoom(),h=(r-i/d)/2,p=(o-a/d)/2,f=l.x/s+h,m=l.y/s+p,g=this.finderFrame?s:d,v=l.width/g,b=l.height/g,y=this.calculateFrameSize(t,v,b);return n.getImageData(this.video,f,m,v,b,y.width,y.height,this._reusableImageBuffer)}))}windowSize(){var t;const e=this.props.configuration,n=null!==(t=e.container)&&void 0!==t?t:document.getElementById(e.containerId);if(!n)throw new Error("Container DOM element is required to calculate window size and snap image.");return c.a.fromDOMRect(n.getBoundingClientRect())}calculateClientVideoConstraints(){let{videoWidth:t,videoHeight:e}=this.video,n=this.video.getBoundingClientRect(),r=t,o=e,i=1;return n.width/n.height<=t/e?(i=n.height/e,i>0&&(r=n.width/i)):(i=n.width/t,i>0&&(o=n.height/i)),{clientVideoWidth:r,clientVideoHeight:o,coef:i}}calculateFrameSize(t,e,n){let r=e,o=n;if(t>0&&0!=e&&0!=n){const i=e/n;e>n?(r=e>t?t:e,o=r/i):(o=n>t?t:n,r=o*i)}return new l.a(r,o)}getCanvasRenderingContext(){return this.video?0===this.video.videoWidth?null:(this.canvas&&!this.reloadCanvas||(this.canvas&&this.releaseCanvas(),this.canvas=h.isSupported()?new h:new p,this.reloadCanvas=!1),this.canvas):null}releaseCanvas(){this.canvas&&(this.canvas=null)}componentWillUnmount(){this.releaseCanvas(),this.video=null,this.videoStream=null}style(){var t;const e={display:"block",width:100*this.zoom()+"%",height:100*this.zoom()+"%",left:`${this.zoomMargin()}%`,top:`${this.zoomMargin()}%`,position:"relative",objectFit:"cover",backgroundColor:null===(t=this.props.configuration)||void 0===t?void 0:t.backgroundColor};return this.state.mirrored&&(e.transform="scaleX(-1)"),e}zoomMargin(){const t=this.zoom();return 1===t?0:(1-t)/2*100}render(){const{videoConstraints:t,onReady:e,onError:n}=this.props;return r.default.createElement(s,{videoConstraints:t,preferredCamera:this.state.deviceId||this.props.preferredCamera,onReady:e,onStreamChanged:this.onStreamChanged,onError:n,ref:t=>{this.videoStream=t}},r.default.createElement("video",{autoPlay:!0,muted:!0,playsInline:!0,className:"scanbot-camera-view",ref:t=>{this.video=t},style:this.style()}))}setDirection(t){this.props.videoConstraints.facingMode={ideal:t},this.setState({facingModeBack:"environment"===t,mirrored:"user"===t},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0}))))}swapCameraFacing(t){if(this.swapCameraEnabled){this.swapCameraEnabled=!1;const e=!this.state.facingModeBack,n=e?"environment":"user";this.props.videoConstraints.facingMode=!0===t?{exact:n}:{ideal:n},this.setState({facingModeBack:e,mirrored:!e},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0}))))}}switchCamera(t,e){return f(this,void 0,void 0,(function*(){this.swapCameraEnabled&&(this.swapCameraEnabled=!1,this.props.videoConstraints.facingMode=void 0,this.setState({facingModeBack:void 0,mirrored:null!=e?e:this.state.mirrored,deviceId:t},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0})))))}))}updateCameraInfo(t){this.activeCamera=i.a.getCameraInfoFromStream(t)}getActiveCameraInfo(){return this.activeCamera}setTorchState(t){if(this.activeCamera&&this.activeCamera.supportsTorchControl){return this.videoStream.getVideoTrack().applyConstraints({advanced:[{torch:t}]})}return Promise.reject("Torch is not supported for current camera.")}}},function(t,e,n){"use strict";var r=n(110);e.a=function(t,e){return e?Object(r.a)(t,e,{clone:!1}):t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(33),o=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class i{static get INSTANCE(){return i._INSTANCE||(i._INSTANCE=new i),i._INSTANCE}constructor(){this.listOfCameras=[],this.strategy="FAST_DEFERRED"}initialize(t){if(t&&(this.strategy=t),"SLOW"===t||"FAST"===t){const e=t;this.load(e)}}load(t){return o(this,void 0,void 0,(function*(){if(!t)if("SLOW_DEFERRED"===this.strategy||"SLOW"===this.strategy)t="SLOW";else if("FAST_DEFERRED"===this.strategy||"FAST"===this.strategy)t="FAST";else if("NONE"===this.strategy)return this.listOfCameras;let e;if("SLOW"===t)e=this.loadSlow();else{if("FAST"!==t)throw new Error(`Unknown mode ${t}`);e=this.loadFast()}try{return this.listOfCameras=yield e,this.listOfCameras}catch(t){throw this.loadSlowResult=void 0,r.a.createFromDOMException(t)}}))}loadSlow(){return this.loadSlowResult=this.loadSlowResult||(()=>o(this,void 0,void 0,(function*(){yield this.assertPermissionsAreOk();const t=[];for(const e of yield this.getVideoDevices()){let n;try{n=yield this.getUserMedia({video:{deviceId:e.deviceId}}),t.push(i.getCameraInfoFromStream(n))}finally{this.stopStream(n),yield new Promise((t=>setTimeout(t,0)))}}return t})))(),this.loadSlowResult}loadFast(){return this.loadFastResult=this.loadFastResult||(()=>o(this,void 0,void 0,(function*(){yield this.assertPermissionsAreOk();const t=[];for(const e of yield this.getVideoDevices()){const n=i.guessparseCameraLabelFacingMode(e.label),r=i.guessparseCameraLabelMaxNumPixels(e.label);t.push({maxNumPixels:r,facingMode:n,supportsTorchControl:void 0,deviceId:e.deviceId,label:e.label})}return t})))(),this.loadFastResult}getMainCamera(t){var e,n,r,o,i,a;return null!==(a=null===(i=null===(o=null===(r=null===(n=null===(e=this.listOfCameras)||void 0===e?void 0:e.filter((e=>e.facingMode===t)))||void 0===n?void 0:n.map(((t,e)=>({camera:t,index:e}))))||void 0===r?void 0:r.sort(((t,e)=>{var n;return-(+t.camera.supportsTorchControl||0)-(+e.camera.supportsTorchControl||0)||-((t.camera.maxNumPixels||0)-(e.camera.maxNumPixels||0))||(null===(n=t.camera.label)||void 0===n?void 0:n.localeCompare(e.camera.label))||t.index-e.index})))||void 0===o?void 0:o[0])||void 0===i?void 0:i.camera)&&void 0!==a?a:null}getVideoDevices(){return o(this,void 0,void 0,(function*(){let t=yield navigator.mediaDevices.enumerateDevices();if(t=t.filter((t=>"videoinput"===t.kind)),t.some((t=>""===t.label))){let e;try{e=yield this.getUserMedia({video:{facingMode:{ideal:"environment"}},audio:!1}),t=yield navigator.mediaDevices.enumerateDevices(),t=t.filter((t=>"videoinput"===t.kind))}finally{this.stopStream(e)}}return t}))}stopStream(t){null==t||t.getTracks().forEach((t=>t.stop()))}static guessparseCameraLabelFacingMode(t){return function(t){const e=["rear","back","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक"];for(const n of e)if(t.toLowerCase().includes(n.toLowerCase()))return!0;return!1}(t)?"back":"front"}static guessparseCameraLabelMaxNumPixels(t){const e=RegExp(/\b([0-9]+)mp?\b/).exec(t.toLowerCase()),n=e?1e6*parseInt(e[1],10):NaN;return Number.isNaN(n)?void 0:n}assertPermissionsAreOk(){return o(this,void 0,void 0,(function*(){if(r.a.hasCheckedPermission()||(yield r.a.tryCheckPermission()),r.a.hasDeniedPermission())throw r.a.permissionDenied();if(!navigator.mediaDevices)throw r.a.unknown()}))}static getCameraInfoFromStream(t){var e;return null===(e=t.getVideoTracks().map((t=>{var e,n,r,o,i,a;const s=null===(e=t.getCapabilities)||void 0===e?void 0:e.call(t),l=null===(n=t.getSettings)||void 0===n?void 0:n.call(t),c=t.label;let u=function(t){if("user"===(null==t?void 0:t.toLowerCase()))return"front";if("environment"===(null==t?void 0:t.toLowerCase()))return"back";return"unknown"}(null!==(o=null===(r=null==s?void 0:s.facingMode)||void 0===r?void 0:r[0])&&void 0!==o?o:l.facingMode);"unknown"===u&&(u=this.guessparseCameraLabelFacingMode(c));let d=function(t){var e,n;let r=(null===(e=null==t?void 0:t.width)||void 0===e?void 0:e.max)*(null===(n=null==t?void 0:t.height)||void 0===n?void 0:n.max);if(!r||Number.isNaN(r))return;return r}(s);Number.isNaN(d)&&(d=this.guessparseCameraLabelMaxNumPixels(c));return{facingMode:u,maxNumPixels:d,supportsTorchControl:null!==(a=null!==(i=null==s?void 0:s.torch)&&void 0!==i?i:"torch"in l)&&void 0!==a&&a,label:c,deviceId:l.deviceId}})).sort(((t,e)=>e.maxNumPixels-t.maxNumPixels)))||void 0===e?void 0:e[0]}getUserMedia(t){return o(this,void 0,void 0,(function*(){try{return yield navigator.mediaDevices.getUserMedia(t)}catch(t){throw r.a.mediaDeviceNotFound()}}))}}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(93)},function(t,e,n){"use strict";var r=n(111);e.a=r.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(0),o=n(41),i=n(6),a=n(24);class s extends r.default.Component{get style(){return this.props.configuration.style}get holeRect(){return this.holePosition}constructor(t){super(t),this.holePosition=o.a.empty(),this.resizeObserver=new ResizeObserver((()=>{this.updateWindowSize()})),this.componentDidUpdate=t=>{var e,n,r,o;(null===(e=this.props.padding)||void 0===e?void 0:e.minTopPadding)===(null===(n=t.padding)||void 0===n?void 0:n.minTopPadding)&&(null===(r=this.props.padding)||void 0===r?void 0:r.minBottomPadding)===(null===(o=t.padding)||void 0===o?void 0:o.minBottomPadding)&&this.props.configuration===t.configuration&&this.props.guidanceConfiguration===t.guidanceConfiguration||this.setState({shouldUpdateCanvas:!0}),this.updateCanvas()},this.updateWindowSize=()=>{this.setState({shouldUpdateCanvas:!0})},this.getVideoSize=()=>{var t;return null!==(t=this.holeCanvas.getBoundingClientRect())&&void 0!==t?t:new DOMRect},this.scaleForRetinaDisplay=t=>{if(window.devicePixelRatio>1){var e=t.width,n=t.height;t.width=e*window.devicePixelRatio,t.height=n*window.devicePixelRatio,t.style.width=e+"px",t.style.height=n+"px",t.getContext("2d").scale(window.devicePixelRatio,window.devicePixelRatio)}},this.updateCanvas=()=>{var t,e,n,r,o;if(!this.state.shouldUpdateCanvas)return;this.setState({shouldUpdateCanvas:!1});const i=this.getVideoSize().width,a=this.getVideoSize().height;this.holeCanvas.width=i,this.holeCanvas.height=a,this.crosshairCanvas.width=i,this.crosshairCanvas.height=a,this.scaleForRetinaDisplay(this.crosshairCanvas);const s=i-2*this.props.configuration.style.strokeWidth,l=Math.max(20,(i-s)/2),c=Math.min(s,i-2*l),u=this.props.configuration.aspectRatio.width/this.props.configuration.aspectRatio.height;this.holePosition.width=c,this.holePosition.height=this.holePosition.width/u,this.holePosition.x=i/2-c/2;const d=(null===(t=this.guidanceText)||void 0===t?void 0:t.clientHeight)+this.guidanceTextTopPadding||0,h=Math.max(10,null!==(n=null===(e=this.props.padding)||void 0===e?void 0:e.minTopPadding)&&void 0!==n?n:0),p=a-h-Math.max(10,null!==(o=null===(r=this.props.padding)||void 0===r?void 0:r.minBottomPadding)&&void 0!==o?o:0)-d;this.holePosition.height>p?(this.holePosition.height=p,this.holePosition.width=this.holePosition.height*u,this.holePosition.x=i/2-this.holePosition.width/2,this.holePosition.y=h):this.holePosition.y=h+(p-this.holePosition.height)/1.9;const f=this.holeCanvas.getContext("2d");f.save(),this.drawBackground(f),f.globalCompositeOperation="destination-out",this.drawHole();const m=this.crosshairCanvas.getContext("2d");m.globalCompositeOperation="source-over","FinderStrokedStyle"===this.props.configuration.style._type?this.drawHoleOutline():"FinderCorneredStyle"===this.props.configuration.style._type&&this.drawHoleCorners(),f.restore(),m.restore()},this.drawBackground=t=>{const{width:e,height:n}=this.getVideoSize();t.clearRect(0,0,e,n),t.beginPath(),t.rect(0,0,e,n),t.fillStyle=i.b.getColorValue(this.props.configuration.overlayColor),t.fill()},this.drawHole=()=>{const t=this.holeCanvas.getContext("2d"),e=this.cornerRadius(),n=this.holePosition.x,r=this.holePosition.y,o=this.holePosition.width,i=this.holePosition.height;t.beginPath(),t.fillStyle="black",t.moveTo(n+e,r),t.arcTo(n+o,r,n+o,r+i,e),t.arcTo(n+o,r+i,n,r+i,e),t.arcTo(n,r+i,n,r,e),t.arcTo(n,r,n+o,r,e),t.closePath(),t.fill()},this.drawCrosshair=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x+this.holePosition.width/2,n=this.holePosition.y+this.holePosition.height/2;t.beginPath(),t.moveTo(e-10,n),t.lineTo(e+10,n),t.moveTo(e,n-10),t.lineTo(e,n+10),t.strokeStyle="white",t.fillStyle="white",t.lineWidth=1,t.stroke()},this.drawHoleCorners=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x,n=this.holePosition.y,r=this.holePosition.width,o=this.holePosition.height,a=15,s=this.style.strokeWidth,l=this.cornerRadius();t.beginPath(),t.moveTo(e,n+a),t.arcTo(e,n,e+r,n,l),t.lineTo(e+a,n),t.moveTo(e+r-a,n),t.arcTo(e+r,n,e+r,n+o,l),t.lineTo(e+r,n+a),t.moveTo(e+r,n+o-a),t.arcTo(e+r,n+o,e,n+o,l),t.lineTo(e+r-a,n+o),t.moveTo(e,n+o-a),t.arcTo(e,n+o,e+r,n+o,l),t.lineTo(e+a,n+o),t.strokeStyle=i.b.getColorValue(this.style.strokeColor),t.lineWidth=s,t.stroke()},this.drawHoleOutline=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x,n=this.holePosition.y,r=this.holePosition.width,o=this.holePosition.height,a=this.cornerRadius(),s=this.style.strokeWidth;t.beginPath(),t.moveTo(e+a,n),t.arcTo(e+r,n,e+r,n+o,a),t.moveTo(e+r,n+a),t.arcTo(e+r,n+o,e,n+o,a),t.moveTo(e+r-a,n+o),t.arcTo(e,n+o,e,n,a),t.moveTo(e,n+o-a),t.arcTo(e,n,e+r,n,a),t.strokeStyle=i.b.getColorValue(this.style.strokeColor),t.lineWidth=s,t.stroke()},this.guidanceTextTopPadding=20,this.render=()=>r.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",textAlign:"left"},onClick:t=>{const e=this.holePosition;t.clientX>this.holePosition.x&&t.clientX<e.x+e.width&&t.clientY>e.y&&t.clientY<e.y+e.height&&console.log("Clicked inside hole, possibly click events need to be diverted")}},r.default.createElement("canvas",{ref:t=>{this.holeCanvas=t},style:{position:"absolute",width:"100%",height:"100%"}}),r.default.createElement("canvas",{ref:t=>{this.crosshairCanvas=t},style:{position:"absolute",width:"100%",height:"100%"}}),this.guidance.visible&&r.default.createElement("div",{ref:t=>{this.guidanceText=t},style:{position:"absolute",display:"block",top:this.holePosition.y+this.holePosition.height+this.guidanceTextTopPadding,left:0,width:"100%",textAlign:"center"}},r.default.createElement(a.a,{style:{display:"inline-block",backgroundColor:i.b.getColorValue(this.guidance.background.fillColor),borderStyle:"solid",borderColor:i.b.getColorValue(this.guidance.background.strokeColor),borderWidth:this.style.strokeWidth,borderRadius:4,padding:"4px 8px",flex:1},config:this.guidance.title}))),this.state={shouldUpdateCanvas:!0}}componentDidMount(){this.updateWindowSize(),this.resizeObserver.observe(this.holeCanvas)}componentWillUnmount(){this.resizeObserver.disconnect()}bottomOfGuidanceText(){var t,e;return this.holeRect.bottom()+(null!==(e=null===(t=this.guidanceText)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0)+this.guidanceTextTopPadding}get guidance(){return this.props.guidanceConfiguration}cornerRadius(){return Math.max(0,Math.min(this.style.cornerRadius,this.holePosition.width/2,this.holePosition.height/2))}}},function(t,e,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&t.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&t.push(s);else t.push(r.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return G})),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 r="-ms-",o="-moz-",i="-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 b(t,e,n){return t.slice(e,n)}function y(t){return t.length}function A(t){return t.length}function C(t,e){return e.push(t),t}function S(t,e){return t.map(e).join("")}function x(t,e){return t.filter((function(t){return!f(t,e)}))}var w=1,O=1,E=0,L=0,j=0,k="";function _(t,e,n,r,o,i,a,s){return{value:t,root:e,parent:n,type:r,props:o,children:i,line:w,column:O,length:a,return:"",siblings:s}}function T(t,e){return h(_("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function P(t){for(;t.root;)t=T(t.root,{children:[t]});C(t,t.siblings)}function R(){return j=L<E?v(k,L++):0,O++,10===j&&(O=1,w++),j}function D(){return v(k,L)}function B(){return L}function F(t,e){return b(k,t,e)}function I(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 M(t){return w=O=1,E=y(k=t),L=0,[]}function W(t){return k="",t}function z(t){return p(F(L-1,U(91===t?t+2:40===t?t+1:t)))}function N(t){for(;(j=D())&&j<33;)R();return I(t)>2||I(j)>3?"":" "}function V(t,e){for(;--e&&R()&&!(j<48||j>102||j>57&&j<65||j>70&&j<97););return F(t,B()+(e<6&&32==D()&&32==R()))}function U(t){for(;R();)switch(j){case t:return L;case 34:case 39:34!==t&&39!==t&&U(j);break;case 40:41===t&&U(t);break;case 92:R()}return L}function H(t,e){for(;R()&&t+j!==57&&(t+j!==84||47!==D()););return"/*"+F(e,L-1)+"*"+d(47===t?t:R())}function $(t){for(;!I(D());)R();return F(t,L)}function G(t){return W(Y("",null,null,null,[""],t=M(t),0,[0],t))}function Y(t,e,n,r,o,i,a,s,l){for(var c=0,h=0,p=a,f=0,b=0,A=0,S=1,x=1,E=1,_=0,T="",P=o,F=i,I=r,M=T;x;)switch(A=_,_=R()){case 40:if(108!=A&&58==v(M,p-1)){-1!=g(M+=m(z(_),"&","&\f"),"&\f",u(c?s[c-1]:0))&&(E=-1);break}case 34:case 39:case 91:M+=z(_);break;case 9:case 10:case 13:case 32:M+=N(A);break;case 92:M+=V(B()-1,7);continue;case 47:switch(D()){case 42:case 47:C(Z(H(R(),B()),e,n,l),l);break;default:M+="/"}break;case 123*S:s[c++]=y(M)*E;case 125*S:case 59:case 0:switch(_){case 0:case 125:x=0;case 59+h:-1==E&&(M=m(M,/\f/g,"")),b>0&&y(M)-p&&C(b>32?X(M+";",r,n,p-1,l):X(m(M," ","")+";",r,n,p-2,l),l);break;case 59:M+=";";default:if(C(I=Q(M,e,n,c,h,o,s,T,P=[],F=[],p,i),i),123===_)if(0===h)Y(M,e,I,I,P,i,p,s,F);else switch(99===f&&110===v(M,3)?100:f){case 100:case 108:case 109:case 115:Y(t,I,I,r&&C(Q(t,I,I,0,0,o,s,T,o,P=[],p,F),F),o,F,p,s,r?P:F);break;default:Y(M,I,I,I,[""],F,0,s,F)}}c=h=b=0,S=E=1,T=M="",p=a;break;case 58:p=1+y(M),b=A;default:if(S<1)if(123==_)--S;else if(125==_&&0==S++&&125==(j=L>0?v(k,--L):0,O--,10===j&&(O=1,w--),j))continue;switch(M+=d(_),_*S){case 38:E=h>0?1:(M+="\f",-1);break;case 44:s[c++]=(y(M)-1)*E,E=1;break;case 64:45===D()&&(M+=z(R())),f=D(),h=p=y(T=M+=$(B())),_++;break;case 45:45===A&&2==y(M)&&(S=0)}}return i}function Q(t,e,n,r,o,i,a,l,c,d,h,f){for(var g=o-1,v=0===o?i:[""],y=A(v),C=0,S=0,x=0;C<r;++C)for(var w=0,O=b(t,g+1,g=u(S=a[C])),E=t;w<y;++w)(E=p(S>0?v[w]+" "+O:m(O,/&\f/g,v[w])))&&(c[x++]=E);return _(t,e,n,0===o?s:l,c,d,h,f)}function Z(t,e,n,r){return _(t,e,n,a,d(j),b(t,2,-2),0,r)}function X(t,e,n,r,o){return _(t,e,n,l,b(t,0,r),b(t,r+1,-1),r,o)}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 i+"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 i+t+t;case 4789:return o+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return i+t+o+t+r+t+t;case 5936:switch(v(t,e+11)){case 114:return i+t+r+m(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return i+t+r+m(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return i+t+r+m(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return i+t+r+t+t;case 6165:return i+t+r+"flex-"+t+t;case 5187:return i+t+m(t,/(\w+).+(:[^]+)/,i+"box-$1$2"+r+"flex-$1$2")+t;case 5443:return i+t+r+"flex-item-"+m(t,/flex-|-self/g,"")+(f(t,/flex-|baseline/)?"":r+"grid-row-"+m(t,/flex-|-self/g,""))+t;case 4675:return i+t+r+"flex-line-pack"+m(t,/align-content|flex-|-self/g,"")+t;case 5548:return i+t+r+m(t,"shrink","negative")+t;case 5292:return i+t+r+m(t,"basis","preferred-size")+t;case 6060:return i+"box-"+m(t,"-grow","")+i+t+r+m(t,"grow","positive")+t;case 4554:return i+m(t,/([^-])(transform)/g,"$1"+i+"$2")+t;case 6187:return m(m(m(t,/(zoom-|grab)/,i+"$1"),/(image-set)/,i+"$1"),t,"")+t;case 5495:case 3959:return m(t,/(image-set\([^]*)/,i+"$1$`$1");case 4968:return m(m(t,/(.+:)(flex-)?(.*)/,i+"box-pack:$3"+r+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+i+t+t;case 4200:if(!f(t,/flex-|baseline/))return r+"grid-column-align"+b(t,e)+t;break;case 2592:case 3360:return r+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:r+m(t,"-start","")+t+r+"grid-row-span:"+(~g(n,"span",0)?f(n,/\d+/):+f(n,/\d+/)-+f(t,/\d+/))+";":r+m(t,"-start","")+t;case 4896:case 4128:return n&&n.some((function(t){return f(t.props,/grid-\w+-start/)}))?t:r+m(m(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return m(t,/(.+)-inline(.+)/,i+"$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(y(t)-1-e>6)switch(v(t,e+1)){case 109:if(45!==v(t,e+4))break;case 102:return m(t,/(.+:)(.+)-([^]+)/,"$1"+i+"$2-$3$1"+o+(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,o,i,a,s,l){return r+n+":"+o+l+(i?r+n+"-span:"+(a?s:+s-+o)+l:"")+t}));case 4949:if(121===v(t,e+6))return m(t,":",":"+i)+t;break;case 6444:switch(v(t,45===v(t,14)?18:11)){case 120:return m(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+i+(45===v(t,14)?"inline-":"")+"box$3$1"+i+"$2$3$1"+r+"$2box$3")+t;case 100:return m(t,":",":"+r)+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="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function J(t,e,n,r){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,r)+"}";case s:if(!y(t.value=t.props.join(",")))return""}return y(n=K(t.children,r))?t.return=t.value+"{"+n+"}":""}function tt(t){var e=A(t);return function(n,r,o,i){for(var a="",s=0;s<e;s++)a+=t[s](n,r,o,i)||"";return a}}function et(t){return function(e){e.root||(e=e.return)&&t(e)}}function nt(t,e,n,o){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([T(t,{value:m(t.value,"@","@"+i)})],o);case s:if(t.length)return S(n=t.props,(function(e){switch(f(e,o=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":P(T(t,{props:[m(e,/:(read-\w+)/,":-moz-$1")]})),P(T(t,{props:[e]})),h(t,{props:x(n,o)});break;case"::placeholder":P(T(t,{props:[m(e,/:(plac\w+)/,":"+i+"input-$1")]})),P(T(t,{props:[m(e,/:(plac\w+)/,":-moz-$1")]})),P(T(t,{props:[m(e,/:(plac\w+)/,r+"input-$1")]})),P(T(t,{props:[e]})),h(t,{props:x(n,o)})}return""}))}}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1),o=n(13);class i extends o.a{constructor(t={}){super(),this.title=new r.j({visible:!1,text:"Scan Item",color:"?sbColorOnPrimary"}),this.mode="SOLID",this.backgroundColor="?sbColorPrimary",this.cancelButton=new r.c({text:"Cancel",background:new r.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new r.d({color:"?sbColorOnPrimary"})}),void 0!==t.title&&(this.title=new r.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 r.c(t.cancelButton))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=n(29);function o(t,e){let n;return n=e?Object(r.c)(t).withConfig({displayName:e.label,shouldForwardProp:e.shouldForwardProp}):Object(r.c)(t),n}const i=(t,e)=>{t.componentStyle&&(t.componentStyle.rules=e(t.componentStyle.rules))}},function(t,e,n){"use strict";var r=n(112);e.a=r.a},function(t,e,n){"use strict";var r=n(131);e.a=r.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=n(8);function o(t,e,n){return Math.min(Math.max(t,e),n)}function i(t,e,n){return new r.a(o(t.x,-e/2,n.width-e/2),o(t.y,-e/2,n.height-e/2))}},,function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeFormatConfigurationBase",(function(){return r})),n.d(e,"BarcodeFormatOneDConfigurationBase",(function(){return o})),n.d(e,"BarcodeFormatCodabarConfiguration",(function(){return l})),n.d(e,"BarcodeFormatCode11Configuration",(function(){return c})),n.d(e,"BarcodeFormatCode39Configuration",(function(){return u})),n.d(e,"BarcodeFormatCode93Configuration",(function(){return d})),n.d(e,"BarcodeFormatCode128Configuration",(function(){return h})),n.d(e,"BarcodeFormatCode2Of5Configuration",(function(){return p})),n.d(e,"BarcodeFormatDataBarConfiguration",(function(){return f})),n.d(e,"BarcodeFormatDataBarExpandedConfiguration",(function(){return m})),n.d(e,"BarcodeFormatDataBarLimitedConfiguration",(function(){return g})),n.d(e,"BarcodeFormatITFConfiguration",(function(){return v})),n.d(e,"BarcodeFormatMSIPlesseyConfiguration",(function(){return b})),n.d(e,"BarcodeFormatUpcEanConfiguration",(function(){return y})),n.d(e,"BarcodeFormatPharmaCodeConfiguration",(function(){return A})),n.d(e,"BarcodeFormatTwoDConfigurationBase",(function(){return i})),n.d(e,"BarcodeFormatAztecConfiguration",(function(){return C})),n.d(e,"BarcodeFormatQRCodeConfiguration",(function(){return S})),n.d(e,"BarcodeFormatPDF417Configuration",(function(){return x})),n.d(e,"BarcodeFormatMicroPDF417Configuration",(function(){return w})),n.d(e,"BarcodeFormatDataMatrixConfiguration",(function(){return O})),n.d(e,"BarcodeFormatMaxiCodeConfiguration",(function(){return E})),n.d(e,"BarcodeFormatFourStateConfigurationBase",(function(){return a})),n.d(e,"BarcodeFormatAustraliaPostConfiguration",(function(){return L})),n.d(e,"BarcodeFormatJapanPostConfiguration",(function(){return j})),n.d(e,"BarcodeFormatRoyalMailConfiguration",(function(){return k})),n.d(e,"BarcodeFormatRoyalTNTPostConfiguration",(function(){return _})),n.d(e,"BarcodeFormatUSPSIntelligentMailConfiguration",(function(){return T})),n.d(e,"BarcodeFormatPharmaCodeTwoTrackConfiguration",(function(){return P})),n.d(e,"BarcodeFormatGS1CompositeConfiguration",(function(){return R})),n.d(e,"BarcodeFormatCommonOneDConfiguration",(function(){return D})),n.d(e,"BarcodeFormatCommonTwoDConfiguration",(function(){return B})),n.d(e,"BarcodeFormatCommonFourStateConfiguration",(function(){return F})),n.d(e,"BarcodeFormatCommonConfiguration",(function(){return I}));var r,o,i,a,s=n(5);!function(t){t.From=function(t){const e=t._type;switch(e){case"BarcodeFormatCodabarConfiguration":return new l(t);case"BarcodeFormatCode11Configuration":return new c(t);case"BarcodeFormatCode39Configuration":return new u(t);case"BarcodeFormatCode93Configuration":return new d(t);case"BarcodeFormatCode128Configuration":return new h(t);case"BarcodeFormatCode2Of5Configuration":return new p(t);case"BarcodeFormatDataBarConfiguration":return new f(t);case"BarcodeFormatDataBarExpandedConfiguration":return new m(t);case"BarcodeFormatDataBarLimitedConfiguration":return new g(t);case"BarcodeFormatITFConfiguration":return new v(t);case"BarcodeFormatMSIPlesseyConfiguration":return new b(t);case"BarcodeFormatUpcEanConfiguration":return new y(t);case"BarcodeFormatPharmaCodeConfiguration":return new A(t);case"BarcodeFormatAztecConfiguration":return new C(t);case"BarcodeFormatQRCodeConfiguration":return new S(t);case"BarcodeFormatPDF417Configuration":return new x(t);case"BarcodeFormatMicroPDF417Configuration":return new w(t);case"BarcodeFormatDataMatrixConfiguration":return new O(t);case"BarcodeFormatMaxiCodeConfiguration":return new E(t);case"BarcodeFormatAustraliaPostConfiguration":return new L(t);case"BarcodeFormatJapanPostConfiguration":return new j(t);case"BarcodeFormatRoyalMailConfiguration":return new k(t);case"BarcodeFormatRoyalTNTPostConfiguration":return new _(t);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new T(t);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new P(t);case"BarcodeFormatGS1CompositeConfiguration":return new R(t);case"BarcodeFormatCommonOneDConfiguration":return new D(t);case"BarcodeFormatCommonTwoDConfiguration":return new B(t);case"BarcodeFormatCommonFourStateConfiguration":return new F(t);case"BarcodeFormatCommonConfiguration":return new I(t);default:throw`Unknown child class name: ${e}`}}}(r||(r={})),function(t){t.From=function(t){const e=t._type;switch(e){case"BarcodeFormatCodabarConfiguration":return new l(t);case"BarcodeFormatCode11Configuration":return new c(t);case"BarcodeFormatCode39Configuration":return new u(t);case"BarcodeFormatCode93Configuration":return new d(t);case"BarcodeFormatCode128Configuration":return new h(t);case"BarcodeFormatCode2Of5Configuration":return new p(t);case"BarcodeFormatDataBarConfiguration":return new f(t);case"BarcodeFormatDataBarExpandedConfiguration":return new m(t);case"BarcodeFormatDataBarLimitedConfiguration":return new g(t);case"BarcodeFormatITFConfiguration":return new v(t);case"BarcodeFormatMSIPlesseyConfiguration":return new b(t);case"BarcodeFormatUpcEanConfiguration":return new y(t);case"BarcodeFormatPharmaCodeConfiguration":return new A(t);default:throw`Unknown child class name: ${e}`}}}(o||(o={}));class l extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCodabarConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.returnStartEnd&&(this.returnStartEnd=t.returnStartEnd)}}class c extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode11Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.checksum&&(this.checksum=t.checksum)}}class u extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode39Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.code32&&(this.code32=t.code32),void 0!==t.code39&&(this.code39=t.code39),void 0!==t.pzn&&(this.pzn=t.pzn),void 0!==t.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=t.tryCode39ExtendedMode),void 0!==t.useCode39CheckDigit&&(this.useCode39CheckDigit=t.useCode39CheckDigit)}}class d extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode93Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class h extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode128Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class p extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCode2Of5Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.iata2of5&&(this.iata2of5=t.iata2of5),void 0!==t.code25&&(this.code25=t.code25),void 0!==t.industrial2of5&&(this.industrial2of5=t.industrial2of5),void 0!==t.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=t.useIATA2OF5Checksum)}}class f extends s.a{constructor(t={}){super(),this._type="BarcodeFormatDataBarConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class m extends s.a{constructor(t={}){super(),this._type="BarcodeFormatDataBarExpandedConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class g extends s.a{constructor(t={}){super(),this._type="BarcodeFormatDataBarLimitedConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class v extends s.a{constructor(t={}){super(),this._type="BarcodeFormatITFConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class b extends s.a{constructor(t={}){super(),this._type="BarcodeFormatMSIPlesseyConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.checksumAlgorithms&&(this.checksumAlgorithms=t.checksumAlgorithms.map((t=>t)))}}class y extends s.a{constructor(t={}){super(),this._type="BarcodeFormatUpcEanConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.ean8&&(this.ean8=t.ean8),void 0!==t.ean13&&(this.ean13=t.ean13),void 0!==t.upca&&(this.upca=t.upca),void 0!==t.upce&&(this.upce=t.upce),void 0!==t.extensions&&(this.extensions=t.extensions)}}class A extends s.a{constructor(t={}){super(),this._type="BarcodeFormatPharmaCodeConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue),void 0!==t.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=t.allowNarrowBarsOnly),void 0!==t.allowWideBarsOnly&&(this.allowWideBarsOnly=t.allowWideBarsOnly)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"BarcodeFormatAztecConfiguration":return new C(t);case"BarcodeFormatQRCodeConfiguration":return new S(t);case"BarcodeFormatPDF417Configuration":return new x(t);case"BarcodeFormatMicroPDF417Configuration":return new w(t);case"BarcodeFormatDataMatrixConfiguration":return new O(t);case"BarcodeFormatMaxiCodeConfiguration":return new E(t);default:throw`Unknown child class name: ${e}`}}}(i||(i={}));class C extends s.a{constructor(t={}){super(),this._type="BarcodeFormatAztecConfiguration",this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class S extends s.a{constructor(t={}){super(),this._type="BarcodeFormatQRCodeConfiguration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.qr&&(this.qr=t.qr),void 0!==t.microQr&&(this.microQr=t.microQr),void 0!==t.rmqr&&(this.rmqr=t.rmqr)}}class x extends s.a{constructor(t={}){super(),this._type="BarcodeFormatPDF417Configuration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class w extends s.a{constructor(t={}){super(),this._type="BarcodeFormatMicroPDF417Configuration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class O extends s.a{constructor(t={}){super(),this._type="BarcodeFormatDataMatrixConfiguration",this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class E extends s.a{constructor(t={}){super(),this._type="BarcodeFormatMaxiCodeConfiguration",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"BarcodeFormatAustraliaPostConfiguration":return new L(t);case"BarcodeFormatJapanPostConfiguration":return new j(t);case"BarcodeFormatRoyalMailConfiguration":return new k(t);case"BarcodeFormatRoyalTNTPostConfiguration":return new _(t);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new T(t);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new P(t);default:throw`Unknown child class name: ${e}`}}}(a||(a={}));class L extends s.a{constructor(t={}){super(),this._type="BarcodeFormatAustraliaPostConfiguration",this.regexFilter="",this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=t.australiaPostCustomerFormat)}}class j extends s.a{constructor(t={}){super(),this._type="BarcodeFormatJapanPostConfiguration",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class k extends s.a{constructor(t={}){super(),this._type="BarcodeFormatRoyalMailConfiguration",this.regexFilter="",this.stripCheckDigits=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits)}}class _ extends s.a{constructor(t={}){super(),this._type="BarcodeFormatRoyalTNTPostConfiguration",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class T extends s.a{constructor(t={}){super(),this._type="BarcodeFormatUSPSIntelligentMailConfiguration",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class P extends s.a{constructor(t={}){super(),this._type="BarcodeFormatPharmaCodeTwoTrackConfiguration",this.regexFilter="",this.minimumValue=364,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue)}}class R extends s.a{constructor(t={}){super(),this._type="BarcodeFormatGS1CompositeConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class D extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCommonOneDConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class B extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCommonTwoDConfiguration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class F extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCommonFourStateConfiguration",this.regexFilter="",this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class I extends s.a{constructor(t={}){super(),this._type="BarcodeFormatCommonConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}},function(t,e,n){"use strict";var r=n(107);const o=Object(r.a)();e.a=o},function(t,e,n){"use strict";var r=n(14),o=n(20),i=n(45);var a=function(...t){const e=t.reduce(((t,e)=>(e.filterProps.forEach((n=>{t[n]=e})),t)),{}),n=t=>Object.keys(t).reduce(((n,r)=>e[r]?Object(i.a)(n,e[r](t)):n),{});return n.propTypes={},n.filterProps=t.reduce(((t,e)=>t.concat(e.filterProps)),[]),n},s=n(31);function l(t){return"number"!=typeof t?t:`${t}px solid`}function c(t,e){return Object(o.a)({prop:t,themeKey:"borders",transform:e})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),b=c("borderBottomColor"),y=c("borderLeftColor"),A=c("outline",l),C=c("outlineColor"),S=t=>{if(void 0!==t.borderRadius&&null!==t.borderRadius){const e=Object(r.b)(t.theme,"shape.borderRadius",4,"borderRadius"),n=t=>({borderRadius:Object(r.c)(e,t)});return Object(s.b)(t,t.borderRadius,n)}return null};S.propTypes={},S.filterProps=["borderRadius"];a(u,d,h,p,f,m,g,v,b,y,S,A,C);const x=t=>{if(void 0!==t.gap&&null!==t.gap){const e=Object(r.b)(t.theme,"spacing",8,"gap"),n=t=>({gap:Object(r.c)(e,t)});return Object(s.b)(t,t.gap,n)}return null};x.propTypes={},x.filterProps=["gap"];const w=t=>{if(void 0!==t.columnGap&&null!==t.columnGap){const e=Object(r.b)(t.theme,"spacing",8,"columnGap"),n=t=>({columnGap:Object(r.c)(e,t)});return Object(s.b)(t,t.columnGap,n)}return null};w.propTypes={},w.filterProps=["columnGap"];const O=t=>{if(void 0!==t.rowGap&&null!==t.rowGap){const e=Object(r.b)(t.theme,"spacing",8,"rowGap"),n=t=>({rowGap:Object(r.c)(e,t)});return Object(s.b)(t,t.rowGap,n)}return null};O.propTypes={},O.filterProps=["rowGap"];a(x,w,O,Object(o.a)({prop:"gridColumn"}),Object(o.a)({prop:"gridRow"}),Object(o.a)({prop:"gridAutoFlow"}),Object(o.a)({prop:"gridAutoColumns"}),Object(o.a)({prop:"gridAutoRows"}),Object(o.a)({prop:"gridTemplateColumns"}),Object(o.a)({prop:"gridTemplateRows"}),Object(o.a)({prop:"gridTemplateAreas"}),Object(o.a)({prop:"gridArea"}));function E(t,e){return"grey"===e?e:t}a(Object(o.a)({prop:"color",themeKey:"palette",transform:E}),Object(o.a)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:E}),Object(o.a)({prop:"backgroundColor",themeKey:"palette",transform:E}));function L(t){return t<=1&&0!==t?100*t+"%":t}const j=Object(o.a)({prop:"width",transform:L}),k=t=>{if(void 0!==t.maxWidth&&null!==t.maxWidth){const e=e=>{var n,r;const o=(null==(n=t.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[e])||s.e[e];return o?"px"!==(null==(r=t.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:L(e)}};return Object(s.b)(t,t.maxWidth,e)}return null};k.filterProps=["maxWidth"];const _=Object(o.a)({prop:"minWidth",transform:L}),T=Object(o.a)({prop:"height",transform:L}),P=Object(o.a)({prop:"maxHeight",transform:L}),R=Object(o.a)({prop:"minHeight",transform:L});Object(o.a)({prop:"size",cssProperty:"width",transform:L}),Object(o.a)({prop:"size",cssProperty:"height",transform:L});a(j,k,_,T,P,R,Object(o.a)({prop:"boxSizing"}));const D={border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:S},color:{themeKey:"palette",transform:E},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:E},backgroundColor:{themeKey:"palette",transform:E},p:{style:r.e},pt:{style:r.e},pr:{style:r.e},pb:{style:r.e},pl:{style:r.e},px:{style:r.e},py:{style:r.e},padding:{style:r.e},paddingTop:{style:r.e},paddingRight:{style:r.e},paddingBottom:{style:r.e},paddingLeft:{style:r.e},paddingX:{style:r.e},paddingY:{style:r.e},paddingInline:{style:r.e},paddingInlineStart:{style:r.e},paddingInlineEnd:{style:r.e},paddingBlock:{style:r.e},paddingBlockStart:{style:r.e},paddingBlockEnd:{style:r.e},m:{style:r.d},mt:{style:r.d},mr:{style:r.d},mb:{style:r.d},ml:{style:r.d},mx:{style:r.d},my:{style:r.d},margin:{style:r.d},marginTop:{style:r.d},marginRight:{style:r.d},marginBottom:{style:r.d},marginLeft:{style:r.d},marginX:{style:r.d},marginY:{style:r.d},marginInline:{style:r.d},marginInlineStart:{style:r.d},marginInlineEnd:{style:r.d},marginBlock:{style:r.d},marginBlockStart:{style:r.d},marginBlockEnd:{style:r.d},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:x},rowGap:{style:O},columnGap:{style:w},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:L},maxWidth:{style:k},minWidth:{transform:L},height:{transform:L},maxHeight:{transform:L},minHeight:{transform:L},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};e.a=D},function(t,e,n){"use strict";(function(t){function r(t,e=!1){const n=[];if(e)return n;return function t(e){if(e)if(e.constructor===ImageData)n.push(e.data.buffer);else if(e.constructor===ArrayBuffer)n.push(e);else if(ArrayBuffer.isView(e))n.push(e.buffer);else if(Array.isArray(e))for(let n=0;n<e.length;++n)t(e[n]);else if(e.constructor===Object)for(const n in e)e.hasOwnProperty(n)&&t(e[n])}(t),n}function o(t){return t.startsWith("http:")||t.startsWith("https:")}function i(){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}}function a(t){const{allowSimd:e=!0,allowThreads:n=!0}=t||{};let r="";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}}()){r+="-simd";n&&i()&&(r+="-threads")}return r}n.d(e,"b",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return a}))}).call(this,n(92))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{constructor(){this.values=new Map}}r.INSTANCE=new r},,function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeItem",(function(){return a})),n.d(e,"BarcodeScannerConfiguration",(function(){return s})),n.d(e,"BarcodeScannerResult",(function(){return l}));var r=n(60),o=n(5),i=n(38);class a extends o.a{constructor(t={}){if(super(),this.format="NONE",this.isUpsideDown=!1,this.sourceImage=null,this.isGS1Message=!1,this.isGS1CompositePart=!1,this.dataBarStackSize=1,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0!==t.format&&(this.format=t.format),void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0!==t.isUpsideDown&&(this.isUpsideDown=t.isUpsideDown),void 0!==t.sourceImage&&(this.sourceImage=null!=t.sourceImage?t.sourceImage:null),void 0===t.rawBytes)throw new Error("rawBytes must be present in constructor argument");if(this.rawBytes=t.rawBytes,void 0===t.upcEanExtension)throw new Error("upcEanExtension must be present in constructor argument");if(this.upcEanExtension=t.upcEanExtension,void 0!==t.isGS1Message&&(this.isGS1Message=t.isGS1Message),void 0!==t.isGS1CompositePart&&(this.isGS1CompositePart=t.isGS1CompositePart),void 0!==t.dataBarStackSize&&(this.dataBarStackSize=t.dataBarStackSize),void 0===t.parsedDocument)throw new Error("parsedDocument must be present in constructor argument");this.parsedDocument=null!=t.parsedDocument?new i.GenericDocument(t.parsedDocument):null}}class s extends o.a{constructor(t={}){super(),this.barcodeFormatConfigurations=[new r.BarcodeFormatCommonConfiguration({})],this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.onlyAcceptDocuments=!1,this.returnBarcodeImage=!0,this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,void 0!==t.barcodeFormatConfigurations&&(this.barcodeFormatConfigurations=t.barcodeFormatConfigurations.map((t=>r.BarcodeFormatConfigurationBase.From(t)))),void 0!==t.acceptedDocumentFormats&&(this.acceptedDocumentFormats=t.acceptedDocumentFormats.map((t=>t))),void 0!==t.onlyAcceptDocuments&&(this.onlyAcceptDocuments=t.onlyAcceptDocuments),void 0!==t.returnBarcodeImage&&(this.returnBarcodeImage=t.returnBarcodeImage),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.live&&(this.live=t.live)}}class l extends o.a{constructor(t={}){if(super(),void 0===t.barcodes)throw new Error("barcodes must be present in constructor argument");if(this.barcodes=t.barcodes.map((t=>new a(t))),void 0===t.success)throw new Error("success must be present in constructor argument");this.success=t.success}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(0),i=n(7),a=n(10),s=n(159),l=n(9),c=n(16),u=n(11),d=n(158),h=n(124);function p(t){return Object(h.a)("MuiSvgIcon",t)}Object(d.a)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var f=n(4);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=Object(u.a)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,"inherit"!==n.color&&e[`color${Object(l.a)(n.color)}`],e[`fontSize${Object(l.a)(n.fontSize)}`]]}})((({theme:t,ownerState:e})=>{var n,r,o,i,a,s,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=t.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=t.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=t.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=t.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:null!=(d=null==(h=(t.vars||t).palette)||null==(h=h[e.color])?void 0:h.main)?d:{action:null==(p=(t.vars||t).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.disabled,inherit:void 0}[e.color]}})),v=o.forwardRef((function(t,e){const n=Object(c.a)({props:t,name:"MuiSvgIcon"}),{children:u,className:d,color:h="inherit",component:v="svg",fontSize:b="medium",htmlColor:y,inheritViewBox:A=!1,titleAccess:C,viewBox:S="0 0 24 24"}=n,x=Object(i.a)(n,m),w=o.isValidElement(u)&&"svg"===u.type,O=Object(r.a)({},n,{color:h,component:v,fontSize:b,instanceFontSize:t.fontSize,inheritViewBox:A,viewBox:S,hasSvgAsChild:w}),E={};A||(E.viewBox=S);const L=(t=>{const{color:e,fontSize:n,classes:r}=t,o={root:["root","inherit"!==e&&`color${Object(l.a)(e)}`,`fontSize${Object(l.a)(n)}`]};return Object(s.a)(o,p,r)})(O);return Object(f.jsxs)(g,Object(r.a)({as:v,className:Object(a.a)(L.root,d),focusable:"false",color:y,"aria-hidden":!C||void 0,role:C?"img":void 0,ref:e},E,x,w&&u.props,{ownerState:O,children:[w?u.props.children:u,C?Object(f.jsx)("title",{children:C}):null]}))}));v.muiName="SvgIcon";var b=v;function y(t,e){function n(n,o){return Object(f.jsx)(b,Object(r.a)({"data-testid":`${e}Icon`,ref:o},n,{children:t}))}return n.muiName=b.muiName,o.memo(o.forwardRef(n))}},function(t,e,n){"use strict";var r=n(0),o=n(108);let i=!0,a=!1;const s=new o.a,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(t){t.metaKey||t.altKey||t.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function h(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch(t){}return i||function(t){const{type:e,tagName:n}=t;return!("INPUT"!==n||!l[e]||t.readOnly)||"TEXTAREA"===n&&!t.readOnly||!!t.isContentEditable}(e)}e.a=function(){const t=r.useCallback((t=>{var e;null!=t&&((e=t.ownerDocument).addEventListener("keydown",c,!0),e.addEventListener("mousedown",u,!0),e.addEventListener("pointerdown",u,!0),e.addEventListener("touchstart",u,!0),e.addEventListener("visibilitychange",d,!0))}),[]),e=r.useRef(!1);return{isFocusVisibleRef:e,onFocus:function(t){return!!h(t)&&(e.current=!0,!0)},onBlur:function(){return!!e.current&&(a=!0,s.start(100,(()=>{a=!1})),e.current=!1,!0)},ref:t}}},function(t,e,n){"use strict";e.a=function(t,e=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{t.apply(this,r)}),e)}return r.clear=()=>{clearTimeout(n)},r}},function(t,e,n){"use strict";var r=n(0);e.a=function(t,e){var n,o;return r.isValidElement(t)&&-1!==e.indexOf(null!=(n=t.type.muiName)?n:null==(o=t.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{constructor(){this.container=void 0,this.containerId=void 0}static mapValues(t,e,n){Object.keys(t).forEach((r=>{(null==n?void 0:n.includes(r))||(e[r]=t[r])}))}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])?r.mapValuesDeep(t[o],e[o]):e[o]=t[o]}))}static _fromJson(t,e){return this.mapValuesDeep(e,t),t}}},function(t,e,n){"use strict";var r=n(132),o=n(73);const i=Object(r.a)();e.a=function(t=i){return Object(o.a)(t)}},function(t,e,n){"use strict";var r=n(0),o=n(29);e.a=function(t=null){const e=r.useContext(o.a);return e&&(n=e,0!==Object.keys(n).length)?e:t;var n}},function(t,e,n){"use strict";var r,o=function(){return"undefined"==typeof r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=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={},r=[],o=0;o<t.length;o++){var i=t[o],l=e.base?i[0]+e.base:i[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=s(u),h={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(a[d].references++,a[d].updater(h)):a.push({identifier:u,updater:g(h,e),references:1}),r.push(u)}return r}function c(t){var e=document.createElement("style"),r=t.attributes||{};if("undefined"==typeof r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var a=i(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,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=d(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function p(t,e,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var f=null,m=0;function g(t,e){var n,r,o;if(e.singleton){var i=m++;n=f||(f=c(e)),r=h.bind(null,n,i,!1),o=h.bind(null,n,i,!0)}else n=c(e),r=p.bind(null,n,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<n.length;r++){var o=s(n[r]);a[o].references--}for(var i=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=i}}}},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,r){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);r&&o[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";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},function(t,e,n){"use strict";var r="6.0.0-dev.6";class o{}o.VERSION=r,o.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@6.0.0-dev.6/bundle/",o.DEFAULT_WASM_FOLDER="bin/complete/",o.BUILD_WITH_UI=!0;var i=n(63);class a{constructor(t,e){this.errorInWorker=null,this.createProxy=t=>new Proxy({},{get:(e,n,r)=>(...e)=>this.post(n,e,t)}),this.handleUnrecoverableError=t=>{this.errorInWorker=t;for(const e in this.continuations)this.continuations[e].reject(t),delete this.continuations[e]},this.copyArgs=this.createProxy("copy"),this.transferArgs=this.createProxy("transfer");const{requestSuffix:n=""}=e||{},r=Object(i.c)(e),o=`${t}${t.endsWith("/")?"":"/"}ScanbotSDK.Core${r}.js${n}`;if(Object(i.d)(o)){const t=new Blob([`importScripts("${o}")`]);this.instance=new Worker(URL.createObjectURL(t))}else this.instance=new Worker(o);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:r,result:o,recoverableError:i,unrecoverableError:a}=t.data,s=this.continuations[r];if(!s)return;const{resolve:l,reject:c}=s;delete this.continuations[r],a?(c(a),this.handleUnrecoverableError(a)):i?c(i):l(o)},this.instance.onerror=t=>{this.handleUnrecoverableError(t.error)}}post(t,e,n){return this.errorInWorker?Promise.reject(this.errorInWorker):new Promise(((r,o)=>{const a=Object(i.b)(e,"copy"==n),s=this.nextTicketId++;this.continuations[s]={resolve:r,reject:o},this.instance.postMessage({command:t,args:e,ticket:s},a)}))}destroy(){this.instance.terminate()}}var s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class l extends Error{}class c extends Error{}class u{constructor(t,e,n){this.copyArgs=this.createProxy("copy"),this.transferArgs=this.createProxy("transfer"),t||(t=o.CDN_PATH+o.DEFAULT_WASM_FOLDER),this.core=new a(t,e),this.coreInitializationSuccessful=(()=>s(this,void 0,void 0,(function*(){if(yield this.core.copyArgs.initialize(...n)){let e;try{e=yield this.core.copyArgs.version()}catch(t){e="Error"}const n=o.VERSION;return e!==n?new c(`Version mismatch! \nVersion of ScanbotSDK.(ui2.)min.js is "${n}" \nbut the version of the loaded ScanbotSDK.Core*.js file is "${e}". \nThe ScanbotSDK.Core*.js file was loaded from ${t}.`):"OK"}return new l("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.")})))()}awaitInitialized(){return s(this,void 0,void 0,(function*(){yield this.getCoreForCommand()}))}createProxy(t){return new Proxy({},{get:(e,n,r)=>(...e)=>s(this,void 0,void 0,(function*(){const r=yield this.getCoreForCommand(n),o="copy"===t?r.copyArgs:r.transferArgs;return yield o[n](...e)}))})}getCoreForCommand(t=""){return s(this,void 0,void 0,(function*(){const e=yield this.coreInitializationSuccessful;if("OK"===e||"getLicenseInfo"===t&&e instanceof l)return this.core;throw e}))}destroy(){this.core.destroy(),this.core=void 0}}class d{isValid(){return"Okay"===this.status||"Trial"===this.status}static fromJson(t){const e=new d;return e.status=t.licenseStatus,e.description=t.description,e}}var h=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class p{constructor(t,e){this._sdk=t,this._pdfOperation=e}addPage(t,e="COPY_IMAGE"){return h(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);yield n.addPageToPdf(this._pdfOperation,t)}))}complete(){return h(this,void 0,void 0,(function*(){return yield this._sdk.bridge.copyArgs.completePdf(this._pdfOperation)}))}}var f=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class m{constructor(t,e){this._sdk=t,this._tiffOperation=e}addPage(t,e={}){return f(this,void 0,void 0,(function*(){const{binarize:n="ENABLED_IF_BINARIZATION_FILTER_SET",consumeImage:r="COPY_IMAGE"}=e,o=this._sdk.getBridge(r);yield o.addPageToTiff(this._tiffOperation,t,n)}))}complete(){return f(this,void 0,void 0,(function*(){return yield this._sdk.bridge.copyArgs.completeTiff(this._tiffOperation)}))}}var g=n(41);class v{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){if(t&&t.hasOwnProperty(e))return t[e]}static uuid(){let t="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length;for(let r=0;r<5;r++)t+=e.charAt(Math.floor(Math.random()*n));return t}}var b=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class y{static toDataUrl(t){return new Promise(((e,n)=>{const r=new Blob([t],{type:"image/jpeg"}),o=new FileReader;o.onload=()=>e(o.result),o.onerror=()=>n(o.error),o.readAsDataURL(r)}))}static getObjectFitSize(t,e,n=!0){const r=e.width/e.height,o=t.width/t.height;let i=0,a=0;(n?r>o:r<o)?(i=t.width,a=i/r):(a=t.height,i=a*r);const s=(t.width-i)/2,l=(t.height-a)/2;return new g.a(s,l,i,a)}static loadFromUrl(t){return new Promise(((e,n)=>{const r=document.createElement("img");r.src=t,r.onload=()=>b(this,void 0,void 0,(function*(){const t=document.createElement("canvas");t.width=r.width,t.height=r.height;const n=t.getContext("2d");n.drawImage(r,0,0);const o=n.getImageData(0,0,r.width,r.height);e(o)})),r.onerror=n}))}static saveImageData(t){const e=this.createImageDataCanvas(t),n=" ("+t.width+"x"+t.height+")";e.toBlob((t=>this.saveBlob(t,v.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 r=URL.createObjectURL(t);n.setAttribute("href",r),n.click()}static convertImageDataWrapperToImageData(t){if(t)return new ImageData(t.data,t.width,t.height)}static wrapperToBase64(t){return y.createImageDataCanvas(y.convertImageDataWrapperToImageData(t)).toDataURL("image/png")}static toBase64(t){return b(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 A{saveImageAsJpeg(t,e){if(!t||0===t.length)return void console.log("Data cannot be null or empty");e||(e=v.uuid()+".jpeg");let n=new Blob([t],{type:"image/jpeg"});y.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]}}var C=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class S{constructor(t,e){this._sdk=t,this._mrzRecognizerToken=e}recognize(t,e="COPY_IMAGE"){return C(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.recognizeMRZ(yield this._mrzRecognizerToken,t)}))}recognizeURL(t){return C(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),r=document.createElement("img");r.src=t,r.onload=()=>C(this,void 0,void 0,(function*(){n.width=r.width,n.height=r.height;const t=n.getContext("2d");t.drawImage(r,0,0);const o=t.getImageData(0,0,r.width,r.height),i=yield this.recognize(o);e(i||void 0)}))}))}))}release(){return C(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(yield this._mrzRecognizerToken)}))}}var x=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class w{constructor(t,e){this._sdk=t,this._OcrEngineToken=e}performOcr(t,e="COPY_IMAGE"){return x(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.performOcr(this._OcrEngineToken,t)}))}recognizeURL(t){return x(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),r=document.createElement("img");r.src=t,r.onload=()=>x(this,void 0,void 0,(function*(){n.width=r.width,n.height=r.height;const t=n.getContext("2d");t.drawImage(r,0,0);const o=t.getImageData(0,0,r.width,r.height),i=yield this.performOcr(o);e(i)}))}))}))}release(){return x(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._OcrEngineToken)}))}}var O=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class E{constructor(t,e){this._sdk=t,this._textDataScannerToken=e}recognize(t,e="COPY_IMAGE"){return O(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.recognizeTextLine(yield this._textDataScannerToken,t)}))}cleanRecognitionQueue(){return O(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.cleanTextLineRecognitionQueue(yield this._textDataScannerToken)}))}recognizeURL(t){return O(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),r=document.createElement("img");r.src=t,r.onload=()=>O(this,void 0,void 0,(function*(){n.width=r.width,n.height=r.height;const t=n.getContext("2d");t.drawImage(r,0,0);const o=t.getImageData(0,0,r.width,r.height),i=yield this.recognize(o,"CONSUME_IMAGE");i&&e(i)}))}))}))}release(){return O(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(yield this._textDataScannerToken)}))}}var L=n(32),j=n(43),k=n(19);class _ extends j.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_HD),this.ocrConfiguration=new k.GenericTextLineScannerTypes.ScannerConfiguration,this.onTextDetected=function(t){},this.finder.aspectRatio=new k.Geometry.AspectRatio({width:6,height:1}),this.userGuidance.title.text="Please hold the device over the text to start scanning"}static fromJson(t){const e=new _;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class T extends j.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_HD),this.ocrConfiguration=new k.GenericTextLineScannerTypes.ScannerConfiguration,this.onTextDetected=function(t){},this.finder.aspectRatio=new k.Geometry.AspectRatio({width:6,height:1}),this.userGuidance.title.text="Please hold the device over the vehicle identification number to start scanning"}static fromJson(t){const e=new T;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class P extends Error{constructor(t){super(t.description),this.name="LicenseError"}}class R{static throwIfMissingBuffer(t){R.throwIfMissing(t,"ImageBuffer may not be null")}static throwIfMissing(t,e){if(!t)throw new Error(e)}}var D=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class B{constructor(t,e){this._sdk=t,this._token=e}analyze(t,e="COPY_IMAGE"){return D(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const n=this._sdk.getBridge(e);return yield n.documentQualityAnalyzerAnalyze(this._token,t)}))}release(){return D(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._token)}))}}var F=n(34),I=n(0),M=n(94),W=n(30),z=n(2),N=n(7);var V=I.createContext(null);function U(){return I.useContext(V)}var H="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",$=n(4);var G=function(t){const{children:e,theme:n}=t,r=U(),o=I.useMemo((()=>{const t=null===r?n:function(t,e){if("function"==typeof e)return e(t);return Object(z.a)({},t,e)}(r,n);return null!=t&&(t[H]=null!==r),t}),[n,r]);return Object($.jsx)(V.Provider,{value:o,children:e})},Y=n(29),Q=n(73);const Z={};function X(t,e,n,r=!1){return I.useMemo((()=>{const o=t&&e[t]||e;if("function"==typeof n){const i=n(o),a=t?Object(z.a)({},e,{[t]:i}):i;return r?()=>a:a}return t?Object(z.a)({},e,{[t]:n}):Object(z.a)({},e,n)}),[t,e,n,r])}var q=function(t){const{children:e,theme:n,themeId:r}=t,o=Object(Q.a)(Z),i=U()||Z,a=X(r,o,n),s=X(r,i,n,!0);return Object($.jsx)(G,{theme:s,children:Object($.jsx)(Y.a.Provider,{value:a,children:e})})},K=n(40);const J=["theme"];function tt(t){let{theme:e}=t,n=Object(N.a)(t,J);const r=e[K.a];return Object($.jsx)(q,Object(z.a)({},n,{themeId:r?K.a:void 0,theme:r||e}))}var et=n(10),nt=n(55),rt=n(96),ot=n(110),it=n(62);const at=["sx"];function st(t){const{sx:e}=t,n=Object(N.a)(t,at),{systemProps:r,otherProps:o}=(t=>{var e,n;const r={systemProps:{},otherProps:{}},o=null!=(e=null==t||null==(n=t.theme)?void 0:n.unstable_sxConfig)?e:it.a;return Object.keys(t).forEach((e=>{o[e]?r.systemProps[e]=t[e]:r.otherProps[e]=t[e]})),r})(n);let i;return i=Array.isArray(e)?[r,...e]:"function"==typeof e?(...t)=>{const n=e(...t);return Object(ot.b)(n)?Object(z.a)({},r,n):r}:Object(z.a)({},r,e),Object(z.a)({},o,{sx:i})}var lt=n(72);const ct=["className","component"];var ut=n(125),dt=n(107),ht=n(158);var pt=Object(ht.a)("MuiBox",["root"]);const ft=Object(dt.a)();var mt=function(t={}){const{themeId:e,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=t,i=Object(nt.a)("div",{shouldForwardProp:t=>"theme"!==t&&"sx"!==t&&"as"!==t})(rt.a);return I.forwardRef((function(t,a){const s=Object(lt.a)(n),l=st(t),{className:c,component:u="div"}=l,d=Object(N.a)(l,ct);return Object($.jsx)(i,Object(z.a)({as:u,ref:a,className:Object(et.a)(c,o?o(r):r),theme:e&&s[e]||s},d))}))}({themeId:K.a,defaultTheme:ft,defaultClassName:pt.root,generateClassName:ut.a.generate}),gt=n(6),vt=n(159),bt=n(11),yt=n(16),At=n(9),Ct=n(162);var St=t=>{let e;return e=t<1?5.11916*t**2:4.5*Math.log(t+1)+2,(e/100).toFixed(2)},xt=n(124);function wt(t){return Object(xt.a)("MuiPaper",t)}Object(ht.a)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Ot=["className","component","elevation","square","variant"],Et=Object(bt.a)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,"elevation"===n.variant&&e[`elevation${n.elevation}`]]}})((({theme:t,ownerState:e})=>{var n;return Object(z.a)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},"outlined"===e.variant&&{border:`1px solid ${(t.vars||t).palette.divider}`},"elevation"===e.variant&&Object(z.a)({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:`linear-gradient(${Object(Ct.a)("#fff",St(e.elevation))}, ${Object(Ct.a)("#fff",St(e.elevation))})`},t.vars&&{backgroundImage:null==(n=t.vars.overlays)?void 0:n[e.elevation]}))}));var Lt=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:s="elevation"}=n,l=Object(N.a)(n,Ot),c=Object(z.a)({},n,{component:o,elevation:i,square:a,variant:s}),u=(t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded","elevation"===r&&`elevation${n}`]};return Object(vt.a)(i,wt,o)})(c);return Object($.jsx)(Et,Object(z.a)({as:o,ownerState:c,className:Object(et.a)(u.root,r),ref:e},l))}));function jt(t){return Object(xt.a)("MuiAppBar",t)}Object(ht.a)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const kt=["className","color","enableColorOnDark","position"],_t=(t,e)=>t?`${null==t?void 0:t.replace(")","")}, ${e})`:e,Tt=Object(bt.a)(Lt,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${Object(At.a)(n.position)}`],e[`color${Object(At.a)(n.color)}`]]}})((({theme:t,ownerState:e})=>{const n="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return Object(z.a)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===e.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===e.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===e.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===e.position&&{position:"static"},"relative"===e.position&&{position:"relative"},!t.vars&&Object(z.a)({},"default"===e.color&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&"default"!==e.color&&"inherit"!==e.color&&"transparent"!==e.color&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},"inherit"===e.color&&{color:"inherit"},"dark"===t.palette.mode&&!e.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===e.color&&Object(z.a)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&Object(z.a)({},"default"===e.color&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:_t(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:_t(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:_t(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:_t(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===e.color?"inherit":"var(--AppBar-color)"},"transparent"===e.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}));var Pt=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiAppBar"}),{className:r,color:o="primary",enableColorOnDark:i=!1,position:a="fixed"}=n,s=Object(N.a)(n,kt),l=Object(z.a)({},n,{color:o,position:a,enableColorOnDark:i}),c=(t=>{const{color:e,position:n,classes:r}=t,o={root:["root",`color${Object(At.a)(e)}`,`position${Object(At.a)(n)}`]};return Object(vt.a)(o,jt,r)})(l);return Object($.jsx)(Tt,Object(z.a)({square:!0,component:"header",ownerState:l,elevation:4,className:Object(et.a)(c.root,r,"fixed"===a&&"mui-fixed"),ref:e},s))}));function Rt(t){return Object(xt.a)("MuiToolbar",t)}Object(ht.a)("MuiToolbar",["root","gutters","regular","dense"]);const Dt=["className","component","disableGutters","variant"],Bt=Object(bt.a)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})((({theme:t,ownerState:e})=>Object(z.a)({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===e.variant&&{minHeight:48})),(({theme:t,ownerState:e})=>"regular"===e.variant&&t.mixins.toolbar));var Ft=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiToolbar"}),{className:r,component:o="div",disableGutters:i=!1,variant:a="regular"}=n,s=Object(N.a)(n,Dt),l=Object(z.a)({},n,{component:o,disableGutters:i,variant:a}),c=(t=>{const{classes:e,disableGutters:n,variant:r}=t,o={root:["root",!n&&"gutters",r]};return Object(vt.a)(o,Rt,e)})(l);return Object($.jsx)(Bt,Object(z.a)({as:o,className:Object(et.a)(c.root,r),ref:e,ownerState:l},s))}));function It(t){return Object(xt.a)("MuiTypography",t)}Object(ht.a)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Mt=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Wt=Object(bt.a)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],"inherit"!==n.align&&e[`align${Object(At.a)(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})((({theme:t,ownerState:e})=>Object(z.a)({margin:0},"inherit"===e.variant&&{font:"inherit"},"inherit"!==e.variant&&t.typography[e.variant],"inherit"!==e.align&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16}))),zt={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Nt={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var Vt=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiTypography"}),r=(t=>Nt[t]||t)(n.color),o=st(Object(z.a)({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:h=zt}=o,p=Object(N.a)(o,Mt),f=Object(z.a)({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:h}),m=s||(u?"p":h[d]||zt[d])||"span",g=(t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=t,s={root:["root",i,"inherit"!==t.align&&`align${Object(At.a)(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Object(vt.a)(s,It,a)})(f);return Object($.jsx)(Wt,Object(z.a)({as:m,ref:e,ownerState:f,className:Object(et.a)(g.root,a)},p))})),Ut=n(100),Ht=n.n(Ut);const $t="var(--1-sb-dvh, 1vh)";function Gt(){const t=Object(I.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(I.useEffect)((()=>{if(e(),!t)return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}})),null}var Yt=n(54),Qt=n(24),Zt=n(127),Xt=n(36),qt=n(42),Kt=n(68);function Jt(t,e){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jt(t,e)}function te(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jt(t,e)}var ee=I.default.createContext(null);function ne(t,e){var n=Object.create(null);return t&&I.Children.map(t,(function(t){return t})).forEach((function(t){n[t.key]=function(t){return e&&Object(I.isValidElement)(t)?e(t):t}(t)})),n}function re(t,e,n){return null!=n[e]?n[e]:t.props[e]}function oe(t,e,n){var r=ne(t.children),o=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var r,o=Object.create(null),i=[];for(var a in t)a in e?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in e){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(e,r);return Object.keys(o).forEach((function(i){var a=o[i];if(Object(I.isValidElement)(a)){var s=i in e,l=i in r,c=e[i],u=Object(I.isValidElement)(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&Object(I.isValidElement)(c)&&(o[i]=Object(I.cloneElement)(a,{onExited:n.bind(null,a),in:c.props.in,exit:re(a,"exit",t),enter:re(a,"enter",t)})):o[i]=Object(I.cloneElement)(a,{in:!1}):o[i]=Object(I.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:re(a,"exit",t),enter:re(a,"enter",t)})}})),o}var ie=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))},ae=function(t){function e(e,n){var r,o=(r=t.call(this,e,n)||this).handleExited.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}te(e,t);var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(t,e){var n,r,o=e.children,i=e.handleExited;return{children:e.firstRender?(n=t,r=i,ne(n.children,(function(t){return Object(I.cloneElement)(t,{onExited:r.bind(null,t),in:!0,appear:re(t,"appear",n),enter:re(t,"enter",n),exit:re(t,"exit",n)})}))):oe(t,o,i),firstRender:!1}},n.handleExited=function(t,e){var n=ne(this.props.children);t.key in n||(t.props.onExited&&t.props.onExited(e),this.mounted&&this.setState((function(e){var n=Object(z.a)({},e.children);return delete n[t.key],{children:n}})))},n.render=function(){var t=this.props,e=t.component,n=t.childFactory,r=Object(N.a)(t,["component","childFactory"]),o=this.state.contextValue,i=ie(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===e?I.default.createElement(ee.Provider,{value:o},i):I.default.createElement(ee.Provider,{value:o},I.default.createElement(e,r,i))},e}(I.default.Component);ae.propTypes={},ae.defaultProps={component:"div",childFactory:function(t){return t}};var se=ae,le=n(108);var ce=function(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=t,[u,d]=I.useState(!1),h=Object(et.a)(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+i,left:-a/2+o},f=Object(et.a)(n.child,u&&n.childLeaving,r&&n.childPulsate);return s||u||d(!0),I.useEffect((()=>{if(!s&&null!=l){const t=setTimeout(l,c);return()=>{clearTimeout(t)}}}),[l,s,c]),Object($.jsx)("span",{className:h,style:p,children:Object($.jsx)("span",{className:f})})};var ue=Object(ht.a)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const de=["center","classes","className"];let he,pe,fe,me,ge=t=>t;const ve=Object(Y.d)(he||(he=ge`
32
32
  0% {
33
33
  transform: scale(0);
34
34
  opacity: 0.1;
@@ -181,7 +181,7 @@
181
181
  `),xn,(e.vars||e).palette.action.hover)));var On=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:i="span",height:a,style:s,variant:l="text",width:c}=n,u=Object(N.a)(n,gn),d=Object(z.a)({},n,{animation:r,component:i,variant:l,hasChildren:Boolean(u.children)}),h=(t=>{const{classes:e,variant:n,animation:r,hasChildren:o,width:i,height:a}=t,s={root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]};return Object(vt.a)(s,mn,e)})(d);return Object($.jsx)(wn,Object(z.a)({as:i,ref:e,className:Object(et.a)(h.root,o),ownerState:d},u,{style:Object(z.a)({width:c,height:a},s)}))}));function En(t){return Object(xt.a)("MuiButtonGroup",t)}var Ln=Object(ht.a)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);const jn=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],kn=Object(bt.a)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Ln.grouped}`]:e.grouped},{[`& .${Ln.grouped}`]:e[`grouped${Object(At.a)(n.orientation)}`]},{[`& .${Ln.grouped}`]:e[`grouped${Object(At.a)(n.variant)}`]},{[`& .${Ln.grouped}`]:e[`grouped${Object(At.a)(n.variant)}${Object(At.a)(n.orientation)}`]},{[`& .${Ln.grouped}`]:e[`grouped${Object(At.a)(n.variant)}${Object(At.a)(n.color)}`]},{[`& .${Ln.firstButton}`]:e.firstButton},{[`& .${Ln.lastButton}`]:e.lastButton},{[`& .${Ln.middleButton}`]:e.middleButton},e.root,e[n.variant],!0===n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,"vertical"===n.orientation&&e.vertical]}})((({theme:t,ownerState:e})=>Object(z.a)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"contained"===e.variant&&{boxShadow:(t.vars||t).shadows[2]},e.disableElevation&&{boxShadow:"none"},e.fullWidth&&{width:"100%"},"vertical"===e.orientation&&{flexDirection:"column"},{[`& .${Ln.grouped}`]:Object(z.a)({minWidth:40,"&:hover":Object(z.a)({},"contained"===e.variant&&{boxShadow:"none"})},"contained"===e.variant&&{boxShadow:"none"}),[`& .${Ln.firstButton},& .${Ln.middleButton}`]:Object(z.a)({},"horizontal"===e.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===e.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===e.variant&&"horizontal"===e.orientation&&{borderRight:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${Ln.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}},"text"===e.variant&&"vertical"===e.orientation&&{borderBottom:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${Ln.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}},"text"===e.variant&&"inherit"!==e.color&&{borderColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:Object(Ct.a)(t.palette[e.color].main,.5)},"outlined"===e.variant&&"horizontal"===e.orientation&&{borderRightColor:"transparent"},"outlined"===e.variant&&"vertical"===e.orientation&&{borderBottomColor:"transparent"},"contained"===e.variant&&"horizontal"===e.orientation&&{borderRight:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${Ln.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}},"contained"===e.variant&&"vertical"===e.orientation&&{borderBottom:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${Ln.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}},"contained"===e.variant&&"inherit"!==e.color&&{borderColor:(t.vars||t).palette[e.color].dark},{"&:hover":Object(z.a)({},"outlined"===e.variant&&"horizontal"===e.orientation&&{borderRightColor:"currentColor"},"outlined"===e.variant&&"vertical"===e.orientation&&{borderBottomColor:"currentColor"})}),[`& .${Ln.lastButton},& .${Ln.middleButton}`]:Object(z.a)({},"horizontal"===e.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===e.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===e.variant&&"horizontal"===e.orientation&&{marginLeft:-1},"outlined"===e.variant&&"vertical"===e.orientation&&{marginTop:-1})})));var _n=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiButtonGroup"}),{children:r,className:o,color:i="primary",component:a="div",disabled:s=!1,disableElevation:l=!1,disableFocusRipple:c=!1,disableRipple:u=!1,fullWidth:d=!1,orientation:h="horizontal",size:p="medium",variant:f="outlined"}=n,m=Object(N.a)(n,jn),g=Object(z.a)({},n,{color:i,component:a,disabled:s,disableElevation:l,disableFocusRipple:c,disableRipple:u,fullWidth:d,orientation:h,size:p,variant:f}),v=(t=>{const{classes:e,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=t,l={root:["root",s,"vertical"===a&&"vertical",i&&"fullWidth",o&&"disableElevation"],grouped:["grouped",`grouped${Object(At.a)(a)}`,`grouped${Object(At.a)(s)}`,`grouped${Object(At.a)(s)}${Object(At.a)(a)}`,`grouped${Object(At.a)(s)}${Object(At.a)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Object(vt.a)(l,En,e)})(g),b=I.useMemo((()=>({className:v.grouped,color:i,disabled:s,disableElevation:l,disableFocusRipple:c,disableRipple:u,fullWidth:d,size:p,variant:f})),[i,s,l,c,u,d,p,f,v.grouped]),y=function(t){return I.Children.toArray(t).filter((t=>I.isValidElement(t)))}(r),A=y.length,C=t=>{const e=0===t,n=t===A-1;return e&&n?"":e?v.firstButton:n?v.lastButton:v.middleButton};return Object($.jsx)(kn,Object(z.a)({as:a,role:"group",className:Object(et.a)(v.root,o),ref:e,ownerState:g},m,{children:Object($.jsx)(_e.Provider,{value:b,children:y.map(((t,e)=>Object($.jsx)(Te.Provider,{value:C(e),children:t},e)))})}))})),Tn=n(101),Pn=n.n(Tn),Rn=n(102),Dn=n.n(Rn),Bn=n(103),Fn=n.n(Bn);function In(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 Mn(t){if(t.loading)return I.default.createElement(On,{variant:"rounded",width:t.imageSize,height:t.imageSize,style:{borderRadius:8}});if(null===t.data.barcodeImage){const e={width:t.imageSize,height:t.imageSize,backgroundColor:"#E0E0E0",borderRadius:3};return I.default.createElement(mt,{sx:e})}const e={width:t.imageSize,height:t.imageSize,borderRadius:8};return I.default.createElement("img",{src:t.data.barcodeImage,alt:t.data.title,style:e})}function Wn(t){var e,n;const r=(null===(e=t.barcodeMappedData)||void 0===e?void 0:e.state)||"LOADING",o=(null===(n=t.barcodeMappedData)||void 0===n?void 0:n.value)||{title:"",subtitle:"",barcodeImage:""},i=!t||"LOADED"!==r,a=t.imageSize,s=t.barcodeTitle.visible||t.barcodeSubtitle.visible||t.counterForm,l=t.counterForm&&{"&:hover, &:focus, &:active, &":{borderColor:gt.b.getColorValue(t.counterForm.manualCountOutlineColor),backgroundColor:"transparent"}};return I.default.createElement(mt,{sx:{display:"flex"},"data-sb-barcode-info":"1"},t.barcodeImageVisible&&I.default.createElement(mt,{sx:{pr:s?"16px":0,display:"flex",alignItems:"center",justifyContent:"center"}},I.default.createElement(Mn,{data:o,imageSize:a,loading:i})),s&&I.default.createElement(mt,{sx:{flex:1,display:"flex",flexDirection:"column",verticalAlign:"middle",justifyContent:"center",m:0,p:0,minWidth:0}},t.barcodeTitle.visible&&I.default.createElement(mt,{display:i?"block":"flex",sx:{alignItems:"center"}},I.default.createElement(Vt,{fontSize:16,fontWeight:"bold",sx:Object.assign(Object.assign({},In(t.maxNumberOfTitleLines)),Object(Qt.b)(t.barcodeTitle))},i?I.default.createElement(On,{variant:"text"}):o.title),t.displayRightArrow&&!i&&I.default.createElement(Pn.a,{sx:{fontSize:16,fontWeight:"bold",color:gt.b.getColorValue(t.barcodeTitle.color)}})),t.barcodeSubtitle.visible&&I.default.createElement(Vt,{fontSize:14,fontWeight:400,sx:Object.assign(Object.assign({},In(t.maxNumberOfSubtitleLines)),Object(Qt.b)(t.barcodeSubtitle))},i?I.default.createElement(On,{variant:"text"}):o.subtitle),t.counterForm&&I.default.createElement(_n,{variant:"outlined"},I.default.createElement(Ie,{disabled:!t.counterForm.removeButtonEnabled,sx:l,style:{opacity:t.counterForm.removeButtonEnabled?1:.3},onClick:()=>t.counterForm.setCounter(t.counterForm.counter-1),disableRipple:!0},I.default.createElement(Dn.a,{sx:{color:gt.b.getColorValue(t.counterForm.manualCountChangeColor)}})),I.default.createElement(Ie,{sx:Object.assign(Object.assign({},l),{color:gt.b.getColorValue(t.counterForm.manualCountChangeColor),fontWeight:"bold",fontSize:16}),onClick:t.counterForm.onNumberClick,disableRipple:!0},t.counterForm.counter),I.default.createElement(Ie,{disabled:!t.counterForm.addButtonEnabled,sx:l,style:{opacity:t.counterForm.addButtonEnabled?1:.3},onClick:()=>t.counterForm.setCounter(t.counterForm.counter+1),disableRipple:!0},I.default.createElement(Fn.a,{sx:{color:gt.b.getColorValue(t.counterForm.manualCountChangeColor)}})))))}var zn=n(31),Nn=n(61);function Vn(){const t=Object(lt.a)(Nn.a);return t[K.a]||t}var Un=I.createContext();function Hn(t){return Object(xt.a)("MuiGrid",t)}const $n=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];var Gn=Object(ht.a)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((t=>`spacing-xs-${t}`)),...["column-reverse","column","row-reverse","row"].map((t=>`direction-xs-${t}`)),...["nowrap","wrap-reverse","wrap"].map((t=>`wrap-xs-${t}`)),...$n.map((t=>`grid-xs-${t}`)),...$n.map((t=>`grid-sm-${t}`)),...$n.map((t=>`grid-md-${t}`)),...$n.map((t=>`grid-lg-${t}`)),...$n.map((t=>`grid-xl-${t}`))]);const Yn=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Qn(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function Zn({breakpoints:t,values:e}){let n="";Object.keys(e).forEach((t=>{""===n&&0!==e[t]&&(n=t)}));const r=Object.keys(t).sort(((e,n)=>t[e]-t[n]));return r.slice(0,r.indexOf(n))}const Xn=Object(bt.a)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(t,e,n={}){if(!t||t<=0)return[];if("string"==typeof t&&!Number.isNaN(Number(t))||"number"==typeof t)return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach((e=>{const o=t[e];Number(o)>0&&r.push(n[`spacing-${e}-${String(o)}`])})),r}(a,c,e));const d=[];return c.forEach((t=>{const r=n[t];r&&d.push(e[`grid-${t}-${String(r)}`])})),[e.root,r&&e.container,i&&e.item,l&&e.zeroMinWidth,...u,"row"!==o&&e[`direction-xs-${String(o)}`],"wrap"!==s&&e[`wrap-xs-${String(s)}`],...d]}})((({ownerState:t})=>Object(z.a)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})),(function({theme:t,ownerState:e}){const n=Object(zn.d)({values:e.direction,breakpoints:t.breakpoints.values});return Object(zn.b)({theme:t},n,(t=>{const e={flexDirection:t};return 0===t.indexOf("column")&&(e[`& > .${Gn.item}`]={maxWidth:"none"}),e}))}),(function({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let o={};if(n&&0!==r){const e=Object(zn.d)({values:r,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=Zn({breakpoints:t.breakpoints.values,values:e})),o=Object(zn.b)({theme:t},e,((e,r)=>{var o;const i=t.spacing(e);return"0px"!==i?{marginTop:`-${Qn(i)}`,[`& > .${Gn.item}`]:{paddingTop:Qn(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${Gn.item}`]:{paddingTop:0}}}))}return o}),(function({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let o={};if(n&&0!==r){const e=Object(zn.d)({values:r,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=Zn({breakpoints:t.breakpoints.values,values:e})),o=Object(zn.b)({theme:t},e,((e,r)=>{var o;const i=t.spacing(e);return"0px"!==i?{width:`calc(100% + ${Qn(i)})`,marginLeft:`-${Qn(i)}`,[`& > .${Gn.item}`]:{paddingLeft:Qn(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${Gn.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce(((r,o)=>{let i={};if(e[o]&&(n=e[o]),!n)return r;if(!0===n)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=Object(zn.d)({values:e.columns,breakpoints:t.breakpoints.values}),s="object"==typeof a?a[o]:a;if(null==s)return r;const l=Math.round(n/s*1e8)/1e6+"%";let c={};if(e.container&&e.item&&0!==e.columnSpacing){const n=t.spacing(e.columnSpacing);if("0px"!==n){const t=`calc(${l} + ${Qn(n)})`;c={flexBasis:t,maxWidth:t}}}i=Object(z.a)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===t.breakpoints.values[o]?Object.assign(r,i):r[t.breakpoints.up(o)]=i,r}),{})}));const qn=t=>{const{classes:e,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=t;let c=[];n&&(c=function(t,e){if(!t||t<=0)return[];if("string"==typeof t&&!Number.isNaN(Number(t))||"number"==typeof t)return[`spacing-xs-${String(t)}`];const n=[];return e.forEach((e=>{const r=t[e];if(Number(r)>0){const t=`spacing-${e}-${String(r)}`;n.push(t)}})),n}(i,l));const u=[];l.forEach((e=>{const n=t[e];n&&u.push(`grid-${e}-${String(n)}`)}));const d={root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]};return Object(vt.a)(d,Hn,e)};var Kn=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiGrid"}),{breakpoints:r}=Vn(),o=st(n),{className:i,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:h,spacing:p=0,wrap:f="wrap",zeroMinWidth:m=!1}=o,g=Object(N.a)(o,Yn),v=h||p,b=s||p,y=I.useContext(Un),A=c?a||12:y,C={},S=Object(z.a)({},g);r.keys.forEach((t=>{null!=g[t]&&(C[t]=g[t],delete S[t])}));const x=Object(z.a)({},o,{columns:A,container:c,direction:u,item:d,rowSpacing:v,columnSpacing:b,wrap:f,zeroMinWidth:m,spacing:p},C,{breakpoints:r.keys}),w=qn(x);return Object($.jsx)(Un.Provider,{value:A,children:Object($.jsx)(Xn,Object(z.a)({ownerState:x,className:Object(et.a)(w.root,i),as:l,ref:e},S))})}));function Jn(t){return Object(xt.a)("MuiDivider",t)}Object(ht.a)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const tr=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],er=Object(bt.a)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,"vertical"===n.orientation&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&"vertical"===n.orientation&&e.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&e.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&e.textAlignLeft]}})((({theme:t,ownerState:e})=>Object(z.a)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:Object(Ct.a)(t.palette.divider,.08)},"inset"===e.variant&&{marginLeft:72},"middle"===e.variant&&"horizontal"===e.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===e.variant&&"vertical"===e.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===e.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:t})=>Object(z.a)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:t,ownerState:e})=>Object(z.a)({},e.children&&"vertical"!==e.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`}})),(({theme:t,ownerState:e})=>Object(z.a)({},e.children&&"vertical"===e.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`}})),(({ownerState:t})=>Object(z.a)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),nr=Object(bt.a)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,"vertical"===n.orientation&&e.wrapperVertical]}})((({theme:t,ownerState:e})=>Object(z.a)({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},"vertical"===e.orientation&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`}))),rr=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:h="fullWidth"}=n,p=Object(N.a)(n,tr),f=Object(z.a)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:h}),m=(t=>{const{absolute:e,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=t,c={root:["root",e&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return Object(vt.a)(c,Jn,r)})(f);return Object($.jsx)(er,Object(z.a)({as:a,className:Object(et.a)(m.root,i),role:u,ref:e,ownerState:f},p,{children:o?Object($.jsx)(nr,{className:m.wrapper,ownerState:f,children:o}):null}))}));rr.muiSkipListHighlight=!0;var or=rr;W.ButtonConfiguration;function ir(t){const e=Object(I.useContext)(gt.a).getColorValue;return t.visible?I.default.createElement(Ie,{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&&I.default.createElement(t.icon,{sx:{color:e(t.foreground.color),pr:2}}),I.default.createElement(Qt.a,{config:{visible:!0,text:t.text,color:t.foreground.color,useShadow:t.foreground.useShadow}})):null}var ar=n(161),sr=n(128);function lr(t){return"string"==typeof t}function cr(t,e,n){return void 0===t||lr(t)?e:Object(z.a)({},e,{ownerState:Object(z.a)({},e.ownerState,n)})}function ur(t,e=[]){if(void 0===t)return{};const n={};return Object.keys(t).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof t[n]&&!e.includes(n))).forEach((e=>{n[e]=t[e]})),n}function dr(t){if(void 0===t)return{};const e={};return Object.keys(t).filter((e=>!(e.match(/^on[A-Z]/)&&"function"==typeof t[e]))).forEach((n=>{e[n]=t[n]})),e}function hr(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const t=Object(et.a)(null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),e=Object(z.a)({},null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),a=Object(z.a)({},n,o,r);return t.length>0&&(a.className=t),Object.keys(e).length>0&&(a.style=e),{props:a,internalRef:void 0}}const a=ur(Object(z.a)({},o,r)),s=dr(r),l=dr(o),c=e(a),u=Object(et.a)(null==c?void 0:c.className,null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),d=Object(z.a)({},null==c?void 0:c.style,null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),h=Object(z.a)({},c,n,l,s);return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function pr(t,e,n){return"function"==typeof t?t(e,n):t}const fr=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function mr(t){var e;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=t,a=Object(N.a)(t,fr),s=i?{}:pr(r,o),{props:l,internalRef:c}=hr(Object(z.a)({},a,{externalSlotProps:s})),u=Object(sr.a)(c,null==s?void 0:s.ref,null==(e=t.additionalProps)?void 0:e.ref);return cr(n,Object(z.a)({},l,{ref:u}),o)}var gr=n(112),vr=n(130),br=n(160),yr=n(131);function Ar(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function Cr(t){return parseInt(Object(yr.a)(t).getComputedStyle(t).paddingRight,10)||0}function Sr(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,(t=>{const e=-1===i.indexOf(t),n=!function(t){const e=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName),n="INPUT"===t.tagName&&"hidden"===t.getAttribute("type");return e||n}(t);e&&n&&Ar(t,o)}))}function xr(t,e){let n=-1;return t.some(((t,r)=>!!e(t)&&(n=r,!0))),n}function wr(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(function(t){const e=Object(gr.a)(t);return e.body===t?Object(yr.a)(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}(r)){const t=function(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}(Object(gr.a)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Cr(r)+t}px`;const e=Object(gr.a)(r).querySelectorAll(".mui-fixed");[].forEach.call(e,(e=>{n.push({value:e.style.paddingRight,property:"padding-right",el:e}),e.style.paddingRight=`${Cr(e)+t}px`}))}let t;if(r.parentNode instanceof DocumentFragment)t=Object(gr.a)(r).body;else{const e=r.parentElement,n=Object(yr.a)(r);t="HTML"===(null==e?void 0:e.nodeName)&&"scroll"===n.getComputedStyle(e).overflowY?e:r}n.push({value:t.style.overflow,property:"overflow",el:t},{value:t.style.overflowX,property:"overflow-x",el:t},{value:t.style.overflowY,property:"overflow-y",el:t}),t.style.overflow="hidden"}return()=>{n.forEach((({value:t,el:e,property:n})=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}))}}const Or=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,e){let n=this.modals.indexOf(t);if(-1!==n)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&Ar(t.modalRef,!1);const r=function(t){const e=[];return[].forEach.call(t.children,(t=>{"true"===t.getAttribute("aria-hidden")&&e.push(t)})),e}(e);Sr(e,t.mount,t.modalRef,r,!0);const o=xr(this.containers,(t=>t.container===e));return-1!==o?(this.containers[o].modals.push(t),n):(this.containers.push({modals:[t],container:e,restore:null,hiddenSiblings:r}),n)}mount(t,e){const n=xr(this.containers,(e=>-1!==e.modals.indexOf(t))),r=this.containers[n];r.restore||(r.restore=wr(r,e))}remove(t,e=!0){const n=this.modals.indexOf(t);if(-1===n)return n;const r=xr(this.containers,(e=>-1!==e.modals.indexOf(t))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),t.modalRef&&Ar(t.modalRef,e),Sr(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const t=o.modals[o.modals.length-1];t.modalRef&&Ar(t.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}};function Er(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=Or,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=t,h=I.useRef({}),p=I.useRef(null),f=I.useRef(null),m=Object(sr.a)(f,d),[g,v]=I.useState(!u),b=function(t){return!!t&&t.props.hasOwnProperty("in")}(l);let y=!0;"false"!==t["aria-hidden"]&&!1!==t["aria-hidden"]||(y=!1);const A=()=>(h.current.modalRef=f.current,h.current.mount=p.current,h.current),C=()=>{o.mount(A(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},S=Object(vr.a)((()=>{const t=function(t){return"function"==typeof t?t():t}(e)||Object(gr.a)(p.current).body;o.add(A(),t),f.current&&C()})),x=I.useCallback((()=>o.isTopModal(A())),[o]),w=Object(vr.a)((t=>{p.current=t,t&&(u&&x()?C():f.current&&Ar(f.current,y))})),O=I.useCallback((()=>{o.remove(A(),y)}),[y,o]);I.useEffect((()=>()=>{O()}),[O]),I.useEffect((()=>{u?S():b&&i||O()}),[u,O,b,i,S]);const E=t=>e=>{var r;null==(r=t.onKeyDown)||r.call(t,e),"Escape"===e.key&&229!==e.which&&x()&&(n||(e.stopPropagation(),c&&c(e,"escapeKeyDown")))},L=t=>e=>{var n;null==(n=t.onClick)||n.call(t,e),e.target===e.currentTarget&&c&&c(e,"backdropClick")};return{getRootProps:(e={})=>{const n=ur(t);delete n.onTransitionEnter,delete n.onTransitionExited;const r=Object(z.a)({},n,e);return Object(z.a)({role:"presentation"},r,{onKeyDown:E(r),ref:m})},getBackdropProps:(t={})=>{const e=t;return Object(z.a)({"aria-hidden":!0},e,{onClick:L(e),open:u})},getTransitionProps:()=>({onEnter:Object(br.a)((()=>{v(!1),a&&a()}),null==l?void 0:l.props.onEnter),onExited:Object(br.a)((()=>{v(!0),s&&s(),i&&O()}),null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:w,isTopModal:x,exited:g,hasTransition:b}}const Lr=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function jr(t){const e=[],n=[];return Array.from(t.querySelectorAll(Lr)).forEach(((t,r)=>{const o=function(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?"true"===t.contentEditable||("AUDIO"===t.nodeName||"VIDEO"===t.nodeName||"DETAILS"===t.nodeName)&&null===t.getAttribute("tabindex")?0:t.tabIndex:e}(t);-1!==o&&function(t){return!(t.disabled||"INPUT"===t.tagName&&"hidden"===t.type||function(t){if("INPUT"!==t.tagName||"radio"!==t.type)return!1;if(!t.name)return!1;const e=e=>t.ownerDocument.querySelector(`input[type="radio"]${e}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}(t))}(t)&&(0===o?e.push(t):n.push({documentOrder:r,tabIndex:o,node:t}))})),n.sort(((t,e)=>t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex)).map((t=>t.node)).concat(e)}function kr(){return!0}function _r(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=jr,isEnabled:a=kr,open:s}=t,l=I.useRef(!1),c=I.useRef(null),u=I.useRef(null),d=I.useRef(null),h=I.useRef(null),p=I.useRef(!1),f=I.useRef(null),m=Object(sr.a)(e.ref,f),g=I.useRef(null);I.useEffect((()=>{s&&f.current&&(p.current=!n)}),[n,s]),I.useEffect((()=>{if(!s||!f.current)return;const t=Object(gr.a)(f.current);return f.current.contains(t.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),p.current&&f.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}}),[s]),I.useEffect((()=>{if(!s||!f.current)return;const t=Object(gr.a)(f.current),e=e=>{g.current=e,!r&&a()&&"Tab"===e.key&&t.activeElement===f.current&&e.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const e=f.current;if(null===e)return;if(!t.hasFocus()||!a()||l.current)return void(l.current=!1);if(e.contains(t.activeElement))return;if(r&&t.activeElement!==c.current&&t.activeElement!==u.current)return;if(t.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!p.current)return;let n=[];if(t.activeElement!==c.current&&t.activeElement!==u.current||(n=i(f.current)),n.length>0){var o,s;const t=Boolean((null==(o=g.current)?void 0:o.shiftKey)&&"Tab"===(null==(s=g.current)?void 0:s.key)),e=n[0],r=n[n.length-1];"string"!=typeof e&&"string"!=typeof r&&(t?r.focus():e.focus())}else e.focus()};t.addEventListener("focusin",n),t.addEventListener("keydown",e,!0);const o=setInterval((()=>{t.activeElement&&"BODY"===t.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),t.removeEventListener("focusin",n),t.removeEventListener("keydown",e,!0)}}),[n,r,o,a,s,i]);const v=t=>{null===d.current&&(d.current=t.relatedTarget),p.current=!0};return Object($.jsxs)(I.Fragment,{children:[Object($.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:c,"data-testid":"sentinelStart"}),I.cloneElement(e,{ref:m,onFocus:t=>{null===d.current&&(d.current=t.relatedTarget),p.current=!0,h.current=t.target;const n=e.props.onFocus;n&&n(t)}}),Object($.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":"sentinelEnd"})]})}var Tr=n(111),Pr=n(129);const Rr=I.forwardRef((function(t,e){const{children:n,container:r,disablePortal:o=!1}=t,[i,a]=I.useState(null),s=Object(sr.a)(I.isValidElement(n)?n.ref:null,e);if(Object(Tr.a)((()=>{o||a(function(t){return"function"==typeof t?t():t}(r)||document.body)}),[r,o]),Object(Tr.a)((()=>{if(i&&!o)return Object(Pr.a)(e,i),()=>{Object(Pr.a)(e,null)}}),[e,i,o]),o){if(I.isValidElement(n)){const t={ref:s};return I.cloneElement(n,t)}return Object($.jsx)(I.Fragment,{children:n})}return Object($.jsx)(I.Fragment,{children:i?I.createPortal(n,i):i})}));var Dr=!1,Br="unmounted",Fr="exited",Ir="entering",Mr="entered",Wr="exiting",zr=function(t){function e(e,n){var r;r=t.call(this,e,n)||this;var o,i=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?i?(o=Fr,r.appearStatus=Ir):o=Mr:o=e.unmountOnExit||e.mountOnEnter?Br:Fr,r.state={status:o},r.nextCallback=null,r}te(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Br?{status:Fr}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==Ir&&n!==Mr&&(e=Ir):n!==Ir&&n!==Mr||(e=Wr)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,r=this.props.timeout;return t=e=n=r,null!=r&&"number"!=typeof r&&(t=r.exit,e=r.enter,n=void 0!==r.appear?r.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===Ir){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:I.default.findDOMNode(this);n&&function(t){t.scrollTop}(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Fr&&this.setState({status:Br})},n.performEnter=function(t){var e=this,n=this.props.enter,r=this.context?this.context.isMounting:t,o=this.props.nodeRef?[r]:[I.default.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!t&&!n||Dr?this.safeSetState({status:Mr},(function(){e.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:Ir},(function(){e.props.onEntering(i,a),e.onTransitionEnd(l,(function(){e.safeSetState({status:Mr},(function(){e.props.onEntered(i,a)}))}))})))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:I.default.findDOMNode(this);e&&!Dr?(this.props.onExit(r),this.safeSetState({status:Wr},(function(){t.props.onExiting(r),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Fr},(function(){t.props.onExited(r)}))}))}))):this.safeSetState({status:Fr},(function(){t.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,e.nextCallback=null,t(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:I.default.findDOMNode(this),r=null==t&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Br)return null;var e=this.props,n=e.children,r=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Object(N.a)(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return I.default.createElement(ee.Provider,{value:null},"function"==typeof n?n(t,r):I.default.cloneElement(I.default.Children.only(n),r))},e}(I.default.Component);function Nr(){}zr.contextType=ee,zr.propTypes={},zr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nr,onEntering:Nr,onEntered:Nr,onExit:Nr,onExiting:Nr,onExited:Nr},zr.UNMOUNTED=Br,zr.EXITED=Fr,zr.ENTERING=Ir,zr.ENTERED=Mr,zr.EXITING=Wr;var Vr=zr;const Ur=t=>t.scrollTop;function Hr(t,e){var n,r;const{timeout:o,easing:i,style:a={}}=t;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof o?o:o[e.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof i?i[e.mode]:i,delay:a.transitionDelay}}const $r=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Gr={entering:{opacity:1},entered:{opacity:1}};var Yr=I.forwardRef((function(t,e){const n=Vn(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:h,onExited:p,onExiting:f,style:m,timeout:g=r,TransitionComponent:v=Vr}=t,b=Object(N.a)(t,$r),y=I.useRef(null),A=Object(Xt.a)(y,a.ref,e),C=t=>e=>{if(t){const n=y.current;void 0===e?t(n):t(n,e)}},S=C(d),x=C(((t,e)=>{Ur(t);const r=Hr({style:m,timeout:g,easing:s},{mode:"enter"});t.style.webkitTransition=n.transitions.create("opacity",r),t.style.transition=n.transitions.create("opacity",r),c&&c(t,e)})),w=C(u),O=C(f),E=C((t=>{const e=Hr({style:m,timeout:g,easing:s},{mode:"exit"});t.style.webkitTransition=n.transitions.create("opacity",e),t.style.transition=n.transitions.create("opacity",e),h&&h(t)})),L=C(p);return Object($.jsx)(v,Object(z.a)({appear:i,in:l,nodeRef:y,onEnter:x,onEntered:w,onEntering:S,onExit:E,onExited:L,onExiting:O,addEndListener:t=>{o&&o(y.current,t)},timeout:g},b,{children:(t,e)=>I.cloneElement(a,Object(z.a)({style:Object(z.a)({opacity:0,visibility:"exited"!==t||l?void 0:"hidden"},Gr[t],m,a.props.style),ref:A},e))}))}));function Qr(t){return Object(xt.a)("MuiBackdrop",t)}Object(ht.a)("MuiBackdrop",["root","invisible"]);const Zr=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Xr=Object(bt.a)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})((({ownerState:t})=>Object(z.a)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})));var qr=I.forwardRef((function(t,e){var n,r,o;const i=Object(yt.a)({props:t,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:h,slotProps:p={},slots:f={},TransitionComponent:m=Yr,transitionDuration:g}=i,v=Object(N.a)(i,Zr),b=Object(z.a)({},i,{component:l,invisible:d}),y=(t=>{const{classes:e,invisible:n}=t,r={root:["root",n&&"invisible"]};return Object(vt.a)(r,Qr,e)})(b),A=null!=(n=p.root)?n:u.root;return Object($.jsx)(m,Object(z.a)({in:h,timeout:g},v,{children:Object($.jsx)(Xr,Object(z.a)({"aria-hidden":!0},A,{as:null!=(r=null!=(o=f.root)?o:c.Root)?r:l,className:Object(et.a)(y.root,s,null==A?void 0:A.className),ownerState:Object(z.a)({},b,null==A?void 0:A.ownerState),classes:y,ref:e,children:a}))}))}));function Kr(t){return Object(xt.a)("MuiModal",t)}Object(ht.a)("MuiModal",["root","hidden","backdrop"]);const Jr=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],to=Object(bt.a)("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})((({theme:t,ownerState:e})=>Object(z.a)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"}))),eo=Object(bt.a)(qr,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1});var no=I.forwardRef((function(t,e){var n,r,o,i,a,s;const l=Object(yt.a)({name:"MuiModal",props:t}),{BackdropComponent:c=eo,BackdropProps:u,className:d,closeAfterTransition:h=!1,children:p,container:f,component:m,components:g={},componentsProps:v={},disableAutoFocus:b=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:A=!1,disablePortal:C=!1,disableRestoreFocus:S=!1,disableScrollLock:x=!1,hideBackdrop:w=!1,keepMounted:O=!1,onBackdropClick:E,open:L,slotProps:j,slots:k}=l,_=Object(N.a)(l,Jr),T=Object(z.a)({},l,{closeAfterTransition:h,disableAutoFocus:b,disableEnforceFocus:y,disableEscapeKeyDown:A,disablePortal:C,disableRestoreFocus:S,disableScrollLock:x,hideBackdrop:w,keepMounted:O}),{getRootProps:P,getBackdropProps:R,getTransitionProps:D,portalRef:B,isTopModal:F,exited:M,hasTransition:W}=Er(Object(z.a)({},T,{rootRef:e})),V=Object(z.a)({},T,{exited:M}),U=(t=>{const{open:e,exited:n,classes:r}=t,o={root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]};return Object(vt.a)(o,Kr,r)})(V),H={};if(void 0===p.props.tabIndex&&(H.tabIndex="-1"),W){const{onEnter:t,onExited:e}=D();H.onEnter=t,H.onExited=e}const G=null!=(n=null!=(r=null==k?void 0:k.root)?r:g.Root)?n:to,Y=null!=(o=null!=(i=null==k?void 0:k.backdrop)?i:g.Backdrop)?o:c,Q=null!=(a=null==j?void 0:j.root)?a:v.root,Z=null!=(s=null==j?void 0:j.backdrop)?s:v.backdrop,X=mr({elementType:G,externalSlotProps:Q,externalForwardedProps:_,getSlotProps:P,additionalProps:{ref:e,as:m},ownerState:V,className:Object(et.a)(d,null==Q?void 0:Q.className,null==U?void 0:U.root,!V.open&&V.exited&&(null==U?void 0:U.hidden))}),q=mr({elementType:Y,externalSlotProps:Z,additionalProps:u,getSlotProps:t=>R(Object(z.a)({},t,{onClick:e=>{E&&E(e),null!=t&&t.onClick&&t.onClick(e)}})),className:Object(et.a)(null==Z?void 0:Z.className,null==u?void 0:u.className,null==U?void 0:U.backdrop),ownerState:V});return O||L||W&&!M?Object($.jsx)(Rr,{ref:B,container:f,disablePortal:C,children:Object($.jsxs)(G,Object(z.a)({},X,{children:[!w&&c?Object($.jsx)(Y,Object(z.a)({},q)):null,Object($.jsx)(_r,{disableEnforceFocus:y,disableAutoFocus:b,disableRestoreFocus:S,isEnabled:F,open:L,children:I.cloneElement(p,H)})]}))}):null}));function ro(t){return Object(xt.a)("MuiDialog",t)}var oo=Object(ht.a)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var io=I.createContext({});const ao=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],so=Object(bt.a)(qr,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),lo=Object(bt.a)(no,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),co=Object(bt.a)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Object(At.a)(n.scroll)}`]]}})((({ownerState:t})=>Object(z.a)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),uo=Object(bt.a)(Lt,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Object(At.a)(n.scroll)}`],e[`paperWidth${Object(At.a)(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})((({theme:t,ownerState:e})=>Object(z.a)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===e.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===e.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===e.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${oo.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&"xs"!==e.maxWidth&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${oo.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${oo.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})));var ho=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiDialog"}),r=Vn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":a,BackdropComponent:s,BackdropProps:l,children:c,className:u,disableEscapeKeyDown:d=!1,fullScreen:h=!1,fullWidth:p=!1,maxWidth:f="sm",onBackdropClick:m,onClose:g,open:v,PaperComponent:b=Lt,PaperProps:y={},scroll:A="paper",TransitionComponent:C=Yr,transitionDuration:S=o,TransitionProps:x}=n,w=Object(N.a)(n,ao),O=Object(z.a)({},n,{disableEscapeKeyDown:d,fullScreen:h,fullWidth:p,maxWidth:f,scroll:A}),E=(t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=t,a={root:["root"],container:["container",`scroll${Object(At.a)(n)}`],paper:["paper",`paperScroll${Object(At.a)(n)}`,`paperWidth${Object(At.a)(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Object(vt.a)(a,ro,e)})(O),L=I.useRef(),j=Object(ar.a)(a),k=I.useMemo((()=>({titleId:j})),[j]);return Object($.jsx)(lo,Object(z.a)({className:Object(et.a)(E.root,u),closeAfterTransition:!0,components:{Backdrop:so},componentsProps:{backdrop:Object(z.a)({transitionDuration:S,as:s},l)},disableEscapeKeyDown:d,onClose:g,open:v,ref:e,onClick:t=>{L.current&&(L.current=null,m&&m(t),g&&g(t,"backdropClick"))},ownerState:O},w,{children:Object($.jsx)(C,Object(z.a)({appear:!0,in:v,timeout:S,role:"presentation"},x,{children:Object($.jsx)(co,{className:Object(et.a)(E.container),onMouseDown:t=>{L.current=t.target===t.currentTarget},ownerState:O,children:Object($.jsx)(uo,Object(z.a)({as:b,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":j},y,{className:Object(et.a)(E.paper,y.className),ownerState:O,children:Object($.jsx)(io.Provider,{value:k,children:c})}))})}))}))})),po=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function fo(t){var e,{modalOverlayColor:n}=t,r=po(t,["modalOverlayColor"]);const o={backdrop:{style:{backgroundColor:gt.b.getColorValue(n)}}},i=Object.assign(Object.assign({},r.PaperProps),{sx:Object.assign(Object.assign({},null===(e=r.PaperProps)||void 0===e?void 0:e.sx),{maxWidth:400})});return I.default.createElement(ho,Object.assign({},r,{componentsProps:o,PaperProps:i}))}function mo(t){const e=Object(I.useContext)(gt.a).getColorValue,n=!t.barcodeMappedData||"LOADED"!==t.barcodeMappedData.state,r={backgroundColor:e(n?t.sheetColorLoading:t.sheetColorLoaded)},[o,i]=I.default.useState(),a=Object(I.useRef)((()=>{}));Object(I.useEffect)((()=>{t.open&&i(!1)}),[t.open]);const s=()=>{a.current=t.handleCancel,i(!0)};return I.default.createElement(fo,{modalOverlayColor:t.modalOverlayColor,open:t.open&&!o,fullWidth:!0,TransitionProps:{onExited:()=>{o&&a.current()}},onClose:()=>{n||s()}},I.default.createElement(Ye,{style:r},I.default.createElement(Wn,Object.assign({},t,{maxNumberOfTitleLines:2,maxNumberOfSubtitleLines:1,imageSize:68}))),I.default.createElement(qe,{style:r},I.default.createElement(Kn,{container:!0,spacing:2,sx:{overflow:"hidden"}},I.default.createElement(Kn,{item:!0,xs:12},I.default.createElement(or,{color:e(t.dividerColor)})),n?I.default.createElement(Kn,{item:!0,xs:12,sx:{textAlign:"center"}},I.default.createElement(mt,null,I.default.createElement(hn,{sx:{color:e(t.loadingMessage.color),verticalAlign:"middle",mr:2}}),I.default.createElement(Qt.a,{config:t.loadingMessage}))):I.default.createElement(I.default.Fragment,null,I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({style:{width:"100%"},onClick:s},t.cancelButton))),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({style:{width:"100%"},onClick:()=>{a.current=t.handleSubmit,i(!0)}},t.submitButton)))))))}function go(t){return Object(xt.a)("MuiIconButton",t)}var vo=Object(ht.a)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);const bo=["edge","children","className","color","disabled","disableFocusRipple","size"],yo=Object(bt.a)(Le,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,"default"!==n.color&&e[`color${Object(At.a)(n.color)}`],n.edge&&e[`edge${Object(At.a)(n.edge)}`],e[`size${Object(At.a)(n.size)}`]]}})((({theme:t,ownerState:e})=>Object(z.a)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Object(Ct.a)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})),(({theme:t,ownerState:e})=>{var n;const r=null==(n=(t.vars||t).palette)?void 0:n[e.color];return Object(z.a)({},"inherit"===e.color&&{color:"inherit"},"inherit"!==e.color&&"default"!==e.color&&Object(z.a)({color:null==r?void 0:r.main},!e.disableRipple&&{"&:hover":Object(z.a)({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Object(Ct.a)(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===e.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===e.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${vo.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}));var Ao=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=Object(N.a)(n,bo),d=Object(z.a)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),h=(t=>{const{classes:e,disabled:n,color:r,edge:o,size:i}=t,a={root:["root",n&&"disabled","default"!==r&&`color${Object(At.a)(r)}`,o&&`edge${Object(At.a)(o)}`,`size${Object(At.a)(i)}`]};return Object(vt.a)(a,go,e)})(d);return Object($.jsx)(yo,Object(z.a)({className:Object(et.a)(h.root,i),centerRipple:!0,focusRipple:!l,disabled:s,ref:e,ownerState:d},u,{children:o}))})),Co=n(1);Co.h;function So(t){if(!1===t.visible)return null;const e={backgroundColor:t.active?gt.b.getColorValue(t.activeBackgroundColor):gt.b.getColorValue(t.backgroundColor),color:t.active?gt.b.getColorValue(t.activeForegroundColor):gt.b.getColorValue(t.foregroundColor)};return I.default.createElement(Ao,{sx:Object.assign(Object.assign({},e),{"&:hover, &:focus":Object.assign({outline:"none"},e),width:48,height:48}),onClick:t.onClick},t.text&&I.default.createElement("span",{style:{fontSize:15}},gt.b.getLocalizedBarcodeText(t.text)),t.icon&&I.default.createElement(t.icon,{style:{padding:7}}))}var xo=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class wo{constructor(){this.audioFile=new Audio}initialize(t){return xo(this,void 0,void 0,(function*(){t.successBeepEnabled&&(this.audioFile.src="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAACAE00QSBpc29taXNvMgAAAAhmcmVlAAASCG1kYXQBQCKAo3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+aIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwBQCKAo3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+aIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwA6jQEQfEIQGIQaqctMIv9EpiYforpaDbT80WfPFRSswKfd8cy6kN/+IUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0u//EKWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaXfViFLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwA6jQQpRY6EYNCcKDAqAAEUgC2wFy0kF7JTgecsqIp6pxd/lHO7kUuSCLFK6n2mPOKfj5aKhQPOaRtBEKFS85eIYbr71AGaAPJTSIHeIhXTcpA5i155UICz3nXk0Cz0A8QhxIhoqQIJ2Be9MIEiJ6GpuMa1fPXcJmIoxDUKpZuJozBa6iFmjy7O/genSlwPKL6xaiiL8Y1XtgBDY7ke/CAOoawOqmZm6suSVQPbxzaxZJpWFcWva4RqTil72HqDpc2N4eG3KA0JkU8G58RNabxVq9gSLwysPKIzL1fZVF1FQwllEs4YUKpPtoMw2VtepdbZHqGriAsZ5Lu154uiewW41szI4RHfpWOWSH7s1LAzlv/xClpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWl36AhS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0vAA6jQEYVEIDEQDEKCAYhAIXMdbaI5q82OvhmYS1FO11cD3Yt4EwZI+aTsqoctJJaN0FKvNqorQmK3SUWpNOtf+uKNIxX3xeTEq8LKb/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd/+IUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0u+GEKWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpeABMDQD6WqsfRABwAUSib4c3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+EIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS8AAAO4bW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAAAfgAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAiJ0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAAfgAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAH4AAAIAAABAAAAAAGabWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAAfQAAAF8BVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABRW1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABCXN0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAEAEAAAAAAfQAAAAAAAM2VzZHMAAAAAA4CAgCIAAQAEgICAFEAVAAAAAAH0AAAAvXkFgICAAhWIBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAAAUAAAQAAAAAAQAAA8AAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAYAAAABAAAAFHN0c3oAAAAAAAADAAAAAAYAAAAUc3RjbwAAAAAAAAABAAAALAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAAGAAAAAQAAASJ1ZHRhAAABGm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAA7Wlsc3QAAAAzqW5hbQAAACtkYXRhAAAAAQAAAAAyNTAgTWlsbGlzZWNvbmRzIG9mIFNpbGVuY2UAAAApqUFSVAAAACFkYXRhAAAAAQAAAABBbmFyIFNvZnR3YXJlIExMQwAAAClhQVJUAAAAIWRhdGEAAAABAAAAAEFuYXIgU29mdHdhcmUgTExDAAAAI6lhbGIAAAAbZGF0YQAAAAEAAAAAQmxhbmsgQXVkaW8AAAAkqXRvbwAAABxkYXRhAAAAAQAAAABMYXZmNjAuMy4xMDAAAAAZY3BpbAAAABFkYXRhAAAAFQAAAAAA",yield this.play(),"MODERN_BEEP"===t.soundType&&(this.audioFile.src="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAACAE00QSBpc29taXNvMgAAAAhmcmVlAAAEcm1kYXQBQCKAo30ghS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwDmVAjh8QBrRiUH/88pKh3gJPmPt9t8oIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwDsl6UY83aVqFeq3aVmmYyFp70/kJT+A9hdePd7Z7aRSFKZBhCUP6E1rS/9+DhfmhvTknCnQzE+QHVPD6rhSIRpGIAFmBioF1XkxwAQjxKkQMc+qECgXnCAU1IcgpFDnWo02EdihsnrUx/1bJAUo+x6//p8VmoS0iuleHvPnKj9mjjHOoaDGI/s2DHcYI66Grp+5pezZuKJExJOzoyJRdmv6ltO6ibTdTDZ1YqLauKTebYOtpTWnh3/K3kBQmN3NsieqxzHeZKNiFphWuYSWMhaHIZRnRt6O/WzTXYFGrG0wBT54NCQ3wtSpqr5dHbQN2yY0jcckhLUieNtOSjS3u1NuMqWbOx1zHwlHfJKgI349OU9iZEzeN3rCVbBVdrdcAEW9Cm2Ji2FjQNkiFBViV6ofFsNVeVqpKgpsf3/iWtBG6cpMqFHjy2QhyBEnPtwTbWbm9b1u7frF3bnaVykqieEvTKfqnCYL2u4g1CLiQ4Zb8hkkTL9tnGmdMOeqIkUcHZ0zsspzvHOUXJTlssZTRjqcIsp514HJO9YhVRXALKaCRKQkbMEty3CstONNYzuhq57bbccc+/Pq22226ueWXLLbTTw4bFIoQoGWepZBRJWQFh4yui2+evKOqLp+rLKJ4LKcAtQ7XA0aLCyMRVDDOmuoYcnFEmIrpzmRQNQIJ5HWvOesgzjrK071chBhESdztJ0sMqhdAAyjegdEYPNyA4BCDQtLGRRKQQBQIhXYqGZ65Pu1S7XMxxVXEOWtJGMAARETyDKiMN4tsmFfcvmo+sHuHZrY196169rbT/sHFGNK1cnJrBK2vDu7b0AsBd9VaKrsNHL/KxFHm3Yma/+S365yvTF+abktGk7JSrS++mXLBw76AiuijMPpwzPoP4jNzZjI+R/p7zboMSKiFvZkMx8CDIPGB+K2Ee7XaOqAu8z6cWgazCp76DdzIwsmGw2TiczmQMAafEX0U6lQOAA6jQJAfCsBrSxVH+Hw8fPKIpB7JuhzAB/BwAAAw9tb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAATwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACOnRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAATwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAE4AAAgAAAEAAAAAAbJtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAVgFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAFdbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEhc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAQAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgABAASAgIAUQBUAAAAAARrvAAEa7wWAgIACEggGgICAAQIAAAAgc3R0cwAAAAAAAAACAAAABQAABAAAAAABAAABgAAAABxzdHNjAAAAAAAAAAEAAAABAAAABgAAAAEAAAAsc3RzegAAAAAAAAAAAAAABgAAALkAAAC6AAABIAAAAQAAAAC9AAAAGgAAABRzdGNvAAAAAAAAAAEAAAAsAAAAGnNncGQBAAAAcm9sbAAAAAIAAAAB//8AAAAcc2JncAAAAAByb2xsAAAAAQAAAAYAAAABAAAAYXVkdGEAAABZbWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAsaWxzdAAAACSpdG9vAAAAHGRhdGEAAAABAAAAAExhdmY2MC4zLjEwMA=="),"CLASSIC_BEEP"===t.soundType&&(this.audioFile.src="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAAAAE00QSBtcDQyaXNvbQAAAAFtZGF0AAAAAAAACHchIANAaBv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOCFO4v////////gyh+L1JkJB36Cv0yBUdzB8/8/b8vveozPf+/6eH18deTh9kOp11urWAB5ZsMnhMwSjUCF2MQub4hybjxDhHACGof0XiT9tAHVOwt4NPtPOMFr/ndlTpTNXy79GYIfXP7VkPs99ySHNOFkpNrBS1pClU3rRGHp6Dy9FBIlk4KbBNBLGMJRcWQxuVsVJCSMnGw1FuIUrBN2UJLoEMhurMxpIiyGAweBvyfNJy4FbxqDm3WDjCtzP+3yVmOjxhIBDANLYyeG05LNyCZONEOk/c4hCj3Y2XQkgTI7y/39g0a+MuEoAdbRz4gSgRJnjEGB0TnOB0LtiL0XB9kwz2SwCBB0MvIByUSWTPTsRdCA4PvEmwnNdTnJT5/kPGk4swkTgOOuWJBI0EkxFs5mmNIR6wSFql36Hn03/Lf/uHp+6aTmBY0HJ6P6X1atw/Y8vK72LCWpsq0beo5KkrrrMe1eabaDyfZRPYfgPwH4Dv4CHU663VrAA8wchbBRlqQNnYNlYNhYNigNhoTBsTCcTCgLBEQCX+XfNd+3y+piKntTerXdXpDWRpLzsKmJ4iRM4ig+I6R65pDawx8Ry4cxfeifbsbzK/TxNhafR9y2zFVicy8nCVkU6CkmLckGtqbuYvhruBP0TriLNTU1TNhW6tUCdUSyneDUWAox5RTMlF2W1san5MQRlj7Btm2bZhoqoUUAJlpaat54WVuTyOxqwzNVhPenFR9KBpuA3qrUrT+3ShOUdXAkGXmCrMBxH3XmROdVSkS8cccRMOKTN+7OOEIQrMYIcna5hipAqPHk6VSgy0gGXljIk7GR/O606SyhhgglQIZLyxxOa/ZANmzZkyZMlRoqIt/T6xZHaFLcZ6n8jSgTVoOGsK5MvOlIBBkR+AtM5hvkTG2UzEhEAcsA7bZfCZmmZmZjQnqfn/yRwXzQtlZljFYd93mGppQSDDV/oz8HKkKjElN9Pu/inFmh3IHFyXlrJ/dodwM2EUkLZff1jWCO84wYUa3JB52yTMCETuUgA0BWB+I4hDBR1xoligVhgVhgNhYdBcLCcakAb1XLO/eZ9cUtvv6cNzrRYdMWgFvJySSSSscWFxCQElKcwc2dFkyos8dHfXPYFSt0klO2wUeIUxNKf5LiWYGm57bV0dipv7Qpw9uRRu23CuNIbT7++AuwEnyFWIQP0OpdUhc7u2k2fKW3mTZZxCSb+gVCjOzNf7LzxdBpbZxYwuNkcRlqAMdRMhq+tXmbLkMGGph20w4JvwvBm+x4Wtomh4lz0GGBVGQ96+JUXhvqQQAQPRTHtn+e7SwaCKMXnEEWXevaFVrPVEX7wxIBbbcpAHXj2DQz/vO9M0FHzyQFtegQjjn+fM99jgBE2fLJs/PLcErzrmCGJdVHZ19uxTErdmR6viG6cetew2MYQFm5AIDdPmjeXifvbFcjkYQWUsqKoBQJAKMp50hLtJRCKLCTSw2f7e0wzzhr6eGhjlyOQ8blgBiR0fxcjQYM5rBBM/wzuDe972u2f/mN7u8zVqGu7QADPHgAK4PxW8nJJJJLgISwUZaaRYmFRWRBEIwQKfmepncccZoqHnVy0WnFag51Yt48agPiK7D59zNlI+6YR9SHvnKoiJCcRzsskEGDgIrLQoLEgDguNTzeNvuxVpc8wntXmUlTQMa9WLn/geS8F7ku6Vt+I9yiumFP6I5hbEGeXac1BCB3YA3gNA0rLFPwrWq//VvtF6JGKIOVA12lCnpZl8NJojK1yqVsVKp+ZqbDpq0S1duspmvSvCbwmftOnwnfuNqBCnzZfzZF9fkqxTCqlq8GmR3bGK+1uvEcF55cGGx8BNANhkk1438/rWbXeTtPGfukvhUxZBp0M5447+2SFiQW674ySiGSRHgyqcqU0x39tbz3afnWt5BKNHDYj1lzq6sg8dcJlJnSQDUEba4npgEoAqVUkksoqM0UUO3VXDo3Mablwd2GLAoXjgK071swbuWhQJ2AjGYsBx5dtOMYCyPVh+K3jxqA+IuAhTrc+3KVqmDuVmIO5TZmQbDr4vUV+0338fXQ3665PiYnII1REb2klWhUcwjqi/pMe4yYZaDbo9T1ougUKE5h1jUim2NZxM71zBZVa/tWam6wXlmFVVHGuvL76pT3PUGufbO9YwevQzCvXhsabRuJyJjz8A1Haftmewy4gZ0FWlMIO5BoXB49j0TeIiikaxP9ZHcD9oI6x2H4DajNt5WgRXj6/H72V+gj2bgMDVkIZ36j1Tl+wdO6fvFsz56a5V6t9lS+gyWSOvuQP9bqtYgqWlsthXSFkrTfNqni6jSQ5vN9Fp1iYJODbUg8Sg0lYLbNEM7oqvrggxzq13IfO9hGQ0MQVpMIAR0aSGMFWOZzpJmXG1IcjppdZkINTYN2UvrHmGUrVBHvRuueFPuy2GzQoSnMCvkT3WvaR/LoVYw7Voy47wdJee2Va623AFXWNINOpByyoc9SQU4vPQ6X0PMBLQs6GdMlx+RlC3VoMDOryeFFolCTD8B+A/A4AAANKbW9vdgAAAGxtdmhkAAAAANcxfvfXMX73AACsRAAADbEAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAdx0cmFrAAAAXHRraGQAAAAB1zF+99cxfvcAAAABAAAAAAAADbEAAAAAAAAAAAAAAAABAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAF4bWRpYQAAACBtZGhkAAAAANcxfvfXMX73AACsRAAAGABVxAAAAAAAMWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABDb3JlIE1lZGlhIEF1ZGlvAAAAAR9taW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAONzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAAABICAgBRAFQAYAAAB9AAAAfQABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAAAGAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAABgAAAAEAAAAsc3RzegAAAAAAAAAAAAAABgAAAP4AAAF+AAABjwAAAYQAAAFeAAABegAAABRzdGNvAAAAAAAAAAEAAAAsAAAA+nVkdGEAAADybWV0YQAAAAAAAAAiaGRscgAAAAAAAAAAbWRpcgAAAAAAAAAAAAAAAAAAAAAAxGlsc3QAAAC8LS0tLQAAABxtZWFuAAAAAGNvbS5hcHBsZS5pVHVuZXMAAAAUbmFtZQAAAABpVHVuU01QQgAAAIRkYXRhAAAAAQAAAAAgMDAwMDAwMDAgMDAwMDA4NDAgMDAwMDAyMEYgMDAwMDAwMDAwMDAwMERCMSAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMA=="))}))}beep(t){t.successBeepEnabled&&this.play()}play(){return xo(this,void 0,void 0,(function*(){try{yield this.audioFile.play()}catch(t){}}))}}wo.INSTANCE=new wo;var Oo=wo;class Eo{constructor(){this.DURATION=200}vibrate(t){t.enabled&&navigator.vibrate&&navigator.vibrate(this.DURATION)}}Eo.INSTANCE=new Eo;var Lo=Eo,jo=n(25),ko=n(44),_o=n(50);class To extends I.default.Component{constructor(t){super(t),this.state={base64Image:void 0}}render(){const t="x"+this.props.barcode.count;return I.default.createElement("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"white",paddingBottom:5,paddingTop:5,borderBottom:"0.5px solid gray"}},I.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:"100%"}},I.default.createElement("div",{style:{display:"flex",fontSize:15,fontWeight:400,width:"100%"}},I.default.createElement("div",{style:{flex:1}},this.props.barcode.text),I.default.createElement("div",{style:{flex:1,justifyContent:"end",display:"flex"}},t)),I.default.createElement("div",{style:{color:"gray",fontSize:13,fontWeight:300}},this.props.barcode.format)))}}function Po(t,e){return t.format===e.format&&t.text===e.text}function Ro(t){return t.text+t.format}class Do extends I.default.Component{constructor(t){super(t),this.state={barcodes:this.toUniqueListWithDuplicateCounter(t.barcodes)}}toUniqueListWithDuplicateCounter(t){const e=[];return t.forEach((t=>{const n=e.findIndex((e=>Po(e,t)));-1===n?(t.count=1,e.push(t)):e[n].count++})),e}update(t){this.setState({barcodes:this.toUniqueListWithDuplicateCounter(t)})}render(){return I.default.createElement("div",{style:{display:"flex",flexDirection:"column",backgroundColor:"white",padding:15}},this.state.barcodes.map(((t,e)=>I.default.createElement(To,{key:e,barcode:t,onClick:this.props.onClick}))))}}class Bo{}Bo.ScanbotPrimary="#c8193c",Bo.LightGray="#F5F5F5",Bo.Gray="#808080",Bo.DarkGray="#333333",Bo.Orange="#FF5533",Bo.White="#FFFFFF",Bo.TransparentGreen="rgba(0, 255, 0, 0.5)",Bo.TransparentGray="rgba(50, 50, 50, 0.5)",Bo.TransparentBlack="rgba(0, 0, 0, 0.3)",Bo.SBNegative="#FF3737";var Fo,Io=Bo;!function(t){t[t.None=0]="None",t[t.PushRight=1]="PushRight",t[t.PushBottom=2]="PushBottom",t[t.Pop=3]="Pop"}(Fo||(Fo={}));class Mo extends I.default.Component{constructor(t){super(t),this._isVisible=!1,this.state={animation:{type:Fo.None},elements:[]}}containerStyle(t){return{height:"100%",width:"100%",position:"absolute",top:"0",left:"0",zIndex:101,transform:t,overflow:"scroll"}}render(){var t,e,n;if(this.state.animation.type===Fo.None)return null;const r=this.animation(this.state.animation.type),o=this.to(this.state.animation.type);this.previousDestination=o;const i=this.props.style;return I.default.createElement(r,{style:this.containerStyle(`${o}`),onAnimationStart:this.onAnimationStart.bind(this),onAnimationEnd:this.onAnimationEnd.bind(this),onClick:t=>{this.reset()}},I.default.createElement("div",{style:{backgroundColor:"white",height:i.sheetHeight,width:"100%",marginTop:i.sheetTopMargin,borderTopLeftRadius:20,borderTopRightRadius:20},onClick:t=>{t.stopPropagation()}},I.default.createElement("div",{style:{borderTopLeftRadius:20,borderTopRightRadius:20,backgroundColor:Io.ScanbotPrimary}},I.default.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",height:10}},I.default.createElement("div",{style:{backgroundColor:Io.White,height:3,width:33,borderRadius:5}})),I.default.createElement("div",{style:{display:"flex",height:50}},I.default.createElement("div",{style:{display:"flex",fontSize:12,flex:1,color:Io.White,alignItems:"center",justifyContent:"left",paddingLeft:10,fontWeight:300},onClick:this.props.onDeleteClick},"CLEAR ALL"),I.default.createElement("div",{style:{display:"flex",fontSize:15,flex:1,color:Io.White,justifyContent:"center",alignItems:"center",fontWeight:500}},(null!==(e=null===(t=this.barcodes)||void 0===t?void 0:t.length)&&void 0!==e?e:0)+" Codes"),I.default.createElement("div",{style:{display:"flex",fontSize:13,flex:1,color:Io.White,justifyContent:"right",alignItems:"center",paddingRight:10}},I.default.createElement("div",{style:{fontSize:30,fontWeight:100},onClick:t=>{t.stopPropagation(),this.reset()}},"×")))),I.default.createElement(Do,{ref:t=>{null!==t&&(this.list=t)},barcodes:null!==(n=this.barcodes)&&void 0!==n?n:[]})))}reset(){this.pop()}isVisible(){return this._isVisible}push(t,e){this._isVisible=!0,this.barcodes=e,this.updateAnimationType(t)}update(t){this.barcodes=t,this.forceUpdate()}pop(){this._isVisible=!1,this.updateAnimationType(Fo.Pop)}onAnimationStart(){}onAnimationEnd(){this.state.animation.type===Fo.Pop&&this.updateAnimationType(Fo.None)}updateAnimationType(t,e){this.setState({animation:{type:t}},e)}animation(t){let e=this.from(t),n=this.to(t);this.previousDestination===n&&(e=this.previousDestination,n=this.previousDestination);const r=Y.d`from {transform: ${e};} to {transform: ${n};}`;return Y.c.div`animation: ${r} 0.5s;`}from(t){if(t===Fo.PushRight)return this.translate("X",100);if(t===Fo.PushBottom)return this.translate("Y",100);if(t===Fo.Pop){const t=this.pushType===Fo.PushRight?"X":"Y";return this.translate(t,0)}}to(t){if(t===Fo.PushRight)return this.translate("X",0);if(t===Fo.PushBottom)return this.translate("Y",0);if(t===Fo.Pop){const t=this.pushType===Fo.PushRight?"X":"Y";return this.translate(t,100)}}translate(t,e){return"translate"+t+"("+e+"%)"}componentWillUnmount(){this._isVisible=!1}}var Wo=n(3),zo=function(t){return{isEnabled:function(e){return t.some((function(t){return!!e[t]}))}}},No={measureLayout:zo(["layout","layoutId","drag","_layoutResetTransform"]),animation:zo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:zo(["exit"]),drag:zo(["drag","dragControls"]),focus:zo(["whileFocus"]),hover:zo(["whileHover","onHoverStart","onHoverEnd"]),tap:zo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:zo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:zo(["layout","layoutId"])};var Vo=Object(I.createContext)({strict:!1}),Uo=Object.keys(No),Ho=Uo.length;var $o=Object(I.createContext)({transformPagePoint:function(t){return t},isStatic:!1}),Go=Object(I.createContext)({});var Yo=Object(I.createContext)(null);function Qo(t){var e=Object(I.useRef)(null);return null===e.current&&(e.current=t()),e.current}function Zo(){var t=Object(I.useContext)(Yo);if(null===t)return[!0,null];var e=t.isPresent,n=t.onExitComplete,r=t.register,o=Jo();Object(I.useEffect)((function(){return r(o)}),[]);return!e&&n?[!1,function(){return null==n?void 0:n(o)}]:[!0]}function Xo(t){return null===t||t.isPresent}var qo=0,Ko=function(){return qo++},Jo=function(){return Qo(Ko)},ti=Object(I.createContext)(null),ei="undefined"!=typeof window,ni=ei?I.useLayoutEffect:I.useEffect;function ri(t,e,n,r){var o=Object(I.useContext)($o),i=Object(I.useContext)(Vo),a=Object(I.useContext)(Go).visualElement,s=Object(I.useContext)(Yo),l=function(t){var e=t.layoutId,n=Object(I.useContext)(ti);return n&&void 0!==e?n+"-"+e:e}(n),c=Object(I.useRef)(void 0);r||(r=i.renderer),!c.current&&r&&(c.current=r(t,{visualState:e,parent:a,props:Object(Wo.a)(Object(Wo.a)({},n),{layoutId:l}),presenceId:null==s?void 0:s.id,blockInitialAnimation:!1===(null==s?void 0:s.initial)}));var u=c.current;return ni((function(){u&&(u.setProps(Object(Wo.a)(Object(Wo.a)(Object(Wo.a)({},o),n),{layoutId:l})),u.isPresent=Xo(s),u.isPresenceRoot=!a||a.presenceId!==(null==s?void 0:s.id),u.syncRender())})),Object(I.useEffect)((function(){var t;u&&(null===(t=u.animationState)||void 0===t||t.animateChanges())})),ni((function(){return function(){return null==u?void 0:u.notifyUnmount()}}),[]),u}function oi(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ii(t){return Array.isArray(t)}function ai(t){return"string"==typeof t||ii(t)}function si(t,e,n,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"string"==typeof e&&(e=null===(i=t.variants)||void 0===i?void 0:i[e]),"function"==typeof e?e(null!=n?n:t.custom,r,o):e}function li(t,e,n){var r=t.getProps();return si(r,e,null!=n?n:r.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function ci(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||ai(t.initial)||ai(t.animate)||ai(t.whileHover)||ai(t.whileDrag)||ai(t.whileTap)||ai(t.whileFocus)||ai(t.exit)}function ui(t){return Boolean(ci(t)||t.variants)}function di(t,e){var n=function(t,e){if(ci(t)){var n=t.initial,r=t.animate;return{initial:!1===n||ai(n)?n:void 0,animate:ai(r)?r:void 0}}return!1!==t.inherit?e:{}}(t,Object(I.useContext)(Go)),r=n.initial,o=n.animate;return Object(I.useMemo)((function(){return{initial:r,animate:o}}),e?[hi(r),hi(o)]:[])}function hi(t){return Array.isArray(t)?t.join(" "):t}function pi(t){var e=t.preloadedFeatures,n=t.createVisualElement,r=t.useRender,o=t.useVisualState,i=t.Component;return e&&function(t){for(var e in t){var n=t[e];null!==n&&(No[e].Component=n)}}(e),Object(I.forwardRef)((function(t,e){var a=Object(I.useContext)($o).isStatic,s=null,l=di(t,a),c=o(t,a);return!a&&ei&&(l.visualElement=ri(i,c,t,n),s=function(t,e,n){var r=[];if(Object(I.useContext)(Vo),!e)return null;for(var o=0;o<Ho;o++){var i=Uo[o],a=No[i],s=a.isEnabled,l=a.Component;s(t)&&l&&r.push(I.createElement(l,Object(Wo.a)({key:i},t,{visualElement:e})))}return r}(t,l.visualElement)),I.createElement(I.Fragment,null,I.createElement(Go.Provider,{value:l},r(i,t,function(t,e,n){return Object(I.useCallback)((function(r){var o;r&&(null===(o=t.mount)||void 0===o||o.call(t,r)),e&&(r?e.mount(r):e.unmount()),n&&("function"==typeof n?n(r):oi(n)&&(n.current=r))}),[e])}(c,l.visualElement,e),c,a)),s)}))}function fi(t){function e(e,n){return void 0===n&&(n={}),pi(t(e,n))}var n=new Map;return new Proxy(e,{get:function(t,r){return n.has(r)||n.set(r,e(r)),n.get(r)}})}var mi=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function gi(t){return"string"==typeof t&&!t.includes("-")&&!!(mi.indexOf(t)>-1||/[A-Z]/.test(t))}var vi={};var bi=["","X","Y","Z"],yi=["transformPerspective","x","y","z"];function Ai(t,e){return yi.indexOf(t)-yi.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return bi.forEach((function(e){return yi.push(t+e)}))}));var Ci=new Set(yi);function Si(t){return Ci.has(t)}var xi=new Set(["originX","originY","originZ"]);function wi(t){return xi.has(t)}function Oi(t,e){var n=e.layout,r=e.layoutId;return Si(t)||wi(t)||(n||void 0!==r)&&(!!vi[t]||"opacity"===t)}var Ei=function(t){return null!==t&&"object"==typeof t&&t.getVelocity},Li={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function ji(t){return t.startsWith("--")}var ki=function(t,e){return e&&"number"==typeof t?e.transform(t):t},_i=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},Ti=function(t){return t%1?Number(t.toFixed(5)):t},Pi=/(-)?([\d]*\.?[\d])+/g,Ri=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Di=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Bi(t){return"string"==typeof t}var Fi=function(t){return{test:function(e){return Bi(e)&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},Ii=Fi("deg"),Mi=Fi("%"),Wi=Fi("px"),zi=Fi("vh"),Ni=Fi("vw"),Vi=Object(Wo.a)(Object(Wo.a)({},Mi),{parse:function(t){return Mi.parse(t)/100},transform:function(t){return Mi.transform(100*t)}}),Ui={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},Hi=Object(Wo.a)(Object(Wo.a)({},Ui),{transform:_i(0,1)}),$i=Object(Wo.a)(Object(Wo.a)({},Ui),{default:1}),Gi=Object(Wo.a)(Object(Wo.a)({},Ui),{transform:Math.round}),Yi={borderWidth:Wi,borderTopWidth:Wi,borderRightWidth:Wi,borderBottomWidth:Wi,borderLeftWidth:Wi,borderRadius:Wi,radius:Wi,borderTopLeftRadius:Wi,borderTopRightRadius:Wi,borderBottomRightRadius:Wi,borderBottomLeftRadius:Wi,width:Wi,maxWidth:Wi,height:Wi,maxHeight:Wi,size:Wi,top:Wi,right:Wi,bottom:Wi,left:Wi,padding:Wi,paddingTop:Wi,paddingRight:Wi,paddingBottom:Wi,paddingLeft:Wi,margin:Wi,marginTop:Wi,marginRight:Wi,marginBottom:Wi,marginLeft:Wi,rotate:Ii,rotateX:Ii,rotateY:Ii,rotateZ:Ii,scale:$i,scaleX:$i,scaleY:$i,scaleZ:$i,skew:Ii,skewX:Ii,skewY:Ii,distance:Wi,translateX:Wi,translateY:Wi,translateZ:Wi,x:Wi,y:Wi,z:Wi,perspective:Wi,transformPerspective:Wi,opacity:Hi,originX:Vi,originY:Vi,originZ:Wi,zIndex:Gi,fillOpacity:Hi,strokeOpacity:Hi,numOctaves:Gi};function Qi(t,e,n,r,o,i,a,s){var l,c=t.style,u=t.vars,d=t.transform,h=t.transformKeys,p=t.transformOrigin;h.length=0;var f=!1,m=!1,g=!0;for(var v in e){var b=e[v];if(ji(v))u[v]=b;else{var y=Yi[v],A=ki(b,y);if(Si(v)){if(f=!0,d[v]=A,h.push(v),!g)continue;b!==(null!==(l=y.default)&&void 0!==l?l:0)&&(g=!1)}else if(wi(v))p[v]=A,m=!0;else if((null==n?void 0:n.isHydrated)&&(null==r?void 0:r.isHydrated)&&vi[v]){var C=vi[v].process(b,r,n),S=vi[v].applyTo;if(S)for(var x=S.length,w=0;w<x;w++)c[S[w]]=C;else c[v]=C}else c[v]=A}}r&&n&&a&&s?(c.transform=a(r.deltaFinal,r.treeScale,f?d:void 0),i&&(c.transform=i(d,c.transform)),c.transformOrigin=s(r)):(f&&(c.transform=function(t,e,n,r){var o=t.transform,i=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,l=e.allowTransformNone,c=void 0===l||l,u="";i.sort(Ai);for(var d=!1,h=i.length,p=0;p<h;p++){var f=i[p];u+=(Li[f]||f)+"("+o[f]+") ","z"===f&&(d=!0)}return!d&&s?u+="translateZ(0)":u=u.trim(),r?u=r(o,n?"":u):c&&n&&(u="none"),u}(t,o,g,i)),m&&(c.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,r=t.originY,o=void 0===r?"50%":r,i=t.originZ;return n+" "+o+" "+(void 0===i?0:i)}(p)))}var Zi=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Xi(t,e,n){for(var r in e)Ei(e[r])||Oi(r,n)||(t[r]=e[r])}function qi(t,e,n){var r={};return Xi(r,t.style||{},t),Object.assign(r,function(t,e,n){var r=t.transformTemplate;return Object(I.useMemo)((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};Qi(t,e,void 0,void 0,{enableHardwareAcceleration:!n},r);var o=t.vars,i=t.style;return Object(Wo.a)(Object(Wo.a)({},o),i)}),[e])}(t,e,n)),t.transformValues&&(r=t.transformValues(r)),r}function Ki(t,e,n){var r={},o=qi(t,e,n);return Boolean(t.drag)&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),r.style=o,r}var Ji=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function ta(t){return Ji.has(t)}var ea=function(t){return!ta(t)};try{var na=n(122).default;ea=function(t){return t.startsWith("on")?!ta(t):na(t)}}catch(t){}function ra(t,e,n){return"string"==typeof t?t:Wi.transform(e+n*t)}var oa=function(t,e){return Wi.transform(t*e)},ia={offset:"stroke-dashoffset",array:"stroke-dasharray"},aa={offset:"strokeDashoffset",array:"strokeDasharray"};function sa(t,e,n,r,o,i,a,s){var l=e.attrX,c=e.attrY,u=e.originX,d=e.originY,h=e.pathLength,p=e.pathSpacing,f=void 0===p?1:p,m=e.pathOffset,g=void 0===m?0:m;Qi(t,Object(Wo.d)(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,o,i,a,s),t.attrs=t.style,t.style={};var v=t.attrs,b=t.style,y=t.dimensions,A=t.totalPathLength;v.transform&&(y&&(b.transform=v.transform),delete v.transform),y&&(void 0!==u||void 0!==d||b.transform)&&(b.transformOrigin=function(t,e,n){return ra(e,t.x,t.width)+" "+ra(n,t.y,t.height)}(y,void 0!==u?u:.5,void 0!==d?d:.5)),void 0!==l&&(v.x=l),void 0!==c&&(v.y=c),void 0!==A&&void 0!==h&&function(t,e,n,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?ia:aa;t[a.offset]=oa(-o,e);var s=oa(n,e),l=oa(r,e);t[a.array]=s+" "+l}(v,A,h,f,g,!1)}var la=function(){return Object(Wo.a)(Object(Wo.a)({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function ca(t,e){var n=Object(I.useMemo)((function(){var n=la();return sa(n,e,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),Object(Wo.a)(Object(Wo.a)({},n.attrs),{style:Object(Wo.a)({},n.style)})}),[e]);if(t.style){var r={};Xi(r,t.style,t),n.style=Object(Wo.a)(Object(Wo.a)({},r),n.style)}return n}function ua(t){void 0===t&&(t=!1);return function(e,n,r,o,i){var a=o.latestValues,s=(gi(e)?ca:Ki)(n,a,i),l=function(t,e,n){var r={};for(var o in t)(ea(o)||!0===n&&ta(o)||!e&&!ta(o))&&(r[o]=t[o]);return r}(n,"string"==typeof e,t),c=Object(Wo.a)(Object(Wo.a)(Object(Wo.a)({},l),s),{ref:r});return Object(I.createElement)(e,c)}}var da=/([a-z])([A-Z])/g,ha=function(t){return t.replace(da,"$1-$2").toLowerCase()};function pa(t,e){var n=e.style,r=e.vars;for(var o in Object.assign(t.style,n),r)t.style.setProperty(o,r[o])}var fa=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function ma(t,e){for(var n in pa(t,e),e.attrs)t.setAttribute(fa.has(n)?n:ha(n),e.attrs[n])}function ga(t){var e=t.style,n={};for(var r in e)(Ei(e[r])||Oi(r,t))&&(n[r]=e[r]);return n}function va(t){var e=ga(t);for(var n in t){if(Ei(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function ba(t){return"object"==typeof t&&"function"==typeof t.start}var ya=function(t){return Array.isArray(t)};function Aa(t){var e,n=Ei(t)?t.get():t;return e=n,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?n.toValue():n}function Ca(t,e,n,r){var o=t.scrapeMotionValuesFromProps,i=t.createRenderState,a=t.onMount,s={latestValues:xa(e,n,r,o),renderState:i()};return a&&(s.mount=function(t){return a(e,t,s)}),s}var Sa=function(t){return function(e,n){var r=Object(I.useContext)(Go),o=Object(I.useContext)(Yo);return n?Ca(t,e,r,o):Qo((function(){return Ca(t,e,r,o)}))}};function xa(t,e,n,r){var o={},i=!1===(null==n?void 0:n.initial),a=r(t);for(var s in a)o[s]=Aa(a[s]);var l=t.initial,c=t.animate,u=ci(t),d=ui(t);e&&d&&!u&&!1!==t.inherit&&(null!=l||(l=e.initial),null!=c||(c=e.animate));var h=i||!1===l?c:l;h&&"boolean"!=typeof h&&!ba(h)&&(Array.isArray(h)?h:[h]).forEach((function(e){var n=si(t,e);if(n){var r=n.transitionEnd;n.transition;var i=Object(Wo.d)(n,["transitionEnd","transition"]);for(var a in i)o[a]=i[a];for(var a in r)o[a]=r[a]}}));return o}var wa={useVisualState:Sa({scrapeMotionValuesFromProps:va,createRenderState:la,onMount:function(t,e,n){var r=n.renderState,o=n.latestValues;try{r.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){r.dimensions={x:0,y:0,width:0,height:0}}"path"===e.tagName&&(r.totalPathLength=e.getTotalLength()),sa(r,o,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),ma(e,r)}})};var Oa,Ea={useVisualState:Sa({scrapeMotionValuesFromProps:ga,createRenderState:Zi})};function La(t,e,n,r){var o=e.forwardMotionProps,i=void 0!==o&&o,a=gi(t)?wa:Ea;return Object(Wo.a)(Object(Wo.a)({},a),{preloadedFeatures:n,useRender:ua(i),createVisualElement:r,Component:t})}function ja(t,e,n,r){return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function ka(t,e,n,r){Object(I.useEffect)((function(){var o=t.current;if(n&&o)return ja(o,e,n,r)}),[t,e,n,r])}function _a(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Ta(t){return!!t.touches}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.Exit="exit"}(Oa||(Oa={}));var Pa={pageX:0,pageY:0};function Ra(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||Pa;return{x:n[e+"X"],y:n[e+"Y"]}}function Da(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function Ba(t,e){return void 0===e&&(e="page"),{point:Ta(t)?Ra(t,e):Da(t,e)}}var Fa=function(t,e){void 0===e&&(e=!1);var n,r=function(e){return t(e,Ba(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r},Ia={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ma={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Wa(t){return ei&&null===window.onpointerdown?t:ei&&null===window.ontouchstart?Ma[t]:ei&&null===window.onmousedown?Ia[t]:t}function za(t,e,n,r){return ja(t,Wa(e),Fa(n,"pointerdown"===e),r)}function Na(t,e,n,r){return ka(t,Wa(e),n&&Fa(n,"pointerdown"===e),r)}function Va(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Ua=Va("dragHorizontal"),Ha=Va("dragVertical");function $a(t){var e=!1;if("y"===t)e=Ha();else if("x"===t)e=Ua();else{var n=Ua(),r=Ha();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function Ga(){var t=$a(!0);return!t||(t(),!1)}function Ya(t,e,n){return function(r,o){var i;_a(r)&&!Ga()&&(null==n||n(r,o),null===(i=t.animationState)||void 0===i||i.setActive(Oa.Hover,e))}}var Qa=function(t,e){return!!e&&(t===e||Qa(t,e.parentElement))};function Za(t){return Object(I.useEffect)((function(){return function(){return t()}}),[])}var Xa=function(t,e){return function(n){return e(t(n))}},qa=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Xa)};var Ka=function(t){return function(e){return t(e),null}},Ja={tap:Ka((function(t){var e=t.onTap,n=t.onTapStart,r=t.onTapCancel,o=t.whileTap,i=t.visualElement,a=e||n||r||o,s=Object(I.useRef)(!1),l=Object(I.useRef)(null);function c(){var t;null===(t=l.current)||void 0===t||t.call(l),l.current=null}function u(){var t;return c(),s.current=!1,null===(t=i.animationState)||void 0===t||t.setActive(Oa.Tap,!1),!Ga()}function d(t,n){u()&&(Qa(i.getInstance(),t.target)?null==e||e(t,n):null==r||r(t,n))}function h(t,e){u()&&(null==r||r(t,e))}Na(i,"pointerdown",a?function(t,e){var r;c(),s.current||(s.current=!0,l.current=qa(za(window,"pointerup",d),za(window,"pointercancel",h)),null==n||n(t,e),null===(r=i.animationState)||void 0===r||r.setActive(Oa.Tap,!0))}:void 0),Za(c)})),focus:Ka((function(t){var e=t.whileFocus,n=t.visualElement;ka(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Oa.Focus,!0)}:void 0),ka(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Oa.Focus,!1)}:void 0)})),hover:Ka((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;Na(o,"pointerenter",e||r?Ya(o,!0,e):void 0),Na(o,"pointerleave",n||r?Ya(o,!1,n):void 0)}))};function ts(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var es=function(t,e,n){return Math.min(Math.max(n,t),e)},ns=.001;function rs(t){var e,n,r=t.duration,o=void 0===r?800:r,i=t.bounce,a=void 0===i?.25:i,s=t.velocity,l=void 0===s?0:s,c=t.mass,u=void 0===c?1:c,d=1-a;d=es(.05,1,d),o=es(.01,10,o/1e3),d<1?(e=function(t){var e=t*d,n=e*o,r=e-l,i=os(t,d),a=Math.exp(-n);return ns-r/i*a},n=function(t){var n=t*d*o,r=n*l+l,i=Math.pow(d,2)*Math.pow(t,2)*o,a=Math.exp(-n),s=os(Math.pow(t,2),d);return(-e(t)+ns>0?-1:1)*((r-i)*a)/s}):(e=function(t){return Math.exp(-t*o)*((t-l)*o+1)-.001},n=function(t){return Math.exp(-t*o)*(o*o*(l-t))});var h=function(t,e,n){for(var r=n,o=1;o<12;o++)r-=t(r)/e(r);return r}(e,n,5/o);if(o*=1e3,isNaN(h))return{stiffness:100,damping:10,duration:o};var p=Math.pow(h,2)*u;return{stiffness:p,damping:2*d*Math.sqrt(u*p),duration:o}}function os(t,e){return t*Math.sqrt(1-e*e)}var is=["duration","bounce"],as=["stiffness","damping","mass"];function ss(t,e){return e.some((function(e){return void 0!==t[e]}))}function ls(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.restSpeed,a=void 0===i?2:i,s=t.restDelta,l=Object(Wo.d)(t,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},u=function(t){var e=Object(Wo.a)({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!ss(t,as)&&ss(t,is)){var n=rs(t);(e=Object(Wo.a)(Object(Wo.a)(Object(Wo.a)({},e),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return e}(l),d=u.stiffness,h=u.damping,p=u.mass,f=u.velocity,m=u.duration,g=u.isResolvedFromDuration,v=cs,b=cs;function y(){var t=f?-f/1e3:0,e=o-n,r=h/(2*Math.sqrt(d*p)),i=Math.sqrt(d/p)/1e3;if(null!=s||(s=Math.abs(o-n)<=1?.01:.4),r<1){var a=os(i,r);v=function(n){var s=Math.exp(-r*i*n);return o-s*((t+r*i*e)/a*Math.sin(a*n)+e*Math.cos(a*n))},b=function(n){var o=Math.exp(-r*i*n);return r*i*o*(Math.sin(a*n)*(t+r*i*e)/a+e*Math.cos(a*n))-o*(Math.cos(a*n)*(t+r*i*e)-a*e*Math.sin(a*n))}}else if(1===r)v=function(n){return o-Math.exp(-i*n)*(e+(t+i*e)*n)};else{var l=i*Math.sqrt(r*r-1);v=function(n){var a=Math.exp(-r*i*n),s=Math.min(l*n,300);return o-a*((t+r*i*e)*Math.sinh(s)+l*e*Math.cosh(s))/l}}}return y(),{next:function(t){var e=v(t);if(g)c.done=t>=m;else{var n=1e3*b(t),r=Math.abs(n)<=a,i=Math.abs(o-e)<=s;c.done=r&&i}return c.value=c.done?o:e,c},flipTarget:function(){var t;f=-f,n=(t=[o,n])[0],o=t[1],y()}}}ls.needsInterpolation=function(t,e){return"string"==typeof t||"string"==typeof e};var cs=function(t){return 0},us=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},ds=function(t,e,n){return-n*t+n*e+t},hs=function(t,e){return function(n){return Boolean(Bi(n)&&Di.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e))}},ps=function(t,e,n){return function(r){var o;if(!Bi(r))return r;var i=r.match(Pi),a=i[0],s=i[1],l=i[2],c=i[3];return(o={})[t]=parseFloat(a),o[e]=parseFloat(s),o[n]=parseFloat(l),o.alpha=void 0!==c?parseFloat(c):1,o}},fs=_i(0,255),ms=Object(Wo.a)(Object(Wo.a)({},Ui),{transform:function(t){return Math.round(fs(t))}}),gs={test:hs("rgb","red"),parse:ps("red","green","blue"),transform:function(t){var e=t.red,n=t.green,r=t.blue,o=t.alpha,i=void 0===o?1:o;return"rgba("+ms.transform(e)+", "+ms.transform(n)+", "+ms.transform(r)+", "+Ti(Hi.transform(i))+")"}};var vs={test:hs("#"),parse:function(t){var e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:gs.transform},bs={test:hs("hsl","hue"),parse:ps("hue","saturation","lightness"),transform:function(t){var e=t.hue,n=t.saturation,r=t.lightness,o=t.alpha,i=void 0===o?1:o;return"hsla("+Math.round(e)+", "+Mi.transform(Ti(n))+", "+Mi.transform(Ti(r))+", "+Ti(Hi.transform(i))+")"}},ys=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},As=[vs,gs,bs],Cs=function(t){return As.find((function(e){return e.test(t)}))},Ss=function(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."},xs=function(t,e){var n=Cs(t),r=Cs(e);Ss(t),Ss(e),n.transform,r.transform;var o=n.parse(t),i=r.parse(e),a=Object(Wo.a)({},o),s=n===bs?ds:ys;return function(t){for(var e in a)"alpha"!==e&&(a[e]=s(o[e],i[e],t));return a.alpha=ds(o.alpha,i.alpha,t),n.transform(a)}},ws={test:function(t){return gs.test(t)||vs.test(t)||bs.test(t)},parse:function(t){return gs.test(t)?gs.parse(t):bs.test(t)?bs.parse(t):vs.parse(t)},transform:function(t){return Bi(t)?t:t.hasOwnProperty("red")?gs.transform(t):bs.transform(t)}},Os="${c}",Es="${n}";function Ls(t){var e=[],n=0,r=t.match(Ri);r&&(n=r.length,t=t.replace(Ri,Os),e.push.apply(e,r.map(ws.parse)));var o=t.match(Pi);return o&&(t=t.replace(Pi,Es),e.push.apply(e,o.map(Ui.parse))),{values:e,numColors:n,tokenised:t}}function js(t){return Ls(t).values}function ks(t){var e=Ls(t),n=e.values,r=e.numColors,o=e.tokenised,i=n.length;return function(t){for(var e=o,n=0;n<i;n++)e=e.replace(n<r?Os:Es,n<r?ws.transform(t[n]):Ti(t[n]));return e}}var _s=function(t){return"number"==typeof t?0:t};var Ts={test:function(t){var e,n,r,o;return isNaN(t)&&Bi(t)&&(null!==(n=null===(e=t.match(Pi))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(Ri))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:js,createTransformer:ks,getAnimatableNone:function(t){var e=js(t);return ks(t)(e.map(_s))}},Ps=function(t){return"number"==typeof t};function Rs(t,e){return Ps(t)?function(n){return ds(t,e,n)}:ws.test(t)?xs(t,e):Is(t,e)}var Ds=function(t,e){var n=Object(Wo.e)([],t),r=n.length,o=t.map((function(t,n){return Rs(t,e[n])}));return function(t){for(var e=0;e<r;e++)n[e]=o[e](t);return n}},Bs=function(t,e){var n=Object(Wo.a)(Object(Wo.a)({},t),e),r={};for(var o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=Rs(t[o],e[o]));return function(t){for(var e in r)n[e]=r[e](t);return n}};function Fs(t){for(var e=Ts.parse(t),n=e.length,r=0,o=0,i=0,a=0;a<n;a++)r||"number"==typeof e[a]?r++:void 0!==e[a].hue?i++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:i}}var Is=function(t,e){var n=Ts.createTransformer(e),r=Fs(t),o=Fs(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&(r.numNumbers,o.numNumbers),qa(Ds(r.parsed,o.parsed),n)},Ms=function(t,e){return function(n){return ds(t,e,n)}};function Ws(t,e,n){for(var r,o=[],i=n||("number"==typeof(r=t[0])?Ms:"string"==typeof r?ws.test(r)?xs:Is:Array.isArray(r)?Ds:"object"==typeof r?Bs:void 0),a=t.length-1,s=0;s<a;s++){var l=i(t[s],t[s+1]);if(e){var c=Array.isArray(e)?e[s]:e;l=qa(c,l)}o.push(l)}return o}function zs(t,e,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,l=t.length;e.length,!a||!Array.isArray(a)||a.length,t[0]>t[l-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());var c=Ws(e,a,s),u=2===l?function(t,e){var n=t[0],r=t[1],o=e[0];return function(t){return o(us(n,r,t))}}(t,c):function(t,e){var n=t.length,r=n-1;return function(o){var i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){for(var s=1;s<n&&!(t[s]>o||s===r);s++);i=s-1}var l=us(t[i],t[i+1],o);return e[i](l)}}(t,c);return i?function(e){return u(es(t[0],t[l-1],e))}:u}var Ns,Vs=function(t){return function(e){return 1-t(1-e)}},Us=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},Hs=function(t){return function(e){return e*e*((t+1)*e-t)}},$s=function(t){return t},Gs=(Ns=2,function(t){return Math.pow(t,Ns)}),Ys=Vs(Gs),Qs=Us(Gs),Zs=function(t){return 1-Math.sin(Math.acos(t))},Xs=Vs(Zs),qs=Us(Xs),Ks=Hs(1.525),Js=Vs(Ks),tl=Us(Ks),el=function(t){var e=Hs(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}}(1.525),nl=function(t){if(1===t||0===t)return t;var e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},rl=Vs(nl);function ol(t,e){return t.map((function(){return e||Qs})).splice(0,t.length-1)}function il(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,a=t.offset,s=t.duration,l=void 0===s?300:s,c={done:!1,value:n},u=Array.isArray(o)?o:[n,o],d=function(t,e){return t.map((function(t){return t*e}))}(a&&a.length===u.length?a:function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(u),l);function h(){return zs(d,u,{ease:Array.isArray(i)?i:ol(u,i)})}var p=h();return{next:function(t){return c.value=p(t),c.done=t>=l,c},flipTarget:function(){u.reverse(),p=h()}}}var al={keyframes:il,spring:ls,decay:function(t){var e=t.velocity,n=void 0===e?0:e,r=t.from,o=void 0===r?0:r,i=t.power,a=void 0===i?.8:i,s=t.timeConstant,l=void 0===s?350:s,c=t.restDelta,u=void 0===c?.5:c,d=t.modifyTarget,h={done:!1,value:o},p=a*n,f=o+p,m=void 0===d?f:d(f);return m!==f&&(p=m-o),{next:function(t){var e=-p*Math.exp(-t/l);return h.done=!(e>u||e<-u),h.value=h.done?m:m+e,h},flipTarget:function(){}}}};var sl=1/60*1e3,ll="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},cl="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(ll())}),sl)};var ul=!0,dl=!1,hl=!1,pl={delta:0,timestamp:0},fl=["read","update","preRender","render","postRender"],ml=fl.reduce((function(t,e){return t[e]=function(t){var e=[],n=[],r=0,o=!1,i=new WeakSet,a={schedule:function(t,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&o,c=l?e:n;return a&&i.add(t),-1===c.indexOf(t)&&(c.push(t),l&&o&&(r=e.length)),t},cancel:function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1),i.delete(t)},process:function(s){var l;if(o=!0,e=(l=[n,e])[0],(n=l[1]).length=0,r=e.length)for(var c=0;c<r;c++){var u=e[c];u(s),i.has(u)&&(a.schedule(u),t())}o=!1}};return a}((function(){return dl=!0})),t}),{}),gl=fl.reduce((function(t,e){var n=ml[e];return t[e]=function(t,e,r){return void 0===e&&(e=!1),void 0===r&&(r=!1),dl||Cl(),n.schedule(t,e,r)},t}),{}),vl=fl.reduce((function(t,e){return t[e]=ml[e].cancel,t}),{}),bl=fl.reduce((function(t,e){return t[e]=function(){return ml[e].process(pl)},t}),{}),yl=function(t){return ml[t].process(pl)},Al=function(t){dl=!1,pl.delta=ul?sl:Math.max(Math.min(t-pl.timestamp,40),1),pl.timestamp=t,hl=!0,fl.forEach(yl),hl=!1,dl&&(ul=!1,cl(Al))},Cl=function(){dl=!0,ul=!0,hl||cl(Al)},Sl=function(){return pl},xl=gl;function wl(t,e,n){return void 0===n&&(n=0),t-e-n}var Ol=function(t){var e=function(e){var n=e.delta;return t(n)};return{start:function(){return xl.update(e,!0)},stop:function(){return vl.update(e)}}};function El(t){var e,n,r,o,i,a=t.from,s=t.autoplay,l=void 0===s||s,c=t.driver,u=void 0===c?Ol:c,d=t.elapsed,h=void 0===d?0:d,p=t.repeat,f=void 0===p?0:p,m=t.repeatType,g=void 0===m?"loop":m,v=t.repeatDelay,b=void 0===v?0:v,y=t.onPlay,A=t.onStop,C=t.onComplete,S=t.onRepeat,x=t.onUpdate,w=Object(Wo.d)(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),O=w.to,E=0,L=w.duration,j=!1,k=!0,_=function(t){if(Array.isArray(t.to))return il;if(al[t.type])return al[t.type];var e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?il:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?ls:il}(w);(null===(n=(e=_).needsInterpolation)||void 0===n?void 0:n.call(e,a,O))&&(i=zs([0,100],[a,O],{clamp:!1}),a=0,O=100);var T=_(Object(Wo.a)(Object(Wo.a)({},w),{from:a,to:O}));function P(){E++,"reverse"===g?h=function(t,e,n,r){return void 0===n&&(n=0),void 0===r&&(r=!0),r?wl(e+-t,e,n):e-(t-e)+n}(h,L,b,k=E%2==0):(h=wl(h,L,b),"mirror"===g&&T.flipTarget()),j=!1,S&&S()}function R(t){if(k||(t=-t),h+=t,!j){var e=T.next(Math.max(0,h));o=e.value,i&&(o=i(o)),j=k?e.done:h<=0}null==x||x(o),j&&(0===E&&(null!=L||(L=h)),E<f?function(t,e,n,r){return r?t>=e+n:t<=-n}(h,L,b,k)&&P():(r.stop(),C&&C()))}return l&&(null==y||y(),(r=u(R)).start()),{stop:function(){null==A||A(),r.stop()}}}function Ll(t,e){return e?t*(1e3/e):0}var jl=function(t){return 1e3*t},kl=function(t,e){return 1-3*e+3*t},_l=function(t,e){return 3*e-6*t},Tl=function(t){return 3*t},Pl=function(t,e,n){return((kl(e,n)*t+_l(e,n))*t+Tl(e))*t},Rl=function(t,e,n){return 3*kl(e,n)*t*t+2*_l(e,n)*t+Tl(e)};var Dl=.1;function Bl(t,e,n,r){if(t===e&&n===r)return $s;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=Pl(i*Dl,t,n);function a(e){for(var r=0,i=1;10!==i&&o[i]<=e;++i)r+=Dl;--i;var a=r+(e-o[i])/(o[i+1]-o[i])*Dl,s=Rl(a,t,n);return s>=.001?function(t,e,n,r){for(var o=0;o<8;++o){var i=Rl(e,n,r);if(0===i)return e;e-=(Pl(e,n,r)-t)/i}return e}(e,a,t,n):0===s?a:function(t,e,n,r,o){var i,a,s=0;do{(i=Pl(a=e+(n-e)/2,r,o)-t)>0?n=a:e=a}while(Math.abs(i)>1e-7&&++s<10);return a}(e,r,r+Dl,t,n)}return function(t){return 0===t||1===t?t:Pl(a(t),e,r)}}var Fl={linear:$s,easeIn:Gs,easeInOut:Qs,easeOut:Ys,circIn:Zs,circInOut:qs,circOut:Xs,backIn:Ks,backInOut:tl,backOut:Js,anticipate:el,bounceIn:rl,bounceInOut:function(t){return t<.5?.5*(1-nl(1-2*t)):.5*nl(2*t-1)+.5},bounceOut:nl},Il=function(t){if(Array.isArray(t)){t.length;var e=Object(Wo.c)(t,4);return Bl(e[0],e[1],e[2],e[3])}return"string"==typeof t?Fl[t]:t},Ml=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ts.test(e)||e.startsWith("url(")))},Wl=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},zl=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Nl=function(){return{type:"keyframes",ease:"linear",duration:.3}},Vl=function(t){return{type:"keyframes",duration:.8,values:t}},Ul={x:Wl,y:Wl,z:Wl,rotate:Wl,rotateX:Wl,rotateY:Wl,rotateZ:Wl,scaleX:zl,scaleY:zl,scale:zl,opacity:Nl,backgroundColor:Nl,color:Nl,default:zl},Hl=new Set(["brightness","contrast","saturate","opacity"]);function $l(t){var e=t.slice(0,-1).split("("),n=e[0],r=e[1];if("drop-shadow"===n)return t;var o=(r.match(Pi)||[])[0];if(!o)return t;var i=r.replace(o,""),a=Hl.has(n)?1:0;return o!==r&&(a*=100),n+"("+a+i+")"}var Gl=/([a-z-]*)\(.*?\)/g,Yl=Object(Wo.a)(Object(Wo.a)({},Ts),{getAnimatableNone:function(t){var e=t.match(Gl);return e?e.map($l).join(" "):t}}),Ql=Object(Wo.a)(Object(Wo.a)({},Yi),{color:ws,backgroundColor:ws,outlineColor:ws,fill:ws,stroke:ws,borderColor:ws,borderTopColor:ws,borderRightColor:ws,borderBottomColor:ws,borderLeftColor:ws,filter:Yl,WebkitFilter:Yl}),Zl=function(t){return Ql[t]};function Xl(t,e){var n,r=Zl(t);return r!==Yl&&(r=Ts),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}function ql(t){var e=t.ease,n=t.times,r=t.yoyo,o=t.flip,i=t.loop,a=Object(Wo.d)(t,["ease","times","yoyo","flip","loop"]),s=Object(Wo.a)({},a);return n&&(s.offset=n),a.duration&&(s.duration=jl(a.duration)),a.repeatDelay&&(s.repeatDelay=jl(a.repeatDelay)),e&&(s.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(Il):Il(e)),"tween"===a.type&&(s.type="keyframes"),(r||i||o)&&(!0,r?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||r||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function Kl(t,e,n){var r,o,i,a;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=Object(Wo.e)([],Object(Wo.c)(t.to)),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=Object(Wo.d)(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Object(Wo.a)(Object(Wo.a)({},t),(o=n,i=e.to,a=ya(i)?Vl:Ul[o]||Ul.default,Object(Wo.a)({to:i},a(i))))),Object(Wo.a)(Object(Wo.a)({},e),ql(t))}function Jl(t,e,n,r,o){var i,a=nc(r,t),s=null!==(i=a.from)&&void 0!==i?i:e.get(),l=Ml(t,n);"none"===s&&l&&"string"==typeof n?s=Xl(t,n):tc(s)&&"string"==typeof n?s=ec(n):!Array.isArray(n)&&tc(n)&&"string"==typeof s&&(n=ec(s));var c=Ml(t,s);return c&&l&&!1!==a.type?function(){var r={from:s,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:function(t){return e.set(t)}};return"inertia"===a.type||"decay"===a.type?function(t){var e,n=t.from,r=void 0===n?0:n,o=t.velocity,i=void 0===o?0:o,a=t.min,s=t.max,l=t.power,c=void 0===l?.8:l,u=t.timeConstant,d=void 0===u?750:u,h=t.bounceStiffness,p=void 0===h?500:h,f=t.bounceDamping,m=void 0===f?10:f,g=t.restDelta,v=void 0===g?1:g,b=t.modifyTarget,y=t.driver,A=t.onUpdate,C=t.onComplete;function S(t){return void 0!==a&&t<a||void 0!==s&&t>s}function x(t){return void 0===a?s:void 0===s||Math.abs(a-t)<Math.abs(s-t)?a:s}function w(t){null==e||e.stop(),e=El(Object(Wo.a)(Object(Wo.a)({},t),{driver:y,onUpdate:function(e){var n;null==A||A(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:C}))}function O(t){w(Object(Wo.a)({type:"spring",stiffness:p,damping:m,restDelta:v},t))}if(S(r))O({from:r,velocity:i,to:x(r)});else{var E=c*i+r;"undefined"!=typeof b&&(E=b(E));var L,j,k=x(E),_=k===a?-1:1;w({type:"decay",from:r,velocity:i,timeConstant:d,power:c,restDelta:v,modifyTarget:b,onUpdate:S(E)?function(t){L=j,j=t,i=Ll(t-L,Sl().delta),(1===_&&t>k||-1===_&&t<k)&&O({from:t,to:k,velocity:i})}:void 0})}return{stop:function(){return null==e?void 0:e.stop()}}}(Object(Wo.a)(Object(Wo.a)({},r),a)):El(Object(Wo.a)(Object(Wo.a)({},Kl(a,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=a.onUpdate)||void 0===e||e.call(a,t)},onComplete:function(){var t;r.onComplete(),null===(t=a.onComplete)||void 0===t||t.call(a)}}))}:function(){var t;return e.set(n),o(),null===(t=null==a?void 0:a.onComplete)||void 0===t||t.call(a),{stop:function(){}}}}function tc(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function ec(t){return"number"==typeof t?0:Xl("",t)}function nc(t,e){return t[e]||t.default||t}function rc(t,e,n,r){return void 0===r&&(r={}),e.start((function(o){var i,a,s=Jl(t,e,n,r,o),l=function(t,e){var n;return null!==(n=(nc(t,e)||{}).delay)&&void 0!==n?n:0}(r,t),c=function(){return a=s()};return l?i=setTimeout(c,jl(l)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}function oc(t,e){-1===t.indexOf(e)&&t.push(e)}function ic(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var ac=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return oc(this.subscriptions,t),function(){return ic(e.subscriptions,t)}},t.prototype.notify=function(t,e,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),sc=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ac,this.velocityUpdateSubscribers=new ac,this.renderSubscribers=new ac,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=Sl(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,xl.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return xl.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?Ll(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function lc(t){return new sc(t)}var cc=function(t){return function(e){return e.test(t)}},uc=[Ui,Wi,Mi,Ii,Ni,zi,{test:function(t){return"auto"===t},parse:function(t){return t}}],dc=function(t){return uc.find(cc(t))},hc=Object(Wo.e)(Object(Wo.e)([],Object(Wo.c)(uc)),[ws,Ts]),pc=function(t){return hc.find(cc(t))};function fc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,lc(n))}function mc(t,e){var n=li(t,e),r=n?t.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,i=void 0===o?{}:o;r.transition;var a,s=Object(Wo.d)(r,["transitionEnd","transition"]);for(var l in s=Object(Wo.a)(Object(Wo.a)({},s),i)){fc(t,l,(a=s[l],ya(a)?a[a.length-1]||0:a))}}function gc(t,e){if(e)return(e[t]||e.default||e).from}function vc(t,e,n){var r;void 0===n&&(n={});var o=li(t,e,n.custom),i=(o||{}).transition,a=void 0===i?t.getDefaultTransition()||{}:i;n.transitionOverride&&(a=n.transitionOverride);var s=o?function(){return bc(t,o,n)}:function(){return Promise.resolve()},l=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var o=a.delayChildren,i=void 0===o?0:o,s=a.staggerChildren,l=a.staggerDirection;return function(t,e,n,r,o,i){void 0===n&&(n=0);void 0===r&&(r=0);void 0===o&&(o=1);var a=[],s=(t.variantChildren.size-1)*r,l=1===o?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),s-t*r};return Array.from(t.variantChildren).sort(yc).forEach((function(t,r){a.push(vc(t,e,Object(Wo.a)(Object(Wo.a)({},i),{delay:n+l(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(a)}(t,e,i+r,s,l,n)}:function(){return Promise.resolve()},c=a.when;if(c){var u=Object(Wo.c)("beforeChildren"===c?[s,l]:[l,s],2),d=u[0],h=u[1];return d().then(h)}return Promise.all([s(),l(n.delay)])}function bc(t,e,n){var r,o=void 0===n?{}:n,i=o.delay,a=void 0===i?0:i,s=o.transitionOverride,l=o.type,c=t.makeTargetAnimatable(e),u=c.transition,d=void 0===u?t.getDefaultTransition():u,h=c.transitionEnd,p=Object(Wo.d)(c,["transition","transitionEnd"]);s&&(d=s);var f=[],m=l&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[l]);for(var g in p){var v=t.getValue(g),b=p[g];if(!(!v||void 0===b||m&&Ac(m,g))){var y=rc(g,v,b,Object(Wo.a)({delay:a},d));f.push(y)}}return Promise.all(f).then((function(){h&&mc(t,h)}))}function yc(t,e){return t.sortNodePosition(e)}function Ac(t,e){var n=t.protectedKeys,r=t.needsAnimating,o=n.hasOwnProperty(e)&&!0!==r[e];return r[e]=!1,o}var Cc=[Oa.Animate,Oa.Hover,Oa.Tap,Oa.Drag,Oa.Focus,Oa.Exit],Sc=Object(Wo.e)([],Object(Wo.c)(Cc)).reverse(),xc=Cc.length;function wc(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,r=e.options;return function(t,e,n){var r;if(void 0===n&&(n={}),t.notifyAnimationStart(),Array.isArray(e)){var o=e.map((function(e){return vc(t,e,n)}));r=Promise.all(o)}else if("string"==typeof e)r=vc(t,e,n);else{var i="function"==typeof e?li(t,e,n.custom):e;r=bc(t,i,n)}return r.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,r)})))}}function Oc(t){var e,n=wc(t),r=((e={})[Oa.Animate]=Ec(!0),e[Oa.Hover]=Ec(),e[Oa.Tap]=Ec(),e[Oa.Drag]=Ec(),e[Oa.Focus]=Ec(),e[Oa.Exit]=Ec(),e),o={},i=!0,a=function(e,n){var r=li(t,n);if(r){r.transition;var o=r.transitionEnd,i=Object(Wo.d)(r,["transition","transitionEnd"]);e=Object(Wo.a)(Object(Wo.a)(Object(Wo.a)({},e),i),o)}return e};function s(e,s){for(var l,c=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set,p={},f=1/0,m=function(n){var o=Sc[n],m=r[o],g=null!==(l=c[o])&&void 0!==l?l:u[o],v=ai(g),b=o===s?m.isActive:null;!1===b&&(f=n);var y=g===u[o]&&g!==c[o]&&v;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys=Object(Wo.a)({},p),!m.isActive&&null===b||!g&&!m.prevProp||ba(g)||"boolean"==typeof g)return"continue";var A=function(t,e){if("string"==typeof e)return e!==t;if(ii(e))return!ts(e,t);return!1}(m.prevProp,g)||o===s&&m.isActive&&!y&&v||n>f&&v,C=Array.isArray(g)?g:[g],S=C.reduce(a,{});!1===b&&(S={});var x=m.prevResolvedValues,w=void 0===x?{}:x,O=Object(Wo.a)(Object(Wo.a)({},w),S),E=function(t){A=!0,h.delete(t),m.needsAnimating[t]=!0};for(var L in O){var j=S[L],k=w[L];p.hasOwnProperty(L)||(j!==k?ya(j)&&ya(k)?ts(j,k)?m.protectedKeys[L]=!0:E(L):void 0!==j?E(L):h.add(L):void 0!==j&&h.has(L)?E(L):m.protectedKeys[L]=!0)}m.prevProp=g,m.prevResolvedValues=S,m.isActive&&(p=Object(Wo.a)(Object(Wo.a)({},p),S)),i&&t.blockInitialAnimation&&(A=!1),A&&!y&&d.push.apply(d,Object(Wo.e)([],Object(Wo.c)(C.map((function(t){return{animation:t,options:Object(Wo.a)({type:o},e)}})))))},g=0;g<xc;g++)m(g);if(o=Object(Wo.a)({},p),h.size){var v={};h.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(v[e]=n)})),d.push({animation:v})}var b=Boolean(d.length);return i&&!1===c.initial&&!t.manuallyAnimateOnMount&&(b=!1),i=!1,b?n(d):Promise.resolve()}return{isAnimated:function(t){return void 0!==o[t]},animateChanges:s,setActive:function(e,n,o){var i;return r[e].isActive===n?Promise.resolve():(null===(i=t.variantChildren)||void 0===i||i.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(e,n)})),r[e].isActive=n,s(o,e))},setAnimateFunction:function(e){n=e(t)},getState:function(){return r}}}function Ec(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var Lc={animation:Ka((function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=Oc(e)),ba(n)&&Object(I.useEffect)((function(){return n.subscribe(e)}),[n])})),exit:Ka((function(t){var e=t.custom,n=t.visualElement,r=Object(Wo.c)(Zo(),2),o=r[0],i=r[1],a=Object(I.useContext)(Yo);Object(I.useEffect)((function(){var t,r,s=null===(t=n.animationState)||void 0===t?void 0:t.setActive(Oa.Exit,!o,{custom:null!==(r=null==a?void 0:a.custom)&&void 0!==r?r:e});!o&&(null==s||s.then(i))}),[o])}))},jc=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},kc=function(t){return jc(t)&&t.hasOwnProperty("z")},_c=function(t,e){return Math.abs(t-e)};function Tc(t,e){if(Ps(t)&&Ps(e))return _c(t,e);if(jc(t)&&jc(e)){var n=_c(t.x,e.x),r=_c(t.y,e.y),o=kc(t)&&kc(e)?_c(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var Pc=function(){function t(t,e,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=Bc(r.lastMoveEventInfo,r.history),e=null!==r.startEvent,n=Tc(t.offset,{x:0,y:0})>=3;if(e||n){var o=t.point,i=Sl().timestamp;r.history.push(Object(Wo.a)(Object(Wo.a)({},o),{timestamp:i}));var a=r.handlers,s=a.onStart,l=a.onMove;e||(s&&s(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){r.lastMoveEvent=t,r.lastMoveEventInfo=Rc(e,r.transformPagePoint),_a(t)&&0===t.buttons?r.handlePointerUp(t,e):xl.update(r.updatePoint,!0)},this.handlePointerUp=function(t,e){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=Bc(Rc(e,r.transformPagePoint),r.history);r.startEvent&&o&&o(t,a),i&&i(t,a)},!(Ta(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=o;var i=Rc(Ba(t),this.transformPagePoint),a=i.point,s=Sl().timestamp;this.history=[Object(Wo.a)(Object(Wo.a)({},a),{timestamp:s})];var l=e.onSessionStart;l&&l(t,Bc(i,this.history)),this.removeListeners=qa(za(window,"pointermove",this.handlePointerMove),za(window,"pointerup",this.handlePointerUp),za(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),vl.update(this.updatePoint)},t}();function Rc(t,e){return e?{point:e(t.point)}:t}function Dc(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Bc(t,e){var n=t.point;return{point:n,delta:Dc(n,Ic(e)),offset:Dc(n,Fc(e)),velocity:Mc(e,.1)}}function Fc(t){return t[0]}function Ic(t){return t[t.length-1]}function Mc(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=Ic(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>jl(e)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Wc(t){return t}function zc(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}var Nc={translate:0,scale:1,origin:0,originPoint:0};function Vc(){return{x:Object(Wo.a)({},Nc),y:Object(Wo.a)({},Nc)}}function Uc(t){return[t("x"),t("y")]}function Hc(t,e,n){var r=e.min,o=e.max;return void 0!==r&&t<r?t=n?ds(r,t,n.min):Math.max(t,r):void 0!==o&&t>o&&(t=n?ds(o,t,n.max):Math.min(t,o)),t}function $c(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Gc(t,e){var n,r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&(r=(n=Object(Wo.c)([o,r],2))[0],o=n[1]),{min:t.min+r,max:t.min+o}}function Yc(t,e,n){return{min:Qc(t,e),max:Qc(t,n)}}function Qc(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}function Zc(t,e){return zc(function(t,e){var n=t.top,r=t.left,o=t.bottom,i=t.right;void 0===e&&(e=Wc);var a=e({x:r,y:n}),s=e({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}function Xc(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),Tc(t,e)<n}function qc(t){return t.max-t.min}function Kc(t,e){var n=.5,r=qc(t),o=qc(e);return o>r?n=us(e.min,e.max-r,t.min):r>o&&(n=us(t.min,t.max-o,e.min)),es(0,1,n)}function Jc(t,e,n,r){void 0===r&&(r=.5),t.origin=r,t.originPoint=ds(e.min,e.max,t.origin),t.scale=qc(n)/qc(e),Xc(t.scale,1,1e-4)&&(t.scale=1),t.translate=ds(n.min,n.max,t.origin)-t.originPoint,Xc(t.translate)&&(t.translate=0)}function tu(t,e,n,r){Jc(t.x,e.x,n.x,eu(r.originX)),Jc(t.y,e.y,n.y,eu(r.originY))}function eu(t){return"number"==typeof t?t:.5}function nu(t,e,n){t.min=n.min+e.min,t.max=t.min+qc(e)}var ru=function(t,e){return t.depth-e.depth};function ou(t){return t.projection.isEnabled||t.shouldResetTransform()}function iu(t,e){void 0===e&&(e=[]);var n=t.parent;return n&&iu(n,e),ou(t)&&e.push(t),e}function au(t){if(!t.shouldResetTransform()){var e,n=t.getLayoutState();t.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=t.measureViewportBox(),n.layoutCorrected=(e=n.layout,{x:Object(Wo.a)({},e.x),y:Object(Wo.a)({},e.y)}),t.notifyLayoutMeasure(n.layout,t.prevViewportBox||n.layout),xl.update((function(){return t.rebaseProjectionTarget()}))}}function su(t,e){return{min:e.min-t.min,max:e.max-t.min}}function lu(t,e){return{x:su(t.x,e.x),y:su(t.y,e.y)}}function cu(t,e){var n=t.getLayoutId(),r=e.getLayoutId();return n!==r||void 0===r&&t!==e}function uu(t){var e=t.getProps(),n=e.drag,r=e._dragX;return n&&!r}function du(t,e){t.min=e.min,t.max=e.max}function hu(t,e,n){return n+e*(t-n)}function pu(t,e,n,r,o){return void 0!==o&&(t=hu(t,o,r)),hu(t,n,r)+e}function fu(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=1),t.min=pu(t.min,e,n,r,o),t.max=pu(t.max,e,n,r,o)}function mu(t,e){var n=e.x,r=e.y;fu(t.x,n.translate,n.scale,n.originPoint),fu(t.y,r.translate,r.scale,r.originPoint)}function gu(t,e,n,r){var o=Object(Wo.c)(r,3),i=o[0],a=o[1],s=o[2];t.min=e.min,t.max=e.max;var l=void 0!==n[s]?n[s]:.5,c=ds(e.min,e.max,l);fu(t,n[i],n[a],c,n.scale)}var vu=["x","scaleX","originX"],bu=["y","scaleY","originY"];function yu(t,e,n){gu(t.x,e.x,n,vu),gu(t.y,e.y,n,bu)}function Au(t,e,n,r,o){return t=hu(t-=e,1/n,r),void 0!==o&&(t=hu(t,1/o,r)),t}function Cu(t,e,n){var r=Object(Wo.c)(n,3),o=r[0],i=r[1],a=r[2];!function(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=.5);var i=ds(t.min,t.max,r)-e;t.min=Au(t.min,e,n,i,o),t.max=Au(t.max,e,n,i,o)}(t,e[o],e[i],e[a],e.scale)}function Su(t,e){Cu(t.x,e,vu),Cu(t.y,e,bu)}var xu=new Set;function wu(t,e,n){t[n]||(t[n]=[]),t[n].push(e)}function Ou(t){return xu.add(t),function(){return xu.delete(t)}}function Eu(){if(xu.size){var t=0,e=[[]],n=[],r=function(n){return wu(e,n,t)},o=function(e){wu(n,e,t),t++};xu.forEach((function(e){e(r,o),t=0})),xu.clear();for(var i=n.length,a=0;a<=i;a++)e[a]&&e[a].forEach(ju),n[a]&&n[a].forEach(ju)}}var Lu,ju=function(t){return t()},ku=new WeakMap,_u=function(){function t(t){var e=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=e,this.visualElement.enableLayoutProjection(),ku.set(e,this)}return t.prototype.start=function(t,e){var n=this,r=void 0===e?{}:e,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress,s=this.props.transformPagePoint;this.panSession=new Pc(t,{onSessionStart:function(t){var e;n.stopMotion();var r=function(t){return Ba(t,"client")}(t).point;null===(e=n.cancelLayout)||void 0===e||e.call(n),n.cancelLayout=Ou((function(t,e){var o=iu(n.visualElement),s=function(t){var e=[],n=function(t){ou(t)&&e.push(t),t.children.forEach(n)};return t.children.forEach(n),e.sort(ru)}(n.visualElement),l=Object(Wo.e)(Object(Wo.e)([],Object(Wo.c)(o)),Object(Wo.c)(s)),c=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),e((function(){l.forEach((function(t){return t.resetTransform()}))})),t((function(){au(n.visualElement),s.forEach(au)})),e((function(){l.forEach((function(t){return t.restoreTransform()})),i&&(c=n.snapToCursor(r))})),t((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var t=n.visualElement.projection;Uc((function(e){if(!c){var o=t.target[e],i=o.min,s=o.max;n.cursorProgress[e]=a?a[e]:us(i,s,r[e])}var l=n.getAxisMotionValue(e);l&&(n.originPoint[e]=l.get())}))})),e((function(){bl.update(),bl.preRender(),bl.render(),bl.postRender()})),t((function(){return n.resolveDragConstraints()}))}))},onStart:function(t,e){var r,o,i,a=n.props,s=a.drag,l=a.dragPropagation;(!s||l||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=$a(s),n.openGlobalLock))&&(Eu(),n.isDragging=!0,n.currentDirection=null,null===(o=(r=n.props).onDragStart)||void 0===o||o.call(r,t,e),null===(i=n.visualElement.animationState)||void 0===i||i.setActive(Oa.Drag,!0))},onMove:function(t,e){var r,o,i,a,s=n.props,l=s.dragPropagation,c=s.dragDirectionLock;if(l||n.openGlobalLock){var u=e.offset;if(c&&null===n.currentDirection)return n.currentDirection=function(t,e){void 0===e&&(e=10);var n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(u),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",e.point,u),n.updateAxis("y",e.point,u),null===(a=(i=n.props).onDrag)||void 0===a||a.call(i,t,e),Lu=t}},onSessionEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:s})},t.prototype.resolveDragConstraints=function(){var t=this,e=this.props,n=e.dragConstraints,r=e.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(oi(n)?this.resolveRefConstraints(o,n):function(t,e){var n=e.top,r=e.left,o=e.bottom,i=e.right;return{x:$c(t.x,r,i),y:$c(t.y,n,o)}}(o,n)),this.elastic=function(t){return!1===t?t=0:!0===t&&(t=.35),{x:Yc(t,"left","right"),y:Yc(t,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&Uc((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(o[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(t,e){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,i=e.current;this.constraintsBox=Zc(i,o);var a=function(t,e){return{x:Gc(t.x,e.x),y:Gc(t.y,e.y)}}(t,this.constraintsBox);if(r){var s=r(function(t){var e=t.x,n=t.y;return{top:n.min,bottom:n.max,left:e.min,right:e.max}}(a));this.hasMutatedConstraints=!!s,s&&(a=zc(s))}return a},t.prototype.cancelDrag=function(){var t,e;this.visualElement.unlockProjectionTarget(),null===(t=this.cancelLayout)||void 0===t||t.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(Oa.Drag,!1)},t.prototype.stop=function(t,e){var n,r,o;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var i=this.isDragging;if(this.cancelDrag(),i){var a=e.velocity;this.animateDragEnd(a),null===(o=(r=this.props).onDragEnd)||void 0===o||o.call(r,t,e)}},t.prototype.snapToCursor=function(t){var e=this;return Uc((function(n){if(Tu(n,e.props.drag,e.currentDirection)){var r=e.getAxisMotionValue(n);if(!r)return e.cursorProgress[n]=.5,!0;var o=e.visualElement.getLayoutState().layout,i=o[n].max-o[n].min,a=o[n].min+i/2,s=t[n]-a;e.originPoint[n]=t[n],r.set(s)}})).includes(!0)},t.prototype.updateAxis=function(t,e,n){if(Tu(t,this.props.drag,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,n):this.updateVisualElementAxis(t,e)},t.prototype.updateAxisMotionValue=function(t,e){var n=this.getAxisMotionValue(t);if(e&&n){var r=this.originPoint[t]+e[t],o=this.constraints?Hc(r,this.constraints[t],this.elastic[t]):r;n.set(o)}},t.prototype.updateVisualElementAxis=function(t,e){var n,r=this.visualElement.getLayoutState().layout[t],o=r.max-r.min,i=this.cursorProgress[t],a=function(t,e,n,r,o){var i=t-e*n;return r?Hc(i,r,o):i}(e[t],o,i,null===(n=this.constraints)||void 0===n?void 0:n[t],this.elastic[t]);this.visualElement.setProjectionTargetAxis(t,a,a+o)},t.prototype.setProps=function(t){var e=t.drag,n=void 0!==e&&e,r=t.dragDirectionLock,o=void 0!==r&&r,i=t.dragPropagation,a=void 0!==i&&i,s=t.dragConstraints,l=void 0!==s&&s,c=t.dragElastic,u=void 0===c?.35:c,d=t.dragMomentum,h=void 0===d||d,p=Object(Wo.d)(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(Wo.a)({drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:u,dragMomentum:h},p)},t.prototype.getAxisMotionValue=function(t){var e=this.props,n=e.layout,r=e.layoutId,o="_drag"+t.toUpperCase();return this.props[o]?this.props[o]:n||void 0!==r?void 0:this.visualElement.getValue(t,0)},t.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},t.prototype.isExternalDrag=function(){var t=this.props,e=t._dragX,n=t._dragY;return e||n},t.prototype.animateDragEnd=function(t){var e=this,n=this.props,r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,s=function(t,e){void 0===e&&(e=!0);var n,r=t.getProjectionParent();return!!r&&(e?Su(n=lu(r.projection.target,t.projection.target),r.getLatestValues()):n=lu(r.getLayoutState().layout,t.getLayoutState().layout),Uc((function(e){return t.setProjectionTargetAxis(e,n[e].min,n[e].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),l=this.constraints||{};if(s&&Object.keys(l).length&&this.isLayoutDrag()){var c=this.visualElement.getProjectionParent();if(c){var u=lu(c.projection.targetFinal,l);Uc((function(t){var e=u[t],n=e.min,r=e.max;l[t]={min:isNaN(n)?void 0:n,max:isNaN(r)?void 0:r}}))}}var d=Uc((function(n){var c;if(Tu(n,r,e.currentDirection)){var u=null!==(c=null==l?void 0:l[n])&&void 0!==c?c:{},d=i?200:1e6,h=i?40:1e7,p=Object(Wo.a)(Object(Wo.a)({type:"inertia",velocity:o?t[n]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},a),u);return e.getAxisMotionValue(n)?e.startAxisValueAnimation(n,p):e.visualElement.startLayoutAnimation(n,p,s)}}));return Promise.all(d).then((function(){var t,n;null===(n=(t=e.props).onDragTransitionEnd)||void 0===n||n.call(t)}))},t.prototype.stopMotion=function(){var t=this;Uc((function(e){var n=t.getAxisMotionValue(e);n?n.stop():t.visualElement.stopLayoutAnimation()}))},t.prototype.startAxisValueAnimation=function(t,e){var n=this.getAxisMotionValue(t);if(n){var r=n.get();return n.set(r),n.set(r),rc(t,n,0,e)}},t.prototype.scalePoint=function(){var t=this,e=this.props,n=e.drag;if(oi(e.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};Uc((function(e){r[e]=Kc(t.visualElement.projection.target[e],t.constraintsBox[e])})),this.updateConstraints((function(){Uc((function(e){if(Tu(e,n,null)){var o=function(t,e,n){var r=t.max-t.min,o=ds(e.min,e.max-r,n);return{min:o,max:o+r}}(t.visualElement.projection.target[e],t.constraintsBox[e],r[e]),i=o.min,a=o.max;t.visualElement.setProjectionTargetAxis(e,i,a)}}))})),setTimeout(Eu,1)}},t.prototype.updateConstraints=function(t){var e=this;this.cancelLayout=Ou((function(n,r){var o=iu(e.visualElement);r((function(){return o.forEach((function(t){return t.resetTransform()}))})),n((function(){return au(e.visualElement)})),r((function(){return o.forEach((function(t){return t.restoreTransform()}))})),n((function(){e.resolveDragConstraints()})),t&&r(t)}))},t.prototype.mount=function(t){var e=this,n=za(t.getInstance(),"pointerdown",(function(t){var n=e.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&e.start(t)})),r=ja(window,"resize",(function(){e.scalePoint()})),o=t.onLayoutUpdate((function(){e.isDragging&&e.resolveDragConstraints()})),i=t.prevDragCursor;return i&&this.start(Lu,{cursorProgress:i}),function(){null==n||n(),null==r||r(),null==o||o(),e.cancelDrag()}},t}();function Tu(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}var Pu,Ru,Du={pan:Ka((function(t){var e=t.onPan,n=t.onPanStart,r=t.onPanEnd,o=t.onPanSessionStart,i=t.visualElement,a=e||n||r||o,s=Object(I.useRef)(null),l=Object(I.useContext)($o).transformPagePoint,c={onSessionStart:o,onStart:n,onMove:e,onEnd:function(t,e){s.current=null,r&&r(t,e)}};Object(I.useEffect)((function(){null!==s.current&&s.current.updateHandlers(c)})),Na(i,"pointerdown",a&&function(t){s.current=new Pc(t,c,{transformPagePoint:l})}),Za((function(){return s.current&&s.current.end()}))})),drag:Ka((function(t){var e=t.dragControls,n=t.visualElement,r=Object(I.useContext)($o).transformPagePoint,o=Qo((function(){return new _u({visualElement:n})}));o.setProps(Object(Wo.a)(Object(Wo.a)({},t),{transformPagePoint:r})),Object(I.useEffect)((function(){return e&&e.subscribe(o)}),[o]),Object(I.useEffect)((function(){return o.mount(n)}),[])}))};function Bu(t){return"string"==typeof t&&t.startsWith("var(--")}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(Pu||(Pu={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(Ru||(Ru={}));var Fu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Iu(t,e,n){void 0===n&&(n=1);var r=Object(Wo.c)(function(t){var e=Fu.exec(t);if(!e)return[,];var n=Object(Wo.c)(e,3);return[n[1],n[2]]}(t),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(e).getPropertyValue(o);return a?a.trim():Bu(i)?Iu(i,e,n+1):i}}function Mu(t,e){return t/(e.max-e.min)*100}var Wu="_$css";var zu={process:function(t,e,n){var r=n.target;if("string"==typeof t){if(!Wi.test(t))return t;t=parseFloat(t)}return Mu(t,r.x)+"% "+Mu(t,r.y)+"%"}},Nu={borderRadius:Object(Wo.a)(Object(Wo.a)({},zu),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:zu,borderTopRightRadius:zu,borderBottomLeftRadius:zu,borderBottomRightRadius:zu,boxShadow:{process:function(t,e){var n=e.delta,r=e.treeScale,o=t,i=t.includes("var("),a=[];i&&(t=t.replace(Fu,(function(t){return a.push(t),Wu})));var s=Ts.parse(t);if(s.length>5)return o;var l=Ts.createTransformer(t),c="number"!=typeof s[0]?1:0,u=n.x.scale*r.x,d=n.y.scale*r.y;s[0+c]/=u,s[1+c]/=d;var h=ds(u,d,.5);"number"==typeof s[2+c]&&(s[2+c]/=h),"number"==typeof s[3+c]&&(s[3+c]/=h);var p=l(s);if(i){var f=0;p=p.replace(Wu,(function(){var t=a[f];return f++,t}))}return p}}},Vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},e.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},e.isAnimating={x:!1,y:!1},e.stopAxisAnimation={x:void 0,y:void 0},e.isAnimatingTree=!1,e.animate=function(t,n,r){void 0===r&&(r={});var o=r.originBox,i=r.targetBox,a=r.visibilityAction,s=r.shouldStackAnimate,l=r.onComplete,c=r.prevParent,u=Object(Wo.d)(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),d=e.props,h=d.visualElement,p=d.layout;if(!1===s)return e.isAnimatingTree=!1,e.safeToRemove();if(!e.isAnimatingTree||!0===s){s&&(e.isAnimatingTree=!0),n=o||n,t=i||t;var f=!1,m=h.getProjectionParent();if(m){var g=m.prevViewportBox,v=m.getLayoutState().layout;c&&(i&&(v=c.getLayoutState().layout),o&&!cu(c,m)&&c.prevViewportBox&&(g=c.prevViewportBox)),g&&Qu(c,o,i)&&(f=!0,n=lu(g,n),t=lu(v,t))}var b=Uu(n,t),y=Uc((function(r){var o,i;if("position"===p){var s=t[r].max-t[r].min;n[r].max=n[r].min+s}if(!h.projection.isTargetLocked)return void 0===a?b?e.animateAxis(r,t[r],n[r],Object(Wo.a)(Object(Wo.a)({},u),{isRelative:f})):(null===(i=(o=e.stopAxisAnimation)[r])||void 0===i||i.call(o),h.setProjectionTargetAxis(r,t[r].min,t[r].max,f)):void h.setVisibility(a===Ru.Show)}));return h.syncRender(),Promise.all(y).then((function(){e.isAnimatingTree=!1,l&&l(),h.notifyLayoutAnimationComplete()}))}},e}return Object(Wo.b)(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props.visualElement;e.animateMotionValue=rc,e.enableLayoutProjection(),this.unsubLayoutReady=e.onLayoutUpdate(this.animate),e.layoutSafeToRemove=function(){return t.safeToRemove()},function(t){for(var e in t)vi[e]=t[e]}(Nu)},e.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),Uc((function(e){var n,r;return null===(r=(n=t.stopAxisAnimation)[e])||void 0===r?void 0:r.call(n)}))},e.prototype.animateAxis=function(t,e,n,r){var o,i,a=this,s=void 0===r?{}:r,l=s.transition,c=s.isRelative;if(!this.isAnimating[t]||!Gu(e,this.currentAnimationTarget[t])){null===(i=(o=this.stopAxisAnimation)[t])||void 0===i||i.call(o),this.isAnimating[t]=!0;var u=this.props.visualElement,d=this.frameTarget[t],h=u.getProjectionAnimationProgress()[t];h.clearListeners(),h.set(0),h.set(0);var p=function(){var r=h.get()/1e3;!function(t,e,n,r){t.min=ds(e.min,n.min,r),t.max=ds(e.max,n.max,r)}(d,n,e,r),u.setProjectionTargetAxis(t,d.min,d.max,c)};p();var f=h.onChange(p);this.stopAxisAnimation[t]=function(){a.isAnimating[t]=!1,h.stop(),f()},this.currentAnimationTarget[t]=e;var m=l||u.getDefaultTransition()||Yu;return rc("x"===t?"layoutX":"layoutY",h,1e3,m&&nc(m,"layout")).then(this.stopAxisAnimation[t])}},e.prototype.safeToRemove=function(){var t,e;null===(e=(t=this.props).safeToRemove)||void 0===e||e.call(t)},e.prototype.render=function(){return null},e}(I.Component);function Uu(t,e){return!($u(t)||$u(e)||Gu(t.x,e.x)&&Gu(t.y,e.y))}var Hu={min:0,max:0};function $u(t){return Gu(t.x,Hu)&&Gu(t.y,Hu)}function Gu(t,e){return t.min===e.min&&t.max===e.max}var Yu={duration:.45,ease:[.4,0,.1,1]};function Qu(t,e,n){return t||!t&&!(e||n)}var Zu={layoutReady:function(t){return t.notifyLayoutReady()}};function Xu(){var t=new Set;return{add:function(e){return t.add(e)},flush:function(e){var n=void 0===e?Zu:e,r=n.layoutReady,o=n.parent;Ou((function(e,n){var i=Array.from(t).sort(ru),a=o?iu(o):[];n((function(){Object(Wo.e)(Object(Wo.e)([],Object(Wo.c)(a)),Object(Wo.c)(i)).forEach((function(t){return t.resetTransform()}))})),e((function(){i.forEach(au)})),n((function(){a.forEach((function(t){return t.restoreTransform()})),i.forEach(r)})),e((function(){i.forEach((function(t){t.isPresent&&(t.presence=Pu.Present)}))})),n((function(){bl.preRender(),bl.render()})),e((function(){xl.postRender((function(){return i.forEach(qu)})),t.clear()}))})),Eu()}}}function qu(t){t.prevViewportBox=t.projection.target}var Ku=Object(I.createContext)(Xu()),Ju=Object(I.createContext)(Xu());function td(t){return!!t.forceUpdate}var ed=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(Wo.b)(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,n=t.framerSyncLayout,r=t.visualElement;td(e)&&e.register(r),td(n)&&n.register(r),r.onUnmount((function(){td(e)&&e.remove(r),td(n)&&n.remove(r)}))},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;return td(e)?e.syncUpdate():(!function(t){t.shouldResetTransform()||(t.prevViewportBox=t.measureViewportBox(!1),t.rebaseProjectionTarget(!1,t.prevViewportBox))}(n),e.add(n)),null},e.prototype.componentDidUpdate=function(){var t=this.props.syncLayout;td(t)||t.flush()},e.prototype.render=function(){return null},e}(I.default.Component);var nd={measureLayout:function(t){var e=Object(I.useContext)(Ku),n=Object(I.useContext)(Ju);return I.default.createElement(ed,Object(Wo.a)({},t,{syncLayout:e,framerSyncLayout:n}))},layoutAnimation:function(t){var e=Object(Wo.c)(Zo(),2)[1];return I.createElement(Vu,Object(Wo.a)({},t,{safeToRemove:e}))}};function rd(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:Vc(),deltaFinal:Vc(),deltaTransform:""}}var od=rd();function id(t,e,n){var r=t.x,o=t.y,i="translate3d("+r.translate/e.x+"px, "+o.translate/e.y+"px, 0) ";if(n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(i+="rotate("+a+") "),s&&(i+="rotateX("+s+") "),l&&(i+="rotateY("+l+") ")}return i+="scale("+r.scale+", "+o.scale+")",n||i!==sd?i:""}function ad(t){var e=t.deltaFinal;return 100*e.x.origin+"% "+100*e.y.origin+"% 0"}var sd=id(od.delta,od.treeScale,{x:1,y:1}),ld=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function cd(t,e,n,r){var o,i,a=t.delta,s=t.layout,l=t.layoutCorrected,c=t.treeScale,u=e.target;i=s,du((o=l).x,i.x),du(o.y,i.y),function(t,e,n){var r=n.length;if(r){var o,i;e.x=e.y=1;for(var a=0;a<r;a++)i=(o=n[a]).getLayoutState().delta,e.x*=i.x.scale,e.y*=i.y.scale,mu(t,i),uu(o)&&yu(t,t,o.getLatestValues())}}(l,c,n),tu(a,l,u,r)}var ud=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){oc(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){ic(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(ru),this.isDirty=!1,this.children.forEach(t)},t}();var dd=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,o=t.getBaseTarget,i=t.makeTargetAnimatable,a=t.measureViewportBox,s=t.render,l=t.readValueFromInstance,c=t.resetTransform,u=t.restoreTransform,d=t.removeValueFromRenderState,h=t.sortNodePosition,p=t.scrapeMotionValuesFromProps;return function(t,e){var f=t.parent,m=t.props,g=t.presenceId,v=t.blockInitialAnimation,b=t.visualState;void 0===e&&(e={});var y,A,C,S,x,w,O=b.latestValues,E=b.renderState,L=function(){var t=ld.map((function(){return new ac})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){return ld.forEach((function(r){var o;null===(o=e[r])||void 0===o||o.call(e);var i="on"+r,a=t[i];a&&(e[r]=n[i](a))}))}};return t.forEach((function(t,e){n["on"+ld[e]]=function(e){return t.add(e)},n["notify"+ld[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.notify.apply(t,Object(Wo.e)([],Object(Wo.c)(e)))}})),n}(),j={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},k=j,_=O,T=rd(),P=!1,R=new Map,D=new Map,B={},F=Object(Wo.a)({},O);function I(){y&&(G.isProjectionReady()&&(yu(k.targetFinal,k.target,_),tu(T.deltaFinal,T.layoutCorrected,k.targetFinal,O)),M(),s(y,E))}function M(){var t=O;if(S&&S.isActive()){var n=S.getCrossfadeState(G);n&&(t=n)}r(G,E,t,k,T,e,m)}function W(){L.notifyUpdate(O)}function z(){G.layoutTree.forEach(pd)}var N=p(m);for(var V in N){var U=N[V];void 0!==O[V]&&Ei(U)&&U.set(O[V],!1)}var H=ci(m),$=ui(m),G=Object(Wo.a)(Object(Wo.a)({treeType:n,current:null,depth:f?f.depth+1:0,parent:f,children:new Set,path:f?Object(Wo.e)(Object(Wo.e)([],Object(Wo.c)(f.path)),[f]):[],layoutTree:f?f.layoutTree:new ud,presenceId:g,projection:j,variantChildren:$?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==f?void 0:f.isMounted()),blockInitialAnimation:v,isMounted:function(){return Boolean(y)},mount:function(t){y=G.current=t,G.pointTo(G),$&&f&&!H&&(w=null==f?void 0:f.addVariantChild(G)),null==f||f.children.add(G)},unmount:function(){vl.update(W),vl.render(I),vl.preRender(G.updateLayoutProjection),D.forEach((function(t){return t()})),G.stopLayoutAnimation(),G.layoutTree.remove(G),null==w||w(),null==f||f.children.delete(G),null==C||C(),L.clearAllListeners()},addVariantChild:function(t){var e,n=G.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return h&&n===t.treeType?h(G.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return $?G:null==f?void 0:f.getClosestVariantNode()},scheduleUpdateLayoutProjection:f?f.scheduleUpdateLayoutProjection:function(){return xl.preRender(G.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return m.layoutId},getInstance:function(){return y},getStaticValue:function(t){return O[t]},setStaticValue:function(t,e){return O[t]=e},getLatestValues:function(){return O},setVisibility:function(t){G.isVisible!==t&&(G.isVisible=t,G.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),i(G,t,m,e)},addValue:function(t,e){G.hasValue(t)&&G.removeValue(t),R.set(t,e),O[t]=e.get(),function(t,e){var n=e.onChange((function(e){O[t]=e,m.onUpdate&&xl.update(W,!1,!0)})),r=e.onRenderRequest(G.scheduleRender);D.set(t,(function(){n(),r()}))}(t,e)},removeValue:function(t){var e;R.delete(t),null===(e=D.get(t))||void 0===e||e(),D.delete(t),delete O[t],d(t,E)},hasValue:function(t){return R.has(t)},getValue:function(t,e){var n=R.get(t);return void 0===n&&void 0!==e&&(n=lc(e),G.addValue(t,n)),n},forEachValue:function(t){return R.forEach(t)},readValue:function(t){var n;return null!==(n=O[t])&&void 0!==n?n:l(y,t,e)},setBaseTarget:function(t,e){F[t]=e},getBaseTarget:function(t){if(o){var e=o(m,t);if(void 0!==e&&!Ei(e))return e}return F[t]}},L),{build:function(){return M(),E},scheduleRender:function(){xl.render(I,!1,!0)},syncRender:I,setProps:function(t){m=t,L.updatePropListeners(t),B=function(t,e,n){var r;for(var o in e){var i=e[o],a=n[o];if(Ei(i))t.addValue(o,i);else if(Ei(a))t.addValue(o,lc(i));else if(a!==i)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(i)}else t.addValue(o,lc(null!==(r=t.getStaticValue(o))&&void 0!==r?r:i))}for(var o in n)void 0===e[o]&&t.removeValue(o);return e}(G,p(m),B)},getProps:function(){return m},getVariant:function(t){var e;return null===(e=m.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return m.transition},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==f?void 0:f.getVariantContext();if(!H){var e=(null==f?void 0:f.getVariantContext())||{};return void 0!==m.initial&&(e.initial=m.initial),e}for(var n={},r=0;r<gd;r++){var o=md[r],i=m[o];(ai(i)||!1===i)&&(n[o]=i)}return n},enableLayoutProjection:function(){j.isEnabled=!0,G.layoutTree.add(G)},lockProjectionTarget:function(){j.isTargetLocked=!0},unlockProjectionTarget:function(){G.stopLayoutAnimation(),j.isTargetLocked=!1},getLayoutState:function(){return T},setCrossfader:function(t){S=t},isProjectionReady:function(){return j.isEnabled&&j.isHydrated&&T.isHydrated},startLayoutAnimation:function(t,e,n){void 0===n&&(n=!1);var r=G.getProjectionAnimationProgress()[t],o=n?j.relativeTarget[t]:j.target[t],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(e){G.setProjectionTargetAxis(t,e,e+a,n)})),G.animateMotionValue(t,r,0,e)},stopLayoutAnimation:function(){Uc((function(t){return G.getProjectionAnimationProgress()[t].stop()}))},measureViewportBox:function(t){void 0===t&&(t=!0);var n=a(y,e);return t||Su(n,O),n},getProjectionAnimationProgress:function(){return x||(x={x:lc(0),y:lc(0)}),x},setProjectionTargetAxis:function(t,e,n,r){var o;void 0===r&&(r=!1),r?(j.relativeTarget||(j.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),o=j.relativeTarget[t]):(j.relativeTarget=void 0,o=j.target[t]),j.isHydrated=!0,o.min=e,o.max=n,P=!0,L.notifySetAxisTarget()},rebaseProjectionTarget:function(t,e){void 0===e&&(e=T.layout);var n=G.getProjectionAnimationProgress(),r=n.x,o=n.y,i=!(j.relativeTarget||j.isTargetLocked||r.isAnimating()||o.isAnimating());(t||i)&&Uc((function(t){var n=e[t],r=n.min,o=n.max;G.setProjectionTargetAxis(t,r,o)}))},notifyLayoutReady:function(t){!function(t){var e=t.getProjectionParent();if(e){var n=lu(e.getLayoutState().layout,t.getLayoutState().layout);Uc((function(e){t.setProjectionTargetAxis(e,n[e].min,n[e].max,!0)}))}else t.rebaseProjectionTarget()}(G),G.notifyLayoutUpdate(T.layout,G.prevViewportBox||T.layout,t)},resetTransform:function(){return c(G,y,m)},restoreTransform:function(){return u(y,E)},updateLayoutProjection:function(){if(G.isProjectionReady()){var t=T.delta,e=T.treeScale,n=e.x,r=e.y,o=T.deltaTransform;cd(T,k,G.path,O),P&&G.notifyViewportBoxUpdate(k.target,t),P=!1;var i=id(t,e);i===o&&n===e.x&&r===e.y||G.scheduleRender(),T.deltaTransform=i}},updateTreeLayoutProjection:function(){G.layoutTree.forEach(hd),xl.preRender(z,!1,!0)},getProjectionParent:function(){if(void 0===A){for(var t=!1,e=G.path.length-1;e>=0;e--){var n=G.path[e];if(n.projection.isEnabled){t=n;break}}A=t}return A},resolveRelativeTargetBox:function(){var t=G.getProjectionParent();if(j.relativeTarget&&t&&(function(t,e){nu(t.target.x,t.relativeTarget.x,e.target.x),nu(t.target.y,t.relativeTarget.y,e.target.y)}(j,t.projection),uu(t))){var e=j.target;yu(e,e,t.getLatestValues())}},shouldResetTransform:function(){return Boolean(m._layoutResetTransform)},pointTo:function(t){k=t.projection,_=t.getLatestValues(),null==C||C(),C=qa(t.onSetAxisTarget(G.scheduleUpdateLayoutProjection),t.onLayoutAnimationComplete((function(){var t;G.isPresent?G.presence=Pu.Present:null===(t=G.layoutSafeToRemove)||void 0===t||t.call(G)})))},isPresent:!0,presence:Pu.Entering});return G}};function hd(t){t.resolveRelativeTargetBox()}function pd(t){t.updateLayoutProjection()}var fd,md=Object(Wo.e)(["initial"],Object(Wo.c)(Cc)),gd=md.length,vd=new Set(["width","height","top","left","right","bottom","x","y"]),bd=function(t){return vd.has(t)},yd=function(t,e){t.set(e,!1),t.set(e)},Ad=function(t){return t===Ui||t===Wi};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(fd||(fd={}));var Cd=function(t,e){return parseFloat(t.split(", ")[e])},Sd=function(t,e){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return Cd(i[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?Cd(a[1],t):0}},xd=new Set(["x","y","z"]),wd=yi.filter((function(t){return!xd.has(t)}));var Od={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:Sd(4,13),y:Sd(5,14)},Ed=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=Object(Wo.a)({},e),r=Object(Wo.a)({},r);var o=Object.keys(e).filter(bd),i=[],a=!1,s=[];if(o.forEach((function(o){var l=t.getValue(o);if(t.hasValue(o)){var c,u=n[o],d=e[o],h=dc(u);if(ya(d))for(var p=d.length,f=null===d[0]?1:0;f<p;f++)c?dc(d[f]):(c=dc(d[f]))===h||Ad(h)&&Ad(c);else c=dc(d);if(h!==c)if(Ad(h)&&Ad(c)){var m=l.get();"string"==typeof m&&l.set(parseFloat(m)),"string"==typeof d?e[o]=parseFloat(d):Array.isArray(d)&&c===Wi&&(e[o]=d.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==c?void 0:c.transform)&&(0===u||0===d)?0===u?l.set(c.transform(u)):e[o]=h.transform(d):(a||(i=function(t){var e=[];return wd.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:e[o],yd(l,d))}})),s.length){var l=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o),a=i.display,s={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===a&&e.setStaticValue("display",t.display||"block"),e.syncRender();var l=e.measureViewportBox();return n.forEach((function(n){var o=e.getValue(n);yd(o,Od[n](r,s)),t[n]=Od[n](l,i)})),t}(e,t,s);return i.length&&i.forEach((function(e){var n=Object(Wo.c)(e,2),r=n[0],o=n[1];t.getValue(r).set(o)})),t.syncRender(),{target:l,transitionEnd:r}}return{target:e,transitionEnd:r}};function Ld(t,e,n,r){return function(t){return Object.keys(t).some(bd)}(e)?Ed(t,e,n,r):{target:e,transitionEnd:r}}var jd=function(t,e,n,r){var o=function(t,e,n){var r,o=Object(Wo.d)(e,[]),i=t.getInstance();if(!(i instanceof HTMLElement))return{target:o,transitionEnd:n};for(var a in n&&(n=Object(Wo.a)({},n)),t.forEachValue((function(t){var e=t.get();if(Bu(e)){var n=Iu(e,i);n&&t.set(n)}})),o){var s=o[a];if(Bu(s)){var l=Iu(s,i);l&&(o[a]=l,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:o,transitionEnd:n}}(t,e,r);return Ld(t,e=o.target,n,r=o.transitionEnd)};var kd={treeType:"dom",readValueFromInstance:function(t,e){if(Si(e)){var n=Zl(e);return n&&n.default||0}var r,o=(r=t,window.getComputedStyle(r));return(ji(e)?o.getPropertyValue(e):o[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return Zc(t,e.transformPagePoint)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var o=n.transformValues;void 0===r&&(r=!0);var i=e.transition,a=e.transitionEnd,s=Object(Wo.d)(e,["transition","transitionEnd"]),l=function(t,e,n){var r,o,i={};for(var a in t)i[a]=null!==(r=gc(a,e))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},t);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),r){!function(t,e,n){var r,o,i,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),l=s.length;if(l)for(var c=0;c<l;c++){var u=s[c],d=e[u],h=null;Array.isArray(d)&&(h=d[0]),null===h&&(h=null!==(o=null!==(r=n[u])&&void 0!==r?r:t.readValue(u))&&void 0!==o?o:e[u]),null!=h&&("string"==typeof h&&/^\-?\d*\.?\d+$/.test(h)?h=parseFloat(h):!pc(h)&&Ts.test(d)&&(h=Xl(u,d)),t.addValue(u,lc(h)),null!==(i=(a=n)[u])&&void 0!==i||(a[u]=h),t.setBaseTarget(u,h))}}(t,s,l);var c=jd(t,s,l,a);a=c.transitionEnd,s=c.target}return Object(Wo.a)({transition:i,transitionEnd:a},s)},scrapeMotionValuesFromProps:ga,build:function(t,e,n,r,o,i,a){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden");var s=r.isEnabled&&o.isHydrated;Qi(e,n,r,o,i,a.transformTemplate,s?id:void 0,s?ad:void 0)},render:pa},_d=dd(kd),Td=dd(Object(Wo.a)(Object(Wo.a)({},kd),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return Si(e)?(null===(n=Zl(e))||void 0===n?void 0:n.default)||0:(e=fa.has(e)?e:ha(e),t.getAttribute(e))},scrapeMotionValuesFromProps:va,build:function(t,e,n,r,o,i,a){var s=r.isEnabled&&o.isHydrated;sa(e,n,r,o,i,a.transformTemplate,s?id:void 0,s?ad:void 0)},render:ma})),Pd=function(t,e){return gi(t)?Td(e,{enableHardwareAcceleration:!1}):_d(e,{enableHardwareAcceleration:!0})},Rd=Object(Wo.a)(Object(Wo.a)(Object(Wo.a)(Object(Wo.a)({},Lc),Ja),Du),nd),Dd=fi((function(t,e){return La(t,e,Rd,Pd)}));class Bd{constructor(t){this.highlighted=!1,this.code=t,this.points=[]}}var Fd=n(8);class Id{static now(){return Date.now()}}function Md(t){var e=Qo((function(){return lc(t)}));if(Object(I.useContext)($o).isStatic){var n=Object(Wo.c)(Object(I.useState)(t),2)[1];Object(I.useEffect)((function(){return e.onChange(n)}),[])}return e}var Wd=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function zd(t,e){var n=Md(e()),r=function(){return n.set(e())};return r(),function(t,e){Object(I.useEffect)((function(){var n=t.map((function(t){return t.onChange(e)}));return function(){return n.forEach((function(t){return t()}))}}))}(t,(function(){return xl.update(r,!1,!0)})),n}function Nd(t,e,n,r){var o="function"==typeof e?e:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!Array.isArray(t[0]),r=n?0:-1,o=t[0+r],i=t[1+r],a=t[2+r],s=t[3+r],l=zs(i,a,Object(Wo.a)({mixer:Wd(a[0])},s));return n?l(o):l}(e,n,r);return Array.isArray(t)?Vd(t,o):Vd([t],(function(t){var e=Object(Wo.c)(t,1)[0];return o(e)}))}function Vd(t,e){var n=Qo((function(){return[]}));return zd(t,(function(){n.length=0;for(var r=t.length,o=0;o<r;o++)n[o]=t[o].get();return e(n)}))}function Ud(t,e,n){void 0===n&&(n={});var r=Ei(t)?t:lc(t);return rc("",r,e,n),{stop:function(){return r.stop()}}}var Hd=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};class $d extends I.default.Component{constructor(t){super(t),this.state={element:t.element}}update(t){this.setState({element:t})}style(t){this.customStyle=t,this.forceUpdate()}render(){var t,e,n,r,o,i,a,s,l;const c=this.state.element,u=this.props.configuration.style;!c.highlighted&&this.props.configuration.automaticSelectionEnabled&&this.props.onClick(c);const d=null!==(e=null===(t=this.customStyle)||void 0===t?void 0:t.fillColor)&&void 0!==e?e:c.highlighted?u.highlightedPolygonFillColor:u.polygonFillColor,h=null!==(r=null===(n=this.customStyle)||void 0===n?void 0:n.strokeColor)&&void 0!==r?r:c.highlighted?u.highlightedPolygonStrokeColor:u.polygonStrokeColor,p=null!==(i=null===(o=this.customStyle)||void 0===o?void 0:o.strokeWidth)&&void 0!==i?i:c.highlighted?u.highlightedPolygonStrokeWidth:u.polygonStrokeWidth,f=null!==(s=null===(a=this.customStyle)||void 0===a?void 0:a.cornerRadius)&&void 0!==s?s:c.highlighted?u.highlightedPolygonCornerRadius:u.polygonCornerRadius,m=null!==(l=this.props.animateToPoints)&&void 0!==l?l:c.points;return I.default.createElement(Gd,{points:m,onClick:()=>{this.props.onClick&&this.props.onClick(c)},fill:d,stroke:h,strokeWidth:p,cornerRadius:f})}}function Gd(t){var{points:e,cornerRadius:n}=t,r=Hd(t,["points","cornerRadius"]);const o=[e[0].x,e[0].y,e[1].x,e[1].y,e[2].x,e[2].y,e[3].x,e[3].y],i=o.map(Md),a=Nd(i,(([t,e,r,o,i,a,s,l])=>{const c=[{x:t,y:e},{x:r,y:o},{x:i,y:a},{x:s,y:l}];return Fd.a.toSvgPathStringWithRoundedCorners(c,n)}));return Object(I.useEffect)((()=>{const t=[];for(let e=0;e<o.length;e++)t.push(Ud(i[e],o[e]));return()=>{t.forEach((t=>t.stop()))}}),[e]),I.default.createElement(Dd.path,Object.assign({d:a},r))}class Yd extends I.default.Component{constructor(t){super(t),this.state={polygonElements:[]}}update(t,e,n,r){const o=[];(class{static keepOnlyCenterMostDuplicate(t,e){const n=new Map;t.forEach((t=>{const e=Ro(t),r=n.get(e);r?r.push(t):n.set(e,[t])})),n.forEach(((e,r)=>{e.length<2?n.delete(r):e.forEach(((e,n)=>{t.splice(t.indexOf(e),1)}))})),n.forEach(((n,r)=>{const o=t=>{let e={x:0,y:0};return t.forEach((t=>{e.x+=t.x,e.y+=t.y})),e.x/=t.length,e.y/=t.length,e},i=e.width/2,a=n.reduce(((t,e)=>{const n=o(t.quad),r=o(e.quad);return Math.abs(i-n.x)<Math.abs(i-r.x)?t:e}));t.push(a)}))}}).keepOnlyCenterMostDuplicate(r,n),r.forEach((r=>{const i=new Bd(r);i.points=void 0===t?Fd.a.scaleListToHtmlElement(r.quad,n,e.video):r.quad.map((e=>{const r=new Fd.a(e.x,e.y);return r.x*=t.width/n.width,r.y*=t.height/n.height,r.y+=t.y,r.x+=t.x,r})),i.points.forEach((t=>{e.state.mirrored&&this.container&&(t.x=this.container.clientWidth-t.x)})),o.push(i)}));const i=[];this.state.polygonElements.forEach((t=>{const e=o.find((e=>Po(e.code,t.element.code)));let n=!1;void 0===e?t.updatedAt+1e3<Id.now()&&(n=!0):(t.element=e,t.polygon=I.default.createElement($d,{key:Ro(t.element.code),ref:e=>t.polygonRef=e,configuration:this.props.configuration,element:t.element,animateToPoints:e.points,onClick:this.onPolygonClick.bind(this)}),t.label=I.default.createElement(this.props.LabelComponent,Object.assign({},this.props.labelComponentConfig,{key:Ro(t.element.code),ref:e=>t.labelRef=e,configuration:this.props.configuration,element:t.element,animateToPoints:e.points,onClick:this.onPolygonClick.bind(this)})),t.updatedAt=Id.now()),n||i.push(t)})),o.forEach((t=>{if(void 0===this.state.polygonElements.find((e=>Po(e.element.code,t.code)))){let e,n;const r=I.default.createElement($d,{key:Ro(t.code),ref:r=>{e=r,void 0!==n&&this.props.onBarcodeFound(t.code,e,n)},configuration:this.props.configuration,element:t,onClick:this.onPolygonClick.bind(this)}),o=I.default.createElement(this.props.LabelComponent,Object.assign({},this.props.labelComponentConfig,{key:Ro(t.code),ref:r=>{n=r,void 0!==e&&this.props.onBarcodeFound(t.code,e,n)},configuration:this.props.configuration,element:t,onClick:this.onPolygonClick.bind(this)})),a={element:t,polygon:r,label:o,polygonRef:e,labelRef:n,updatedAt:Id.now()};i.push(a)}})),this.setState({polygonElements:i})}onPolygonClick(t){var e,n,r,o;t.highlighted=!t.highlighted,this.forceUpdate(),this.state.polygonElements.forEach((e=>{var n;const r=e.labelRef,o=e.label.props.element;r&&Po(o.code,t.code)&&(r.update(t),null===(n=e.polygonRef)||void 0===n||n.update(t))})),t.highlighted&&(null===(n=(e=this.props).onPolygonSelected)||void 0===n||n.call(e,t.code)),null===(o=(r=this.props).onPolygonClick)||void 0===o||o.call(r,t.code)}render(){var t,e;return I.default.createElement("div",{style:Object.assign({width:"100%",height:"100%",position:"absolute"},this.props.style),ref:t=>this.container=t},I.default.createElement(Dd.svg,{style:{position:"absolute",maxWidth:"100%",width:"100%",height:"100%"}},null===(t=this.state.polygonElements)||void 0===t?void 0:t.map((t=>t.polygon))),null===(e=this.state.polygonElements)||void 0===e?void 0:e.map((t=>t.label)))}}var Qd=n(74),Zd=n.n(Qd),Xd=n(84),qd={insert:"head",singleton:!1},Kd=(Zd()(Xd.a,qd),Xd.a.locals,n(51)),Jd=n.n(Kd);class th{constructor(t){this.lastTime=0,this.lastDuration=0,this.t=0,this.element=null,this.animationClass="",this.animationClass=t}setDuration(t){const e=Date.now()/1e3,n=e-this.lastTime;this.lastDuration&&(this.t+=n%this.lastDuration/this.lastDuration,this.t-=0|this.t);const r=-t*this.t;this.element&&(this.element.style.animationDuration=`${t}s`,this.element.style.animationDelay=`${r}s`,this.element.classList.remove(this.animationClass),this.element.offsetHeight,this.element.classList.add(this.animationClass)),this.lastTime=e,this.lastDuration=t}}class eh extends I.default.Component{constructor(){super(...arguments),this.inner1=new th("scanbot-shutter-rotate"),this.inner2=new th("scanbot-shutter-rotate")}render(){return I.default.createElement("div",{className:"scanbot-shutter-button",style:this.props.style,onClick:this.props.onClick},this.captureBackground(),this.captureInnerCircle(),this.captureSearchingInner1(),this.captureSearchingInner2())}updateAnimationSpeed(t){"searching"==t?(this.inner1.setDuration(3),this.inner2.setDuration(2)):(this.inner1.setDuration(1.5),this.inner2.setDuration(.75))}componentDidMount(){this.updateAnimationSpeed(this.props.action)}componentDidUpdate(){this.updateAnimationSpeed(this.props.action)}captureBackground(){return this.svgBase(null,I.default.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M32 0c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32C14.327 64 0 49.673 0 32 0 14.327 14.327 0 32 0zm0 3C15.984 3 3 15.984 3 32s12.984 29 29 29 29-12.984 29-29S48.016 3 32 3z")))}captureInnerCircle(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"processing"==t||"manual"==t,"scanbot-shutter-fade-out":"searching"==t||"capturing"==t,"scanbot-shutter-pulse-fast":"processing"==t},I.default.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},I.default.createElement("circle",{cx:"32",cy:"32",r:"24",fill:this.props.color,fillRule:"nonzero"})))}captureSearchingInner1(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},I.default.createElement("g",{fill:"none",fillOpacity:"0.7",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M44.24 51.476a1 1 0 01-1.066-1.692A20.981 20.981 0 0053 32c0-11.598-9.402-21-21-21a1 1 0 010-2c12.703 0 23 10.297 23 23a22.98 22.98 0 01-10.76 19.476z")),(t=>{this.inner1.element=t}))}captureSearchingInner2(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},I.default.createElement("g",{fill:"none",fillOpacity:"0.4",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M46.624 35.35a1 1 0 01-1.95-.445C44.89 33.96 45 32.988 45 32c0-7.18-5.82-13-13-13a1 1 0 010-2c8.284 0 15 6.716 15 15 0 1.138-.127 2.26-.376 3.35z")),(t=>{this.inner2.element=t}))}path(t){return I.default.createElement("path",{fill:this.props.color,fillRule:"nonzero",d:t})}svgBase(t,e,n){return I.default.createElement("div",{className:Jd()(t),ref:n},I.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64"},e))}}class nh extends I.default.Component{render(){return I.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I.default.createElement("mask",{id:"mask0_919_23088",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},I.default.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),I.default.createElement("g",{mask:"url(#mask0_919_23088)"},I.default.createElement("path",{d:"M9 19V17H21V19H9ZM9 13V11H21V13H9ZM9 7V5H21V7H9ZM5 20C4.45 20 3.97917 19.8042 3.5875 19.4125C3.19583 19.0208 3 18.55 3 18C3 17.45 3.19583 16.9792 3.5875 16.5875C3.97917 16.1958 4.45 16 5 16C5.55 16 6.02083 16.1958 6.4125 16.5875C6.80417 16.9792 7 17.45 7 18C7 18.55 6.80417 19.0208 6.4125 19.4125C6.02083 19.8042 5.55 20 5 20ZM5 14C4.45 14 3.97917 13.8042 3.5875 13.4125C3.19583 13.0208 3 12.55 3 12C3 11.45 3.19583 10.9792 3.5875 10.5875C3.97917 10.1958 4.45 10 5 10C5.55 10 6.02083 10.1958 6.4125 10.5875C6.80417 10.9792 7 11.45 7 12C7 12.55 6.80417 13.0208 6.4125 13.4125C6.02083 13.8042 5.55 14 5 14ZM5 8C4.45 8 3.97917 7.80417 3.5875 7.4125C3.19583 7.02083 3 6.55 3 6C3 5.45 3.19583 4.97917 3.5875 4.5875C3.97917 4.19583 4.45 4 5 4C5.55 4 6.02083 4.19583 6.4125 4.5875C6.80417 4.97917 7 5.45 7 6C7 6.55 6.80417 7.02083 6.4125 7.4125C6.02083 7.80417 5.55 8 5 8Z",fill:"white"})))}}class rh extends I.default.Component{render(){return I.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I.default.createElement("mask",{id:"mask0_919_23102",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},I.default.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),I.default.createElement("g",{mask:"url(#mask0_919_23102)"},I.default.createElement("path",{d:"M12 22C10.75 22 9.57917 21.7625 8.4875 21.2875C7.39583 20.8125 6.44583 20.1708 5.6375 19.3625C4.82917 18.5542 4.1875 17.6042 3.7125 16.5125C3.2375 15.4208 3 14.25 3 13H5C5 14.95 5.67917 16.6042 7.0375 17.9625C8.39583 19.3208 10.05 20 12 20C13.95 20 15.6042 19.3208 16.9625 17.9625C18.3208 16.6042 19 14.95 19 13C19 11.05 18.3208 9.39583 16.9625 8.0375C15.6042 6.67917 13.95 6 12 6H11.85L13.4 7.55L12 9L8 5L12 1L13.4 2.45L11.85 4H12C13.25 4 14.4208 4.2375 15.5125 4.7125C16.6042 5.1875 17.5542 5.82917 18.3625 6.6375C19.1708 7.44583 19.8125 8.39583 20.2875 9.4875C20.7625 10.5792 21 11.75 21 13C21 14.25 20.7625 15.4208 20.2875 16.5125C19.8125 17.6042 19.1708 18.5542 18.3625 19.3625C17.5542 20.1708 16.6042 20.8125 15.5125 21.2875C14.4208 21.7625 13.25 22 12 22Z",fill:"white"})))}}class oh extends I.default.Component{constructor(t){super(t),this.state={barcodes:void 0}}update(t){this.setState({barcodes:t})}didScan(){return void 0!==this.state.barcodes}render(){var t,e;return I.default.createElement("div",{style:{position:"absolute",bottom:0,width:"100%",height:76,display:"flex",alignItems:"center",backgroundColor:Io.ScanbotPrimary}},I.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",opacity:this.didScan()?1:.5},onClick:this.didScan()&&this.props.onBurgerClick},I.default.createElement(nh,null),I.default.createElement("div",{style:{backgroundColor:Io.Orange,color:Io.White,width:24,height:24,borderRadius:12,marginLeft:10,fontSize:13,lineHeight:"24px",textAlign:"center"}},null!==(e=null===(t=this.state.barcodes)||void 0===t?void 0:t.length)&&void 0!==e?e:0)),I.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",opacity:this.props.isShowingImage?.5:1}},I.default.createElement(eh,{style:{left:0,bottom:0,transform:"none"},color:"#FFF",action:this.props.action,onClick:!this.props.isShowingImage&&this.props.onShutterButtonClick})),I.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",opacity:this.didScan()?1:.5},onClick:this.didScan()&&this.props.onScanMoreClick},I.default.createElement("div",{style:{fontSize:13,color:Io.White,marginRight:10}},"Scan More"),I.default.createElement(rh,null)))}}class ih extends I.default.Component{render(){const t=Fd.a.centerOf(this.props.points),e=Fd.a.smallerSizeOfQuad(this.props.points)/40;return I.default.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",left:t.x-20,top:t.y-20,transform:`scale(${e})`}},I.default.createElement("mask",{id:"mask0_910_20901",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"40",height:"40"},I.default.createElement("rect",{width:"40",height:"40",fill:"#D9D9D9"})),I.default.createElement("g",{mask:"url(#mask0_910_20901)"},I.default.createElement("rect",{x:"7",y:"13",width:"26",height:"16",fill:"white"}),I.default.createElement("path",{d:"M17.5833 27.6111L29.3611 15.8333L27.3055 13.8055L17.5833 23.5278L12.6666 18.6111L10.6389 20.6389L17.5833 27.6111ZM20 36.6666C17.713 36.6666 15.5555 36.2291 13.5278 35.3541C11.5 34.4791 9.73147 33.287 8.22219 31.7778C6.71294 30.2685 5.52081 28.5 4.64581 26.4722C3.77081 24.4444 3.33331 22.287 3.33331 20C3.33331 17.6944 3.77081 15.5278 4.64581 13.5C5.52081 11.4722 6.71294 9.70831 8.22219 8.20831C9.73147 6.70831 11.5 5.52081 13.5278 4.64581C15.5555 3.77081 17.713 3.33331 20 3.33331C22.3055 3.33331 24.4722 3.77081 26.5 4.64581C28.5278 5.52081 30.2916 6.70831 31.7916 8.20831C33.2916 9.70831 34.4791 11.4722 35.3541 13.5C36.2291 15.5278 36.6666 17.6944 36.6666 20C36.6666 22.287 36.2291 24.4444 35.3541 26.4722C34.4791 28.5 33.2916 30.2685 31.7916 31.7778C30.2916 33.287 28.5278 34.4791 26.5 35.3541C24.4722 36.2291 22.3055 36.6666 20 36.6666Z",fill:"#55BB77"})))}}var ah=n(21);class sh extends I.default.Component{constructor(t){super(t),this.state={elements:[],imageSize:ah.a.empty()}}update(t){const e=[];t.barcodes.forEach((n=>{const r=new Bd(n);r.points=Fd.a.scaleListToHtmlElement(n.quad,t.originalImageSize,this.image),e.push(r)})),this.setState({imageSize:ah.a.fromHtmlElement(this.image),elements:e})}reset(){this.setState({elements:[]})}render(){return void 0===this.props.image||null===this.props.image?null:I.default.createElement("div",{className:"scanned-image-with-overlay",style:{position:"absolute",display:"flex",justifyContent:"center",alignItems:this.state.image?"normal":"center",minHeight:"300px",height:"100%",width:"100%",top:0,left:0}},I.default.createElement("img",{style:{maxWidth:"100%"},ref:t=>this.image=t,src:`${this.props.image}`}),I.default.createElement("div",{style:{position:"absolute",maxWidth:"100%",width:this.state.imageSize.width,height:this.state.imageSize.height}},this.state.elements.map(((t,e)=>I.default.createElement(ih,{key:e,points:t.points})))))}}class lh extends I.default.Component{render(){if(!this.props.visible)return null;const t=Y.c.svg`
182
182
  animation: rotate 2s linear infinite;
183
183
  @keyframes rotate { 100% { transform: rotate(360deg); } }
184
- `;return I.default.createElement("div",{style:{top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100}},I.default.createElement(t,{width:"101",height:"100",viewBox:"0 0 101 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I.default.createElement("circle",{cx:"50.5",cy:"50",r:"50",fill:"#3E3E3E","fill-opacity":"0.35"}),I.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"}),I.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"}),I.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 ch extends I.default.Component{render(){return this.props.text?I.default.createElement("div",{style:{position:"absolute",top:this.props.top,bottom:this.props.bottom,display:"flex",width:"100%",justifyContent:"center"}},I.default.createElement("div",{style:{padding:"5px 10px",borderRadius:5,backgroundColor:Io.TransparentGray,color:Io.White,fontWeight:500,fontSize:13}},this.props.text)):null}}class uh extends I.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,r,o;const i=this.state.element,a=this.props.configuration.style,s=this.formatText(i.code,this.props.configuration.textFormat),l=Fd.a.width(null!==(t=this.props.animateToPoints)&&void 0!==t?t:i.points);if(!s)return null;if(!i.points)return null;const c=null!==(n=null===(e=this.customStyle)||void 0===e?void 0:e.backgroundColor)&&void 0!==n?n:i.highlighted?a.highlightedTextBackgroundColor:a.textBackgroundColor,u=null!==(o=null===(r=this.customStyle)||void 0===r?void 0:r.textColor)&&void 0!==o?o:i.highlighted?a.highlightedTextColor:a.textColor;return I.default.createElement(Dd.div,{ref:t=>this.label=t,onClick:()=>{this.props.onClick&&this.props.onClick(i)},style:{x:Fd.a.lowestX(i.points),y:Fd.a.highestY(i.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:Fd.a.lowestX(this.props.animateToPoints),y:Fd.a.highestY(this.props.animateToPoints)+30}:{}},s)}}class dh{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 hh{constructor(){this.visible=!1,this.textFormat="Text",this.automaticSelectionEnabled=!1,this.style=new dh}}class ph{constructor(){this.topLabelTop=20,this.sheetHeight="95%",this.sheetTopMargin="10%"}}class fh{constructor(){this.enabled=!1,this.style=new ph}}class mh extends j.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_HD),this.captureDelay=1e3,this.overlay=new hh,this.detectionParameters=new k.BarcodeScannerTypes.BarcodeScannerConfiguration,this.scanAndCount=new fh,this.onBarcodesDetected=function(t){}}static fromJson(t){const e=new mh;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 gh{constructor(t){this.coreResult=t,this.barcodes=[],this.originalImageSize=null,this.barcodes=t.barcodes,t.originalImage&&(this.originalImageSize=new ah.a(t.originalImage.width,t.originalImage.height))}isEmpty(){return 0===this.barcodes.length}}class vh{static warn(t){console.warn("[ScanbotSDK]",t)}}class bh{static convertLinesToViewportLines(t,e){if(e&&t)return e.map((e=>({start:new Fd.a(e.start.x*t.width,e.start.y*t.height),end:new Fd.a(e.end.x*t.width,e.end.y*t.height)})))}static convertToViewportPointsFromParentSize(t,e){return e?ah.a.isEmpty(t)?void 0:e.map((e=>Fd.a.scaleUpTo(e,t))):ah.a.toPolygon(t)}static calculateScale(t){let e,n=0,r=0;return 1>t.width/t.height?(e=t.height/1,n=(1-t.width/e)/2):(e=t.width/1,r=(1-t.height/e)/2),{x:n,y:r,containerScale:e}}static findScale(t,e){let n,r=0,o=0;return e.ratio(!0)>t.ratio(!0)?(n=t.width/e.width,o=(e.height-t.height/n)/2):(n=t.height/e.height,r=(e.width-t.width/n)/2),{x:r,y:o,scale:n}}static preventDefaultCallback(t){t.preventDefault()}static disableScreenMovement(){document.addEventListener("touchmove",bh.preventDefaultCallback,{passive:!1}),document.body.scrollTop=document.documentElement.scrollTop=0,document.documentElement.style.overflow="hidden"}static enableScreenMovement(){document.removeEventListener("touchmove",bh.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 yh=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};jo.a;jo.b;class Ah extends jo.c{constructor(t){var e;super(t),this.shouldComputeSize=!0,this.paused=!1,this.barcodeRecognizerHandle=null,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=mh.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t){return yh(this,void 0,void 0,(function*(){const e=bh.findContainerOrThrow(t);return new Promise(((n,r)=>{Object(I.render)(I.default.createElement(Ah,{container:e,configuration:t,onSuccess:n,onFailure:r}),e)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return yh(this,void 0,void 0,(function*(){vh.warn("Barcode detection resumed"),yield this.resume()}))}pauseDetection(){vh.warn("Barcode detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return yh(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),this.barcodeRecognizerHandle&&this.bridge.copyArgs.releaseObject(this.barcodeRecognizerHandle).catch((t=>{var e,n;return null===(n=(e=this.props.configuration).onError)||void 0===n?void 0:n.call(e,t)}))}updateDimensions(){return yh(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return yh(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n,r,o;return yh(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 i=!1;try{this.detectionRunning=!0;const t=yield this.recognizeBarcodes(!0,this.shouldComputeSize);if(this.shouldComputeSize=!1,!t)return;const a=new gh(t);a.isEmpty()?this.configuration._onDetectionFailed&&(null===(e=this.configuration)||void 0===e||e._onDetectionFailed(t.originalImage)):(i=!0,this.configuration.overlay.visible||this.configuration.onBarcodesDetected(a)),null===(n=this.overlay)||void 0===n||n.update(null===(r=this.finder)||void 0===r?void 0:r.holeRect,this.camera,a.originalImageSize,a.barcodes)}catch(t){console.log(t)}finally{this.detectionRunning=!1;const t=()=>requestAnimationFrame((()=>this.detect())),e=(null===(o=this.configuration.overlay)||void 0===o?void 0:o.visible)?0:this.configuration.captureDelay;i&&0!=e?setTimeout(t,e):t()}}))}setUseBackendService(t){console.log("Now using backend service for recognition: ",t),this.backendurl=t}recognizeBarcodes(t,e){var n,r,o,i,a,s,l,c;return yh(this,void 0,void 0,(function*(){try{window&&window.__SB_DEBUG_BARCODESCANNER_FORCE_DETERMINISTIC_MODE&&(t=!1);const l=t?jo.c.DEFAULT_DETECTION_RESOLUTION:jo.c.DETECTION_RESULTION_4K,c=null!==(n=this.desiredRecognitionResolution)&&void 0!==n?n:l;this.camera.finderFrame=null===(r=this.finder)||void 0===r?void 0:r.holeRect;const u=yield null===(o=this.camera)||void 0===o?void 0:o.createImageData(c,!1);if(!u)return;e&&this.forceUpdate(),(null===(i=this.configuration.scanAndCount)||void 0===i?void 0:i.enabled)&&(this.setState({image:y.wrapperToBase64(u)}),void 0!==this.desiredRecognitionResolution?console.log("Recognizing barcodes with custom resolution:",this.desiredRecognitionResolution):console.log("Recognizing barcodes with max resolution:",jo.c.DETECTION_RESULTION_4K,"(the actual resolution depends on your device and may be lower)"));new ah.a(u.width,u.height);this.barcodeRecognizerHandle||(this.barcodeRecognizerHandle=yield this.bridge.copyArgs.createBarcodeRecognizer(new k.BarcodeScannerTypes.BarcodeScannerConfiguration(Object.assign(Object.assign({},this.configuration.detectionParameters),{live:t}))));const d=yield this.bridge.transferArgs.recognizeBarcodes(this.barcodeRecognizerHandle,u);if(!this.enabled)return;return null===d?void(null===(s=(a=this.props).onLicenseError)||void 0===s||s.call(a)):(this.camera.reusableImageBuffer=d.originalImage.data,d)}catch(t){return void(null===(c=(l=this.props.configuration).onError)||void 0===c||c.call(l,t))}}))}setRecognitionResolution(t){this.desiredRecognitionResolution=t}getResolution(){return yh(this,void 0,void 0,(function*(){return new Promise(((t,e)=>{const n=this.camera.videoSize();n.width>0&&n.height>0?t(ah.a.fromJson(n)):this.camera.didLoadVideo=()=>{const e=this.camera.videoSize();t(ah.a.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,r,o,i,a;const s=(null===(t=this.configuration.scanAndCount)||void 0===t?void 0:t.enabled)?"Tap the shutter button to scan":void 0;return I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black",minHeight:"100px"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),I.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},I.default.createElement(ko.a,{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}})),I.default.createElement(ch,{top:null===(r=this.configuration.scanAndCount)||void 0===r?void 0:r.style.topLabelTop,text:s}),I.default.createElement(sh,{ref:t=>this.scannedImage=t,image:this.state.image}),this.state.isFinderVisible&&I.default.createElement(_o.a,{ref:t=>{this.finder=t},padding:this.props.viewFinderPadding,guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}),I.default.createElement(ch,{bottom:100,text:this.state.bottomHintText}),I.default.createElement(lh,{visible:"processing"===this.state.action}),(null===(o=this.configuration.overlay)||void 0===o?void 0:o.visible)&&I.default.createElement(Yd,{ref:t=>{t&&(this.overlay=t)},configuration:this.configuration.overlay,onPolygonSelected:t=>{const e=new gh({barcodes:[t]});this.configuration.onBarcodesDetected(e)},onBarcodeFound:(t,e,n)=>{var r;(null===(r=this.configuration.overlay)||void 0===r?void 0:r.onBarcodeFound)&&this.configuration.overlay.onBarcodeFound(t,e,n)},LabelComponent:uh,labelComponentConfig:{}}),(null===(i=this.configuration.scanAndCount)||void 0===i?void 0:i.enabled)&&I.default.createElement(oh,{ref:t=>this.bottomActionBar=t,action:this.state.action,isShowingImage:void 0!==this.state.image,onBurgerClick:()=>{this.popup.push(Fo.PushBottom,this.barcodes)},onShutterButtonClick:()=>yh(this,void 0,void 0,(function*(){(new A).flash(),this.setState({action:"processing"});const t=(new Date).getTime();let e=yield this.recognizeBarcodes(!1,!1);const n=new gh(null!=e?e:{barcodes:[]});console.log("Recognition took:",((new Date).getTime()-t)/1e3);const r=this.countLabelText(n.barcodes);this.setState({action:"manual",bottomHintText:r}),this.scannedImage.update(n),this.barcodes.push(...n.barcodes),this.bottomActionBar.update(this.barcodes),n.barcodes.length>0&&this.configuration.onBarcodesDetected(n)})),onScanMoreClick:()=>{this.resetCountImage()}}),I.default.createElement(Mo,{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`}}var Ch=n(67),Sh=Object(Ch.a)(Object($.jsx)("path",{d:"M6 2h12v3H6zm0 5v1l2 3v11h8V11l2-3V7zm6 8.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"FlashlightOn"),xh=Object(Ch.a)(Object($.jsx)("path",{d:"M18 5V2H6v1.17L7.83 5zm-2 6 2-3V7H9.83L16 13.17zM2.81 2.81 1.39 4.22 8 10.83V22h8v-3.17l3.78 3.78 1.41-1.41z"}),"FlashlightOff"),wh=Object(Ch.a)(Object($.jsx)("path",{d:"M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-8 13c-2.76 0-5-2.24-5-5H5l2.5-2.5L10 13H8c0 2.21 1.79 4 4 4 .58 0 1.13-.13 1.62-.35l.74.74c-.71.37-1.5.61-2.36.61m4.5-2.5L14 13h2c0-2.21-1.79-4-4-4-.58 0-1.13.13-1.62.35l-.74-.73C10.35 8.24 11.14 8 12 8c2.76 0 5 2.24 5 5h2z"}),"FlipCameraIos");function Oh(t,e){return t&&(t.hasFacingOptions&&e.flipCameraButton.visible||t.isTorchAvailable&&e.flashButton.visible)||e.zoomButton.visible}function Eh(t){const e=t.zoomSteps.findIndex((e=>e==t.defaultZoomFactor)),[n,r]=Object(I.useState)(t.torchEnabledInitially),[o,i]=Object(I.useState)(e),a=t.zoomSteps[o],[s,l]=Object(I.useState)("BACK"==t.initialCameraModule?"environment":"user"),c=function(t){var e,n;const r=null===(n=null===(e=null==t?void 0:t.camera)||void 0===e?void 0:e.video)||void 0===n?void 0:n.parentElement,o=()=>r?r.getBoundingClientRect():null,[i,a]=Object(I.useState)(o());return Object(I.useEffect)((()=>{if(r){const t=()=>a(o());t();const e=new ResizeObserver(t);return e.observe(r),()=>{e.disconnect()}}}),[r]),i}(t.scanner),u=!!c;if(Object(I.useEffect)((()=>{var e;(null===(e=t.capabilities)||void 0===e?void 0:e.isTorchAvailable)&&u&&t.scanner.setTorchState(n)}),[t.capabilities,u,n]),Object(I.useEffect)((()=>{var e;u&&(null===(e=t.scanner)||void 0===e||e.setZoom(a))}),[u,a]),!t.capabilities||!c)return null;if(!Oh(t.capabilities,t.config))return null;const d=c.height-t.bottomPadding-48;return I.default.createElement(mt,{style:{position:"absolute",marginTop:d,marginLeft:c.width/2,transform:"translateX(-50%)",display:"flex",justifyContent:"center",zIndex:1e3}},I.default.createElement(So,Object.assign({},t.config.flashButton,{visible:t.capabilities.isTorchAvailable&&t.config.flashButton.visible,icon:n?Sh:xh,active:n,onClick:()=>r(!n)})),I.default.createElement("div",{style:{width:20}}),I.default.createElement(So,Object.assign({},t.config.zoomButton,{text:`${a.toFixed(1)}x`,active:o!==e,onClick:()=>i((o+1)%t.zoomSteps.length)})),I.default.createElement("div",{style:{width:20}}),I.default.createElement(So,Object.assign({},t.config.flipCameraButton,{visible:t.capabilities.hasFacingOptions&&t.config.flipCameraButton.visible,active:"user"===s,icon:wh,onClick:()=>{var e;const n="environment"===s?"user":"environment";l(n),null===(e=t.scanner)||void 0===e||e.setCameraDirection(n)}})))}const Lh=Object(I.createContext)(null);class jh{static compute(t,e,n){const r=(Fd.a.lowestY(t)+Fd.a.highestY(t))/2,o={badgeY:r,badgeStyle:{transform:"translateX(-50%) translateY(-50%)"}};return"BELOW"===n?Object.assign(Object.assign({},o),{labelY:Math.max(Fd.a.highestY(t)+jh.LABEL_AND_BADGE_PADDING,e?r-jh.AR_BADGE_SIZE/2-jh.LABEL_AND_BADGE_PADDING:-1/0),labelStyle:{transform:"translateX(-50%)"}}):"ABOVE"===n?Object.assign(Object.assign({},o),{labelY:Math.min(Fd.a.lowestY(t)-jh.LABEL_AND_BADGE_PADDING,e.visible?r+jh.AR_BADGE_SIZE/2+jh.LABEL_AND_BADGE_PADDING:1/0),labelStyle:{transform:"translateX(-50%) translateY(-100%)"}}):"STACKED"===n?{badgeY:r,badgeStyle:{transform:`translateX(-50%) translateY(calc(-100% - ${jh.LABEL_AND_BADGE_PADDING/2}px))`},labelY:r,labelStyle:{transform:e.visible?`translateX(-50%) translateY(${jh.LABEL_AND_BADGE_PADDING/2}px)`:"translateX(-50%) translateY(-50%)"}}:"DISABLED"===n?Object.assign(Object.assign({},o),{labelY:0,labelStyle:{display:"none"}}):void 0}}jh.AR_BADGE_SIZE=48,jh.LABEL_AND_BADGE_PADDING=10;var kh=jh;function _h(t){return t.style.visible?""==t.content?null:I.default.createElement(Dd.div,{style:Object.assign({position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100},t.positionBadge),animate:t.animateToPoints?t.positionBadge:{},transition:t.transition},I.default.createElement(We,{styleConfig:Object.assign(Object.assign({},t.style.background),{cornerRadius:kh.AR_BADGE_SIZE/2}),style:Object.assign(Object.assign({},t.verticalPositions.badgeStyle),{width:kh.AR_BADGE_SIZE,height:kh.AR_BADGE_SIZE,color:gt.b.getColorValue(t.style.foregroundColor),display:"flex",justifyContent:"center",alignItems:"center",zIndex:1500,cursor:"pointer"}),onClick:()=>null==t?void 0:t.onClick()},I.default.createElement(Vt,{fontSize:16,fontWeight:"500",style:{display:"flex",justifyContent:"center",alignItems:"center"}},t.content))):null}var Th=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};class Ph extends uh{constructor(){super(...arguments),this.count=0,this.setCount=t=>{this.count=t,this.forceUpdate()}}styleBadge(t,e){this.customBadgeStyle=t,this.customBadgeContent=e,this.forceUpdate()}badgeContent(){return this.customBadgeContent?this.customBadgeContent:0===this.count?"":"x"+this.count}render(){var t,e;let{barcodeItemConfiguration:n,barcodeItemInfoPosition:r,counterBadge:o}=this.props;const i=n,a=this.state.element,s=null!==(t=this.props.animateToPoints)&&void 0!==t?t:a.points,l=a.code,c=a.highlighted,u=(Fd.a.lowestX(s)+Fd.a.highestX(s))/2;void 0===r&&(r="BELOW");const d=kh.compute(s,o,r),h=void 0===i||!1===i.titleDeselected.visible&&!1===i.subtitleDeselected.visible,p={x:u,y:Math.round(d.labelY)},f={x:u,y:Math.round(d.badgeY)},m={duration:.25,easing:"linear"};return I.default.createElement(I.default.Fragment,null,i&&I.default.createElement(Dd.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},I.default.createElement(We,{sx:Object.assign({p:1,maxWidth:232,cursor:"pointer",display:h?"inline-block":"block",zIndex:1500},d.labelStyle),styleConfig:c?i.backgroundSelected:i.backgroundDeselected,"data-sb-ar-barcode-info":"1",onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(a)}},I.default.createElement(Rh,{barcode:l,barcodeImageVisible:i.imageVisible,maxNumberOfTitleLines:1,maxNumberOfSubtitleLines:1,imageSize:42,displayRightArrow:!0,barcodeTitle:c?i.titleSelected:i.titleDeselected,barcodeSubtitle:c?i.subtitleSelected:i.subtitleDeselected}))),I.default.createElement(_h,{onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(a)},style:null!==(e=this.customBadgeStyle)&&void 0!==e?e:o,positionBadge:f,content:this.badgeContent(),verticalPositions:d,transition:m,animateToPoints:this.props.animateToPoints}))}}function Rh(t){var{barcode:e}=t,n=Th(t,["barcode"]);const r=Object(I.useContext)(Lh).useBarcodeMappedData(e);return I.default.createElement(Wn,Object.assign({barcodeMappedData:r},n))}var Dh=n(18);function Bh(t){const e=Object(I.useRef)(),n=Object(I.useRef)(null),[r,o]=(Object(I.useContext)(Ne),Object(I.useState)(void 0)),[i,a]=Object(I.useState)(!1);Object(I.useEffect)((()=>{var n,r;t.scanningPaused?null===(n=e.current)||void 0===n||n.pause():null===(r=e.current)||void 0===r||r.resume()}),[t.scanningPaused]);const s=function(t){const e=new hh;e.visible=t.visible;const n=t.polygon instanceof Dh.c,r=t.polygon,o=t,i=n?r.selected:o.polygon.partiallyScanned,a=n?r.deselected:o.polygon.partiallyScanned;return t.polygon.visible?(e.style.highlightedPolygonFillColor=gt.b.getColorValue(i.fillColor),e.style.highlightedPolygonStrokeColor=gt.b.getColorValue(i.strokeColor),e.style.highlightedPolygonStrokeWidth=i.strokeWidth,e.style.highlightedPolygonCornerRadius=i.cornerRadius,e.style.polygonFillColor=gt.b.getColorValue(a.fillColor),e.style.polygonStrokeColor=gt.b.getColorValue(a.strokeColor),e.style.polygonStrokeWidth=a.strokeWidth,e.style.polygonCornerRadius=a.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:r=>{var o,i,a,s,l,c;null===(o=n.current)||void 0===o||o.update(null===(a=null===(i=e.current)||void 0===i?void 0:i.finder)||void 0===a?void 0:a.holeRect,null===(s=e.current)||void 0===s?void 0:s.camera,r.originalImageSize,r.barcodes),null===(c=(l=t.barcodeScannerViewConfig).onBarcodesDetected)||void 0===c||c.call(l,r)},_onDetectionFailed:r=>{var o,i,a,s,l,c;null===(o=n.current)||void 0===o||o.update(null===(a=null===(i=e.current)||void 0===i?void 0:i.finder)||void 0===a?void 0:a.holeRect,null===(s=e.current)||void 0===s?void 0:s.camera,new ah.a(r.width,r.height),[]),null===(c=(l=t.barcodeScannerViewConfig)._onDetectionFailed)||void 0===c||c.call(l,r)}});return Object(I.useEffect)((()=>{const e=Oh(r,t.actionBarConfig);t.setActionButtonsVisible(e),a(e)}),[r,t.actionBarConfig]),I.default.createElement(I.default.Fragment,null,t.arOverlay.visible&&I.default.createElement(Yd,{style:{zIndex:1e3,position:"absolute"},ref:n,LabelComponent:Ph,labelComponentConfig:t.arOverlay,onBarcodeFound:t.arOnBarcodeEnter,onPolygonClick:t.arOnBarcodeClick,configuration:s}),I.default.createElement(Eh,{config:t.actionBarConfig,scanner:e.current,capabilities:r,bottomPadding:t.actionBarBottomPadding,torchEnabledInitially:t.cameraConfiguration.flashEnabled,zoomSteps:t.cameraConfiguration.zoomSteps,defaultZoomFactor:t.cameraConfiguration.defaultZoomFactor,initialCameraModule:t.cameraConfiguration.cameraModule}),I.default.createElement(Ah,{ref:e,viewFinderPadding:t.viewFinderPadding,configuration:l,onSuccess:()=>class{static setFromScanner(t,e){var n;if(!t.current)return;const r=t.current.getCapabilities();e({hasFacingOptions:(null==r?void 0:r.facingMode)&&r.facingMode.length>0,isTorchAvailable:null!==(n=t.current.getActiveCameraInfo().supportsTorchControl)&&void 0!==n&&n})}}.setFromScanner(e,o),onFailure:t.onCameraPermissionDenied,onLicenseError:t.onLicenseError}))}function Fh(t){return Object(I.useMemo)((()=>{const e=(new mh).videoConstraints;return e.width.ideal=t.cameraConfiguration.idealPreviewResolution.width,e.height.ideal=t.cameraConfiguration.idealPreviewResolution.height,e.facingMode="FRONT"===t.cameraConfiguration.cameraModule?"user":"environment",{videoConstraints:e,backgroundColor:gt.b.getColorValue(t.backgroundColor),userGuidance:t.userGuidance,finder:t.viewFinder,detectionParameters:new k.BarcodeScannerTypes.BarcodeScannerConfiguration({live:!0,engineMode:t.recognizerConfiguration.engineMode,barcodeFormatConfigurations:[new k.BarcodeConfigs.BarcodeFormatCommonConfiguration({formats:t.recognizerConfiguration.barcodeFormats.length>0?t.recognizerConfiguration.barcodeFormats:void 0,regexFilter:t.recognizerConfiguration.barcodesRegexFilter,gs1Handling:t.recognizerConfiguration.gs1Handling})]}),desiredRecognitionResolution:t.recognizerConfiguration.maximumRecognizerResolution}}),[t])}var Ih=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};function Mh(t){const[e,n]=Object(I.useState)(null),[r,o]=Object(I.useState)(!0),i=Object(I.useMemo)((()=>"__sb_"+Math.random()),[]),a=t.barcodeMapper,s=t.configuration.useCase,l=Object.assign(Object.assign({},Fh(t.configuration)),{onBarcodesDetected:e=>{e.barcodes.length>0&&!s.arOverlay.visible&&t.scanningEnabled.current&&n(e.barcodes[0])},onError:t.onError,containerId:i,captureDelay:0}),c=n=>Ih(this,void 0,void 0,(function*(){let r;r=null===e?[]:[new W.BarcodeScannerUIItem({count:1,barcode:n})];const o={items:r};t.onSubmit(o)}));Object(I.useEffect)((()=>{e&&(Oo.INSTANCE.beep(t.configuration.sound),Lo.INSTANCE.vibrate(t.configuration.vibration))}),[e]),Object(I.useEffect)((()=>{null===e||s.confirmationSheetEnabled||c(e)}),[e,s.confirmationSheetEnabled]);const u=a.useBarcodeMappedData(e);Object(I.useEffect)((()=>{"FAILED"===(null==u?void 0:u.state)&&n(null)}),[null==u?void 0:u.state]);const d=Object(I.useContext)(Ne);return I.default.createElement(I.default.Fragment,null,I.default.createElement(Lh.Provider,{value:t.barcodeMapper},I.default.createElement(mo,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})),I.default.createElement(mt,{id:i,sx:{width:"100%",height:d.remainingVisibleBodyHeight}},I.default.createElement(Bh,{cameraConfiguration:t.configuration.cameraConfiguration,scanningPaused:null!==e,setActionButtonsVisible:o,viewFinderPadding:{minTopPadding:d.minTopPaddingForViewFinder,minBottomPadding:r?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:i,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:16,onCameraPermissionDenied:t.onCameraPermissionDenied,onLicenseError:t.onError}))));var h}var Wh=Object(Ch.a)(Object($.jsx)("path",{d:"M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74m9.84 4.63-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74c-3.6-.76-3.54-.75-3.67-.75-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38"}),"TouchApp"),zh=Object(Ch.a)(Object($.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Nh=Object(Ch.a)(Object($.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Vh=n(126);function Uh(t){const{children:e,defer:n=!1,fallback:r=null}=t,[o,i]=I.useState(!1);return Object(Tr.a)((()=>{n||i(!0)}),[n]),I.useEffect((()=>{n&&i(!0)}),[n]),Object($.jsx)(I.Fragment,{children:o?e:r})}var Hh=n(69),$h=n(57);const Gh=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Yh(t,e,n){var r;const o=function(t,e,n){const r=e.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=Object($h.a)(e);let a;if(e.fakeTransform)a=e.fakeTransform;else{const t=i.getComputedStyle(e);a=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"==typeof a){const t=a.split("(")[1].split(")")[0].split(",");s=parseInt(t[4],10),l=parseInt(t[5],10)}return"left"===t?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:"right"===t?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===t?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(t,e,"function"==typeof(r=n)?r():r);o&&(e.style.webkitTransform=o,e.style.transform=o)}var Qh=I.forwardRef((function(t,e){const n=Vn(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,container:l,direction:c="down",easing:u=r,in:d,onEnter:h,onEntered:p,onEntering:f,onExit:m,onExited:g,onExiting:v,style:b,timeout:y=o,TransitionComponent:A=Vr}=t,C=Object(N.a)(t,Gh),S=I.useRef(null),x=Object(Xt.a)(s.ref,S,e),w=t=>e=>{t&&(void 0===e?t(S.current):t(S.current,e))},O=w(((t,e)=>{Yh(c,t,l),Ur(t),h&&h(t,e)})),E=w(((t,e)=>{const r=Hr({timeout:y,style:b,easing:u},{mode:"enter"});t.style.webkitTransition=n.transitions.create("-webkit-transform",Object(z.a)({},r)),t.style.transition=n.transitions.create("transform",Object(z.a)({},r)),t.style.webkitTransform="none",t.style.transform="none",f&&f(t,e)})),L=w(p),j=w(v),k=w((t=>{const e=Hr({timeout:y,style:b,easing:u},{mode:"exit"});t.style.webkitTransition=n.transitions.create("-webkit-transform",e),t.style.transition=n.transitions.create("transform",e),Yh(c,t,l),m&&m(t)})),_=w((t=>{t.style.webkitTransition="",t.style.transition="",g&&g(t)})),T=I.useCallback((()=>{S.current&&Yh(c,S.current,l)}),[c,l]);return I.useEffect((()=>{if(d||"down"===c||"right"===c)return;const t=Object(Hh.a)((()=>{S.current&&Yh(c,S.current,l)})),e=Object($h.a)(S.current);return e.addEventListener("resize",t),()=>{t.clear(),e.removeEventListener("resize",t)}}),[c,d,l]),I.useEffect((()=>{d||T()}),[d,T]),Object($.jsx)(A,Object(z.a)({nodeRef:S,onEnter:O,onEntered:L,onEntering:E,onExit:k,onExited:_,onExiting:j,addEndListener:t=>{i&&i(S.current,t)},appear:a,in:d,timeout:y},C,{children:(t,e)=>I.cloneElement(s,Object(z.a)({ref:x,style:Object(z.a)({visibility:"exited"!==t||d?void 0:"hidden"},b,s.props.style)},e))}))}));function Zh(t){return Object(xt.a)("MuiDrawer",t)}Object(ht.a)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Xh=["BackdropProps"],qh=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Kh=(t,e)=>{const{ownerState:n}=t;return[e.root,("permanent"===n.variant||"persistent"===n.variant)&&e.docked,e.modal]},Jh=Object(bt.a)(no,{name:"MuiDrawer",slot:"Root",overridesResolver:Kh})((({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer}))),tp=Object(bt.a)("div",{shouldForwardProp:bt.b,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Kh})({flex:"0 0 auto"}),ep=Object(bt.a)(Lt,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`paperAnchor${Object(At.a)(n.anchor)}`],"temporary"!==n.variant&&e[`paperAnchorDocked${Object(At.a)(n.anchor)}`]]}})((({theme:t,ownerState:e})=>Object(z.a)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===e.anchor&&{left:0},"top"===e.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===e.anchor&&{right:0},"bottom"===e.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===e.anchor&&"temporary"!==e.variant&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},"top"===e.anchor&&"temporary"!==e.variant&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},"right"===e.anchor&&"temporary"!==e.variant&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},"bottom"===e.anchor&&"temporary"!==e.variant&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`}))),np={left:"right",right:"left",top:"down",bottom:"up"};function rp(t){return-1!==["left","right"].indexOf(t)}function op(t,e){return"rtl"===t.direction&&rp(e)?np[e]:e}var ip=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiDrawer"}),r=Vn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:i="left",BackdropProps:a,children:s,className:l,elevation:c=16,hideBackdrop:u=!1,ModalProps:{BackdropProps:d}={},onClose:h,open:p=!1,PaperProps:f={},SlideProps:m,TransitionComponent:g=Qh,transitionDuration:v=o,variant:b="temporary"}=n,y=Object(N.a)(n.ModalProps,Xh),A=Object(N.a)(n,qh),C=I.useRef(!1);I.useEffect((()=>{C.current=!0}),[]);const S=op(r,i),x=i,w=Object(z.a)({},n,{anchor:x,elevation:c,open:p,variant:b},A),O=(t=>{const{classes:e,anchor:n,variant:r}=t,o={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Object(At.a)(n)}`,"temporary"!==r&&`paperAnchorDocked${Object(At.a)(n)}`]};return Object(vt.a)(o,Zh,e)})(w),E=Object($.jsx)(ep,Object(z.a)({elevation:"temporary"===b?c:0,square:!0},f,{className:Object(et.a)(O.paper,f.className),ownerState:w,children:s}));if("permanent"===b)return Object($.jsx)(tp,Object(z.a)({className:Object(et.a)(O.root,O.docked,l),ownerState:w,ref:e},A,{children:E}));const L=Object($.jsx)(g,Object(z.a)({in:p,direction:np[S],timeout:v,appear:C.current},m,{children:E}));return"persistent"===b?Object($.jsx)(tp,Object(z.a)({className:Object(et.a)(O.root,O.docked,l),ownerState:w,ref:e},A,{children:L})):Object($.jsx)(Jh,Object(z.a)({BackdropProps:Object(z.a)({},a,d,{transitionDuration:v}),className:Object(et.a)(O.root,O.modal,l),open:p,ownerState:w,onClose:h,hideBackdrop:u,ref:e},A,y,{children:L}))})),ap=n(56),sp=n(49);const lp=["anchor","classes","className","width","style"],cp=Object(bt.a)("div",{shouldForwardProp:bt.b})((({theme:t,ownerState:e})=>Object(z.a)({position:"fixed",top:0,left:0,bottom:0,zIndex:t.zIndex.drawer-1},"left"===e.anchor&&{right:"auto"},"right"===e.anchor&&{left:"auto",right:0},"top"===e.anchor&&{bottom:"auto",right:0},"bottom"===e.anchor&&{top:"auto",bottom:0,right:0})));var up=I.forwardRef((function(t,e){const{anchor:n,classes:r={},className:o,width:i,style:a}=t,s=Object(N.a)(t,lp),l=t;return Object($.jsx)(cp,Object(z.a)({className:Object(et.a)("PrivateSwipeArea-root",r.root,r[`anchor${Object(At.a)(n)}`],o),ref:e,style:Object(z.a)({[rp(n)?"width":"height"]:i},a),ownerState:l},s))}));const dp=["BackdropProps"],hp=["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","allowSwipeInChildren","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"];let pp=null;function fp(t,e,n){return"right"===t?n.body.offsetWidth-e[0].pageX:e[0].pageX}function mp(t,e,n){return"bottom"===t?n.innerHeight-e[0].clientY:e[0].clientY}function gp(t,e){return t?e.clientWidth:e.clientHeight}function vp(t,e,n,r){return Math.min(Math.max(n?e-t:r+e-t,0),r)}const bp="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent);var yp=I.forwardRef((function(t,e){const n=Object(Vh.a)({name:"MuiSwipeableDrawer",props:t}),r=Vn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:i="left",disableBackdropTransition:a=!1,disableDiscovery:s=!1,disableSwipeToOpen:l=bp,hideBackdrop:c,hysteresis:u=.52,allowSwipeInChildren:d=!1,minFlingVelocity:h=450,ModalProps:{BackdropProps:p}={},onClose:f,onOpen:m,open:g=!1,PaperProps:v={},SwipeAreaProps:b,swipeAreaWidth:y=20,transitionDuration:A=o,variant:C="temporary"}=n,S=Object(N.a)(n.ModalProps,dp),x=Object(N.a)(n,hp),[w,O]=I.useState(!1),E=I.useRef({isSwiping:null}),L=I.useRef(),j=I.useRef(),k=I.useRef(),_=Object(Xt.a)(v.ref,k),T=I.useRef(!1),P=I.useRef();Object(sp.a)((()=>{P.current=null}),[g]);const R=I.useCallback(((t,e={})=>{const{mode:n=null,changeTransition:o=!0}=e,s=op(r,i),l=-1!==["right","bottom"].indexOf(s)?1:-1,u=rp(i),d=u?`translate(${l*t}px, 0)`:`translate(0, ${l*t}px)`,h=k.current.style;h.webkitTransform=d,h.transform=d;let p="";if(n&&(p=r.transitions.create("all",Hr({easing:void 0,style:void 0,timeout:A},{mode:n}))),o&&(h.webkitTransition=p,h.transition=p),!a&&!c){const e=j.current.style;e.opacity=1-t/gp(u,k.current),o&&(e.webkitTransition=p,e.transition=p)}}),[i,a,c,r,A]),D=Object(qt.a)((t=>{if(!T.current)return;if(pp=null,T.current=!1,I.flushSync((()=>{O(!1)})),!E.current.isSwiping)return void(E.current.isSwiping=null);E.current.isSwiping=null;const e=op(r,i),n=rp(i);let o;o=n?fp(e,t.changedTouches,Object(ap.a)(t.currentTarget)):mp(e,t.changedTouches,Object($h.a)(t.currentTarget));const a=n?E.current.startX:E.current.startY,s=gp(n,k.current),l=vp(o,a,g,s),c=l/s;Math.abs(E.current.velocity)>h&&(P.current=1e3*Math.abs((s-l)/E.current.velocity)),g?E.current.velocity>h||c>u?f():R(0,{mode:"exit"}):E.current.velocity<-h||1-c>u?m():R(gp(n,k.current),{mode:"enter"})})),B=(t=!1)=>{if(!w){!t&&s&&d||I.flushSync((()=>{O(!0)}));const e=rp(i);!g&&k.current&&R(gp(e,k.current)+(s?15:-20),{changeTransition:!1}),E.current.velocity=0,E.current.lastTime=null,E.current.lastTranslate=null,E.current.paperHit=!1,T.current=!0}},F=Object(qt.a)((t=>{if(!k.current||!T.current)return;if(null!==pp&&pp!==E.current)return;B(!0);const e=op(r,i),n=rp(i),o=fp(e,t.touches,Object(ap.a)(t.currentTarget)),a=mp(e,t.touches,Object($h.a)(t.currentTarget));if(g&&k.current.contains(t.target)&&null===pp){const e=function({domTreeShapes:t,start:e,current:n,anchor:r}){const o={x:"scrollLeft",y:"scrollTop"},i={x:"scrollWidth",y:"scrollHeight"},a={x:"clientWidth",y:"clientHeight"};return t.some((t=>{let s=n>=e;"top"!==r&&"left"!==r||(s=!s);const l="left"===r||"right"===r?"x":"y",c=Math.round(t[o[l]]),u=c>0,d=c+t[a[l]]<t[i[l]];return!!(s&&d||!s&&u)}))}({domTreeShapes:function(t,e){const n=[];for(;t&&t!==e.parentElement;){const r=Object($h.a)(e).getComputedStyle(t);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")||(t.clientWidth>0&&t.scrollWidth>t.clientWidth||t.clientHeight>0&&t.scrollHeight>t.clientHeight)&&n.push(t),t=t.parentElement}return n}(t.target,k.current),start:n?E.current.startX:E.current.startY,current:n?o:a,anchor:i});if(e)return void(pp=!0);pp=E.current}if(null==E.current.isSwiping){const e=Math.abs(o-E.current.startX),r=Math.abs(a-E.current.startY),i=n?e>r&&e>3:r>e&&r>3;if(i&&t.cancelable&&t.preventDefault(),!0===i||(n?r>3:e>3)){if(E.current.isSwiping=i,!i)return void D(t);E.current.startX=o,E.current.startY=a,s||g||(n?E.current.startX-=20:E.current.startY-=20)}}if(!E.current.isSwiping)return;const l=gp(n,k.current);let c=n?E.current.startX:E.current.startY;g&&!E.current.paperHit&&(c=Math.min(c,l));const u=vp(n?o:a,c,g,l);if(g)if(E.current.paperHit)0===u&&(E.current.startX=o,E.current.startY=a);else{if(!(n?o<l:a<l))return;E.current.paperHit=!0,E.current.startX=o,E.current.startY=a}null===E.current.lastTranslate&&(E.current.lastTranslate=u,E.current.lastTime=performance.now()+1);const d=(u-E.current.lastTranslate)/(performance.now()-E.current.lastTime)*1e3;E.current.velocity=.4*E.current.velocity+.6*d,E.current.lastTranslate=u,E.current.lastTime=performance.now(),t.cancelable&&t.preventDefault(),R(u)})),M=Object(qt.a)((t=>{if(t.defaultPrevented)return;if(t.defaultMuiPrevented)return;if(g&&(c||!j.current.contains(t.target))&&!k.current.contains(t.target))return;const e=op(r,i),n=rp(i),o=fp(e,t.touches,Object(ap.a)(t.currentTarget)),a=mp(e,t.touches,Object($h.a)(t.currentTarget));if(!g){var s;if(l||!(t.target===L.current||null!=(s=k.current)&&s.contains(t.target)&&("function"==typeof d?d(t,L.current,k.current):d)))return;if(n){if(o>y)return}else if(a>y)return}t.defaultMuiPrevented=!0,pp=null,E.current.startX=o,E.current.startY=a,B()}));return I.useEffect((()=>{if("temporary"===C){const t=Object(ap.a)(k.current);return t.addEventListener("touchstart",M),t.addEventListener("touchmove",F,{passive:!g}),t.addEventListener("touchend",D),()=>{t.removeEventListener("touchstart",M),t.removeEventListener("touchmove",F,{passive:!g}),t.removeEventListener("touchend",D)}}}),[C,g,M,F,D]),I.useEffect((()=>()=>{pp===E.current&&(pp=null)}),[]),I.useEffect((()=>{g||O(!1)}),[g]),Object($.jsxs)(I.Fragment,{children:[Object($.jsx)(ip,Object(z.a)({open:!("temporary"!==C||!w)||g,variant:C,ModalProps:Object(z.a)({BackdropProps:Object(z.a)({},p,{ref:j})},"temporary"===C&&{keepMounted:!0},S),hideBackdrop:c,PaperProps:Object(z.a)({},v,{style:Object(z.a)({pointerEvents:"temporary"!==C||g||d?"":"none"},v.style),ref:_}),anchor:i,transitionDuration:P.current||A,onClose:f,ref:e},x)),!l&&"temporary"===C&&Object($.jsx)(Uh,{children:Object($.jsx)(up,Object(z.a)({anchor:i,ref:L,width:y},b))})]})})),Ap=n(95);function Cp(t){const e=Object.assign(Object.assign({},t.title),{text:gt.b.getLocalizedBarcodeText(t.title.text,t.textReplacementArgs)});return I.default.createElement(I.default.Fragment,null,I.default.createElement(ze,Object.assign({},t.leftButton)),I.default.createElement(Vt,{sx:{flex:2,textAlign:"center",fontWeight:600,fontSize:18}},I.default.createElement(Qt.a,{config:e})),I.default.createElement(ze,Object.assign({},t.rightButton)))}function Sp(){return I.default.createElement("div",{style:{width:30,height:6,backgroundColor:Ap.a[300],borderRadius:3,position:"absolute",top:8,left:"calc(50% - 15px)"},"data-sb-drawer-puller":"1"})}function xp(t){return I.default.createElement(mt,Object.assign({sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",paddingTop:2,paddingBottom:1,touchAction:"none"},ref:t.innerRef},t.dragProps),I.default.createElement(Sp,null),I.default.createElement(Cp,Object.assign({},t.drawerHeaderContentProps)))}var wp=Object(Ch.a)(Object($.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Op(t){return Object(xt.a)("MuiAvatar",t)}Object(ht.a)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Ep=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Lp=["component","slots","slotProps"],jp=["component"];const kp=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],_p=Object(bt.a)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],n.colorDefault&&e.colorDefault]}})((({theme:t})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:Object(z.a)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:Object(z.a)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}))),Tp=Object(bt.a)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(t,e)=>e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Pp=Object(bt.a)(wp,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(t,e)=>e.fallback})({width:"75%",height:"75%"});var Rp=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiAvatar"}),{alt:r,children:o,className:i,component:a="div",slots:s={},slotProps:l={},imgProps:c,sizes:u,src:d,srcSet:h,variant:p="circular"}=n,f=Object(N.a)(n,kp);let m=null;const g=function({crossOrigin:t,referrerPolicy:e,src:n,srcSet:r}){const[o,i]=I.useState(!1);return I.useEffect((()=>{if(!n&&!r)return;i(!1);let o=!0;const a=new Image;return a.onload=()=>{o&&i("loaded")},a.onerror=()=>{o&&i("error")},a.crossOrigin=t,a.referrerPolicy=e,a.src=n,r&&(a.srcset=r),()=>{o=!1}}),[t,e,n,r]),o}(Object(z.a)({},c,{src:d,srcSet:h})),v=d||h,b=v&&"error"!==g,y=Object(z.a)({},n,{colorDefault:!b,component:a,variant:p}),A=(t=>{const{classes:e,variant:n,colorDefault:r}=t,o={root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]};return Object(vt.a)(o,Op,e)})(y),[C,S]=function(t,e){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s}=e,l=Object(N.a)(e,Ep),{component:c,slots:u={[t]:void 0},slotProps:d={[t]:void 0}}=i,h=Object(N.a)(i,Lp),p=u[t]||r,f=pr(d[t],o),m=hr(Object(z.a)({className:n},l,{externalForwardedProps:"root"===t?h:void 0,externalSlotProps:f})),{props:{component:g},internalRef:v}=m,b=Object(N.a)(m.props,jp),y=Object(sr.a)(v,null==f?void 0:f.ref,e.ref),A=a?a(b):{},C=Object(z.a)({},o,A),S="root"===t?g||c:g,x=cr(p,Object(z.a)({},"root"===t&&!c&&!u[t]&&s,"root"!==t&&!u[t]&&s,b,S&&{as:S},{ref:y}),C);return Object.keys(A).forEach((t=>{delete x[t]})),[p,x]}("img",{className:A.img,elementType:Tp,externalForwardedProps:{slots:s,slotProps:{img:Object(z.a)({},c,l.img)}},additionalProps:{alt:r,src:d,srcSet:h,sizes:u},ownerState:y});return m=b?Object($.jsx)(C,Object(z.a)({},S)):o||0===o?o:v&&r?r[0]:Object($.jsx)(Pp,{ownerState:y,className:A.fallback}),Object($.jsx)(_p,Object(z.a)({as:a,ownerState:y,className:Object(et.a)(A.root,i),ref:e},f,{children:m}))}));function Dp(t){return I.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"38",viewBox:"0 0 41 38",fill:"none"},I.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 Bp(t){return t.isVisible?I.default.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"column",marginTop:"auto",marginBottom:"auto",overflowY:"scroll"}},t.style.placeholderIcon.visible&&I.default.createElement(Rp,{style:{backgroundColor:gt.b.getColorValue(t.style.placeholderIconBackground),width:100,height:100}},I.default.createElement(Dp,{color:gt.b.getColorValue(t.style.placeholderIcon.color)})),I.default.createElement(Vt,{style:{marginTop:20},variant:"h6"},I.default.createElement(Qt.a,{config:t.style.placeholderTitle})),I.default.createElement(Vt,{style:{marginTop:20,paddingLeft:"10%",paddingRight:"10%",maxWidth:400,textAlign:"center"},variant:"body2"},I.default.createElement(Qt.a,{config:t.style.placeholderSubtitle})),t.onStartClick&&t.style.startScanningButton.visible&&I.default.createElement(ir,Object.assign({style:{width:"60%",marginTop:20}},t.style.startScanningButton,{visible:!0,onClick:t.onStartClick}))):null}function Fp(t,e,n){const r=Object(I.useRef)(),o=Object(I.useRef)(null),[i,a]=Object(I.useState)(),[s,l]=Object(I.useState)(!1),c=Object(I.useRef)([]),u=t=>{let n="none";if(c.current.length>0){const e=200,r=((t,e)=>{let n=t[0],r=Math.abs(n.time-e);for(let o=1;o<t.length;o++){const i=Math.abs(t[o].time-e);i<r&&(n=t[o],r=i)}return n})(c.current,t.timeStamp-e),o=r.y-t.clientY,i=100;o>i?n="up":o<-i&&(n="down")}c.current.splice(0,c.current.length),e(new Fd.a(t.clientX,t.clientY),n)},d={onPointerDown:t=>{t.target.setPointerCapture(t.pointerId),l(!0),o.current=new Fd.a(t.clientX,t.clientY),a(Fd.a.empty()),t.stopPropagation()},onPointerMove:e=>{if(!s)return;const n=new Fd.a(e.clientX,e.clientY);r.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:o,currentPoint:i,props:d,stop:()=>{r.current.stopPropagation()},dragOngoing:s}}var Ip=n(58);function Mp(t){const[e,n]=Object(I.useState)(0),[r,o]=Object(I.useState)(!1),i=Object(I.useRef)(null),a=Object(I.useContext)(Ne).height,s=t=>{n(t),o(!0),setTimeout((()=>{o(!1)}),500)},l=e=>{const n=e-c.startPoint.current.y;return Object(Ip.a)((t.isOpen?100:0)-100*n/(window.innerHeight-a-t.closedSheetVisibleHeight),0,100)},c=Fp((t=>{n(l(t.y))}),((e,n)=>{if(e.y===c.startPoint.current.y)return;let r;r=l(e.y)<50?"swipe-to-close":"swipe-to-open","up"===n&&(r="swipe-to-open"),"down"===n&&(r="swipe-to-close"),t.onSwipe(r)}),(()=>{}));return Object(I.useEffect)((()=>{r||c.dragOngoing||!i||(t.isOpen||0===e?t.isOpen&&100!==e&&s(100):s(0))}),[t.isOpen,e,c.dragOngoing]),I.createElement("div",null,I.createElement(yp,{variant:"persistent",anchor:"bottom",open:!0,onClose:()=>{},onOpen:()=>{},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},PaperProps:{style:{height:`calc((100 * ${$t} - ${a}px - ${t.closedSheetVisibleHeight}px) * ${e} / 100 + ${t.closedSheetVisibleHeight}px)`,overflow:"hidden",borderRadius:10,borderBottomLeftRadius:0,borderBottomRightRadius:0,transition:r?"height 500ms":void 0,backgroundColor:gt.b.getColorValue(t.contentStyle.sheetColor)},elevation:24}},I.createElement(xp,{innerRef:t=>{i.current=t},drawerHeaderContentProps:t.drawerHeaderContentProps,dragProps:c.props}),t.children,I.createElement(Bp,{isVisible:t.isPlaceholderVisible,style:t.contentStyle,onStartClick:()=>t.onSwipe("swipe-to-close")})))}var Wp=n(104),zp=n.n(Wp),Np=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Vp(t){var{inputRef:e}=t,n=Np(t,["inputRef"]);const r=Object.assign(Object.assign({},n),{style:Object.assign(Object.assign({},n.style||{}),{border:"none",display:"block",outlineWidth:0,width:"100%"})});return I.default.createElement("input",Object.assign({},r,{ref:e}))}var Up=Object(Ch.a)(Object($.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");function Hp(t){const e=!!t.barcode,[n,r]=I.default.useState(""),o=I.default.useRef(null),i={backgroundColor:gt.b.getColorValue(t.dialogStyling.sheetColor)};return Object(I.useEffect)((()=>{e&&r(String(t.barcode.count))}),[e]),I.default.createElement(I.default.Fragment,null,I.default.createElement(fo,{open:e,modalOverlayColor:t.dialogStyling.modalOverlayColor,TransitionProps:{onEnter:()=>{var t;return null===(t=o.current)||void 0===t?void 0:t.focus()}},onClose:t.onCancel,PaperProps:{component:"form",onSubmit:e=>{e.preventDefault(),t.setCounter(t.barcode.barcode,parseInt(n)||0)}}},I.default.createElement(Ye,{style:i},I.default.createElement(Vt,{fontSize:16,fontWeight:500,textAlign:"center"},I.default.createElement(Qt.a,{config:t.dialogStyling.title})),I.default.createElement(Vt,{fontSize:14,textAlign:"center"},I.default.createElement(Qt.a,{config:t.dialogStyling.info})),I.default.createElement(mt,{sx:{display:"flex",border:"2px solid",borderColor:gt.b.getColorValue(t.dialogStyling.dividerColor),mh:2,mb:0,p:1,borderRadius:1}},I.default.createElement(Vp,{inputRef:o,value:n,onChange:t=>{const e=parseInt(t.target.value.replaceAll(/[^0-9]/g,""));r(e>=0?e.toString():"")},type:"text",pattern:"[0-9]*"}),t.dialogStyling.clearTextButton.visible&&I.default.createElement(zp.a,{sx:{marginLeft:"auto",paddingLeft:1},onClick:()=>r(""),htmlColor:gt.b.getColorValue(t.dialogStyling.clearTextButton.color)}))),I.default.createElement(qe,{sx:Object.assign(Object.assign({},i),{pt:0})},I.default.createElement(Kn,{container:!0,spacing:2},I.default.createElement(Kn,{item:!0,xs:12},I.default.createElement(or,{color:gt.b.getColorValue(t.dialogStyling.dividerColor)})),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({style:{width:"100%"},onClick:t.onCancel},t.dialogStyling.cancelButton))),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({icon:Up,style:{width:"100%"},onClick:()=>{},type:"submit"},t.dialogStyling.updateButton)))))))}var $p=I.createContext({});function Gp(t){return Object(xt.a)("MuiList",t)}Object(ht.a)("MuiList",["root","padding","dense","subheader"]);const Yp=["children","className","component","dense","disablePadding","subheader"],Qp=Object(bt.a)("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})((({ownerState:t})=>Object(z.a)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})));var Zp=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=Object(N.a)(n,Yp),u=I.useMemo((()=>({dense:a})),[a]),d=Object(z.a)({},n,{component:i,dense:a,disablePadding:s}),h=(t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return Object(vt.a)(i,Gp,e)})(d);return Object($.jsx)($p.Provider,{value:u,children:Object($.jsxs)(Qp,Object(z.a)({as:i,className:Object(et.a)(h.root,o),ref:e,ownerState:d},c,{children:[l,r]}))})})),Xp=n(70);function qp(t){return Object(xt.a)("MuiListItem",t)}var Kp=Object(ht.a)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var Jp=Object(ht.a)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function tf(t){return Object(xt.a)("MuiListItemSecondaryAction",t)}Object(ht.a)("MuiListItemSecondaryAction",["root","disableGutters"]);const ef=["className"],nf=Object(bt.a)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})((({ownerState:t})=>Object(z.a)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0}))),rf=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiListItemSecondaryAction"}),{className:r}=n,o=Object(N.a)(n,ef),i=I.useContext($p),a=Object(z.a)({},n,{disableGutters:i.disableGutters}),s=(t=>{const{disableGutters:e,classes:n}=t,r={root:["root",e&&"disableGutters"]};return Object(vt.a)(r,tf,n)})(a);return Object($.jsx)(nf,Object(z.a)({className:Object(et.a)(s.root,r),ownerState:a,ref:e},o))}));rf.muiName="ListItemSecondaryAction";var of=rf;const af=["className"],sf=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],lf=Object(bt.a)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,"flex-start"===n.alignItems&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]}})((({theme:t,ownerState:e})=>Object(z.a)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&Object(z.a)({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Jp.root}`]:{paddingRight:48}},{[`&.${Kp.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Kp.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Object(Ct.a)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Kp.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Object(Ct.a)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Kp.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===e.alignItems&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Kp.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Object(Ct.a)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Object(Ct.a)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48}))),cf=Object(bt.a)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"});var uf=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiListItem"}),{alignItems:r="center",autoFocus:o=!1,button:i=!1,children:a,className:s,component:l,components:c={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:h}={},dense:p=!1,disabled:f=!1,disableGutters:m=!1,disablePadding:g=!1,divider:v=!1,focusVisibleClassName:b,secondaryAction:y,selected:A=!1,slotProps:C={},slots:S={}}=n,x=Object(N.a)(n.ContainerProps,af),w=Object(N.a)(n,sf),O=I.useContext($p),E=I.useMemo((()=>({dense:p||O.dense||!1,alignItems:r,disableGutters:m})),[r,O.dense,p,m]),L=I.useRef(null);Object(sp.a)((()=>{o&&L.current&&L.current.focus()}),[o]);const j=I.Children.toArray(a),k=j.length&&Object(Xp.a)(j[j.length-1],["ListItemSecondaryAction"]),_=Object(z.a)({},n,{alignItems:r,autoFocus:o,button:i,dense:E.dense,disabled:f,disableGutters:m,disablePadding:g,divider:v,hasSecondaryAction:k,selected:A}),T=(t=>{const{alignItems:e,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=t,d={root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button","flex-start"===e&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]};return Object(vt.a)(d,qp,r)})(_),P=Object(Xt.a)(L,e),R=S.root||c.Root||lf,D=C.root||u.root||{},B=Object(z.a)({className:Object(et.a)(T.root,D.className,s),disabled:f},w);let F=l||"li";return i&&(B.component=l||"div",B.focusVisibleClassName=Object(et.a)(Kp.focusVisible,b),F=Le),k?(F=B.component||l?F:"div","li"===d&&("li"===F?F="div":"li"===B.component&&(B.component="div")),Object($.jsx)($p.Provider,{value:E,children:Object($.jsxs)(cf,Object(z.a)({as:d,className:Object(et.a)(T.container,h),ref:P,ownerState:_},x,{children:[Object($.jsx)(R,Object(z.a)({},D,!lr(R)&&{as:F,ownerState:Object(z.a)({},_,D.ownerState)},B,{children:j})),j.pop()]}))})):Object($.jsx)($p.Provider,{value:E,children:Object($.jsxs)(R,Object(z.a)({},D,{as:F,ref:P},!lr(R)&&{ownerState:Object(z.a)({},_,D.ownerState)},B,{children:[j,y&&Object($.jsx)(of,{children:y})]}))})})),df=n(76),hf=n.n(df);function pf(t){return I.default.createElement("div",{style:{top:0,width:"100%",marginTop:"1px",marginLeft:"1px",height:"calc(100% - 2px)",position:"absolute",backgroundColor:gt.b.getColorValue(t.config.backgroundColor),display:"flex",alignItems:"right",justifyContent:"right"}},I.default.createElement(hf.a,{style:{height:"100%",color:gt.b.getColorValue(t.config.iconColor),paddingRight:t.visibleOffset/2,cursor:"pointer"}}))}var ff=n(99);function mf(t,e,n,r,o){const[i,a]=I.useState((()=>o&&n?n(t).matches:r?r(t).matches:e));return Object(sp.a)((()=>{let e=!0;if(!n)return;const r=n(t),o=()=>{e&&a(r.matches)};return o(),r.addListener(o),()=>{e=!1,r.removeListener(o)}}),[t,n]),i}const gf=I.useSyncExternalStore;function vf(t,e,n,r,o){const i=I.useCallback((()=>e),[e]),a=I.useMemo((()=>{if(o&&n)return()=>n(t).matches;if(null!==r){const{matches:e}=r(t);return()=>e}return i}),[i,t,r,o,n]),[s,l]=I.useMemo((()=>{if(null===n)return[i,()=>()=>{}];const e=n(t);return[()=>e.matches,t=>(e.addListener(t),()=>{e.removeListener(t)})]}),[i,n,t]);return gf(l,s,a)}function bf(t,e={}){const n=Object(Q.a)(),r="undefined"!=typeof window&&"undefined"!=typeof window.matchMedia,{defaultMatches:o=!1,matchMedia:i=(r?window.matchMedia:null),ssrMatchMedia:a=null,noSsr:s=!1}=Object(ff.a)({name:"MuiUseMediaQuery",props:e,theme:n});let l="function"==typeof t?t(n):t;l=l.replace(/^@media( ?)/m,"");return(void 0!==gf?vf:mf)(l,o,i,a,s)}const yf=0,Af=800,Cf=1200;function Sf(t){switch(t){case"mobile":return bf("(min-width:"+yf+"px) and (max-width:"+(Af-1)+"px)");case"tablet":return bf("(min-width:"+Af+"px) and (max-width:"+(Cf-1)+"px)");case"desktop":return bf("(min-width:"+Cf+"px)")}}const xf=150;function wf(t){const[e,n]=Object(I.useState)(0),[r,o]=Object(I.useState)(!1);let i;const a=Fp((t=>{let e=a.startPoint.current.x-t.x;e<0?a.stop():n(-e)}),(e=>{if(e.x===a.startPoint.current.x)return;if(a.startPoint.current.x-e.x>75){const e=t.animateBackAfterDelete?()=>{c(0)}:void 0;c(xf,e)}else c(0)}),(()=>{c(0)})),s=Object(I.useContext)(Lh),l=s.useBarcodeMappedData(t.barcode);Object(I.useEffect)((()=>{const e={barcode:t.barcode,callback:()=>t.onDelete(t.barcode)};return s.addOnEvictionListener(e),()=>{s.removeOnEvictionListener(e)}}),[]);const c=(e,r)=>{const a=e>=xf,s=-i.getBoundingClientRect().width;n(a?s:0),o(!0),setTimeout((()=>{o(!1),a&&t.onDelete(t.barcode),r&&r()}),200)},u=Sf("desktop")&&t.swipeToDeleteConfig.enabled,d=!u&&t.swipeToDeleteConfig.enabled;return Object(I.useEffect)((()=>{d||c(0)}),[d]),I.default.createElement(mt,{sx:{px:2},style:{width:"100%",paddingRight:0},ref:t=>{t&&(i=t)}},I.default.createElement(pf,{config:t.swipeToDeleteConfig,visibleOffset:xf}),I.default.createElement(mt,Object.assign({sx:{width:"100%",backgroundColor:gt.b.getColorValue(t.sheetColor),transform:`translateX(${e}px)`,transition:r?"transform 200ms ease-in-out":void 0,touchAction:"pan-y",display:"flex",alignItems:"center",paddingTop:"16px",paddingBottom:"16px",columnGap:"16px"}},d?a.props:{}),I.default.createElement(Wn,Object.assign({barcodeMappedData:l},t)),null!==t.readonlyCount&&I.default.createElement(mt,{sx:{fontSize:18,marginTop:"auto",flex:1,textAlign:"right",color:gt.b.getColorValue("?sbColorOnSurfaceVariant")}},"x",t.readonlyCount),u&&I.default.createElement(hf.a,{sx:{height:"100%",marginLeft:"auto",cursor:"pointer",color:gt.b.getColorValue("?sbColorOnSurface")},onClick:()=>t.onDelete(t.barcode)}),I.default.createElement(mt,{sx:{width:"0px"}})))}function Of(t){const e=gt.b.getColorValue(t.sheetContent.dividerColor),n=t.sheetContent.manualCountChangeEnabled&&"COUNTING"===t.mode,r=(e,n)=>{let r=t.indicatorColor.partial;return n===e.count?r=t.indicatorColor.complete:0===n&&(r=t.indicatorColor.notScanned),gt.b.getColorValue(r)};return I.default.createElement(I.default.Fragment,null,I.default.createElement(or,{style:{borderColor:e}}),t.barcodes.length>0&&I.default.createElement(mt,{sx:{width:"auto",flex:1,overflowY:"auto",overflowX:"hidden"},role:"presentation"},I.default.createElement(Zp,{sx:{p:0}},t.barcodes.map((({barcode:o,count:i},a)=>{const s=t.expectedBarcodes.find((t=>t.barcodeValue===o.text));return I.default.createElement(uf,{key:a,sx:{padding:0,borderBottom:`1px solid ${e}`}},t.indicatorColor&&I.default.createElement("div",{style:{display:"flex",width:4,height:"100%",backgroundColor:r(s,i),position:"absolute"}}),I.default.createElement(wf,{barcode:o,animateBackAfterDelete:t.animateBackAfterDelete,onDelete:()=>t.onBarcodeChange({type:"remove",barcode:o}),counterForm:n&&{counter:i,manualCountChangeColor:t.sheetContent.manualCountChangeColor,manualCountOutlineColor:t.sheetContent.manualCountOutlineColor,addButtonEnabled:void 0===s||s.count>i,removeButtonEnabled:void 0===s||i>0,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}))})))))}var Ef=n(105),Lf=n.n(Ef);var jf=t=>{const e=I.useRef({});return I.useEffect((()=>{e.current=t})),e.current};function kf(t){return Object(xt.a)("MuiBadge",t)}var _f=Object(ht.a)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);const Tf=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],Pf=yt.a,Rf=Object(bt.a)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,e)=>e.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Df=Object(bt.a)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.badge,e[n.variant],e[`anchorOrigin${Object(At.a)(n.anchorOrigin.vertical)}${Object(At.a)(n.anchorOrigin.horizontal)}${Object(At.a)(n.overlap)}`],"default"!==n.color&&e[`color${Object(At.a)(n.color)}`],n.invisible&&e.invisible]}})((({theme:t})=>{var e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(e=t.vars)?e:t).palette).filter((e=>{var n,r;return(null!=(n=t.vars)?n:t).palette[e].main&&(null!=(r=t.vars)?r:t).palette[e].contrastText})).map((e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:t})=>"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}}));var Bf=I.forwardRef((function(t,e){var n,r,o,i,a,s;const l=Pf({props:t,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:u,component:d,components:h={},componentsProps:p={},children:f,overlap:m="rectangular",color:g="default",invisible:v=!1,max:b=99,badgeContent:y,slots:A,slotProps:C,showZero:S=!1,variant:x="standard"}=l,w=Object(N.a)(l,Tf),{badgeContent:O,invisible:E,max:L,displayValue:j}=function(t){const{badgeContent:e,invisible:n=!1,max:r=99,showZero:o=!1}=t,i=jf({badgeContent:e,max:r});let a=n;!1!==n||0!==e||o||(a=!0);const{badgeContent:s,max:l=r}=a?i:t;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}}({max:b,invisible:v,badgeContent:y,showZero:S}),k=jf({anchorOrigin:c,color:g,overlap:m,variant:x,badgeContent:y}),_=E||null==O&&"dot"!==x,{color:T=g,overlap:P=m,anchorOrigin:R=c,variant:D=x}=_?k:l,B="dot"!==D?j:void 0,F=Object(z.a)({},l,{badgeContent:O,invisible:_,max:L,displayValue:B,showZero:S,anchorOrigin:R,color:T,overlap:P,variant:D}),I=(t=>{const{color:e,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=t,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Object(At.a)(n.vertical)}${Object(At.a)(n.horizontal)}`,`anchorOrigin${Object(At.a)(n.vertical)}${Object(At.a)(n.horizontal)}${Object(At.a)(o)}`,`overlap${Object(At.a)(o)}`,"default"!==e&&`color${Object(At.a)(e)}`]};return Object(vt.a)(s,kf,a)})(F),M=null!=(n=null!=(r=null==A?void 0:A.root)?r:h.Root)?n:Rf,W=null!=(o=null!=(i=null==A?void 0:A.badge)?i:h.Badge)?o:Df,V=null!=(a=null==C?void 0:C.root)?a:p.root,U=null!=(s=null==C?void 0:C.badge)?s:p.badge,H=mr({elementType:M,externalSlotProps:V,externalForwardedProps:w,additionalProps:{ref:e,as:d},ownerState:F,className:Object(et.a)(null==V?void 0:V.className,I.root,u)}),G=mr({elementType:W,externalSlotProps:U,ownerState:F,className:Object(et.a)(I.badge,null==U?void 0:U.className)});return Object($.jsxs)(M,Object(z.a)({},H,{children:[f,Object($.jsx)(W,Object(z.a)({},G,{children:B}))]}))}));function Ff(t){return I.default.createElement(Bf,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:t.text,showZero:!0,color:"primary",overlap:"circular",slotProps:{badge:{style:{backgroundColor:t.backgroundColor,color:t.foregroundColor,fontWeight:"bold"}}}},t.children)}function If(t){if(!t.buttonStyling.visible)return null;return I.default.createElement(mt,{style:t.style},I.default.createElement(Ff,{text:t.text,backgroundColor:gt.b.getColorValue(t.buttonStyling.badgeBackgroundColor),foregroundColor:gt.b.getColorValue(t.buttonStyling.badgeForegroundColor)},I.default.createElement(Ao,{sx:{backgroundColor:gt.b.getColorValue(t.buttonStyling.backgroundColor),width:60,height:60,"&:hover, &:focus":{backgroundColor:gt.b.getColorValue(t.buttonStyling.activeBackgroundColor),outline:"none"}},onClick:t.onClick,disableRipple:!0,disableFocusRipple:!0},I.default.createElement(Lf.a,{sx:{color:gt.b.getColorValue(t.buttonStyling.foregroundColor),fontSize:"24pt","&:hover, &:focus":{color:gt.b.getColorValue(t.buttonStyling.activeForegroundColor)}}}))))}const Mf=(t,e)=>(null===t.format||null===e.format||t.format===e.format)&&t.text===e.text,Wf=(t,e)=>t.find((t=>((t,e)=>t.barcodeValue===e.text)(t,e)));class zf{constructor(t,e){this.expectedCount=t,this.foundCount=e}isFulFilled(){return void 0!==this.expectedCount&&void 0!==this.foundCount&&this.expectedCount===this.foundCount}toString(){return`${this.foundCount}/${this.expectedCount}`}}function Nf(t){const e=Object(I.useContext)(gt.a).getColorValue,n={backgroundColor:e(t.sheetColor)};return I.default.createElement(fo,{modalOverlayColor:t.modalOverlayColor,open:t.open},I.default.createElement(Ye,{sx:Object.assign(Object.assign({},n),{p:2,pb:1,textAlign:"center"})},I.default.createElement(Vt,{sx:{fontSize:"16pt",fontWeight:"bold"}},I.default.createElement(Qt.a,{config:t.title})),I.default.createElement(Vt,{sx:{fontSize:"14pt",lineHeight:"16pt"}},I.default.createElement(Qt.a,{config:t.subtitle}))),I.default.createElement(qe,{sx:Object.assign(Object.assign({},n),{pt:1})},I.default.createElement(Kn,{container:!0,spacing:2},I.default.createElement(Kn,{item:!0,xs:12},I.default.createElement(or,{color:e(t.dividerColor)})),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({style:{width:"100%"},icon:t.cancelButton.icon,onClick:t.cancelButton.onClick},t.cancelButton.style))),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({style:{width:"100%"},icon:t.okButton.icon,onClick:t.okButton.onClick},t.okButton.style))))))}function Vf(t){return t.open?I.default.createElement(Nf,{open:t.open,dividerColor:t.style.dividerColor,modalOverlayColor:t.style.modalOverlayColor,sheetColor:t.style.sheetColor,title:t.style.title,subtitle:t.style.subtitle,cancelButton:{style:t.style.cancelButton,onClick:t.onDismiss},okButton:{style:t.style.okButton,onClick:t.onSubmit}}):null}class Uf{constructor(t,e,n){this.barcodeItemSubtitleText=t,this.foundBarcodes=e,this.expectedBarcodes=n}useBarcodeMappedData(t){var e,n,r;const o=null!==(n=null===(e=this.foundBarcodes.find((e=>Mf(e.barcode,t))))||void 0===e?void 0:e.count.toString())&&void 0!==n?n:"0",i=Wf(this.expectedBarcodes,t);return{state:"LOADED",value:{title:`${null!==(r=i.title)&&void 0!==r?r:t.text}`,subtitle:gt.b.getLocalizedBarcodeText(this.barcodeItemSubtitleText,[o,null==i?void 0:i.count.toString()]),barcodeImage:i.image}}}addOnEvictionListener(){}removeOnEvictionListener(){}}function Hf(t){const e=Object(I.useContext)(Ne);return I.default.createElement(Kn,{item:!0,xs:5,component:"div",zIndex:1050,style:{paddingTop:e.minTopPaddingForContent,height:"100%",flexDirection:"column",display:"flex",backgroundColor:gt.b.getColorValue(t.sheetContent.sheetColor)}},I.default.createElement(mt,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},zIndex:50},I.default.createElement(Cp,Object.assign({},t.headerProps))),t.barcodeList,I.default.createElement(Bp,{isVisible:t.isEmptyStateVisible,style:t.sheetContent}))}var $f=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};function Gf(t){const e=Object(I.useRef)(),n=Object(I.useRef)(new Date("2001-01-01")),[r,o]=Object(I.useReducer)(function(t,e,n,r){return(o,i)=>{const a=t.useCase,s="FindAndPickScanningMode"===a._type,l=s?"COUNTING":a.mode,c=s?a.expectedBarcodes:[],u=t=>{let e=[...o];const n=i.barcodes||[i.barcode];for(const r of n){const n=e.findIndex((t=>Mf(t.barcode,r)));if(-1===n)e.push({barcode:r,count:t(0)});else{const r=e[n];e[n]=Object.assign(Object.assign({},r),{count:t(r.count,r)})}}return e},d=(t,n)=>{var o;if(e.current=new Date,!n)return t;const i=null===(o=Wf(c,n.barcode))||void 0===o?void 0:o.count;return void 0===i||i===t?t:(r(),t+1)};switch(i.type){case"onBarcodesDetected":{if((new Date).getTime()-e.current.getTime()<a.countingRepeatDelay||!n.current)return[...o];if(s)return a.arOverlay.automaticSelectionEnabled?u(d):[...o];const t=a.arOverlay;if(!t.visible||t.automaticSelectionEnabled){let t=!1;return u((n=>{let o="COUNTING"===l?n+1:1;return o===n||t||(e.current=new Date,r()),o}))}return u((t=>t))}case"onARCodeClick":return u(((t,e)=>{if(s)return d(t,e);const n="UNIQUE"===l?1-t:t+1;return n>0&&r(),n}));case"onCountEditDialogChange":{let t=()=>i.count||0;if(s){const e=Wf(c,i.barcode);i.count>e.count&&(t=()=>e.count)}return u(t)}case"setCount":return u(i.computeNewCount);case"remove":return o.map((t=>Object.assign(Object.assign({},t),{count:Mf(t.barcode,i.barcode)?0:t.count})));case"clear":return o.map((t=>Object.assign(Object.assign({},t),{count:0})));case"setHtmlElements":let t=!1;const h=o.map((e=>Mf(e.barcode,i.barcode)?(t=!0,Object.assign(Object.assign({},e),{polygonElement:i.polygonElement,labelElement:i.labelElement})):e));return t||h.push({barcode:i.barcode,count:0,labelElement:i.labelElement,polygonElement:i.polygonElement}),h}}}(t.configuration,n,t.scanningEnabled,(()=>{Oo.INSTANCE.beep(t.configuration.sound),Lo.INSTANCE.vibrate(t.configuration.vibration)})),[]),[i,a]=I.default.useState(null),[s,l]=Object(I.useState)(!1),c=Object(I.useMemo)((()=>"__sb_"+Math.random()),[]),[u,d]=Object(I.useState)(!0),h=t.barcodeMapper,[p,f]=Object(I.useState)(null),m="FindAndPickScanningMode"===t.configuration.useCase._type,g=t.configuration.useCase,v=m?"COUNTING":g.mode,b=Object(I.useRef)(Object.assign(Object.assign({},Fh(t.configuration)),{onBarcodesDetected:t=>{o({type:"onBarcodesDetected",barcodes:t.barcodes})},_onDetectionFailed(t){},onError:t.onError,captureDelay:1e3/60}));Object(I.useEffect)((()=>{if(m){const e=C();for(const n of e){const e=[(t=n.barcodeValue,new k.BarcodeScannerTypes.BarcodeItem({text:t,format:null,quad:[],sourceImage:null,rawBytes:null,upcEanExtension:null,parsedDocument:null}))];o({type:"setCount",barcodes:e,computeNewCount:()=>0})}}var t}),[]),Object(I.useEffect)((()=>{b.current.container=e.current}),[e]),Object(I.useEffect)((()=>{if(m)for(const t of r){const e=g.arOverlay,n=t.polygonElement,r=t.labelElement;if(x(t.barcode)){const o=B(t.barcode);let i=t.count+"/"+o.expectedCount;g.arOverlay.automaticSelectionEnabled||0!==t.count||(i=I.default.createElement(Wh,null)),o.isFulFilled()?(null==n||n.style(gt.b.getPolygonColorValues(e.polygon.completed,e.polygon.visible)),null==r||r.styleBadge(e.badge.completed,I.default.createElement(zh,null))):(null==n||n.style(gt.b.getPolygonColorValues(e.polygon.partiallyScanned,e.polygon.visible)),null==r||r.styleBadge(e.badge.partiallyScanned,i))}else null==n||n.style(gt.b.getPolygonColorValues(e.polygon.rejected,e.polygon.visible)),null==r||r.styleBadge(e.badge.rejected,I.default.createElement(Nh,null))}else for(const t of r){if(t.polygonElement){const e=g.arOverlay.polygon,n=t.count>0?e.selected:e.deselected;t.polygonElement.style(gt.b.getPolygonColorValues(n,e.visible))}t.labelElement&&(t.labelElement.update(Object.assign(Object.assign({},t.labelElement.state.element),{highlighted:t.count>0})),t.labelElement.setCount(t.count))}}),[r]);const y=r.reduce(((t,e)=>t+e.count),0),A=()=>C().every((t=>r.some((e=>e.barcode.text===t.barcodeValue&&e.count===t.count)))),C=()=>m?g.expectedBarcodes:[],S=t=>Wf(C(),t),x=t=>!!S(t),w=()=>m?r.filter((t=>x(t.barcode))):r.filter((t=>t.count>0)),O=()=>$f(this,void 0,void 0,(function*(){const e=w().map((t=>new W.BarcodeScannerUIItem({count:"COUNTING"===v?t.count:1,barcode:t.barcode})));t.onSubmit({items:e})})),E=I.default.createElement(Of,{expectedBarcodes:C(),barcodes:w(),animateBackAfterDelete:m,onBarcodeChange:o,sheetContent:g.sheetContent,onNumberClick:t=>a(t),mode:v,indicatorColor:m&&{partial:g.scanningPartiallyColor,complete:g.scanningCompletedColor,notScanned:g.scanningNotScannedColor}}),L={textReplacementArgs:[y.toString()],leftButton:Object.assign(Object.assign({},g.sheetContent.clearAllButton),{onClick:()=>o({type:"clear"})}),rightButton:Object.assign(Object.assign({},g.sheetContent.submitButton),{onClick:()=>$f(this,void 0,void 0,(function*(){if(m){const t=g;let e=null;t.partialScannedAlertDialogEnabled&&!A()&&(e=t.partialScannedAlertDialog),t.confirmationAlertDialogEnabled&&A()&&(e=t.confirmationAlertDialog),e?f(e):yield O()}else yield O()}))}),title:g.sheetContent.title},j=Sf("mobile"),_="BUTTON"!==g.sheet.mode&&j?"SMALL"===g.sheet.collapsedVisibleHeight?69:128:0,T=j&&"BUTTON"===g.sheet.mode,P=T?76:0,R=(u?80:0)+P,D=Object(I.useContext)(Ne),B=t=>{const e=r.find((e=>e.barcode.text===t.text)),n=S(t);return new zf(null==n?void 0:n.count,null==e?void 0:e.count)},F=C().reduce(((t,e)=>t+e.count),0);m&&L.textReplacementArgs.push(F.toString());const M=m?new Uf(g.sheetContent.barcodeItemSubtitle.text,r,C()):h,z=!m&&0===y;return I.default.createElement(I.default.Fragment,null,I.default.createElement(Lh.Provider,{value:M},I.default.createElement(Kn,{container:!0,sx:{display:"flex",flexDirection:j?"column":"row",height:`calc(${D.remainingVisibleBodyHeight} - ${_}px)`},alignItems:"stretch"},I.default.createElement(Kn,{id:c,item:!0,ref:e,component:"div",xs:j?12:7,zIndex:100},T&&I.default.createElement(If,{style:{position:"absolute",marginTop:`calc(${D.remainingVisibleBodyHeight} - 60px - 8px)`,width:"100%",display:"flex",justifyContent:"center",zIndex:1100},text:m?`${y}/${F}`:y.toString(),onClick:()=>l(!s),buttonStyling:g.sheet.listButton}),I.default.createElement(Bh,{viewFinderPadding:{minTopPadding:D.minTopPaddingForContent,minBottomPadding:R},arOverlay:(()=>{if(m){const t=g.arOverlay;return Object.assign(Object.assign({},t),{counterBadge:Object.assign({},t.badge.partiallyScanned)})}const t=g.arOverlay,e=t.counterBadge;return Object.assign(Object.assign({},t),{counterBadge:Object.assign(Object.assign({},e),{visible:e.visible&&"COUNTING"===v})})})(),containerId:c,barcodeScannerViewConfig:b.current,onCameraPermissionDenied:t.onCameraPermissionDenied,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:16+P,setActionButtonsVisible:d,arOnBarcodeClick:t=>{o({type:"onARCodeClick",barcode:t})},arOnBarcodeEnter:(t,e,n)=>{if(!n||!e)return;o({type:"setHtmlElements",barcode:t,labelElement:n,polygonElement:e})},scanningPaused:s&&j,cameraConfiguration:t.configuration.cameraConfiguration,onLicenseError:t.onError}),j&&I.default.createElement(Mp,{closedSheetVisibleHeight:_,sheetStyle:g.sheet,contentStyle:g.sheetContent,manualCountEditDialog:g.manualCountEditDialog,isPlaceholderVisible:z,onBarcodeChange:t=>o(t),drawerHeaderContentProps:L,isOpen:s,onSwipe:t=>{l("swipe-to-open"===t)}},E)),function(t){switch(t){case"mobile":return bf("(min-width:"+yf+"px)");case"tablet":return bf("(min-width:"+Af+"px)");case"desktop":return bf("(min-width:"+Cf+"px)")}}("tablet")&&I.default.createElement(Hf,{headerProps:L,sheetContent:g.sheetContent,isEmptyStateVisible:z,barcodeList:E})),I.default.createElement(Hp,{barcode:i,dialogStyling:g.manualCountEditDialog,onCancel:()=>a(null),setCounter:(t,e)=>{o({type:"onCountEditDialogChange",barcode:t,count:e}),a(null)}}),I.default.createElement(Vf,{open:null!==p,style:p,onDismiss:()=>f(null),onSubmit:O})))}const Yf=Object(I.createContext)(null),Qf={didCatch:!1,error:null};class Zf extends I.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Qf}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(null!==t){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];null===(e=(n=this.props).onReset)||void 0===e||e.call(n,{args:o,reason:"imperative-api"}),this.setState(Qf)}}componentDidCatch(t,e){var n,r;null===(n=(r=this.props).onError)||void 0===n||n.call(r,t,e)}componentDidUpdate(t,e){const{didCatch:n}=this.state,{resetKeys:r}=this.props;var o,i;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,r)&&(null===(o=(i=this.props).onReset)||void 0===o||o.call(i,{next:r,prev:t.resetKeys,reason:"keys"}),this.setState(Qf))}render(){const{children:t,fallbackRender:e,FallbackComponent:n,fallback:r}=this.props,{didCatch:o,error:i}=this.state;let a=t;if(o){const t={error:i,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof e)a=e(t);else if(n)a=Object(I.createElement)(n,t);else{if(null!==r&&!Object(I.isValidElement)(r))throw i;a=r}}return Object(I.createElement)(Yf.Provider,{value:{didCatch:o,error:i,resetErrorBoundary:this.resetErrorBoundary}},a)}}function Xf(t){const e=Object(I.useRef)(!0);Object(I.useEffect)((()=>(e.current=!0,()=>{e.current=!1})));const[,n]=Object(I.useReducer)((t=>t+1),0),r=Object(I.useRef)();return Object(I.useMemo)((()=>{r.current={loading:!0,value:void 0,error:null}}),[t]),function(t,e){Object(I.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=>{r.current=t,e.current&&n()})),t?r.current:null}var qf=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class Kf{constructor(t,e){this.barcodeItemMapper=t,this.onError=e,this.cache=new Map,this.cacheEntryPendingRetries=[],this.hash=t=>Ro(t),this.onEvictionListeners=new Set}getBarcodeMappedData(t){const e=this.hash(t);if(!this.cache.has(e)){const n=(()=>qf(this,void 0,void 0,(function*(){if(this.barcodeItemMapper){const e=new W.BarcodeScannerUIItem({count:1,barcode:t});return this.barcodeItemMapper(e)}{const e=yield y.toDataUrl(yield hg.instance.imageToJpeg(t.sourceImage));return{title:t.text,subtitle:t.format,barcodeImage:e}}})))();this.cache.set(e,n)}return this.cache.get(e)}useBarcodeMappedData(t){const e=Object(I.useRef)(!1),n=Xf(t&&this.getBarcodeMappedData(t));if(Object(I.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 r;return r=n.value?"LOADED":n.error&&!e.current?"RETRY_DIALOG_OPEN":n.error?"FAILED":"LOADING",{value:n.value,state:r}}addOnEvictionListener(t){this.onEvictionListeners.add(t)}removeOnEvictionListener(t){this.onEvictionListeners.delete(t)}}W.BarcodeItemErrorState;function Jf(t){return I.default.createElement(Nf,{open:t.open,dividerColor:t.dividerColor,modalOverlayColor:t.modalOverlayColor,sheetColor:t.sheetColor,title:t.title,subtitle:t.subtitle,cancelButton:{style:t.cancelButton,onClick:t.handleCancel},okButton:{style:t.retryButton,icon:Up,onClick:t.handleRetry}})}var tm=n(106),em=n.n(tm);function nm(t){const e=Object(I.useContext)(Ne);return I.default.createElement(mt,{sx:{paddingTop:e.minTopPaddingForContent+"px",overflowY:"scroll",backgroundColor:gt.b.getColorValue(t.config.background)}},I.default.createElement(mt,{sx:{height:e.remainingVisibleBodyHeight,marginLeft:"auto",marginRight:"auto",maxWidth:280,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},t.config.icon.visible&&I.default.createElement(mt,null,I.default.createElement(Rp,{sx:{width:100,height:100,backgroundColor:gt.b.getColorValue(t.config.iconBackground),margin:"24px"}},I.default.createElement(em.a,{sx:{fontSize:50,color:gt.b.getColorValue(t.config.icon.color)}}))),I.default.createElement(Vt,{sx:{fontSize:20,textAlign:"center"}},I.default.createElement(Qt.a,{config:t.config.enableCameraTitle})),I.default.createElement(Vt,{sx:{fontSize:16,textAlign:"center",paddingTop:"12px"}},I.default.createElement(Qt.a,{config:t.config.enableCameraExplanation})),I.default.createElement(mt,{sx:{paddingTop:"16px"}},I.default.createElement(ze,Object.assign({},t.config.closeButton,{onClick:t.onAppClose})))))}function rm(t){const e=Object(I.useRef)(Object(dt.a)({palette:{primary:{main:Io.ScanbotPrimary},secondary:{main:Io.DarkGray}}})),[n,r]=Object(I.useState)(!1),[o,i]=Object(I.useState)(!1),[a,s]=Object(I.useState)(t.configuration.timeouts.initialScanDelay<=0),l=Object(I.useRef)(!1),c=Object(I.useRef)(),u=Object(I.useRef)(),d=t.configuration.useCase,h="FindAndPickScanningMode"===d._type?null:d.barcodeInfoMapping,p=Object(I.useMemo)((()=>new Kf(null==h?void 0:h.barcodeItemMapper,((t,e)=>{r(!0),c.current=()=>{r(!1),t()},u.current=()=>{r(!1),e()}}))),[]);let f;if(Object(I.useMemo)((()=>{gt.b.setPalette(t.configuration.palette),gt.b.setBarcodeTextLocalization(t.configuration.localization)}),[t.configuration]),Object(I.useEffect)((()=>{if(t.configuration.timeouts.autoCancelTimeout>0){const e=setTimeout((()=>{t.onClose()}),t.configuration.timeouts.autoCancelTimeout);return()=>{clearTimeout(e)}}}),[]),Object(I.useEffect)((()=>{if(t.configuration.timeouts.initialScanDelay>0){const e=setTimeout((()=>{s(!0)}),t.configuration.timeouts.initialScanDelay);return()=>{clearTimeout(e)}}}),[]),Object(I.useEffect)((()=>{l.current=!n&&a}),[n,a]),"SingleScanningMode"===d._type)f=I.default.createElement(Mh,{configuration:t.configuration,barcodeMapper:p,onClose:t.onClose,onSubmit:t.onSubmit,onError:t.onError,onCameraPermissionDenied:()=>i(!0),scanningEnabled:l});else{if("MultipleScanningMode"!==d._type&&"FindAndPickScanningMode"!==d._type)throw new Error("Unsupported use case type");f=I.default.createElement(Gf,{configuration:t.configuration,barcodeMapper:p,onSubmit:t.onSubmit,onError:t.onError,onCameraPermissionDenied:()=>i(!0),scanningEnabled:l})}return I.default.createElement(I.default.Fragment,null,I.default.createElement(Gt,null),I.default.createElement(Zf,{onError:t.onError,fallback:I.default.createElement("div",null,"Error")},I.default.createElement(gt.a.Provider,{value:Object(gt.c)(t.configuration.palette)},I.default.createElement(tt,{theme:e.current},h&&I.default.createElement(Jf,Object.assign({open:n,handleCancel:u.current,handleRetry:c.current,modalOverlayColor:h.modalOverlayColor,dividerColor:h.dividerColor,sheetColor:h.sheetColor},h.errorState)),I.default.createElement(mt,{sx:{height:`100 * ${$t}`,width:"100vw",backgroundColor:gt.b.getColorValue(t.configuration.backgroundColor)}},I.default.createElement(Ve,Object.assign({onBackPress:t.onClose},t.configuration.topBar),!o&&f,o&&I.default.createElement(nm,{onAppClose:t.onClose,config:t.configuration.cameraPermission})))))))}var om=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class im{static createBarcodeScanner(t){return new Promise(((e,n)=>{Oo.INSTANCE.initialize(t.sound);const r=im.createContainer("barcode-scanner-controller"),o=Object(M.createRoot)(r),i=()=>om(this,void 0,void 0,(function*(){return new Promise((t=>{window.setTimeout((()=>{o.unmount(),document.body.removeChild(r),t()}),0)}))})),a=t=>om(this,void 0,void 0,(function*(){yield i(),n(t)}));o.render(I.default.createElement(rm,{configuration:t,onClose:()=>om(this,void 0,void 0,(function*(){yield i(),e(null)})),onSubmit:t=>om(this,void 0,void 0,(function*(){yield i(),e(t)})),onError:a})),(()=>{om(this,void 0,void 0,(function*(){try{const t=yield hg.instance.getLicenseInfo();t.isValid()||(yield a(new P(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}}im.Config=W;var am=im,sm=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class lm{constructor(t,e){this._sdk=t,this._recognizer=e}recognize(t,e,n="COPY_IMAGE"){return sm(this,void 0,void 0,(function*(){const r=this._sdk.getBridge(n);return yield r.genericDocumentRecognizerRecognize(this._recognizer,t,new k.GenericDocumentRecognizerTypes.RecognitionParameters(e))}))}release(){return sm(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._recognizer)}))}}const cm={OK:"Capturing your document... Please do not move the camera.",OK_SMALL_SIZE:"The document is too small. Try moving closer.",OK_BAD_ANGLES:"This is a bad camera angle. Hold the device straight over the document.",OK_BAD_ASPECT_RATIO:"Rotate the device sideways, so that the document fits better into the screen.",OK_OFF_CENTER:"Try holding the device at the center of the document.",OK_TOO_DARK:"A document was detected, but it is too dark. Try turning on a light.",ERROR_NOTHING_DETECTED:"Please hold the device over a document to start scanning.",ERROR_TOO_DARK:"It is too dark. Try turning on a light.",ERROR_NOISE:"Please move the document to a clear surface.",NOT_ACQUIRED:"Scanning failed."};class um{constructor(t){this.hint=t}}class dm{constructor(){this.outline=new hm,this.captureButton=new gm}}class hm{constructor(){this.polygon=new pm,this.path=new fm,this.label=new mm}}class pm{constructor(){this.strokeCapturing="green",this.strokeSearching="yellow",this.fillCapturing="transparent",this.fillSearching="transparent"}}class fm{constructor(){this.stroke="green",this.strokeWidth=4}}class mm{}class gm{constructor(){this.color="#FFF"}}class vm extends L.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_4K),this.detectionParameters=new k.DocumentDetectorTypes.DocumentDetectorParameters,this.autoCaptureEnabled=!0,this.autoCaptureSensitivity=.66,this.autoCaptureDelay=1e3,this.ignoreBadAspectRatio=!0,this.useImageCaptureAPI=!1,this.text=new um(cm),this.style=new dm,this.onDocumentDetected=function(t){}}static fromJson(t){var e;const n=new vm;if(this.mapValues(t,n,["text","style","videoConstraints","detectionParameters"]),n.detectionParameters=new k.DocumentDetectorTypes.DocumentDetectorParameters(null!==(e=t.detectionParameters)&&void 0!==e?e:{}),t.text&&t.text.hint&&this.mapValues(t.text.hint,n.text.hint),t.style){this.mapValues(t.style,n.style,["outline","captureButton"]);const e=t.style.outline;if(e){this.mapValues(e,n.style.outline,["polygon","path","label"]);const t=e.polygon;t&&this.mapValues(t,n.style.outline.polygon);const r=e.path;r&&this.mapValues(r,n.style.outline.path);const o=e.label;o&&this.mapValues(o,n.style.outline.label)}const r=t.style.captureButton;r&&this.mapValues(r,n.style.captureButton)}return this.mapVideoConstraints(t,n),n}}var bm=n(85),ym={insert:"head",singleton:!1};Zd()(bm.a,ym),bm.a.locals;class Am extends I.default.Component{constructor(){super(...arguments),this.LINE_COUNT=4}render(){return I.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],r=this.props.points[(e+1)%this.LINE_COUNT];t.push(I.default.createElement("line",{key:e,style:this.props.polygonStyle,className:this.props.polygonClasses,x1:n.x,y1:n.y,x2:r.x,y2:r.y}))}return t}setFrame(){window.requestAnimationFrame((()=>this.forceUpdate()))}}Am.CLASSNAME="scanbot-document-outline";class Cm extends I.default.Component{constructor(t){super(t),this.state={points:[],animatedPoints:[],isOk:!1,isVisible:!1}}update(t,e,n,r){const o={points:t,animatedPoints:e,isOk:n,isVisible:r};this.setState(o)}pointStringOrLatestValidPoints(t){return t&&t.length>0?Fd.a.toSvgString(t):Fd.a.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=Jd()(Am.CLASSNAME,{[`${Am.CLASSNAME}-ok`]:this.state.isOk},{[`${Am.CLASSNAME}-visible`]:this.state.isVisible},{[`${Am.CLASSNAME}-hidden`]:!this.state.isVisible});return I.default.createElement(Dd.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 Sm=Cm;class xm extends I.default.Component{constructor(t){super(t),this.state={path:void 0}}render(){var t,e;return this.state.path?I.default.createElement(Dd.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:`${Am.CLASSNAME}-path`}):null}animate(t){const e="M"+Fd.a.toSvgString(t)+"z";this.setState({path:e})}clear(){this.setState({path:void 0})}}class wm extends I.default.Component{render(){return I.default.createElement(Dd.svg,{style:{width:"100%",height:"100%",position:"absolute",overflow:"visible"}},I.default.createElement(Sm,{ref:t=>this.polygon=t,style:this.props.polygonStyle}),I.default.createElement(xm,{ref:t=>this.path=t,style:this.props.pathStyle,duration:this.props.autoCaptureSensitivity}))}update(t,e,n){var r;const o="processing"!==n&&!!t,i=null!==(r=this.previous)&&void 0!==r?r:t,a=this.previous?t:void 0;this.polygon.update(i,a,e,o),this.previous=t,this.previous&&"capturing"===n?this.animateCapturing():this.clearAnimation()}animateCapturing(){this.path.animate(this.previous)}clearAnimation(){this.path.clear()}}class Om extends I.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,r="searching"===this.props.action||"capturing"===this.props.action,o="processing"!==this.props.action&&n,i=Jd()({[this.hintLabelClassName]:!0,[`${this.hintLabelClassName}-visible`]:o,[`${this.hintLabelClassName}-hidden`]:!o});return I.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",left:0,top:0}},I.default.createElement(wm,{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:o,autoCaptureSensitivity:this.props.autoCaptureSensitivity}),r&&I.default.createElement("label",{ref:t=>this.label=t,style:this.props.style.label,className:i,dangerouslySetInnerHTML:{__html:e}}))}update(t,e,n){this.polygon.update(e,t,this.props.action),this.label&&(this.label.innerHTML=n)}}class Em{static isConvex(t){if(t.length<4)return!0;let e=!1,n=t.length;for(let r=0;r<n;r++){const o=t[(r+2)%n].x-t[(r+1)%n].x,i=t[(r+2)%n].y-t[(r+1)%n].y,a=t[r].x-t[(r+1)%n].x,s=o*(t[r].y-t[(r+1)%n].y)-i*a;if(0==r)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],r=Fd.a.subtract(t[1],n),o=e[0],i=Fd.a.subtract(e[1],o);if(0===Fd.a.cross(r,i))return;const a=Fd.a.cross(Fd.a.subtract(o,n),r)/Fd.a.cross(r,i);return Fd.a.add(o,Fd.a.multiply(i,a))}}class Lm{constructor(t,e=Lm.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 Em.distanceBetweenPoints(t,e)/this.maxDistance>this.sensitivity}calculateMaxDistance(t){let e=new Fd.a(0,0),n=new Fd.a(t.width,t.height);return Em.distanceBetweenPoints(e,n)}}Lm.DEFAULT_SENSITIVITY=.5;var jm=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};jo.b;jo.a;class km extends jo.c{constructor(t){if(super(t),this.preventAutoCapture=!1,this.defaultCaptureButtonClick=()=>jm(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(!hg.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=vm.fromJson(this.props.configuration)),this._configuration}get autoCaptureSensitivity(){return 3e3*(1-this.configuration.autoCaptureSensitivity)}static create(t){return jm(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,r)=>{Object(I.render)(I.default.createElement(km,{container:e,configuration:t,onSuccess:n,onFailure:r}),e)}))}))}detectAndCrop(){var t,e,n;return jm(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(km.DETECT_AND_CROP_RESOLUTION,this.configuration.useImageCaptureAPI);if(!e)return;return F.a.debug("Detect & Crop document of size: "+e.height*e.width),yield this.bridge.transferArgs.detectAndCropDocument(e)}}catch(t){null===(n=(e=this.configuration).onError)||void 0===n||n.call(e,t)}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 jm(this,void 0,void 0,(function*(){t.componentDidMount.call(this),this.detect(),this.recognizer=this.bridge.copyArgs.createDocumentDetector(new k.DocumentDetectorTypes.DocumentDetectorParameters(this.configuration.detectionParameters)),this.recognizer.catch((t=>{var e,n;return null===(n=(e=this.configuration).onError)||void 0===n?void 0:n.call(e,t)}))}))}componentWillUnmount(){const t=Object.create(null,{componentWillUnmount:{get:()=>super.componentWillUnmount}});return jm(this,void 0,void 0,(function*(){t.componentWillUnmount.call(this),this.handleAutoCapture(!1),yield hg.instance.release(yield this.recognizer,"Document Scanner")}))}detect(){var t,e;return jm(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;this.camera.reusableImageBuffer=t.originalImage.data;const e=this.getStatusString(t),n="OK"===e,r=e.startsWith("OK")?this.scalePolygonPointsToPixels(t.pointsNormalized):void 0;this.outline.update(n,r,v.getProperty(this.configuration.text.hint,e)),yield this.handleAutoCapture(n,r)}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_BAD_ASPECT_RATIO"===t.status?"OK":t.status}detectInWebWorker(){var t,e,n;return jm(this,void 0,void 0,(function*(){try{const e=yield null===(t=this.camera)||void 0===t?void 0:t.createImageData(jo.c.DEFAULT_DETECTION_RESOLUTION,!1);return e&&this.enabled?yield this.bridge.transferArgs.documentDetectorDetect(yield this.recognizer,e):null}catch(t){return null===(n=(e=this.configuration).onError)||void 0===n||n.call(e,t),null}}))}handleAutoCapture(t,e){return jm(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 Lm(t)}if(this.runMovementPredicate(e))return this.updateButton("searching"),clearTimeout(this.autoCaptureToken),void(this.autoCaptureToken=void 0);this.autoCaptureToken=setTimeout((()=>jm(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(null==t?void 0:t.pointsNormalized){const e=this.scalePolygonPointsToPixels(t.pointsNormalized);if(this.runMovementPredicate(e))return}(null==t?void 0:t.status.startsWith("OK"))&&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:r}=this.state,{configuration:o}=this,i=null===(t=o.style)||void 0===t?void 0:t.captureButton;return I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),I.default.createElement(ko.a,{configuration:this.configuration,videoConstraints:o.videoConstraints,mirrored:o.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}}),I.default.createElement(Om,{ref:t=>{this.outline=t},style:null===(n=o.style)||void 0===n?void 0:n.outline,action:r,autoCaptureSensitivity:this.autoCaptureSensitivity}),I.default.createElement(eh,{color:(null==i?void 0:i.color)?i.color:"FFF",action:r,onClick:this.enabled?o.onCaptureButtonClick||this.defaultCaptureButtonClick:()=>{}}))}scalePolygonPointsToPixels(t){if(t){const e=this.getCameraFrameSize(),n=ah.a.fromHtmlElement(this.camera.video),r=bh.findScale(n,e);t=(t=bh.convertToViewportPointsFromParentSize(e,t)).map((t=>Fd.a.scaleToPoint(t,r.x,r.y,r.scale)))}return t}runMovementPredicate(t){const e=this.polygonMovementPredicate.check(t);return this.polygonMovementPredicate.update(t),e}getCameraFrameSize(){return this.camera.calculateFrameSize(jo.c.DEFAULT_DETECTION_RESOLUTION,this.camera.videoSize().width,this.camera.videoSize().height)}}km.DETECT_AND_CROP_RESOLUTION=0;var _m=km;class Tm extends j.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_HD),this.recognizerConfiguration=new k.MRZTypes.RecognizerConfiguration,this.onMrzDetected=function(t){},this.finder.aspectRatio=new k.Geometry.AspectRatio({width:4,height:1}),this.userGuidance.title.text="Please hold the device over the MRZ code to start scanning"}static fromJson(t){const e=new Tm;return this.mapValues(t,e,["style","videoConstraints","finder","userGuidance"]),this.mapFinderConfiguration(e,t),this.mapVideoConstraints(t,e),e}}var Pm=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};jo.a;jo.b;class Rm extends jo.c{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=Tm.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t,e){return Pm(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(((r,o)=>{Object(I.render)(I.default.createElement(Rm,{container:n,configuration:t,onSuccess:r,onFailure:o,mrzRecognizer:e}),n)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return Pm(this,void 0,void 0,(function*(){vh.warn("Mrz detection resumed"),yield this.resume()}))}pauseDetection(){vh.warn("Mrz detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return Pm(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 Pm(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return Pm(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n,r,o;return Pm(this,void 0,void 0,(function*(){const i=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let a=!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(Rm.FRAME_RESOLUTION);if(!r)return;i&&this.forceUpdate();const o=yield this.props.mrzRecognizer.recognize(r,"CONSUME_IMAGE");if(!this.enabled)return;if(null===o)return;this.camera.reusableImageBuffer=null==o?void 0:o.originalImage.data,o.recognitionSuccessful?(delete o.originalImage,a=!0,this.configuration.onMrzDetected(o)):this.configuration._onDetectionFailed&&(null===(n=this.configuration)||void 0===n||n._onDetectionFailed(o.originalImage))}catch(t){null===(o=(r=this.configuration).onError)||void 0===o||o.call(r,t)}finally{a?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 I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),I.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},I.default.createElement(ko.a,{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&&I.default.createElement(_o.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}Rm.FRAME_RESOLUTION=1200;var Dm=Rm,Bm=n(71);class Fm{constructor(){this.disabled=!1,this.color="transparent"}}class Im{constructor(){this.color="white",this.border="1px solid lightgray",this.size=20}}class Mm{constructor(){this.color="#1ec31e",this.width=4}}class Wm{constructor(){this.padding=10}}class zm{constructor(){this.margin=15,this.size=100,this.zoom=1.5}}class Nm{constructor(){this.width=2,this.color="white"}}class Vm{constructor(){this.size=20,this.color="white"}}class Um extends Bm.a{constructor(){super(),this.disableScroll=!0,this.rotations=0,this.style=new Wm,this.style.magneticLines=new Fm,this.style.polygon=new Mm,this.style.polygon.handles=new Im,this.style.magnifier=new zm,this.style.magnifier.border=new Nm,this.style.magnifier.crosshair=new Vm}static fromJson(t){const e=new Um;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 Hm extends I.default.Component{constructor(){super(...arguments),this.BUFFER=4}fromPoint(t){return I.default.createElement("svg",{style:{width:"100%",height:"100%",position:"absolute"}},I.default.createElement("line",{x1:t.start.x.toString(),y1:t.start.y.toString(),x2:t.end.x.toString(),y2:t.end.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,r,o,i;return I.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===(i=null===(o=null===(r=this.props.lines)||void 0===r?void 0:r.vertical)||void 0===o?void 0:o.scaled)||void 0===i?void 0:i.map((t=>this.fromPoint(t))))}snapToClosestIfAnyAreClose(){var t,e,n,r;const o=this.props.movingLine;let i=null===(e=null===(t=this.props.lines)||void 0===t?void 0:t.vertical)||void 0===e?void 0:e.scaled;if(o.isHorizontal&&(i=null===(r=null===(n=this.props.lines)||void 0===n?void 0:n.horizontal)||void 0===r?void 0:r.scaled),!i)return;const a=this.midPoint(o.points[0].coordinates,o.points[1].coordinates),s=i.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:o})}distanceToLine(t,e){const n=e.x-t.start.x,r=e.y-t.start.y,o=t.end.x-t.start.x,i=t.end.y-t.start.y,a=o*o+i*i;if(0===a)return 1/0;const s=(n*o+r*i)/a;let l;return l=s<=0?t.start:s>=1?t.end:new Fd.a(t.start.x+s*o,t.start.y+s*i),Fd.a.distance(e,l)}midPoint(t,e){return new Fd.a((t.x+e.x)/2,(t.y+e.y)/2)}}class $m extends I.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 Gm extends $m{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],r=I.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},I.default.createElement("div",{style:Object.assign({},this.invisibleHandleStyle)}));t.push(r)}return t}cornerTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=Fd.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),r=this.items[e],o=Fd.a.fromHtmlElement(r);this.parentOffset=new Fd.a(n.x-o.x,n.y-o.y),this.props.cornerMoveStart({index:e,point:this.props.points[e]})}cornerTouchMove(t,e){if(!this.parentOffset)return;const n=Fd.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),{x:r,y:o}=Object(Ip.b)({x:n.x-this.parentOffset.x,y:n.y-this.parentOffset.y},this.pointSize,this.props.containerSize),i=this.pointSize/2,a=this.props.points[e];this.props.points[e]=new Fd.a(r+i,o+i),Em.isConvex(this.props.points)?this.props.cornerMoved({index:e,point:this.props.points[e]}):this.props.points[e]=a}cornerTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null,this.props.cornerMoveEnd()}render(){return I.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 Ym extends $m{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 r=this.props.points[this.nextIndex(e)];const o=I.default.createElement("div",{style:Object.assign(Object.assign({},this.pointStyle),{left:n.x+(r.x-n.x)/2-this.pointSize/2+"px",top:n.y+(r.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},I.default.createElement("div",{style:this.invisibleHandleStyle}));t.push(o)}return t}lineTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=Fd.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),r=this.items[e],o=Fd.a.fromHtmlElement(r),i=this.props.points[e],a=this.props.points[this.nextIndex(e)];this.point0Start=v.copy(this.props.points[this.previousIndex(e)]),this.point1Start=v.copy(i),this.point2Start=v.copy(a),this.point3Start=v.copy(this.props.points[this.nextIndex(this.nextIndex(e))]),this.point1Offset=new Fd.a(i.x-o.x,i.y-o.y),this.point2Offset=new Fd.a(a.x-o.x,a.y-o.y),this.parentOffset=new Fd.a(n.x-o.x,n.y-o.y)}lineTouchMove(t,e){if(!this.parentOffset)return;const n=Fd.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),r=this.props.points[this.previousIndex(e)];let o=new Fd.a(null,null),i=new Fd.a(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;o.x=this.point1Start.x+(this.point1Start.x-this.point0Start.x)*(n/(this.point1Start.y-this.point0Start.y)),i.x=this.point2Start.x+(this.point2Start.x-this.point3Start.x)*(n/(this.point2Start.y-this.point3Start.y)),o.y=t,i.y=e}else{const t=s+this.point1Offset.x,e=s+this.point2Offset.x,n=t-this.point1Start.x;o.y=this.point1Start.y+(this.point1Start.y-this.point0Start.y)*(n/(this.point1Start.x-this.point0Start.x)),i.y=this.point2Start.y+(this.point2Start.y-this.point3Start.y)*(n/(this.point2Start.x-this.point3Start.x)),o.x=t,i.x=e}o=Fd.a.clamp(o,this.props.containerSize),i=Fd.a.clamp(i,this.props.containerSize),this.isNearOpposingPoint(this.point1Start,o,r,this.isHorizontal(e)?"y":"x")||this.isNearOpposingPoint(this.point1Start,i,a,this.isHorizontal(e)?"y":"x")||this.areEdgesCrossing(r,o,i,a)||Em.isConvex([r,o,i,a])&&(this.props.points[e].x=o.x,this.props.points[e].y=o.y,this.props.points[this.nextIndex(e)].x=i.x,this.props.points[this.nextIndex(e)].y=i.y,this.props.lineMoved({points:[{index:e,coordinates:o},{index:this.nextIndex(e),coordinates:i}],previousPoint:r,nextPoint:a,isHorizontal:this.isHorizontal(e)}))}lineTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null}isNearOpposingPoint(t,e,n,r){if(t[r]>n[r]){if(e[r]-10<n[r])return!0}else if(e[r]>n[r]-10)return!0;return!1}areEdgesCrossing(t,e,n,r){const o=t.x,i=t.y,a=e.x,s=e.y,l=n.x,c=n.y,u=r.x,d=r.y;return((o-l)*(s-c)-(i-c)*(a-l))*((o-u)*(s-d)-(i-d)*(a-u))<0&&((l-o)*(d-i)-(c-i)*(u-o))*((l-a)*(d-s)-(c-s)*(u-a))<0}render(){return I.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},this.create())}}class Qm extends I.default.Component{render(){return I.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},I.default.createElement(Gm,{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}),I.default.createElement(Ym,{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],r=[t.magneticLine.start,t.magneticLine.end];this.props.coordinatePoints[t.polygonLine.points[0].index]=Em.intersection(e,r),this.props.coordinatePoints[t.polygonLine.points[1].index]=Em.intersection(n,r),this.props.cornerMoveEnd(),this.setFrame()}}class Zm extends I.default.Component{constructor(t){super(t),this.state={movingLine:void 0}}render(){return I.default.createElement("div",null,I.default.createElement(Qm,{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})}}),I.default.createElement(Hm,{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()}}),I.default.createElement(Am,{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 Xm extends I.default.Component{render(){return I.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 qm extends I.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:r,duration:o}=this.props,i=90*(n-1),a=90*n;this.previousScale||(this.previousScale=1);const s=Y.d`
184
+ `;return I.default.createElement("div",{style:{top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100}},I.default.createElement(t,{width:"101",height:"100",viewBox:"0 0 101 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I.default.createElement("circle",{cx:"50.5",cy:"50",r:"50",fill:"#3E3E3E","fill-opacity":"0.35"}),I.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"}),I.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"}),I.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 ch extends I.default.Component{render(){return this.props.text?I.default.createElement("div",{style:{position:"absolute",top:this.props.top,bottom:this.props.bottom,display:"flex",width:"100%",justifyContent:"center"}},I.default.createElement("div",{style:{padding:"5px 10px",borderRadius:5,backgroundColor:Io.TransparentGray,color:Io.White,fontWeight:500,fontSize:13}},this.props.text)):null}}class uh extends I.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,r,o;const i=this.state.element,a=this.props.configuration.style,s=this.formatText(i.code,this.props.configuration.textFormat),l=Fd.a.width(null!==(t=this.props.animateToPoints)&&void 0!==t?t:i.points);if(!s)return null;if(!i.points)return null;const c=null!==(n=null===(e=this.customStyle)||void 0===e?void 0:e.backgroundColor)&&void 0!==n?n:i.highlighted?a.highlightedTextBackgroundColor:a.textBackgroundColor,u=null!==(o=null===(r=this.customStyle)||void 0===r?void 0:r.textColor)&&void 0!==o?o:i.highlighted?a.highlightedTextColor:a.textColor;return I.default.createElement(Dd.div,{ref:t=>this.label=t,onClick:()=>{this.props.onClick&&this.props.onClick(i)},style:{x:Fd.a.lowestX(i.points),y:Fd.a.highestY(i.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:Fd.a.lowestX(this.props.animateToPoints),y:Fd.a.highestY(this.props.animateToPoints)+30}:{}},s)}}class dh{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 hh{constructor(){this.visible=!1,this.textFormat="Text",this.automaticSelectionEnabled=!1,this.style=new dh}}class ph{constructor(){this.topLabelTop=20,this.sheetHeight="95%",this.sheetTopMargin="10%"}}class fh{constructor(){this.enabled=!1,this.style=new ph}}class mh extends j.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_HD),this.captureDelay=1e3,this.overlay=new hh,this.detectionParameters=new k.BarcodeScannerTypes.BarcodeScannerConfiguration,this.scanAndCount=new fh,this.onBarcodesDetected=function(t){}}static fromJson(t){const e=new mh;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 gh{constructor(t){this.coreResult=t,this.barcodes=[],this.originalImageSize=null,this.barcodes=t.barcodes,t.originalImage&&(this.originalImageSize=new ah.a(t.originalImage.width,t.originalImage.height))}isEmpty(){return 0===this.barcodes.length}}class vh{static warn(t){console.warn("[ScanbotSDK]",t)}}class bh{static convertLinesToViewportLines(t,e){if(e&&t)return e.map((e=>({start:new Fd.a(e.start.x*t.width,e.start.y*t.height),end:new Fd.a(e.end.x*t.width,e.end.y*t.height)})))}static convertToViewportPointsFromParentSize(t,e){return e?ah.a.isEmpty(t)?void 0:e.map((e=>Fd.a.scaleUpTo(e,t))):ah.a.toPolygon(t)}static calculateScale(t){let e,n=0,r=0;return 1>t.width/t.height?(e=t.height/1,n=(1-t.width/e)/2):(e=t.width/1,r=(1-t.height/e)/2),{x:n,y:r,containerScale:e}}static findScale(t,e){let n,r=0,o=0;return e.ratio(!0)>t.ratio(!0)?(n=t.width/e.width,o=(e.height-t.height/n)/2):(n=t.height/e.height,r=(e.width-t.width/n)/2),{x:r,y:o,scale:n}}static preventDefaultCallback(t){t.preventDefault()}static disableScreenMovement(){document.addEventListener("touchmove",bh.preventDefaultCallback,{passive:!1}),document.body.scrollTop=document.documentElement.scrollTop=0,document.documentElement.style.overflow="hidden"}static enableScreenMovement(){document.removeEventListener("touchmove",bh.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 yh=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};jo.a;jo.b;class Ah extends jo.c{constructor(t){var e;super(t),this.shouldComputeSize=!0,this.paused=!1,this.barcodeRecognizerHandle=null,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=mh.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t){return yh(this,void 0,void 0,(function*(){const e=bh.findContainerOrThrow(t);return new Promise(((n,r)=>{Object(I.render)(I.default.createElement(Ah,{container:e,configuration:t,onSuccess:n,onFailure:r}),e)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return yh(this,void 0,void 0,(function*(){vh.warn("Barcode detection resumed"),yield this.resume()}))}pauseDetection(){vh.warn("Barcode detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return yh(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),this.barcodeRecognizerHandle&&this.bridge.copyArgs.releaseObject(this.barcodeRecognizerHandle).catch((t=>{var e,n;return null===(n=(e=this.props.configuration).onError)||void 0===n?void 0:n.call(e,t)}))}updateDimensions(){return yh(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return yh(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n,r,o;return yh(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 i=!1;try{this.detectionRunning=!0;const t=yield this.recognizeBarcodes(!0,this.shouldComputeSize);if(this.shouldComputeSize=!1,!t)return;const a=new gh(t);a.isEmpty()?this.configuration._onDetectionFailed&&(null===(e=this.configuration)||void 0===e||e._onDetectionFailed(t.originalImage)):(i=!0,this.configuration.overlay.visible||this.configuration.onBarcodesDetected(a)),null===(n=this.overlay)||void 0===n||n.update(null===(r=this.finder)||void 0===r?void 0:r.holeRect,this.camera,a.originalImageSize,a.barcodes)}catch(t){console.log(t)}finally{this.detectionRunning=!1;const t=()=>requestAnimationFrame((()=>this.detect())),e=(null===(o=this.configuration.overlay)||void 0===o?void 0:o.visible)?0:this.configuration.captureDelay;i&&0!=e?setTimeout(t,e):t()}}))}setUseBackendService(t){console.log("Now using backend service for recognition: ",t),this.backendurl=t}recognizeBarcodes(t,e){var n,r,o,i,a,s,l,c;return yh(this,void 0,void 0,(function*(){try{window&&window.__SB_DEBUG_BARCODESCANNER_FORCE_DETERMINISTIC_MODE&&(t=!1);const l=t?jo.c.DEFAULT_DETECTION_RESOLUTION:jo.c.DETECTION_RESULTION_4K,c=null!==(n=this.desiredRecognitionResolution)&&void 0!==n?n:l;this.camera.finderFrame=null===(r=this.finder)||void 0===r?void 0:r.holeRect;const u=yield null===(o=this.camera)||void 0===o?void 0:o.createImageData(c,!1);if(!u)return;e&&this.forceUpdate(),(null===(i=this.configuration.scanAndCount)||void 0===i?void 0:i.enabled)&&(this.setState({image:y.wrapperToBase64(u)}),void 0!==this.desiredRecognitionResolution?console.log("Recognizing barcodes with custom resolution:",this.desiredRecognitionResolution):console.log("Recognizing barcodes with max resolution:",jo.c.DETECTION_RESULTION_4K,"(the actual resolution depends on your device and may be lower)"));new ah.a(u.width,u.height);this.barcodeRecognizerHandle||(this.barcodeRecognizerHandle=yield this.bridge.copyArgs.createBarcodeRecognizer(new k.BarcodeScannerTypes.BarcodeScannerConfiguration(Object.assign(Object.assign({},this.configuration.detectionParameters),{live:t}))));const d=yield this.bridge.transferArgs.recognizeBarcodes(this.barcodeRecognizerHandle,u);if(!this.enabled)return;return null===d?void(null===(s=(a=this.props).onLicenseError)||void 0===s||s.call(a)):(this.camera.reusableImageBuffer=d.originalImage.data,d)}catch(t){return void(null===(c=(l=this.props.configuration).onError)||void 0===c||c.call(l,t))}}))}setRecognitionResolution(t){this.desiredRecognitionResolution=t}getResolution(){return yh(this,void 0,void 0,(function*(){return new Promise(((t,e)=>{const n=this.camera.videoSize();n.width>0&&n.height>0?t(ah.a.fromJson(n)):this.camera.didLoadVideo=()=>{const e=this.camera.videoSize();t(ah.a.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,r,o,i,a;const s=(null===(t=this.configuration.scanAndCount)||void 0===t?void 0:t.enabled)?"Tap the shutter button to scan":void 0;return I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black",minHeight:"100px"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),I.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},I.default.createElement(ko.a,{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}})),I.default.createElement(ch,{top:null===(r=this.configuration.scanAndCount)||void 0===r?void 0:r.style.topLabelTop,text:s}),I.default.createElement(sh,{ref:t=>this.scannedImage=t,image:this.state.image}),this.state.isFinderVisible&&I.default.createElement(_o.a,{ref:t=>{this.finder=t},padding:this.props.viewFinderPadding,guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}),I.default.createElement(ch,{bottom:100,text:this.state.bottomHintText}),I.default.createElement(lh,{visible:"processing"===this.state.action}),(null===(o=this.configuration.overlay)||void 0===o?void 0:o.visible)&&I.default.createElement(Yd,{ref:t=>{t&&(this.overlay=t)},configuration:this.configuration.overlay,onPolygonSelected:t=>{const e=new gh({barcodes:[t]});this.configuration.onBarcodesDetected(e)},onBarcodeFound:(t,e,n)=>{var r;(null===(r=this.configuration.overlay)||void 0===r?void 0:r.onBarcodeFound)&&this.configuration.overlay.onBarcodeFound(t,e,n)},LabelComponent:uh,labelComponentConfig:{}}),(null===(i=this.configuration.scanAndCount)||void 0===i?void 0:i.enabled)&&I.default.createElement(oh,{ref:t=>this.bottomActionBar=t,action:this.state.action,isShowingImage:void 0!==this.state.image,onBurgerClick:()=>{this.popup.push(Fo.PushBottom,this.barcodes)},onShutterButtonClick:()=>yh(this,void 0,void 0,(function*(){(new A).flash(),this.setState({action:"processing"});const t=(new Date).getTime();let e=yield this.recognizeBarcodes(!1,!1);const n=new gh(null!=e?e:{barcodes:[]});console.log("Recognition took:",((new Date).getTime()-t)/1e3);const r=this.countLabelText(n.barcodes);this.setState({action:"manual",bottomHintText:r}),this.scannedImage.update(n),this.barcodes.push(...n.barcodes),this.bottomActionBar.update(this.barcodes),n.barcodes.length>0&&this.configuration.onBarcodesDetected(n)})),onScanMoreClick:()=>{this.resetCountImage()}}),I.default.createElement(Mo,{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`}}var Ch=n(67),Sh=Object(Ch.a)(Object($.jsx)("path",{d:"M6 2h12v3H6zm0 5v1l2 3v11h8V11l2-3V7zm6 8.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"FlashlightOn"),xh=Object(Ch.a)(Object($.jsx)("path",{d:"M18 5V2H6v1.17L7.83 5zm-2 6 2-3V7H9.83L16 13.17zM2.81 2.81 1.39 4.22 8 10.83V22h8v-3.17l3.78 3.78 1.41-1.41z"}),"FlashlightOff"),wh=Object(Ch.a)(Object($.jsx)("path",{d:"M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-8 13c-2.76 0-5-2.24-5-5H5l2.5-2.5L10 13H8c0 2.21 1.79 4 4 4 .58 0 1.13-.13 1.62-.35l.74.74c-.71.37-1.5.61-2.36.61m4.5-2.5L14 13h2c0-2.21-1.79-4-4-4-.58 0-1.13.13-1.62.35l-.74-.73C10.35 8.24 11.14 8 12 8c2.76 0 5 2.24 5 5h2z"}),"FlipCameraIos");function Oh(t,e){return t&&(t.hasFacingOptions&&e.flipCameraButton.visible||t.isTorchAvailable&&e.flashButton.visible)||e.zoomButton.visible}function Eh(t){const e=t.zoomSteps.findIndex((e=>e==t.defaultZoomFactor)),[n,r]=Object(I.useState)(t.torchEnabledInitially),[o,i]=Object(I.useState)(e),a=t.zoomSteps[o],[s,l]=Object(I.useState)("BACK"==t.initialCameraModule?"environment":"user"),c=function(t){var e,n;const r=null===(n=null===(e=null==t?void 0:t.camera)||void 0===e?void 0:e.video)||void 0===n?void 0:n.parentElement,o=()=>r?r.getBoundingClientRect():null,[i,a]=Object(I.useState)(o());return Object(I.useEffect)((()=>{if(r){const t=()=>a(o());t();const e=new ResizeObserver(t);return e.observe(r),()=>{e.disconnect()}}}),[r]),i}(t.scanner),u=!!c;if(Object(I.useEffect)((()=>{var e;(null===(e=t.capabilities)||void 0===e?void 0:e.isTorchAvailable)&&u&&t.scanner.setTorchState(n)}),[t.capabilities,u,n]),Object(I.useEffect)((()=>{var e;u&&(null===(e=t.scanner)||void 0===e||e.setZoom(a))}),[u,a]),!t.capabilities||!c)return null;if(!Oh(t.capabilities,t.config))return null;const d=c.height-t.bottomPadding-48;return I.default.createElement(mt,{style:{position:"absolute",marginTop:d,marginLeft:c.width/2,transform:"translateX(-50%)",display:"flex",justifyContent:"center",zIndex:1e3}},I.default.createElement(So,Object.assign({},t.config.flashButton,{visible:t.capabilities.isTorchAvailable&&t.config.flashButton.visible,icon:n?Sh:xh,active:n,onClick:()=>r(!n)})),I.default.createElement("div",{style:{width:20}}),I.default.createElement(So,Object.assign({},t.config.zoomButton,{text:`${a.toFixed(1)}x`,active:o!==e,onClick:()=>i((o+1)%t.zoomSteps.length)})),I.default.createElement("div",{style:{width:20}}),I.default.createElement(So,Object.assign({},t.config.flipCameraButton,{visible:t.capabilities.hasFacingOptions&&t.config.flipCameraButton.visible,active:"user"===s,icon:wh,onClick:()=>{var e;const n="environment"===s?"user":"environment";l(n),null===(e=t.scanner)||void 0===e||e.setCameraDirection(n)}})))}const Lh=Object(I.createContext)(null);class jh{static compute(t,e,n){const r=(Fd.a.lowestY(t)+Fd.a.highestY(t))/2,o={badgeY:r,badgeStyle:{transform:"translateX(-50%) translateY(-50%)"}};return"BELOW"===n?Object.assign(Object.assign({},o),{labelY:Math.max(Fd.a.highestY(t)+jh.LABEL_AND_BADGE_PADDING,e?r-jh.AR_BADGE_SIZE/2-jh.LABEL_AND_BADGE_PADDING:-1/0),labelStyle:{transform:"translateX(-50%)"}}):"ABOVE"===n?Object.assign(Object.assign({},o),{labelY:Math.min(Fd.a.lowestY(t)-jh.LABEL_AND_BADGE_PADDING,e.visible?r+jh.AR_BADGE_SIZE/2+jh.LABEL_AND_BADGE_PADDING:1/0),labelStyle:{transform:"translateX(-50%) translateY(-100%)"}}):"STACKED"===n?{badgeY:r,badgeStyle:{transform:`translateX(-50%) translateY(calc(-100% - ${jh.LABEL_AND_BADGE_PADDING/2}px))`},labelY:r,labelStyle:{transform:e.visible?`translateX(-50%) translateY(${jh.LABEL_AND_BADGE_PADDING/2}px)`:"translateX(-50%) translateY(-50%)"}}:"DISABLED"===n?Object.assign(Object.assign({},o),{labelY:0,labelStyle:{display:"none"}}):void 0}}jh.AR_BADGE_SIZE=48,jh.LABEL_AND_BADGE_PADDING=10;var kh=jh;function _h(t){return t.style.visible?""==t.content?null:I.default.createElement(Dd.div,{style:Object.assign({position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100},t.positionBadge),animate:t.animateToPoints?t.positionBadge:{},transition:t.transition},I.default.createElement(We,{styleConfig:Object.assign(Object.assign({},t.style.background),{cornerRadius:kh.AR_BADGE_SIZE/2}),style:Object.assign(Object.assign({},t.verticalPositions.badgeStyle),{width:kh.AR_BADGE_SIZE,height:kh.AR_BADGE_SIZE,color:gt.b.getColorValue(t.style.foregroundColor),display:"flex",justifyContent:"center",alignItems:"center",zIndex:1500,cursor:"pointer"}),onClick:()=>null==t?void 0:t.onClick()},I.default.createElement(Vt,{fontSize:16,fontWeight:"500",style:{display:"flex",justifyContent:"center",alignItems:"center"}},t.content))):null}var Th=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};class Ph extends uh{constructor(){super(...arguments),this.count=0,this.setCount=t=>{this.count=t,this.forceUpdate()}}styleBadge(t,e){this.customBadgeStyle=t,this.customBadgeContent=e,this.forceUpdate()}badgeContent(){return this.customBadgeContent?this.customBadgeContent:0===this.count?"":"x"+this.count}render(){var t,e;let{barcodeItemConfiguration:n,barcodeItemInfoPosition:r,counterBadge:o}=this.props;const i=n,a=this.state.element,s=null!==(t=this.props.animateToPoints)&&void 0!==t?t:a.points,l=a.code,c=a.highlighted,u=(Fd.a.lowestX(s)+Fd.a.highestX(s))/2;void 0===r&&(r="BELOW");const d=kh.compute(s,o,r),h=void 0===i||!1===i.titleDeselected.visible&&!1===i.subtitleDeselected.visible,p={x:u,y:Math.round(d.labelY)},f={x:u,y:Math.round(d.badgeY)},m={duration:.25,easing:"linear"};return I.default.createElement(I.default.Fragment,null,i&&I.default.createElement(Dd.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},I.default.createElement(We,{sx:Object.assign({p:1,maxWidth:232,cursor:"pointer",display:h?"inline-block":"block",zIndex:1500},d.labelStyle),styleConfig:c?i.backgroundSelected:i.backgroundDeselected,"data-sb-ar-barcode-info":"1",onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(a)}},I.default.createElement(Rh,{barcode:l,barcodeImageVisible:i.imageVisible,maxNumberOfTitleLines:1,maxNumberOfSubtitleLines:1,imageSize:42,displayRightArrow:!0,barcodeTitle:c?i.titleSelected:i.titleDeselected,barcodeSubtitle:c?i.subtitleSelected:i.subtitleDeselected}))),I.default.createElement(_h,{onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(a)},style:null!==(e=this.customBadgeStyle)&&void 0!==e?e:o,positionBadge:f,content:this.badgeContent(),verticalPositions:d,transition:m,animateToPoints:this.props.animateToPoints}))}}function Rh(t){var{barcode:e}=t,n=Th(t,["barcode"]);const r=Object(I.useContext)(Lh).useBarcodeMappedData(e);return I.default.createElement(Wn,Object.assign({barcodeMappedData:r},n))}var Dh=n(18);function Bh(t){const e=Object(I.useRef)(),n=Object(I.useRef)(null),[r,o]=(Object(I.useContext)(Ne),Object(I.useState)(void 0)),[i,a]=Object(I.useState)(!1);Object(I.useEffect)((()=>{var n,r;t.scanningPaused?null===(n=e.current)||void 0===n||n.pause():null===(r=e.current)||void 0===r||r.resume()}),[t.scanningPaused]);const s=function(t){const e=new hh;e.visible=t.visible;const n=t.polygon instanceof Dh.c,r=t.polygon,o=t,i=n?r.selected:o.polygon.partiallyScanned,a=n?r.deselected:o.polygon.partiallyScanned;return t.polygon.visible?(e.style.highlightedPolygonFillColor=gt.b.getColorValue(i.fillColor),e.style.highlightedPolygonStrokeColor=gt.b.getColorValue(i.strokeColor),e.style.highlightedPolygonStrokeWidth=i.strokeWidth,e.style.highlightedPolygonCornerRadius=i.cornerRadius,e.style.polygonFillColor=gt.b.getColorValue(a.fillColor),e.style.polygonStrokeColor=gt.b.getColorValue(a.strokeColor),e.style.polygonStrokeWidth=a.strokeWidth,e.style.polygonCornerRadius=a.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:r=>{var o,i,a,s,l,c;null===(o=n.current)||void 0===o||o.update(null===(a=null===(i=e.current)||void 0===i?void 0:i.finder)||void 0===a?void 0:a.holeRect,null===(s=e.current)||void 0===s?void 0:s.camera,r.originalImageSize,r.barcodes),null===(c=(l=t.barcodeScannerViewConfig).onBarcodesDetected)||void 0===c||c.call(l,r)},_onDetectionFailed:r=>{var o,i,a,s,l,c;null===(o=n.current)||void 0===o||o.update(null===(a=null===(i=e.current)||void 0===i?void 0:i.finder)||void 0===a?void 0:a.holeRect,null===(s=e.current)||void 0===s?void 0:s.camera,new ah.a(r.width,r.height),[]),null===(c=(l=t.barcodeScannerViewConfig)._onDetectionFailed)||void 0===c||c.call(l,r)}});return Object(I.useEffect)((()=>{const e=Oh(r,t.actionBarConfig);t.setActionButtonsVisible(e),a(e)}),[r,t.actionBarConfig]),I.default.createElement(I.default.Fragment,null,t.arOverlay.visible&&I.default.createElement(Yd,{style:{zIndex:1e3,position:"absolute"},ref:n,LabelComponent:Ph,labelComponentConfig:t.arOverlay,onBarcodeFound:t.arOnBarcodeEnter,onPolygonClick:t.arOnBarcodeClick,configuration:s}),I.default.createElement(Eh,{config:t.actionBarConfig,scanner:e.current,capabilities:r,bottomPadding:t.actionBarBottomPadding,torchEnabledInitially:t.cameraConfiguration.flashEnabled,zoomSteps:t.cameraConfiguration.zoomSteps,defaultZoomFactor:t.cameraConfiguration.defaultZoomFactor,initialCameraModule:t.cameraConfiguration.cameraModule}),I.default.createElement(Ah,{ref:e,viewFinderPadding:t.viewFinderPadding,configuration:l,onSuccess:()=>class{static setFromScanner(t,e){var n;if(!t.current)return;const r=t.current.getCapabilities();e({hasFacingOptions:(null==r?void 0:r.facingMode)&&r.facingMode.length>0,isTorchAvailable:null!==(n=t.current.getActiveCameraInfo().supportsTorchControl)&&void 0!==n&&n})}}.setFromScanner(e,o),onFailure:t.onCameraPermissionDenied,onLicenseError:t.onLicenseError}))}function Fh(t){return Object(I.useMemo)((()=>{const e=(new mh).videoConstraints;return e.width.ideal=t.cameraConfiguration.idealPreviewResolution.width,e.height.ideal=t.cameraConfiguration.idealPreviewResolution.height,e.facingMode="FRONT"===t.cameraConfiguration.cameraModule?"user":"environment",{videoConstraints:e,backgroundColor:gt.b.getColorValue(t.backgroundColor),userGuidance:t.userGuidance,finder:t.viewFinder,detectionParameters:new k.BarcodeScannerTypes.BarcodeScannerConfiguration({live:!0,engineMode:t.recognizerConfiguration.engineMode,barcodeFormatConfigurations:[new k.BarcodeConfigs.BarcodeFormatCommonConfiguration({formats:t.recognizerConfiguration.barcodeFormats.length>0?t.recognizerConfiguration.barcodeFormats:void 0,regexFilter:t.recognizerConfiguration.barcodesRegexFilter,gs1Handling:t.recognizerConfiguration.gs1Handling})]}),desiredRecognitionResolution:t.recognizerConfiguration.maximumRecognizerResolution}}),[t])}var Ih=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};function Mh(t){const[e,n]=Object(I.useState)(null),[r,o]=Object(I.useState)(!0),i=Object(I.useMemo)((()=>"__sb_"+Math.random()),[]),a=t.barcodeMapper,s=t.configuration.useCase,l=Object.assign(Object.assign({},Fh(t.configuration)),{onBarcodesDetected:e=>{e.barcodes.length>0&&!s.arOverlay.visible&&t.scanningEnabled.current&&n(e.barcodes[0])},onError:t.onError,containerId:i,captureDelay:0}),c=n=>Ih(this,void 0,void 0,(function*(){let r;r=null===e?[]:[new W.BarcodeScannerUIItem({count:1,barcode:n})];const o={items:r};t.onSubmit(o)}));Object(I.useEffect)((()=>{e&&(Oo.INSTANCE.beep(t.configuration.sound),Lo.INSTANCE.vibrate(t.configuration.vibration))}),[e]),Object(I.useEffect)((()=>{null===e||s.confirmationSheetEnabled||c(e)}),[e,s.confirmationSheetEnabled]);const u=a.useBarcodeMappedData(e);Object(I.useEffect)((()=>{"FAILED"===(null==u?void 0:u.state)&&n(null)}),[null==u?void 0:u.state]);const d=Object(I.useContext)(Ne);return I.default.createElement(I.default.Fragment,null,I.default.createElement(Lh.Provider,{value:t.barcodeMapper},I.default.createElement(mo,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})),I.default.createElement(mt,{id:i,sx:{width:"100%",height:d.remainingVisibleBodyHeight}},I.default.createElement(Bh,{cameraConfiguration:t.configuration.cameraConfiguration,scanningPaused:null!==e,setActionButtonsVisible:o,viewFinderPadding:{minTopPadding:d.minTopPaddingForViewFinder,minBottomPadding:r?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:i,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:16,onCameraPermissionDenied:t.onCameraPermissionDenied,onLicenseError:t.onError}))));var h}var Wh=Object(Ch.a)(Object($.jsx)("path",{d:"M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74m9.84 4.63-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74c-3.6-.76-3.54-.75-3.67-.75-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38"}),"TouchApp"),zh=Object(Ch.a)(Object($.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Nh=Object(Ch.a)(Object($.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Vh=n(126);function Uh(t){const{children:e,defer:n=!1,fallback:r=null}=t,[o,i]=I.useState(!1);return Object(Tr.a)((()=>{n||i(!0)}),[n]),I.useEffect((()=>{n&&i(!0)}),[n]),Object($.jsx)(I.Fragment,{children:o?e:r})}var Hh=n(69),$h=n(57);const Gh=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Yh(t,e,n){var r;const o=function(t,e,n){const r=e.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=Object($h.a)(e);let a;if(e.fakeTransform)a=e.fakeTransform;else{const t=i.getComputedStyle(e);a=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"==typeof a){const t=a.split("(")[1].split(")")[0].split(",");s=parseInt(t[4],10),l=parseInt(t[5],10)}return"left"===t?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:"right"===t?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===t?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(t,e,"function"==typeof(r=n)?r():r);o&&(e.style.webkitTransform=o,e.style.transform=o)}var Qh=I.forwardRef((function(t,e){const n=Vn(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,container:l,direction:c="down",easing:u=r,in:d,onEnter:h,onEntered:p,onEntering:f,onExit:m,onExited:g,onExiting:v,style:b,timeout:y=o,TransitionComponent:A=Vr}=t,C=Object(N.a)(t,Gh),S=I.useRef(null),x=Object(Xt.a)(s.ref,S,e),w=t=>e=>{t&&(void 0===e?t(S.current):t(S.current,e))},O=w(((t,e)=>{Yh(c,t,l),Ur(t),h&&h(t,e)})),E=w(((t,e)=>{const r=Hr({timeout:y,style:b,easing:u},{mode:"enter"});t.style.webkitTransition=n.transitions.create("-webkit-transform",Object(z.a)({},r)),t.style.transition=n.transitions.create("transform",Object(z.a)({},r)),t.style.webkitTransform="none",t.style.transform="none",f&&f(t,e)})),L=w(p),j=w(v),k=w((t=>{const e=Hr({timeout:y,style:b,easing:u},{mode:"exit"});t.style.webkitTransition=n.transitions.create("-webkit-transform",e),t.style.transition=n.transitions.create("transform",e),Yh(c,t,l),m&&m(t)})),_=w((t=>{t.style.webkitTransition="",t.style.transition="",g&&g(t)})),T=I.useCallback((()=>{S.current&&Yh(c,S.current,l)}),[c,l]);return I.useEffect((()=>{if(d||"down"===c||"right"===c)return;const t=Object(Hh.a)((()=>{S.current&&Yh(c,S.current,l)})),e=Object($h.a)(S.current);return e.addEventListener("resize",t),()=>{t.clear(),e.removeEventListener("resize",t)}}),[c,d,l]),I.useEffect((()=>{d||T()}),[d,T]),Object($.jsx)(A,Object(z.a)({nodeRef:S,onEnter:O,onEntered:L,onEntering:E,onExit:k,onExited:_,onExiting:j,addEndListener:t=>{i&&i(S.current,t)},appear:a,in:d,timeout:y},C,{children:(t,e)=>I.cloneElement(s,Object(z.a)({ref:x,style:Object(z.a)({visibility:"exited"!==t||d?void 0:"hidden"},b,s.props.style)},e))}))}));function Zh(t){return Object(xt.a)("MuiDrawer",t)}Object(ht.a)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Xh=["BackdropProps"],qh=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Kh=(t,e)=>{const{ownerState:n}=t;return[e.root,("permanent"===n.variant||"persistent"===n.variant)&&e.docked,e.modal]},Jh=Object(bt.a)(no,{name:"MuiDrawer",slot:"Root",overridesResolver:Kh})((({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer}))),tp=Object(bt.a)("div",{shouldForwardProp:bt.b,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Kh})({flex:"0 0 auto"}),ep=Object(bt.a)(Lt,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`paperAnchor${Object(At.a)(n.anchor)}`],"temporary"!==n.variant&&e[`paperAnchorDocked${Object(At.a)(n.anchor)}`]]}})((({theme:t,ownerState:e})=>Object(z.a)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===e.anchor&&{left:0},"top"===e.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===e.anchor&&{right:0},"bottom"===e.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===e.anchor&&"temporary"!==e.variant&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},"top"===e.anchor&&"temporary"!==e.variant&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},"right"===e.anchor&&"temporary"!==e.variant&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},"bottom"===e.anchor&&"temporary"!==e.variant&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`}))),np={left:"right",right:"left",top:"down",bottom:"up"};function rp(t){return-1!==["left","right"].indexOf(t)}function op(t,e){return"rtl"===t.direction&&rp(e)?np[e]:e}var ip=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiDrawer"}),r=Vn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:i="left",BackdropProps:a,children:s,className:l,elevation:c=16,hideBackdrop:u=!1,ModalProps:{BackdropProps:d}={},onClose:h,open:p=!1,PaperProps:f={},SlideProps:m,TransitionComponent:g=Qh,transitionDuration:v=o,variant:b="temporary"}=n,y=Object(N.a)(n.ModalProps,Xh),A=Object(N.a)(n,qh),C=I.useRef(!1);I.useEffect((()=>{C.current=!0}),[]);const S=op(r,i),x=i,w=Object(z.a)({},n,{anchor:x,elevation:c,open:p,variant:b},A),O=(t=>{const{classes:e,anchor:n,variant:r}=t,o={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Object(At.a)(n)}`,"temporary"!==r&&`paperAnchorDocked${Object(At.a)(n)}`]};return Object(vt.a)(o,Zh,e)})(w),E=Object($.jsx)(ep,Object(z.a)({elevation:"temporary"===b?c:0,square:!0},f,{className:Object(et.a)(O.paper,f.className),ownerState:w,children:s}));if("permanent"===b)return Object($.jsx)(tp,Object(z.a)({className:Object(et.a)(O.root,O.docked,l),ownerState:w,ref:e},A,{children:E}));const L=Object($.jsx)(g,Object(z.a)({in:p,direction:np[S],timeout:v,appear:C.current},m,{children:E}));return"persistent"===b?Object($.jsx)(tp,Object(z.a)({className:Object(et.a)(O.root,O.docked,l),ownerState:w,ref:e},A,{children:L})):Object($.jsx)(Jh,Object(z.a)({BackdropProps:Object(z.a)({},a,d,{transitionDuration:v}),className:Object(et.a)(O.root,O.modal,l),open:p,ownerState:w,onClose:h,hideBackdrop:u,ref:e},A,y,{children:L}))})),ap=n(56),sp=n(49);const lp=["anchor","classes","className","width","style"],cp=Object(bt.a)("div",{shouldForwardProp:bt.b})((({theme:t,ownerState:e})=>Object(z.a)({position:"fixed",top:0,left:0,bottom:0,zIndex:t.zIndex.drawer-1},"left"===e.anchor&&{right:"auto"},"right"===e.anchor&&{left:"auto",right:0},"top"===e.anchor&&{bottom:"auto",right:0},"bottom"===e.anchor&&{top:"auto",bottom:0,right:0})));var up=I.forwardRef((function(t,e){const{anchor:n,classes:r={},className:o,width:i,style:a}=t,s=Object(N.a)(t,lp),l=t;return Object($.jsx)(cp,Object(z.a)({className:Object(et.a)("PrivateSwipeArea-root",r.root,r[`anchor${Object(At.a)(n)}`],o),ref:e,style:Object(z.a)({[rp(n)?"width":"height"]:i},a),ownerState:l},s))}));const dp=["BackdropProps"],hp=["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","allowSwipeInChildren","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"];let pp=null;function fp(t,e,n){return"right"===t?n.body.offsetWidth-e[0].pageX:e[0].pageX}function mp(t,e,n){return"bottom"===t?n.innerHeight-e[0].clientY:e[0].clientY}function gp(t,e){return t?e.clientWidth:e.clientHeight}function vp(t,e,n,r){return Math.min(Math.max(n?e-t:r+e-t,0),r)}const bp="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent);var yp=I.forwardRef((function(t,e){const n=Object(Vh.a)({name:"MuiSwipeableDrawer",props:t}),r=Vn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:i="left",disableBackdropTransition:a=!1,disableDiscovery:s=!1,disableSwipeToOpen:l=bp,hideBackdrop:c,hysteresis:u=.52,allowSwipeInChildren:d=!1,minFlingVelocity:h=450,ModalProps:{BackdropProps:p}={},onClose:f,onOpen:m,open:g=!1,PaperProps:v={},SwipeAreaProps:b,swipeAreaWidth:y=20,transitionDuration:A=o,variant:C="temporary"}=n,S=Object(N.a)(n.ModalProps,dp),x=Object(N.a)(n,hp),[w,O]=I.useState(!1),E=I.useRef({isSwiping:null}),L=I.useRef(),j=I.useRef(),k=I.useRef(),_=Object(Xt.a)(v.ref,k),T=I.useRef(!1),P=I.useRef();Object(sp.a)((()=>{P.current=null}),[g]);const R=I.useCallback(((t,e={})=>{const{mode:n=null,changeTransition:o=!0}=e,s=op(r,i),l=-1!==["right","bottom"].indexOf(s)?1:-1,u=rp(i),d=u?`translate(${l*t}px, 0)`:`translate(0, ${l*t}px)`,h=k.current.style;h.webkitTransform=d,h.transform=d;let p="";if(n&&(p=r.transitions.create("all",Hr({easing:void 0,style:void 0,timeout:A},{mode:n}))),o&&(h.webkitTransition=p,h.transition=p),!a&&!c){const e=j.current.style;e.opacity=1-t/gp(u,k.current),o&&(e.webkitTransition=p,e.transition=p)}}),[i,a,c,r,A]),D=Object(qt.a)((t=>{if(!T.current)return;if(pp=null,T.current=!1,I.flushSync((()=>{O(!1)})),!E.current.isSwiping)return void(E.current.isSwiping=null);E.current.isSwiping=null;const e=op(r,i),n=rp(i);let o;o=n?fp(e,t.changedTouches,Object(ap.a)(t.currentTarget)):mp(e,t.changedTouches,Object($h.a)(t.currentTarget));const a=n?E.current.startX:E.current.startY,s=gp(n,k.current),l=vp(o,a,g,s),c=l/s;Math.abs(E.current.velocity)>h&&(P.current=1e3*Math.abs((s-l)/E.current.velocity)),g?E.current.velocity>h||c>u?f():R(0,{mode:"exit"}):E.current.velocity<-h||1-c>u?m():R(gp(n,k.current),{mode:"enter"})})),B=(t=!1)=>{if(!w){!t&&s&&d||I.flushSync((()=>{O(!0)}));const e=rp(i);!g&&k.current&&R(gp(e,k.current)+(s?15:-20),{changeTransition:!1}),E.current.velocity=0,E.current.lastTime=null,E.current.lastTranslate=null,E.current.paperHit=!1,T.current=!0}},F=Object(qt.a)((t=>{if(!k.current||!T.current)return;if(null!==pp&&pp!==E.current)return;B(!0);const e=op(r,i),n=rp(i),o=fp(e,t.touches,Object(ap.a)(t.currentTarget)),a=mp(e,t.touches,Object($h.a)(t.currentTarget));if(g&&k.current.contains(t.target)&&null===pp){const e=function({domTreeShapes:t,start:e,current:n,anchor:r}){const o={x:"scrollLeft",y:"scrollTop"},i={x:"scrollWidth",y:"scrollHeight"},a={x:"clientWidth",y:"clientHeight"};return t.some((t=>{let s=n>=e;"top"!==r&&"left"!==r||(s=!s);const l="left"===r||"right"===r?"x":"y",c=Math.round(t[o[l]]),u=c>0,d=c+t[a[l]]<t[i[l]];return!!(s&&d||!s&&u)}))}({domTreeShapes:function(t,e){const n=[];for(;t&&t!==e.parentElement;){const r=Object($h.a)(e).getComputedStyle(t);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")||(t.clientWidth>0&&t.scrollWidth>t.clientWidth||t.clientHeight>0&&t.scrollHeight>t.clientHeight)&&n.push(t),t=t.parentElement}return n}(t.target,k.current),start:n?E.current.startX:E.current.startY,current:n?o:a,anchor:i});if(e)return void(pp=!0);pp=E.current}if(null==E.current.isSwiping){const e=Math.abs(o-E.current.startX),r=Math.abs(a-E.current.startY),i=n?e>r&&e>3:r>e&&r>3;if(i&&t.cancelable&&t.preventDefault(),!0===i||(n?r>3:e>3)){if(E.current.isSwiping=i,!i)return void D(t);E.current.startX=o,E.current.startY=a,s||g||(n?E.current.startX-=20:E.current.startY-=20)}}if(!E.current.isSwiping)return;const l=gp(n,k.current);let c=n?E.current.startX:E.current.startY;g&&!E.current.paperHit&&(c=Math.min(c,l));const u=vp(n?o:a,c,g,l);if(g)if(E.current.paperHit)0===u&&(E.current.startX=o,E.current.startY=a);else{if(!(n?o<l:a<l))return;E.current.paperHit=!0,E.current.startX=o,E.current.startY=a}null===E.current.lastTranslate&&(E.current.lastTranslate=u,E.current.lastTime=performance.now()+1);const d=(u-E.current.lastTranslate)/(performance.now()-E.current.lastTime)*1e3;E.current.velocity=.4*E.current.velocity+.6*d,E.current.lastTranslate=u,E.current.lastTime=performance.now(),t.cancelable&&t.preventDefault(),R(u)})),M=Object(qt.a)((t=>{if(t.defaultPrevented)return;if(t.defaultMuiPrevented)return;if(g&&(c||!j.current.contains(t.target))&&!k.current.contains(t.target))return;const e=op(r,i),n=rp(i),o=fp(e,t.touches,Object(ap.a)(t.currentTarget)),a=mp(e,t.touches,Object($h.a)(t.currentTarget));if(!g){var s;if(l||!(t.target===L.current||null!=(s=k.current)&&s.contains(t.target)&&("function"==typeof d?d(t,L.current,k.current):d)))return;if(n){if(o>y)return}else if(a>y)return}t.defaultMuiPrevented=!0,pp=null,E.current.startX=o,E.current.startY=a,B()}));return I.useEffect((()=>{if("temporary"===C){const t=Object(ap.a)(k.current);return t.addEventListener("touchstart",M),t.addEventListener("touchmove",F,{passive:!g}),t.addEventListener("touchend",D),()=>{t.removeEventListener("touchstart",M),t.removeEventListener("touchmove",F,{passive:!g}),t.removeEventListener("touchend",D)}}}),[C,g,M,F,D]),I.useEffect((()=>()=>{pp===E.current&&(pp=null)}),[]),I.useEffect((()=>{g||O(!1)}),[g]),Object($.jsxs)(I.Fragment,{children:[Object($.jsx)(ip,Object(z.a)({open:!("temporary"!==C||!w)||g,variant:C,ModalProps:Object(z.a)({BackdropProps:Object(z.a)({},p,{ref:j})},"temporary"===C&&{keepMounted:!0},S),hideBackdrop:c,PaperProps:Object(z.a)({},v,{style:Object(z.a)({pointerEvents:"temporary"!==C||g||d?"":"none"},v.style),ref:_}),anchor:i,transitionDuration:P.current||A,onClose:f,ref:e},x)),!l&&"temporary"===C&&Object($.jsx)(Uh,{children:Object($.jsx)(up,Object(z.a)({anchor:i,ref:L,width:y},b))})]})})),Ap=n(95);function Cp(t){const e=Object.assign(Object.assign({},t.title),{text:gt.b.getLocalizedBarcodeText(t.title.text,t.textReplacementArgs)});return I.default.createElement(I.default.Fragment,null,I.default.createElement(ze,Object.assign({},t.leftButton)),I.default.createElement(Vt,{sx:{flex:2,textAlign:"center",fontWeight:600,fontSize:18}},I.default.createElement(Qt.a,{config:e})),I.default.createElement(ze,Object.assign({},t.rightButton)))}function Sp(){return I.default.createElement("div",{style:{width:30,height:6,backgroundColor:Ap.a[300],borderRadius:3,position:"absolute",top:8,left:"calc(50% - 15px)"},"data-sb-drawer-puller":"1"})}function xp(t){return I.default.createElement(mt,Object.assign({sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",paddingTop:2,paddingBottom:1,touchAction:"none"},ref:t.innerRef},t.dragProps),I.default.createElement(Sp,null),I.default.createElement(Cp,Object.assign({},t.drawerHeaderContentProps)))}var wp=Object(Ch.a)(Object($.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Op(t){return Object(xt.a)("MuiAvatar",t)}Object(ht.a)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Ep=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Lp=["component","slots","slotProps"],jp=["component"];const kp=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],_p=Object(bt.a)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],n.colorDefault&&e.colorDefault]}})((({theme:t})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:Object(z.a)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:Object(z.a)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}))),Tp=Object(bt.a)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(t,e)=>e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Pp=Object(bt.a)(wp,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(t,e)=>e.fallback})({width:"75%",height:"75%"});var Rp=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiAvatar"}),{alt:r,children:o,className:i,component:a="div",slots:s={},slotProps:l={},imgProps:c,sizes:u,src:d,srcSet:h,variant:p="circular"}=n,f=Object(N.a)(n,kp);let m=null;const g=function({crossOrigin:t,referrerPolicy:e,src:n,srcSet:r}){const[o,i]=I.useState(!1);return I.useEffect((()=>{if(!n&&!r)return;i(!1);let o=!0;const a=new Image;return a.onload=()=>{o&&i("loaded")},a.onerror=()=>{o&&i("error")},a.crossOrigin=t,a.referrerPolicy=e,a.src=n,r&&(a.srcset=r),()=>{o=!1}}),[t,e,n,r]),o}(Object(z.a)({},c,{src:d,srcSet:h})),v=d||h,b=v&&"error"!==g,y=Object(z.a)({},n,{colorDefault:!b,component:a,variant:p}),A=(t=>{const{classes:e,variant:n,colorDefault:r}=t,o={root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]};return Object(vt.a)(o,Op,e)})(y),[C,S]=function(t,e){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s}=e,l=Object(N.a)(e,Ep),{component:c,slots:u={[t]:void 0},slotProps:d={[t]:void 0}}=i,h=Object(N.a)(i,Lp),p=u[t]||r,f=pr(d[t],o),m=hr(Object(z.a)({className:n},l,{externalForwardedProps:"root"===t?h:void 0,externalSlotProps:f})),{props:{component:g},internalRef:v}=m,b=Object(N.a)(m.props,jp),y=Object(sr.a)(v,null==f?void 0:f.ref,e.ref),A=a?a(b):{},C=Object(z.a)({},o,A),S="root"===t?g||c:g,x=cr(p,Object(z.a)({},"root"===t&&!c&&!u[t]&&s,"root"!==t&&!u[t]&&s,b,S&&{as:S},{ref:y}),C);return Object.keys(A).forEach((t=>{delete x[t]})),[p,x]}("img",{className:A.img,elementType:Tp,externalForwardedProps:{slots:s,slotProps:{img:Object(z.a)({},c,l.img)}},additionalProps:{alt:r,src:d,srcSet:h,sizes:u},ownerState:y});return m=b?Object($.jsx)(C,Object(z.a)({},S)):o||0===o?o:v&&r?r[0]:Object($.jsx)(Pp,{ownerState:y,className:A.fallback}),Object($.jsx)(_p,Object(z.a)({as:a,ownerState:y,className:Object(et.a)(A.root,i),ref:e},f,{children:m}))}));function Dp(t){return I.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"38",viewBox:"0 0 41 38",fill:"none"},I.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 Bp(t){return t.isVisible?I.default.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"column",marginTop:"auto",marginBottom:"auto",overflowY:"scroll"}},t.style.placeholderIcon.visible&&I.default.createElement(Rp,{style:{backgroundColor:gt.b.getColorValue(t.style.placeholderIconBackground),width:100,height:100}},I.default.createElement(Dp,{color:gt.b.getColorValue(t.style.placeholderIcon.color)})),I.default.createElement(Vt,{style:{marginTop:20},variant:"h6"},I.default.createElement(Qt.a,{config:t.style.placeholderTitle})),I.default.createElement(Vt,{style:{marginTop:20,paddingLeft:"10%",paddingRight:"10%",maxWidth:400,textAlign:"center"},variant:"body2"},I.default.createElement(Qt.a,{config:t.style.placeholderSubtitle})),t.onStartClick&&t.style.startScanningButton.visible&&I.default.createElement(ir,Object.assign({style:{width:"60%",marginTop:20}},t.style.startScanningButton,{visible:!0,onClick:t.onStartClick}))):null}function Fp(t,e,n){const r=Object(I.useRef)(),o=Object(I.useRef)(null),[i,a]=Object(I.useState)(),[s,l]=Object(I.useState)(!1),c=Object(I.useRef)([]),u=t=>{let n="none";if(c.current.length>0){const e=200,r=((t,e)=>{let n=t[0],r=Math.abs(n.time-e);for(let o=1;o<t.length;o++){const i=Math.abs(t[o].time-e);i<r&&(n=t[o],r=i)}return n})(c.current,t.timeStamp-e),o=r.y-t.clientY,i=100;o>i?n="up":o<-i&&(n="down")}c.current.splice(0,c.current.length),e(new Fd.a(t.clientX,t.clientY),n)},d={onPointerDown:t=>{t.target.setPointerCapture(t.pointerId),l(!0),o.current=new Fd.a(t.clientX,t.clientY),a(Fd.a.empty()),t.stopPropagation()},onPointerMove:e=>{if(!s)return;const n=new Fd.a(e.clientX,e.clientY);r.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:o,currentPoint:i,props:d,stop:()=>{r.current.stopPropagation()},dragOngoing:s}}var Ip=n(58);function Mp(t){const[e,n]=Object(I.useState)(0),[r,o]=Object(I.useState)(!1),i=Object(I.useRef)(null),a=Object(I.useContext)(Ne).height,s=t=>{n(t),o(!0),setTimeout((()=>{o(!1)}),500)},l=e=>{const n=e-c.startPoint.current.y;return Object(Ip.a)((t.isOpen?100:0)-100*n/(window.innerHeight-a-t.closedSheetVisibleHeight),0,100)},c=Fp((t=>{n(l(t.y))}),((e,n)=>{if(e.y===c.startPoint.current.y)return;let r;r=l(e.y)<50?"swipe-to-close":"swipe-to-open","up"===n&&(r="swipe-to-open"),"down"===n&&(r="swipe-to-close"),t.onSwipe(r)}),(()=>{}));return Object(I.useEffect)((()=>{r||c.dragOngoing||!i||(t.isOpen||0===e?t.isOpen&&100!==e&&s(100):s(0))}),[t.isOpen,e,c.dragOngoing]),I.createElement("div",null,I.createElement(yp,{variant:"persistent",anchor:"bottom",open:!0,onClose:()=>{},onOpen:()=>{},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},PaperProps:{style:{height:`calc((100 * ${$t} - ${a}px - ${t.closedSheetVisibleHeight}px) * ${e} / 100 + ${t.closedSheetVisibleHeight}px)`,overflow:"hidden",borderRadius:10,borderBottomLeftRadius:0,borderBottomRightRadius:0,transition:r?"height 500ms":void 0,backgroundColor:gt.b.getColorValue(t.contentStyle.sheetColor)},elevation:24}},I.createElement(xp,{innerRef:t=>{i.current=t},drawerHeaderContentProps:t.drawerHeaderContentProps,dragProps:c.props}),t.children,I.createElement(Bp,{isVisible:t.isPlaceholderVisible,style:t.contentStyle,onStartClick:()=>t.onSwipe("swipe-to-close")})))}var Wp=n(104),zp=n.n(Wp),Np=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Vp(t){var{inputRef:e}=t,n=Np(t,["inputRef"]);const r=Object.assign(Object.assign({},n),{style:Object.assign(Object.assign({},n.style||{}),{border:"none",display:"block",outlineWidth:0,width:"100%"})});return I.default.createElement("input",Object.assign({},r,{ref:e}))}var Up=Object(Ch.a)(Object($.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");function Hp(t){const e=!!t.barcode,[n,r]=I.default.useState(""),o=I.default.useRef(null),i={backgroundColor:gt.b.getColorValue(t.dialogStyling.sheetColor)};return Object(I.useEffect)((()=>{e&&r(String(t.barcode.count))}),[e]),I.default.createElement(I.default.Fragment,null,I.default.createElement(fo,{open:e,modalOverlayColor:t.dialogStyling.modalOverlayColor,TransitionProps:{onEnter:()=>{var t;return null===(t=o.current)||void 0===t?void 0:t.focus()}},onClose:t.onCancel,PaperProps:{component:"form",onSubmit:e=>{e.preventDefault(),t.setCounter(t.barcode.barcode,parseInt(n)||0)}}},I.default.createElement(Ye,{style:i},I.default.createElement(Vt,{fontSize:16,fontWeight:500,textAlign:"center"},I.default.createElement(Qt.a,{config:t.dialogStyling.title})),I.default.createElement(Vt,{fontSize:14,textAlign:"center"},I.default.createElement(Qt.a,{config:t.dialogStyling.info})),I.default.createElement(mt,{sx:{display:"flex",border:"2px solid",borderColor:gt.b.getColorValue(t.dialogStyling.dividerColor),mh:2,mb:0,p:1,borderRadius:1}},I.default.createElement(Vp,{inputRef:o,value:n,onChange:t=>{const e=parseInt(t.target.value.replaceAll(/[^0-9]/g,""));r(e>=0?e.toString():"")},type:"text",pattern:"[0-9]*"}),t.dialogStyling.clearTextButton.visible&&I.default.createElement(zp.a,{sx:{marginLeft:"auto",paddingLeft:1},onClick:()=>r(""),htmlColor:gt.b.getColorValue(t.dialogStyling.clearTextButton.color)}))),I.default.createElement(qe,{sx:Object.assign(Object.assign({},i),{pt:0})},I.default.createElement(Kn,{container:!0,spacing:2},I.default.createElement(Kn,{item:!0,xs:12},I.default.createElement(or,{color:gt.b.getColorValue(t.dialogStyling.dividerColor)})),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({style:{width:"100%"},onClick:t.onCancel},t.dialogStyling.cancelButton))),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({icon:Up,style:{width:"100%"},onClick:()=>{},type:"submit"},t.dialogStyling.updateButton)))))))}var $p=I.createContext({});function Gp(t){return Object(xt.a)("MuiList",t)}Object(ht.a)("MuiList",["root","padding","dense","subheader"]);const Yp=["children","className","component","dense","disablePadding","subheader"],Qp=Object(bt.a)("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})((({ownerState:t})=>Object(z.a)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})));var Zp=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=Object(N.a)(n,Yp),u=I.useMemo((()=>({dense:a})),[a]),d=Object(z.a)({},n,{component:i,dense:a,disablePadding:s}),h=(t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return Object(vt.a)(i,Gp,e)})(d);return Object($.jsx)($p.Provider,{value:u,children:Object($.jsxs)(Qp,Object(z.a)({as:i,className:Object(et.a)(h.root,o),ref:e,ownerState:d},c,{children:[l,r]}))})})),Xp=n(70);function qp(t){return Object(xt.a)("MuiListItem",t)}var Kp=Object(ht.a)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var Jp=Object(ht.a)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function tf(t){return Object(xt.a)("MuiListItemSecondaryAction",t)}Object(ht.a)("MuiListItemSecondaryAction",["root","disableGutters"]);const ef=["className"],nf=Object(bt.a)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})((({ownerState:t})=>Object(z.a)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0}))),rf=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiListItemSecondaryAction"}),{className:r}=n,o=Object(N.a)(n,ef),i=I.useContext($p),a=Object(z.a)({},n,{disableGutters:i.disableGutters}),s=(t=>{const{disableGutters:e,classes:n}=t,r={root:["root",e&&"disableGutters"]};return Object(vt.a)(r,tf,n)})(a);return Object($.jsx)(nf,Object(z.a)({className:Object(et.a)(s.root,r),ownerState:a,ref:e},o))}));rf.muiName="ListItemSecondaryAction";var of=rf;const af=["className"],sf=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],lf=Object(bt.a)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,"flex-start"===n.alignItems&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]}})((({theme:t,ownerState:e})=>Object(z.a)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&Object(z.a)({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Jp.root}`]:{paddingRight:48}},{[`&.${Kp.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Kp.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Object(Ct.a)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Kp.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Object(Ct.a)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Kp.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===e.alignItems&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Kp.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Object(Ct.a)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Object(Ct.a)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48}))),cf=Object(bt.a)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"});var uf=I.forwardRef((function(t,e){const n=Object(yt.a)({props:t,name:"MuiListItem"}),{alignItems:r="center",autoFocus:o=!1,button:i=!1,children:a,className:s,component:l,components:c={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:h}={},dense:p=!1,disabled:f=!1,disableGutters:m=!1,disablePadding:g=!1,divider:v=!1,focusVisibleClassName:b,secondaryAction:y,selected:A=!1,slotProps:C={},slots:S={}}=n,x=Object(N.a)(n.ContainerProps,af),w=Object(N.a)(n,sf),O=I.useContext($p),E=I.useMemo((()=>({dense:p||O.dense||!1,alignItems:r,disableGutters:m})),[r,O.dense,p,m]),L=I.useRef(null);Object(sp.a)((()=>{o&&L.current&&L.current.focus()}),[o]);const j=I.Children.toArray(a),k=j.length&&Object(Xp.a)(j[j.length-1],["ListItemSecondaryAction"]),_=Object(z.a)({},n,{alignItems:r,autoFocus:o,button:i,dense:E.dense,disabled:f,disableGutters:m,disablePadding:g,divider:v,hasSecondaryAction:k,selected:A}),T=(t=>{const{alignItems:e,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=t,d={root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button","flex-start"===e&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]};return Object(vt.a)(d,qp,r)})(_),P=Object(Xt.a)(L,e),R=S.root||c.Root||lf,D=C.root||u.root||{},B=Object(z.a)({className:Object(et.a)(T.root,D.className,s),disabled:f},w);let F=l||"li";return i&&(B.component=l||"div",B.focusVisibleClassName=Object(et.a)(Kp.focusVisible,b),F=Le),k?(F=B.component||l?F:"div","li"===d&&("li"===F?F="div":"li"===B.component&&(B.component="div")),Object($.jsx)($p.Provider,{value:E,children:Object($.jsxs)(cf,Object(z.a)({as:d,className:Object(et.a)(T.container,h),ref:P,ownerState:_},x,{children:[Object($.jsx)(R,Object(z.a)({},D,!lr(R)&&{as:F,ownerState:Object(z.a)({},_,D.ownerState)},B,{children:j})),j.pop()]}))})):Object($.jsx)($p.Provider,{value:E,children:Object($.jsxs)(R,Object(z.a)({},D,{as:F,ref:P},!lr(R)&&{ownerState:Object(z.a)({},_,D.ownerState)},B,{children:[j,y&&Object($.jsx)(of,{children:y})]}))})})),df=n(76),hf=n.n(df);function pf(t){return I.default.createElement("div",{style:{top:0,width:"100%",marginTop:"1px",marginLeft:"1px",height:"calc(100% - 2px)",position:"absolute",backgroundColor:gt.b.getColorValue(t.config.backgroundColor),display:"flex",alignItems:"right",justifyContent:"right"}},I.default.createElement(hf.a,{style:{height:"100%",color:gt.b.getColorValue(t.config.iconColor),paddingRight:t.visibleOffset/2,cursor:"pointer"}}))}var ff=n(99);function mf(t,e,n,r,o){const[i,a]=I.useState((()=>o&&n?n(t).matches:r?r(t).matches:e));return Object(sp.a)((()=>{let e=!0;if(!n)return;const r=n(t),o=()=>{e&&a(r.matches)};return o(),r.addListener(o),()=>{e=!1,r.removeListener(o)}}),[t,n]),i}const gf=I.useSyncExternalStore;function vf(t,e,n,r,o){const i=I.useCallback((()=>e),[e]),a=I.useMemo((()=>{if(o&&n)return()=>n(t).matches;if(null!==r){const{matches:e}=r(t);return()=>e}return i}),[i,t,r,o,n]),[s,l]=I.useMemo((()=>{if(null===n)return[i,()=>()=>{}];const e=n(t);return[()=>e.matches,t=>(e.addListener(t),()=>{e.removeListener(t)})]}),[i,n,t]);return gf(l,s,a)}function bf(t,e={}){const n=Object(Q.a)(),r="undefined"!=typeof window&&"undefined"!=typeof window.matchMedia,{defaultMatches:o=!1,matchMedia:i=(r?window.matchMedia:null),ssrMatchMedia:a=null,noSsr:s=!1}=Object(ff.a)({name:"MuiUseMediaQuery",props:e,theme:n});let l="function"==typeof t?t(n):t;l=l.replace(/^@media( ?)/m,"");return(void 0!==gf?vf:mf)(l,o,i,a,s)}const yf=0,Af=800,Cf=1200;function Sf(t){switch(t){case"mobile":return bf("(min-width:"+yf+"px) and (max-width:"+(Af-1)+"px)");case"tablet":return bf("(min-width:"+Af+"px) and (max-width:"+(Cf-1)+"px)");case"desktop":return bf("(min-width:"+Cf+"px)")}}const xf=150;function wf(t){const[e,n]=Object(I.useState)(0),[r,o]=Object(I.useState)(!1);let i;const a=Fp((t=>{let e=a.startPoint.current.x-t.x;e<0?a.stop():n(-e)}),(e=>{if(e.x===a.startPoint.current.x)return;if(a.startPoint.current.x-e.x>75){const e=t.animateBackAfterDelete?()=>{c(0)}:void 0;c(xf,e)}else c(0)}),(()=>{c(0)})),s=Object(I.useContext)(Lh),l=s.useBarcodeMappedData(t.barcode);Object(I.useEffect)((()=>{const e={barcode:t.barcode,callback:()=>t.onDelete(t.barcode)};return s.addOnEvictionListener(e),()=>{s.removeOnEvictionListener(e)}}),[]);const c=(e,r)=>{const a=e>=xf,s=-i.getBoundingClientRect().width;n(a?s:0),o(!0),setTimeout((()=>{o(!1),a&&t.onDelete(t.barcode),r&&r()}),200)},u=Sf("desktop")&&t.swipeToDeleteConfig.enabled,d=!u&&t.swipeToDeleteConfig.enabled;return Object(I.useEffect)((()=>{d||c(0)}),[d]),I.default.createElement(mt,{sx:{px:2},style:{width:"100%",paddingRight:0},ref:t=>{t&&(i=t)}},I.default.createElement(pf,{config:t.swipeToDeleteConfig,visibleOffset:xf}),I.default.createElement(mt,Object.assign({sx:{width:"100%",backgroundColor:gt.b.getColorValue(t.sheetColor),transform:`translateX(${e}px)`,transition:r?"transform 200ms ease-in-out":void 0,touchAction:"pan-y",display:"flex",alignItems:"center",paddingTop:"16px",paddingBottom:"16px",columnGap:"16px"}},d?a.props:{}),I.default.createElement(Wn,Object.assign({barcodeMappedData:l},t)),null!==t.readonlyCount&&I.default.createElement(mt,{sx:{fontSize:18,marginTop:"auto",flex:1,textAlign:"right",color:gt.b.getColorValue("?sbColorOnSurfaceVariant")}},"x",t.readonlyCount),u&&I.default.createElement(hf.a,{sx:{height:"100%",marginLeft:"auto",cursor:"pointer",color:gt.b.getColorValue("?sbColorOnSurface")},onClick:()=>t.onDelete(t.barcode)}),I.default.createElement(mt,{sx:{width:"0px"}})))}function Of(t){const e=gt.b.getColorValue(t.sheetContent.dividerColor),n=t.sheetContent.manualCountChangeEnabled&&"COUNTING"===t.mode,r=(e,n)=>{let r=t.indicatorColor.partial;return n===e.count?r=t.indicatorColor.complete:0===n&&(r=t.indicatorColor.notScanned),gt.b.getColorValue(r)};return I.default.createElement(I.default.Fragment,null,I.default.createElement(or,{style:{borderColor:e}}),t.barcodes.length>0&&I.default.createElement(mt,{sx:{width:"auto",flex:1,overflowY:"auto",overflowX:"hidden"},role:"presentation"},I.default.createElement(Zp,{sx:{p:0}},t.barcodes.map((({barcode:o,count:i},a)=>{const s=t.expectedBarcodes.find((t=>t.barcodeValue===o.text));return I.default.createElement(uf,{key:a,sx:{padding:0,borderBottom:`1px solid ${e}`}},t.indicatorColor&&I.default.createElement("div",{style:{display:"flex",width:4,height:"100%",backgroundColor:r(s,i),position:"absolute"}}),I.default.createElement(wf,{barcode:o,animateBackAfterDelete:t.animateBackAfterDelete,onDelete:()=>t.onBarcodeChange({type:"remove",barcode:o}),counterForm:n&&{counter:i,manualCountChangeColor:t.sheetContent.manualCountChangeColor,manualCountOutlineColor:t.sheetContent.manualCountOutlineColor,addButtonEnabled:void 0===s||s.count>i,removeButtonEnabled:void 0===s||i>0,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}))})))))}var Ef=n(105),Lf=n.n(Ef);var jf=t=>{const e=I.useRef({});return I.useEffect((()=>{e.current=t})),e.current};function kf(t){return Object(xt.a)("MuiBadge",t)}var _f=Object(ht.a)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);const Tf=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],Pf=yt.a,Rf=Object(bt.a)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,e)=>e.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Df=Object(bt.a)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.badge,e[n.variant],e[`anchorOrigin${Object(At.a)(n.anchorOrigin.vertical)}${Object(At.a)(n.anchorOrigin.horizontal)}${Object(At.a)(n.overlap)}`],"default"!==n.color&&e[`color${Object(At.a)(n.color)}`],n.invisible&&e.invisible]}})((({theme:t})=>{var e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(e=t.vars)?e:t).palette).filter((e=>{var n,r;return(null!=(n=t.vars)?n:t).palette[e].main&&(null!=(r=t.vars)?r:t).palette[e].contrastText})).map((e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:t})=>"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${_f.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}}));var Bf=I.forwardRef((function(t,e){var n,r,o,i,a,s;const l=Pf({props:t,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:u,component:d,components:h={},componentsProps:p={},children:f,overlap:m="rectangular",color:g="default",invisible:v=!1,max:b=99,badgeContent:y,slots:A,slotProps:C,showZero:S=!1,variant:x="standard"}=l,w=Object(N.a)(l,Tf),{badgeContent:O,invisible:E,max:L,displayValue:j}=function(t){const{badgeContent:e,invisible:n=!1,max:r=99,showZero:o=!1}=t,i=jf({badgeContent:e,max:r});let a=n;!1!==n||0!==e||o||(a=!0);const{badgeContent:s,max:l=r}=a?i:t;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}}({max:b,invisible:v,badgeContent:y,showZero:S}),k=jf({anchorOrigin:c,color:g,overlap:m,variant:x,badgeContent:y}),_=E||null==O&&"dot"!==x,{color:T=g,overlap:P=m,anchorOrigin:R=c,variant:D=x}=_?k:l,B="dot"!==D?j:void 0,F=Object(z.a)({},l,{badgeContent:O,invisible:_,max:L,displayValue:B,showZero:S,anchorOrigin:R,color:T,overlap:P,variant:D}),I=(t=>{const{color:e,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=t,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Object(At.a)(n.vertical)}${Object(At.a)(n.horizontal)}`,`anchorOrigin${Object(At.a)(n.vertical)}${Object(At.a)(n.horizontal)}${Object(At.a)(o)}`,`overlap${Object(At.a)(o)}`,"default"!==e&&`color${Object(At.a)(e)}`]};return Object(vt.a)(s,kf,a)})(F),M=null!=(n=null!=(r=null==A?void 0:A.root)?r:h.Root)?n:Rf,W=null!=(o=null!=(i=null==A?void 0:A.badge)?i:h.Badge)?o:Df,V=null!=(a=null==C?void 0:C.root)?a:p.root,U=null!=(s=null==C?void 0:C.badge)?s:p.badge,H=mr({elementType:M,externalSlotProps:V,externalForwardedProps:w,additionalProps:{ref:e,as:d},ownerState:F,className:Object(et.a)(null==V?void 0:V.className,I.root,u)}),G=mr({elementType:W,externalSlotProps:U,ownerState:F,className:Object(et.a)(I.badge,null==U?void 0:U.className)});return Object($.jsxs)(M,Object(z.a)({},H,{children:[f,Object($.jsx)(W,Object(z.a)({},G,{children:B}))]}))}));function Ff(t){return I.default.createElement(Bf,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:t.text,showZero:!0,color:"primary",overlap:"circular",slotProps:{badge:{style:{backgroundColor:t.backgroundColor,color:t.foregroundColor,fontWeight:"bold"}}}},t.children)}function If(t){if(!t.buttonStyling.visible)return null;return I.default.createElement(mt,{style:t.style},I.default.createElement(Ff,{text:t.text,backgroundColor:gt.b.getColorValue(t.buttonStyling.badgeBackgroundColor),foregroundColor:gt.b.getColorValue(t.buttonStyling.badgeForegroundColor)},I.default.createElement(Ao,{sx:{backgroundColor:gt.b.getColorValue(t.buttonStyling.backgroundColor),width:60,height:60,"&:hover, &:focus":{backgroundColor:gt.b.getColorValue(t.buttonStyling.activeBackgroundColor),outline:"none"}},onClick:t.onClick,disableRipple:!0,disableFocusRipple:!0},I.default.createElement(Lf.a,{sx:{color:gt.b.getColorValue(t.buttonStyling.foregroundColor),fontSize:"24pt","&:hover, &:focus":{color:gt.b.getColorValue(t.buttonStyling.activeForegroundColor)}}}))))}const Mf=(t,e)=>(null===t.format||null===e.format||t.format===e.format)&&t.text===e.text,Wf=(t,e)=>t.find((t=>((t,e)=>t.barcodeValue===e.text)(t,e)));class zf{constructor(t,e){this.expectedCount=t,this.foundCount=e}isFulFilled(){return void 0!==this.expectedCount&&void 0!==this.foundCount&&this.expectedCount===this.foundCount}toString(){return`${this.foundCount}/${this.expectedCount}`}}function Nf(t){const e=Object(I.useContext)(gt.a).getColorValue,n={backgroundColor:e(t.sheetColor)};return I.default.createElement(fo,{modalOverlayColor:t.modalOverlayColor,open:t.open},I.default.createElement(Ye,{sx:Object.assign(Object.assign({},n),{p:2,pb:1,textAlign:"center"})},I.default.createElement(Vt,{sx:{fontSize:"16pt",fontWeight:"bold"}},I.default.createElement(Qt.a,{config:t.title})),I.default.createElement(Vt,{sx:{fontSize:"14pt",lineHeight:"16pt"}},I.default.createElement(Qt.a,{config:t.subtitle}))),I.default.createElement(qe,{sx:Object.assign(Object.assign({},n),{pt:1})},I.default.createElement(Kn,{container:!0,spacing:2},I.default.createElement(Kn,{item:!0,xs:12},I.default.createElement(or,{color:e(t.dividerColor)})),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({style:{width:"100%"},icon:t.cancelButton.icon,onClick:t.cancelButton.onClick},t.cancelButton.style))),I.default.createElement(Kn,{item:!0,xs:6},I.default.createElement(ir,Object.assign({style:{width:"100%"},icon:t.okButton.icon,onClick:t.okButton.onClick},t.okButton.style))))))}function Vf(t){return t.open?I.default.createElement(Nf,{open:t.open,dividerColor:t.style.dividerColor,modalOverlayColor:t.style.modalOverlayColor,sheetColor:t.style.sheetColor,title:t.style.title,subtitle:t.style.subtitle,cancelButton:{style:t.style.cancelButton,onClick:t.onDismiss},okButton:{style:t.style.okButton,onClick:t.onSubmit}}):null}class Uf{constructor(t,e,n){this.barcodeItemSubtitleText=t,this.foundBarcodes=e,this.expectedBarcodes=n}useBarcodeMappedData(t){var e,n,r;const o=null!==(n=null===(e=this.foundBarcodes.find((e=>Mf(e.barcode,t))))||void 0===e?void 0:e.count.toString())&&void 0!==n?n:"0",i=Wf(this.expectedBarcodes,t);return{state:"LOADED",value:{title:`${null!==(r=i.title)&&void 0!==r?r:t.text}`,subtitle:gt.b.getLocalizedBarcodeText(this.barcodeItemSubtitleText,[o,null==i?void 0:i.count.toString()]),barcodeImage:i.image}}}addOnEvictionListener(){}removeOnEvictionListener(){}}function Hf(t){const e=Object(I.useContext)(Ne);return I.default.createElement(Kn,{item:!0,xs:5,component:"div",zIndex:1050,style:{paddingTop:e.minTopPaddingForContent,height:"100%",flexDirection:"column",display:"flex",backgroundColor:gt.b.getColorValue(t.sheetContent.sheetColor)}},I.default.createElement(mt,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},zIndex:50},I.default.createElement(Cp,Object.assign({},t.headerProps))),t.barcodeList,I.default.createElement(Bp,{isVisible:t.isEmptyStateVisible,style:t.sheetContent}))}var $f=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};function Gf(t){const e=Object(I.useRef)(),n=Object(I.useRef)(new Date("2001-01-01")),[r,o]=Object(I.useReducer)(function(t,e,n,r){return(o,i)=>{const a=t.useCase,s="FindAndPickScanningMode"===a._type,l=s?"COUNTING":a.mode,c=s?a.expectedBarcodes:[],u=t=>{let e=[...o];const n=i.barcodes||[i.barcode];for(const r of n){const n=e.findIndex((t=>Mf(t.barcode,r)));if(-1===n)e.push({barcode:r,count:t(0)});else{const r=e[n];e[n]=Object.assign(Object.assign({},r),{count:t(r.count,r)})}}return e},d=(t,n)=>{var o;if(e.current=new Date,!n)return t;const i=null===(o=Wf(c,n.barcode))||void 0===o?void 0:o.count;return void 0===i||i===t?t:(r(),t+1)};switch(i.type){case"onBarcodesDetected":{if((new Date).getTime()-e.current.getTime()<a.countingRepeatDelay||!n.current)return[...o];if(s)return a.arOverlay.automaticSelectionEnabled?u(d):[...o];const t=a.arOverlay;if(!t.visible||t.automaticSelectionEnabled){let t=!1;return u((n=>{let o="COUNTING"===l?n+1:1;return o===n||t||(e.current=new Date,r()),o}))}return u((t=>t))}case"onARCodeClick":return u(((t,e)=>{if(s)return d(t,e);const n="UNIQUE"===l?1-t:t+1;return n>0&&r(),n}));case"onCountEditDialogChange":{let t=()=>i.count||0;if(s){const e=Wf(c,i.barcode);i.count>e.count&&(t=()=>e.count)}return u(t)}case"setCount":return u(i.computeNewCount);case"remove":return o.map((t=>Object.assign(Object.assign({},t),{count:Mf(t.barcode,i.barcode)?0:t.count})));case"clear":return o.map((t=>Object.assign(Object.assign({},t),{count:0})));case"setHtmlElements":let t=!1;const h=o.map((e=>Mf(e.barcode,i.barcode)?(t=!0,Object.assign(Object.assign({},e),{polygonElement:i.polygonElement,labelElement:i.labelElement})):e));return t||h.push({barcode:i.barcode,count:0,labelElement:i.labelElement,polygonElement:i.polygonElement}),h}}}(t.configuration,n,t.scanningEnabled,(()=>{Oo.INSTANCE.beep(t.configuration.sound),Lo.INSTANCE.vibrate(t.configuration.vibration)})),[]),[i,a]=I.default.useState(null),[s,l]=Object(I.useState)(!1),c=Object(I.useMemo)((()=>"__sb_"+Math.random()),[]),[u,d]=Object(I.useState)(!0),h=t.barcodeMapper,[p,f]=Object(I.useState)(null),m="FindAndPickScanningMode"===t.configuration.useCase._type,g=t.configuration.useCase,v=m?"COUNTING":g.mode,b=Object(I.useRef)(Object.assign(Object.assign({},Fh(t.configuration)),{onBarcodesDetected:t=>{o({type:"onBarcodesDetected",barcodes:t.barcodes})},_onDetectionFailed(t){},onError:t.onError,captureDelay:1e3/60}));Object(I.useEffect)((()=>{if(m){const e=C();for(const n of e){const e=[(t=n.barcodeValue,new k.BarcodeScannerTypes.BarcodeItem({text:t,format:null,quad:[],sourceImage:null,rawBytes:null,upcEanExtension:null,parsedDocument:null}))];o({type:"setCount",barcodes:e,computeNewCount:()=>0})}}var t}),[]),Object(I.useEffect)((()=>{b.current.container=e.current}),[e]),Object(I.useEffect)((()=>{if(m)for(const t of r){const e=g.arOverlay,n=t.polygonElement,r=t.labelElement;if(x(t.barcode)){const o=B(t.barcode);let i=t.count+"/"+o.expectedCount;g.arOverlay.automaticSelectionEnabled||0!==t.count||(i=I.default.createElement(Wh,null)),o.isFulFilled()?(null==n||n.style(gt.b.getPolygonColorValues(e.polygon.completed,e.polygon.visible)),null==r||r.styleBadge(e.badge.completed,I.default.createElement(zh,null))):(null==n||n.style(gt.b.getPolygonColorValues(e.polygon.partiallyScanned,e.polygon.visible)),null==r||r.styleBadge(e.badge.partiallyScanned,i))}else null==n||n.style(gt.b.getPolygonColorValues(e.polygon.rejected,e.polygon.visible)),null==r||r.styleBadge(e.badge.rejected,I.default.createElement(Nh,null))}else for(const t of r){if(t.polygonElement){const e=g.arOverlay.polygon,n=t.count>0?e.selected:e.deselected;t.polygonElement.style(gt.b.getPolygonColorValues(n,e.visible))}t.labelElement&&(t.labelElement.update(Object.assign(Object.assign({},t.labelElement.state.element),{highlighted:t.count>0})),t.labelElement.setCount(t.count))}}),[r]);const y=r.reduce(((t,e)=>t+e.count),0),A=()=>C().every((t=>r.some((e=>e.barcode.text===t.barcodeValue&&e.count===t.count)))),C=()=>m?g.expectedBarcodes:[],S=t=>Wf(C(),t),x=t=>!!S(t),w=()=>m?r.filter((t=>x(t.barcode))):r.filter((t=>t.count>0)),O=()=>$f(this,void 0,void 0,(function*(){const e=w().map((t=>new W.BarcodeScannerUIItem({count:"COUNTING"===v?t.count:1,barcode:t.barcode})));t.onSubmit({items:e})})),E=I.default.createElement(Of,{expectedBarcodes:C(),barcodes:w(),animateBackAfterDelete:m,onBarcodeChange:o,sheetContent:g.sheetContent,onNumberClick:t=>a(t),mode:v,indicatorColor:m&&{partial:g.scanningPartiallyColor,complete:g.scanningCompletedColor,notScanned:g.scanningNotScannedColor}}),L={textReplacementArgs:[y.toString()],leftButton:Object.assign(Object.assign({},g.sheetContent.clearAllButton),{onClick:()=>o({type:"clear"})}),rightButton:Object.assign(Object.assign({},g.sheetContent.submitButton),{onClick:()=>$f(this,void 0,void 0,(function*(){if(m){const t=g;let e=null;t.partialScannedAlertDialogEnabled&&!A()&&(e=t.partialScannedAlertDialog),t.confirmationAlertDialogEnabled&&A()&&(e=t.confirmationAlertDialog),e?f(e):yield O()}else yield O()}))}),title:g.sheetContent.title},j=Sf("mobile"),_="BUTTON"!==g.sheet.mode&&j?"SMALL"===g.sheet.collapsedVisibleHeight?69:128:0,T=j&&"BUTTON"===g.sheet.mode,P=T?76:0,R=(u?80:0)+P,D=Object(I.useContext)(Ne),B=t=>{const e=r.find((e=>e.barcode.text===t.text)),n=S(t);return new zf(null==n?void 0:n.count,null==e?void 0:e.count)},F=C().reduce(((t,e)=>t+e.count),0);m&&L.textReplacementArgs.push(F.toString());const M=m?new Uf(g.sheetContent.barcodeItemSubtitle.text,r,C()):h,z=!m&&0===y;return I.default.createElement(I.default.Fragment,null,I.default.createElement(Lh.Provider,{value:M},I.default.createElement(Kn,{container:!0,sx:{display:"flex",flexDirection:j?"column":"row",height:`calc(${D.remainingVisibleBodyHeight} - ${_}px)`},alignItems:"stretch"},I.default.createElement(Kn,{id:c,item:!0,ref:e,component:"div",xs:j?12:7,zIndex:100},T&&I.default.createElement(If,{style:{position:"absolute",marginTop:`calc(${D.remainingVisibleBodyHeight} - 60px - 8px)`,width:"100%",display:"flex",justifyContent:"center",zIndex:1100},text:m?`${y}/${F}`:y.toString(),onClick:()=>l(!s),buttonStyling:g.sheet.listButton}),I.default.createElement(Bh,{viewFinderPadding:{minTopPadding:D.minTopPaddingForContent,minBottomPadding:R},arOverlay:(()=>{if(m){const t=g.arOverlay;return Object.assign(Object.assign({},t),{counterBadge:Object.assign({},t.badge.partiallyScanned)})}const t=g.arOverlay,e=t.counterBadge;return Object.assign(Object.assign({},t),{counterBadge:Object.assign(Object.assign({},e),{visible:e.visible&&"COUNTING"===v})})})(),containerId:c,barcodeScannerViewConfig:b.current,onCameraPermissionDenied:t.onCameraPermissionDenied,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:16+P,setActionButtonsVisible:d,arOnBarcodeClick:t=>{o({type:"onARCodeClick",barcode:t})},arOnBarcodeEnter:(t,e,n)=>{if(!n||!e)return;o({type:"setHtmlElements",barcode:t,labelElement:n,polygonElement:e})},scanningPaused:s&&j,cameraConfiguration:t.configuration.cameraConfiguration,onLicenseError:t.onError}),j&&I.default.createElement(Mp,{closedSheetVisibleHeight:_,sheetStyle:g.sheet,contentStyle:g.sheetContent,manualCountEditDialog:g.manualCountEditDialog,isPlaceholderVisible:z,onBarcodeChange:t=>o(t),drawerHeaderContentProps:L,isOpen:s,onSwipe:t=>{l("swipe-to-open"===t)}},E)),function(t){switch(t){case"mobile":return bf("(min-width:"+yf+"px)");case"tablet":return bf("(min-width:"+Af+"px)");case"desktop":return bf("(min-width:"+Cf+"px)")}}("tablet")&&I.default.createElement(Hf,{headerProps:L,sheetContent:g.sheetContent,isEmptyStateVisible:z,barcodeList:E})),I.default.createElement(Hp,{barcode:i,dialogStyling:g.manualCountEditDialog,onCancel:()=>a(null),setCounter:(t,e)=>{o({type:"onCountEditDialogChange",barcode:t,count:e}),a(null)}}),I.default.createElement(Vf,{open:null!==p,style:p,onDismiss:()=>f(null),onSubmit:O})))}const Yf=Object(I.createContext)(null),Qf={didCatch:!1,error:null};class Zf extends I.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Qf}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(null!==t){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];null===(e=(n=this.props).onReset)||void 0===e||e.call(n,{args:o,reason:"imperative-api"}),this.setState(Qf)}}componentDidCatch(t,e){var n,r;null===(n=(r=this.props).onError)||void 0===n||n.call(r,t,e)}componentDidUpdate(t,e){const{didCatch:n}=this.state,{resetKeys:r}=this.props;var o,i;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,r)&&(null===(o=(i=this.props).onReset)||void 0===o||o.call(i,{next:r,prev:t.resetKeys,reason:"keys"}),this.setState(Qf))}render(){const{children:t,fallbackRender:e,FallbackComponent:n,fallback:r}=this.props,{didCatch:o,error:i}=this.state;let a=t;if(o){const t={error:i,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof e)a=e(t);else if(n)a=Object(I.createElement)(n,t);else{if(null!==r&&!Object(I.isValidElement)(r))throw i;a=r}}return Object(I.createElement)(Yf.Provider,{value:{didCatch:o,error:i,resetErrorBoundary:this.resetErrorBoundary}},a)}}function Xf(t){const e=Object(I.useRef)(!0);Object(I.useEffect)((()=>(e.current=!0,()=>{e.current=!1})));const[,n]=Object(I.useReducer)((t=>t+1),0),r=Object(I.useRef)();return Object(I.useMemo)((()=>{r.current={loading:!0,value:void 0,error:null}}),[t]),function(t,e){Object(I.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=>{r.current=t,e.current&&n()})),t?r.current:null}var qf=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class Kf{constructor(t,e){this.barcodeItemMapper=t,this.onError=e,this.cache=new Map,this.cacheEntryPendingRetries=[],this.hash=t=>Ro(t),this.onEvictionListeners=new Set}getBarcodeMappedData(t){const e=this.hash(t);if(!this.cache.has(e)){const n=(()=>qf(this,void 0,void 0,(function*(){if(this.barcodeItemMapper){const e=new W.BarcodeScannerUIItem({count:1,barcode:t});return this.barcodeItemMapper(e)}{const e=yield y.toDataUrl(yield hg.instance.imageToJpeg(t.sourceImage));return{title:t.text,subtitle:t.format,barcodeImage:e}}})))();this.cache.set(e,n)}return this.cache.get(e)}useBarcodeMappedData(t){const e=Object(I.useRef)(!1),n=Xf(t&&this.getBarcodeMappedData(t));if(Object(I.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 r;return r=n.value?"LOADED":n.error&&!e.current?"RETRY_DIALOG_OPEN":n.error?"FAILED":"LOADING",{value:n.value,state:r}}addOnEvictionListener(t){this.onEvictionListeners.add(t)}removeOnEvictionListener(t){this.onEvictionListeners.delete(t)}}W.BarcodeItemErrorState;function Jf(t){return I.default.createElement(Nf,{open:t.open,dividerColor:t.dividerColor,modalOverlayColor:t.modalOverlayColor,sheetColor:t.sheetColor,title:t.title,subtitle:t.subtitle,cancelButton:{style:t.cancelButton,onClick:t.handleCancel},okButton:{style:t.retryButton,icon:Up,onClick:t.handleRetry}})}var tm=n(106),em=n.n(tm);function nm(t){const e=Object(I.useContext)(Ne);return I.default.createElement(mt,{sx:{paddingTop:e.minTopPaddingForContent+"px",overflowY:"scroll",backgroundColor:gt.b.getColorValue(t.config.background)}},I.default.createElement(mt,{sx:{height:e.remainingVisibleBodyHeight,marginLeft:"auto",marginRight:"auto",maxWidth:280,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},t.config.icon.visible&&I.default.createElement(mt,null,I.default.createElement(Rp,{sx:{width:100,height:100,backgroundColor:gt.b.getColorValue(t.config.iconBackground),margin:"24px"}},I.default.createElement(em.a,{sx:{fontSize:50,color:gt.b.getColorValue(t.config.icon.color)}}))),I.default.createElement(Vt,{sx:{fontSize:20,textAlign:"center"}},I.default.createElement(Qt.a,{config:t.config.enableCameraTitle})),I.default.createElement(Vt,{sx:{fontSize:16,textAlign:"center",paddingTop:"12px"}},I.default.createElement(Qt.a,{config:t.config.enableCameraExplanation})),I.default.createElement(mt,{sx:{paddingTop:"16px"}},I.default.createElement(ze,Object.assign({},t.config.closeButton,{onClick:t.onAppClose})))))}function rm(t){const e=Object(I.useRef)(Object(dt.a)({palette:{primary:{main:Io.ScanbotPrimary},secondary:{main:Io.DarkGray}}})),[n,r]=Object(I.useState)(!1),[o,i]=Object(I.useState)(!1),[a,s]=Object(I.useState)(t.configuration.timeouts.initialScanDelay<=0),l=Object(I.useRef)(!1),c=Object(I.useRef)(),u=Object(I.useRef)(),d=t.configuration.useCase,h="FindAndPickScanningMode"===d._type?null:d.barcodeInfoMapping,p=Object(I.useMemo)((()=>new Kf(null==h?void 0:h.barcodeItemMapper,((t,e)=>{r(!0),c.current=()=>{r(!1),t()},u.current=()=>{r(!1),e()}}))),[]);let f;if(Object(I.useMemo)((()=>{gt.b.setPalette(t.configuration.palette),gt.b.setBarcodeTextLocalization(t.configuration.localization)}),[t.configuration]),Object(I.useEffect)((()=>{if(t.configuration.timeouts.autoCancelTimeout>0){const e=setTimeout((()=>{t.onClose()}),t.configuration.timeouts.autoCancelTimeout);return()=>{clearTimeout(e)}}}),[]),Object(I.useEffect)((()=>{if(t.configuration.timeouts.initialScanDelay>0){const e=setTimeout((()=>{s(!0)}),t.configuration.timeouts.initialScanDelay);return()=>{clearTimeout(e)}}}),[]),Object(I.useEffect)((()=>{l.current=!n&&a}),[n,a]),"SingleScanningMode"===d._type)f=I.default.createElement(Mh,{configuration:t.configuration,barcodeMapper:p,onClose:t.onClose,onSubmit:t.onSubmit,onError:t.onError,onCameraPermissionDenied:()=>i(!0),scanningEnabled:l});else{if("MultipleScanningMode"!==d._type&&"FindAndPickScanningMode"!==d._type)throw new Error("Unsupported use case type");f=I.default.createElement(Gf,{configuration:t.configuration,barcodeMapper:p,onSubmit:t.onSubmit,onError:t.onError,onCameraPermissionDenied:()=>i(!0),scanningEnabled:l})}return I.default.createElement(I.default.Fragment,null,I.default.createElement(Gt,null),I.default.createElement(Zf,{onError:t.onError,fallback:I.default.createElement("div",null,"Error")},I.default.createElement(gt.a.Provider,{value:Object(gt.c)(t.configuration.palette)},I.default.createElement(tt,{theme:e.current},h&&I.default.createElement(Jf,Object.assign({open:n,handleCancel:u.current,handleRetry:c.current,modalOverlayColor:h.modalOverlayColor,dividerColor:h.dividerColor,sheetColor:h.sheetColor},h.errorState)),I.default.createElement(mt,{sx:{height:`100 * ${$t}`,width:"100vw",backgroundColor:gt.b.getColorValue(t.configuration.backgroundColor)}},I.default.createElement(Ve,Object.assign({onBackPress:t.onClose},t.configuration.topBar),!o&&f,o&&I.default.createElement(nm,{onAppClose:t.onClose,config:t.configuration.cameraPermission})))))))}var om=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class im{static createBarcodeScanner(t){return new Promise(((e,n)=>{Oo.INSTANCE.initialize(t.sound);const r=im.createContainer("barcode-scanner-controller"),o=Object(M.createRoot)(r),i=()=>om(this,void 0,void 0,(function*(){return new Promise((t=>{window.setTimeout((()=>{o.unmount(),document.body.removeChild(r),t()}),0)}))})),a=t=>om(this,void 0,void 0,(function*(){yield i(),n(t)}));o.render(I.default.createElement(rm,{configuration:t,onClose:()=>om(this,void 0,void 0,(function*(){yield i(),e(null)})),onSubmit:t=>om(this,void 0,void 0,(function*(){yield i(),e(t)})),onError:a})),(()=>{om(this,void 0,void 0,(function*(){try{const t=yield hg.instance.getLicenseInfo();t.isValid()||(yield a(new P(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}}im.Config=W;var am=im,sm=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class lm{constructor(t,e){this._sdk=t,this._recognizer=e}recognize(t,e,n="COPY_IMAGE"){return sm(this,void 0,void 0,(function*(){const r=this._sdk.getBridge(n);return yield r.genericDocumentRecognizerRecognize(this._recognizer,t,new k.GenericDocumentRecognizerTypes.RecognitionParameters(e))}))}release(){return sm(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._recognizer)}))}}const cm={OK:"Capturing your document... Please do not move the camera.",OK_SMALL_SIZE:"The document is too small. Try moving closer.",OK_BAD_ANGLES:"This is a bad camera angle. Hold the device straight over the document.",OK_BAD_ASPECT_RATIO:"Rotate the device sideways, so that the document fits better into the screen.",OK_OFF_CENTER:"Try holding the device at the center of the document.",OK_TOO_DARK:"A document was detected, but it is too dark. Try turning on a light.",OK_ORIENTATION_MISMATCH:"The document seems to be upside down. Please rotate the device or document",ERROR_NOTHING_DETECTED:"Please hold the device over a document to start scanning.",ERROR_TOO_DARK:"It is too dark. Try turning on a light.",ERROR_NOISE:"Please move the document to a clear surface.",NOT_ACQUIRED:"Scanning failed."};class um{constructor(t){this.hint=t}}class dm{constructor(){this.outline=new hm,this.captureButton=new gm}}class hm{constructor(){this.polygon=new pm,this.path=new fm,this.label=new mm}}class pm{constructor(){this.strokeCapturing="green",this.strokeSearching="yellow",this.fillCapturing="transparent",this.fillSearching="transparent"}}class fm{constructor(){this.stroke="green",this.strokeWidth=4}}class mm{}class gm{constructor(){this.color="#FFF"}}class vm extends L.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_4K),this.detectionParameters=new k.DocumentDetectorTypes.DocumentDetectorParameters,this.autoCaptureEnabled=!0,this.autoCaptureSensitivity=.66,this.autoCaptureDelay=1e3,this.ignoreBadAspectRatio=!0,this.useImageCaptureAPI=!1,this.text=new um(cm),this.style=new dm,this.onDocumentDetected=function(t){}}static fromJson(t){var e;const n=new vm;if(this.mapValues(t,n,["text","style","videoConstraints","detectionParameters"]),n.detectionParameters=new k.DocumentDetectorTypes.DocumentDetectorParameters(null!==(e=t.detectionParameters)&&void 0!==e?e:{}),t.text&&t.text.hint&&this.mapValues(t.text.hint,n.text.hint),t.style){this.mapValues(t.style,n.style,["outline","captureButton"]);const e=t.style.outline;if(e){this.mapValues(e,n.style.outline,["polygon","path","label"]);const t=e.polygon;t&&this.mapValues(t,n.style.outline.polygon);const r=e.path;r&&this.mapValues(r,n.style.outline.path);const o=e.label;o&&this.mapValues(o,n.style.outline.label)}const r=t.style.captureButton;r&&this.mapValues(r,n.style.captureButton)}return this.mapVideoConstraints(t,n),n}}var bm=n(85),ym={insert:"head",singleton:!1};Zd()(bm.a,ym),bm.a.locals;class Am extends I.default.Component{constructor(){super(...arguments),this.LINE_COUNT=4}render(){return I.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],r=this.props.points[(e+1)%this.LINE_COUNT];t.push(I.default.createElement("line",{key:e,style:this.props.polygonStyle,className:this.props.polygonClasses,x1:n.x,y1:n.y,x2:r.x,y2:r.y}))}return t}setFrame(){window.requestAnimationFrame((()=>this.forceUpdate()))}}Am.CLASSNAME="scanbot-document-outline";class Cm extends I.default.Component{constructor(t){super(t),this.state={points:[],animatedPoints:[],isOk:!1,isVisible:!1}}update(t,e,n,r){const o={points:t,animatedPoints:e,isOk:n,isVisible:r};this.setState(o)}pointStringOrLatestValidPoints(t){return t&&t.length>0?Fd.a.toSvgString(t):Fd.a.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=Jd()(Am.CLASSNAME,{[`${Am.CLASSNAME}-ok`]:this.state.isOk},{[`${Am.CLASSNAME}-visible`]:this.state.isVisible},{[`${Am.CLASSNAME}-hidden`]:!this.state.isVisible});return I.default.createElement(Dd.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 Sm=Cm;class xm extends I.default.Component{constructor(t){super(t),this.state={path:void 0}}render(){var t,e;return this.state.path?I.default.createElement(Dd.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:`${Am.CLASSNAME}-path`}):null}animate(t){const e="M"+Fd.a.toSvgString(t)+"z";this.setState({path:e})}clear(){this.setState({path:void 0})}}class wm extends I.default.Component{render(){return I.default.createElement(Dd.svg,{style:{width:"100%",height:"100%",position:"absolute",overflow:"visible"}},I.default.createElement(Sm,{ref:t=>this.polygon=t,style:this.props.polygonStyle}),I.default.createElement(xm,{ref:t=>this.path=t,style:this.props.pathStyle,duration:this.props.autoCaptureSensitivity}))}update(t,e,n){var r;const o="processing"!==n&&!!t,i=null!==(r=this.previous)&&void 0!==r?r:t,a=this.previous?t:void 0;this.polygon.update(i,a,e,o),this.previous=t,this.previous&&"capturing"===n?this.animateCapturing():this.clearAnimation()}animateCapturing(){this.path.animate(this.previous)}clearAnimation(){this.path.clear()}}class Om extends I.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,r="searching"===this.props.action||"capturing"===this.props.action,o="processing"!==this.props.action&&n,i=Jd()({[this.hintLabelClassName]:!0,[`${this.hintLabelClassName}-visible`]:o,[`${this.hintLabelClassName}-hidden`]:!o});return I.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",left:0,top:0}},I.default.createElement(wm,{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:o,autoCaptureSensitivity:this.props.autoCaptureSensitivity}),r&&I.default.createElement("label",{ref:t=>this.label=t,style:this.props.style.label,className:i,dangerouslySetInnerHTML:{__html:e}}))}update(t,e,n){this.polygon.update(e,t,this.props.action),this.label&&(this.label.innerHTML=n)}}class Em{static isConvex(t){if(t.length<4)return!0;let e=!1,n=t.length;for(let r=0;r<n;r++){const o=t[(r+2)%n].x-t[(r+1)%n].x,i=t[(r+2)%n].y-t[(r+1)%n].y,a=t[r].x-t[(r+1)%n].x,s=o*(t[r].y-t[(r+1)%n].y)-i*a;if(0==r)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],r=Fd.a.subtract(t[1],n),o=e[0],i=Fd.a.subtract(e[1],o);if(0===Fd.a.cross(r,i))return;const a=Fd.a.cross(Fd.a.subtract(o,n),r)/Fd.a.cross(r,i);return Fd.a.add(o,Fd.a.multiply(i,a))}}class Lm{constructor(t,e=Lm.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 Em.distanceBetweenPoints(t,e)/this.maxDistance>this.sensitivity}calculateMaxDistance(t){let e=new Fd.a(0,0),n=new Fd.a(t.width,t.height);return Em.distanceBetweenPoints(e,n)}}Lm.DEFAULT_SENSITIVITY=.5;var jm=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};jo.b;jo.a;class km extends jo.c{constructor(t){if(super(t),this.preventAutoCapture=!1,this.defaultCaptureButtonClick=()=>jm(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(!hg.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=vm.fromJson(this.props.configuration)),this._configuration}get autoCaptureSensitivity(){return 3e3*(1-this.configuration.autoCaptureSensitivity)}static create(t){return jm(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,r)=>{Object(I.render)(I.default.createElement(km,{container:e,configuration:t,onSuccess:n,onFailure:r}),e)}))}))}detectAndCrop(){var t,e,n;return jm(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(km.DETECT_AND_CROP_RESOLUTION,this.configuration.useImageCaptureAPI);if(!e)return;return F.a.debug("Detect & Crop document of size: "+e.height*e.width),yield this.bridge.transferArgs.detectAndCropDocument(e)}}catch(t){null===(n=(e=this.configuration).onError)||void 0===n||n.call(e,t)}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 jm(this,void 0,void 0,(function*(){t.componentDidMount.call(this),this.detect(),this.recognizer=this.bridge.copyArgs.createDocumentDetector(new k.DocumentDetectorTypes.DocumentDetectorParameters(this.configuration.detectionParameters)),this.recognizer.catch((t=>{var e,n;return null===(n=(e=this.configuration).onError)||void 0===n?void 0:n.call(e,t)}))}))}componentWillUnmount(){const t=Object.create(null,{componentWillUnmount:{get:()=>super.componentWillUnmount}});return jm(this,void 0,void 0,(function*(){t.componentWillUnmount.call(this),this.handleAutoCapture(!1),yield hg.instance.release(yield this.recognizer,"Document Scanner")}))}detect(){var t,e;return jm(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;this.camera.reusableImageBuffer=t.originalImage.data;const e=this.getStatusString(t),n="OK"===e,r=e.startsWith("OK")?this.scalePolygonPointsToPixels(t.pointsNormalized):void 0;this.outline.update(n,r,v.getProperty(this.configuration.text.hint,e)),yield this.handleAutoCapture(n,r)}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_BAD_ASPECT_RATIO"===t.status?"OK":t.status}detectInWebWorker(){var t,e,n;return jm(this,void 0,void 0,(function*(){try{const e=yield null===(t=this.camera)||void 0===t?void 0:t.createImageData(jo.c.DEFAULT_DETECTION_RESOLUTION,!1);return e&&this.enabled?yield this.bridge.transferArgs.documentDetectorDetect(yield this.recognizer,e):null}catch(t){return null===(n=(e=this.configuration).onError)||void 0===n||n.call(e,t),null}}))}handleAutoCapture(t,e){return jm(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 Lm(t)}if(this.runMovementPredicate(e))return this.updateButton("searching"),clearTimeout(this.autoCaptureToken),void(this.autoCaptureToken=void 0);this.autoCaptureToken=setTimeout((()=>jm(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(null==t?void 0:t.pointsNormalized){const e=this.scalePolygonPointsToPixels(t.pointsNormalized);if(this.runMovementPredicate(e))return}(null==t?void 0:t.status.startsWith("OK"))&&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:r}=this.state,{configuration:o}=this,i=null===(t=o.style)||void 0===t?void 0:t.captureButton;return I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),I.default.createElement(ko.a,{configuration:this.configuration,videoConstraints:o.videoConstraints,mirrored:o.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}}),I.default.createElement(Om,{ref:t=>{this.outline=t},style:null===(n=o.style)||void 0===n?void 0:n.outline,action:r,autoCaptureSensitivity:this.autoCaptureSensitivity}),I.default.createElement(eh,{color:(null==i?void 0:i.color)?i.color:"FFF",action:r,onClick:this.enabled?o.onCaptureButtonClick||this.defaultCaptureButtonClick:()=>{}}))}scalePolygonPointsToPixels(t){if(t){const e=this.getCameraFrameSize(),n=ah.a.fromHtmlElement(this.camera.video),r=bh.findScale(n,e);t=(t=bh.convertToViewportPointsFromParentSize(e,t)).map((t=>Fd.a.scaleToPoint(t,r.x,r.y,r.scale)))}return t}runMovementPredicate(t){const e=this.polygonMovementPredicate.check(t);return this.polygonMovementPredicate.update(t),e}getCameraFrameSize(){return this.camera.calculateFrameSize(jo.c.DEFAULT_DETECTION_RESOLUTION,this.camera.videoSize().width,this.camera.videoSize().height)}}km.DETECT_AND_CROP_RESOLUTION=0;var _m=km;class Tm extends j.a{constructor(){super(L.a.DEFAULT_VIDEO_RESOLUTION_HD),this.recognizerConfiguration=new k.MRZTypes.RecognizerConfiguration,this.onMrzDetected=function(t){},this.finder.aspectRatio=new k.Geometry.AspectRatio({width:4,height:1}),this.userGuidance.title.text="Please hold the device over the MRZ code to start scanning"}static fromJson(t){const e=new Tm;return this.mapValues(t,e,["style","videoConstraints","finder","userGuidance"]),this.mapFinderConfiguration(e,t),this.mapVideoConstraints(t,e),e}}var Pm=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};jo.a;jo.b;class Rm extends jo.c{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=Tm.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t,e){return Pm(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(((r,o)=>{Object(I.render)(I.default.createElement(Rm,{container:n,configuration:t,onSuccess:r,onFailure:o,mrzRecognizer:e}),n)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return Pm(this,void 0,void 0,(function*(){vh.warn("Mrz detection resumed"),yield this.resume()}))}pauseDetection(){vh.warn("Mrz detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return Pm(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 Pm(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return Pm(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n,r,o;return Pm(this,void 0,void 0,(function*(){const i=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let a=!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(Rm.FRAME_RESOLUTION);if(!r)return;i&&this.forceUpdate();const o=yield this.props.mrzRecognizer.recognize(r,"CONSUME_IMAGE");if(!this.enabled)return;if(null===o)return;this.camera.reusableImageBuffer=null==o?void 0:o.originalImage.data,o.recognitionSuccessful?(delete o.originalImage,a=!0,this.configuration.onMrzDetected(o)):this.configuration._onDetectionFailed&&(null===(n=this.configuration)||void 0===n||n._onDetectionFailed(o.originalImage))}catch(t){null===(o=(r=this.configuration).onError)||void 0===o||o.call(r,t)}finally{a?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 I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),I.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},I.default.createElement(ko.a,{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&&I.default.createElement(_o.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}Rm.FRAME_RESOLUTION=1200;var Dm=Rm,Bm=n(71);class Fm{constructor(){this.disabled=!1,this.color="transparent"}}class Im{constructor(){this.color="white",this.border="1px solid lightgray",this.size=20}}class Mm{constructor(){this.color="#1ec31e",this.width=4}}class Wm{constructor(){this.padding=10}}class zm{constructor(){this.margin=15,this.size=100,this.zoom=1.5}}class Nm{constructor(){this.width=2,this.color="white"}}class Vm{constructor(){this.size=20,this.color="white"}}class Um extends Bm.a{constructor(){super(),this.disableScroll=!0,this.rotations=0,this.style=new Wm,this.style.magneticLines=new Fm,this.style.polygon=new Mm,this.style.polygon.handles=new Im,this.style.magnifier=new zm,this.style.magnifier.border=new Nm,this.style.magnifier.crosshair=new Vm}static fromJson(t){const e=new Um;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 Hm extends I.default.Component{constructor(){super(...arguments),this.BUFFER=4}fromPoint(t){return I.default.createElement("svg",{style:{width:"100%",height:"100%",position:"absolute"}},I.default.createElement("line",{x1:t.start.x.toString(),y1:t.start.y.toString(),x2:t.end.x.toString(),y2:t.end.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,r,o,i;return I.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===(i=null===(o=null===(r=this.props.lines)||void 0===r?void 0:r.vertical)||void 0===o?void 0:o.scaled)||void 0===i?void 0:i.map((t=>this.fromPoint(t))))}snapToClosestIfAnyAreClose(){var t,e,n,r;const o=this.props.movingLine;let i=null===(e=null===(t=this.props.lines)||void 0===t?void 0:t.vertical)||void 0===e?void 0:e.scaled;if(o.isHorizontal&&(i=null===(r=null===(n=this.props.lines)||void 0===n?void 0:n.horizontal)||void 0===r?void 0:r.scaled),!i)return;const a=this.midPoint(o.points[0].coordinates,o.points[1].coordinates),s=i.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:o})}distanceToLine(t,e){const n=e.x-t.start.x,r=e.y-t.start.y,o=t.end.x-t.start.x,i=t.end.y-t.start.y,a=o*o+i*i;if(0===a)return 1/0;const s=(n*o+r*i)/a;let l;return l=s<=0?t.start:s>=1?t.end:new Fd.a(t.start.x+s*o,t.start.y+s*i),Fd.a.distance(e,l)}midPoint(t,e){return new Fd.a((t.x+e.x)/2,(t.y+e.y)/2)}}class $m extends I.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 Gm extends $m{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],r=I.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},I.default.createElement("div",{style:Object.assign({},this.invisibleHandleStyle)}));t.push(r)}return t}cornerTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=Fd.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),r=this.items[e],o=Fd.a.fromHtmlElement(r);this.parentOffset=new Fd.a(n.x-o.x,n.y-o.y),this.props.cornerMoveStart({index:e,point:this.props.points[e]})}cornerTouchMove(t,e){if(!this.parentOffset)return;const n=Fd.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),{x:r,y:o}=Object(Ip.b)({x:n.x-this.parentOffset.x,y:n.y-this.parentOffset.y},this.pointSize,this.props.containerSize),i=this.pointSize/2,a=this.props.points[e];this.props.points[e]=new Fd.a(r+i,o+i),Em.isConvex(this.props.points)?this.props.cornerMoved({index:e,point:this.props.points[e]}):this.props.points[e]=a}cornerTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null,this.props.cornerMoveEnd()}render(){return I.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 Ym extends $m{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 r=this.props.points[this.nextIndex(e)];const o=I.default.createElement("div",{style:Object.assign(Object.assign({},this.pointStyle),{left:n.x+(r.x-n.x)/2-this.pointSize/2+"px",top:n.y+(r.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},I.default.createElement("div",{style:this.invisibleHandleStyle}));t.push(o)}return t}lineTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=Fd.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),r=this.items[e],o=Fd.a.fromHtmlElement(r),i=this.props.points[e],a=this.props.points[this.nextIndex(e)];this.point0Start=v.copy(this.props.points[this.previousIndex(e)]),this.point1Start=v.copy(i),this.point2Start=v.copy(a),this.point3Start=v.copy(this.props.points[this.nextIndex(this.nextIndex(e))]),this.point1Offset=new Fd.a(i.x-o.x,i.y-o.y),this.point2Offset=new Fd.a(a.x-o.x,a.y-o.y),this.parentOffset=new Fd.a(n.x-o.x,n.y-o.y)}lineTouchMove(t,e){if(!this.parentOffset)return;const n=Fd.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),r=this.props.points[this.previousIndex(e)];let o=new Fd.a(null,null),i=new Fd.a(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;o.x=this.point1Start.x+(this.point1Start.x-this.point0Start.x)*(n/(this.point1Start.y-this.point0Start.y)),i.x=this.point2Start.x+(this.point2Start.x-this.point3Start.x)*(n/(this.point2Start.y-this.point3Start.y)),o.y=t,i.y=e}else{const t=s+this.point1Offset.x,e=s+this.point2Offset.x,n=t-this.point1Start.x;o.y=this.point1Start.y+(this.point1Start.y-this.point0Start.y)*(n/(this.point1Start.x-this.point0Start.x)),i.y=this.point2Start.y+(this.point2Start.y-this.point3Start.y)*(n/(this.point2Start.x-this.point3Start.x)),o.x=t,i.x=e}o=Fd.a.clamp(o,this.props.containerSize),i=Fd.a.clamp(i,this.props.containerSize),this.isNearOpposingPoint(this.point1Start,o,r,this.isHorizontal(e)?"y":"x")||this.isNearOpposingPoint(this.point1Start,i,a,this.isHorizontal(e)?"y":"x")||this.areEdgesCrossing(r,o,i,a)||Em.isConvex([r,o,i,a])&&(this.props.points[e].x=o.x,this.props.points[e].y=o.y,this.props.points[this.nextIndex(e)].x=i.x,this.props.points[this.nextIndex(e)].y=i.y,this.props.lineMoved({points:[{index:e,coordinates:o},{index:this.nextIndex(e),coordinates:i}],previousPoint:r,nextPoint:a,isHorizontal:this.isHorizontal(e)}))}lineTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null}isNearOpposingPoint(t,e,n,r){if(t[r]>n[r]){if(e[r]-10<n[r])return!0}else if(e[r]>n[r]-10)return!0;return!1}areEdgesCrossing(t,e,n,r){const o=t.x,i=t.y,a=e.x,s=e.y,l=n.x,c=n.y,u=r.x,d=r.y;return((o-l)*(s-c)-(i-c)*(a-l))*((o-u)*(s-d)-(i-d)*(a-u))<0&&((l-o)*(d-i)-(c-i)*(u-o))*((l-a)*(d-s)-(c-s)*(u-a))<0}render(){return I.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},this.create())}}class Qm extends I.default.Component{render(){return I.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},I.default.createElement(Gm,{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}),I.default.createElement(Ym,{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],r=[t.magneticLine.start,t.magneticLine.end];this.props.coordinatePoints[t.polygonLine.points[0].index]=Em.intersection(e,r),this.props.coordinatePoints[t.polygonLine.points[1].index]=Em.intersection(n,r),this.props.cornerMoveEnd(),this.setFrame()}}class Zm extends I.default.Component{constructor(t){super(t),this.state={movingLine:void 0}}render(){return I.default.createElement("div",null,I.default.createElement(Qm,{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})}}),I.default.createElement(Hm,{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()}}),I.default.createElement(Am,{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 Xm extends I.default.Component{render(){return I.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 qm extends I.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:r,duration:o}=this.props,i=90*(n-1),a=90*n;this.previousScale||(this.previousScale=1);const s=Y.d`
185
185
  from {transform: rotate(${i}deg) scale(${this.previousScale}); }
186
186
  to {transform: rotate(${a}deg) scale(${r});
187
- }`,l=Y.c.div`position: absolute; animation: ${s} ${o}s;`;return this.previousScale=r,I.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"},ref:t=>this.container=t},I.default.createElement(l,{style:{width:this.calculate(t,"width"),height:this.calculate(t,"height"),transform:`rotate(${a}deg) scale(${r})`,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 Km extends I.default.Component{componentDidMount(){bh.disableScreenMovement()}componentWillUnmount(){bh.enableScreenMovement()}render(){return I.default.createElement("div",null)}}class Jm{constructor(t,e){this.element=t,this.size=e}}class tg{}class eg extends I.default.Component{render(){return I.default.createElement("div",{style:this.props.style},I.default.createElement("svg",null,this.vertical(),this.horizontal()))}half(){return this.props.size/2}vertical(){const t=this.half();return I.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 I.default.createElement("line",{x1:0,y1:t,x2:this.props.size,y2:t,stroke:this.props.color,strokeWidth:"2"})}}class ng extends I.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:g.a.empty(),cropImageFitSize:ah.a.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?I.default.createElement("div",{style:this.style().container},I.default.createElement("img",{style:this.style().image,ref:t=>this.destination=t,src:this.props.src,alt:"."}),I.default.createElement(eg,{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=g.a.fromPoint(Fd.a.scaleUpTo(t.origin,new ah.a(this.props.style.zoom,this.props.style.zoom)),this.props.style.size),n=t.container.width-(this.props.style.margin+this.props.style.size),r=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:r?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 r=t.x,o=t.y,i=this.normalizeRotations(n),a=this.state.container.width/4;return 0===i?r<a&&o<a:1===i?r<a&&o>e.height-a:2===i?r>e.width-a&&o>e.height-a:r>e.width-a&&o<a}setIsVisible(t,e){this.setState({visible:t},e)}normalizeRotations(t){return t%this.MAX_ROTATIONS}}var rg=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class og extends I.default.Component{constructor(t){super(t),this.onResizeCallback=()=>{},this.MAX_ROTATIONS=4,this.BASE_SCALE=1,this.state={image:void 0,documentDetectionResult:void 0,polygon:void 0,calculatedSize:ah.a.empty(),animation:{rotations:0,scale:1,duration:0},points:[],magneticLines:{horizontal:{original:[],scaled:[]},vertical:{original:[],scaled:[]}},imageMargin:Fd.a.empty()},this.onResizeCallback=this.onResize.bind(this)}static create(t){return rg(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,r)=>{Object(I.render)(I.default.createElement(og,{onReady:n,onError:r,container:e,configuration:Um.fromJson(t)}),e)}))}))}componentDidMount(){var t,e,n;return rg(this,void 0,void 0,(function*(){const r=null===(t=this.configuration)||void 0===t?void 0:t.image,o=yield hg.instance.detectAndCropDocument(r),i=yield y.toDataUrl(yield hg.instance.imageToJpeg(r));this.setState({documentDetectionResult:o,image:i,polygon:null!==(n=null===(e=this.configuration)||void 0===e?void 0:e.polygon)&&void 0!==n?n:o.pointsNormalized,magneticLines:{vertical:{original:o.verticalLinesNormalized},horizontal:{original:o.horizontalLinesNormalized}}}),this.props.onReady&&this.props.onReady(this),addEventListener("resize",this.onResizeCallback),addEventListener("orientationchange",this.onResizeCallback)}))}componentWillUnmount(){return rg(this,void 0,void 0,(function*(){removeEventListener("resize",this.onResizeCallback),removeEventListener("orientationchange",this.onResizeCallback)}))}onImageLoaded(t){return rg(this,void 0,void 0,(function*(){ah.a.isEmpty(this.state.calculatedSize)&&(this.htmlImage=t,this.initializeSizes())}))}onResize(){const t=this.state.points.map((t=>new Fd.a(t.x/this.state.calculatedSize.width,t.y/this.state.calculatedSize.height)));this.initializeSizes(t)}initializeSizes(t,e,n){const r=new ah.a(this.htmlImage.naturalWidth,this.htmlImage.naturalHeight),o=new ah.a(this.container.width(),this.container.height()),i=y.getObjectFitSize(o,r),a=new ah.a(i.width,i.height),s=null!=t?t:this.state.polygon,l=bh.convertToViewportPointsFromParentSize(a,s),c=null!=e?e:this.state.magneticLines.horizontal.original,u=null!=n?n:this.state.magneticLines.vertical.original,d=bh.convertLinesToViewportLines(a,c),h=bh.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,r,o,i;const a=Am.CLASSNAME,s=Jd()({[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 I.default.createElement("div",{style:{position:"relative",width:d,height:d,padding:u}},I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.configuration.disableScroll&&I.default.createElement(Km,null),I.default.createElement(ng,{ref:t=>this.magnifier=t,style:this.configuration.style.magnifier}),I.default.createElement(qm,{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===(r=this.state.animation)||void 0===r?void 0:r.duration,imageMargin:this.state.imageMargin},I.default.createElement(Xm,{src:this.state.image,onImageLoaded:t=>this.onImageLoaded(t)}),I.default.createElement(Zm,{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===(o=this.state.animation)||void 0===o?void 0:o.rotations,scale:null===(i=this.state.animation)||void 0===i?void 0:i.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 tg;return e.source=new Jm(this.htmlImage,this.state.calculatedSize),e.container=new ah.a(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 rg(this,void 0,void 0,(function*(){const e=Fd.a.toPolygon(this.state.points,this.state.calculatedSize),n=this.toCoreRotations(this.rotations),r=yield hg.instance.imageCrop(null===(t=this.configuration)||void 0===t?void 0:t.image,e);return{image:yield hg.instance.imageRotate(r,n,"CONSUME_IMAGE"),polygon:e,rotations:this.rotations}}))}toCoreRotations(t){switch(t%this.MAX_ROTATIONS){case 0:return"NONE";case 1:return"CLOCKWISE_90";case 2:return"CLOCKWISE_180";case 3:return"COUNTERCLOCKWISE_90"}}rotate(t){return rg(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(){return rg(this,void 0,void 0,(function*(){const t=this.state.documentDetectionResult;this.initializeSizes(t.pointsNormalized,t.horizontalLinesNormalized,t.verticalLinesNormalized)}))}dispose(){const{container:t}=this.props;if(!t)throw Error("Component wasn't created with openCroppingView. Remove component from render tree to dispose.");Object(I.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=Um.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}}}var ig=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};jo.a;jo.b;class ag extends jo.c{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 ig(this,void 0,void 0,(function*(){const r=document.getElementById(t.containerId);if(!r)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((o,i)=>{Object(I.render)(I.default.createElement(ag,{container:r,configuration:t,onTextDetected:e,onSuccess:o,onFailure:i,textDataScanner:n}),r)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return ig(this,void 0,void 0,(function*(){vh.warn("TextData detection resumed"),yield this.resume()}))}pauseDetection(){vh.warn("TextData detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return ig(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 ig(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return ig(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.props.textDataScanner.cleanRecognitionQueue(),this.paused=!0}detect(){var t,e,n,r;return ig(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 n=yield null===(e=this.camera)||void 0===e?void 0:e.createImageData(ag.FRAME_RESOLUTION);if(!n)return;o&&this.forceUpdate();const r=yield this.props.textDataScanner.recognize(n);if(!this.enabled)return;if(null===r)return;r&&(i=!0,this.props.onTextDetected(r),this.camera.reusableImageBuffer=r.originalImage.data)}catch(t){null===(r=(n=this.configuration).onError)||void 0===r||r.call(n,t)}finally{i?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}render(){var t;return I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),I.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},I.default.createElement(ko.a,{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&&I.default.createElement(_o.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}ag.FRAME_RESOLUTION=1200;var sg=ag,lg=n(65),cg=n(46),ug=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class dg{static get UI(){if(!o.BUILD_WITH_UI)throw new Error("UI components are not included in Scanbot.min.js. Please use ScanbotSDK.ui2.min.js instead.");return dg._ui2}static initialize(t){var e;return ug(this,void 0,void 0,(function*(){const n=new dg,r=t.engine||dg.defaultEnginePath,a=!!t.allowThreads,s=null!==(e=t.requestSuffix)&&void 0!==e?e:`?${n.version}`,l=[t.licenseKey,r,window.location.hostname,o.CDN_PATH+o.DEFAULT_WASM_FOLDER,{captureConsole:!1,allowThreads:a,requestSuffix:s}];return n.bridge=new u(r,{allowSimd:!0,allowThreads:a,requestSuffix:s},l),dg.instance=n,window.scanbotSdk=n,F.a.initialize(t.verboseLogging),t.allowThreads&&!Object(i.a)()&&(F.a.debugWarn("Threads are not available in this environment. The SDK will run in single-threaded mode."),window.hasOwnProperty("crossOriginIsolated")&&!window.crossOriginIsolated&&F.a.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.")),this.cameras.initialize(null==t?void 0:t.bestCameraDetectionStrategy),n}))}createDocumentScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{return e=yield _m.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createMrzScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{const n=new S(this,this.bridge.copyArgs.createMRZRecognizer(t.recognizerConfiguration));return e=yield Dm.create(t,n),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createBarcodeScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{return e=yield Ah.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}openCroppingView(t){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),yield og.create(t)}))}createTextDataScanner(t){return ug(this,void 0,void 0,(function*(){try{t=_.fromJson(t);const e=yield this.createGenericTextLineScanner(t,t.onTextDetected,t.ocrConfiguration);return yield this.licenseCheck(),e}catch(t){throw t}}))}createVINScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{t=T.fromJson(t);const n=e=>{""!==e.rawText&&t.onTextDetected(e)},r=new k.GenericTextLineScannerTypes.ScannerConfiguration(Object.assign(Object.assign({},t.ocrConfiguration),{validator:new k.GenericTextLineScannerTypes.PresetContentValidator({preset:"VEHICLE_IDENTIFICATION_NUMBER"})}));return e=yield this.createGenericTextLineScanner(t,n,r),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createGenericDocumentRecognizerScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{const r=n(121).default;return e=yield r.create(this,t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}toDataUrl(t){return ug(this,void 0,void 0,(function*(){return R.throwIfMissingBuffer(t),yield y.toDataUrl(t)}))}detectDocument(t,e={},n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){yield this.licenseCheck(),R.throwIfMissingBuffer(t);const r=yield this.bridge.copyArgs.createDocumentDetector(e),o=this.getBridge(n),i=yield o.documentDetectorDetect(r,t);return yield this.release(r,"documentDetector"),i}))}detectAndCropDocument(t,e="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){yield this.licenseCheck(),R.throwIfMissingBuffer(t);const n=this.getBridge(e);return yield n.detectAndCropDocument(t)}))}detectBarcodes(t,e={},n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){yield this.licenseCheck(),R.throwIfMissingBuffer(t),"string"==typeof t&&(t=yield y.loadFromUrl(t));const r=Object.assign({},e);r.live=!1;const o=yield this.bridge.copyArgs.createBarcodeRecognizer(r),i=yield this.getBridge(n).recognizeBarcodes(o,t);return yield this.release(o,"barcodeRecognizer"),i}))}parseBarcodeDocument(t,e){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),yield this.bridge.copyArgs.parseBarcodeDocument(t,e)}))}createSimpleMRZRecognizer(){return ug(this,void 0,void 0,(function*(){const t=new k.MRZTypes.RecognizerConfiguration({accumulatedResultsVerifierConfig:{maximumNumberOfAccumulatedFrames:0}});return new S(this,this.bridge.copyArgs.createMRZRecognizer(t))}))}createOcrEngine(){return ug(this,void 0,void 0,(function*(){return new w(this,yield this.bridge.copyArgs.createOcrEngine())}))}createDocumentQualityAnalyzer(t={}){return ug(this,void 0,void 0,(function*(){const e=yield this.bridge.copyArgs.createDocumentQualityAnalyzer(t);return new B(this,e)}))}imageRotate(t,e,n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const r=this.getBridge(n);return yield r.imageRotate(t,e)}))}imageFilter(t,e,n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const r=this.getBridge(n);return yield r.imageApplyFilter(t,e)}))}imageCrop(t,e,n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const r=this.getBridge(n);return yield r.imageCrop(t,e)}))}imageResize(t,e,n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const r=this.getBridge(n);return yield r.imageResize(t,e)}))}getLicenseInfo(){return ug(this,void 0,void 0,(function*(){const t=yield this.bridge.copyArgs.getLicenseInfo();return d.fromJson(t)}))}beginPdf(t){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new p(this,yield this.bridge.copyArgs.beginPdf(t))}))}beginTiff(t={}){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new m(this,yield this.bridge.copyArgs.beginTiff(t))}))}createGenericDocumentRecognizer(t){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new lm(this,yield this.bridge.copyArgs.genericDocumentRecognizerCreate(t))}))}imageToJpeg(t,e="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){yield this.licenseCheck();return this.getBridge(e).encodeJpeg(t)}))}get version(){return o.VERSION}get utils(){return this._utils||(this._utils=new A),this._utils}release(t,e){return ug(this,void 0,void 0,(function*(){t&&(F.a.debug(`Releasing object ${null!=e?e:"unknown"}`),yield this.bridge.copyArgs.releaseObject(t))}))}getBridge(t){return"CONSUME_IMAGE"===t?this.bridge.transferArgs:this.bridge.copyArgs}licenseCheck(){return ug(this,void 0,void 0,(function*(){const t=yield this.getLicenseInfo();if(!t.isValid())throw console.error(`LicenseError: ${t.status}`),new P(t)}))}createGenericTextLineScanner(t,e,n){return ug(this,void 0,void 0,(function*(){const r=this.bridge.copyArgs.createGenericTextLineScanner(n),o=new E(this,r);return yield sg.create(t,e,o)}))}destroy(){this.bridge.destroy(),dg.instance=void 0}}dg.defaultEnginePath="",dg._ui2=o.BUILD_WITH_UI?am:void 0,dg.cameras=cg.a.INSTANCE,dg.Config=k,dg._stats=lg.a.INSTANCE;var hg=e.a=dg},,,,,,function(t,e,n){"use strict";n(2);e.a=function(t,e){return()=>null}},function(t,e,n){"use strict";var r=n(75),o=n.n(r)()((function(t){return t[1]}));o.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=o},function(t,e,n){"use strict";var r=n(75),o=n.n(r)()((function(t){return t[1]}));o.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=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(123);function o(t){if("string"!=typeof t)throw new Error(Object(r.a)(7));return t.charAt(0).toUpperCase()+t.slice(1)}},,,,,,function(t,e){var n,r,o=t.exports={};function i(){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===i||!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:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=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(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}o.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)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";n.r(e),n.d(e,"capitalize",(function(){return o.a})),n.d(e,"createChainedFunction",(function(){return i})),n.d(e,"createSvgIcon",(function(){return a.a})),n.d(e,"debounce",(function(){return s.a})),n.d(e,"deprecatedPropType",(function(){return l})),n.d(e,"isMuiElement",(function(){return c.a})),n.d(e,"ownerDocument",(function(){return u.a})),n.d(e,"ownerWindow",(function(){return d.a})),n.d(e,"requirePropFactory",(function(){return h.a})),n.d(e,"setRef",(function(){return p})),n.d(e,"unstable_useEnhancedEffect",(function(){return f.a})),n.d(e,"unstable_useId",(function(){return m})),n.d(e,"unsupportedProp",(function(){return g})),n.d(e,"useControlled",(function(){return b})),n.d(e,"useEventCallback",(function(){return y.a})),n.d(e,"useForkRef",(function(){return A.a})),n.d(e,"useIsFocusVisible",(function(){return C.a})),n.d(e,"unstable_ClassNameGenerator",(function(){return S}));var r=n(125),o=n(9),i=n(160).a,a=n(67),s=n(69);var l=function(t,e){return()=>null},c=n(70),u=n(56),d=n(57),h=n(83),p=n(129).a,f=n(49),m=n(161).a;var g=function(t,e,n,r,o){return null},v=n(0);var b=function({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=v.useRef(void 0!==t),[i,a]=v.useState(e);return[o?t:i,v.useCallback((t=>{o||a(t)}),[])]},y=n(42),A=n(36),C=n(68);const S={configure:t=>{r.a.configure(t)}}},function(t,e,n){const{render:r,hydrate:o,unmountComponentAtNode:i}=n(0);function a(t){return{render(e){r(e,t)},unmount(){i(t)}}}e.createRoot=a,e.hydrateRoot=function(t,e){return o(e,t),a(t)}},function(t,e,n){"use strict";e.a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},function(t,e,n){"use strict";var r=n(86),o=n(45),i=n(20),a=n(31),s=n(62);const l=function(){function t(t,e,n,o){const s={[t]:e,theme:n},l=o[t];if(!l)return{[t]:e};const{cssProperty:c=t,themeKey:u,transform:d,style:h}=l;if(null==e)return null;if("typography"===u&&"inherit"===e)return{[t]:e};const p=Object(i.b)(n,u)||{};if(h)return h(s);return Object(a.b)(s,e,(e=>{let n=Object(i.c)(p,d,e);return e===n&&"string"==typeof e&&(n=Object(i.c)(p,d,`${t}${"default"===e?"":Object(r.a)(e)}`,e)),!1===c?n:{[c]:n}}))}return function e(n){var r;const{sx:i,theme:l={}}=n||{};if(!i)return null;const c=null!=(r=l.unstable_sxConfig)?r:s.a;function u(n){let r=n;if("function"==typeof n)r=n(l);else if("object"!=typeof n)return n;if(!r)return null;const i=Object(a.a)(l.breakpoints),s=Object.keys(i);let u=i;return Object.keys(r).forEach((n=>{const i=(s=r[n],d=l,"function"==typeof s?s(d):s);var s,d;if(null!=i)if("object"==typeof i)if(c[n])u=Object(o.a)(u,t(n,i,l,c));else{const t=Object(a.b)({theme:l},i,(t=>({[n]:t})));!function(...t){const e=t.reduce(((t,e)=>t.concat(Object.keys(e))),[]),n=new Set(e);return t.every((t=>n.size===Object.keys(t).length))}(t,i)?u=Object(o.a)(u,t):u[n]=e({sx:i,theme:l})}else u=Object(o.a)(u,t(n,i,l,c))})),Object(a.c)(s,u)}return Array.isArray(i)?i.map(u):u(i)}}();l.filterProps=["sx"],e.a=l},function(t,e){t.exports=function(t,e,n,r){var o=n?n.call(r,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=t[c],d=e[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&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";n.d(e,"a",(function(){return o}));var r=n(127);function o(t){const{theme:e,name:n,props:o}=t;return e&&e.components&&e.components[n]&&e.components[n].defaultProps?Object(r.a)(e.components[n].defaultProps,o):o}},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"HighlightOff")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z"}),"ClearAll")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M8.9 6.07 7.48 4.66 9 3h6l1.83 2H20c1.1 0 2 .9 2 2v12c0 .05-.01.1-.02.16L20 17.17V7h-4.05l-1.83-2H9.88zm11.59 17.24L18.17 21H4c-1.1 0-2-.9-2-2V7c0-.59.27-1.12.68-1.49l-2-2L2.1 2.1l19.8 19.8zM9.19 12.02c-.11.31-.19.63-.19.98 0 1.66 1.34 3 3 3 .35 0 .67-.08.98-.19zM16.17 19l-1.68-1.68c-.73.43-1.58.68-2.49.68-2.76 0-5-2.24-5-5 0-.91.25-1.76.68-2.49L4.17 7H4v12zm-1.36-7.02 2.07 2.07c.08-.34.12-.69.12-1.05 0-2.76-2.24-5-5-5-.36 0-.71.04-1.06.12l2.07 2.07c.84.3 1.5.96 1.8 1.79"}),"NoPhotographyOutlined")},function(t,e,n){"use strict";var r=n(2),o=n(7),i=n(123),a=n(110),s=n(132),l=n(62),c=n(96);var u=n(162);var d={black:"#000",white:"#fff"},h=n(95);var p={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var f={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var b={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const y=["mode","contrastThreshold","tonalOffset"],A={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},C={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S(t,e,n,r){const o=r.light||r,i=r.dark||1.5*r;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:"light"===e?t.light=Object(u.d)(t.main,o):"dark"===e&&(t.dark=Object(u.b)(t.main,i)))}function x(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:s=.2}=t,l=Object(o.a)(t,y),c=t.primary||function(t="light"){return"dark"===t?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(e),x=t.secondary||function(t="light"){return"dark"===t?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(e),w=t.error||function(t="light"){return"dark"===t?{main:f[500],light:f[300],dark:f[700]}:{main:f[700],light:f[400],dark:f[800]}}(e),O=t.info||function(t="light"){return"dark"===t?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(e),E=t.success||function(t="light"){return"dark"===t?{main:b[400],light:b[300],dark:b[700]}:{main:b[800],light:b[500],dark:b[900]}}(e),L=t.warning||function(t="light"){return"dark"===t?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(e);function j(t){return Object(u.c)(t,C.text.primary)>=n?C.text.primary:A.text.primary}const k=({color:t,name:e,mainShade:n=500,lightShade:o=300,darkShade:a=700})=>{if(!(t=Object(r.a)({},t)).main&&t[n]&&(t.main=t[n]),!t.hasOwnProperty("main"))throw new Error(Object(i.a)(11,e?` (${e})`:"",n));if("string"!=typeof t.main)throw new Error(Object(i.a)(12,e?` (${e})`:"",JSON.stringify(t.main)));return S(t,"light",o,s),S(t,"dark",a,s),t.contrastText||(t.contrastText=j(t.main)),t},_={dark:C,light:A};return Object(a.a)(Object(r.a)({common:Object(r.a)({},d),mode:e,primary:k({color:c,name:"primary"}),secondary:k({color:x,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:k({color:w,name:"error"}),warning:k({color:L,name:"warning"}),info:k({color:O,name:"info"}),success:k({color:E,name:"success"}),grey:h.a,contrastThreshold:n,getContrastText:j,augmentColor:k,tonalOffset:s},_[e]),l)}const w=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const O={textTransform:"uppercase"},E='"Roboto", "Helvetica", "Arial", sans-serif';function L(t,e){const n="function"==typeof e?e(t):e,{fontFamily:i=E,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:h=16,allVariants:p,pxToRem:f}=n,m=Object(o.a)(n,w);const g=s/14,v=f||(t=>t/h*g+"rem"),b=(t,e,n,o,a)=>{return Object(r.a)({fontFamily:i,fontWeight:t,fontSize:v(e),lineHeight:n},i===E?{letterSpacing:(s=o/e,Math.round(1e5*s)/1e5)+"em"}:{},a,p);var s},y={h1:b(l,96,1.167,-1.5),h2:b(l,60,1.2,-.5),h3:b(c,48,1.167,0),h4:b(c,34,1.235,.25),h5:b(c,24,1.334,0),h6:b(u,20,1.6,.15),subtitle1:b(c,16,1.75,.15),subtitle2:b(u,14,1.57,.1),body1:b(c,16,1.5,.15),body2:b(c,14,1.43,.15),button:b(u,14,1.75,.4,O),caption:b(c,12,1.66,.4),overline:b(c,12,2.66,1,O),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Object(a.a)(Object(r.a)({htmlFontSize:h,pxToRem:v,fontFamily:i,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},y),m,{clone:!1})}function j(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,0.2)`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,0.14)`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,0.12)`].join(",")}var k=["none",j(0,2,1,-1,0,1,1,0,0,1,3,0),j(0,3,1,-2,0,2,2,0,0,1,5,0),j(0,3,3,-2,0,3,4,0,0,1,8,0),j(0,2,4,-1,0,4,5,0,0,1,10,0),j(0,3,5,-1,0,5,8,0,0,1,14,0),j(0,3,5,-1,0,6,10,0,0,1,18,0),j(0,4,5,-2,0,7,10,1,0,2,16,1),j(0,5,5,-3,0,8,10,1,0,3,14,2),j(0,5,6,-3,0,9,12,1,0,3,16,2),j(0,6,6,-3,0,10,14,1,0,4,18,3),j(0,6,7,-4,0,11,15,1,0,4,20,3),j(0,7,8,-4,0,12,17,2,0,5,22,4),j(0,7,8,-4,0,13,19,2,0,5,24,4),j(0,7,9,-4,0,14,21,2,0,5,26,4),j(0,8,9,-5,0,15,22,2,0,6,28,5),j(0,8,10,-5,0,16,24,2,0,6,30,5),j(0,8,11,-5,0,17,26,2,0,6,32,5),j(0,9,11,-5,0,18,28,2,0,7,34,6),j(0,9,12,-6,0,19,29,2,0,7,36,6),j(0,10,13,-6,0,20,31,3,0,8,38,7),j(0,10,13,-6,0,21,33,3,0,8,40,7),j(0,10,14,-6,0,22,35,3,0,8,42,7),j(0,11,14,-7,0,23,36,3,0,9,44,8),j(0,11,15,-7,0,24,38,3,0,9,46,8)];const _=["duration","easing","delay"],T={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},P={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function R(t){return`${Math.round(t)}ms`}function D(t){if(!t)return 0;const e=t/36;return Math.round(10*(4+15*e**.25+e/5))}function B(t){const e=Object(r.a)({},T,t.easing),n=Object(r.a)({},P,t.duration);return Object(r.a)({getAutoHeightDuration:D,create:(t=["all"],r={})=>{const{duration:i=n.standard,easing:a=e.easeInOut,delay:s=0}=r;Object(o.a)(r,_);return(Array.isArray(t)?t:[t]).map((t=>`${t} ${"string"==typeof i?i:R(i)} ${a} ${"string"==typeof s?s:R(s)}`)).join(",")}},t,{easing:e,duration:n})}var F={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const I=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function M(t={},...e){const{mixins:n={},palette:u={},transitions:d={},typography:h={}}=t,p=Object(o.a)(t,I);if(t.vars)throw new Error(Object(i.a)(18));const f=x(u),m=Object(s.a)(t);let g=Object(a.a)(m,{mixins:(v=m.breakpoints,b=n,Object(r.a)({toolbar:{minHeight:56,[v.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[v.up("sm")]:{minHeight:64}}},b)),palette:f,shadows:k.slice(),typography:L(f,h),transitions:B(d),zIndex:Object(r.a)({},F)});var v,b;return g=Object(a.a)(g,p),g=e.reduce(((t,e)=>Object(a.a)(t,e)),g),g.unstable_sxConfig=Object(r.a)({},l.a,null==p?void 0:p.unstable_sxConfig),g.unstable_sx=function(t){return Object(c.a)({sx:t,theme:this})},g}e.a=M},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var r=n(0);const o={};const i=[];class a{constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new a}start(t,e){this.clear(),this.currentId=setTimeout((()=>{this.currentId=0,e()}),t)}}function s(){const t=function(t,e){const n=r.useRef(o);return n.current===o&&(n.current=t(e)),n}(a.create).current;var e;return e=t.disposeEffect,r.useEffect(e,i),t}},function(t,e,n){"use strict";function r(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 i}));var o=/^((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)-.*))$/,i=r((function(t){return o.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(2);function o(t){if("object"!=typeof t||null===t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)}function i(t){if(!o(t))return t;const e={};return Object.keys(t).forEach((n=>{e[n]=i(t[n])})),e}function a(t,e,n={clone:!0}){const s=n.clone?Object(r.a)({},t):t;return o(t)&&o(e)&&Object.keys(e).forEach((r=>{"__proto__"!==r&&(o(e[r])&&r in t&&o(t[r])?s[r]=a(t[r],e[r],n):n.clone?s[r]=o(e[r])?i(e[r]):e[r]:s[r]=e[r])})),s}},function(t,e,n){"use strict";var r=n(0);const o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;e.a=o},function(t,e,n){"use strict";function r(t){return t&&t.ownerDocument||document}n.d(e,"a",(function(){return r}))},,,,,,,function(t,e,n){"use strict";n.r(e),n.d(e,"ScanbotSDK",(function(){return r}));const r=n(77).a},function(t,e,n){"use strict";n.r(e),n.d(e,"jsx",(function(){return c})),n.d(e,"jsxAttr",(function(){return p})),n.d(e,"jsxDEV",(function(){return c})),n.d(e,"jsxEscape",(function(){return f})),n.d(e,"jsxTemplate",(function(){return u})),n.d(e,"jsxs",(function(){return c}));var r=n(12);n.d(e,"Fragment",(function(){return r.b}));var o=/["&<]/;function i(t){if(0===t.length||!1===o.test(t))return t;for(var e=0,n=0,r="",i="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 60:i="&lt;";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=i,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,s=0,l=Array.isArray;function c(t,e,n,o,i,a){var l,c,u={};for(c in e)"ref"==c?l=e[c]:u[c]=e[c];var d={type:t,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--s,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof t&&(l=t.defaultProps))for(c in l)void 0===u[c]&&(u[c]=l[c]);return r.h.vnode&&r.h.vnode(d),d}function u(t){var e=c(r.b,{tpl:t,exprs:[].slice.call(arguments,1)});return e.key=e.__v,e}var d={},h=/[A-Z]/g;function p(t,e){if(r.h.attr){var n=r.h.attr(t,e);if("string"==typeof n)return n}if("ref"===t||"key"===t)return"";if("style"===t&&"object"==typeof e){var o="";for(var s in e){var l=e[s];if(null!=l&&""!==l){var c="-"==s[0]?s:d[s]||(d[s]=s.replace(h,"-$&").toLowerCase()),u=";";"number"!=typeof l||c.startsWith("--")||a.test(c)||(u="px;"),o=o+c+":"+l+u}}return t+'="'+o+'"'}return null==e||!1===e||"function"==typeof e||"object"==typeof e?"":!0===e?t:t+'="'+i(e)+'"'}function f(t){if(null==t||"boolean"==typeof t||"function"==typeof t)return null;if("object"==typeof t){if(void 0===t.constructor)return t;if(l(t)){for(var e=0;e<t.length;e++)t[e]=f(t[e]);return t}}return i(""+t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(0),o=n(25),i=n(32),a=n(43);class s extends a.a{constructor(){super(i.a.DEFAULT_VIDEO_RESOLUTION_HD),this.finder.aspectRatio={width:2,height:1},this.userGuidance.title.visible=!1}static fromJson(t){const e=new s;return this.mapValues(t,e,["videoConstraints","finder","userGuidance"]),this.mapFinderConfiguration(e,t),this.mapVideoConstraints(t,e),e}}var l=n(19),c=n(44),u=n(50),d=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};o.a;class h extends o.c{constructor(t){super(t),this.enabled=!0,this.configuration=t.configuration}static create(t,e){var n;return d(this,void 0,void 0,(function*(){const o=null!==(n=e.container)&&void 0!==n?n:document.getElementById(e.containerId);if(e=s.fromJson(e),!o)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((n,i)=>{Object(r.render)(r.default.createElement(h,{container:o,configuration:e,onSuccess:n,onFailure:i,sdk:t}),o)}))}))}componentDidMount(){var t,e;super.componentDidMount();try{this.genericDocumentRecognizer=this.props.sdk.createGenericDocumentRecognizer(this.configuration.detectorParameters)}catch(n){null===(e=(t=this.configuration).onError)||void 0===e||e.call(t,n)}this.detect()}componentWillUnmount(){const t=Object.create(null,{componentWillUnmount:{get:()=>super.componentWillUnmount}});return d(this,void 0,void 0,(function*(){t.componentWillUnmount.call(this),this.enabled=!1,yield(yield this.genericDocumentRecognizer).release()}))}detect(){var t,e,n,r,i,a;return d(this,void 0,void 0,(function*(){try{if(!this.enabled)return;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(o.c.DEFAULT_DETECTION_RESOLUTION);if(!i)return;const a=yield(yield this.genericDocumentRecognizer).recognize(i,new l.GenericDocumentRecognizerTypes.RecognitionParameters({mode:"LIVE"}),"CONSUME_IMAGE");if(!this.enabled)return;this.camera.reusableImageBuffer=a.originalImage.data,null===(r=(n=this.configuration).onDocumentDetected)||void 0===r||r.call(n,a)}catch(t){null===(a=(i=this.configuration).onError)||void 0===a||a.call(i,t)}finally{requestAnimationFrame((()=>this.detect()))}}))}render(){var t;const e=this.configuration;return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),r.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},r.default.createElement(c.a,{key:"camera",configuration:this.configuration,videoConstraints:e.videoConstraints,mirrored:e.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.configuration.finder.visible&&r.default.createElement(u.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder})))}}},function(t,e,n){"use strict";n.r(e);var r=/^((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)-.*))$/,o=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return r.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}));e.default=o},function(t,e,n){"use strict";function r(t){let e="https://mui.com/production-error/?code="+t;for(let t=1;t<arguments.length;t+=1)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(125);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(t,e,n="Mui"){const i=o[e];return i?`${n}-${i}`:`${r.a.generate(t)}-${e}`}},function(t,e,n){"use strict";const r=t=>t,o=(()=>{let t=r;return{configure(e){t=e},generate:e=>t(e),reset(){t=r}}})();e.a=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(99),o=n(72);function i({props:t,name:e,defaultTheme:n,themeId:i}){let a=Object(o.a)(n);i&&(a=a[i]||a);return Object(r.a)({theme:a,name:e,props:t})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2);function o(t,e){const n=Object(r.a)({},e);return Object.keys(t).forEach((i=>{if(i.toString().match(/^(components|slots)$/))n[i]=Object(r.a)({},t[i],n[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const a=t[i]||{},s=e[i];n[i]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[i]=Object(r.a)({},s),Object.keys(a).forEach((t=>{n[i][t]=o(a[t],s[t])}))):n[i]=s:n[i]=a}else void 0===n[i]&&(n[i]=t[i])})),n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(129);function i(...t){return r.useMemo((()=>t.every((t=>null==t))?null:e=>{t.forEach((t=>{Object(o.a)(t,e)}))}),t)}},function(t,e,n){"use strict";function r(t,e){"function"==typeof t?t(e):t&&(t.current=e)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(0),o=n(111);e.a=function(t){const e=r.useRef(t);return Object(o.a)((()=>{e.current=t})),r.useRef(((...t)=>(0,e.current)(...t))).current}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(112);function o(t){return Object(r.a)(t).defaultView||window}},function(t,e,n){"use strict";var r=n(2),o=n(7),i=n(110);const a=["values","unit","step"];function s(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:i=5}=t,s=Object(o.a)(t,a),l=(t=>{const e=Object.keys(t).map((e=>({key:e,val:t[e]})))||[];return e.sort(((t,e)=>t.val-e.val)),e.reduce(((t,e)=>Object(r.a)({},t,{[e.key]:e.val})),{})})(e),c=Object.keys(l);function u(t){return`@media (min-width:${"number"==typeof e[t]?e[t]:t}${n})`}function d(t){return`@media (max-width:${("number"==typeof e[t]?e[t]:t)-i/100}${n})`}function h(t,r){const o=c.indexOf(r);return`@media (min-width:${"number"==typeof e[t]?e[t]:t}${n}) and (max-width:${(-1!==o&&"number"==typeof e[c[o]]?e[c[o]]:r)-i/100}${n})`}return Object(r.a)({keys:c,values:l,up:u,down:d,between:h,only:function(t){return c.indexOf(t)+1<c.length?h(t,c[c.indexOf(t)+1]):u(t)},not:function(t){const e=c.indexOf(t);return 0===e?u(c[1]):e===c.length-1?d(c[e]):h(t,c[c.indexOf(t)+1]).replace("@media","@media not all and")},unit:n},s)}var l={borderRadius:4},c=n(14);var u=n(96),d=n(62);function h(t,e){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){return{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}}return n.palette.mode===t?e:{}}const p=["breakpoints","palette","spacing","shape"];e.a=function(t={},...e){const{breakpoints:n={},palette:a={},spacing:f,shape:m={}}=t,g=Object(o.a)(t,p),v=s(n),b=function(t=8){if(t.mui)return t;const e=Object(c.a)({spacing:t}),n=(...t)=>(0===t.length?[1]:t).map((t=>{const n=e(t);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(f);let y=Object(i.a)({breakpoints:v,direction:"ltr",components:{},palette:Object(r.a)({mode:"light"},a),spacing:b,shape:Object(r.a)({},l,m)},g);return y.applyStyles=h,y=e.reduce(((t,e)=>Object(i.a)(t,e)),y),y.unstable_sxConfig=Object(r.a)({},d.a,null==g?void 0:g.unstable_sxConfig),y.unstable_sx=function(t){return Object(u.a)({sx:t,theme:this})},y}},,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(124);function o(t,e,n="Mui"){const o={};return e.forEach((e=>{o[e]=Object(r.a)(t,e,n)})),o}},function(t,e,n){"use strict";function r(t,e,n){const r={};return Object.keys(t).forEach((o=>{r[o]=t[o].reduce(((t,r)=>{if(r){const o=e(r);""!==o&&t.push(o),n&&n[r]&&t.push(n[r])}return t}),[]).join(" ")})),r}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(...t){return t.reduce(((t,e)=>null==e?t:function(...n){t.apply(this,n),e.apply(this,n)}),(()=>{}))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0);let o=0;const i=r["useId".toString()];function a(t){if(void 0!==i){const e=i();return null!=t?t:e}return function(t){const[e,n]=r.useState(t),i=t||e;return r.useEffect((()=>{null==e&&(o+=1,n(`mui-${o}`))}),[e]),i}(t)}},function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"d",(function(){return h}));var r=n(123);var o=function(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))};function i(t,e=0,n=1){return o(t,e,n)}function a(t){if(t.type)return t;if("#"===t.charAt(0))return a(function(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&1===n[0].length&&(n=n.map((t=>t+t))),n?`rgb${4===n.length?"a":""}(${n.map(((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3)).join(", ")})`:""}(t));const e=t.indexOf("("),n=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Object(r.a)(9,t));let o,i=t.substring(e+1,t.length-1);if("color"===n){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error(Object(r.a)(10,o))}else i=i.split(",");return i=i.map((t=>parseFloat(t))),{type:n,values:i,colorSpace:o}}function s(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return-1!==e.indexOf("rgb")?r=r.map(((t,e)=>e<3?parseInt(t,10):t)):-1!==e.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==e.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${e}(${r})`}function l(t){let e="hsl"===(t=a(t)).type||"hsla"===t.type?a(function(t){t=a(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),l=(t,e=(t+n/30)%12)=>o-i*Math.max(Math.min(e-3,9-e,1),-1);let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===t.type&&(c+="a",u.push(e[3])),s({type:c,values:u})}(t)).values:t.values;return e=e.map((e=>("color"!==t.type&&(e/=255),e<=.03928?e/12.92:((e+.055)/1.055)**2.4))),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function c(t,e){const n=l(t),r=l(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(t,e){return t=a(t),e=i(e),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),"color"===t.type?t.values[3]=`/${e}`:t.values[3]=e,s(t)}function d(t,e){if(t=a(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb")||-1!==t.type.indexOf("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return s(t)}function h(t,e){if(t=a(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(-1!==t.type.indexOf("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return s(t)}}])}));
187
+ }`,l=Y.c.div`position: absolute; animation: ${s} ${o}s;`;return this.previousScale=r,I.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"},ref:t=>this.container=t},I.default.createElement(l,{style:{width:this.calculate(t,"width"),height:this.calculate(t,"height"),transform:`rotate(${a}deg) scale(${r})`,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 Km extends I.default.Component{componentDidMount(){bh.disableScreenMovement()}componentWillUnmount(){bh.enableScreenMovement()}render(){return I.default.createElement("div",null)}}class Jm{constructor(t,e){this.element=t,this.size=e}}class tg{}class eg extends I.default.Component{render(){return I.default.createElement("div",{style:this.props.style},I.default.createElement("svg",null,this.vertical(),this.horizontal()))}half(){return this.props.size/2}vertical(){const t=this.half();return I.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 I.default.createElement("line",{x1:0,y1:t,x2:this.props.size,y2:t,stroke:this.props.color,strokeWidth:"2"})}}class ng extends I.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:g.a.empty(),cropImageFitSize:ah.a.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?I.default.createElement("div",{style:this.style().container},I.default.createElement("img",{style:this.style().image,ref:t=>this.destination=t,src:this.props.src,alt:"."}),I.default.createElement(eg,{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=g.a.fromPoint(Fd.a.scaleUpTo(t.origin,new ah.a(this.props.style.zoom,this.props.style.zoom)),this.props.style.size),n=t.container.width-(this.props.style.margin+this.props.style.size),r=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:r?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 r=t.x,o=t.y,i=this.normalizeRotations(n),a=this.state.container.width/4;return 0===i?r<a&&o<a:1===i?r<a&&o>e.height-a:2===i?r>e.width-a&&o>e.height-a:r>e.width-a&&o<a}setIsVisible(t,e){this.setState({visible:t},e)}normalizeRotations(t){return t%this.MAX_ROTATIONS}}var rg=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class og extends I.default.Component{constructor(t){super(t),this.onResizeCallback=()=>{},this.MAX_ROTATIONS=4,this.BASE_SCALE=1,this.state={image:void 0,documentDetectionResult:void 0,polygon:void 0,calculatedSize:ah.a.empty(),animation:{rotations:0,scale:1,duration:0},points:[],magneticLines:{horizontal:{original:[],scaled:[]},vertical:{original:[],scaled:[]}},imageMargin:Fd.a.empty()},this.onResizeCallback=this.onResize.bind(this)}static create(t){return rg(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,r)=>{Object(I.render)(I.default.createElement(og,{onReady:n,onError:r,container:e,configuration:Um.fromJson(t)}),e)}))}))}componentDidMount(){var t,e,n;return rg(this,void 0,void 0,(function*(){const r=null===(t=this.configuration)||void 0===t?void 0:t.image,o=yield hg.instance.detectAndCropDocument(r),i=yield y.toDataUrl(yield hg.instance.imageToJpeg(r));this.setState({documentDetectionResult:o,image:i,polygon:null!==(n=null===(e=this.configuration)||void 0===e?void 0:e.polygon)&&void 0!==n?n:o.pointsNormalized,magneticLines:{vertical:{original:o.verticalLinesNormalized},horizontal:{original:o.horizontalLinesNormalized}}}),this.props.onReady&&this.props.onReady(this),addEventListener("resize",this.onResizeCallback),addEventListener("orientationchange",this.onResizeCallback)}))}componentWillUnmount(){return rg(this,void 0,void 0,(function*(){removeEventListener("resize",this.onResizeCallback),removeEventListener("orientationchange",this.onResizeCallback)}))}onImageLoaded(t){return rg(this,void 0,void 0,(function*(){ah.a.isEmpty(this.state.calculatedSize)&&(this.htmlImage=t,this.initializeSizes())}))}onResize(){const t=this.state.points.map((t=>new Fd.a(t.x/this.state.calculatedSize.width,t.y/this.state.calculatedSize.height)));this.initializeSizes(t)}initializeSizes(t,e,n){const r=new ah.a(this.htmlImage.naturalWidth,this.htmlImage.naturalHeight),o=new ah.a(this.container.width(),this.container.height()),i=y.getObjectFitSize(o,r),a=new ah.a(i.width,i.height),s=null!=t?t:this.state.polygon,l=bh.convertToViewportPointsFromParentSize(a,s),c=null!=e?e:this.state.magneticLines.horizontal.original,u=null!=n?n:this.state.magneticLines.vertical.original,d=bh.convertLinesToViewportLines(a,c),h=bh.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,r,o,i;const a=Am.CLASSNAME,s=Jd()({[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 I.default.createElement("div",{style:{position:"relative",width:d,height:d,padding:u}},I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.configuration.disableScroll&&I.default.createElement(Km,null),I.default.createElement(ng,{ref:t=>this.magnifier=t,style:this.configuration.style.magnifier}),I.default.createElement(qm,{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===(r=this.state.animation)||void 0===r?void 0:r.duration,imageMargin:this.state.imageMargin},I.default.createElement(Xm,{src:this.state.image,onImageLoaded:t=>this.onImageLoaded(t)}),I.default.createElement(Zm,{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===(o=this.state.animation)||void 0===o?void 0:o.rotations,scale:null===(i=this.state.animation)||void 0===i?void 0:i.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 tg;return e.source=new Jm(this.htmlImage,this.state.calculatedSize),e.container=new ah.a(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 rg(this,void 0,void 0,(function*(){const e=Fd.a.toPolygon(this.state.points,this.state.calculatedSize),n=this.toCoreRotations(this.rotations),r=yield hg.instance.imageCrop(null===(t=this.configuration)||void 0===t?void 0:t.image,e);return{image:yield hg.instance.imageRotate(r,n,"CONSUME_IMAGE"),polygon:e,rotations:this.rotations}}))}toCoreRotations(t){switch(t%this.MAX_ROTATIONS){case 0:return"NONE";case 1:return"CLOCKWISE_90";case 2:return"CLOCKWISE_180";case 3:return"COUNTERCLOCKWISE_90"}}rotate(t){return rg(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(){return rg(this,void 0,void 0,(function*(){const t=this.state.documentDetectionResult;this.initializeSizes(t.pointsNormalized,t.horizontalLinesNormalized,t.verticalLinesNormalized)}))}dispose(){const{container:t}=this.props;if(!t)throw Error("Component wasn't created with openCroppingView. Remove component from render tree to dispose.");Object(I.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=Um.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}}}var ig=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};jo.a;jo.b;class ag extends jo.c{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 ig(this,void 0,void 0,(function*(){const r=document.getElementById(t.containerId);if(!r)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((o,i)=>{Object(I.render)(I.default.createElement(ag,{container:r,configuration:t,onTextDetected:e,onSuccess:o,onFailure:i,textDataScanner:n}),r)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return ig(this,void 0,void 0,(function*(){vh.warn("TextData detection resumed"),yield this.resume()}))}pauseDetection(){vh.warn("TextData detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return ig(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 ig(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return ig(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.props.textDataScanner.cleanRecognitionQueue(),this.paused=!0}detect(){var t,e,n,r;return ig(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 n=yield null===(e=this.camera)||void 0===e?void 0:e.createImageData(ag.FRAME_RESOLUTION);if(!n)return;o&&this.forceUpdate();const r=yield this.props.textDataScanner.recognize(n);if(!this.enabled)return;if(null===r)return;r&&(i=!0,this.props.onTextDetected(r),this.camera.reusableImageBuffer=r.originalImage.data)}catch(t){null===(r=(n=this.configuration).onError)||void 0===r||r.call(n,t)}finally{i?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}render(){var t;return I.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),I.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},I.default.createElement(ko.a,{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&&I.default.createElement(_o.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}ag.FRAME_RESOLUTION=1200;var sg=ag,lg=n(64),cg=n(46),ug=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};class dg{static get UI(){if(!o.BUILD_WITH_UI)throw new Error("UI components are not included in Scanbot.min.js. Please use ScanbotSDK.ui2.min.js instead.");return dg._ui2}static initialize(t){var e;return ug(this,void 0,void 0,(function*(){const n=new dg,r=t.engine||dg.defaultEnginePath,a=!!t.allowThreads,s=null!==(e=t.requestSuffix)&&void 0!==e?e:`?${n.version}`,l=[t.licenseKey,r,window.location.hostname,o.CDN_PATH+o.DEFAULT_WASM_FOLDER,{captureConsole:!1,allowThreads:a,requestSuffix:s}];return n.bridge=new u(r,{allowSimd:!0,allowThreads:a,requestSuffix:s},l),dg.instance=n,window.scanbotSdk=n,F.a.initialize(t.verboseLogging),t.allowThreads&&!Object(i.a)()&&(F.a.debugWarn("Threads are not available in this environment. The SDK will run in single-threaded mode."),window.hasOwnProperty("crossOriginIsolated")&&!window.crossOriginIsolated&&F.a.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.")),this.cameras.initialize(null==t?void 0:t.bestCameraDetectionStrategy),n}))}createDocumentScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{return e=yield _m.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createMrzScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{const n=new S(this,this.bridge.copyArgs.createMRZRecognizer(t.recognizerConfiguration));return e=yield Dm.create(t,n),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createBarcodeScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{return e=yield Ah.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}openCroppingView(t){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),yield og.create(t)}))}createTextDataScanner(t){return ug(this,void 0,void 0,(function*(){try{t=_.fromJson(t);const e=yield this.createGenericTextLineScanner(t,t.onTextDetected,t.ocrConfiguration);return yield this.licenseCheck(),e}catch(t){throw t}}))}createVINScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{t=T.fromJson(t);const n=e=>{""!==e.rawText&&t.onTextDetected(e)},r=new k.GenericTextLineScannerTypes.ScannerConfiguration(Object.assign(Object.assign({},t.ocrConfiguration),{validator:new k.GenericTextLineScannerTypes.PresetContentValidator({preset:"VEHICLE_IDENTIFICATION_NUMBER"})}));return e=yield this.createGenericTextLineScanner(t,n,r),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createGenericDocumentRecognizerScanner(t){return ug(this,void 0,void 0,(function*(){let e;try{const r=n(121).default;return e=yield r.create(this,t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}toDataUrl(t){return ug(this,void 0,void 0,(function*(){return R.throwIfMissingBuffer(t),yield y.toDataUrl(t)}))}detectDocument(t,e={},n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){yield this.licenseCheck(),R.throwIfMissingBuffer(t);const r=yield this.bridge.copyArgs.createDocumentDetector(e),o=this.getBridge(n),i=yield o.documentDetectorDetect(r,t);return yield this.release(r,"documentDetector"),i}))}detectAndCropDocument(t,e="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){yield this.licenseCheck(),R.throwIfMissingBuffer(t);const n=this.getBridge(e);return yield n.detectAndCropDocument(t)}))}detectBarcodes(t,e={},n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){yield this.licenseCheck(),R.throwIfMissingBuffer(t),"string"==typeof t&&(t=yield y.loadFromUrl(t));const r=Object.assign({},e);r.live=!1;const o=yield this.bridge.copyArgs.createBarcodeRecognizer(r),i=yield this.getBridge(n).recognizeBarcodes(o,t);return yield this.release(o,"barcodeRecognizer"),i}))}parseBarcodeDocument(t,e){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),yield this.bridge.copyArgs.parseBarcodeDocument(t,e)}))}createSimpleMRZRecognizer(){return ug(this,void 0,void 0,(function*(){const t=new k.MRZTypes.RecognizerConfiguration({accumulatedResultsVerifierConfig:{maximumNumberOfAccumulatedFrames:0}});return new S(this,this.bridge.copyArgs.createMRZRecognizer(t))}))}createOcrEngine(){return ug(this,void 0,void 0,(function*(){return new w(this,yield this.bridge.copyArgs.createOcrEngine())}))}createDocumentQualityAnalyzer(t={}){return ug(this,void 0,void 0,(function*(){const e=yield this.bridge.copyArgs.createDocumentQualityAnalyzer(t);return new B(this,e)}))}imageRotate(t,e,n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const r=this.getBridge(n);return yield r.imageRotate(t,e)}))}imageFilter(t,e,n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const r=this.getBridge(n);return yield r.imageApplyFilter(t,e)}))}imageCrop(t,e,n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const r=this.getBridge(n);return yield r.imageCrop(t,e)}))}imageResize(t,e,n="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){R.throwIfMissingBuffer(t);const r=this.getBridge(n);return yield r.imageResize(t,e)}))}getLicenseInfo(){return ug(this,void 0,void 0,(function*(){const t=yield this.bridge.copyArgs.getLicenseInfo();return d.fromJson(t)}))}beginPdf(t){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new p(this,yield this.bridge.copyArgs.beginPdf(t))}))}beginTiff(t={}){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new m(this,yield this.bridge.copyArgs.beginTiff(t))}))}createGenericDocumentRecognizer(t){return ug(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new lm(this,yield this.bridge.copyArgs.genericDocumentRecognizerCreate(t))}))}imageToJpeg(t,e="COPY_IMAGE"){return ug(this,void 0,void 0,(function*(){yield this.licenseCheck();return this.getBridge(e).encodeJpeg(t)}))}get version(){return o.VERSION}get utils(){return this._utils||(this._utils=new A),this._utils}release(t,e){return ug(this,void 0,void 0,(function*(){t&&(F.a.debug(`Releasing object ${null!=e?e:"unknown"}`),yield this.bridge.copyArgs.releaseObject(t))}))}getBridge(t){return"CONSUME_IMAGE"===t?this.bridge.transferArgs:this.bridge.copyArgs}licenseCheck(){return ug(this,void 0,void 0,(function*(){const t=yield this.getLicenseInfo();if(!t.isValid())throw console.error(`LicenseError: ${t.status}`),new P(t)}))}createGenericTextLineScanner(t,e,n){return ug(this,void 0,void 0,(function*(){const r=this.bridge.copyArgs.createGenericTextLineScanner(n),o=new E(this,r);return yield sg.create(t,e,o)}))}destroy(){this.bridge.destroy(),dg.instance=void 0}}dg.defaultEnginePath="",dg._ui2=o.BUILD_WITH_UI?am:void 0,dg.cameras=cg.a.INSTANCE,dg.Config=k,dg._stats=lg.a.INSTANCE;var hg=e.a=dg},,,,,,function(t,e,n){"use strict";n(2);e.a=function(t,e){return()=>null}},function(t,e,n){"use strict";var r=n(75),o=n.n(r)()((function(t){return t[1]}));o.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=o},function(t,e,n){"use strict";var r=n(75),o=n.n(r)()((function(t){return t[1]}));o.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=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(123);function o(t){if("string"!=typeof t)throw new Error(Object(r.a)(7));return t.charAt(0).toUpperCase()+t.slice(1)}},,,,,,function(t,e){var n,r,o=t.exports={};function i(){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===i||!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:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=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(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}o.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)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";n.r(e),n.d(e,"capitalize",(function(){return o.a})),n.d(e,"createChainedFunction",(function(){return i})),n.d(e,"createSvgIcon",(function(){return a.a})),n.d(e,"debounce",(function(){return s.a})),n.d(e,"deprecatedPropType",(function(){return l})),n.d(e,"isMuiElement",(function(){return c.a})),n.d(e,"ownerDocument",(function(){return u.a})),n.d(e,"ownerWindow",(function(){return d.a})),n.d(e,"requirePropFactory",(function(){return h.a})),n.d(e,"setRef",(function(){return p})),n.d(e,"unstable_useEnhancedEffect",(function(){return f.a})),n.d(e,"unstable_useId",(function(){return m})),n.d(e,"unsupportedProp",(function(){return g})),n.d(e,"useControlled",(function(){return b})),n.d(e,"useEventCallback",(function(){return y.a})),n.d(e,"useForkRef",(function(){return A.a})),n.d(e,"useIsFocusVisible",(function(){return C.a})),n.d(e,"unstable_ClassNameGenerator",(function(){return S}));var r=n(125),o=n(9),i=n(160).a,a=n(67),s=n(69);var l=function(t,e){return()=>null},c=n(70),u=n(56),d=n(57),h=n(83),p=n(129).a,f=n(49),m=n(161).a;var g=function(t,e,n,r,o){return null},v=n(0);var b=function({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=v.useRef(void 0!==t),[i,a]=v.useState(e);return[o?t:i,v.useCallback((t=>{o||a(t)}),[])]},y=n(42),A=n(36),C=n(68);const S={configure:t=>{r.a.configure(t)}}},function(t,e,n){const{render:r,hydrate:o,unmountComponentAtNode:i}=n(0);function a(t){return{render(e){r(e,t)},unmount(){i(t)}}}e.createRoot=a,e.hydrateRoot=function(t,e){return o(e,t),a(t)}},function(t,e,n){"use strict";e.a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},function(t,e,n){"use strict";var r=n(86),o=n(45),i=n(20),a=n(31),s=n(62);const l=function(){function t(t,e,n,o){const s={[t]:e,theme:n},l=o[t];if(!l)return{[t]:e};const{cssProperty:c=t,themeKey:u,transform:d,style:h}=l;if(null==e)return null;if("typography"===u&&"inherit"===e)return{[t]:e};const p=Object(i.b)(n,u)||{};if(h)return h(s);return Object(a.b)(s,e,(e=>{let n=Object(i.c)(p,d,e);return e===n&&"string"==typeof e&&(n=Object(i.c)(p,d,`${t}${"default"===e?"":Object(r.a)(e)}`,e)),!1===c?n:{[c]:n}}))}return function e(n){var r;const{sx:i,theme:l={}}=n||{};if(!i)return null;const c=null!=(r=l.unstable_sxConfig)?r:s.a;function u(n){let r=n;if("function"==typeof n)r=n(l);else if("object"!=typeof n)return n;if(!r)return null;const i=Object(a.a)(l.breakpoints),s=Object.keys(i);let u=i;return Object.keys(r).forEach((n=>{const i=(s=r[n],d=l,"function"==typeof s?s(d):s);var s,d;if(null!=i)if("object"==typeof i)if(c[n])u=Object(o.a)(u,t(n,i,l,c));else{const t=Object(a.b)({theme:l},i,(t=>({[n]:t})));!function(...t){const e=t.reduce(((t,e)=>t.concat(Object.keys(e))),[]),n=new Set(e);return t.every((t=>n.size===Object.keys(t).length))}(t,i)?u=Object(o.a)(u,t):u[n]=e({sx:i,theme:l})}else u=Object(o.a)(u,t(n,i,l,c))})),Object(a.c)(s,u)}return Array.isArray(i)?i.map(u):u(i)}}();l.filterProps=["sx"],e.a=l},function(t,e){t.exports=function(t,e,n,r){var o=n?n.call(r,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=t[c],d=e[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&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";n.d(e,"a",(function(){return o}));var r=n(127);function o(t){const{theme:e,name:n,props:o}=t;return e&&e.components&&e.components[n]&&e.components[n].defaultProps?Object(r.a)(e.components[n].defaultProps,o):o}},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"HighlightOff")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z"}),"ClearAll")},function(t,e,n){"use strict";var r=n(47);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(48)),i=n(4);e.default=(0,o.default)((0,i.jsx)("path",{d:"M8.9 6.07 7.48 4.66 9 3h6l1.83 2H20c1.1 0 2 .9 2 2v12c0 .05-.01.1-.02.16L20 17.17V7h-4.05l-1.83-2H9.88zm11.59 17.24L18.17 21H4c-1.1 0-2-.9-2-2V7c0-.59.27-1.12.68-1.49l-2-2L2.1 2.1l19.8 19.8zM9.19 12.02c-.11.31-.19.63-.19.98 0 1.66 1.34 3 3 3 .35 0 .67-.08.98-.19zM16.17 19l-1.68-1.68c-.73.43-1.58.68-2.49.68-2.76 0-5-2.24-5-5 0-.91.25-1.76.68-2.49L4.17 7H4v12zm-1.36-7.02 2.07 2.07c.08-.34.12-.69.12-1.05 0-2.76-2.24-5-5-5-.36 0-.71.04-1.06.12l2.07 2.07c.84.3 1.5.96 1.8 1.79"}),"NoPhotographyOutlined")},function(t,e,n){"use strict";var r=n(2),o=n(7),i=n(123),a=n(110),s=n(132),l=n(62),c=n(96);var u=n(162);var d={black:"#000",white:"#fff"},h=n(95);var p={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var f={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var b={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const y=["mode","contrastThreshold","tonalOffset"],A={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},C={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S(t,e,n,r){const o=r.light||r,i=r.dark||1.5*r;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:"light"===e?t.light=Object(u.d)(t.main,o):"dark"===e&&(t.dark=Object(u.b)(t.main,i)))}function x(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:s=.2}=t,l=Object(o.a)(t,y),c=t.primary||function(t="light"){return"dark"===t?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(e),x=t.secondary||function(t="light"){return"dark"===t?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(e),w=t.error||function(t="light"){return"dark"===t?{main:f[500],light:f[300],dark:f[700]}:{main:f[700],light:f[400],dark:f[800]}}(e),O=t.info||function(t="light"){return"dark"===t?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(e),E=t.success||function(t="light"){return"dark"===t?{main:b[400],light:b[300],dark:b[700]}:{main:b[800],light:b[500],dark:b[900]}}(e),L=t.warning||function(t="light"){return"dark"===t?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(e);function j(t){return Object(u.c)(t,C.text.primary)>=n?C.text.primary:A.text.primary}const k=({color:t,name:e,mainShade:n=500,lightShade:o=300,darkShade:a=700})=>{if(!(t=Object(r.a)({},t)).main&&t[n]&&(t.main=t[n]),!t.hasOwnProperty("main"))throw new Error(Object(i.a)(11,e?` (${e})`:"",n));if("string"!=typeof t.main)throw new Error(Object(i.a)(12,e?` (${e})`:"",JSON.stringify(t.main)));return S(t,"light",o,s),S(t,"dark",a,s),t.contrastText||(t.contrastText=j(t.main)),t},_={dark:C,light:A};return Object(a.a)(Object(r.a)({common:Object(r.a)({},d),mode:e,primary:k({color:c,name:"primary"}),secondary:k({color:x,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:k({color:w,name:"error"}),warning:k({color:L,name:"warning"}),info:k({color:O,name:"info"}),success:k({color:E,name:"success"}),grey:h.a,contrastThreshold:n,getContrastText:j,augmentColor:k,tonalOffset:s},_[e]),l)}const w=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const O={textTransform:"uppercase"},E='"Roboto", "Helvetica", "Arial", sans-serif';function L(t,e){const n="function"==typeof e?e(t):e,{fontFamily:i=E,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:h=16,allVariants:p,pxToRem:f}=n,m=Object(o.a)(n,w);const g=s/14,v=f||(t=>t/h*g+"rem"),b=(t,e,n,o,a)=>{return Object(r.a)({fontFamily:i,fontWeight:t,fontSize:v(e),lineHeight:n},i===E?{letterSpacing:(s=o/e,Math.round(1e5*s)/1e5)+"em"}:{},a,p);var s},y={h1:b(l,96,1.167,-1.5),h2:b(l,60,1.2,-.5),h3:b(c,48,1.167,0),h4:b(c,34,1.235,.25),h5:b(c,24,1.334,0),h6:b(u,20,1.6,.15),subtitle1:b(c,16,1.75,.15),subtitle2:b(u,14,1.57,.1),body1:b(c,16,1.5,.15),body2:b(c,14,1.43,.15),button:b(u,14,1.75,.4,O),caption:b(c,12,1.66,.4),overline:b(c,12,2.66,1,O),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Object(a.a)(Object(r.a)({htmlFontSize:h,pxToRem:v,fontFamily:i,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},y),m,{clone:!1})}function j(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,0.2)`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,0.14)`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,0.12)`].join(",")}var k=["none",j(0,2,1,-1,0,1,1,0,0,1,3,0),j(0,3,1,-2,0,2,2,0,0,1,5,0),j(0,3,3,-2,0,3,4,0,0,1,8,0),j(0,2,4,-1,0,4,5,0,0,1,10,0),j(0,3,5,-1,0,5,8,0,0,1,14,0),j(0,3,5,-1,0,6,10,0,0,1,18,0),j(0,4,5,-2,0,7,10,1,0,2,16,1),j(0,5,5,-3,0,8,10,1,0,3,14,2),j(0,5,6,-3,0,9,12,1,0,3,16,2),j(0,6,6,-3,0,10,14,1,0,4,18,3),j(0,6,7,-4,0,11,15,1,0,4,20,3),j(0,7,8,-4,0,12,17,2,0,5,22,4),j(0,7,8,-4,0,13,19,2,0,5,24,4),j(0,7,9,-4,0,14,21,2,0,5,26,4),j(0,8,9,-5,0,15,22,2,0,6,28,5),j(0,8,10,-5,0,16,24,2,0,6,30,5),j(0,8,11,-5,0,17,26,2,0,6,32,5),j(0,9,11,-5,0,18,28,2,0,7,34,6),j(0,9,12,-6,0,19,29,2,0,7,36,6),j(0,10,13,-6,0,20,31,3,0,8,38,7),j(0,10,13,-6,0,21,33,3,0,8,40,7),j(0,10,14,-6,0,22,35,3,0,8,42,7),j(0,11,14,-7,0,23,36,3,0,9,44,8),j(0,11,15,-7,0,24,38,3,0,9,46,8)];const _=["duration","easing","delay"],T={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},P={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function R(t){return`${Math.round(t)}ms`}function D(t){if(!t)return 0;const e=t/36;return Math.round(10*(4+15*e**.25+e/5))}function B(t){const e=Object(r.a)({},T,t.easing),n=Object(r.a)({},P,t.duration);return Object(r.a)({getAutoHeightDuration:D,create:(t=["all"],r={})=>{const{duration:i=n.standard,easing:a=e.easeInOut,delay:s=0}=r;Object(o.a)(r,_);return(Array.isArray(t)?t:[t]).map((t=>`${t} ${"string"==typeof i?i:R(i)} ${a} ${"string"==typeof s?s:R(s)}`)).join(",")}},t,{easing:e,duration:n})}var F={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const I=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function M(t={},...e){const{mixins:n={},palette:u={},transitions:d={},typography:h={}}=t,p=Object(o.a)(t,I);if(t.vars)throw new Error(Object(i.a)(18));const f=x(u),m=Object(s.a)(t);let g=Object(a.a)(m,{mixins:(v=m.breakpoints,b=n,Object(r.a)({toolbar:{minHeight:56,[v.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[v.up("sm")]:{minHeight:64}}},b)),palette:f,shadows:k.slice(),typography:L(f,h),transitions:B(d),zIndex:Object(r.a)({},F)});var v,b;return g=Object(a.a)(g,p),g=e.reduce(((t,e)=>Object(a.a)(t,e)),g),g.unstable_sxConfig=Object(r.a)({},l.a,null==p?void 0:p.unstable_sxConfig),g.unstable_sx=function(t){return Object(c.a)({sx:t,theme:this})},g}e.a=M},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var r=n(0);const o={};const i=[];class a{constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new a}start(t,e){this.clear(),this.currentId=setTimeout((()=>{this.currentId=0,e()}),t)}}function s(){const t=function(t,e){const n=r.useRef(o);return n.current===o&&(n.current=t(e)),n}(a.create).current;var e;return e=t.disposeEffect,r.useEffect(e,i),t}},function(t,e,n){"use strict";function r(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 i}));var o=/^((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)-.*))$/,i=r((function(t){return o.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(2);function o(t){if("object"!=typeof t||null===t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)}function i(t){if(!o(t))return t;const e={};return Object.keys(t).forEach((n=>{e[n]=i(t[n])})),e}function a(t,e,n={clone:!0}){const s=n.clone?Object(r.a)({},t):t;return o(t)&&o(e)&&Object.keys(e).forEach((r=>{"__proto__"!==r&&(o(e[r])&&r in t&&o(t[r])?s[r]=a(t[r],e[r],n):n.clone?s[r]=o(e[r])?i(e[r]):e[r]:s[r]=e[r])})),s}},function(t,e,n){"use strict";var r=n(0);const o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;e.a=o},function(t,e,n){"use strict";function r(t){return t&&t.ownerDocument||document}n.d(e,"a",(function(){return r}))},,,,,,,function(t,e,n){"use strict";n.r(e),n.d(e,"ScanbotSDK",(function(){return r}));const r=n(77).a},function(t,e,n){"use strict";n.r(e),n.d(e,"jsx",(function(){return c})),n.d(e,"jsxAttr",(function(){return p})),n.d(e,"jsxDEV",(function(){return c})),n.d(e,"jsxEscape",(function(){return f})),n.d(e,"jsxTemplate",(function(){return u})),n.d(e,"jsxs",(function(){return c}));var r=n(12);n.d(e,"Fragment",(function(){return r.b}));var o=/["&<]/;function i(t){if(0===t.length||!1===o.test(t))return t;for(var e=0,n=0,r="",i="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 60:i="&lt;";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=i,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,s=0,l=Array.isArray;function c(t,e,n,o,i,a){var l,c,u={};for(c in e)"ref"==c?l=e[c]:u[c]=e[c];var d={type:t,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--s,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof t&&(l=t.defaultProps))for(c in l)void 0===u[c]&&(u[c]=l[c]);return r.h.vnode&&r.h.vnode(d),d}function u(t){var e=c(r.b,{tpl:t,exprs:[].slice.call(arguments,1)});return e.key=e.__v,e}var d={},h=/[A-Z]/g;function p(t,e){if(r.h.attr){var n=r.h.attr(t,e);if("string"==typeof n)return n}if("ref"===t||"key"===t)return"";if("style"===t&&"object"==typeof e){var o="";for(var s in e){var l=e[s];if(null!=l&&""!==l){var c="-"==s[0]?s:d[s]||(d[s]=s.replace(h,"-$&").toLowerCase()),u=";";"number"!=typeof l||c.startsWith("--")||a.test(c)||(u="px;"),o=o+c+":"+l+u}}return t+'="'+o+'"'}return null==e||!1===e||"function"==typeof e||"object"==typeof e?"":!0===e?t:t+'="'+i(e)+'"'}function f(t){if(null==t||"boolean"==typeof t||"function"==typeof t)return null;if("object"==typeof t){if(void 0===t.constructor)return t;if(l(t)){for(var e=0;e<t.length;e++)t[e]=f(t[e]);return t}}return i(""+t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(0),o=n(25),i=n(32),a=n(43);class s extends a.a{constructor(){super(i.a.DEFAULT_VIDEO_RESOLUTION_HD),this.finder.aspectRatio={width:2,height:1},this.userGuidance.title.visible=!1}static fromJson(t){const e=new s;return this.mapValues(t,e,["videoConstraints","finder","userGuidance"]),this.mapFinderConfiguration(e,t),this.mapVideoConstraints(t,e),e}}var l=n(19),c=n(44),u=n(50),d=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))};o.a;class h extends o.c{constructor(t){super(t),this.enabled=!0,this.configuration=t.configuration}static create(t,e){var n;return d(this,void 0,void 0,(function*(){const o=null!==(n=e.container)&&void 0!==n?n:document.getElementById(e.containerId);if(e=s.fromJson(e),!o)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((n,i)=>{Object(r.render)(r.default.createElement(h,{container:o,configuration:e,onSuccess:n,onFailure:i,sdk:t}),o)}))}))}componentDidMount(){var t,e;super.componentDidMount();try{this.genericDocumentRecognizer=this.props.sdk.createGenericDocumentRecognizer(this.configuration.detectorParameters)}catch(n){null===(e=(t=this.configuration).onError)||void 0===e||e.call(t,n)}this.detect()}componentWillUnmount(){const t=Object.create(null,{componentWillUnmount:{get:()=>super.componentWillUnmount}});return d(this,void 0,void 0,(function*(){t.componentWillUnmount.call(this),this.enabled=!1,yield(yield this.genericDocumentRecognizer).release()}))}detect(){var t,e,n,r,i,a;return d(this,void 0,void 0,(function*(){try{if(!this.enabled)return;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(o.c.DEFAULT_DETECTION_RESOLUTION);if(!i)return;const a=yield(yield this.genericDocumentRecognizer).recognize(i,new l.GenericDocumentRecognizerTypes.RecognitionParameters({mode:"LIVE"}),"CONSUME_IMAGE");if(!this.enabled)return;this.camera.reusableImageBuffer=a.originalImage.data,null===(r=(n=this.configuration).onDocumentDetected)||void 0===r||r.call(n,a)}catch(t){null===(a=(i=this.configuration).onError)||void 0===a||a.call(i,t)}finally{requestAnimationFrame((()=>this.detect()))}}))}render(){var t;const e=this.configuration;return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),r.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},r.default.createElement(c.a,{key:"camera",configuration:this.configuration,videoConstraints:e.videoConstraints,mirrored:e.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.configuration.finder.visible&&r.default.createElement(u.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder})))}}},function(t,e,n){"use strict";n.r(e);var r=/^((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)-.*))$/,o=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return r.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}));e.default=o},function(t,e,n){"use strict";function r(t){let e="https://mui.com/production-error/?code="+t;for(let t=1;t<arguments.length;t+=1)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(125);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(t,e,n="Mui"){const i=o[e];return i?`${n}-${i}`:`${r.a.generate(t)}-${e}`}},function(t,e,n){"use strict";const r=t=>t,o=(()=>{let t=r;return{configure(e){t=e},generate:e=>t(e),reset(){t=r}}})();e.a=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(99),o=n(72);function i({props:t,name:e,defaultTheme:n,themeId:i}){let a=Object(o.a)(n);i&&(a=a[i]||a);return Object(r.a)({theme:a,name:e,props:t})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2);function o(t,e){const n=Object(r.a)({},e);return Object.keys(t).forEach((i=>{if(i.toString().match(/^(components|slots)$/))n[i]=Object(r.a)({},t[i],n[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const a=t[i]||{},s=e[i];n[i]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[i]=Object(r.a)({},s),Object.keys(a).forEach((t=>{n[i][t]=o(a[t],s[t])}))):n[i]=s:n[i]=a}else void 0===n[i]&&(n[i]=t[i])})),n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(129);function i(...t){return r.useMemo((()=>t.every((t=>null==t))?null:e=>{t.forEach((t=>{Object(o.a)(t,e)}))}),t)}},function(t,e,n){"use strict";function r(t,e){"function"==typeof t?t(e):t&&(t.current=e)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(0),o=n(111);e.a=function(t){const e=r.useRef(t);return Object(o.a)((()=>{e.current=t})),r.useRef(((...t)=>(0,e.current)(...t))).current}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(112);function o(t){return Object(r.a)(t).defaultView||window}},function(t,e,n){"use strict";var r=n(2),o=n(7),i=n(110);const a=["values","unit","step"];function s(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:i=5}=t,s=Object(o.a)(t,a),l=(t=>{const e=Object.keys(t).map((e=>({key:e,val:t[e]})))||[];return e.sort(((t,e)=>t.val-e.val)),e.reduce(((t,e)=>Object(r.a)({},t,{[e.key]:e.val})),{})})(e),c=Object.keys(l);function u(t){return`@media (min-width:${"number"==typeof e[t]?e[t]:t}${n})`}function d(t){return`@media (max-width:${("number"==typeof e[t]?e[t]:t)-i/100}${n})`}function h(t,r){const o=c.indexOf(r);return`@media (min-width:${"number"==typeof e[t]?e[t]:t}${n}) and (max-width:${(-1!==o&&"number"==typeof e[c[o]]?e[c[o]]:r)-i/100}${n})`}return Object(r.a)({keys:c,values:l,up:u,down:d,between:h,only:function(t){return c.indexOf(t)+1<c.length?h(t,c[c.indexOf(t)+1]):u(t)},not:function(t){const e=c.indexOf(t);return 0===e?u(c[1]):e===c.length-1?d(c[e]):h(t,c[c.indexOf(t)+1]).replace("@media","@media not all and")},unit:n},s)}var l={borderRadius:4},c=n(14);var u=n(96),d=n(62);function h(t,e){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){return{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}}return n.palette.mode===t?e:{}}const p=["breakpoints","palette","spacing","shape"];e.a=function(t={},...e){const{breakpoints:n={},palette:a={},spacing:f,shape:m={}}=t,g=Object(o.a)(t,p),v=s(n),b=function(t=8){if(t.mui)return t;const e=Object(c.a)({spacing:t}),n=(...t)=>(0===t.length?[1]:t).map((t=>{const n=e(t);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(f);let y=Object(i.a)({breakpoints:v,direction:"ltr",components:{},palette:Object(r.a)({mode:"light"},a),spacing:b,shape:Object(r.a)({},l,m)},g);return y.applyStyles=h,y=e.reduce(((t,e)=>Object(i.a)(t,e)),y),y.unstable_sxConfig=Object(r.a)({},d.a,null==g?void 0:g.unstable_sxConfig),y.unstable_sx=function(t){return Object(u.a)({sx:t,theme:this})},y}},,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(124);function o(t,e,n="Mui"){const o={};return e.forEach((e=>{o[e]=Object(r.a)(t,e,n)})),o}},function(t,e,n){"use strict";function r(t,e,n){const r={};return Object.keys(t).forEach((o=>{r[o]=t[o].reduce(((t,r)=>{if(r){const o=e(r);""!==o&&t.push(o),n&&n[r]&&t.push(n[r])}return t}),[]).join(" ")})),r}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(...t){return t.reduce(((t,e)=>null==e?t:function(...n){t.apply(this,n),e.apply(this,n)}),(()=>{}))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0);let o=0;const i=r["useId".toString()];function a(t){if(void 0!==i){const e=i();return null!=t?t:e}return function(t){const[e,n]=r.useState(t),i=t||e;return r.useEffect((()=>{null==e&&(o+=1,n(`mui-${o}`))}),[e]),i}(t)}},function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"d",(function(){return h}));var r=n(123);var o=function(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))};function i(t,e=0,n=1){return o(t,e,n)}function a(t){if(t.type)return t;if("#"===t.charAt(0))return a(function(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&1===n[0].length&&(n=n.map((t=>t+t))),n?`rgb${4===n.length?"a":""}(${n.map(((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3)).join(", ")})`:""}(t));const e=t.indexOf("("),n=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Object(r.a)(9,t));let o,i=t.substring(e+1,t.length-1);if("color"===n){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error(Object(r.a)(10,o))}else i=i.split(",");return i=i.map((t=>parseFloat(t))),{type:n,values:i,colorSpace:o}}function s(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return-1!==e.indexOf("rgb")?r=r.map(((t,e)=>e<3?parseInt(t,10):t)):-1!==e.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==e.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${e}(${r})`}function l(t){let e="hsl"===(t=a(t)).type||"hsla"===t.type?a(function(t){t=a(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),l=(t,e=(t+n/30)%12)=>o-i*Math.max(Math.min(e-3,9-e,1),-1);let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===t.type&&(c+="a",u.push(e[3])),s({type:c,values:u})}(t)).values:t.values;return e=e.map((e=>("color"!==t.type&&(e/=255),e<=.03928?e/12.92:((e+.055)/1.055)**2.4))),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function c(t,e){const n=l(t),r=l(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(t,e){return t=a(t),e=i(e),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),"color"===t.type?t.values[3]=`/${e}`:t.values[3]=e,s(t)}function d(t,e){if(t=a(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb")||-1!==t.type.indexOf("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return s(t)}function h(t,e){if(t=a(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(-1!==t.type.indexOf("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return s(t)}}])}));