cortex-react-ui 0.2.19 → 0.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1,19 +1,10 @@
1
- "use strict";var e=require("react"),t=require("react-dom"),n=require("leaflet"),r=require("leaflet-draw/dist/images/marker-icon-2x.png"),o=require("leaflet-draw/dist/images/marker-shadow.png");require("leaflet.fullscreen/Control.FullScreen.css");var i=require("prop-types");function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}function s(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}require("leaflet-draw"),require("leaflet/dist/leaflet.css"),require("leaflet-draw/dist/leaflet.draw.css");var c=a(e),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function d(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function p(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function f(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var g,m={exports:{}},v={};var w,y,C={};
2
- /**
3
- * @license React
4
- * react-jsx-runtime.development.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */function A(){return w||(w=1,"production"!==process.env.NODE_ENV&&function(){var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g=Symbol.iterator;var m=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=m.ReactDebugCurrentFrame,o=r.getStackAddendum();""!==o&&(t+="%s",n=n.concat([o]));var i=n.map(function(e){return String(e)});i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,n)}var w;function y(e){return e.displayName||"Context"}function A(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case r:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return y(e)+".Consumer";case s:return y(e._context)+".Provider";case l:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:A(e.type)||"Memo";case f:var n=e,h=n._payload,g=n._init;try{return A(g(h))}catch(e){return null}}return null}w=Symbol.for("react.module.reference");var T,E,b,x,B,R,M,D=Object.assign,k=0;function I(){}I.__reactDisabledLog=!0;var S,F=m.ReactCurrentDispatcher;function P(e,t,n){if(void 0===S)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);S=r&&r[1]||""}return"\n"+S+e}var j,q=!1,O="function"==typeof WeakMap?WeakMap:Map;function N(e,t){if(!e||q)return"";var n,r=j.get(e);if(void 0!==r)return r;q=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=F.current,F.current=null,function(){if(0===k){T=console.log,E=console.info,b=console.warn,x=console.error,B=console.group,R=console.groupCollapsed,M=console.groupEnd;var e={configurable:!0,enumerable:!0,value:I,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}k++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),c=n.stack.split("\n"),l=s.length-1,u=c.length-1;l>=1&&u>=0&&s[l]!==c[u];)u--;for(;l>=1&&u>=0;l--,u--)if(s[l]!==c[u]){if(1!==l||1!==u)do{if(l--,--u<0||s[l]!==c[u]){var d="\n"+s[l].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&j.set(e,d),d}}while(l>=1&&u>=0);break}}}finally{q=!1,F.current=o,function(){if(0===--k){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:T}),info:D({},e,{value:E}),warn:D({},e,{value:b}),error:D({},e,{value:x}),group:D({},e,{value:B}),groupCollapsed:D({},e,{value:R}),groupEnd:D({},e,{value:M})})}k<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",f=p?P(p):"";return"function"==typeof e&&j.set(e,f),f}function L(e,t,n){if(null==e)return"";if("function"==typeof e)return N(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return P(e);switch(e){case u:return P("Suspense");case d:return P("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case l:return N(e.render,!1);case p:return L(e.type,t,n);case f:var o=e,i=o._payload,a=o._init;try{return L(a(i),t,n)}catch(e){}}return""}j=new O;var G=Object.prototype.hasOwnProperty,V={},Y=m.ReactDebugCurrentFrame;function Q(e){if(e){var t=e._owner,n=L(e.type,e._source,t?t.type:null);Y.setExtraStackFrame(n)}else Y.setExtraStackFrame(null)}var U=Array.isArray;function K(e){return U(e)}function W(e){return""+e}function _(e){if(function(e){try{return W(e),!1}catch(e){return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),W(e)}var J,Z,z=m.ReactCurrentOwner,H={key:!0,ref:!0,__self:!0,__source:!0};function X(e,t,r,o,i){var a,s={},c=null,l=null;for(a in void 0!==r&&(_(r),c=""+r),function(e){if(G.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(_(t.key),c=""+t.key),function(e){if(G.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(l=t.ref,function(e){"string"==typeof e.ref&&z.current}(t)),t)G.call(t,a)&&!H.hasOwnProperty(a)&&(s[a]=t[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===s[a]&&(s[a]=u[a])}if(c||l){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,t){var n=function(){J||(J=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(s,d),l&&function(e,t){var n=function(){Z||(Z=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(s,d)}return function(e,t,r,o,i,a,s){var c={$$typeof:n,type:e,key:t,ref:r,props:s,_owner:a,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}(e,c,l,i,o,z.current,s)}var $,ee=m.ReactCurrentOwner,te=m.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,n=L(e.type,e._source,t?t.type:null);te.setExtraStackFrame(n)}else te.setExtraStackFrame(null)}function re(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function oe(){if(ee.current){var e=A(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}$=!1;var ie={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=oe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ie[n]){ie[n]=!0;var r="";e&&e._owner&&e._owner!==ee.current&&(r=" It was passed a child from "+A(e._owner.type)+"."),ne(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ne(null)}}}function se(e,t){if("object"==typeof e)if(K(e))for(var n=0;n<e.length;n++){var r=e[n];re(r)&&ae(r,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=g&&e[g]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)re(i.value)&&ae(i.value,t)}}function ce(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==l&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=A(n);!function(e,t,n,r,o){var i=Function.call.bind(G);for(var a in e)if(i(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var c=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}!s||s instanceof Error||(Q(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),Q(null)),s instanceof Error&&!(s.message in V)&&(V[s.message]=!0,Q(o),v("Failed %s type: %s",n,s.message),Q(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!$){$=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var le={};function ue(e,t,r,g,m,y){var C=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===u||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===c||e.$$typeof===l||e.$$typeof===w||void 0!==e.getModuleId)}(e);if(!C){var T="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(T+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E;T+=oe(),null===e?E="null":K(e)?E="array":void 0!==e&&e.$$typeof===n?(E="<"+(A(e.type)||"Unknown")+" />",T=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,T)}var b=X(e,t,r,m,y);if(null==b)return b;if(C){var x=t.children;if(void 0!==x)if(g)if(K(x)){for(var B=0;B<x.length;B++)se(x[B],e);Object.freeze&&Object.freeze(x)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else se(x,e)}if(G.call(t,"key")){var R=A(e),M=Object.keys(t).filter(function(e){return"key"!==e}),D=M.length>0?"{key: someKey, "+M.join(": ..., ")+": ...}":"{key: someKey}";if(!le[R+D])v('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',D,R,M.length>0?"{"+M.join(": ..., ")+": ...}":"{}",R),le[R+D]=!0}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ne(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ne(null);break}}null!==e.ref&&(ne(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(b):ce(b),b}var de=function(e,t,n){return ue(e,t,n,!1)},pe=function(e,t,n){return ue(e,t,n,!0)};C.Fragment=o,C.jsx=de,C.jsxs=pe}()),C}var T=(y||(y=1,"production"===process.env.NODE_ENV?m.exports=function(){if(g)return v;g=1;var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,s)&&!a.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===c[s]&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:i.current}}return v.Fragment=r,v.jsx=s,v.jsxs=s,v}():m.exports=A()),m.exports);function E(e){return c.forwardRef(function(t,n){return e(t,n)})}var b=E(function(n,r){var o=n.children,i=n.container,a=void 0===i?document.body:i,s=e.useRef();return e.useEffect(function(){var e=function(e){return"function"==typeof e?e():e}(a);return s.current&&e&&e.appendChild(s.current),function(){s.current&&s.current.remove()}},[s.current]),s.current||(s.current=document.createElement("div")),t.createPortal(o,s.current)});function x(e,t){e&&("function"==typeof e?e(t):"current"in e&&(e.current=t))}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],r=function(t){var r=e[t];if(!r)return"continue";var o=typeof r;if("string"===o||"number"===o)n.push(r);else if(Array.isArray(r)){if(r.length){var i=B.apply(void 0,r);i&&n.push(i)}}else"object"===o?r.toString===Object.prototype.toString&&Object.keys(r).forEach(function(e){r[e]&&n.push(e)}):n.push(r.toString())},o=0;o<e.length;o+=1)r(o);return n.join(" ")}function R(e){var t=window,n=document.body,r=void 0!==t.pageXOffset?t.pageXOffset:(document.documentElement||n.parentNode||n).scrollLeft,o=void 0!==t.pageYOffset?t.pageYOffset:(document.documentElement||n.parentNode||n).scrollTop,i=e.getBoundingClientRect();return{bottom:i.bottom+o,height:i.height,left:i.left+r,right:i.right+r,top:i.top+o,width:i.width}}var M={Center:"center",BottomCenter:"bottom-center",BottomRight:"bottom-right",BottomLeft:"bottom-left",TopCenter:"top-center",TopRight:"top-right",TopLeft:"top-left",LeftTop:"left-top",LeftBottom:"left-bottom",LeftCenter:"left-center",RightTop:"right-top",RightBottom:"right-bottom",RightCenter:"right-center"},D=E(function(t,n){var r=t.anchorEl,o=t.anchorPosition,i=t.placement,a=void 0===i?M.BottomLeft:i,s=t.open,c=void 0!==s&&s,d=t.overflow,p=void 0!==d&&d,f=t.role,h=t.children,g=t.className,m=u(t,["anchorEl","anchorPosition","placement","open","overflow","role","children","className"]),v=e.useRef(null),w=e.useRef(null),y=e.useState({left:window.scrollX,top:window.scrollY,height:window.innerHeight,width:window.innerWidth}),C=y[0],A=y[1],E=e.useState({position:"absolute",margin:"0",inset:"0px auto auto 0px",transform:"translate3d(0px, 0px, 0px)",opacity:0}),D=E[0],k=E[1];return e.useEffect(function(){if(n&&v)return x(n,v.current),function(){x(n,null)}},[n,v.current]),e.useEffect(function(){var e=function(){A({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})},t=function(){A({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})};return c&&(window.addEventListener("resize",e),window.addEventListener("scroll",t),A({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[c]),e.useEffect(function(){var e,t=function(e){var t;if(!e)return document.body;if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:document.body}var r=e;return r&&r.current?null!==(t=r.current)&&void 0!==t?t:document.body:e}(r);if(c&&v.current&&t){var n=function(){var e=function(e,t,n,r){var o=0,i=0,a=n?{bottom:n.top,height:0,left:n.left,right:n.left,top:n.top,width:0}:R(t),s=R(r);switch(e){case M.Center:o=a.left+a.width/2-s.width/2,i=a.top+a.height/2-s.height/2;break;case M.BottomLeft:o=a.left,i=a.bottom;break;case M.BottomRight:o=a.left-s.width+a.width,i=a.bottom;break;case M.BottomCenter:o=a.left+a.width/2-s.width/2,i=a.bottom;break;case M.TopLeft:o=a.left,i=a.top-s.height;break;case M.TopRight:o=a.left-s.width+a.width,i=a.top-s.height;break;case M.TopCenter:o=a.left+a.width/2-s.width/2,i=a.top-s.height;break;case M.LeftTop:o=a.left-s.width,i=a.top;break;case M.LeftBottom:o=a.left-s.width,i=a.bottom-s.height;break;case M.LeftCenter:o=a.left-s.width,i=a.top+a.height/2-s.height/2;break;case M.RightTop:o=a.right,i=a.top;break;case M.RightBottom:o=a.right,i=a.bottom-s.height;break;case M.RightCenter:o=a.right,i=a.top+a.height/2-s.height/2}return{left:o,top:i}}(a,t,o,v.current),n=e.left,r=e.top,i=0,s=0;if(!1===p){var c=function(e,t,n,r){if(!e)return null;if(!t)return null;var o=t.getBoundingClientRect(),i={left:n,top:r,height:0,width:0};return n<e.left&&(i.left=e.left),r<e.top&&(i.top=e.top),n+o.width>=e.left+e.width&&(i.left=e.left+e.width-o.width),r+o.height>=e.top+e.height&&(i.top=e.top+e.height-o.height),i}(C,v.current,n,r);null!==c&&(n=c.left,r=c.top,i=c.height,s=c.width)}k({position:"absolute",margin:"0",inset:"0px auto auto 0px",transform:"translate3d(".concat(n,"px, ").concat(r,"px, 0px)"),opacity:1,maxHeight:i>0?"".concat(i.toFixed(),"px"):void 0,maxWidth:s>0?"".concat(s.toFixed(),"px"):void 0})};(e=new MutationObserver(function(){n()})).observe(v.current,{attributes:!1,childList:!0,subtree:!0}),n()}return function(){e&&e.disconnect()}},[v,c,a,o,p,C,r]),!0!==c?null:T.jsx(b,{ref:w,children:T.jsx("div",l({ref:v,style:D,role:f,className:B("ui-popper",g)},m,{children:h}))})}),k=function(t){var n=t.variant,r=t.color,o=t.children,i=t.disable,a=t.className,s=t.onClick,c=e.useCallback(function(e){s&&!0!==i&&s(e)},[s,i]);return T.jsx("button",{type:"button",className:B("ui-btn",!0===i?"ui-btn-disable":null,null!=n?"ui-btn-".concat(n):"ui-btn-text",null!=r?"ui-btn-color-".concat(r):"ui-btn-color-primary",a),onClick:c,children:o})},I=e=>{throw TypeError(e)},S=(e,t,n)=>t.has(e)||I("Cannot "+n),F=(e,t,n)=>(S(e,t,"read from private field"),n?n.call(e):t.get(e));const P=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],j=P.map(([e])=>e),q=j.filter((e,t)=>"L"===P[t][1]),O=j.filter((e,t)=>"M"===P[t][1]);function N(e){switch(e){case"Linear-Codes":return q.reduce((e,t)=>e|N(t),0);case"Matrix-Codes":return O.reduce((e,t)=>e|N(t),0);case"Any":return(1<<P.length)-1;case"None":return 0;default:return 1<<j.indexOf(e)}}function G(e){if(0===e)return"None";const t=31-Math.clz32(e);return j[t]}function V(e){return e.reduce((e,t)=>e|N(t),0)}const Y=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function Q(e){return Y.indexOf(e)}const U=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function K(e){return"UnicodeBig"===e?U.indexOf("UTF16BE"):U.indexOf(e)}const W=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function _(e){return W[e]}const J=["Ignore","Read","Require"];function Z(e){return J.indexOf(e)}const z=["Plain","ECI","HRI","Hex","Escaped"];function H(e){return z.indexOf(e)}const X={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function $(e){return{...e,formats:V(e.formats),binarizer:Q(e.binarizer),eanAddOnSymbol:Z(e.eanAddOnSymbol),textMode:H(e.textMode),characterSet:K(e.characterSet)}}function ee(e){return{...e,format:G(e.format),contentType:_(e.contentType),eccLevel:e.ecLevel}}const te={locateFile:(e,t)=>{const n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.2.4/dist/${n[1]}/${e}`:t+e}},ne=new WeakMap;function re(e,t){return Object.is(e,t)||Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>Object.hasOwn(t,n)&&e[n]===t[n])}function oe(e,{overrides:t,equalityFn:n=re,fireImmediately:r=!1}={}){var o;const[i,a]=null!=(o=ne.get(e))?o:[te],s=null!=t?t:i;let c;if(r){if(a&&(c=n(i,s)))return a;const t=e({...s});return ne.set(e,[s,t]),t}(null!=c?c:n(i,s))||ne.set(e,[s])}async function ie(e={}){var t,n,r=e,o=!!globalThis.window,i=typeof Bun<"u",a=!!globalThis.WorkerGlobalScope;null!==(t=globalThis.process)&&void 0!==t&&null!==(t=t.versions)&&void 0!==t&&t.node&&(null===(n=globalThis.process)||void 0===n||n.type);var s,c,l="./this.program",u="";if(o||a||i){try{u=new URL(".",void 0).href}catch{}a&&(c=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),s=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)}}var d,p,f,h,g,m,v,w,y,C,A,T,E=console.log.bind(console),b=console.error.bind(console),x=!1,B=!1;function R(){var e=Bt.buffer;h=new Int8Array(e),m=new Int16Array(e),r.HEAPU8=g=new Uint8Array(e),v=new Uint16Array(e),w=new Int32Array(e),y=new Uint32Array(e),C=new Float32Array(e),A=new Float64Array(e)}function M(e){var t,n;null===(t=r.onAbort)||void 0===t||t.call(r,e),b(e="Aborted("+e+")"),x=!0,e+=". Build with -sASSERTIONS for more info.";var o=new WebAssembly.RuntimeError(e);throw null===(n=f)||void 0===n||n(o),o}function D(){return e="zxing_reader.wasm",r.locateFile?r.locateFile(e,u):u+e;var e}async function k(e){if(!d)try{var t=await s(e);return new Uint8Array(t)}catch{}return function(e){if(e==T&&d)return new Uint8Array(d);if(c)return c(e);throw"both async and sync fetching of the wasm failed"}(e)}async function I(e,t,n){if(!e&&WebAssembly.instantiateStreaming)try{var r=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,n)}catch(e){b(`wasm streaming compile failed: ${e}`),b("falling back to ArrayBuffer instantiation")}return async function(e,t){try{var n=await k(e);return await WebAssembly.instantiate(n,t)}catch(e){b(`failed to asynchronously prepare wasm: ${e}`),M(e)}}(t,n)}var S=e=>{for(;e.length>0;)e.shift()(r)},F=[],P=e=>F.push(e),j=[],q=e=>j.push(e),O=e=>yt(e),N=()=>Ct(),L=[],G=0,V=0;class Y{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){y[this.ptr+4>>2]=e}get_type(){return y[this.ptr+4>>2]}set_destructor(e){y[this.ptr+8>>2]=e}get_destructor(){return y[this.ptr+8>>2]}set_caught(e){e=e?1:0,h[this.ptr+12]=e}get_caught(){return 0!=h[this.ptr+12]}set_rethrown(e){e=e?1:0,h[this.ptr+13]=e}get_rethrown(){return 0!=h[this.ptr+13]}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){y[this.ptr+16>>2]=e}get_adjusted_ptr(){return y[this.ptr+16>>2]}}var Q=e=>wt(e),U=e=>{var t=V;if(!t)return Q(0),0;var n=new Y(t);n.set_adjusted_ptr(t);var r=n.get_type();if(!r)return Q(0),t;for(var o of e){if(0===o||o===r)break;var i=n.ptr+16;if(Et(o,r,i))return Q(o),t}return Q(r),t},K={},W=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function _(e){return this.fromWireType(y[e>>2])}var J={},Z={},z={},H=class extends Error{constructor(e){super(e),this.name="InternalError"}},X=e=>{throw new H(e)},$=(e,t,n)=>{function r(t){var r=n(t);r.length!==e.length&&X("Mismatched type converter count");for(var o=0;o<e.length;++o)re(e[o],r[o])}e.forEach(e=>z[e]=t);var o=new Array(t.length),i=[],a=0;{const e=t;for(let t=0;t<e.length;++t){const n=e[t];Z.hasOwnProperty(n)?o[t]=Z[n]:(i.push(n),J.hasOwnProperty(n)||(J[n]=[]),J[n].push(()=>{o[t]=Z[n],++a===i.length&&r(o)}))}}0===i.length&&r(o)},ee=e=>{for(var t="";;){var n=g[e++];if(!n)return t;t+=String.fromCharCode(n)}},te=class extends Error{constructor(e){super(e),this.name="BindingError"}},ne=e=>{throw new te(e)};function re(e,t){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var r=t.name;if(e||ne(`type "${r}" must have a positive integer typeid pointer`),Z.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;ne(`Cannot register type '${r}' twice`)}if(Z[e]=t,delete z[e],J.hasOwnProperty(e)){var o=J[e];delete J[e],o.forEach(e=>e())}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}var oe=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),ie=e=>{ne(function(e){return e.$$.ptrType.registeredClass.name}(e)+" instance already deleted")},ae=!1,se=e=>{},ce=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},le=e=>globalThis.FinalizationRegistry?(ae=new FinalizationRegistry(e=>{ce(e.$$)}),le=e=>{var t=e.$$;if(!!t.smartPtr){var n={$$:t};ae.register(e,n,e)}return e},se=e=>ae.unregister(e),le(e)):(le=e=>e,e);function ue(){}var de=(e,t)=>Object.defineProperty(t,"name",{value:e}),pe={},fe=(e,t,n)=>{if(void 0===e[t].overloadTable){var r=e[t];e[t]=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e[t].overloadTable.hasOwnProperty(o.length)||ne(`Function '${n}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[o.length].apply(this,o)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},he=(e,t,n)=>{r.hasOwnProperty(e)?((void 0===n||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[n])&&ne(`Cannot register public name '${e}' twice`),fe(r,e,e),r[e].overloadTable.hasOwnProperty(n)&&ne(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),r[e].overloadTable[n]=t):(r[e]=t,r[e].argCount=n)};function ge(e,t,n,r,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var me=(e,t,n)=>{for(;t!==n;)t.upcast||ne(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},ve=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e};function we(e,t){if(null===t)return this.isReference&&ne(`null is not a valid ${this.name}`),0;t.$$||ne(`Cannot pass "${ve(t)}" as a ${this.name}`),t.$$.ptr||ne(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return me(t.$$.ptr,n,this.registeredClass)}function ye(e,t){var n;if(null===t)return this.isReference&&ne(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&ne(`Cannot pass "${ve(t)}" as a ${this.name}`),t.$$.ptr||ne(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&ne(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=me(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ne("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:ne(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,Ye.toHandle(()=>o.delete())),null!==e&&e.push(this.rawDestructor,n)}break;default:ne("Unsupporting sharing policy")}return n}function Ce(e,t){if(null===t)return this.isReference&&ne(`null is not a valid ${this.name}`),0;t.$$||ne(`Cannot pass "${ve(t)}" as a ${this.name}`),t.$$.ptr||ne(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&ne(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return me(t.$$.ptr,n,this.registeredClass)}var Ae=(e,t,n)=>{if(t===n)return e;if(void 0===n.baseClass)return null;var r=Ae(e,t,n.baseClass);return null===r?null:n.downcast(r)},Te={},Ee=(e,t)=>(t=((e,t)=>{for(void 0===t&&ne("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Te[t]),be=(e,t)=>((!t.ptrType||!t.ptr)&&X("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&X("Both smartPtrType and smartPtr must be specified"),t.count={value:1},le(Object.create(e,{$$:{value:t,writable:!0}})));function xe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=Ee(this.registeredClass,t);if(void 0!==n){if(0===n.$$.count.value)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?be(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):be(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=pe[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=Ae(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?be(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):be(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function Be(e,t,n,r,o,i,a,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,o||void 0!==t.baseClass?this.toWireType=ye:r?(this.toWireType=we,this.destructorFunction=null):(this.toWireType=Ce,this.destructorFunction=null)}var Re=(e,t,n)=>{r.hasOwnProperty(e)||X("Replacing nonexistent public symbol"),void 0!==r[e].overloadTable&&void 0!==n?r[e].overloadTable[n]=t:(r[e]=t,r[e].argCount=n)},Me={},De=[],ke=e=>{var t=De[e];return t||(De[e]=t=Rt.get(e)),t},Ie=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e.includes("j")?((e,t,n)=>(e=e.replace(/p/g,"i"),(0,Me[e])(t,...n)))(e,t,n):ke(t)(...n)},Se=function(e,t){var n=(e=ee(e)).includes("j")?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Ie(e,t,o,n)}}(e,t):ke(t);return"function"!=typeof n&&ne(`unknown function pointer with signature ${e}: ${t}`),n};class Fe extends Error{}var Pe=e=>{var t=ft(e),n=ee(t);return ht(t),n},je=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){if(!r[t]&&!Z[t]){if(z[t])return void z[t].forEach(e);n.push(t),r[t]=!0}}),new Fe(`${e}: `+n.map(Pe).join([", "]))},qe=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(y[t+4*r>>2]);return n};function Oe(e,t,n,r,o,i){var a=t.length;a<2&&ne("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=null!==t[1]&&null!==n,c=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].destructorFunction)return!0;return!1}(t),l=!t[0].isVoid,u=a-2,d=new Array(u),p=[],f=[];return de(e,function(){var e;f.length=0,p.length=s?2:1,p[0]=o,s&&(e=t[1].toWireType(f,this),p[1]=e);for(var n=0;n<u;++n)d[n]=t[n+2].toWireType(f,n<0||arguments.length<=n?void 0:arguments[n]),p.push(d[n]);return function(n){if(c)W(f);else for(var r=s?1:2;r<t.length;r++){var o=1===r?e:d[r-2];null!==t[r].destructorFunction&&t[r].destructorFunction(o)}if(l)return t[0].fromWireType(n)}(r(...p))})}var Ne=e=>{const t=(e=e.trim()).indexOf("(");return-1===t?e:e.slice(0,t)},Le=[],Ge=[0,1,,1,null,1,!0,1,!1,1],Ve=e=>{e>9&&0===--Ge[e+1]&&(Ge[e]=void 0,Le.push(e))},Ye={toValue:e=>(e||ne(`Cannot use deleted val. handle = ${e}`),Ge[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=Le.pop()||Ge.length;return Ge[t]=e,Ge[t+1]=1,t}}}},Qe={name:"emscripten::val",fromWireType:e=>{var t=Ye.toValue(e);return Ve(e),t},toWireType:(e,t)=>Ye.toHandle(t),readValueFromPointer:_,destructorFunction:null},Ue=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(A[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Ke=(e,t,n)=>{switch(t){case 1:return n?e=>h[e]:e=>g[e];case 2:return n?e=>m[e>>1]:e=>v[e>>1];case 4:return n?e=>w[e>>2]:e=>y[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},We=Object.assign({optional:!0},Qe),_e=(e,t,n)=>((e,t,n,r)=>{if(!(r>0))return 0;for(var o=n,i=n+r-1,a=0;a<e.length;++a){var s=e.codePointAt(a);if(s<=127){if(n>=i)break;t[n++]=s}else if(s<=2047){if(n+1>=i)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=i)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=i)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s,a++}}return t[n]=0,n-o})(e,g,t,n),Je=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},Ze=globalThis.TextDecoder&&new TextDecoder,ze=(e,t,n,r)=>{var o=t+n;if(r)return o;for(;e[t]&&!(t>=o);)++t;return t},He=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;var n=ze(e,t,arguments.length>2?arguments[2]:void 0,arguments.length>3?arguments[3]:void 0);if(n-t>16&&e.buffer&&Ze)return Ze.decode(e.subarray(t,n));for(var r="";t<n;){var o=e[t++];if(128&o){var i=63&e[t++];if(192!=(224&o)){var a=63&e[t++];if((o=224==(240&o)?(15&o)<<12|i<<6|a:(7&o)<<18|i<<12|a<<6|63&e[t++])<65536)r+=String.fromCharCode(o);else{var s=o-65536;r+=String.fromCharCode(55296|s>>10,56320|1023&s)}}else r+=String.fromCharCode((31&o)<<6|i)}else r+=String.fromCharCode(o)}return r},Xe=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,$e=(e,t,n)=>{var r=e>>1,o=ze(v,r,t/2,n);if(o-r>16&&Xe)return Xe.decode(v.subarray(r,o));for(var i="",a=r;a<o;++a){var s=v[a];i+=String.fromCharCode(s)}return i},et=(e,t,n)=>{if(null!=n||(n=2147483647),n<2)return 0;for(var r=t,o=(n-=2)<2*e.length?n/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);m[t>>1]=a,t+=2}return m[t>>1]=0,t-r},tt=e=>2*e.length,nt=(e,t,n)=>{for(var r="",o=e>>2,i=0;!(i>=t/4);i++){var a=y[o+i];if(!a&&!n)break;r+=String.fromCodePoint(a)}return r},rt=(e,t,n)=>{if(null!=n||(n=2147483647),n<4)return 0;for(var r=t,o=r+n-4,i=0;i<e.length;++i){var a=e.codePointAt(i);if(a>65535&&i++,w[t>>2]=a,(t+=4)+4>o)break}return w[t>>2]=0,t-r},ot=e=>{for(var t=0,n=0;n<e.length;++n){e.codePointAt(n)>65535&&n++,t+=4}return t},it=[],at=(e,t)=>{var n=Z[e];return void 0===n&&ne(`${t} has unknown type ${Pe(e)}`),n},st={},ct=e=>{var t=st[e];return void 0===t?ee(e):t},lt=(e,t)=>Math.ceil(e/t)*t,ut=e=>{var t=(e-Bt.buffer.byteLength+65535)/65536|0;try{return Bt.grow(t),R(),1}catch{}},dt={},pt=()=>{if(!pt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.language||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var t in dt)void 0===dt[t]?delete e[t]:e[t]=dt[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);pt.strings=n}return pt.strings};var ft,ht,gt,mt,vt,wt,yt,Ct,At,Tt,Et,bt,xt,Bt,Rt,Mt=[null,[],[]],Dt=(e,t)=>{var n=Mt[e];0===t||10===t?((1===e?E:b)(He(n)),n.length=0):n.push(t)};if((()=>{let e=ue.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof ue&&e instanceof ue))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o},clone(){if(this.$$.ptr||ie(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=le(Object.create(Object.getPrototypeOf(this),{$$:{value:oe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ne("Object already scheduled for deletion"),se(this),ce(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ne("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const t=Symbol.dispose;t&&(e[t]=e.delete)})(),Object.assign(Be.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;null===(t=this.rawDestructor)||void 0===t||t.call(this,e)},readValueFromPointer:_,fromWireType:xe}),r.noExitRuntime&&r.noExitRuntime,r.print&&(E=r.print),r.printErr&&(b=r.printErr),r.wasmBinary&&(d=r.wasmBinary),r.arguments&&r.arguments,r.thisProgram&&(l=r.thisProgram),r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.shift()();var kt,It={s:e=>{var t=new Y(e);return t.get_caught()||(t.set_caught(!0),G--),t.set_rethrown(!1),L.push(t),Tt(e),mt(e)},w:()=>{vt(0,0);var e=L.pop();At(e.excPtr),V=0},a:()=>U([]),j:e=>U([e]),m:(e,t)=>U([e,t]),Q:()=>{var e=L.pop();e||M("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(L.push(e),e.set_rethrown(!0),e.set_caught(!1),G++),V=t},p:(e,t,n)=>{throw new Y(e).init(t,n),G++,V=e},U:()=>G,d:e=>{throw V||(V=e),V},ca:()=>M(""),ta:e=>{var t=K[e];delete K[e];var n=t.rawConstructor,r=t.rawDestructor,o=t.fields,i=o.map(e=>e.getterReturnType).concat(o.map(e=>e.setterArgumentType));$([e],i,e=>{var i={};{const t=o;for(let n=0;n<t.length;++n){const r=t[n],a=e[n],s=r.getter,c=r.getterContext,l=e[n+o.length],u=r.setter,d=r.setterContext;i[r.fieldName]={read:e=>a.fromWireType(s(c,e)),write:(e,t)=>{var n=[];u(d,e,l.toWireType(n,t)),W(n)},optional:a.optional}}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in i)t[n]=i[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var o in i)if(!(o in t)&&!i[o].optional)throw new TypeError(`Missing field: "${o}"`);var a=n();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(r,a),a},readValueFromPointer:_,destructorFunction:r}]})},ba:(e,t,n,r,o)=>{},oa:(e,t,n,r)=>{re(e,{name:t=ee(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},ra:(e,t,n,r,o,i,a,s,c,l,u,d,p)=>{u=ee(u),i=Se(o,i),s&&(s=Se(a,s)),l&&(l=Se(c,l)),p=Se(d,p);var f=(e=>{var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e})(u);he(f,function(){je(`Cannot construct ${u} due to unbound types`,[r])}),$([e,t,n],r?[r]:[],t=>{var n,o;t=t[0],r?o=(n=t.registeredClass).instancePrototype:o=ue.prototype;var a=de(u,function(){if(Object.getPrototypeOf(this)!==c)throw new te(`Use 'new' to construct ${u}`);if(void 0===g.constructor_body)throw new te(`${u} has no accessible constructor`);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=g.constructor_body[t.length];if(void 0===r)throw new te(`Tried to invoke ctor of ${u} with invalid number of parameters (${t.length}) - expected (${Object.keys(g.constructor_body).toString()}) parameters instead!`);return r.apply(this,t)}),c=Object.create(o,{constructor:{value:a}});a.prototype=c;var d,h,g=new ge(u,a,c,p,n,i,s,l);g.baseClass&&(null!==(h=(d=g.baseClass).__derivedClasses)&&void 0!==h||(d.__derivedClasses=[]),g.baseClass.__derivedClasses.push(g));var m=new Be(u,g,!0,!1,!1),v=new Be(u+"*",g,!1,!1,!1),w=new Be(u+" const*",g,!1,!0,!1);return pe[e]={pointerType:v,constPointerType:w},Re(f,a),[m,v,w]})},qa:(e,t,n,r,o,i)=>{var a=qe(t,n);o=Se(r,o),$([],[e],e=>{var n=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new te(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{je(`Cannot construct ${e.name} due to unbound types`,a)},$([],a,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Oe(n,r,null,o,i),[])),[]})},H:(e,t,n,r,o,i,a,s,c,l)=>{var u=qe(n,r);t=ee(t),t=Ne(t),i=Se(o,i),$([],[e],e=>{var r=`${(e=e[0]).name}.${t}`;function o(){je(`Cannot call ${r} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,l=c[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===n-2?(o.argCount=n-2,o.className=e.name,c[t]=o):(fe(c,t,r),c[t].overloadTable[n-2]=o),$([],u,o=>{var s=Oe(r,o,e,i,a);return void 0===c[t].overloadTable?(s.argCount=n-2,c[t]=s):c[t].overloadTable[n-2]=s,[]}),[]})},ma:e=>re(e,Qe),X:(e,t,n)=>{re(e,{name:t=ee(t),fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Ue(t,n),destructorFunction:null})},Y:(e,t,n,r,o,i,a,s)=>{var c=qe(t,n);e=ee(e),e=Ne(e),o=Se(r,o),he(e,function(){je(`Cannot call ${e} due to unbound types`,c)},t-1),$([],c,n=>{var r=[n[0],null].concat(n.slice(1));return Re(e,Oe(e,r,null,o,i),t-1),[]})},x:(e,t,n,r,o)=>{t=ee(t);let i=e=>e;if(0===r){var a=32-8*n;i=e=>e<<a>>>a,o=i(o)}re(e,{name:t,fromWireType:i,toWireType:(e,t)=>t,readValueFromPointer:Ke(t,n,0!==r),destructorFunction:null})},t:(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=y[e>>2],n=y[e+4>>2];return new r(h.buffer,n,t)}re(e,{name:n=ee(n),fromWireType:o,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},sa:(e,t)=>{re(e,We)},na:(e,t)=>{re(e,{name:t=ee(t),fromWireType(e){var t;return t=((e,t,n)=>e?He(g,e,t,n):"")(e+4,y[e>>2],!0),ht(e),t},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r="string"==typeof t;r||ArrayBuffer.isView(t)&&1==t.BYTES_PER_ELEMENT||ne("Cannot pass non-string to std::string"),n=r?Je(t):t.length;var o=gt(4+n+1),i=o+4;return y[o>>2]=n,r?_e(t,i,n+1):g.set(t,i),null!==e&&e.push(ht,o),o},readValueFromPointer:_,destructorFunction(e){ht(e)}})},R:(e,t,n)=>{var r,o,i;n=ee(n),2===t?(r=$e,o=et,i=tt):(r=nt,o=rt,i=ot),re(e,{name:n,fromWireType:e=>{var n=y[e>>2],o=r(e+4,n*t,!0);return ht(e),o},toWireType:(e,r)=>{"string"!=typeof r&&ne(`Cannot pass non-string to C++ string type ${n}`);var a=i(r),s=gt(4+a+t);return y[s>>2]=a/t,o(r,s+4,a+t),null!==e&&e.push(ht,s),s},readValueFromPointer:_,destructorFunction(e){ht(e)}})},I:(e,t,n,r,o,i)=>{K[e]={name:ee(t),rawConstructor:Se(n,r),rawDestructor:Se(o,i),fields:[]}},ua:(e,t,n,r,o,i,a,s,c,l)=>{K[e].fields.push({fieldName:ee(t),getterReturnType:n,getter:Se(r,o),getterContext:i,setterArgumentType:a,setter:Se(s,c),setterContext:l})},pa:(e,t)=>{re(e,{isVoid:!0,name:t=ee(t),fromWireType:()=>{},toWireType:(e,t)=>{}})},N:(e,t,n)=>{var[r,...o]=((e,t)=>{for(var n=new Array(e),r=0;r<e;++r)n[r]=at(y[t+4*r>>2],`parameter ${r}`);return n})(e,t),i=r.toWireType.bind(r),a=o.map(e=>e.readValueFromPointer.bind(e));e--;var s=new Array(e),c=`methodCaller<(${o.map(e=>e.name)}) => ${r.name}>`;return(e=>{var t=it.length;return it.push(e),t})(de(c,(t,r,o,c)=>{for(var l=0,u=0;u<e;++u)s[u]=a[u](c+l),l+=8;var d;switch(n){case 0:d=Ye.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(Ye.toValue(t),s);break;case 3:d=s[0];break;case 1:d=Ye.toValue(t)[ct(r)](...s)}return((e,t,n)=>{var r=[],o=e(r,n);return r.length&&(y[t>>2]=Ye.toHandle(r)),o})(i,o,d)}))},va:Ve,D:e=>e?(e=ct(e),Ye.toHandle(globalThis[e])):Ye.toHandle(globalThis),S:e=>{e>9&&(Ge[e+1]+=1)},M:(e,t,n,r,o)=>it[e](t,n,r,o),ia:e=>{var t=Ye.toValue(e);W(t),Ve(e)},da:(e,t,n,r)=>{var o=(new Date).getFullYear(),i=new Date(o,0,1),a=new Date(o,6,1),s=i.getTimezoneOffset(),c=a.getTimezoneOffset(),l=Math.max(s,c);y[e>>2]=60*l,w[t>>2]=+(s!=c);var u=e=>{var t=e>=0?"-":"+",n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,"0")}${String(n%60).padStart(2,"0")}`},d=u(s),p=u(c);c<s?(_e(d,n,17),_e(p,r,17)):(_e(d,r,17),_e(p,n,17))},ga:e=>{var t=g.length,n=2147483648;if((e>>>=0)>n)return!1;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);o=Math.min(o,e+100663296);var i=Math.min(n,lt(Math.max(e,o),65536));if(ut(i))return!0}return!1},ea:(e,t)=>{var n=0,r=0;for(var o of pt()){var i=t+n;y[e+r>>2]=i,n+=_e(o,i,1/0)+1,r+=4}return 0},fa:(e,t)=>{var n=pt();y[e>>2]=n.length;var r=0;for(var o of n)r+=Je(o)+1;return y[t>>2]=r,0},ha:e=>52,$:function(e,t,n,r,o){return 70},V:(e,t,n,r)=>{for(var o=0,i=0;i<n;i++){var a=y[t>>2],s=y[t+4>>2];t+=8;for(var c=0;c<s;c++)Dt(e,g[a+c]);o+=s}return y[r>>2]=o,0},K:function(e,t,n,r){var o=N();try{return ke(e)(t,n,r)}catch(e){if(O(o),e!==e+0)throw e;vt(1,0)}},C:function(e,t,n,r,o,i){var a=N();try{return ke(e)(t,n,r,o,i)}catch(e){if(O(a),e!==e+0)throw e;vt(1,0)}},Z:function(e,t,n,r,o,i){var a=N();try{return ke(e)(t,n,r,o,i)}catch(e){if(O(a),e!==e+0)throw e;vt(1,0)}},T:function(e,t,n,r){var o=N();try{return ke(e)(t,n,r)}catch(e){if(O(o),e!==e+0)throw e;vt(1,0)}},r:function(e){var t=N();try{return ke(e)()}catch(e){if(O(t),e!==e+0)throw e;vt(1,0)}},b:function(e,t){var n=N();try{return ke(e)(t)}catch(e){if(O(n),e!==e+0)throw e;vt(1,0)}},E:function(e,t,n,r){var o=N();try{return ke(e)(t,n,r)}catch(e){if(O(o),e!==e+0)throw e;vt(1,0)}},ka:function(e,t,n){var r=N();try{return ke(e)(t,n)}catch(e){if(O(r),e!==e+0)throw e;vt(1,0)}},c:function(e,t,n){var r=N();try{return ke(e)(t,n)}catch(e){if(O(r),e!==e+0)throw e;vt(1,0)}},ja:function(e,t,n,r,o){var i=N();try{return ke(e)(t,n,r,o)}catch(e){if(O(i),e!==e+0)throw e;vt(1,0)}},h:function(e,t,n,r){var o=N();try{return ke(e)(t,n,r)}catch(e){if(O(o),e!==e+0)throw e;vt(1,0)}},i:function(e,t,n,r,o){var i=N();try{return ke(e)(t,n,r,o)}catch(e){if(O(i),e!==e+0)throw e;vt(1,0)}},q:function(e,t,n,r,o,i){var a=N();try{return ke(e)(t,n,r,o,i)}catch(e){if(O(a),e!==e+0)throw e;vt(1,0)}},P:function(e,t,n,r,o,i,a){var s=N();try{return ke(e)(t,n,r,o,i,a)}catch(e){if(O(s),e!==e+0)throw e;vt(1,0)}},v:function(e,t,n,r,o,i,a){var s=N();try{return ke(e)(t,n,r,o,i,a)}catch(e){if(O(s),e!==e+0)throw e;vt(1,0)}},F:function(e,t,n,r,o,i,a,s){var c=N();try{return ke(e)(t,n,r,o,i,a,s)}catch(e){if(O(c),e!==e+0)throw e;vt(1,0)}},L:function(e,t,n,r,o,i,a,s,c){var l=N();try{return ke(e)(t,n,r,o,i,a,s,c)}catch(e){if(O(l),e!==e+0)throw e;vt(1,0)}},z:function(e,t,n,r,o,i,a,s,c,l){var u=N();try{return ke(e)(t,n,r,o,i,a,s,c,l)}catch(e){if(O(u),e!==e+0)throw e;vt(1,0)}},J:function(e,t,n,r,o,i,a,s,c,l,u,d){var p=N();try{return ke(e)(t,n,r,o,i,a,s,c,l,u,d)}catch(e){if(O(p),e!==e+0)throw e;vt(1,0)}},aa:function(e,t,n,r,o,i,a){var s=N();try{return bt(e,t,n,r,o,i,a)}catch(e){if(O(s),e!==e+0)throw e;vt(1,0)}},_:function(e,t,n,r,o){var i=N();try{return xt(e,t,n,r,o)}catch(e){if(O(i),e!==e+0)throw e;vt(1,0)}},f:function(e){var t=N();try{ke(e)()}catch(e){if(O(t),e!==e+0)throw e;vt(1,0)}},l:function(e,t){var n=N();try{ke(e)(t)}catch(e){if(O(n),e!==e+0)throw e;vt(1,0)}},e:function(e,t,n){var r=N();try{ke(e)(t,n)}catch(e){if(O(r),e!==e+0)throw e;vt(1,0)}},g:function(e,t,n,r){var o=N();try{ke(e)(t,n,r)}catch(e){if(O(o),e!==e+0)throw e;vt(1,0)}},O:function(e,t,n,r,o,i,a){var s=N();try{ke(e)(t,n,r,o,i,a)}catch(e){if(O(s),e!==e+0)throw e;vt(1,0)}},k:function(e,t,n,r,o){var i=N();try{ke(e)(t,n,r,o)}catch(e){if(O(i),e!==e+0)throw e;vt(1,0)}},la:function(e,t,n,r,o,i,a,s){var c=N();try{ke(e)(t,n,r,o,i,a,s)}catch(e){if(O(c),e!==e+0)throw e;vt(1,0)}},o:function(e,t,n,r,o,i){var a=N();try{ke(e)(t,n,r,o,i)}catch(e){if(O(a),e!==e+0)throw e;vt(1,0)}},B:function(e,t,n,r,o,i,a){var s=N();try{ke(e)(t,n,r,o,i,a)}catch(e){if(O(s),e!==e+0)throw e;vt(1,0)}},u:function(e,t,n,r,o,i,a,s){var c=N();try{ke(e)(t,n,r,o,i,a,s)}catch(e){if(O(c),e!==e+0)throw e;vt(1,0)}},W:function(e,t,n,r,o,i,a,s,c){var l=N();try{ke(e)(t,n,r,o,i,a,s,c)}catch(e){if(O(l),e!==e+0)throw e;vt(1,0)}},A:function(e,t,n,r,o,i,a,s,c,l){var u=N();try{ke(e)(t,n,r,o,i,a,s,c,l)}catch(e){if(O(u),e!==e+0)throw e;vt(1,0)}},n:function(e,t,n,r,o,i,a,s,c,l,u){var d=N();try{ke(e)(t,n,r,o,i,a,s,c,l,u)}catch(e){if(O(d),e!==e+0)throw e;vt(1,0)}},G:function(e,t,n,r,o,i,a,s,c,l,u,d,p,f,h,g){var m=N();try{ke(e)(t,n,r,o,i,a,s,c,l,u,d,p,f,h,g)}catch(e){if(O(m),e!==e+0)throw e;vt(1,0)}},y:e=>e};return kt=await async function(){function e(e,t){return function(e){ft=e.ya,ht=r._free=e.za,gt=r._malloc=e.Ba,mt=e.Ca,vt=e.Da,wt=e.Ea,yt=e.Fa,Ct=e.Ga,At=e.Ha,Tt=e.Ia,Et=e.Ja,Me.viijii=e.Ka,bt=Me.iiijj=e.La,Me.jiji=e.Ma,xt=Me.jiiii=e.Na,Me.iiiiij=e.Oa,Me.iiiiijj=e.Pa,Me.iiiiiijj=e.Qa,Bt=e.wa,Rt=e.Aa}(kt=e.exports),R(),kt}var t={a:It};if(r.instantiateWasm)return new Promise((n,o)=>{r.instantiateWasm(t,(t,r)=>{n(e(t))})});null!=T||(T=D());var n=await I(d,T,t);return e(n.instance)}(),function(){function e(){var e,t;r.calledRun=!0,!x&&(B=!0,kt.xa(),null===(e=p)||void 0===e||e(r),null===(t=r.onRuntimeInitialized)||void 0===t||t.call(r),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)P(r.postRun.shift());S(F)}())}!function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)q(r.preRun.shift());S(j)}(),r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),e()},1)):e()}(),B?r:new Promise((e,t)=>{p=e,f=t})}async function ae(e,t){return async function(e,t,n=X){const r={...X,...n},o=await oe(e,{fireImmediately:!0});let i,a;if("width"in t&&"height"in t&&"data"in t){const{data:e,data:{byteLength:n},width:s,height:c}=t;a=o._malloc(n),o.HEAPU8.set(e,a),i=o.readBarcodesFromPixmap(a,s,c,$(r))}else{let e,n;if("buffer"in t)[e,n]=[t.byteLength,t];else if("byteLength"in t)[e,n]=[t.byteLength,new Uint8Array(t)];else{if(!("size"in t))throw new TypeError("Invalid input type");[e,n]=[t.size,new Uint8Array(await t.arrayBuffer())]}a=o._malloc(e),o.HEAPU8.set(n,a),i=o.readBarcodesFromImage(a,e,$(r))}o._free(a);const s=[];for(let e=0;e<i.size();++e)s.push(ee(i.get(e)));return s}(ie,e,t)}const se=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"],["any","Any"]],ce=[...se,["unknown"]].map(e=>e[0]),le=new Map(se);function ue(e){for(const[t,n]of le)if(e===n)return t;return"unknown"}function de(e){var t,n;try{return e instanceof(null==(n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView)?void 0:n.HTMLImageElement)}catch{return!1}}function pe(e){var t,n;try{return e instanceof(null==(n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView)?void 0:n.SVGImageElement)}catch{return!1}}function fe(e){var t,n;try{return e instanceof(null==(n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView)?void 0:n.HTMLVideoElement)}catch{return!1}}function he(e){var t,n;try{return e instanceof(null==(n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView)?void 0:n.HTMLCanvasElement)}catch{return!1}}function ge(e){try{return e instanceof ImageBitmap||"[object ImageBitmap]"===Object.prototype.toString.call(e)}catch{return!1}}function me(e){try{return e instanceof OffscreenCanvas||"[object OffscreenCanvas]"===Object.prototype.toString.call(e)}catch{return!1}}function ve(e){try{return e instanceof VideoFrame||"[object VideoFrame]"===Object.prototype.toString.call(e)}catch{return!1}}async function we(e){if(de(e)&&!await async function(e){try{return await e.decode(),!0}catch{return!1}}(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(pe(e)&&!await async function(e){var t;try{return await(null==(t=e.decode)?void 0:t.call(e)),!0}catch{return!1}}(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ve(e)&&function(e){return null===e.format}(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(fe(e)&&(0===e.readyState||1===e.readyState))throw new DOMException("Invalid element or state.","InvalidStateError");if(ge(e)&&function(e){return 0===e.width&&0===e.height}(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=function(e){if(de(e))return{width:e.naturalWidth,height:e.naturalHeight};if(pe(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(fe(e))return{width:e.videoWidth,height:e.videoHeight};if(ge(e))return{width:e.width,height:e.height};if(ve(e))return{width:e.displayWidth,height:e.displayHeight};if(he(e))return{width:e.width,height:e.height};if(me(e))return{width:e.width,height:e.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}(e);if(0===t||0===n)return null;const r=function(e,t){try{const n=new OffscreenCanvas(e,t);if(n.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{const n=document.createElement("canvas");return n.width=e,n.height=t,n}}(t,n).getContext("2d");r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ye(e){if(function(e){try{return e instanceof Blob||"[object Blob]"===Object.prototype.toString.call(e)}catch{return!1}}(e))return await async function(e){let t;try{t=await createImageBitmap(e)}catch{try{if(!globalThis.Image)return e;{t=new Image;let n="";try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await we(t)}(e);if(function(e){try{return e instanceof ImageData||"[object ImageData]"===Object.prototype.toString.call(e)}catch{return!1}}(e)){if(function(e){return 0===e.data.buffer.byteLength}(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return he(e)||me(e)?function(e){const{width:t,height:n}=e;if(0===t||0===n)return null;const r=e.getContext("2d");try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}(e):await we(e)}function Ce(e,t){return function(e){return e instanceof DOMException||"[object DOMException]"===Object.prototype.toString.call(e)}(e)?new DOMException(`${t}: ${e.message}`,e.name):function(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}(e)?new e.constructor(`${t}: ${e.message}`):new Error(`${t}: ${e}`)}var Ae;class Te{constructor(e={}){var t,n;((e,t,n)=>{t.has(e)?I("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,Ae);try{const r=null==(t=null==e?void 0:e.formats)?void 0:t.filter(e=>"unknown"!==e);if(0===(null==r?void 0:r.length))throw new TypeError("Hint option provided, but is empty.");for(const e of null!=r?r:[])if(!le.has(e))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${e}' is not a valid enum value of type BarcodeFormat.`);((e,t,n)=>{S(e,t,"write to private field"),t.set(e,n)})(this,Ae,null!=r?r:[]),(n={fireImmediately:!0},oe(ie,n)).catch(()=>{})}catch(e){throw Ce(e,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return ce.filter(e=>"unknown"!==e)}async detect(e){try{const t=await ye(e);if(null===t)return[];let n;const r={tryCode39ExtendedMode:!1,textMode:"Plain",formats:F(this,Ae).map(e=>le.get(e))};try{n=await ae(t,r)}catch(e){throw console.error(e),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return n.map(e=>{const{topLeft:{x:t,y:n},topRight:{x:r,y:o},bottomLeft:{x:i,y:a},bottomRight:{x:s,y:c}}=e.position,l=Math.min(t,r,i,s),u=Math.min(n,o,a,c),d=Math.max(t,r,i,s),p=Math.max(n,o,a,c);return{boundingBox:new DOMRectReadOnly(l,u,d-l,p-u),rawValue:e.text,format:ue(e.format),cornerPoints:[{x:t,y:n},{x:r,y:o},{x:s,y:c},{x:i,y:a}]}})}catch(e){throw Ce(e,"Failed to execute 'detect' on 'BarcodeDetector'")}}}Ae=new WeakMap,null!=globalThis.BarcodeDetector||(globalThis.BarcodeDetector=Te);let Ee=!0,be=!0;function xe(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function Be(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return o.apply(this,arguments);const i=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,i),o.apply(this,[e,i])};const i=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(n))return i.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,i.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function Re(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(Ee=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function Me(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(be=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function De(){if("object"==typeof window){if(Ee)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function ke(e,t){be&&console.warn(e+" is deprecated, please use "+t+" instead.")}function Ie(e){return"[object Object]"===Object.prototype.toString.call(e)}function Se(e){return Ie(e)?Object.keys(e).reduce(function(t,n){const r=Ie(e[n]),o=r?Se(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,{[n]:o})},{}):e}function Fe(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?Fe(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{Fe(e,e.get(t),n)})}))}function Pe(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(null===t)return o;const i=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&i.push(e)}),i.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&Fe(e,n,o)})}),o}const je=De;function qe(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[o("min",n)]=r.ideal,t.optional.push(e),e={},e[o("max",n)]=r.ideal,t.optional.push(e)):(e[o("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},o=function(e,o){if(t.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let i=e.video.facingMode;i=i&&("object"==typeof i?i:{ideal:i});const a=t.version<66;if(i&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===i.exact||"environment"===i.ideal?t=["back","rear"]:"user"!==i.exact&&"user"!==i.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{n=n.filter(e=>"videoinput"===e.kind);let a=n.find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=i.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),je("chrome: "+JSON.stringify(e)),o(e)})}e.video=r(e.video)}return je("chrome: "+JSON.stringify(e)),o(e)},i=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){o(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(i(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return o(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(i(e))))}}}function Oe(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function Ne(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const o=new Event("track");o.track=n.track,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const o=new Event("track");o.track=n,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else Be(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function Le(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let o=n.apply(this,arguments);return o||(o=t(this,e),this._senders.push(o)),o};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function Ge(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>Pe(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),Be(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>Pe(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function Ve(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{const t=this.getSenders().find(t=>t.track===e);if(t)throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),o.apply(this,arguments)}}function Ye(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return Ve(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{const t=this.getSenders().find(t=>t.track===e);if(t)throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const o=e.RTCPeerConnection.prototype.removeStream;function i(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(o.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");const o=this.getSenders().find(e=>e.track===t);if(o)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=i(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>i(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),o.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const s=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=s.get.apply(this);return""===e.type?e:i(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Qe(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function Ue(e,t){Be(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var Ke=Object.freeze({__proto__:null,fixNegotiationNeeded:Ue,shimAddTrackRemoveTrack:Ye,shimAddTrackRemoveTrackWithNative:Ve,shimGetSendersWithDtmf:Le,shimGetUserMedia:qe,shimMediaStream:Oe,shimOnTrack:Ne,shimPeerConnection:Qe,shimSenderReceiverGetStats:Ge});function We(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){ke("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function _e(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Je(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,o,i]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!o)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(o,i)}}function Ze(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function ze(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),Be(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function He(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){ke("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function Xe(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function $e(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function et(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function tt(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function nt(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var rt=Object.freeze({__proto__:null,shimAddTransceiver:$e,shimCreateAnswer:nt,shimCreateOffer:tt,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:et,shimGetUserMedia:We,shimOnTrack:_e,shimPeerConnection:Je,shimRTCDataChannel:Xe,shimReceiverGetStats:ze,shimRemoveStream:He,shimSenderGetStats:Ze});function ot(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function it(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function at(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],o=n.apply(this,[r]);return t?(o.then(e,t),Promise.resolve()):o},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[n]);return t?(o.then(e,t),Promise.resolve()):o};let s=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}function st(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(ct(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function ct(e){return e&&void 0!==e.video?Object.assign({},e,{video:Se(e.video)}):e}function lt(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(ke("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function ut(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function dt(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function pt(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var ft,ht=Object.freeze({__proto__:null,shimAudioContext:pt,shimCallbacksAPI:at,shimConstraints:ct,shimCreateOfferLegacy:dt,shimGetUserMedia:st,shimLocalStreamsAPI:ot,shimRTCIceServerUrls:lt,shimRemoteStreamsAPI:it,shimTrackEventTransceiver:ut}),gt={exports:{}};var mt=(ft||(ft=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],o=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&o?{usernameFragment:r.substring(12),password:o.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let o=3;o<r.length;o++){const i=r[o],a=t.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(a){const r=t.parseRtpMap(a),o=t.matchPrefix(e,"a=fmtp:"+i+" ");switch(r.parameters=o.length?t.parseFmtp(o[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const o=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{o.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let o=0;return n.codecs.forEach(e=>{e.maxptime>o&&(o=e.maxptime)}),o>0&&(r+="a=maxptime:"+o+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),o=-1!==r.fecMechanisms.indexOf("RED"),i=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),s=a.length>0&&a[0].ssrc;let c;const l=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));l.length>0&&l[0].length>1&&l[0][0]===s&&(c=l[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&c&&(t.rtx={ssrc:c}),n.push(t),o&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:s,mechanism:i?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&s&&n.push({ssrc:s});let u=t.matchPrefix(e,"b=");return u.length&&(u=0===u[0].indexOf("b=TIAS:")?parseInt(u[0].substring(7),10):0===u[0].indexOf("b=AS:")?1e3*parseInt(u[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=u})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const o=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=o.length>0,n.compound=0===o.length;const i=t.matchPrefix(e,"a=rtcp-mux");return n.mux=i.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const o=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return o.length>0?(n=o[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let o;r.length>0&&(o=parseInt(r[0].substring(19),10)),isNaN(o)&&(o=65536);const i=t.matchPrefix(e,"a=sctp-port:");if(i.length>0)return{port:parseInt(i[0].substring(12),10),protocol:n.fmt,maxMessageSize:o};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:o}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let o;const i=void 0!==n?n:2;return o=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+o+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(gt)),gt.exports),vt=h(mt),wt=s({__proto__:null,default:vt},[mt]);function yt(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=vt.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,Be(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function Ct(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||Be(e,"icecandidate",e=>{if(e.candidate){const t=vt.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function At(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=vt.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=vt.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const o=vt.matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?r=parseInt(o[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let o;o=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const i={};Object.defineProperty(i,"maxMessageSize",{get:()=>o}),this._sctp=i}return n.apply(this,arguments)}}function Tt(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],o=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&o>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},Be(e,"datachannel",e=>(t(e.channel,e.target),e))}function Et(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function bt(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function xt(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function Bt(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var Rt=Object.freeze({__proto__:null,removeExtmapAllowMixed:bt,shimAddIceCandidateNullOrEmpty:xt,shimConnectionState:Et,shimMaxMessageSize:At,shimParameterlessSetLocalDescription:Bt,shimRTCIceCandidate:yt,shimRTCIceCandidateRelayProtocol:Ct,shimSendThrowTypeError:Tt});!function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=De,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(xe(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(xe(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(xe(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=xe(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),o={browserDetails:r,commonShim:Rt,extractVersion:xe,disableLog:Re,disableWarnings:Me,sdp:wt};switch(r.browser){case"chrome":if(!Ke||!Qe||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),o;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),o;n("adapter.js shimming chrome."),o.browserShim=Ke,xt(e,r),Bt(e),qe(e,r),Oe(e),Qe(e,r),Ne(e),Ye(e,r),Le(e),Ge(e),Ue(e,r),yt(e),Ct(e),Et(e),At(e,r),Tt(e),bt(e,r);break;case"firefox":if(!rt||!Je||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),o;n("adapter.js shimming firefox."),o.browserShim=rt,xt(e,r),Bt(e),We(e,r),Je(e,r),_e(e),He(e),Ze(e),ze(e),Xe(e),$e(e),et(e),tt(e),nt(e),yt(e),Et(e),At(e,r),Tt(e);break;case"safari":if(!ht||!t.shimSafari)return n("Safari shim is not included in this adapter release."),o;n("adapter.js shimming safari."),o.browserShim=ht,xt(e,r),Bt(e),lt(e),dt(e),at(e),ot(e),it(e),ut(e),st(e),pt(e),yt(e),Ct(e),At(e,r),Tt(e),bt(e,r);break;default:n("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});const Mt={finder:!0,torch:!0,tracker:void 0,onOff:!1,zoom:!1},Dt={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},kt={width:"100%",height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",aspectRatio:"1/1"},It={width:"100%",height:"100%",objectFit:"cover",overflow:"hidden"};function St(e,t){for(const n of e){const[e,...r]=n.cornerPoints;t.lineWidth=2,t.strokeStyle="yellow",t.beginPath(),t.moveTo(e.x,e.y);for(const{x:e,y:n}of r)t.lineTo(e,n);t.lineTo(e.x,e.y),t.closePath(),t.stroke()}}function Ft(e,t){for(const n of e){const{boundingBox:{x:e,y:r,width:o,height:i}}=n;t.lineWidth=2,t.strokeStyle="yellow",t.strokeRect(e,r,o,i)}}function Pt(e,t){e.forEach(e=>{const{boundingBox:n,rawValue:r}=e,o=n.x+n.width/2,i=n.y+n.height/2,a=Math.max(12,50*n.width/t.canvas.width),s=a;let c;t.font=`${a}px sans-serif`,t.textAlign="left";try{c=JSON.stringify(JSON.parse(r),null,2)}catch{c=r}const l=c.split("\n"),u=Math.max(...l.map(e=>t.measureText(e).width)),d=l.length*s,p=o-u/2-10,f=i-d/2-10,h=u+20,g=d+10;t.beginPath(),t.moveTo(p+8,f),t.lineTo(p+h-8,f),t.quadraticCurveTo(p+h,f,p+h,f+8),t.lineTo(p+h,f+g-8),t.quadraticCurveTo(p+h,f+g,p+h-8,f+g),t.lineTo(p+8,f+g),t.quadraticCurveTo(p,f+g,p,f+g-8),t.lineTo(p,f+8),t.quadraticCurveTo(p,f,p+8,f),t.closePath(),t.fillStyle="rgba(255, 255, 0, 0.9)",t.fill(),l.forEach((e,n)=>{const r=i+n*s-(l.length-1)*s/2;let a=o-u/2,c=0;const d=[...e.matchAll(/"([^"]+)":/g)],p=[...e.matchAll(/:\s*("[^"]*"|\d+|true|false|null)/g)];d.forEach((n,o)=>{const i=n[0].replace(":",""),s=e.substring(c,n.index);if(t.fillStyle="black",t.fillText(s,a,r),a+=t.measureText(s).width,t.fillStyle="blue",t.fillText(i,a,r),a+=t.measureText(i).width,c=n.index+i.length,t.fillStyle="black",t.fillText(": ",a,r),a+=t.measureText(": ").width,o<p.length){const n=p[o],i=e.substring(c,n.index);t.fillStyle="black",t.fillText(i,a,r),a+=t.measureText(i).width;const s=n[0].match(/:\s*(.*)/)?.[1]??"";t.fillStyle="green",t.fillText(s,a,r),a+=t.measureText(s).width,c=n.index+n[0].length}}),t.fillStyle="black";const f=e.substring(c);t.fillText(f,a,r)})})}var jt=e=>e instanceof Date,qt=e=>null==e;const Ot=e=>"object"==typeof e;var Nt=e=>!qt(e)&&!Array.isArray(e)&&Ot(e)&&!jt(e),Lt=e=>qt(e)||!Ot(e);function Gt(e,t){if(Lt(e)||Lt(t))return e===t;if(jt(e)&&jt(t))return e.getTime()===t.getTime();const n=e,r=t,o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;for(const e of o){const t=n[e];if(!i.includes(e))return!1;if("ref"!==e){const n=r[e];if(jt(t)&&jt(n)||Nt(t)&&Nt(n)||Array.isArray(t)&&Array.isArray(n)?!Gt(t,n):t!==n)return!1}}return!0}function Vt(e){const{onClick:t,disabled:n,className:r}=e,o={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return T.jsxs("svg",{onClick:n?void 0:t,className:r,style:o,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("title",{children:"Camera Off"}),T.jsx("path",{d:"M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007"})]})}function Yt(e){const{onClick:t,disabled:n,className:r}=e,o={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return T.jsxs("svg",{onClick:n?void 0:t,className:r,style:o,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("title",{children:"Camera On"}),T.jsx("path",{d:"M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z"}),T.jsx("path",{d:"M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z"})]})}function Qt(t){const{scanning:n,startScanning:r,stopScanning:o}=t,[i,a]=e.useState(!1);return T.jsx("div",{style:{bottom:85,right:8,position:"absolute",zIndex:2,cursor:i?"default":"pointer"},children:T.jsx(n?Vt:Yt,{disabled:i,onClick:function(){a(!0),n?o():r(),setTimeout(()=>a(!1),1e3)}})})}function Ut(e){const{onClick:t,className:n,style:r}=e;return T.jsxs("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("title",{children:"Torch Off"}),T.jsx("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z"})]})}function Kt(e){const{onClick:t,className:n,style:r}=e;return T.jsxs("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("title",{children:"Torch On"}),T.jsx("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z"})]})}function Wt(e){const{status:t,scanning:n,torchToggle:r}=e;function o(e){r(e)}return n&&r?T.jsx("div",{style:{bottom:35,right:8,position:"absolute",zIndex:2,cursor:"pointer"},children:t?T.jsx(Ut,{onClick:()=>o(!1)}):T.jsx(Kt,{onClick:()=>o(!0)})}):null}function _t(e){const{onClick:t,className:n,disabled:r=!1}=e,o={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return T.jsxs("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:o,xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("title",{children:"Zoom In"}),T.jsx("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z"})]})}function Jt(e){const{onClick:t,className:n,disabled:r=!1}=e,o={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return T.jsxs("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:o,xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("title",{children:"Zoom Out"}),T.jsx("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z"})]})}function Zt(t){const{scanning:n,capabilities:r,onZoom:o,value:i}=t;if(!n||!o)return null;const a=(r.max-r.min)/3;return T.jsxs(e.Fragment,{children:[T.jsx("div",{style:{bottom:130,right:8,position:"absolute",zIndex:2,cursor:"pointer"},children:T.jsx(Jt,{disabled:i<=r.min,onClick:function(){o(Math.max(i-a,r.min))}})}),T.jsx("div",{style:{bottom:180,right:8,position:"absolute",zIndex:2,cursor:"pointer"},children:T.jsx(_t,{disabled:i>=r.max,onClick:function(){o(Math.min(i+a,r.max))}})})]})}const zt={fullContainer:{width:"100%",height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},innerContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},overlay:{position:"absolute",top:0,right:0,bottom:0,left:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},borderBox:{position:"relative",width:"70%",aspectRatio:"1 / 1",border:"2px dashed rgba(239, 68, 68, 0.4)",borderRadius:"0.5rem"},cornerTopLeft:{position:"absolute",width:"15%",height:"15%",border:"4px solid #ef4444",top:0,left:0,borderBottomColor:"transparent",borderRightColor:"transparent",borderTopLeftRadius:"0.5rem"},cornerTopRight:{position:"absolute",width:"15%",height:"15%",border:"4px solid #ef4444",top:0,right:0,borderBottomColor:"transparent",borderLeftColor:"transparent",borderTopRightRadius:"0.5rem"},cornerBottomLeft:{position:"absolute",width:"15%",height:"15%",border:"4px solid #ef4444",bottom:0,left:0,borderTopColor:"transparent",borderRightColor:"transparent",borderBottomLeftRadius:"0.5rem"},cornerBottomRight:{position:"absolute",width:"15%",height:"15%",border:"4px solid #ef4444",bottom:0,right:0,borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomRightRadius:"0.5rem"}};function Ht(e){const{scanning:t,capabilities:n,onOff:r,torch:o,zoom:i,startScanning:a,stopScanning:s}=e;return T.jsx("div",{style:zt.fullContainer,children:T.jsxs("div",{style:zt.innerContainer,children:[T.jsx("div",{style:zt.overlay,children:T.jsxs("div",{style:zt.borderBox,children:[T.jsx("div",{style:zt.cornerTopLeft}),T.jsx("div",{style:zt.cornerTopRight}),T.jsx("div",{style:zt.cornerBottomLeft}),T.jsx("div",{style:zt.cornerBottomRight})]})}),r&&T.jsx(Qt,{scanning:t,startScanning:a,stopScanning:s}),o&&n.torch&&T.jsx(Wt,{scanning:t,status:o.status,torchToggle:o.toggle}),i&&n.zoom&&T.jsx(Zt,{scanning:t,capabilities:n.zoom,value:i.value,onZoom:i.onChange})]})})}function Xt(e){if(null===e)throw new Error("Canvas should always be defined when component is mounted.");const t=e.getContext("2d");if(null===t)throw new Error("Canvas 2D context should be non-null");t.clearRect(0,0,e.width,e.height)}function $t(t){const{onScan:n,constraints:r,formats:o=["any"],paused:i=!1,components:a,children:s,styles:c,classNames:l,allowMultiple:u,scanDelay:d,onError:p,sound:f}=t,h=e.useRef(null),g=e.useRef(null),m=e.useRef(null),v=e.useMemo(()=>({...Dt,...r}),[r]),w=e.useMemo(()=>({...Mt,...a}),[a]),[y,C]=e.useState(!1),[A,E]=e.useState(!0),[b,x]=e.useState(v),B=function(){const t=e.useRef(Promise.resolve({type:"stop",data:{}})),n=e.useRef(null),r=e.useRef(null),[o,i]=e.useState({}),[a,s]=e.useState({}),c=e.useCallback(async(e,t)=>{if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(void 0===navigator?.mediaDevices?.getUserMedia)throw new Error("this browser has no Stream API support");const o=await navigator.mediaDevices.getUserMedia({audio:!1,video:t});void 0!==e.srcObject?e.srcObject=o:void 0!==e.mozSrcObject?e.mozSrcObject=o:window.URL.createObjectURL?e.src=window.URL.createObjectURL(o):window.webkitURL?e.src=window.webkitURL.createObjectURL(o):e.src=o.id,await Promise.race([e.play(),new Promise(e=>setTimeout(e,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(e=>setTimeout(e,500));const[a]=o.getVideoTracks();return s(a.getSettings()),i(a?.getCapabilities?.()??{}),n.current=o,r.current=a,{type:"start",data:{videoEl:e,stream:o,constraints:t}}},[]),l=e.useCallback(async(e,t)=>{e.src="",e.srcObject=null,e.load();for(const e of t.getTracks())t.removeTrack(e),e.stop();return n.current=null,r.current=null,s({}),{type:"stop",data:{}}},[]),u=e.useCallback(async(e,{constraints:n,restart:r=!1})=>{let o=null;t.current=t.current.then(t=>{if("start"===t.type){const{data:{videoEl:o,stream:i,constraints:a}}=t;return r||e!==o||n!==a?l(o,i).then(()=>c(e,n)):t}return c(e,n)}).catch(e=>(o=e,{type:"stop",data:{}}));const i=await t.current;if(o)throw o;if("stop"===i.type)throw new Error("Something went wrong with the camera task queue (start task).")},[c,l]),d=e.useCallback(async()=>{if(t.current=t.current.then(e=>{if("stop"===e.type)return e;const{data:{videoEl:t,stream:n}}=e;return l(t,n)}),"start"===(await t.current).type)throw new Error("Something went wrong with the camera task queue (stop task).")},[l]),p=e.useCallback(async e=>{const t=r.current;if(!t)throw new Error("No active video track found.");{e.advanced?.[0].zoom&&t.getCapabilities().torch&&await t.applyConstraints({advanced:[{torch:!1}]}),await t.applyConstraints(e);const n=t.getCapabilities(),r=t.getSettings();i(n),s(r)}},[]);return e.useEffect(()=>()=>{(async()=>{await d()})()},[d]),{capabilities:o,settings:a,startCamera:u,stopCamera:d,updateConstraints:p}}(),R=e.useRef(B),M=e.useRef(p),D=e.useRef(w.tracker);e.useEffect(()=>{R.current=B},[B]),e.useEffect(()=>{M.current=p},[p]),e.useEffect(()=>{D.current=w.tracker},[w.tracker]);const k=e.useCallback(e=>{!function(e,t,n,r){const o=n;if(null==o)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const i=t;if(null==i)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(0===e.length||void 0===r)Xt(o);else{const t=i.offsetWidth,n=i.offsetHeight,a=i.videoWidth,s=i.videoHeight,c=Math.max(t/a,n/s),l=a*c,u=s*c,d=l/a,p=u/s,f=(t-l)/2,h=(n-u)/2,g=({x:e,y:t})=>({x:Math.floor(e*d),y:Math.floor(t*p)}),m=({x:e,y:t})=>({x:Math.floor(e+f),y:Math.floor(t+h)}),v=e.map(e=>{const{boundingBox:t,cornerPoints:n}=e,{x:r,y:o}=m(g({x:t.x,y:t.y})),{x:i,y:a}=g({x:t.width,y:t.height});return{...e,cornerPoints:n.map(e=>m(g(e))),boundingBox:DOMRectReadOnly.fromRect({x:r,y:o,width:i,height:a})}});o.width=i.offsetWidth,o.height=i.offsetHeight;const w=o.getContext("2d");if(null===w)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");r(v,w)}}(e,h.current,m.current,D.current)},[]),{startScanning:I,stopScanning:S}=function(t){const{videoElementRef:n,onScan:r,onFound:o,retryDelay:i=100,scanDelay:a=0,formats:s=[],allowMultiple:c=!1,sound:l=!0}=t,u=e.useRef(new Te({formats:s})),d=e.useRef(null),p=e.useRef(null);e.useEffect(()=>{u.current=new Te({formats:s})},[s]),e.useEffect(()=>{"undefined"!=typeof window&&l&&(d.current=new Audio("string"==typeof l?l:"data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQx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qqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"))},[l]);const f=e.useCallback(e=>async t=>{if(null!==n.current&&n.current.readyState>1){const{lastScan:s,contentBefore:h,lastScanHadContent:g}=e;if(t-s<i)p.current=window.requestAnimationFrame(f(e));else{const i=await u.current.detect(n.current),s=i.some(e=>!h.includes(e.rawValue)),m=i.length>0;let v=e.lastOnScan;(s||c&&m&&t-v>=a)&&(l&&d.current&&d.current.paused&&d.current.play().catch(e=>console.error("Error playing the sound",e)),v=t,r(i)),m&&o(i),!m&&g&&o(i);const w={lastScan:t,lastOnScan:v,lastScanHadContent:m,contentBefore:s?i.map(e=>e.rawValue):h};p.current=window.requestAnimationFrame(f(w))}}},[r,o,i,c,a,l]);return{startScanning:e.useCallback(()=>{const e=performance.now(),t={lastScan:e,lastOnScan:e,contentBefore:[],lastScanHadContent:!1};p.current=window.requestAnimationFrame(f(t))},[f]),stopScanning:e.useCallback(()=>{null!==p.current&&(window.cancelAnimationFrame(p.current),p.current=null)},[])}}({videoElementRef:h,onScan:n,onFound:k,formats:o,retryDelay:void 0===w.tracker?500:10,scanDelay:d,allowMultiple:u,sound:f});e.useEffect(()=>(C(!0),()=>{C(!1)}),[]),e.useEffect(()=>{if(!Gt(v,b)){const e=v;r?.deviceId&&delete e.facingMode,x(e)}},[r,v,b]);const F=e.useMemo(()=>({constraints:b,shouldStream:y&&!i}),[b,y,i]),P=e.useCallback(async()=>{const e=h.current;if(null==e)throw new Error("Video should be defined when component is mounted.");const t=g.current;if(null==t)throw new Error("Canvas should be defined when component is mounted.");const n=t.getContext("2d");if(null==n)throw new Error("Canvas should be defined when component is mounted.");if(F.shouldStream){await R.current.stopCamera(),E(!1);try{await R.current.startCamera(e,F),e?E(!0):await R.current.stopCamera()}catch(e){M.current?.(e),console.error("error",e)}}else t.width=e.videoWidth,t.height=e.videoHeight,n.drawImage(e,0,0,e.videoWidth,e.videoHeight),await R.current.stopCamera(),E(!1)},[F]);e.useEffect(()=>{(async()=>{await P()})()},[P]);const j=e.useMemo(()=>F.shouldStream&&A,[F.shouldStream,A]);return e.useEffect(()=>{if(j){if(void 0===g.current)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(Xt(g.current),void 0===m.current)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");Xt(m.current);if(null==h.current)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");I()}return()=>{S()}},[j,I,S]),T.jsxs("div",{style:{...kt,...c?.container},className:l?.container,children:[T.jsx("video",{ref:h,style:{...It,...c?.video,visibility:i?"hidden":"visible"},className:l?.video,autoPlay:!0,muted:!0,playsInline:!0}),T.jsx("canvas",{ref:g,style:{display:i?"block":"none",position:"absolute",width:"100%",height:"100%"}}),T.jsx("canvas",{ref:m,style:{position:"absolute",width:"100%",height:"100%"}}),T.jsxs("div",{style:{position:"absolute",width:"100%",height:"100%"},children:[w.finder&&T.jsx(Ht,{scanning:A,capabilities:B.capabilities,onOff:w.onOff,zoom:w.zoom&&B.settings.zoom?{value:B.settings.zoom,onChange:async e=>{const t={...b,advanced:[{zoom:e}]};await B.updateConstraints(t)}}:void 0,torch:w.torch?{status:B.settings.torch??!1,toggle:async e=>{const t={...b,advanced:[{torch:e}]};await B.updateConstraints(t)}}:void 0,startScanning:async()=>await P(),stopScanning:async()=>{await B.stopCamera(),Xt(m.current),E(!1)}}),s]})]})}var en,tn=function(t){var n=e.useMemo(function(){return 1300+document.querySelectorAll(".dialog-mask").length},[]);return T.jsxs("div",l({},t,{className:"dialog-mask ".concat(t.className),style:l(l({},t.style),{zIndex:n}),children:[T.jsx("style",{children:"body { overflow: hidden; }"}),t.children]}))},nn=function(e){return T.jsx("div",l({},e,{className:"dialog-body ".concat(e.className)}))},rn=function(n){e.useEffect(function(){return window.addEventListener("keyup",r),function(){window.removeEventListener("keyup",r)}},[]);var r=e.useCallback(function(e){var t;["Esc","Escape"].includes(e.key)&&(null===(t=n.onClose)||void 0===t||t.call(n))},[]);return n.open?t.createPortal(T.jsx(T.Fragment,{children:T.jsx(tn,{children:T.jsxs(nn,{style:{position:"relative",fontFamily:"sans-serif",width:"100%",maxWidth:"500px"},children:[n.title&&T.jsx("div",{className:"dialog-header",children:T.jsx("h4",{style:{fontWeight:"600",fontSize:"1.25rem"},children:n.title})}),T.jsx("button",{type:"button",style:{position:"absolute",top:"0.5rem",right:"0.5rem",zIndex:20,fontSize:"1.375rem",fontWeight:"700",background:"transparent",border:"none",padding:"5px 10px"},onClick:n.onClose,children:"×"}),T.jsx("div",{})]})})}),document.body):T.jsx(T.Fragment,{})},on=function(e){var t,n,r,o;return T.jsx(rn,{open:e.open,title:(null==e?void 0:e.title)||"confirmation de l'évènement",onClose:e.onClose,children:T.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[T.jsx("p",{children:(null==e?void 0:e.message)||"Voulez-vous vraiment confirmer le scan ?"}),T.jsx("div",{style:{marginTop:"1.25rem",display:"flex",flexDirection:"column"},children:T.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"1rem"},children:[T.jsx("button",{type:"button",className:"btn",style:l({backgroundColor:"#e5e7eb",color:"black"},null===(t=null==e?void 0:e.btnCancel)||void 0===t?void 0:t.style),onClick:e.onClose,children:(null===(n=null==e?void 0:e.btnCancel)||void 0===n?void 0:n.label)||"annuler"}),T.jsx("button",{type:"button",className:"btn",style:l({backgroundColor:"#22c55e",color:"white"},null===(r=null==e?void 0:e.btnOk)||void 0===r?void 0:r.style),onClick:e.onConfirm,children:(null===(o=null==e?void 0:e.btnOk)||void 0===o?void 0:o.label)||"confirmer"})]})})]})})},an={exports:{}};var sn,cn=en?an.exports:(en=1,sn=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom"),r=require("react-leaflet"),o=require("leaflet"),i=require("leaflet-draw/dist/images/marker-icon-2x.png"),a=require("leaflet-draw/dist/images/marker-shadow.png"),s=require("leaflet.fullscreen");require("leaflet.fullscreen/Control.FullScreen.css");var c=require("react-leaflet-draw");function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}function u(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}require("leaflet/dist/leaflet.css"),require("leaflet-draw/dist/leaflet.draw.css");var d=l(t),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function p(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function f(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function g(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function m(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function w(e){return d.forwardRef(function(t,n){return e(t,n)})}"function"==typeof SuppressedError&&SuppressedError;var v=w(function(e,r){var o=e.children,i=e.container,a=void 0===i?document.body:i,s=t.useRef();return t.useEffect(function(){var e=function(e){return"function"==typeof e?e():e}(a);return s.current&&e&&e.appendChild(s.current),function(){s.current&&s.current.remove()}},[s.current]),s.current||(s.current=document.createElement("div")),n.createPortal(o,s.current)});function C(e,t){e&&("function"==typeof e?e(t):"current"in e&&(e.current=t))}function y(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],r=function(t){var r=e[t];if(!r)return"continue";var o=typeof r;if("string"===o||"number"===o)n.push(r);else if(Array.isArray(r)){if(r.length){var i=y.apply(void 0,r);i&&n.push(i)}}else"object"===o?r.toString===Object.prototype.toString&&Object.keys(r).forEach(function(e){r[e]&&n.push(e)}):n.push(r.toString())},o=0;o<e.length;o+=1)r(o);return n.join(" ")}function A(e){var t=window,n=document.body,r=void 0!==t.pageXOffset?t.pageXOffset:(document.documentElement||n.parentNode||n).scrollLeft,o=void 0!==t.pageYOffset?t.pageYOffset:(document.documentElement||n.parentNode||n).scrollTop,i=e.getBoundingClientRect();return{bottom:i.bottom+o,height:i.height,left:i.left+r,right:i.right+r,top:i.top+o,width:i.width}}var T={Center:"center",BottomCenter:"bottom-center",BottomRight:"bottom-right",BottomLeft:"bottom-left",TopCenter:"top-center",TopRight:"top-right",TopLeft:"top-left",LeftTop:"left-top",LeftBottom:"left-bottom",LeftCenter:"left-center",RightTop:"right-top",RightBottom:"right-bottom",RightCenter:"right-center"},E=w(function(n,r){var o=n.anchorEl,i=n.anchorPosition,a=n.placement,s=void 0===a?T.BottomLeft:a,c=n.open,l=void 0!==c&&c,u=n.overflow,d=void 0!==u&&u,f=n.role,g=n.children,m=n.className,w=p(n,["anchorEl","anchorPosition","placement","open","overflow","role","children","className"]),E=t.useRef(null),x=t.useRef(null),B=t.useState({left:window.scrollX,top:window.scrollY,height:window.innerHeight,width:window.innerWidth}),b=B[0],R=B[1],M=t.useState({position:"absolute",margin:"0",inset:"0px auto auto 0px",transform:"translate3d(0px, 0px, 0px)",opacity:0}),I=M[0],D=M[1];return t.useEffect(function(){if(r&&E)return C(r,E.current),function(){C(r,null)}},[r,E.current]),t.useEffect(function(){var e=function(){R({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})},t=function(){R({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})};return l&&(window.addEventListener("resize",e),window.addEventListener("scroll",t),R({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[l]),t.useEffect(function(){var e,t=function(e){var t;if(!e)return document.body;if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:document.body}var r=e;return r&&r.current?null!==(t=r.current)&&void 0!==t?t:document.body:e}(o);if(l&&E.current&&t){var n=function(){var e=function(e,t,n,r){var o=0,i=0,a=n?{bottom:n.top,height:0,left:n.left,right:n.left,top:n.top,width:0}:A(t),s=A(r);switch(e){case T.Center:o=a.left+a.width/2-s.width/2,i=a.top+a.height/2-s.height/2;break;case T.BottomLeft:o=a.left,i=a.bottom;break;case T.BottomRight:o=a.left-s.width+a.width,i=a.bottom;break;case T.BottomCenter:o=a.left+a.width/2-s.width/2,i=a.bottom;break;case T.TopLeft:o=a.left,i=a.top-s.height;break;case T.TopRight:o=a.left-s.width+a.width,i=a.top-s.height;break;case T.TopCenter:o=a.left+a.width/2-s.width/2,i=a.top-s.height;break;case T.LeftTop:o=a.left-s.width,i=a.top;break;case T.LeftBottom:o=a.left-s.width,i=a.bottom-s.height;break;case T.LeftCenter:o=a.left-s.width,i=a.top+a.height/2-s.height/2;break;case T.RightTop:o=a.right,i=a.top;break;case T.RightBottom:o=a.right,i=a.bottom-s.height;break;case T.RightCenter:o=a.right,i=a.top+a.height/2-s.height/2}return{left:o,top:i}}(s,t,i,E.current),n=e.left,r=e.top,o=0,a=0;if(!1===d){var c=function(e,t,n,r){if(!e)return null;if(!t)return null;var o=t.getBoundingClientRect(),i={left:n,top:r,height:0,width:0};return n<e.left&&(i.left=e.left),r<e.top&&(i.top=e.top),n+o.width>=e.left+e.width&&(i.left=e.left+e.width-o.width),r+o.height>=e.top+e.height&&(i.top=e.top+e.height-o.height),i}(b,E.current,n,r);null!==c&&(n=c.left,r=c.top,o=c.height,a=c.width)}D({position:"absolute",margin:"0",inset:"0px auto auto 0px",transform:"translate3d(".concat(n,"px, ").concat(r,"px, 0px)"),opacity:1,maxHeight:o>0?"".concat(o.toFixed(),"px"):void 0,maxWidth:a>0?"".concat(a.toFixed(),"px"):void 0})};(e=new MutationObserver(function(){n()})).observe(E.current,{attributes:!1,childList:!0,subtree:!0}),n()}return function(){e&&e.disconnect()}},[E,l,s,i,d,b,o]),!0!==l?null:e.jsx(v,{ref:x,children:e.jsx("div",h({ref:E,style:I,role:f,className:y("ui-popper",m)},w,{children:g}))})}),x=function(n){var r=n.variant,o=n.color,i=n.children,a=n.disable,s=n.className,c=n.onClick,l=t.useCallback(function(e){c&&!0!==a&&c(e)},[c,a]);return e.jsx("button",{type:"button",className:y("ui-btn",!0===a?"ui-btn-disable":null,null!=r?"ui-btn-".concat(r):"ui-btn-text",null!=o?"ui-btn-color-".concat(o):"ui-btn-color-primary",s),onClick:l,children:i})},B=e=>{throw TypeError(e)},b=(e,t,n)=>t.has(e)||B("Cannot "+n),R=(e,t,n)=>(b(e,t,"read from private field"),n?n.call(e):t.get(e));const M=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],I=M.map(([e])=>e),D=I.filter((e,t)=>"L"===M[t][1]),k=I.filter((e,t)=>"M"===M[t][1]);function F(e){switch(e){case"Linear-Codes":return D.reduce((e,t)=>e|F(t),0);case"Matrix-Codes":return k.reduce((e,t)=>e|F(t),0);case"Any":return(1<<M.length)-1;case"None":return 0;default:return 1<<I.indexOf(e)}}function S(e){if(0===e)return"None";const t=31-Math.clz32(e);return I[t]}function P(e){return e.reduce((e,t)=>e|F(t),0)}const q=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function j(e){return q.indexOf(e)}const N=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function G(e){return"UnicodeBig"===e?N.indexOf("UTF16BE"):N.indexOf(e)}const V=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Y(e){return V[e]}const O=["Ignore","Read","Require"];function Q(e){return O.indexOf(e)}const U=["Plain","ECI","HRI","Hex","Escaped"];function K(e){return U.indexOf(e)}const W={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function J(e){return{...e,formats:P(e.formats),binarizer:j(e.binarizer),eanAddOnSymbol:Q(e.eanAddOnSymbol),textMode:K(e.textMode),characterSet:G(e.characterSet)}}function Z(e){return{...e,format:S(e.format),contentType:Y(e.contentType),eccLevel:e.ecLevel}}const H={locateFile:(e,t)=>{const n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.2.4/dist/${n[1]}/${e}`:t+e}},_=new WeakMap;function z(e,t){return Object.is(e,t)||Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>Object.hasOwn(t,n)&&e[n]===t[n])}function X(e,{overrides:t,equalityFn:n=z,fireImmediately:r=!1}={}){var o;const[i,a]=null!=(o=_.get(e))?o:[H],s=null!=t?t:i;let c;if(r){if(a&&(c=n(i,s)))return a;const t=e({...s});return _.set(e,[s,t]),t}(null!=c?c:n(i,s))||_.set(e,[s])}async function $(e={}){var t,n,r=e,o=!!globalThis.window,i=typeof Bun<"u",a=!!globalThis.WorkerGlobalScope;null!==(t=globalThis.process)&&void 0!==t&&null!==(t=t.versions)&&void 0!==t&&t.node&&(null===(n=globalThis.process)||void 0===n||n.type);var s,c,l="./this.program",u="";if(o||a||i){try{u=new URL(".",void 0).href}catch{}a&&(c=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),s=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)}}var d,h,p,f,g,m,w,v,C,y,A,T,E=console.log.bind(console),x=console.error.bind(console),B=!1,b=!1;function R(){var e=bt.buffer;f=new Int8Array(e),m=new Int16Array(e),r.HEAPU8=g=new Uint8Array(e),w=new Uint16Array(e),v=new Int32Array(e),C=new Uint32Array(e),y=new Float32Array(e),A=new Float64Array(e)}function M(e){var t,n;null===(t=r.onAbort)||void 0===t||t.call(r,e),x(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var o=new WebAssembly.RuntimeError(e);throw null===(n=p)||void 0===n||n(o),o}function I(){return e="zxing_reader.wasm",r.locateFile?r.locateFile(e,u):u+e;var e}async function D(e){if(!d)try{var t=await s(e);return new Uint8Array(t)}catch{}return function(e){if(e==T&&d)return new Uint8Array(d);if(c)return c(e);throw"both async and sync fetching of the wasm failed"}(e)}async function k(e,t,n){if(!e&&WebAssembly.instantiateStreaming)try{var r=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,n)}catch(e){x(`wasm streaming compile failed: ${e}`),x("falling back to ArrayBuffer instantiation")}return async function(e,t){try{var n=await D(e);return await WebAssembly.instantiate(n,t)}catch(e){x(`failed to asynchronously prepare wasm: ${e}`),M(e)}}(t,n)}var F=e=>{for(;e.length>0;)e.shift()(r)},S=[],P=e=>S.push(e),q=[],j=e=>q.push(e),N=e=>Ct(e),G=()=>yt(),L=[],V=0,Y=0;class O{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){C[this.ptr+4>>2]=e}get_type(){return C[this.ptr+4>>2]}set_destructor(e){C[this.ptr+8>>2]=e}get_destructor(){return C[this.ptr+8>>2]}set_caught(e){e=e?1:0,f[this.ptr+12]=e}get_caught(){return 0!=f[this.ptr+12]}set_rethrown(e){e=e?1:0,f[this.ptr+13]=e}get_rethrown(){return 0!=f[this.ptr+13]}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){C[this.ptr+16>>2]=e}get_adjusted_ptr(){return C[this.ptr+16>>2]}}var Q=e=>vt(e),U=e=>{var t=Y;if(!t)return Q(0),0;var n=new O(t);n.set_adjusted_ptr(t);var r=n.get_type();if(!r)return Q(0),t;for(var o of e){if(0===o||o===r)break;var i=n.ptr+16;if(Et(o,r,i))return Q(o),t}return Q(r),t},K={},W=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function J(e){return this.fromWireType(C[e>>2])}var Z={},H={},_={},z=class extends Error{constructor(e){super(e),this.name="InternalError"}},X=e=>{throw new z(e)},$=(e,t,n)=>{function r(t){var r=n(t);r.length!==e.length&&X("Mismatched type converter count");for(var o=0;o<e.length;++o)re(e[o],r[o])}e.forEach(e=>_[e]=t);var o=new Array(t.length),i=[],a=0;{const e=t;for(let t=0;t<e.length;++t){const n=e[t];H.hasOwnProperty(n)?o[t]=H[n]:(i.push(n),Z.hasOwnProperty(n)||(Z[n]=[]),Z[n].push(()=>{o[t]=H[n],++a===i.length&&r(o)}))}}0===i.length&&r(o)},ee=e=>{for(var t="";;){var n=g[e++];if(!n)return t;t+=String.fromCharCode(n)}},te=class extends Error{constructor(e){super(e),this.name="BindingError"}},ne=e=>{throw new te(e)};function re(e,t){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var r=t.name;if(e||ne(`type "${r}" must have a positive integer typeid pointer`),H.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;ne(`Cannot register type '${r}' twice`)}if(H[e]=t,delete _[e],Z.hasOwnProperty(e)){var o=Z[e];delete Z[e],o.forEach(e=>e())}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}var oe=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),ie=e=>{ne(function(e){return e.$$.ptrType.registeredClass.name}(e)+" instance already deleted")},ae=!1,se=e=>{},ce=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},le=e=>globalThis.FinalizationRegistry?(ae=new FinalizationRegistry(e=>{ce(e.$$)}),le=e=>{var t=e.$$;if(!!t.smartPtr){var n={$$:t};ae.register(e,n,e)}return e},se=e=>ae.unregister(e),le(e)):(le=e=>e,e);function ue(){}var de=(e,t)=>Object.defineProperty(t,"name",{value:e}),he={},pe=(e,t,n)=>{if(void 0===e[t].overloadTable){var r=e[t];e[t]=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e[t].overloadTable.hasOwnProperty(o.length)||ne(`Function '${n}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[o.length].apply(this,o)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},fe=(e,t,n)=>{r.hasOwnProperty(e)?((void 0===n||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[n])&&ne(`Cannot register public name '${e}' twice`),pe(r,e,e),r[e].overloadTable.hasOwnProperty(n)&&ne(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),r[e].overloadTable[n]=t):(r[e]=t,r[e].argCount=n)};function ge(e,t,n,r,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var me=(e,t,n)=>{for(;t!==n;)t.upcast||ne(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},we=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e};function ve(e,t){if(null===t)return this.isReference&&ne(`null is not a valid ${this.name}`),0;t.$$||ne(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||ne(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return me(t.$$.ptr,n,this.registeredClass)}function Ce(e,t){var n;if(null===t)return this.isReference&&ne(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&ne(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||ne(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&ne(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=me(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ne("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:ne(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,Oe.toHandle(()=>o.delete())),null!==e&&e.push(this.rawDestructor,n)}break;default:ne("Unsupporting sharing policy")}return n}function ye(e,t){if(null===t)return this.isReference&&ne(`null is not a valid ${this.name}`),0;t.$$||ne(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||ne(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&ne(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return me(t.$$.ptr,n,this.registeredClass)}var Ae=(e,t,n)=>{if(t===n)return e;if(void 0===n.baseClass)return null;var r=Ae(e,t,n.baseClass);return null===r?null:n.downcast(r)},Te={},Ee=(e,t)=>(t=((e,t)=>{for(void 0===t&&ne("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Te[t]),xe=(e,t)=>((!t.ptrType||!t.ptr)&&X("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&X("Both smartPtrType and smartPtr must be specified"),t.count={value:1},le(Object.create(e,{$$:{value:t,writable:!0}})));function Be(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=Ee(this.registeredClass,t);if(void 0!==n){if(0===n.$$.count.value)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?xe(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):xe(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=he[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=Ae(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?xe(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):xe(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function be(e,t,n,r,o,i,a,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,o||void 0!==t.baseClass?this.toWireType=Ce:r?(this.toWireType=ve,this.destructorFunction=null):(this.toWireType=ye,this.destructorFunction=null)}var Re=(e,t,n)=>{r.hasOwnProperty(e)||X("Replacing nonexistent public symbol"),void 0!==r[e].overloadTable&&void 0!==n?r[e].overloadTable[n]=t:(r[e]=t,r[e].argCount=n)},Me={},Ie=[],De=e=>{var t=Ie[e];return t||(Ie[e]=t=Rt.get(e)),t},ke=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e.includes("j")?((e,t,n)=>(e=e.replace(/p/g,"i"),(0,Me[e])(t,...n)))(e,t,n):De(t)(...n)},Fe=function(e,t){var n=(e=ee(e)).includes("j")?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return ke(e,t,o,n)}}(e,t):De(t);return"function"!=typeof n&&ne(`unknown function pointer with signature ${e}: ${t}`),n};class Se extends Error{}var Pe=e=>{var t=pt(e),n=ee(t);return ft(t),n},qe=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){if(!r[t]&&!H[t]){if(_[t])return void _[t].forEach(e);n.push(t),r[t]=!0}}),new Se(`${e}: `+n.map(Pe).join([", "]))},je=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(C[t+4*r>>2]);return n};function Ne(e,t,n,r,o,i){var a=t.length;a<2&&ne("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=null!==t[1]&&null!==n,c=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].destructorFunction)return!0;return!1}(t),l=!t[0].isVoid,u=a-2,d=new Array(u),h=[],p=[];return de(e,function(){var e;p.length=0,h.length=s?2:1,h[0]=o,s&&(e=t[1].toWireType(p,this),h[1]=e);for(var n=0;n<u;++n)d[n]=t[n+2].toWireType(p,n<0||arguments.length<=n?void 0:arguments[n]),h.push(d[n]);return function(n){if(c)W(p);else for(var r=s?1:2;r<t.length;r++){var o=1===r?e:d[r-2];null!==t[r].destructorFunction&&t[r].destructorFunction(o)}if(l)return t[0].fromWireType(n)}(r(...h))})}var Ge=e=>{const t=(e=e.trim()).indexOf("(");return-1===t?e:e.slice(0,t)},Le=[],Ve=[0,1,,1,null,1,!0,1,!1,1],Ye=e=>{e>9&&0===--Ve[e+1]&&(Ve[e]=void 0,Le.push(e))},Oe={toValue:e=>(e||ne(`Cannot use deleted val. handle = ${e}`),Ve[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=Le.pop()||Ve.length;return Ve[t]=e,Ve[t+1]=1,t}}}},Qe={name:"emscripten::val",fromWireType:e=>{var t=Oe.toValue(e);return Ye(e),t},toWireType:(e,t)=>Oe.toHandle(t),readValueFromPointer:J,destructorFunction:null},Ue=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(y[e>>2])};case 8:return function(e){return this.fromWireType(A[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Ke=(e,t,n)=>{switch(t){case 1:return n?e=>f[e]:e=>g[e];case 2:return n?e=>m[e>>1]:e=>w[e>>1];case 4:return n?e=>v[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},We=Object.assign({optional:!0},Qe),Je=(e,t,n)=>((e,t,n,r)=>{if(!(r>0))return 0;for(var o=n,i=n+r-1,a=0;a<e.length;++a){var s=e.codePointAt(a);if(s<=127){if(n>=i)break;t[n++]=s}else if(s<=2047){if(n+1>=i)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=i)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=i)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s,a++}}return t[n]=0,n-o})(e,g,t,n),Ze=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},He=globalThis.TextDecoder&&new TextDecoder,_e=(e,t,n,r)=>{var o=t+n;if(r)return o;for(;e[t]&&!(t>=o);)++t;return t},ze=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;var n=_e(e,t,arguments.length>2?arguments[2]:void 0,arguments.length>3?arguments[3]:void 0);if(n-t>16&&e.buffer&&He)return He.decode(e.subarray(t,n));for(var r="";t<n;){var o=e[t++];if(128&o){var i=63&e[t++];if(192!=(224&o)){var a=63&e[t++];if((o=224==(240&o)?(15&o)<<12|i<<6|a:(7&o)<<18|i<<12|a<<6|63&e[t++])<65536)r+=String.fromCharCode(o);else{var s=o-65536;r+=String.fromCharCode(55296|s>>10,56320|1023&s)}}else r+=String.fromCharCode((31&o)<<6|i)}else r+=String.fromCharCode(o)}return r},Xe=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,$e=(e,t,n)=>{var r=e>>1,o=_e(w,r,t/2,n);if(o-r>16&&Xe)return Xe.decode(w.subarray(r,o));for(var i="",a=r;a<o;++a){var s=w[a];i+=String.fromCharCode(s)}return i},et=(e,t,n)=>{if(null!=n||(n=2147483647),n<2)return 0;for(var r=t,o=(n-=2)<2*e.length?n/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);m[t>>1]=a,t+=2}return m[t>>1]=0,t-r},tt=e=>2*e.length,nt=(e,t,n)=>{for(var r="",o=e>>2,i=0;!(i>=t/4);i++){var a=C[o+i];if(!a&&!n)break;r+=String.fromCodePoint(a)}return r},rt=(e,t,n)=>{if(null!=n||(n=2147483647),n<4)return 0;for(var r=t,o=r+n-4,i=0;i<e.length;++i){var a=e.codePointAt(i);if(a>65535&&i++,v[t>>2]=a,(t+=4)+4>o)break}return v[t>>2]=0,t-r},ot=e=>{for(var t=0,n=0;n<e.length;++n){e.codePointAt(n)>65535&&n++,t+=4}return t},it=[],at=(e,t)=>{var n=H[e];return void 0===n&&ne(`${t} has unknown type ${Pe(e)}`),n},st={},ct=e=>{var t=st[e];return void 0===t?ee(e):t},lt=(e,t)=>Math.ceil(e/t)*t,ut=e=>{var t=(e-bt.buffer.byteLength+65535)/65536|0;try{return bt.grow(t),R(),1}catch{}},dt={},ht=()=>{if(!ht.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.language||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var t in dt)void 0===dt[t]?delete e[t]:e[t]=dt[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);ht.strings=n}return ht.strings};var pt,ft,gt,mt,wt,vt,Ct,yt,At,Tt,Et,xt,Bt,bt,Rt,Mt=[null,[],[]],It=(e,t)=>{var n=Mt[e];0===t||10===t?((1===e?E:x)(ze(n)),n.length=0):n.push(t)};if((()=>{let e=ue.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof ue&&e instanceof ue))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o},clone(){if(this.$$.ptr||ie(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=le(Object.create(Object.getPrototypeOf(this),{$$:{value:oe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ne("Object already scheduled for deletion"),se(this),ce(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||ie(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ne("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const t=Symbol.dispose;t&&(e[t]=e.delete)})(),Object.assign(be.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;null===(t=this.rawDestructor)||void 0===t||t.call(this,e)},readValueFromPointer:J,fromWireType:Be}),r.noExitRuntime&&r.noExitRuntime,r.print&&(E=r.print),r.printErr&&(x=r.printErr),r.wasmBinary&&(d=r.wasmBinary),r.arguments&&r.arguments,r.thisProgram&&(l=r.thisProgram),r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.shift()();var Dt,kt={s:e=>{var t=new O(e);return t.get_caught()||(t.set_caught(!0),V--),t.set_rethrown(!1),L.push(t),Tt(e),mt(e)},w:()=>{wt(0,0);var e=L.pop();At(e.excPtr),Y=0},a:()=>U([]),j:e=>U([e]),m:(e,t)=>U([e,t]),Q:()=>{var e=L.pop();e||M("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(L.push(e),e.set_rethrown(!0),e.set_caught(!1),V++),Y=t},p:(e,t,n)=>{throw new O(e).init(t,n),V++,Y=e},U:()=>V,d:e=>{throw Y||(Y=e),Y},ca:()=>M(""),ta:e=>{var t=K[e];delete K[e];var n=t.rawConstructor,r=t.rawDestructor,o=t.fields,i=o.map(e=>e.getterReturnType).concat(o.map(e=>e.setterArgumentType));$([e],i,e=>{var i={};{const t=o;for(let n=0;n<t.length;++n){const r=t[n],a=e[n],s=r.getter,c=r.getterContext,l=e[n+o.length],u=r.setter,d=r.setterContext;i[r.fieldName]={read:e=>a.fromWireType(s(c,e)),write:(e,t)=>{var n=[];u(d,e,l.toWireType(n,t)),W(n)},optional:a.optional}}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in i)t[n]=i[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var o in i)if(!(o in t)&&!i[o].optional)throw new TypeError(`Missing field: "${o}"`);var a=n();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(r,a),a},readValueFromPointer:J,destructorFunction:r}]})},ba:(e,t,n,r,o)=>{},oa:(e,t,n,r)=>{re(e,{name:t=ee(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},ra:(e,t,n,r,o,i,a,s,c,l,u,d,h)=>{u=ee(u),i=Fe(o,i),s&&(s=Fe(a,s)),l&&(l=Fe(c,l)),h=Fe(d,h);var p=(e=>{var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e})(u);fe(p,function(){qe(`Cannot construct ${u} due to unbound types`,[r])}),$([e,t,n],r?[r]:[],t=>{var n,o;t=t[0],r?o=(n=t.registeredClass).instancePrototype:o=ue.prototype;var a=de(u,function(){if(Object.getPrototypeOf(this)!==c)throw new te(`Use 'new' to construct ${u}`);if(void 0===g.constructor_body)throw new te(`${u} has no accessible constructor`);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=g.constructor_body[t.length];if(void 0===r)throw new te(`Tried to invoke ctor of ${u} with invalid number of parameters (${t.length}) - expected (${Object.keys(g.constructor_body).toString()}) parameters instead!`);return r.apply(this,t)}),c=Object.create(o,{constructor:{value:a}});a.prototype=c;var d,f,g=new ge(u,a,c,h,n,i,s,l);g.baseClass&&(null!==(f=(d=g.baseClass).__derivedClasses)&&void 0!==f||(d.__derivedClasses=[]),g.baseClass.__derivedClasses.push(g));var m=new be(u,g,!0,!1,!1),w=new be(u+"*",g,!1,!1,!1),v=new be(u+" const*",g,!1,!0,!1);return he[e]={pointerType:w,constPointerType:v},Re(p,a),[m,w,v]})},qa:(e,t,n,r,o,i)=>{var a=je(t,n);o=Fe(r,o),$([],[e],e=>{var n=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new te(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{qe(`Cannot construct ${e.name} due to unbound types`,a)},$([],a,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Ne(n,r,null,o,i),[])),[]})},H:(e,t,n,r,o,i,a,s,c,l)=>{var u=je(n,r);t=ee(t),t=Ge(t),i=Fe(o,i),$([],[e],e=>{var r=`${(e=e[0]).name}.${t}`;function o(){qe(`Cannot call ${r} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,l=c[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===n-2?(o.argCount=n-2,o.className=e.name,c[t]=o):(pe(c,t,r),c[t].overloadTable[n-2]=o),$([],u,o=>{var s=Ne(r,o,e,i,a);return void 0===c[t].overloadTable?(s.argCount=n-2,c[t]=s):c[t].overloadTable[n-2]=s,[]}),[]})},ma:e=>re(e,Qe),X:(e,t,n)=>{re(e,{name:t=ee(t),fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Ue(t,n),destructorFunction:null})},Y:(e,t,n,r,o,i,a,s)=>{var c=je(t,n);e=ee(e),e=Ge(e),o=Fe(r,o),fe(e,function(){qe(`Cannot call ${e} due to unbound types`,c)},t-1),$([],c,n=>{var r=[n[0],null].concat(n.slice(1));return Re(e,Ne(e,r,null,o,i),t-1),[]})},x:(e,t,n,r,o)=>{t=ee(t);let i=e=>e;if(0===r){var a=32-8*n;i=e=>e<<a>>>a,o=i(o)}re(e,{name:t,fromWireType:i,toWireType:(e,t)=>t,readValueFromPointer:Ke(t,n,0!==r),destructorFunction:null})},t:(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=C[e>>2],n=C[e+4>>2];return new r(f.buffer,n,t)}re(e,{name:n=ee(n),fromWireType:o,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},sa:(e,t)=>{re(e,We)},na:(e,t)=>{re(e,{name:t=ee(t),fromWireType(e){var t;return t=((e,t,n)=>e?ze(g,e,t,n):"")(e+4,C[e>>2],!0),ft(e),t},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r="string"==typeof t;r||ArrayBuffer.isView(t)&&1==t.BYTES_PER_ELEMENT||ne("Cannot pass non-string to std::string"),n=r?Ze(t):t.length;var o=gt(4+n+1),i=o+4;return C[o>>2]=n,r?Je(t,i,n+1):g.set(t,i),null!==e&&e.push(ft,o),o},readValueFromPointer:J,destructorFunction(e){ft(e)}})},R:(e,t,n)=>{var r,o,i;n=ee(n),2===t?(r=$e,o=et,i=tt):(r=nt,o=rt,i=ot),re(e,{name:n,fromWireType:e=>{var n=C[e>>2],o=r(e+4,n*t,!0);return ft(e),o},toWireType:(e,r)=>{"string"!=typeof r&&ne(`Cannot pass non-string to C++ string type ${n}`);var a=i(r),s=gt(4+a+t);return C[s>>2]=a/t,o(r,s+4,a+t),null!==e&&e.push(ft,s),s},readValueFromPointer:J,destructorFunction(e){ft(e)}})},I:(e,t,n,r,o,i)=>{K[e]={name:ee(t),rawConstructor:Fe(n,r),rawDestructor:Fe(o,i),fields:[]}},ua:(e,t,n,r,o,i,a,s,c,l)=>{K[e].fields.push({fieldName:ee(t),getterReturnType:n,getter:Fe(r,o),getterContext:i,setterArgumentType:a,setter:Fe(s,c),setterContext:l})},pa:(e,t)=>{re(e,{isVoid:!0,name:t=ee(t),fromWireType:()=>{},toWireType:(e,t)=>{}})},N:(e,t,n)=>{var[r,...o]=((e,t)=>{for(var n=new Array(e),r=0;r<e;++r)n[r]=at(C[t+4*r>>2],`parameter ${r}`);return n})(e,t),i=r.toWireType.bind(r),a=o.map(e=>e.readValueFromPointer.bind(e));e--;var s=new Array(e),c=`methodCaller<(${o.map(e=>e.name)}) => ${r.name}>`;return(e=>{var t=it.length;return it.push(e),t})(de(c,(t,r,o,c)=>{for(var l=0,u=0;u<e;++u)s[u]=a[u](c+l),l+=8;var d;switch(n){case 0:d=Oe.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(Oe.toValue(t),s);break;case 3:d=s[0];break;case 1:d=Oe.toValue(t)[ct(r)](...s)}return((e,t,n)=>{var r=[],o=e(r,n);return r.length&&(C[t>>2]=Oe.toHandle(r)),o})(i,o,d)}))},va:Ye,D:e=>e?(e=ct(e),Oe.toHandle(globalThis[e])):Oe.toHandle(globalThis),S:e=>{e>9&&(Ve[e+1]+=1)},M:(e,t,n,r,o)=>it[e](t,n,r,o),ia:e=>{var t=Oe.toValue(e);W(t),Ye(e)},da:(e,t,n,r)=>{var o=(new Date).getFullYear(),i=new Date(o,0,1),a=new Date(o,6,1),s=i.getTimezoneOffset(),c=a.getTimezoneOffset(),l=Math.max(s,c);C[e>>2]=60*l,v[t>>2]=+(s!=c);var u=e=>{var t=e>=0?"-":"+",n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,"0")}${String(n%60).padStart(2,"0")}`},d=u(s),h=u(c);c<s?(Je(d,n,17),Je(h,r,17)):(Je(d,r,17),Je(h,n,17))},ga:e=>{var t=g.length,n=2147483648;if((e>>>=0)>n)return!1;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);o=Math.min(o,e+100663296);var i=Math.min(n,lt(Math.max(e,o),65536));if(ut(i))return!0}return!1},ea:(e,t)=>{var n=0,r=0;for(var o of ht()){var i=t+n;C[e+r>>2]=i,n+=Je(o,i,1/0)+1,r+=4}return 0},fa:(e,t)=>{var n=ht();C[e>>2]=n.length;var r=0;for(var o of n)r+=Ze(o)+1;return C[t>>2]=r,0},ha:e=>52,$:function(e,t,n,r,o){return 70},V:(e,t,n,r)=>{for(var o=0,i=0;i<n;i++){var a=C[t>>2],s=C[t+4>>2];t+=8;for(var c=0;c<s;c++)It(e,g[a+c]);o+=s}return C[r>>2]=o,0},K:function(e,t,n,r){var o=G();try{return De(e)(t,n,r)}catch(e){if(N(o),e!==e+0)throw e;wt(1,0)}},C:function(e,t,n,r,o,i){var a=G();try{return De(e)(t,n,r,o,i)}catch(e){if(N(a),e!==e+0)throw e;wt(1,0)}},Z:function(e,t,n,r,o,i){var a=G();try{return De(e)(t,n,r,o,i)}catch(e){if(N(a),e!==e+0)throw e;wt(1,0)}},T:function(e,t,n,r){var o=G();try{return De(e)(t,n,r)}catch(e){if(N(o),e!==e+0)throw e;wt(1,0)}},r:function(e){var t=G();try{return De(e)()}catch(e){if(N(t),e!==e+0)throw e;wt(1,0)}},b:function(e,t){var n=G();try{return De(e)(t)}catch(e){if(N(n),e!==e+0)throw e;wt(1,0)}},E:function(e,t,n,r){var o=G();try{return De(e)(t,n,r)}catch(e){if(N(o),e!==e+0)throw e;wt(1,0)}},ka:function(e,t,n){var r=G();try{return De(e)(t,n)}catch(e){if(N(r),e!==e+0)throw e;wt(1,0)}},c:function(e,t,n){var r=G();try{return De(e)(t,n)}catch(e){if(N(r),e!==e+0)throw e;wt(1,0)}},ja:function(e,t,n,r,o){var i=G();try{return De(e)(t,n,r,o)}catch(e){if(N(i),e!==e+0)throw e;wt(1,0)}},h:function(e,t,n,r){var o=G();try{return De(e)(t,n,r)}catch(e){if(N(o),e!==e+0)throw e;wt(1,0)}},i:function(e,t,n,r,o){var i=G();try{return De(e)(t,n,r,o)}catch(e){if(N(i),e!==e+0)throw e;wt(1,0)}},q:function(e,t,n,r,o,i){var a=G();try{return De(e)(t,n,r,o,i)}catch(e){if(N(a),e!==e+0)throw e;wt(1,0)}},P:function(e,t,n,r,o,i,a){var s=G();try{return De(e)(t,n,r,o,i,a)}catch(e){if(N(s),e!==e+0)throw e;wt(1,0)}},v:function(e,t,n,r,o,i,a){var s=G();try{return De(e)(t,n,r,o,i,a)}catch(e){if(N(s),e!==e+0)throw e;wt(1,0)}},F:function(e,t,n,r,o,i,a,s){var c=G();try{return De(e)(t,n,r,o,i,a,s)}catch(e){if(N(c),e!==e+0)throw e;wt(1,0)}},L:function(e,t,n,r,o,i,a,s,c){var l=G();try{return De(e)(t,n,r,o,i,a,s,c)}catch(e){if(N(l),e!==e+0)throw e;wt(1,0)}},z:function(e,t,n,r,o,i,a,s,c,l){var u=G();try{return De(e)(t,n,r,o,i,a,s,c,l)}catch(e){if(N(u),e!==e+0)throw e;wt(1,0)}},J:function(e,t,n,r,o,i,a,s,c,l,u,d){var h=G();try{return De(e)(t,n,r,o,i,a,s,c,l,u,d)}catch(e){if(N(h),e!==e+0)throw e;wt(1,0)}},aa:function(e,t,n,r,o,i,a){var s=G();try{return xt(e,t,n,r,o,i,a)}catch(e){if(N(s),e!==e+0)throw e;wt(1,0)}},_:function(e,t,n,r,o){var i=G();try{return Bt(e,t,n,r,o)}catch(e){if(N(i),e!==e+0)throw e;wt(1,0)}},f:function(e){var t=G();try{De(e)()}catch(e){if(N(t),e!==e+0)throw e;wt(1,0)}},l:function(e,t){var n=G();try{De(e)(t)}catch(e){if(N(n),e!==e+0)throw e;wt(1,0)}},e:function(e,t,n){var r=G();try{De(e)(t,n)}catch(e){if(N(r),e!==e+0)throw e;wt(1,0)}},g:function(e,t,n,r){var o=G();try{De(e)(t,n,r)}catch(e){if(N(o),e!==e+0)throw e;wt(1,0)}},O:function(e,t,n,r,o,i,a){var s=G();try{De(e)(t,n,r,o,i,a)}catch(e){if(N(s),e!==e+0)throw e;wt(1,0)}},k:function(e,t,n,r,o){var i=G();try{De(e)(t,n,r,o)}catch(e){if(N(i),e!==e+0)throw e;wt(1,0)}},la:function(e,t,n,r,o,i,a,s){var c=G();try{De(e)(t,n,r,o,i,a,s)}catch(e){if(N(c),e!==e+0)throw e;wt(1,0)}},o:function(e,t,n,r,o,i){var a=G();try{De(e)(t,n,r,o,i)}catch(e){if(N(a),e!==e+0)throw e;wt(1,0)}},B:function(e,t,n,r,o,i,a){var s=G();try{De(e)(t,n,r,o,i,a)}catch(e){if(N(s),e!==e+0)throw e;wt(1,0)}},u:function(e,t,n,r,o,i,a,s){var c=G();try{De(e)(t,n,r,o,i,a,s)}catch(e){if(N(c),e!==e+0)throw e;wt(1,0)}},W:function(e,t,n,r,o,i,a,s,c){var l=G();try{De(e)(t,n,r,o,i,a,s,c)}catch(e){if(N(l),e!==e+0)throw e;wt(1,0)}},A:function(e,t,n,r,o,i,a,s,c,l){var u=G();try{De(e)(t,n,r,o,i,a,s,c,l)}catch(e){if(N(u),e!==e+0)throw e;wt(1,0)}},n:function(e,t,n,r,o,i,a,s,c,l,u){var d=G();try{De(e)(t,n,r,o,i,a,s,c,l,u)}catch(e){if(N(d),e!==e+0)throw e;wt(1,0)}},G:function(e,t,n,r,o,i,a,s,c,l,u,d,h,p,f,g){var m=G();try{De(e)(t,n,r,o,i,a,s,c,l,u,d,h,p,f,g)}catch(e){if(N(m),e!==e+0)throw e;wt(1,0)}},y:e=>e};return Dt=await async function(){function e(e,t){return function(e){pt=e.ya,ft=r._free=e.za,gt=r._malloc=e.Ba,mt=e.Ca,wt=e.Da,vt=e.Ea,Ct=e.Fa,yt=e.Ga,At=e.Ha,Tt=e.Ia,Et=e.Ja,Me.viijii=e.Ka,xt=Me.iiijj=e.La,Me.jiji=e.Ma,Bt=Me.jiiii=e.Na,Me.iiiiij=e.Oa,Me.iiiiijj=e.Pa,Me.iiiiiijj=e.Qa,bt=e.wa,Rt=e.Aa}(Dt=e.exports),R(),Dt}var t={a:kt};if(r.instantiateWasm)return new Promise((n,o)=>{r.instantiateWasm(t,(t,r)=>{n(e(t))})});null!=T||(T=I());var n=await k(d,T,t);return e(n.instance)}(),function(){function e(){var e,t;r.calledRun=!0,!B&&(b=!0,Dt.xa(),null===(e=h)||void 0===e||e(r),null===(t=r.onRuntimeInitialized)||void 0===t||t.call(r),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)P(r.postRun.shift());F(S)}())}!function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)j(r.preRun.shift());F(q)}(),r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),e()},1)):e()}(),b?r:new Promise((e,t)=>{h=e,p=t})}async function ee(e,t){return async function(e,t,n=W){const r={...W,...n},o=await X(e,{fireImmediately:!0});let i,a;if("width"in t&&"height"in t&&"data"in t){const{data:e,data:{byteLength:n},width:s,height:c}=t;a=o._malloc(n),o.HEAPU8.set(e,a),i=o.readBarcodesFromPixmap(a,s,c,J(r))}else{let e,n;if("buffer"in t)[e,n]=[t.byteLength,t];else if("byteLength"in t)[e,n]=[t.byteLength,new Uint8Array(t)];else{if(!("size"in t))throw new TypeError("Invalid input type");[e,n]=[t.size,new Uint8Array(await t.arrayBuffer())]}a=o._malloc(e),o.HEAPU8.set(n,a),i=o.readBarcodesFromImage(a,e,J(r))}o._free(a);const s=[];for(let e=0;e<i.size();++e)s.push(Z(i.get(e)));return s}($,e,t)}const te=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"],["any","Any"]],ne=[...te,["unknown"]].map(e=>e[0]),re=new Map(te);function oe(e){for(const[t,n]of re)if(e===n)return t;return"unknown"}function ie(e){var t,n;try{return e instanceof(null==(n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView)?void 0:n.HTMLImageElement)}catch{return!1}}function ae(e){var t,n;try{return e instanceof(null==(n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView)?void 0:n.SVGImageElement)}catch{return!1}}function se(e){var t,n;try{return e instanceof(null==(n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView)?void 0:n.HTMLVideoElement)}catch{return!1}}function ce(e){var t,n;try{return e instanceof(null==(n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView)?void 0:n.HTMLCanvasElement)}catch{return!1}}function le(e){try{return e instanceof ImageBitmap||"[object ImageBitmap]"===Object.prototype.toString.call(e)}catch{return!1}}function ue(e){try{return e instanceof OffscreenCanvas||"[object OffscreenCanvas]"===Object.prototype.toString.call(e)}catch{return!1}}function de(e){try{return e instanceof VideoFrame||"[object VideoFrame]"===Object.prototype.toString.call(e)}catch{return!1}}async function he(e){if(ie(e)&&!await async function(e){try{return await e.decode(),!0}catch{return!1}}(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ae(e)&&!await async function(e){var t;try{return await(null==(t=e.decode)?void 0:t.call(e)),!0}catch{return!1}}(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(de(e)&&function(e){return null===e.format}(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(se(e)&&(0===e.readyState||1===e.readyState))throw new DOMException("Invalid element or state.","InvalidStateError");if(le(e)&&function(e){return 0===e.width&&0===e.height}(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=function(e){if(ie(e))return{width:e.naturalWidth,height:e.naturalHeight};if(ae(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(se(e))return{width:e.videoWidth,height:e.videoHeight};if(le(e))return{width:e.width,height:e.height};if(de(e))return{width:e.displayWidth,height:e.displayHeight};if(ce(e))return{width:e.width,height:e.height};if(ue(e))return{width:e.width,height:e.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}(e);if(0===t||0===n)return null;const r=function(e,t){try{const n=new OffscreenCanvas(e,t);if(n.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{const n=document.createElement("canvas");return n.width=e,n.height=t,n}}(t,n).getContext("2d");r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pe(e){if(function(e){try{return e instanceof Blob||"[object Blob]"===Object.prototype.toString.call(e)}catch{return!1}}(e))return await async function(e){let t;try{t=await createImageBitmap(e)}catch{try{if(!globalThis.Image)return e;{t=new Image;let n="";try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await he(t)}(e);if(function(e){try{return e instanceof ImageData||"[object ImageData]"===Object.prototype.toString.call(e)}catch{return!1}}(e)){if(function(e){return 0===e.data.buffer.byteLength}(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return ce(e)||ue(e)?function(e){const{width:t,height:n}=e;if(0===t||0===n)return null;const r=e.getContext("2d");try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}(e):await he(e)}function fe(e,t){return function(e){return e instanceof DOMException||"[object DOMException]"===Object.prototype.toString.call(e)}(e)?new DOMException(`${t}: ${e.message}`,e.name):function(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}(e)?new e.constructor(`${t}: ${e.message}`):new Error(`${t}: ${e}`)}var ge;class me{constructor(e={}){var t,n;((e,t,n)=>{t.has(e)?B("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,ge);try{const r=null==(t=null==e?void 0:e.formats)?void 0:t.filter(e=>"unknown"!==e);if(0===(null==r?void 0:r.length))throw new TypeError("Hint option provided, but is empty.");for(const e of null!=r?r:[])if(!re.has(e))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${e}' is not a valid enum value of type BarcodeFormat.`);((e,t,n)=>{b(e,t,"write to private field"),t.set(e,n)})(this,ge,null!=r?r:[]),(n={fireImmediately:!0},X($,n)).catch(()=>{})}catch(e){throw fe(e,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return ne.filter(e=>"unknown"!==e)}async detect(e){try{const t=await pe(e);if(null===t)return[];let n;const r={tryCode39ExtendedMode:!1,textMode:"Plain",formats:R(this,ge).map(e=>re.get(e))};try{n=await ee(t,r)}catch(e){throw console.error(e),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return n.map(e=>{const{topLeft:{x:t,y:n},topRight:{x:r,y:o},bottomLeft:{x:i,y:a},bottomRight:{x:s,y:c}}=e.position,l=Math.min(t,r,i,s),u=Math.min(n,o,a,c),d=Math.max(t,r,i,s),h=Math.max(n,o,a,c);return{boundingBox:new DOMRectReadOnly(l,u,d-l,h-u),rawValue:e.text,format:oe(e.format),cornerPoints:[{x:t,y:n},{x:r,y:o},{x:s,y:c},{x:i,y:a}]}})}catch(e){throw fe(e,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ge=new WeakMap,null!=globalThis.BarcodeDetector||(globalThis.BarcodeDetector=me);let we=!0,ve=!0;function Ce(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function ye(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return o.apply(this,arguments);const i=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,i),o.apply(this,[e,i])};const i=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(n))return i.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,i.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function Ae(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(we=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function Te(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(ve=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function Ee(){if("object"==typeof window){if(we)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function xe(e,t){ve&&console.warn(e+" is deprecated, please use "+t+" instead.")}function Be(e){return"[object Object]"===Object.prototype.toString.call(e)}function be(e){return Be(e)?Object.keys(e).reduce(function(t,n){const r=Be(e[n]),o=r?be(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,{[n]:o})},{}):e}function Re(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?Re(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{Re(e,e.get(t),n)})}))}function Me(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(null===t)return o;const i=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&i.push(e)}),i.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&Re(e,n,o)})}),o}const Ie=Ee;function De(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[o("min",n)]=r.ideal,t.optional.push(e),e={},e[o("max",n)]=r.ideal,t.optional.push(e)):(e[o("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},o=function(e,o){if(t.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let i=e.video.facingMode;i=i&&("object"==typeof i?i:{ideal:i});const a=t.version<66;if(i&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===i.exact||"environment"===i.ideal?t=["back","rear"]:"user"!==i.exact&&"user"!==i.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{n=n.filter(e=>"videoinput"===e.kind);let a=n.find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=i.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),Ie("chrome: "+JSON.stringify(e)),o(e)})}e.video=r(e.video)}return Ie("chrome: "+JSON.stringify(e)),o(e)},i=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){o(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(i(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return o(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(i(e))))}}}function ke(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function Fe(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const o=new Event("track");o.track=n.track,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const o=new Event("track");o.track=n,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else ye(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function Se(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let o=n.apply(this,arguments);return o||(o=t(this,e),this._senders.push(o)),o};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function Pe(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>Me(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),ye(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>Me(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function qe(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{const t=this.getSenders().find(t=>t.track===e);if(t)throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),o.apply(this,arguments)}}function je(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return qe(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{const t=this.getSenders().find(t=>t.track===e);if(t)throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const o=e.RTCPeerConnection.prototype.removeStream;function i(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(o.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");const o=this.getSenders().find(e=>e.track===t);if(o)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=i(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>i(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),o.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const s=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=s.get.apply(this);return""===e.type?e:i(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Ne(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function Ge(e,t){ye(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var Le=Object.freeze({__proto__:null,fixNegotiationNeeded:Ge,shimAddTrackRemoveTrack:je,shimAddTrackRemoveTrackWithNative:qe,shimGetSendersWithDtmf:Se,shimGetUserMedia:De,shimMediaStream:ke,shimOnTrack:Fe,shimPeerConnection:Ne,shimSenderReceiverGetStats:Pe});function Ve(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){xe("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function Ye(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Oe(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,o,i]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!o)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(o,i)}}function Qe(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function Ue(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),ye(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function Ke(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){xe("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function We(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function Je(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function Ze(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function He(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function _e(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var ze=Object.freeze({__proto__:null,shimAddTransceiver:Je,shimCreateAnswer:_e,shimCreateOffer:He,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:Ze,shimGetUserMedia:Ve,shimOnTrack:Ye,shimPeerConnection:Oe,shimRTCDataChannel:We,shimReceiverGetStats:Ue,shimRemoveStream:Ke,shimSenderGetStats:Qe});function Xe(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function $e(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function et(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],o=n.apply(this,[r]);return t?(o.then(e,t),Promise.resolve()):o},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[n]);return t?(o.then(e,t),Promise.resolve()):o};let s=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}function tt(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(nt(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function nt(e){return e&&void 0!==e.video?Object.assign({},e,{video:be(e.video)}):e}function rt(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(xe("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function ot(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function it(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function at(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var st=Object.freeze({__proto__:null,shimAudioContext:at,shimCallbacksAPI:et,shimConstraints:nt,shimCreateOfferLegacy:it,shimGetUserMedia:tt,shimLocalStreamsAPI:Xe,shimRTCIceServerUrls:rt,shimRemoteStreamsAPI:$e,shimTrackEventTransceiver:ot});function ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt,ut={exports:{}};var dt=(lt||(lt=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],o=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&o?{usernameFragment:r.substring(12),password:o.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let o=3;o<r.length;o++){const i=r[o],a=t.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(a){const r=t.parseRtpMap(a),o=t.matchPrefix(e,"a=fmtp:"+i+" ");switch(r.parameters=o.length?t.parseFmtp(o[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const o=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{o.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let o=0;return n.codecs.forEach(e=>{e.maxptime>o&&(o=e.maxptime)}),o>0&&(r+="a=maxptime:"+o+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),o=-1!==r.fecMechanisms.indexOf("RED"),i=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),s=a.length>0&&a[0].ssrc;let c;const l=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));l.length>0&&l[0].length>1&&l[0][0]===s&&(c=l[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&c&&(t.rtx={ssrc:c}),n.push(t),o&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:s,mechanism:i?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&s&&n.push({ssrc:s});let u=t.matchPrefix(e,"b=");return u.length&&(u=0===u[0].indexOf("b=TIAS:")?parseInt(u[0].substring(7),10):0===u[0].indexOf("b=AS:")?1e3*parseInt(u[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=u})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const o=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=o.length>0,n.compound=0===o.length;const i=t.matchPrefix(e,"a=rtcp-mux");return n.mux=i.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const o=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return o.length>0?(n=o[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let o;r.length>0&&(o=parseInt(r[0].substring(19),10)),isNaN(o)&&(o=65536);const i=t.matchPrefix(e,"a=sctp-port:");if(i.length>0)return{port:parseInt(i[0].substring(12),10),protocol:n.fmt,maxMessageSize:o};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:o}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let o;const i=void 0!==n?n:2;return o=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+o+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(ut)),ut.exports),ht=ct(dt),pt=u({__proto__:null,default:ht},[dt]);function ft(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=ht.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,ye(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function gt(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||ye(e,"icecandidate",e=>{if(e.candidate){const t=ht.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function mt(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=ht.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=ht.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const o=ht.matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?r=parseInt(o[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let o;o=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const i={};Object.defineProperty(i,"maxMessageSize",{get:()=>o}),this._sctp=i}return n.apply(this,arguments)}}function wt(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],o=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&o>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},ye(e,"datachannel",e=>(t(e.channel,e.target),e))}function vt(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function Ct(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function yt(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function At(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var Tt=Object.freeze({__proto__:null,removeExtmapAllowMixed:Ct,shimAddIceCandidateNullOrEmpty:yt,shimConnectionState:vt,shimMaxMessageSize:mt,shimParameterlessSetLocalDescription:At,shimRTCIceCandidate:ft,shimRTCIceCandidateRelayProtocol:gt,shimSendThrowTypeError:wt});!function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=Ee,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(Ce(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(Ce(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(Ce(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=Ce(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),o={browserDetails:r,commonShim:Tt,extractVersion:Ce,disableLog:Ae,disableWarnings:Te,sdp:pt};switch(r.browser){case"chrome":if(!Le||!Ne||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),o;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),o;n("adapter.js shimming chrome."),o.browserShim=Le,yt(e,r),At(e),De(e,r),ke(e),Ne(e,r),Fe(e),je(e,r),Se(e),Pe(e),Ge(e,r),ft(e),gt(e),vt(e),mt(e,r),wt(e),Ct(e,r);break;case"firefox":if(!ze||!Oe||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),o;n("adapter.js shimming firefox."),o.browserShim=ze,yt(e,r),At(e),Ve(e,r),Oe(e,r),Ye(e),Ke(e),Qe(e),Ue(e),We(e),Je(e),Ze(e),He(e),_e(e),ft(e),vt(e),mt(e,r),wt(e);break;case"safari":if(!st||!t.shimSafari)return n("Safari shim is not included in this adapter release."),o;n("adapter.js shimming safari."),o.browserShim=st,yt(e,r),At(e),rt(e),it(e),et(e),Xe(e),$e(e),ot(e),tt(e),at(e),ft(e),gt(e),mt(e,r),wt(e),Ct(e,r);break;default:n("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});const Et={finder:!0,torch:!0,tracker:void 0,onOff:!1,zoom:!1},xt={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},Bt={width:"100%",height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",aspectRatio:"1/1"},bt={width:"100%",height:"100%",objectFit:"cover",overflow:"hidden"};function Rt(e,t){for(const n of e){const[e,...r]=n.cornerPoints;t.lineWidth=2,t.strokeStyle="yellow",t.beginPath(),t.moveTo(e.x,e.y);for(const{x:e,y:n}of r)t.lineTo(e,n);t.lineTo(e.x,e.y),t.closePath(),t.stroke()}}function Mt(e,t){for(const n of e){const{boundingBox:{x:e,y:r,width:o,height:i}}=n;t.lineWidth=2,t.strokeStyle="yellow",t.strokeRect(e,r,o,i)}}function It(e,t){e.forEach(e=>{const{boundingBox:n,rawValue:r}=e,o=n.x+n.width/2,i=n.y+n.height/2,a=Math.max(12,50*n.width/t.canvas.width),s=a;let c;t.font=`${a}px sans-serif`,t.textAlign="left";try{c=JSON.stringify(JSON.parse(r),null,2)}catch{c=r}const l=c.split("\n"),u=Math.max(...l.map(e=>t.measureText(e).width)),d=l.length*s,h=o-u/2-10,p=i-d/2-10,f=u+20,g=d+10;t.beginPath(),t.moveTo(h+8,p),t.lineTo(h+f-8,p),t.quadraticCurveTo(h+f,p,h+f,p+8),t.lineTo(h+f,p+g-8),t.quadraticCurveTo(h+f,p+g,h+f-8,p+g),t.lineTo(h+8,p+g),t.quadraticCurveTo(h,p+g,h,p+g-8),t.lineTo(h,p+8),t.quadraticCurveTo(h,p,h+8,p),t.closePath(),t.fillStyle="rgba(255, 255, 0, 0.9)",t.fill(),l.forEach((e,n)=>{const r=i+n*s-(l.length-1)*s/2;let a=o-u/2,c=0;const d=[...e.matchAll(/"([^"]+)":/g)],h=[...e.matchAll(/:\s*("[^"]*"|\d+|true|false|null)/g)];d.forEach((n,o)=>{const i=n[0].replace(":",""),s=e.substring(c,n.index);if(t.fillStyle="black",t.fillText(s,a,r),a+=t.measureText(s).width,t.fillStyle="blue",t.fillText(i,a,r),a+=t.measureText(i).width,c=n.index+i.length,t.fillStyle="black",t.fillText(": ",a,r),a+=t.measureText(": ").width,o<h.length){const n=h[o],i=e.substring(c,n.index);t.fillStyle="black",t.fillText(i,a,r),a+=t.measureText(i).width;const s=n[0].match(/:\s*(.*)/)?.[1]??"";t.fillStyle="green",t.fillText(s,a,r),a+=t.measureText(s).width,c=n.index+n[0].length}}),t.fillStyle="black";const p=e.substring(c);t.fillText(p,a,r)})})}var Dt=e=>e instanceof Date,kt=e=>null==e;const Ft=e=>"object"==typeof e;var St=e=>!kt(e)&&!Array.isArray(e)&&Ft(e)&&!Dt(e),Pt=e=>kt(e)||!Ft(e);function qt(e,t){if(Pt(e)||Pt(t))return e===t;if(Dt(e)&&Dt(t))return e.getTime()===t.getTime();const n=e,r=t,o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;for(const e of o){const t=n[e];if(!i.includes(e))return!1;if("ref"!==e){const n=r[e];if(Dt(t)&&Dt(n)||St(t)&&St(n)||Array.isArray(t)&&Array.isArray(n)?!qt(t,n):t!==n)return!1}}return!0}function jt(t){const{onClick:n,disabled:r,className:o}=t,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...t.style};return e.jsxs("svg",{onClick:r?void 0:n,className:o,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{children:"Camera Off"}),e.jsx("path",{d:"M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007"})]})}function Nt(t){const{onClick:n,disabled:r,className:o}=t,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...t.style};return e.jsxs("svg",{onClick:r?void 0:n,className:o,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{children:"Camera On"}),e.jsx("path",{d:"M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z"}),e.jsx("path",{d:"M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z"})]})}function Gt(n){const{scanning:r,startScanning:o,stopScanning:i}=n,[a,s]=t.useState(!1);return e.jsx("div",{style:{bottom:85,right:8,position:"absolute",zIndex:2,cursor:a?"default":"pointer"},children:e.jsx(r?jt:Nt,{disabled:a,onClick:function(){s(!0),r?i():o(),setTimeout(()=>s(!1),1e3)}})})}function Lt(t){const{onClick:n,className:r,style:o}=t;return e.jsxs("svg",{onClick:n,width:"30px",height:"30px",viewBox:"0 0 24 24",className:r,style:o,xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{children:"Torch Off"}),e.jsx("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z"})]})}function Vt(t){const{onClick:n,className:r,style:o}=t;return e.jsxs("svg",{onClick:n,width:"30px",height:"30px",viewBox:"0 0 24 24",className:r,style:o,xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{children:"Torch On"}),e.jsx("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z"})]})}function Yt(t){const{status:n,scanning:r,torchToggle:o}=t;function i(e){o(e)}return r&&o?e.jsx("div",{style:{bottom:35,right:8,position:"absolute",zIndex:2,cursor:"pointer"},children:n?e.jsx(Lt,{onClick:()=>i(!1)}):e.jsx(Vt,{onClick:()=>i(!0)})}):null}function Ot(t){const{onClick:n,className:r,disabled:o=!1}=t,i={cursor:o?"default":"pointer",stroke:o?"grey":"yellow",fill:o?"grey":"yellow",...t.style};return e.jsxs("svg",{onClick:o?void 0:n,width:"30px",height:"30px",viewBox:"0 0 24 24",className:r,style:i,xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{children:"Zoom In"}),e.jsx("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z"})]})}function Qt(t){const{onClick:n,className:r,disabled:o=!1}=t,i={cursor:o?"default":"pointer",stroke:o?"grey":"yellow",fill:o?"grey":"yellow",...t.style};return e.jsxs("svg",{onClick:o?void 0:n,width:"30px",height:"30px",viewBox:"0 0 24 24",className:r,style:i,xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{children:"Zoom Out"}),e.jsx("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z"})]})}function Ut(n){const{scanning:r,capabilities:o,onZoom:i,value:a}=n;if(!r||!i)return null;const s=(o.max-o.min)/3;return e.jsxs(t.Fragment,{children:[e.jsx("div",{style:{bottom:130,right:8,position:"absolute",zIndex:2,cursor:"pointer"},children:e.jsx(Qt,{disabled:a<=o.min,onClick:function(){i(Math.max(a-s,o.min))}})}),e.jsx("div",{style:{bottom:180,right:8,position:"absolute",zIndex:2,cursor:"pointer"},children:e.jsx(Ot,{disabled:a>=o.max,onClick:function(){i(Math.min(a+s,o.max))}})})]})}const Kt={fullContainer:{width:"100%",height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},innerContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},overlay:{position:"absolute",top:0,right:0,bottom:0,left:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},borderBox:{position:"relative",width:"70%",aspectRatio:"1 / 1",border:"2px dashed rgba(239, 68, 68, 0.4)",borderRadius:"0.5rem"},cornerTopLeft:{position:"absolute",width:"15%",height:"15%",border:"4px solid #ef4444",top:0,left:0,borderBottomColor:"transparent",borderRightColor:"transparent",borderTopLeftRadius:"0.5rem"},cornerTopRight:{position:"absolute",width:"15%",height:"15%",border:"4px solid #ef4444",top:0,right:0,borderBottomColor:"transparent",borderLeftColor:"transparent",borderTopRightRadius:"0.5rem"},cornerBottomLeft:{position:"absolute",width:"15%",height:"15%",border:"4px solid #ef4444",bottom:0,left:0,borderTopColor:"transparent",borderRightColor:"transparent",borderBottomLeftRadius:"0.5rem"},cornerBottomRight:{position:"absolute",width:"15%",height:"15%",border:"4px solid #ef4444",bottom:0,right:0,borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomRightRadius:"0.5rem"}};function Wt(t){const{scanning:n,capabilities:r,onOff:o,torch:i,zoom:a,startScanning:s,stopScanning:c}=t;return e.jsx("div",{style:Kt.fullContainer,children:e.jsxs("div",{style:Kt.innerContainer,children:[e.jsx("div",{style:Kt.overlay,children:e.jsxs("div",{style:Kt.borderBox,children:[e.jsx("div",{style:Kt.cornerTopLeft}),e.jsx("div",{style:Kt.cornerTopRight}),e.jsx("div",{style:Kt.cornerBottomLeft}),e.jsx("div",{style:Kt.cornerBottomRight})]})}),o&&e.jsx(Gt,{scanning:n,startScanning:s,stopScanning:c}),i&&r.torch&&e.jsx(Yt,{scanning:n,status:i.status,torchToggle:i.toggle}),a&&r.zoom&&e.jsx(Ut,{scanning:n,capabilities:r.zoom,value:a.value,onZoom:a.onChange})]})})}function Jt(e){if(null===e)throw new Error("Canvas should always be defined when component is mounted.");const t=e.getContext("2d");if(null===t)throw new Error("Canvas 2D context should be non-null");t.clearRect(0,0,e.width,e.height)}function Zt(n){const{onScan:r,constraints:o,formats:i=["any"],paused:a=!1,components:s,children:c,styles:l,classNames:u,allowMultiple:d,scanDelay:h,onError:p,sound:f}=n,g=t.useRef(null),m=t.useRef(null),w=t.useRef(null),v=t.useMemo(()=>({...xt,...o}),[o]),C=t.useMemo(()=>({...Et,...s}),[s]),[y,A]=t.useState(!1),[T,E]=t.useState(!0),[x,B]=t.useState(v),b=function(){const e=t.useRef(Promise.resolve({type:"stop",data:{}})),n=t.useRef(null),r=t.useRef(null),[o,i]=t.useState({}),[a,s]=t.useState({}),c=t.useCallback(async(e,t)=>{if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(void 0===navigator?.mediaDevices?.getUserMedia)throw new Error("this browser has no Stream API support");const o=await navigator.mediaDevices.getUserMedia({audio:!1,video:t});void 0!==e.srcObject?e.srcObject=o:void 0!==e.mozSrcObject?e.mozSrcObject=o:window.URL.createObjectURL?e.src=window.URL.createObjectURL(o):window.webkitURL?e.src=window.webkitURL.createObjectURL(o):e.src=o.id,await Promise.race([e.play(),new Promise(e=>setTimeout(e,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(e=>setTimeout(e,500));const[a]=o.getVideoTracks();return s(a.getSettings()),i(a?.getCapabilities?.()??{}),n.current=o,r.current=a,{type:"start",data:{videoEl:e,stream:o,constraints:t}}},[]),l=t.useCallback(async(e,t)=>{e.src="",e.srcObject=null,e.load();for(const e of t.getTracks())t.removeTrack(e),e.stop();return n.current=null,r.current=null,s({}),{type:"stop",data:{}}},[]),u=t.useCallback(async(t,{constraints:n,restart:r=!1})=>{let o=null;e.current=e.current.then(e=>{if("start"===e.type){const{data:{videoEl:o,stream:i,constraints:a}}=e;return r||t!==o||n!==a?l(o,i).then(()=>c(t,n)):e}return c(t,n)}).catch(e=>(o=e,{type:"stop",data:{}}));const i=await e.current;if(o)throw o;if("stop"===i.type)throw new Error("Something went wrong with the camera task queue (start task).")},[c,l]),d=t.useCallback(async()=>{if(e.current=e.current.then(e=>{if("stop"===e.type)return e;const{data:{videoEl:t,stream:n}}=e;return l(t,n)}),"start"===(await e.current).type)throw new Error("Something went wrong with the camera task queue (stop task).")},[l]),h=t.useCallback(async e=>{const t=r.current;if(!t)throw new Error("No active video track found.");{e.advanced?.[0].zoom&&t.getCapabilities().torch&&await t.applyConstraints({advanced:[{torch:!1}]}),await t.applyConstraints(e);const n=t.getCapabilities(),r=t.getSettings();i(n),s(r)}},[]);return t.useEffect(()=>()=>{(async()=>{await d()})()},[d]),{capabilities:o,settings:a,startCamera:u,stopCamera:d,updateConstraints:h}}(),R=t.useRef(b),M=t.useRef(p),I=t.useRef(C.tracker);t.useEffect(()=>{R.current=b},[b]),t.useEffect(()=>{M.current=p},[p]),t.useEffect(()=>{I.current=C.tracker},[C.tracker]);const D=t.useCallback(e=>{!function(e,t,n,r){const o=n;if(null==o)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const i=t;if(null==i)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(0===e.length||void 0===r)Jt(o);else{const t=i.offsetWidth,n=i.offsetHeight,a=i.videoWidth,s=i.videoHeight,c=Math.max(t/a,n/s),l=a*c,u=s*c,d=l/a,h=u/s,p=(t-l)/2,f=(n-u)/2,g=({x:e,y:t})=>({x:Math.floor(e*d),y:Math.floor(t*h)}),m=({x:e,y:t})=>({x:Math.floor(e+p),y:Math.floor(t+f)}),w=e.map(e=>{const{boundingBox:t,cornerPoints:n}=e,{x:r,y:o}=m(g({x:t.x,y:t.y})),{x:i,y:a}=g({x:t.width,y:t.height});return{...e,cornerPoints:n.map(e=>m(g(e))),boundingBox:DOMRectReadOnly.fromRect({x:r,y:o,width:i,height:a})}});o.width=i.offsetWidth,o.height=i.offsetHeight;const v=o.getContext("2d");if(null===v)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");r(w,v)}}(e,g.current,w.current,I.current)},[]),{startScanning:k,stopScanning:F}=function(e){const{videoElementRef:n,onScan:r,onFound:o,retryDelay:i=100,scanDelay:a=0,formats:s=[],allowMultiple:c=!1,sound:l=!0}=e,u=t.useRef(new me({formats:s})),d=t.useRef(null),h=t.useRef(null);t.useEffect(()=>{u.current=new me({formats:s})},[s]),t.useEffect(()=>{"undefined"!=typeof window&&l&&(d.current=new Audio("string"==typeof l?l:"data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znOcPhwOBwggHCMpA4HA4KEyHOc5znO+hPIc5//+fqJh8XQPh90JU5xQinOf//87/zvP+ggAYuhCKHxdA+Hxd0EA4KKHA4ciB3kOXfXB/gmf8p/B96lAMKAgAADU+BujARHgwdisgHMfAUHAiceBg4ASBgZBiBIBH4ZaHOJsLhf8R+HYEciIgYSwj/+Bi7EqBh+AcBn5P6Bh4TuBmrAMBiZH7gaLEWgew//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWAewEWYGN4X4GDEPwGE8S4GDoOIGAYKgIQOkz//gGARAUB+CwGxTwMAACAEgyAwdAlAxKhzAxXiZ///AxcEwAwJjDAziCAAwQgdAwRgdAsJQDAmAcGzYDwAhZIAKAcIQB4GT9TQMJ9/4Gi1Fv/AcAYUqKBAwGgNAwVBAAwGhwAwdBlAxFg1AwlgzAwNBuAkJQDBgEEDEqGECgChFgBgL//CIswYYH//+HKCpk4K0C9AaKKCAOBeMcR4X9C44BwABCgGAsGYCgTwHAcAwXAiAwSAQV///CJP9lwMBQAwAAAWGo5lVLCcaeneVhJAVGai3//ioaUEf//gaTAYGCj8BnEwfrIqDcsIQb/v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NdqlRBMFT0qdNE0WZhmay2tCuOY6oieWieianCnVSbzjd7SGhrLi6eUSeLcZTWqdML5PM50uOGJms9VqtYU6hrgrm4V0frUzTvYsiegR2FOkqUxSKdVCpmRCSkIAUZ4VPhqEKgFDU2VhUiIhUaIg0RAkTBYEjYBUbBMuCJgLAkCUBUinABgBE3/9EQqFRM0s0qzktk9ZFqqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"))},[l]);const p=t.useCallback(e=>async t=>{if(null!==n.current&&n.current.readyState>1){const{lastScan:s,contentBefore:f,lastScanHadContent:g}=e;if(t-s<i)h.current=window.requestAnimationFrame(p(e));else{const i=await u.current.detect(n.current),s=i.some(e=>!f.includes(e.rawValue)),m=i.length>0;let w=e.lastOnScan;(s||c&&m&&t-w>=a)&&(l&&d.current&&d.current.paused&&d.current.play().catch(e=>console.error("Error playing the sound",e)),w=t,r(i)),m&&o(i),!m&&g&&o(i);const v={lastScan:t,lastOnScan:w,lastScanHadContent:m,contentBefore:s?i.map(e=>e.rawValue):f};h.current=window.requestAnimationFrame(p(v))}}},[r,o,i,c,a,l]);return{startScanning:t.useCallback(()=>{const e=performance.now(),t={lastScan:e,lastOnScan:e,contentBefore:[],lastScanHadContent:!1};h.current=window.requestAnimationFrame(p(t))},[p]),stopScanning:t.useCallback(()=>{null!==h.current&&(window.cancelAnimationFrame(h.current),h.current=null)},[])}}({videoElementRef:g,onScan:r,onFound:D,formats:i,retryDelay:void 0===C.tracker?500:10,scanDelay:h,allowMultiple:d,sound:f});t.useEffect(()=>(A(!0),()=>{A(!1)}),[]),t.useEffect(()=>{if(!qt(v,x)){const e=v;o?.deviceId&&delete e.facingMode,B(e)}},[o,v,x]);const S=t.useMemo(()=>({constraints:x,shouldStream:y&&!a}),[x,y,a]),P=t.useCallback(async()=>{const e=g.current;if(null==e)throw new Error("Video should be defined when component is mounted.");const t=m.current;if(null==t)throw new Error("Canvas should be defined when component is mounted.");const n=t.getContext("2d");if(null==n)throw new Error("Canvas should be defined when component is mounted.");if(S.shouldStream){await R.current.stopCamera(),E(!1);try{await R.current.startCamera(e,S),e?E(!0):await R.current.stopCamera()}catch(e){M.current?.(e),console.error("error",e)}}else t.width=e.videoWidth,t.height=e.videoHeight,n.drawImage(e,0,0,e.videoWidth,e.videoHeight),await R.current.stopCamera(),E(!1)},[S]);t.useEffect(()=>{(async()=>{await P()})()},[P]);const q=t.useMemo(()=>S.shouldStream&&T,[S.shouldStream,T]);return t.useEffect(()=>{if(q){if(void 0===m.current)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(Jt(m.current),void 0===w.current)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");Jt(w.current);if(null==g.current)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");k()}return()=>{F()}},[q,k,F]),e.jsxs("div",{style:{...Bt,...l?.container},className:u?.container,children:[e.jsx("video",{ref:g,style:{...bt,...l?.video,visibility:a?"hidden":"visible"},className:u?.video,autoPlay:!0,muted:!0,playsInline:!0}),e.jsx("canvas",{ref:m,style:{display:a?"block":"none",position:"absolute",width:"100%",height:"100%"}}),e.jsx("canvas",{ref:w,style:{position:"absolute",width:"100%",height:"100%"}}),e.jsxs("div",{style:{position:"absolute",width:"100%",height:"100%"},children:[C.finder&&e.jsx(Wt,{scanning:T,capabilities:b.capabilities,onOff:C.onOff,zoom:C.zoom&&b.settings.zoom?{value:b.settings.zoom,onChange:async e=>{const t={...x,advanced:[{zoom:e}]};await b.updateConstraints(t)}}:void 0,torch:C.torch?{status:b.settings.torch??!1,toggle:async e=>{const t={...x,advanced:[{torch:e}]};await b.updateConstraints(t)}}:void 0,startScanning:async()=>await P(),stopScanning:async()=>{await b.stopCamera(),Jt(w.current),E(!1)}}),c]})]})}var Ht,_t=function(n){var r=t.useMemo(function(){return 1300+document.querySelectorAll(".dialog-mask").length},[]);return e.jsxs("div",h({},n,{className:"dialog-mask ".concat(n.className),style:h(h({},n.style),{zIndex:r}),children:[e.jsx("style",{children:"body { overflow: hidden; }"}),n.children]}))},zt=function(t){return e.jsx("div",h({},t,{className:"dialog-body ".concat(t.className)}))},Xt=function(r){t.useEffect(function(){return window.addEventListener("keyup",o),function(){window.removeEventListener("keyup",o)}},[]);var o=t.useCallback(function(e){var t;["Esc","Escape"].includes(e.key)&&(null===(t=r.onClose)||void 0===t||t.call(r))},[]);return r.open?n.createPortal(e.jsx(e.Fragment,{children:e.jsx(_t,{children:e.jsxs(zt,{style:{position:"relative",fontFamily:"sans-serif",width:"100%",maxWidth:"500px"},children:[r.title&&e.jsx("div",{className:"dialog-header",children:e.jsx("h4",{style:{fontWeight:"600",fontSize:"1.25rem"},children:r.title})}),e.jsx("button",{type:"button",style:{position:"absolute",top:"0.5rem",right:"0.5rem",zIndex:20,fontSize:"1.375rem",fontWeight:"700",background:"transparent",border:"none",padding:"5px 10px"},onClick:r.onClose,children:"×"}),e.jsx("div",{})]})})}),document.body):e.jsx(e.Fragment,{})},$t=function(t){var n,r,o,i;return e.jsx(Xt,{open:t.open,title:(null==t?void 0:t.title)||"confirmation de l'évènement",onClose:t.onClose,children:e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("p",{children:(null==t?void 0:t.message)||"Voulez-vous vraiment confirmer le scan ?"}),e.jsx("div",{style:{marginTop:"1.25rem",display:"flex",flexDirection:"column"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"1rem"},children:[e.jsx("button",{type:"button",className:"btn",style:h({backgroundColor:"#e5e7eb",color:"black"},null===(n=null==t?void 0:t.btnCancel)||void 0===n?void 0:n.style),onClick:t.onClose,children:(null===(r=null==t?void 0:t.btnCancel)||void 0===r?void 0:r.label)||"annuler"}),e.jsx("button",{type:"button",className:"btn",style:h({backgroundColor:"#22c55e",color:"white"},null===(o=null==t?void 0:t.btnOk)||void 0===o?void 0:o.style),onClick:t.onConfirm,children:(null===(i=null==t?void 0:t.btnOk)||void 0===i?void 0:i.label)||"confirmer"})]})})]})})},en={exports:{}};var tn,nn=Ht?en.exports:(Ht=1,tn=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":
11
2
  /*!******************************!*\
12
3
  !*** ./src/react-webcam.tsx ***!
13
4
  \******************************/
14
- /*! exports provided: default */function(e,t,n){n.r(t);var r,o=n(/*! react */"react"),i=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function s(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)}"undefined"!=typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise(function(n,r){t.call(navigator,e,n,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}));var c=function(e){function t(t){var n=e.call(this,t)||this;return n.canvas=null,n.ctx=null,n.requestUserMediaId=0,n.unmounted=!1,n.state={hasUserMedia:!1},n}return i(t,e),t.prototype.componentDidMount=function(){var e=this.state,t=this.props;this.unmounted=!1,s()?(e.hasUserMedia||this.requestUserMedia(),t.children&&"function"!=typeof t.children&&console.warn("children must be a function")):t.onUserMediaError("getUserMedia not supported")},t.prototype.componentDidUpdate=function(e){var t=this.props;if(s()){var n=JSON.stringify(e.audioConstraints)!==JSON.stringify(t.audioConstraints),r=JSON.stringify(e.videoConstraints)!==JSON.stringify(t.videoConstraints),o=e.minScreenshotWidth!==t.minScreenshotWidth,i=e.minScreenshotHeight!==t.minScreenshotHeight;(r||o||i)&&(this.canvas=null,this.ctx=null),(n||r)&&(this.stopAndCleanup(),this.requestUserMedia())}else t.onUserMediaError("getUserMedia not supported")},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},t.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(t){e.removeTrack(t),t.stop()}),e.getAudioTracks().map(function(t){e.removeTrack(t),t.stop()})):e.stop())},t.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(t.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},t.prototype.getScreenshot=function(e){var t=this.state,n=this.props;if(!t.hasUserMedia)return null;var r=this.getCanvas(e);return r&&r.toDataURL(n.screenshotFormat,n.screenshotQuality)},t.prototype.getCanvas=function(e){var t=this.state,n=this.props;if(!this.video)return null;if(!t.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var r=this.video.videoWidth,o=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var i=r/o;o=(r=n.minScreenshotWidth||this.video.clientWidth)/i,n.minScreenshotHeight&&o<n.minScreenshotHeight&&(r=(o=n.minScreenshotHeight)*i)}this.canvas=document.createElement("canvas"),this.canvas.width=(null==e?void 0:e.width)||r,this.canvas.height=(null==e?void 0:e.height)||o,this.ctx=this.canvas.getContext("2d")}var a=this.ctx,s=this.canvas;return a&&s&&(s.width=(null==e?void 0:e.width)||s.width,s.height=(null==e?void 0:e.height)||s.height,n.mirrored&&(a.translate(s.width,0),a.scale(-1,1)),a.imageSmoothingEnabled=n.imageSmoothing,a.drawImage(this.video,0,0,(null==e?void 0:e.width)||s.width,(null==e?void 0:e.height)||s.height),n.mirrored&&(a.scale(-1,1),a.translate(-s.width,0))),s},t.prototype.requestUserMedia=function(){var e=this,n=this.props,r=function(r,o){var i={video:void 0===o||o};n.audio&&(i.audio=void 0===r||r),e.requestUserMediaId++;var a=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(i).then(function(n){e.unmounted||a!==e.requestUserMediaId?t.stopMediaStream(n):e.handleUserMedia(null,n)}).catch(function(t){e.handleUserMedia(t)})};if("mediaDevices"in navigator)r(n.audioConstraints,n.videoConstraints);else{var o=function(e){return{optional:[{sourceId:e}]}},i=function(e){var t=e.deviceId;return"string"==typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"==typeof t&&t.ideal?t.ideal:null};MediaStreamTrack.getSources(function(e){var t=null,a=null;e.forEach(function(e){"audio"===e.kind?t=e.id:"video"===e.kind&&(a=e.id)});var s=i(n.audioConstraints);s&&(t=s);var c=i(n.videoConstraints);c&&(a=c),r(o(t),o(a))})}},t.prototype.handleUserMedia=function(e,t){var n=this.props;if(e||!t)return this.setState({hasUserMedia:!1}),void n.onUserMediaError(e);this.stream=t;try{this.video&&(this.video.srcObject=t),this.setState({hasUserMedia:!0})}catch(e){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(t)})}n.onUserMedia(t)},t.prototype.render=function(){var e=this,t=this.state,n=this.props,r=n.audio;n.forceScreenshotSourceSize;var i=n.disablePictureInPicture;n.onUserMedia,n.onUserMediaError,n.screenshotFormat,n.screenshotQuality,n.minScreenshotWidth,n.minScreenshotHeight,n.audioConstraints,n.videoConstraints,n.imageSmoothing;var s=n.mirrored,c=n.style,l=void 0===c?{}:c,u=n.children,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),p=s?a(a({},l),{transform:(l.transform||"")+" scaleX(-1)"}):l,f={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",a({autoPlay:!0,disablePictureInPicture:i,src:t.src,muted:!r,playsInline:!0,ref:function(t){e.video=t},style:p},d)),u&&u(f))},t.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},t}(o.Component);t.default=c},react:
5
+ /*! exports provided: default */function(e,t,n){n.r(t);var r,o=n(/*! react */"react"),i=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function s(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)}"undefined"!=typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise(function(n,r){t.call(navigator,e,n,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}));var c=function(e){function t(t){var n=e.call(this,t)||this;return n.canvas=null,n.ctx=null,n.requestUserMediaId=0,n.unmounted=!1,n.state={hasUserMedia:!1},n}return i(t,e),t.prototype.componentDidMount=function(){var e=this.state,t=this.props;this.unmounted=!1,s()?(e.hasUserMedia||this.requestUserMedia(),t.children&&"function"!=typeof t.children&&console.warn("children must be a function")):t.onUserMediaError("getUserMedia not supported")},t.prototype.componentDidUpdate=function(e){var t=this.props;if(s()){var n=JSON.stringify(e.audioConstraints)!==JSON.stringify(t.audioConstraints),r=JSON.stringify(e.videoConstraints)!==JSON.stringify(t.videoConstraints),o=e.minScreenshotWidth!==t.minScreenshotWidth,i=e.minScreenshotHeight!==t.minScreenshotHeight;(r||o||i)&&(this.canvas=null,this.ctx=null),(n||r)&&(this.stopAndCleanup(),this.requestUserMedia())}else t.onUserMediaError("getUserMedia not supported")},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},t.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(t){e.removeTrack(t),t.stop()}),e.getAudioTracks().map(function(t){e.removeTrack(t),t.stop()})):e.stop())},t.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(t.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},t.prototype.getScreenshot=function(e){var t=this.state,n=this.props;if(!t.hasUserMedia)return null;var r=this.getCanvas(e);return r&&r.toDataURL(n.screenshotFormat,n.screenshotQuality)},t.prototype.getCanvas=function(e){var t=this.state,n=this.props;if(!this.video)return null;if(!t.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var r=this.video.videoWidth,o=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var i=r/o;o=(r=n.minScreenshotWidth||this.video.clientWidth)/i,n.minScreenshotHeight&&o<n.minScreenshotHeight&&(r=(o=n.minScreenshotHeight)*i)}this.canvas=document.createElement("canvas"),this.canvas.width=(null==e?void 0:e.width)||r,this.canvas.height=(null==e?void 0:e.height)||o,this.ctx=this.canvas.getContext("2d")}var a=this.ctx,s=this.canvas;return a&&s&&(s.width=(null==e?void 0:e.width)||s.width,s.height=(null==e?void 0:e.height)||s.height,n.mirrored&&(a.translate(s.width,0),a.scale(-1,1)),a.imageSmoothingEnabled=n.imageSmoothing,a.drawImage(this.video,0,0,(null==e?void 0:e.width)||s.width,(null==e?void 0:e.height)||s.height),n.mirrored&&(a.scale(-1,1),a.translate(-s.width,0))),s},t.prototype.requestUserMedia=function(){var e=this,n=this.props,r=function(r,o){var i={video:void 0===o||o};n.audio&&(i.audio=void 0===r||r),e.requestUserMediaId++;var a=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(i).then(function(n){e.unmounted||a!==e.requestUserMediaId?t.stopMediaStream(n):e.handleUserMedia(null,n)}).catch(function(t){e.handleUserMedia(t)})};if("mediaDevices"in navigator)r(n.audioConstraints,n.videoConstraints);else{var o=function(e){return{optional:[{sourceId:e}]}},i=function(e){var t=e.deviceId;return"string"==typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"==typeof t&&t.ideal?t.ideal:null};MediaStreamTrack.getSources(function(e){var t=null,a=null;e.forEach(function(e){"audio"===e.kind?t=e.id:"video"===e.kind&&(a=e.id)});var s=i(n.audioConstraints);s&&(t=s);var c=i(n.videoConstraints);c&&(a=c),r(o(t),o(a))})}},t.prototype.handleUserMedia=function(e,t){var n=this.props;if(e||!t)return this.setState({hasUserMedia:!1}),void n.onUserMediaError(e);this.stream=t;try{this.video&&(this.video.srcObject=t),this.setState({hasUserMedia:!0})}catch(e){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(t)})}n.onUserMedia(t)},t.prototype.render=function(){var e=this,t=this.state,n=this.props,r=n.audio;n.forceScreenshotSourceSize;var i=n.disablePictureInPicture;n.onUserMedia,n.onUserMediaError,n.screenshotFormat,n.screenshotQuality,n.minScreenshotWidth,n.minScreenshotHeight,n.audioConstraints,n.videoConstraints,n.imageSmoothing;var s=n.mirrored,c=n.style,l=void 0===c?{}:c,u=n.children,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),h=s?a(a({},l),{transform:(l.transform||"")+" scaleX(-1)"}):l,p={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",a({autoPlay:!0,disablePictureInPicture:i,src:t.src,muted:!r,playsInline:!0,ref:function(t){e.video=t},style:h},d)),u&&u(p))},t.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},t}(o.Component);t.default=c},react:
15
6
  /*!**************************************************************************************!*\
16
7
  !*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
17
8
  \**************************************************************************************/
18
- /*! no static exports found */function(t,n){t.exports=e}}).default},an.exports=sn(e)),ln=h(cn),un={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dn=e.createContext&&e.createContext(un),pn=["attr","size","title"];function fn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function hn(){return hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hn.apply(this,arguments)}function gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gn(Object(n),!0).forEach(function(t){vn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vn(e,t,n){var r;return r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==typeof r?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(t){return t&&t.map((t,n)=>e.createElement(t.tag,mn({key:n},t.attr),wn(t.child)))}function yn(t){return n=>e.createElement(Cn,hn({attr:mn({},t.attr)},n),wn(t.child))}function Cn(t){var n=n=>{var r,{attr:o,size:i,title:a}=t,s=fn(t,pn),c=i||n.size||"1em";return n.className&&(r=n.className),t.className&&(r=(r?r+" ":"")+t.className),e.createElement("svg",hn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,o,s,{className:r,style:mn(mn({color:t.color||n.color},n.style),t.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&e.createElement("title",null,a),t.children)};return void 0!==dn?e.createElement(dn.Consumer,null,e=>n(e)):n(un)}function An(e){return yn({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z"},child:[]}]})(e)}function Tn(e){return yn({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"},child:[]}]})(e)}function En(e){return yn({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"},child:[]}]})(e)}function bn(e){return yn({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"},child:[]}]})(e)}function xn(e){return yn({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 7h-1l-1-1h-4L9 7H8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm-4 7c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"},child:[]},{tag:"path",attr:{d:"m8.57.51 4.48 4.48V2.04c4.72.47 8.48 4.23 8.95 8.95h2C23.34 3.02 15.49-1.59 8.57.51zM10.95 21.96c-4.72-.47-8.48-4.23-8.95-8.95H0c.66 7.97 8.51 12.58 15.43 10.48l-4.48-4.48v2.95z"},child:[]}]})(e)}function Bn(e){return yn({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 13A5 5 0 1 0 8 3a5 5 0 0 0 0 10"},child:[]}]})(e)}var Rn,Mn=function(){function e(){this.dbName="cortex-react-media",this.storeName="capturedFiles",this.db=null}return e.prototype.openDatabase=function(){return d(this,void 0,void 0,function(){var e=this;return p(this,function(t){return[2,new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onupgradeneeded=function(t){r.result.createObjectStore(e.storeName,{keyPath:"id",autoIncrement:!0})},r.onsuccess=function(){e.db=r.result,t(e.db)},r.onerror=function(){return n(r.error)}})]})})},e.prototype.storeFile=function(e){return d(this,void 0,void 0,function(){var t=this;return p(this,function(n){switch(n.label){case 0:return this.db?[3,2]:[4,this.openDatabase()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise(function(n,r){var o=t.db.transaction(t.storeName,"readwrite").objectStore(t.storeName).add({file:e,timestamp:Date.now(),name:e.name});o.onsuccess=function(){return n(o.result)},o.onerror=function(){return r(o.error)}})]}})})},e.prototype.retrieveFile=function(e){return d(this,void 0,void 0,function(){var t=this;return p(this,function(n){switch(n.label){case 0:return this.db?[3,2]:[4,this.openDatabase()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise(function(n,r){var o=t.db.transaction([t.storeName],"readonly").objectStore(t.storeName).get(e);o.onsuccess=function(){var e=o.result;n(e?e.file:null)},o.onerror=function(){return r(o.error)}})]}})})},e}();!function(e){e[e.Enter=0]="Enter",e[e.Entering=1]="Entering",e[e.Entered=2]="Entered",e[e.Exit=3]="Exit",e[e.Exiting=4]="Exiting",e[e.Exited=5]="Exited"}(Rn||(Rn={}));var Dn=E(function(t,n){var r=t.trigger,o=t.mode,i=void 0===o?"appear":o,a=t.children,s=t.enterTimeout,c=t.exitTimeout,u=t.className,d=t.onEnter,p=t.onEntering,f=t.onEntered,h=t.onExit,g=t.onExiting,m=t.onExited,v=e.useRef(null),w=e.useRef(),y=e.useState(function(){return"appear"===i?Rn.Exited:Rn.Entered});y[0],y[1];e.useEffect(function(){return function(){w.current&&window.clearTimeout(w.current)}},[w]),e.useEffect(function(){r?(w.current&&window.clearTimeout(w.current),v.current.classList.remove("".concat(u,"-exit")),v.current.classList.remove("".concat(u,"-exiting")),v.current.classList.remove("".concat(u,"-exited")),d&&d(),v.current.classList.add("".concat(u,"-enter")),w.current=window.setTimeout(function(){p&&p(),v.current&&v.current.classList.add("".concat(u,"-entering")),w.current=window.setTimeout(function(){f&&f(),v.current&&v.current.classList.add("".concat(u,"-entered"))},s||1e3)},10)):(w.current&&window.clearTimeout(w.current),v.current.classList.remove("".concat(u,"-enter")),v.current.classList.remove("".concat(u,"-entering")),v.current.classList.remove("".concat(u,"-entered")),h&&h(),v.current.classList.add("".concat(u,"-exit")),w.current=window.setTimeout(function(){g&&g(),v.current&&v.current.classList.add("".concat(u,"-exiting")),w.current=window.setTimeout(function(){m&&m(),v.current&&v.current.classList.add("".concat(u,"-exited"))},c||1e3)}))},[r]);var C=e.useMemo(function(){if(a){var t=l(l({},a.props),{className:B(u,a.props.className),ref:v});return e.cloneElement(a,t)}},[a,v]);return T.jsx(T.Fragment,{children:C})}),kn=E(function(e,t){var n=e.trigger,r=e.children,o=e.onEnter,i=e.onEntering,a=e.onEntered,s=e.onExit,c=e.onExiting,l=e.onExited;return T.jsx(Dn,{ref:t,trigger:n,mode:"appear",className:"ui-fade",enterTimeout:160,exitTimeout:160,onEnter:o,onExit:s,onEntering:i,onEntered:a,onExiting:c,onExited:l,children:r})});function In(e,t){var n=c.useCallback(function(n){var r=n.target,o=t.reduce(function(e,t){if(!t)return e;var n=function(e){var t;if(!e)return document.body;if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:document.body}var r=e;return r&&void 0!==r.current?null!==(t=r.current)&&void 0!==t?t:void 0:e}(t);return!1!==e&&n&&null!==n?!n.contains(r):e},!0);e&&o&&e()},[e]);c.useEffect(function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[t,n])}var Sn=function(e){var t=e.tag;e.className;var n=e.onDelete;return T.jsxs("span",{className:"ui-taginputItem",children:[T.jsx("span",{className:"ui-taginputItemLabel",children:t.label}),T.jsx("button",{type:"button",className:"ui-taginputItemRemove",onClick:n,children:"x"})]})},Fn=E(function(t,n){var r=t.className,o=t.value,i=t.onClick,a=t.onChange,s=e.useRef(null),c=e.useCallback(function(e){a&&a(e.target.value)},[a]);return e.useEffect(function(){if(n&&s)return x(n,s.current),function(){x(n,null)}},[n,s]),T.jsx(T.Fragment,{children:T.jsx("input",{ref:s,value:o,className:B("ui-taginputFilter",r),autoComplete:"off",spellCheck:"false","data-form-type":"other",onChange:c,onClick:i})})}),Pn=function(t){var n=t.suggestion,r=t.onClick,o=e.useCallback(function(e){r&&r(n,e)},[r]);return T.jsx("div",{role:"button",className:"ui-taginputSelectItem",tabIndex:0,onClick:o,children:n.label})},jn=function(e){var t=e.group,n=e.onClick,r=Array.isArray(t.suggestions)?t.suggestions.map(function(e,t){return!0===e.group?T.jsx(jn,{group:e,onClick:n},t):T.jsx(Pn,{suggestion:e,onClick:n},t)}):null;return T.jsxs("div",{className:"ui-taginputSelectGroup",children:[T.jsx("span",{className:"ui-taginputSelectGroupLabel",children:t.label}),T.jsx("div",{className:"ui-taginputSelectGroupItems",children:r})]})},qn=E(function(t,n){var r=t.open,o=t.tags,i=t.disableFilter,a=t.suggestions,s=t.anchorEl,c=t.filter,u=t.onSuggestionClick,d=e.useMemo(function(){if(!Array.isArray(a))return[];if(i)return a;var e=Array.isArray(o)&&o.length>0,t=c&&c.length>0,n=[];return a.forEach(function(r){if(!0!==r.group)e&&o.some(function(e){return e.id===r.id})||t&&r.label.toUpperCase().indexOf(c.toUpperCase())<0||n.push(l({},r));else if(Array.isArray(r.suggestions)){var i=l(l({},r),{suggestions:[]});r.suggestions.forEach(function(n){e&&o.some(function(e){return e.id===n.id})||t&&n.label.toUpperCase().indexOf(c.toUpperCase())<0||i.suggestions.push(l({},n))}),i.suggestions.length>0&&n.push(i)}}),n},[a,c,o]),p=e.useCallback(function(e){u&&u(e)},[u]),f=r&&d.length>0,h=d.map(function(e,t){return!0===e.group?T.jsx(jn,{group:e,onClick:p},t):T.jsx(Pn,{suggestion:e,onClick:p},t)});return T.jsx(D,{ref:n,open:f,anchorEl:s,placement:M.BottomLeft,children:T.jsx("div",{className:"ui-taginputSelect",children:h})})});function On(e,t){return Object.freeze({...e,...t})}const Nn=e.createContext(null),Ln=Nn.Provider;function Gn(){const t=e.useContext(Nn);if(null==t)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return t}function Vn(t){function n(n,r){const{instance:o,context:i}=t(n).current;return e.useImperativeHandle(r,()=>o),null==n.children?null:e.createElement(Ln,{value:i},n.children)}return e.forwardRef(n)}function Yn(t,n){const r=e.useRef();e.useEffect(function(){return null!=n&&t.instance.on(n),r.current=n,function(){null!=r.current&&t.instance.off(r.current),r.current=null}},[t,n])}function Qn(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Un(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function Kn(t,n){return null==n?function(n,r){const o=e.useRef();return o.current||(o.current=t(n,r)),o}:function(r,o){const i=e.useRef();i.current||(i.current=t(r,o));const a=e.useRef(r),{instance:s}=i.current;return e.useEffect(function(){a.current!==r&&(n(s,r,a.current),a.current=r)},[s,r,o]),i}}function Wn(t,n){e.useEffect(function(){return(n.layerContainer??n.map).addLayer(t.instance),function(){n.layerContainer?.removeLayer(t.instance),n.map.removeLayer(t.instance)}},[n,t])}function _n(t){return function(n){const r=Gn(),o=t(Qn(n,r),r);return function(t,n){const r=e.useRef(n);e.useEffect(function(){n!==r.current&&null!=t.attributionControl&&(null!=r.current&&t.attributionControl.removeAttribution(r.current),null!=n&&t.attributionControl.addAttribution(n)),r.current=n},[t,n])}(r.map,n.attribution),Yn(o.current,n.eventHandlers),Wn(o.current,r),o}}function Jn(t){return function(n){const r=Gn(),o=t(Qn(n,r),r);return Yn(o.current,n.eventHandlers),Wn(o.current,r),function(t,n){const r=e.useRef();e.useEffect(function(){if(n.pathOptions!==r.current){const e=n.pathOptions??{};t.instance.setStyle(e),r.current=e}},[t,n])}(o.current,n),o}}function Zn(e,t){return Vn(Jn(Kn(e,t)))}function zn(){return Gn().map}const Hn=Zn(function({children:e,...t},r){const o=new n.FeatureGroup([],t);return Un(o,On(r,{layerContainer:o,overlayContainer:o}))});function Xn(){return Xn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xn.apply(this,arguments)}function $n({bounds:t,boundsOptions:r,center:o,children:i,className:a,id:s,placeholder:c,style:l,whenReady:u,zoom:d,...p},f){const[h]=e.useState({className:a,id:s,style:l}),[g,m]=e.useState(null);e.useImperativeHandle(f,()=>g?.map??null,[g]);const v=e.useCallback(e=>{if(null!==e&&null===g){const i=new n.Map(e,p);null!=o&&null!=d?i.setView(o,d):null!=t&&i.fitBounds(t,r),null!=u&&i.whenReady(u),m(function(e){return Object.freeze({__version:1,map:e})}(i))}},[]);e.useEffect(()=>()=>{g?.map.remove()},[g]);const w=g?e.createElement(Ln,{value:g},i):c??null;return e.createElement("div",Xn({},h,{ref:v}),w)}const er=e.forwardRef($n),tr=Vn(_n(Kn(function({position:e,...t},r){const o=new n.Marker(e,t);return Un(o,On(r,{overlayContainer:o}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),null!=t.icon&&t.icon!==n.icon&&e.setIcon(t.icon),null!=t.zIndexOffset&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),null!=t.opacity&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),null!=e.dragging&&t.draggable!==n.draggable&&(!0===t.draggable?e.dragging.enable():e.dragging.disable())})));const nr=Zn(function({positions:e,...t},r){const o=new n.Polygon(e,t);return Un(o,On(r,{overlayContainer:o}))},function(e,t,n){t.positions!==n.positions&&e.setLatLngs(t.positions)}),rr=function(t,n){return function(t){function n(n,r){const{instance:o}=t(n).current;return e.useImperativeHandle(r,()=>o),null}return e.forwardRef(n)}(_n(Kn(t,n)))}(function({url:e,...t},r){return Un(new n.TileLayer(e,Qn(t,r)),r)},function(e,t,n){!function(e,t,n){const{opacity:r,zIndex:o}=t;null!=r&&r!==n.opacity&&e.setOpacity(r),null!=o&&o!==n.zIndex&&e.setZIndex(o)}(e,t,n);const{url:r}=t;null!=r&&r!==n.url&&e.setUrl(r)});var or,ir=e.createContext({locations:[],setLocations:function(){}});void 0===(or=window.leafletActiveAreaPreviousMethods)&&(or={getCenter:L.Map.prototype.getCenter,setView:L.Map.prototype.setView,flyTo:L.Map.prototype.flyTo,setZoomAround:L.Map.prototype.setZoomAround,getBoundsZoom:L.Map.prototype.getBoundsZoom,PopupAdjustPan:L.Popup.prototype._adjustPan,RendererUpdate:L.Renderer.prototype._update}),L.Map.include({getBounds:function(){if(this._viewport)return this.getViewportLatLngBounds();var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new L.LatLngBounds(t,n)},getViewport:function(){return this._viewport},getViewportBounds:function(){var e=this._viewport,t=L.point(e.offsetLeft,e.offsetTop),n=L.point(e.clientWidth,e.clientHeight);return 0!==n.x&&0!==n.y||(e=this.getContainer())&&(t=L.point(0,0),n=L.point(e.clientWidth,e.clientHeight)),L.bounds(t,t.add(n))},getViewportLatLngBounds:function(){var e=this.getViewportBounds();return L.latLngBounds(this.containerPointToLatLng(e.min),this.containerPointToLatLng(e.max))},getOffset:function(){var e=this.getSize().divideBy(2),t=this.getViewportBounds().getCenter();return e.subtract(t)},getCenter:function(e){var t=or.getCenter.call(this);if(this.getViewport()&&!e){var n=this.getZoom(),r=this.project(t,n);r=r.subtract(this.getOffset()),t=this.unproject(r,n)}return t},setView:function(e,t,n){if(e=L.latLng(e),t=void 0===t?this._zoom:this._limitZoom(t),this.getViewport()){var r=this.project(e,this._limitZoom(t));r=r.add(this.getOffset()),e=this.unproject(r,this._limitZoom(t))}return or.setView.call(this,e,t,n)},flyTo:function(e,t,n){if(e=L.latLng(e),t=void 0===t?s:t,this.getViewport()){var r=this.project(e,this._limitZoom(t));r=r.add(this.getOffset()),e=this.unproject(r,this._limitZoom(t))}if(!1===(n=n||{}).animate||!L.Browser.any3d)return this.setView(e,t,n);this._stop();var o=this.project(or.getCenter.call(this)),i=this.project(e),a=this.getSize(),s=this._zoom,c=Math.max(a.x,a.y),l=c*this.getZoomScale(s,t),u=i.distanceTo(o)||1,d=1.42,p=2.0164;function f(e){var t=(l*l-c*c+(e?-1:1)*p*p*u*u)/(2*(e?l:c)*p*u),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function h(e){return(Math.exp(e)-Math.exp(-e))/2}function g(e){return(Math.exp(e)+Math.exp(-e))/2}var m=f(0);function v(e){return c*(g(m)*(h(t=m+d*e)/g(t))-h(m))/p;var t}var w=Date.now(),y=(f(1)-m)/d,C=n.duration?1e3*n.duration:1e3*y*.8;return this._moveStart(!0,n.noMoveStart),function n(){var r=(Date.now()-w)/C,a=function(e){return 1-Math.pow(1-e,1.5)}(r)*y;r<=1?(this._flyToFrame=L.Util.requestAnimFrame(n,this),this._move(this.unproject(o.add(i.subtract(o).multiplyBy(v(a)/u)),s),this.getScaleZoom(c/function(e){return c*(g(m)/g(m+d*e))}(a),s),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}.call(this),this},setZoomAround:function(e,t,n){if(this.getViewport()){var r=this.getZoomScale(t),o=this.getViewportBounds().getCenter(),i=(e instanceof L.Point?e:this.latLngToContainerPoint(e)).subtract(o).multiplyBy(1-1/r),a=this.containerPointToLatLng(o.add(i));return this.setView(a,t,{zoom:n})}return or.setZoomAround.call(this,e,t,n)},getBoundsZoom:function(e,t,n){e=L.latLngBounds(e),n=L.point(n||[0,0]);var r=this.getZoom()||0,o=this.getMinZoom(),i=this.getMaxZoom(),a=e.getNorthWest(),s=e.getSouthEast(),c=this.getViewport(),l=(c?L.point(c.clientWidth,c.clientHeight):this.getSize()).subtract(n),u=this.project(s,r).subtract(this.project(a,r)),d=L.Browser.any3d?this.options.zoomSnap:1,p=l.x/u.x,f=l.y/u.y,h=t?Math.max(p,f):Math.min(p,f);return r=this.getScaleZoom(h,r),d&&(r=Math.round(r/(d/100))*(d/100),r=t?Math.ceil(r/d)*d:Math.floor(r/d)*d),Math.max(o,Math.min(i,r))},setActiveArea:function(e,t,n){var r;if(t&&this._zoom&&(r=this.getCenter()),!this._viewport){var o=this.getContainer();this._viewport=L.DomUtil.create("div",""),o.insertBefore(this._viewport,o.firstChild)}return"string"==typeof e?this._viewport.className=e:L.extend(this._viewport.style,e),r&&this.setView(r,this.getZoom(),{animate:!!n}),this}}),L.Renderer.include({_onZoom:function(){this._updateTransform(this._map.getCenter(!0),this._map.getZoom())},_update:function(){or.RendererUpdate.call(this),this._center=this._map.getCenter(!0)}}),L.GridLayer.include({_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(L.DomUtil.remove(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[e],o=this._map;return r||((r=this._levels[e]={}).el=L.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=t,r.origin=o.project(o.unproject(o.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,o.getCenter(!0),o.getZoom()),L.Util.falseFn(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(!0),this._map.getZoom(),t,t)},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter(!0)),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(e),o=this._pxBoundsToTileRange(r),i=o.getCenter(),a=[],s=this.options.keepBuffer,c=new L.Bounds(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var u=this._tiles[l].coords;u.z===this._tileZoom&&c.contains(new L.Point(u.x,u.y))||(this._tiles[l].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var d=o.min.y;d<=o.max.y;d++)for(var p=o.min.x;p<=o.max.x;p++){var f=new L.Point(p,d);if(f.z=this._tileZoom,this._isValidTile(f)){var h=this._tiles[this._tileCoordsToKey(f)];h?h.current=!0:a.push(f)}}if(a.sort(function(e,t){return e.distanceTo(i)-t.distanceTo(i)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var g=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],g);this._level.el.appendChild(g)}}}}}}),L.Popup.include({_adjustPan:function(){if(this._map._viewport){if(!this.options.autoPan)return;this._map._panAnim&&this._map._panAnim.stop();var e=this._map,t=e._viewport,n=this._container.offsetHeight,r=this._containerWidth,o=L.point(t.offsetLeft,t.offsetTop),i=new L.Point(this._containerLeft-o.x,-n-this._containerBottom-o.y);i._add(L.DomUtil.getPosition(this._container));var a=e.layerPointToContainerPoint(i),s=L.point(this.options.autoPanPadding),c=L.point(this.options.autoPanPaddingTopLeft||s),l=L.point(this.options.autoPanPaddingBottomRight||s),u=L.point(t.clientWidth,t.clientHeight),d=0,p=0;a.x+r+l.x>u.x&&(d=a.x+r-u.x+l.x),a.x-d-c.x<0&&(d=a.x-c.x),a.y+n+l.y>u.y&&(p=a.y+n-u.y+l.y),a.y-p-c.y<0&&(p=a.y-c.y),(d||p)&&e.fire("autopanstart").panBy([d,p])}else or.PopupAdjustPan.call(this)}});var ar,sr=function(t){var r=zn();e.useEffect(function(){r.setActiveArea("cortex-widget-viewport",!0,!0),n.Control.CenterActiveArea=n.Control.extend({onAdd:function(){var e=null;e=r.zoomControl&&!this.options.forceSeparateButton?r.zoomControl._container:n.DomUtil.create("div","leaflet-bar"),n.DomEvent.disableClickPropagation(e);var t=n.DomUtil.create("a","",e);return t.href="#",t.title="Centrer",t.innerHTML='\n <img src="'.concat(cr,'" width="15px" style="margin-top: 7px; filter: brightness(0%)" />\n '),t.setAttribute("role","button"),t.setAttribute("aria-label",t.title),n.DomEvent.on(t,"click",n.DomEvent.stop).on(t,"click",s),e}}),n.control.centerActiveArea=function(e){return new n.Control.CenterActiveArea(e)},n.control.centerActiveArea({position:"topleft"}).addTo(r),t.autoCenter&&a()},[]),e.useEffect(function(){t.autoCenter&&a()},[t.autoCenter]);var o=e.useCallback(function(){var e=n.featureGroup();return r.eachLayer(function(t){t instanceof n.Marker&&e.addLayer(t)}),e},[r]),i=e.useCallback(function(){var e=n.featureGroup();return r.eachLayer(function(t){t instanceof n.Polygon&&e.addLayer(t)}),e},[r]),a=e.useCallback(function(){var e=o().getBounds();i().eachLayer(function(t){e.extend(t.getBounds())}),e.isValid()&&r.fitBounds(e,{animate:!0})},[]),s=e.useCallback(function(){a()},[r]);return T.jsx(T.Fragment,{})},cr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAAB3RJTUUH4wMIFTgXULHJFAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAhUlEQVRo3u3asQ2AIBAF0MO4p42FI1nYOKlugAUnJvL+BLzwcxGw7Md5RUO2dSmRkNZ1TPGTgICADAIptbGXNVqzUluraoGADAKZv/rIy56UqvVFartVVEu1QEBAQEBAQEBAQEAaz+xuGlXrpWr1PlvbERAQEJCIhzfEnqPYLxwgICBjQW7ewSYPr/zk7gAAAABJRU5ErkJggg==",lr={exports:{}};var ur,dr,pr,fr=(ar||(ar=1,ur=lr,function(e,t){ur.exports?ur.exports=t(n):t(e.L)}("undefined"!=typeof self?self:lr.exports,e=>{if("undefined"==typeof document)return console.warn('"window.document" is undefined; leaflet.fullscreen requires this object to access the DOM'),!1;const t=(()=>{const e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"]],t=e[0],n={};for(const r of e)if(r[1]in document){for(let e=0;e<r.length;e++)n[t[e]]=r[e];return n}return!1})(),n={change:t.fullscreenchange,error:t.fullscreenerror},r={request(e,n){return new Promise((r,o)=>{const i=function(){this.off("change",i),r()}.bind(this);this.on("change",i);const a=(e=e||document.documentElement)[t.requestFullscreen](n);a instanceof Promise&&a.then(i).catch(o)})},exit(){return new Promise((e,n)=>{if(!this.isFullscreen)return void e();const r=function(){this.off("change",r),e()}.bind(this);this.on("change",r);const o=document[t.exitFullscreen]();o instanceof Promise&&o.then(r).catch(n)})},on(e,t){const r=n[e];r&&document.addEventListener(r,t,!1)},off(e,t){const r=n[e];r&&document.removeEventListener(r,t,!1)},nativeAPI:t};return Object.defineProperties(r,{isFullscreen:{get:()=>Boolean(document[t.fullscreenElement])},isEnabled:{enumerable:!0,get:()=>Boolean(document[t.fullscreenEnabled])}}),e.Control.FullScreen=e.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},_screenfull:r,onAdd(t){let n,r="leaflet-control-zoom-fullscreen",o="";return n=t.zoomControl&&!this.options.forceSeparateButton?t.zoomControl._container:e.DomUtil.create("div","leaflet-bar"),this.options.content?o=this.options.content:r+=" fullscreen-icon",this._createButton(this.options.title,r,o,n,this.toggleFullScreen,this),this._map.fullscreenControl=this,this._map.on("enterFullscreen exitFullscreen",this._toggleState,this),n},onRemove(){e.DomEvent.off(this.link,"click",e.DomEvent.stop).off(this.link,"click",this.toggleFullScreen,this),this._screenfull.isEnabled&&(e.DomEvent.off(this._container,this._screenfull.nativeAPI.fullscreenchange,e.DomEvent.stop).off(this._container,this._screenfull.nativeAPI.fullscreenchange,this._handleFullscreenChange,this),e.DomEvent.off(document,this._screenfull.nativeAPI.fullscreenchange,e.DomEvent.stop).off(document,this._screenfull.nativeAPI.fullscreenchange,this._handleFullscreenChange,this))},_createButton(t,n,r,o,i,a){return this.link=e.DomUtil.create("a",n,o),this.link.href="#",this.link.title=t,this.link.innerHTML=r,this.link.setAttribute("role","button"),this.link.setAttribute("aria-label",t),L.DomEvent.disableClickPropagation(o),e.DomEvent.on(this.link,"click",e.DomEvent.stop).on(this.link,"click",i,a),this._screenfull.isEnabled&&(e.DomEvent.on(o,this._screenfull.nativeAPI.fullscreenchange,e.DomEvent.stop).on(o,this._screenfull.nativeAPI.fullscreenchange,this._handleFullscreenChange,a),e.DomEvent.on(document,this._screenfull.nativeAPI.fullscreenchange,e.DomEvent.stop).on(document,this._screenfull.nativeAPI.fullscreenchange,this._handleFullscreenChange,a)),this.link},toggleFullScreen(){const t=this._map;t._exitFired=!1,t._isFullscreen?(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.exit().then(()=>t.invalidateSize()):(e.DomUtil.removeClass(this.options.fullscreenElement?this.options.fullscreenElement:t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize()),t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1):(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.request(this.options.fullscreenElement?this.options.fullscreenElement:t._container).then(()=>t.invalidateSize()):(e.DomUtil.addClass(this.options.fullscreenElement?this.options.fullscreenElement:t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize()),t.fire("enterFullscreen"),t._isFullscreen=!0)},_toggleState(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel,this._map._isFullscreen?L.DomUtil.removeClass(this.link,"leaflet-fullscreen-on"):L.DomUtil.addClass(this.link,"leaflet-fullscreen-on")},_handleFullscreenChange(e){const t=this._map;e.target!==t.getContainer()||this._screenfull.isFullscreen||t._exitFired||(this._screenfull.exit().then(()=>t.invalidateSize()),t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1)}}),e.Map.include({toggleFullscreen(){this.fullscreenControl.toggleFullScreen()}}),e.Map.addInitHook(function(){this.options.fullscreenControl&&this.addControl(e.control.fullscreen(this.options.fullscreenControlOptions))}),e.control.fullscreen=function(t){return new e.Control.FullScreen(t)},{leaflet:e}})),lr.exports),hr=h(fr),gr=function(t){var n=zn();return e.useEffect(function(){hr.leaflet.control.fullscreen(l({position:"topleft"},t||{})).addTo(n)},[]),T.jsx(T.Fragment,{})};var mr=h(pr?dr:(pr=1,dr=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}));function vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach(function(t){yr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cr={onEdited:"draw:edited",onDrawStart:"draw:drawstart",onDrawStop:"draw:drawstop",onDrawVertex:"draw:drawvertex",onEditStart:"draw:editstart",onEditMove:"draw:editmove",onEditResize:"draw:editresize",onEditVertex:"draw:editvertex",onEditStop:"draw:editstop",onDeleted:"draw:deleted",onDeleteStart:"draw:deletestart",onDeleteStop:"draw:deletestop"};function Ar(t){var r=Gn(),o=e.useRef(),i=e.useRef(t),a=function(e){var n=t.onCreated;(r.layerContainer||r.map).addLayer(e.layer),n&&n(e)};return e.useEffect(function(){var e=r.map,i=t.onMounted;for(var s in Cr)e.on(Cr[s],function(e){var n=Object.keys(Cr).filter(function(t){return Cr[t]===e.type});if(1===n.length){var r=n[0];t[r]&&t[r](e)}});return e.on(n.Draw.Event.CREATED,a),o.current=Tr(t,r),e.addControl(o.current),i&&i(o.current),function(){for(var r in e.off(n.Draw.Event.CREATED,a),Cr)t[r]&&e.off(Cr[r],t[r]);o.current.remove(e)}},[t.onCreated,t.onDeleted,t.onEdited]),e.useEffect(function(){if(!mr(t.draw,i.current.draw)||!mr(t.edit,i.current.edit)||t.position!==i.current.position){var e=r.map;o.current.remove(e),o.current=Tr(t,r),o.current.addTo(e);var n=t.onMounted;return n&&n(o.current),function(){o.current.remove(e)}}},[t.draw,t.edit,t.position,t.onCreated,t.onDeleted,t.onEdited]),null}function Tr(e,t){var r=t.layerContainer,o=e.draw,i=e.edit,a=e.position,s={edit:wr(wr({},i),{},{featureGroup:r})};return o&&(s.draw=wr({},o)),a&&(s.position=a),new n.Control.Draw(s)}Ar.propTypes=wr(wr({},Object.keys(Cr).reduce(function(e,t){return e[t]=i.PropTypes.func,e},{})),{},{onCreated:i.PropTypes.func,onMounted:i.PropTypes.func,draw:i.PropTypes.shape({polyline:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.bool]),polygon:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.bool]),rectangle:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.bool]),circle:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.bool]),marker:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.bool])}),edit:i.PropTypes.shape({edit:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.bool]),remove:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.bool]),poly:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.bool]),allowIntersection:i.PropTypes.bool}),position:i.PropTypes.oneOf(["topright","topleft","bottomright","bottomleft"]),leaflet:i.PropTypes.shape({map:i.PropTypes.instanceOf(n.Map),layerContainer:i.PropTypes.shape({addLayer:i.PropTypes.func.isRequired,removeLayer:i.PropTypes.func.isRequired})})});var Er=function(e){var t,n,r={edit:!!(null==e?void 0:e.editable)&&{}};return T.jsx(Ar,{onCreated:e.handleOnCreated,onDeleted:e.handleOnDeleted,onEdited:e.handleOnEdited,position:null!==(t=e.position)&&void 0!==t?t:"topright",draw:null!==(n=e.draw)&&void 0!==n?n:{rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},edit:r})},br=function(t){var i,a={polygon:!0,marker:!0,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},s=e.useState(a);s[0];var c=s[1],u=e.useState("standard"),d=u[0],p=u[1],h=e.useContext(ir),g=h.locations,m=h.setLocations;e.useEffect(function(){var e;null===(e=null==t?void 0:t.onChange)||void 0===e||e.call(t,g)},[g]),e.useEffect(function(){n.Icon.Default.mergeOptions({iconRetinaUrl:r,shadowUrl:o,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}),g&&g.length>0&&c(function(e){var t=l({},e);return Object.keys(t).forEach(function(e){t[e]=!1}),t})},[]);var v=function(e){var t,n,r,o=e.layerType,i=e.layer;c(function(e){var t=l({},e);return Object.keys(t).forEach(function(e){t[e]=!1}),t});var a=[];"polygon"!==o&&"rectangle"!==o||(a=null===(n=null===(t=i._latlngs)||void 0===t?void 0:t[0])||void 0===n?void 0:n.map(function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})),"marker"!==o&&"circle"!==o&&"circlemarker"!==o||a.push({order:1,latitude:i._latlng.lat,longitude:i._latlng.lng,id:i._leaflet_id}),"polyline"===o&&(a=null===(r=i._latlngs)||void 0===r?void 0:r.map(function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})),m(function(e){return f(f([],e,!0),[{points:a,id:i._leaflet_id}],!1)})},w=function(e){var t=e.layers;m(function(e){var n=Object.values(t.getLayers());return e.filter(function(e){return(null==e?void 0:e.points)&&1===e.points.length}).map(function(e){var t=n.find(function(t){return t._leaflet_id===e.points[0].id});if(t){var r=l({},e.points[0]),o=t.getLatLng();return Math.abs(r.latitude-o.lat)>1e-6||Math.abs(r.longitude-o.lng)>1e-6?{points:[{id:e.id,latitude:n[0]._latlng.lat,longitude:n[0]._latlng.lng,order:e.points[0].order}],id:e.id,objId:e.objId}:e}return e})})},y=e.useMemo(function(){var e,n;if((null==t?void 0:t.singlePosition)&&g.length>(null!==(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.length)&&void 0!==n?n:0)){var r={draw:{marker:!1,polygon:!1,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1}};return"boolean"!=typeof(null==t?void 0:t.drawTools)&&(r=l(l({},null==t?void 0:t.drawTools),r)),r}return"boolean"!=typeof(null==t?void 0:t.drawTools)?null==t?void 0:t.drawTools:!0===(null==t?void 0:t.drawTools)?{draw:{marker:!0,polygon:!0,rectangle:!0,circle:!0,circlemarker:!0,polyline:!0}}:void 0},[null==t?void 0:t.singlePosition,null==t?void 0:t.drawTools,g,null==t?void 0:t.data]);return T.jsxs(T.Fragment,{children:[T.jsx("style",{children:".leaflet-container { min-height: 80px; min-width: 80px; height: 100%; width: 100% }"}),T.jsxs(er,l({center:t.center||[0,0],zoom:t.zoom||13,maxZoom:t.maxZoom,minZoom:t.minZoom},t.MapContainerProps,{children:[T.jsx(rr,{attribution:"standard"===d?'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors':'&copy; <a href="https://www.google.com/maps">Google Maps</a>',url:"standard"===d?"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png":"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}"},d),t.toggleSatelliteView&&T.jsx("div",{style:{position:"absolute",bottom:"10px",left:"10px",zIndex:1e3,background:"white",padding:"7px 10px",borderRadius:"5px"},children:T.jsxs("label",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:[T.jsx("input",{type:"checkbox",checked:"satellite"===d,onChange:function(){return p("standard"===d?"satellite":"standard")}}),"Satellite View"]})}),t.fullscreen&&T.jsx(gr,l({},"boolean"==typeof t.fullscreen?{}:t.fullscreen)),T.jsxs(Hn,{children:[t.drawTools&&g.length>0&&T.jsx(Er,l({},y,{handleOnCreated:v,handleOnEdited:w})),0===g.length&&T.jsx(Er,l({},y,{handleOnCreated:v,handleOnDeleted:function(e){0!==Object.keys(e.layers._layers).length&&(c(function(e){return l(l({},a),{workaround:Math.random()})}),m(g))},handleOnEdited:w})),(null==t?void 0:t.data)&&(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.map(function(e){return e.points.length>1?T.jsx(nr,{positions:e.points.map(function(e){return[e.latitude,e.longitude]})},"marker-".concat(e.objId)):T.jsx(tr,{position:[e.points[0].latitude,e.points[0].longitude]},"marker-".concat(e.id))}))]}),t.centerActiveArea&&T.jsx(sr,l({autoCenter:g&&g.length>0},"boolean"==typeof t.centerActiveArea?{}:t.centerActiveArea))]}))]})},xr=function(t){var n=t.containerRef;t.className;var r=t.children,o=t.onClick;t.onClose;var i=e.useRef(null);return e.useEffect(function(){if(i&&n&&i.current&&n.current){var e=n.current.getBoundingClientRect(),t=i.current.getBoundingClientRect(),r=e.width,o="0px",a="unset";e.right+t.width>=window.innerWidth&&(r=-t.width),t.bottom>=window.innerHeight&&(a="".concat(-(window.innerHeight-e.bottom-15).toFixed(),"px"),o="unset"),i.current.setAttribute("style","opacity: 1; left: ".concat(r.toFixed(),"px; bottom: ").concat(a,"; top: ").concat(o,";"))}},[i,n]),T.jsx("div",{ref:i,className:"ui-menu",children:T.jsx("ul",{className:"ui-menuList",onClick:o,onContextMenu:o,children:r})})};function Br(e){var t=c.useState(),n=t[0],r=t[1];return c.useEffect(function(){r(function(e){var t;if(e){if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:void 0}var r=e;return r&&void 0!==r.current?null!==(t=r.current)&&void 0!==t?t:void 0:e}}(e))},[e]),n}var Rr=function(e){var t=e.className;return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:B("ui-icon",t),transform:"rotate(90 0 0)",preserveAspectRatio:"xMidYMid meet",children:T.jsx("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"})})},Mr=function(e){var t=e.className;return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:B("ui-icon",t),children:T.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"})})},Dr=function(t){var n=t.label,r=t.icon,o=t.className,i=t.style;t.active;var a=t.disable,s=t.children,c=t.itemTemplate,l=t.onClick,u=e.useState(!1),d=u[0],p=u[1],f=e.useRef(null),h=e.useCallback(function(e){l&&!0!==a&&l(e)},[l,a]),g=null!=s;return T.jsxs("li",{className:B("ui-menuItem",!0===a?"ui-menuItem-disable":null,o),style:i,onMouseEnter:function(){p(!0)},onMouseLeave:function(){p(!1)},ref:f,children:[T.jsxs("button",{type:"button",className:"ui-menuItem-btn",onClick:h,children:[r&&T.jsx("div",{className:"ui-menuItem-icon",children:r}),T.jsx("span",{children:null!=c?c:n}),g&&T.jsx("div",{className:"ui-menuItem-menuIconContainer",children:T.jsx(Rr,{className:"ui-menuItem-menuIcon"})})]}),g&&d&&T.jsx(xr,{containerRef:f,children:s})]})},kr=function(t){t.open;var n=t.width,r=t.fullWidth,o=t.fullHeight,i=t.className,a=t.children,s=t.onClose,c=e.useRef(),l=e.useRef(null),u=e.useRef(null);e.useEffect(function(){return c.current=document.body.style.overflow,document.body.style.overflow="hidden",function(){var e;document.body.style.overflow=null!==(e=c.current)&&void 0!==e?e:"initial"}},[]);var d=e.useCallback(function(){s&&s()},[s]);return T.jsx(b,{ref:l,children:T.jsxs("div",{ref:function(e){u.current=e},style:{position:"fixed",margin:"0"},role:"dialog",className:B("ui-dialog",i),children:[T.jsx("div",{role:"presentation",className:"ui-dialog-overlay",onClick:d}),T.jsx("div",{className:B("ui-dialog-container",n?"ui-dialog-size-".concat(n):null,!0===r?"ui-dialog-size-fullwidth":null,!0===o?"ui-dialog-size-fullheight":null),children:a})]})})},Ir=function(e){var t=e.className,n=e.children;return T.jsx("div",{className:B("ui-dialog-content",t),children:n})},Sr=function(e){var t=e.className,n=e.children;return T.jsx("footer",{className:B("ui-dialog-footer",t),children:n})},Fr=function(e){var t=e.className,n=e.children;return T.jsx("header",{className:B("ui-dialog-header",t),children:n})};exports.AuthDownloadLink=function(e){var t=e.url,n=e.queryParams,r=e.token,o=e.label,i=e.onStart,a=e.onCompleted,s=e.onError,c=function(e){var t=e.get("Content-Disposition");if(!t)return null;var n=t.split(";"),r="filename=",o=n.find(function(e){return e.indexOf(r)>-1});if(o){var i=o.search(r);if(i<0)return null;var a=o.substring(i+9).trim();if(0===a.length)return null;var s=a.substring(0,1);return'"'!==s&&"'"!==s?a:a.length<2||a[a.length-1]!==s?null:a.substring(1,a.length-1)}return null};return T.jsx(T.Fragment,{children:T.jsx(Dr,{label:o,onClick:function(e){return d(void 0,void 0,void 0,function(){var o,l,u,d,f,h,g,m;return p(this,function(p){switch(p.label){case 0:i&&i(e),p.label=1;case 1:if(p.trys.push([1,4,,5]),!r)throw new Error("INVALID_TOKEN");if(!t)throw new Error("INVALID_URL");return(o={}).ContentType="application/json",o.Authorization="Bearer ".concat(r),l={method:"get",headers:o},u=new URL(t),n&&Object.keys(n).forEach(function(e){return u.searchParams.append(e,n[e])}),[4,fetch(u,l)];case 2:if(!(d=p.sent())||200!==d.status)throw new Error("An error occured while generating file");return[4,d.blob()];case 3:return(f=p.sent())&&(h=window.URL.createObjectURL(f),(g=document.createElement("a")).href=h,g.download=c(d.headers)||"file",g.click(),URL.revokeObjectURL(h),g.remove()),[3,5];case 4:throw m=p.sent(),s&&s(m),m;case 5:return a&&a(),[2]}})})}})})},exports.BarLoader=function(e){var t=e.title,n=e.color,r=e.className,o=e.isComplete;return T.jsxs(T.Fragment,{children:[T.jsx("div",{className:B("loader",null!=n?"loader-color-".concat(n):"loader-color-blue",!0===o?"completed":"",r),children:T.jsx("div",{className:B("loaderBar",null!=n?"loaderBar-color-".concat(n):"loaderBar-color-blue")})}),T.jsx("div",{className:B("loaderBar-title"),children:T.jsx("span",{children:t})})]})},exports.Button=k,exports.Camera=function(t){var n=t.onCapture,r=t.isOffline,o=void 0!==r&&r,i=t.mode,a=void 0===i?"photo":i,s=t.validateText,c=void 0===s?"Valider":s,f=t.resetText,h=void 0===f?"Annuler":f,g=t.isShowOffline,m=void 0!==g&&g,v=t.isShowVideoButton,w=void 0!==v&&v,y=t.isShowSwitchButton,C=void 0!==y&&y,A=u(t,["onCapture","isOffline","mode","validateText","resetText","isShowOffline","isShowVideoButton","isShowSwitchButton"]),E=e.useRef(null),b=e.useRef(null),x=e.useRef(new Mn),B=e.useState(a),R=B[0],M=B[1],D=e.useState(!1),I=D[0],S=D[1],F=e.useState(!1),P=F[0],j=F[1],q=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0||"ontouchstart"in document.documentElement,O=xn,N=An,L=Bn,G=bn,V=En,Y=Tn,Q=function(){var t=e.useRef(null),n=e.useState(0),r=n[0],o=n[1],i=function(e){var t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60;return"".concat(t>0?t.toString().padStart(2,"0").concat(":"):"").concat(n>0?n.toString().padStart(2,"0").concat(":"):"").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))},a=e.useMemo(function(){return i(r)},[r]),s=e.useCallback(function(){o(0),t.current=setInterval(function(){o(function(e){return e+1})},1e3)},[]),c=e.useCallback(function(){t.current&&(clearInterval(t.current),t.current=null)},[]);return{formatTime:i,startTimer:s,stopTimer:c,formatedTime:a}}(),U=Q.formatedTime,K=Q.startTimer,W=Q.stopTimer,_=e.useState({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null}),J=_[0],Z=_[1],z=e.useState({facingMode:"environment",width:{min:200},height:{min:300}});z[0];var H=z[1];e.useEffect(function(){return H({facingMode:q?"environment":"user",width:{min:200},height:{min:300}}),function(){ee(),W(),te()}},[]),e.useEffect(function(){"video"===R&&S(!1)},[J]);var X=e.useCallback(function(){return d(void 0,void 0,void 0,function(){var e,t,n,r,o,i,a,s,c,u;return p(this,function(d){if(e=null===(u=E.current)||void 0===u?void 0:u.getScreenshot()){for(t=atob(e.split(",")[1]),n=new Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);o=new Uint8Array(n),i=new Blob([o],{type:"image/jpeg"}),a="captured_image_".concat(Date.now().toString().slice(-7),".jpg"),s=new File([i],a,{type:"image/jpeg"}),c=URL.createObjectURL(s),Z(function(e){return l(l({},e),{imageUrl:c,file:s})})}return[2]})})},[E,o,n]),$=e.useCallback(function(){if(E.current&&E.current.stream){var e="webm",t="video/".concat(e);MediaRecorder.isTypeSupported("video/mp4")&&(e="mp4",t="video/mp4");var n=new MediaRecorder(E.current.stream,{mimeType:t}),r=[];n.ondataavailable=function(e){e.data.size>0&&r.push(e.data)},n.onstop=function(){return d(void 0,void 0,void 0,function(){var n,o,i,a;return p(this,function(s){return n=new Blob(r,{type:t}),o="captured_video_".concat(Date.now(),".").concat(e),i=new File([n],o,{type:t}),a=URL.createObjectURL(i),Z(function(e){return l(l({},e),{videoUrl:a,isRecording:!1,file:i})}),W(),[2]})})},n.start(),b.current=n,K(),Z(function(e){return l(l({},e),{isRecording:!0})})}},[E,o,K,W,n]),ee=function(){Z({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null})};return T.jsx("div",{className:"camera-container",children:J.imageUrl||J.videoUrl?T.jsxs("div",{className:"camera-preview camera-screen-animation",children:[J.imageUrl&&T.jsx("img",{src:J.imageUrl,alt:"Capturé",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"}}),J.videoUrl&&T.jsxs("video",{width:"100%",height:"90%",id:"video",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"},onEnded:function(){return S(!1)},children:[T.jsx("source",{src:J.videoUrl,type:"video/mp4"}),T.jsx("source",{src:J.videoUrl,type:"video/webm"}),T.jsx("track",{kind:"captions",src:"",lang:"en",label:"English",default:!0}),"Your browser does not support the video."]}),J.videoUrl&&T.jsx(k,{variant:"contained",className:"video-play-btn",onClick:function(){var e=document.getElementById("video");try{e.paused?e.play():e.pause(),S(!I)}catch(e){}},children:I?T.jsx(Y,{}):T.jsx(V,{})}),T.jsxs("div",{className:"camera-controls",children:[T.jsx(k,{variant:"contained",onClick:function(){return d(void 0,void 0,void 0,function(){var e;return p(this,function(t){switch(t.label){case 0:return o?[4,x.current.storeFile(J.file)]:[3,2];case 1:e=t.sent(),n({fileRowId:e,fileStoreName:"capturedFiles"}),t.label=2;case 2:return o||"photo"!==R||n({file:J.file,imageSrc:J.imageUrl}),o||"video"!==R||n({file:J.file,videoSrc:J.videoUrl}),ee(),[2]}})})},className:"camera-button camera-button--download",children:c}),T.jsx(k,{variant:"outlined",onClick:ee,className:"camera-button camera-button--reset",children:h})]})]}):T.jsxs("div",{className:"camera-preview",children:[J.isRecording&&T.jsxs("div",{className:"camera-recording-timer",style:{display:"video"===R?"flex":"none"},children:[T.jsx("span",{className:"camera-recording-dot"}),T.jsx("span",{children:U})]}),!J.isRecording&&w&&T.jsx("button",{type:"button",onClick:function(){return M("photo"===R?"video":"photo"),void ee()},className:"camera-button camera-mode",children:T.jsx("span",{children:"photo"===R?"Video":"Photo"})}),q&&!J.isRecording&&C&&T.jsx("button",{type:"button",onClick:function(){j(!P),H({facingMode:P?"environment":"user",width:{min:200},height:{min:300}})},className:"camera-button camera-switch",children:T.jsx(O,{size:18})}),o&&m&&T.jsx("div",{className:"camera-offline-mode",children:"Offline mode"}),T.jsx(ln,l({ref:E,videoConstraints:{facingMode:"environment",width:{min:200},height:{min:300}}},A,{style:{height:"90% !important",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center",margin:"0 auto"},screenshotFormat:"image/jpeg",allowFullScreen:!0})),T.jsxs("div",{className:"camera-controls",children:["photo"===R&&T.jsx(k,{variant:"contained",className:"camera-button camera-button--capture",onClick:X,children:T.jsx(N,{size:28})}),"video"===R&&!J.isRecording&&T.jsx(k,{variant:"contained",onClick:$,className:"camera-button camera-button--record",children:T.jsx(L,{size:30})}),"video"===R&&J.isRecording&&T.jsx(k,{variant:"contained",onClick:te,className:"camera-button camera-button--record",children:T.jsx(G,{size:28})})]})]})});function te(){b.current&&b.current.stop()}},exports.ChevronDownIcon=function(e){var t=e.className;return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:B("ui-icon",t),transform:"rotate(180 0 0)",children:T.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 8.29289C11.6834 7.90237 12.3166 7.90237 12.7071 8.29289L17.7071 13.2929C18.0976 13.6834 18.0976 14.3166 17.7071 14.7071C17.3166 15.0976 16.6834 15.0976 16.2929 14.7071L12 10.4142L7.70711 14.7071C7.31658 15.0976 6.68342 15.0976 6.29289 14.7071C5.90237 14.3166 5.90237 13.6834 6.29289 13.2929L11.2929 8.29289Z"})})},exports.ChevronLeftIcon=function(e){var t=e.className;return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:B("ui-icon",t),transform:"rotate(270 0 0)",preserveAspectRatio:"xMidYMid meet",children:T.jsx("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"})})},exports.ChevronRightIcon=Rr,exports.ConfirmDialog=function(t){var n=t.title,r=t.ok,o=t.cancel,i=t.children,a=t.className,s=t.onClose,c=e.useCallback(function(){s&&s(!1)},[s]),l=e.useCallback(function(){s&&s(!0)},[s]),u=null!=r?r:"oui",d=null!=o?o:"Annuler";return T.jsxs(kr,{open:!0,className:B("ui-dialog-box","ui-dialog-confirm",a),children:[T.jsx(Fr,{children:T.jsxs(T.Fragment,{children:[T.jsxs("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.5 438.5",children:[T.jsx("path",{d:"M409.1,109.2c-19.6-33.6-46.2-60.2-79.8-79.8C295.7,9.8,259.1,0,219.3,0c-39.8,0-76.5,9.8-110.1,29.4\r\n C75.6,49,49,75.6,29.4,109.2C9.8,142.8,0,179.5,0,219.3c0,39.8,9.8,76.5,29.4,110.1c19.6,33.6,46.2,60.2,79.8,79.8\r\n c33.6,19.6,70.3,29.4,110.1,29.4s76.5-9.8,110.1-29.4c33.6-19.6,60.2-46.2,79.8-79.8c19.6-33.6,29.4-70.3,29.4-110.1\r\n C438.5,179.5,428.7,142.8,409.1,109.2z M387.4,290.2c-9.7,22.6-22.7,42-39,58.2c-16.3,16.3-35.7,29.3-58.2,39\r\n c-22.6,9.7-46.2,14.6-70.9,14.6s-48.4-4.9-70.9-14.6c-22.6-9.7-42-22.7-58.2-39c-16.3-16.3-29.3-35.7-39-58.2\r\n c-9.7-22.6-14.6-46.2-14.6-70.9c0-24.7,4.9-48.4,14.6-70.9c9.7-22.6,22.7-42,39-58.2c16.3-16.3,35.7-29.3,58.2-39\r\n c22.6-9.7,46.2-14.6,70.9-14.6c24.7,0,48.4,4.9,70.9,14.6c22.6,9.7,42,22.7,58.2,39c16.3,16.3,29.3,35.7,39,58.2\r\n c9.7,22.6,14.6,46.2,14.6,70.9C402,244,397.1,267.7,387.4,290.2z"}),T.jsx("path",{d:"M217,294c-14.6,0-26.5,12.2-26.5,26.8c0,14.3,11.5,26.8,26.5,26.8s26.8-12.5,26.8-26.8C243.8,306.2,231.6,294,217,294z"}),T.jsx("path",{d:"M221.5,90.8c-47.1,0-68.7,27.9-68.7,46.7c0,13.6,11.5,19.9,20.9,19.9c18.8,0,11.2-26.8,46.7-26.8c17.4,0,31.4,7.7,31.4,23.7\r\n c0,18.8-19.5,29.6-31,39.4c-10.1,8.7-23.4,23-23.4,53c0,18.1,4.9,23.4,19.2,23.4c17.1,0,20.6-7.7,20.6-14.3\r\n c0-18.1,0.4-28.6,19.5-43.6c9.4-7.3,39-31,39-63.8S266.1,90.8,221.5,90.8z"})]}),T.jsx("h1",{className:"ui-dialog-title",children:n})]})}),T.jsx(Ir,{children:i}),T.jsxs(Sr,{children:[T.jsx(k,{className:"dialog-action-ok dialog-action",onClick:l,children:u}),T.jsx(k,{className:"dialog-action-close dialog-action",onClick:c,children:d})]})]})},exports.ContextMenu=function(t){var n=t.className,r=t.children,o=t.placement,i=t.open,a=t.container,s=t.onOpen,c=t.onClose,l=e.useRef(null),u=Br(a),d=e.useState(null),p=d[0],f=d[1];In(function(){i&&c&&c()},[l]);var h=e.useCallback(function(e){var t=e;t.preventDefault(),t.ctrlKey||(f({mouseX:t.pageX-2,mouseY:t.pageY-4}),s&&s())},[s]),g=function(e){e.preventDefault()};e.useEffect(function(){var e=null!=u?u:document;return e.addEventListener("contextmenu",h),e!==document&&document.addEventListener("contextmenu",g),function(){e.removeEventListener("contextmenu",h),document.removeEventListener("contextmenu",g)}},[u,h]);return T.jsx(D,{ref:l,anchorPosition:null!==p?{top:p.mouseY,left:p.mouseX}:void 0,placement:o,open:i,overflow:!1,children:T.jsx(xr,{className:n,onClose:c,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:l,children:r})})},exports.CrossIcon=Mr,exports.Dialog=kr,exports.DialogActions=function(e){var t=e.className,n=e.children;return T.jsx("div",{className:B("ui-dialog-actions",t),children:n})},exports.DialogContent=Ir,exports.DialogFooter=Sr,exports.DialogHeader=Fr,exports.DialogTitle=function(t){var n=t.className,r=t.children,o=t.closeDisable,i=t.onClose,a=e.useCallback(function(){i&&!0!==o&&i()},[i,o]),s=void 0!==i;return T.jsxs("h3",{className:B("ui-dialog-title",n),children:[r,s&&T.jsx("button",{type:"button",className:B("ui-dialog-close",o?"ui-dialog-close-disable":null),tabIndex:0,onClick:a,children:T.jsx(Mr,{})})]})},exports.Divider=function(e){return e.className,T.jsx("hr",{})},exports.DomContainer=b,exports.ErrorDialog=function(t){var n=t.title,r=t.ok,o=t.children,i=t.className,a=t.onClose,s=e.useCallback(function(){a&&a(!0)},[a]),c=null!=r?r:"fermer";return T.jsxs(kr,{open:!0,className:B("ui-dialog-box","ui-dialog-error",i),children:[T.jsx(Fr,{children:T.jsxs(T.Fragment,{children:[T.jsxs("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.533 438.533",children:[T.jsx("path",{d:"M409.133,109.203c-19.608-33.592-46.205-60.189-79.798-79.796C295.736,9.801,259.058,0,219.273,0 c-39.781,0-76.47,9.801-110.063,29.407c-33.595,19.604-60.192,46.201-79.8,79.796C9.801,142.8,0,179.489,0,219.267 c0,39.78,9.804,76.463,29.407,110.062c19.607,33.592,46.204,60.189,79.799,79.798c33.597,19.605,70.283,29.407,110.063,29.407 s76.47-9.802,110.065-29.407c33.593-19.602,60.189-46.206,79.795-79.798c19.603-33.596,29.403-70.284,29.403-110.062 C438.533,179.485,428.732,142.795,409.133,109.203z M387.434,290.213c-9.709,22.556-22.696,41.97-38.969,58.245 c-16.271,16.269-35.689,29.26-58.245,38.965c-22.555,9.712-46.202,14.564-70.946,14.564c-24.744,0-48.391-4.853-70.948-14.564 c-22.554-9.705-41.971-22.696-58.245-38.965c-16.269-16.275-29.259-35.687-38.97-58.245 c-9.707-22.552-14.562-46.206-14.562-70.946c0-24.744,4.854-48.391,14.562-70.948c9.707-22.554,22.697-41.968,38.97-58.245 c16.274-16.269,35.691-29.26,58.245-38.97c22.554-9.704,46.205-14.558,70.948-14.558c24.74,0,48.395,4.851,70.946,14.558 c22.556,9.707,41.97,22.698,58.245,38.97c16.272,16.274,29.26,35.688,38.969,58.245c9.709,22.554,14.564,46.201,14.564,70.948 C402.002,244.011,397.143,267.664,387.434,290.213z"}),T.jsx("path",{d:"M284.368,258.668c-19.219-14.086-40.926-21.129-65.095-21.129c-24.172,0-45.871,7.039-65.096,21.129 c-19.224,14.085-32.358,32.641-39.397,55.671c-1.521,4.757-1.143,9.381,1.141,13.847c2.286,4.469,5.898,7.467,10.85,8.993 c4.758,1.526,9.373,1.143,13.846-1.144c4.471-2.285,7.467-5.899,8.991-10.848c4.759-15.235,13.562-27.556,26.409-36.979 c12.847-9.418,27.263-14.127,43.252-14.127c15.987,0,30.412,4.712,43.251,14.127c12.854,9.424,21.655,21.744,26.412,36.979 c1.52,4.948,4.564,8.562,9.134,10.848c4.568,2.286,9.236,2.67,13.989,1.144c4.761-1.526,8.278-4.524,10.564-8.993 c2.286-4.466,2.669-9.09,1.14-13.847C316.729,291.312,303.591,272.75,284.368,258.668z"}),T.jsx("path",{d:"M146.181,182.725c10.085,0,18.699-3.576,25.837-10.709c7.139-7.135,10.708-15.749,10.708-25.837 c0-10.089-3.569-18.699-10.708-25.837s-15.752-10.709-25.837-10.709c-10.088,0-18.702,3.571-25.84,10.709 c-7.135,7.139-10.707,15.749-10.707,25.837c0,10.088,3.568,18.702,10.707,25.837C127.482,179.152,136.093,182.725,146.181,182.725 z"}),T.jsx("path",{d:"M292.359,109.631c-10.089,0-18.706,3.571-25.845,10.709c-7.132,7.139-10.708,15.749-10.708,25.837 c0,10.088,3.576,18.702,10.708,25.837c7.139,7.137,15.756,10.709,25.845,10.709c10.081,0,18.698-3.576,25.837-10.709 c7.139-7.135,10.708-15.749,10.708-25.837c0-10.089-3.569-18.699-10.708-25.837S302.44,109.631,292.359,109.631z"})]}),T.jsx("h1",{className:"ui-dialog-title",children:n})]})}),T.jsx(Ir,{children:o}),T.jsx(Sr,{children:T.jsx(k,{className:"dialog-action-ok dialog-action",onClick:s,children:c})})]})},exports.Map=function(t){var n=t.customButtons,r=t.onClose,o=t.onSave,i=u(t,["customButtons","onClose","onSave"]),a=e.useState(i.data?i.data:[]),s=a[0],c=a[1],f=function(){return d(void 0,void 0,void 0,function(){return p(this,function(e){return null==o||o(s),[2]})})},h=function(){return d(void 0,void 0,void 0,function(){return p(this,function(e){return null==r||r(),[2]})})};e.useEffect(function(){var e,t,r=null===(e=null==n?void 0:n.saveButton)||void 0===e?void 0:e.addEventListener("click",function(){f()}),o=null===(t=null==n?void 0:n.cancelButton)||void 0===t?void 0:t.addEventListener("click",function(){h()});return function(){var e,t;null===(e=null==n?void 0:n.saveButton)||void 0===e||e.removeEventListener("click",r),null===(t=null==n?void 0:n.cancelButton)||void 0===t||t.removeEventListener("click",o)}},[s]);return T.jsx("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"90%",height:"400px",margin:"20px"},children:T.jsxs(ir.Provider,{value:{locations:s,setLocations:c},children:[T.jsx(br,l({},i)),!n&&T.jsxs("div",{className:"cortex-widget-buttons",children:[T.jsx("button",{className:"cortex-widget-btn cortex-widget-btn-cancel",type:"button",onClick:h,children:"Cancel"}),T.jsx("button",{className:"cortex-widget-btn cortex-widget-btn-save",type:"button",onClick:f,children:"Save"})]})]})})},exports.Menu=xr,exports.MenuGroup=function(e){var t=e.title,n=e.className,r=e.children;return T.jsxs(T.Fragment,{children:[T.jsx("li",{className:B("ui-group-title",n),children:t}),r]})},exports.MenuItem=Dr,exports.Popper=D,exports.PopupMenu=function(t){var n=t.className,r=t.children,o=t.placement,i=t.open,a=t.anchorPosition,s=t.anchorEl,c=t.onClose,l=e.useRef(null);In(function(){i&&c&&c()},[l]);return i&&(a||s)?T.jsx(D,{ref:l,anchorPosition:a,anchorEl:s,placement:o,open:i,overflow:!1,className:"ui-menu-popper",children:T.jsx(xr,{className:n,onClose:c,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:l,children:r})}):null},exports.Scanner=function(t){var n=t.scanConfirmation,r=void 0===n||n,o=t.scanTrackerType,i=void 0===o?"centerText":o,a=u(t,["scanConfirmation","scanTrackerType"]),s=e.useState(!1),c=s[0],d=s[1],p=e.useState(!1),f=p[0],h=p[1],g=e.useState([]),m=g[0],v=g[1],w=function(){d(!1),h(!1)},y=e.useMemo(function(){switch(i){case"outline":return St;case"boundingBox":return Ft;case"centerText":return Pt;default:return}},[i]),C=e.useCallback(function(){w(),a.onScan(m)},[a,m]),A=e.useCallback(function(e){r&&(d(!0),h(!0),v(e))},[a]);return T.jsxs(T.Fragment,{children:[T.jsx("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:"15px",margin:"20px"},children:T.jsx($t,l({formats:["qr_code","micro_qr_code","rm_qr_code","maxi_code","pdf417","aztec","data_matrix","matrix_codes","dx_film_edge","databar","databar_expanded","codabar","code_39","code_93","code_128","ean_8","ean_13","itf","linear_codes","upc_a","upc_e"],components:{onOff:!0,torch:!0,tracker:y,finder:!1},scanDelay:2e3,allowMultiple:!1},a,{onScan:A,paused:f}))}),T.jsx(on,l({open:c,onClose:w,onConfirm:C},null==a?void 0:a.scanConfirmDialog))]})},exports.Selected=function(e){var t=e.title,n=e.data,r=e.onClick;return T.jsx(T.Fragment,{children:T.jsxs("div",{className:B("ui-selected-params"),children:[T.jsx("div",{className:B("ui-selected-title"),children:t}),T.jsx("div",{className:B("ui-selected-content"),children:T.jsx(T.Fragment,{children:Array.isArray(n)&&n.map(function(e,t){return T.jsx(T.Fragment,{children:T.jsx("div",{className:B("ui-selected-button"),children:T.jsx("button",{type:"button",onClick:function(){r(e)},className:1===e.selected?"ui-selected-btn":0===e.selected?"ui-not-selected":"ui-new-selected",children:e.name})},t)})})})})]})})},exports.Spinner=function(e){var t=e.className,n=e.variant,r=void 0===n?"indeterminate":n;return T.jsx("div",{className:B("ui-spinner","indeterminate"===r?"ui-spinner-indeterminate":"ui-spinner-determinate",t),children:"loading..."})},exports.TagInput=function(t){var n=t.tags;t.className;var r=t.suggestions,o=t.disableFilter,i=t.onTextChange,a=t.onChange,s=e.useRef(null),c=e.useRef(null),l=e.useRef(null),u=e.useState(""),d=u[0],p=u[1],h=e.useState(!1),g=h[0],m=h[1];In(function(){m(!1)},[s,c]);var v=e.useCallback(function(e){if(a&&Array.isArray(n)){var t=n.findIndex(function(t){return t.id===e.id});if(!(t<0)){var r=f([],n,!0);r.splice(t,1),a(r)}}},[n,a]),w=e.useCallback(function(e){if(e){var t={id:e.id,label:e.label,value:e.value},r=Array.isArray(n)?f(f([],n,!0),[t],!1):[t];m(!1),a&&a(r),p(""),i&&i("")}},[n,a,i]),y=e.useCallback(function(e){p(e),i&&i(e)},[i]),C=Array.isArray(n)?n.map(function(e,t){return T.jsx(Sn,{tag:e,onDelete:function(){return v(e)}},t)}):[];return T.jsxs("div",{ref:l,className:"ui-taginput",children:[C,T.jsx(Fn,{ref:s,value:d,onChange:y,onClick:function(){m(!0)}}),T.jsx(qn,{ref:c,open:g,anchorEl:s,filter:d,tags:n,suggestions:r,disableFilter:o,onSuggestionClick:w})]})},exports.ToggleButton=function(t){var n=t.selected,r=t.value,o=t.size,i=t.children,a=t.className,s=t.onChange,c=e.useCallback(function(){s&&s(r)},[s,r]);return T.jsx("button",{type:"button",className:B("ui-toggleBtn",void 0!==o?"ui-toggleBtn-size-".concat(o):"ui-toggleBtn-size-md",!0===n?"ui-toggleBtn-selected":null,a),onClick:c,children:i})},exports.Tooltip=function(t){var n=t.children,r=t.title;t.anchorEl;var o=t.enterDelay,i=void 0===o?0:o,a=t.leaveDelay,s=void 0===a?0:a,c=t.className,u=t.disabled,d=e.useState(void 0),p=d[0],f=d[1],h=e.useState(!1),g=h[0],m=h[1],v=e.useState(!0),w=v[0],y=v[1],C=e.useState(!1),A=C[0],E=C[1],b=e.useRef(),x=e.useRef();e.useEffect(function(){!0===u&&m(!1)},[u]);var R,M=function(){m(!0)},k=function(){m(!1)},I=function(e){A||(clearTimeout(b.current),clearTimeout(x.current),p||f(e.currentTarget),x.current=setTimeout(function(){k()},s))},S=function(e){A||(clearTimeout(b.current),clearTimeout(x.current),p||f(e.currentTarget),!0!==u&&(b.current=setTimeout(function(){M()},i)))},F=function(e){E(!0),clearTimeout(b.current),clearTimeout(x.current),p||f(e.currentTarget),!0!==u&&(b.current=setTimeout(function(){M()},2e3))},P=function(e){clearTimeout(b.current),clearTimeout(x.current),p||f(e.currentTarget),x.current=setTimeout(function(){k()},3e3)};if(n){var j=l(l({},n.props),{onFocus:function(e){p||f(e.currentTarget),b.current=setTimeout(function(){M()},i)},onMouseEnter:function(e){A||(clearTimeout(b.current),clearTimeout(x.current),p||f(e.currentTarget),!0!==u&&(b.current=setTimeout(function(){M()},i)))},onMouseLeave:I,onMouseOver:S,onTouchStart:F,onTouchEnd:P});R=e.cloneElement(n,j)}var q=g||!w;return T.jsxs(T.Fragment,{children:[R,T.jsx(D,{role:"tooltip",anchorEl:p,open:q,className:B("ui-tooltip",c),onMouseOver:A?void 0:S,onMouseLeave:A?void 0:I,onTouchStart:F,onTouchEnd:P,children:T.jsx(kn,{trigger:g,onEnter:function(){y(!1)},onExited:function(){y(!0)},children:T.jsx("div",{className:"ui-tooltip-content",children:r})})})]})},exports.WarningDialog=function(t){var n=t.title,r=t.ok,o=t.children,i=t.className,a=t.onClose,s=e.useCallback(function(){a&&a(!0)},[a]),c=null!=r?r:"fermer";return T.jsxs(kr,{open:!0,className:B("ui-dialog-box","ui-dialog-warning",i),children:[T.jsx(Fr,{children:T.jsxs(T.Fragment,{children:[T.jsxs("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 512 512",children:[T.jsx("polygon",{fill:"#FFA418",points:"0,477.703 256,477.703 289.391,256 256,34.297"}),T.jsx("polygon",{fill:"#FF8A1E",points:"256,34.297 256,477.703 512,477.703"}),T.jsx("circle",{fill:"#324860",cx:"256",cy:"405.359",r:"16.696"}),T.jsx("rect",{x:"239.304",y:"177.185",fill:"#324860",width:"33.391",height:"178.087"})]}),T.jsx("h1",{className:"ui-dialog-title",children:n})]})}),T.jsx(Ir,{children:o}),T.jsx(Sr,{children:T.jsx(k,{className:"dialog-action-ok dialog-action",onClick:s,children:c})})]})},exports.forwardRef=E;
9
+ /*! no static exports found */function(t,n){t.exports=e}}).default},en.exports=tn(t)),rn=ct(nn),on={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},an=t.createContext&&t.createContext(on),sn=["attr","size","title"];function cn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ln(){return ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ln.apply(this,arguments)}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach(function(t){hn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hn(e,t,n){var r;return r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==typeof r?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e){return e&&e.map((e,n)=>t.createElement(e.tag,dn({key:n},e.attr),pn(e.child)))}function fn(e){return n=>t.createElement(gn,ln({attr:dn({},e.attr)},n),pn(e.child))}function gn(e){var n=n=>{var r,{attr:o,size:i,title:a}=e,s=cn(e,sn),c=i||n.size||"1em";return n.className&&(r=n.className),e.className&&(r=(r?r+" ":"")+e.className),t.createElement("svg",ln({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,o,s,{className:r,style:dn(dn({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&t.createElement("title",null,a),e.children)};return void 0!==an?t.createElement(an.Consumer,null,e=>n(e)):n(on)}function mn(e){return fn({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z"},child:[]}]})(e)}function wn(e){return fn({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"},child:[]}]})(e)}function vn(e){return fn({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"},child:[]}]})(e)}function Cn(e){return fn({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"},child:[]}]})(e)}function yn(e){return fn({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 7h-1l-1-1h-4L9 7H8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm-4 7c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"},child:[]},{tag:"path",attr:{d:"m8.57.51 4.48 4.48V2.04c4.72.47 8.48 4.23 8.95 8.95h2C23.34 3.02 15.49-1.59 8.57.51zM10.95 21.96c-4.72-.47-8.48-4.23-8.95-8.95H0c.66 7.97 8.51 12.58 15.43 10.48l-4.48-4.48v2.95z"},child:[]}]})(e)}function An(e){return fn({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 13A5 5 0 1 0 8 3a5 5 0 0 0 0 10"},child:[]}]})(e)}var Tn,En=function(){function e(){this.dbName="cortex-react-media",this.storeName="capturedFiles",this.db=null}return e.prototype.openDatabase=function(){return f(this,void 0,void 0,function(){var e=this;return g(this,function(t){return[2,new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onupgradeneeded=function(t){r.result.createObjectStore(e.storeName,{keyPath:"id",autoIncrement:!0})},r.onsuccess=function(){e.db=r.result,t(e.db)},r.onerror=function(){return n(r.error)}})]})})},e.prototype.storeFile=function(e){return f(this,void 0,void 0,function(){var t=this;return g(this,function(n){switch(n.label){case 0:return this.db?[3,2]:[4,this.openDatabase()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise(function(n,r){var o=t.db.transaction(t.storeName,"readwrite").objectStore(t.storeName).add({file:e,timestamp:Date.now(),name:e.name});o.onsuccess=function(){return n(o.result)},o.onerror=function(){return r(o.error)}})]}})})},e.prototype.retrieveFile=function(e){return f(this,void 0,void 0,function(){var t=this;return g(this,function(n){switch(n.label){case 0:return this.db?[3,2]:[4,this.openDatabase()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise(function(n,r){var o=t.db.transaction([t.storeName],"readonly").objectStore(t.storeName).get(e);o.onsuccess=function(){var e=o.result;n(e?e.file:null)},o.onerror=function(){return r(o.error)}})]}})})},e}();!function(e){e[e.Enter=0]="Enter",e[e.Entering=1]="Entering",e[e.Entered=2]="Entered",e[e.Exit=3]="Exit",e[e.Exiting=4]="Exiting",e[e.Exited=5]="Exited"}(Tn||(Tn={}));var xn=w(function(n,r){var o=n.trigger,i=n.mode,a=void 0===i?"appear":i,s=n.children,c=n.enterTimeout,l=n.exitTimeout,u=n.className,d=n.onEnter,p=n.onEntering,f=n.onEntered,g=n.onExit,m=n.onExiting,w=n.onExited,v=t.useRef(null),C=t.useRef(),A=t.useState(function(){return"appear"===a?Tn.Exited:Tn.Entered});A[0],A[1];t.useEffect(function(){return function(){C.current&&window.clearTimeout(C.current)}},[C]),t.useEffect(function(){o?(C.current&&window.clearTimeout(C.current),v.current.classList.remove("".concat(u,"-exit")),v.current.classList.remove("".concat(u,"-exiting")),v.current.classList.remove("".concat(u,"-exited")),d&&d(),v.current.classList.add("".concat(u,"-enter")),C.current=window.setTimeout(function(){p&&p(),v.current&&v.current.classList.add("".concat(u,"-entering")),C.current=window.setTimeout(function(){f&&f(),v.current&&v.current.classList.add("".concat(u,"-entered"))},c||1e3)},10)):(C.current&&window.clearTimeout(C.current),v.current.classList.remove("".concat(u,"-enter")),v.current.classList.remove("".concat(u,"-entering")),v.current.classList.remove("".concat(u,"-entered")),g&&g(),v.current.classList.add("".concat(u,"-exit")),C.current=window.setTimeout(function(){m&&m(),v.current&&v.current.classList.add("".concat(u,"-exiting")),C.current=window.setTimeout(function(){w&&w(),v.current&&v.current.classList.add("".concat(u,"-exited"))},l||1e3)}))},[o]);var T=t.useMemo(function(){if(s){var e=h(h({},s.props),{className:y(u,s.props.className),ref:v});return t.cloneElement(s,e)}},[s,v]);return e.jsx(e.Fragment,{children:T})}),Bn=w(function(t,n){var r=t.trigger,o=t.children,i=t.onEnter,a=t.onEntering,s=t.onEntered,c=t.onExit,l=t.onExiting,u=t.onExited;return e.jsx(xn,{ref:n,trigger:r,mode:"appear",className:"ui-fade",enterTimeout:160,exitTimeout:160,onEnter:i,onExit:c,onEntering:a,onEntered:s,onExiting:l,onExited:u,children:o})});function bn(e,t){var n=d.useCallback(function(n){var r=n.target,o=t.reduce(function(e,t){if(!t)return e;var n=function(e){var t;if(!e)return document.body;if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:document.body}var r=e;return r&&void 0!==r.current?null!==(t=r.current)&&void 0!==t?t:void 0:e}(t);return!1!==e&&n&&null!==n?!n.contains(r):e},!0);e&&o&&e()},[e]);d.useEffect(function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[t,n])}var Rn,Mn=function(t){var n=t.tag;t.className;var r=t.onDelete;return e.jsxs("span",{className:"ui-taginputItem",children:[e.jsx("span",{className:"ui-taginputItemLabel",children:n.label}),e.jsx("button",{type:"button",className:"ui-taginputItemRemove",onClick:r,children:"x"})]})},In=w(function(n,r){var o=n.className,i=n.value,a=n.onClick,s=n.onChange,c=t.useRef(null),l=t.useCallback(function(e){s&&s(e.target.value)},[s]);return t.useEffect(function(){if(r&&c)return C(r,c.current),function(){C(r,null)}},[r,c]),e.jsx(e.Fragment,{children:e.jsx("input",{ref:c,value:i,className:y("ui-taginputFilter",o),autoComplete:"off",spellCheck:"false","data-form-type":"other",onChange:l,onClick:a})})}),Dn=function(n){var r=n.suggestion,o=n.onClick,i=t.useCallback(function(e){o&&o(r,e)},[o]);return e.jsx("div",{role:"button",className:"ui-taginputSelectItem",tabIndex:0,onClick:i,children:r.label})},kn=function(t){var n=t.group,r=t.onClick,o=Array.isArray(n.suggestions)?n.suggestions.map(function(t,n){return!0===t.group?e.jsx(kn,{group:t,onClick:r},n):e.jsx(Dn,{suggestion:t,onClick:r},n)}):null;return e.jsxs("div",{className:"ui-taginputSelectGroup",children:[e.jsx("span",{className:"ui-taginputSelectGroupLabel",children:n.label}),e.jsx("div",{className:"ui-taginputSelectGroupItems",children:o})]})},Fn=w(function(n,r){var o=n.open,i=n.tags,a=n.disableFilter,s=n.suggestions,c=n.anchorEl,l=n.filter,u=n.onSuggestionClick,d=t.useMemo(function(){if(!Array.isArray(s))return[];if(a)return s;var e=Array.isArray(i)&&i.length>0,t=l&&l.length>0,n=[];return s.forEach(function(r){if(!0!==r.group)e&&i.some(function(e){return e.id===r.id})||t&&r.label.toUpperCase().indexOf(l.toUpperCase())<0||n.push(h({},r));else if(Array.isArray(r.suggestions)){var o=h(h({},r),{suggestions:[]});r.suggestions.forEach(function(n){e&&i.some(function(e){return e.id===n.id})||t&&n.label.toUpperCase().indexOf(l.toUpperCase())<0||o.suggestions.push(h({},n))}),o.suggestions.length>0&&n.push(o)}}),n},[s,l,i]),p=t.useCallback(function(e){u&&u(e)},[u]),f=o&&d.length>0,g=d.map(function(t,n){return!0===t.group?e.jsx(kn,{group:t,onClick:p},n):e.jsx(Dn,{suggestion:t,onClick:p},n)});return e.jsx(E,{ref:r,open:f,anchorEl:c,placement:T.BottomLeft,children:e.jsx("div",{className:"ui-taginputSelect",children:g})})}),Sn=t.createContext({locations:[],setLocations:function(){}});void 0===(Rn=window.leafletActiveAreaPreviousMethods)&&(Rn={getCenter:L.Map.prototype.getCenter,setView:L.Map.prototype.setView,flyTo:L.Map.prototype.flyTo,setZoomAround:L.Map.prototype.setZoomAround,getBoundsZoom:L.Map.prototype.getBoundsZoom,PopupAdjustPan:L.Popup.prototype._adjustPan,RendererUpdate:L.Renderer.prototype._update}),L.Map.include({getBounds:function(){if(this._viewport)return this.getViewportLatLngBounds();var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new L.LatLngBounds(t,n)},getViewport:function(){return this._viewport},getViewportBounds:function(){var e=this._viewport,t=L.point(e.offsetLeft,e.offsetTop),n=L.point(e.clientWidth,e.clientHeight);return 0!==n.x&&0!==n.y||(e=this.getContainer())&&(t=L.point(0,0),n=L.point(e.clientWidth,e.clientHeight)),L.bounds(t,t.add(n))},getViewportLatLngBounds:function(){var e=this.getViewportBounds();return L.latLngBounds(this.containerPointToLatLng(e.min),this.containerPointToLatLng(e.max))},getOffset:function(){var e=this.getSize().divideBy(2),t=this.getViewportBounds().getCenter();return e.subtract(t)},getCenter:function(e){var t=Rn.getCenter.call(this);if(this.getViewport()&&!e){var n=this.getZoom(),r=this.project(t,n);r=r.subtract(this.getOffset()),t=this.unproject(r,n)}return t},setView:function(e,t,n){if(e=L.latLng(e),t=void 0===t?this._zoom:this._limitZoom(t),this.getViewport()){var r=this.project(e,this._limitZoom(t));r=r.add(this.getOffset()),e=this.unproject(r,this._limitZoom(t))}return Rn.setView.call(this,e,t,n)},flyTo:function(e,t,n){if(e=L.latLng(e),t=void 0===t?s:t,this.getViewport()){var r=this.project(e,this._limitZoom(t));r=r.add(this.getOffset()),e=this.unproject(r,this._limitZoom(t))}if(!1===(n=n||{}).animate||!L.Browser.any3d)return this.setView(e,t,n);this._stop();var o=this.project(Rn.getCenter.call(this)),i=this.project(e),a=this.getSize(),s=this._zoom,c=Math.max(a.x,a.y),l=c*this.getZoomScale(s,t),u=i.distanceTo(o)||1,d=1.42,h=2.0164;function p(e){var t=(l*l-c*c+(e?-1:1)*h*h*u*u)/(2*(e?l:c)*h*u),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function f(e){return(Math.exp(e)-Math.exp(-e))/2}function g(e){return(Math.exp(e)+Math.exp(-e))/2}var m=p(0);function w(e){return c*(g(m)*(f(t=m+d*e)/g(t))-f(m))/h;var t}var v=Date.now(),C=(p(1)-m)/d,y=n.duration?1e3*n.duration:1e3*C*.8;return this._moveStart(!0,n.noMoveStart),function n(){var r=(Date.now()-v)/y,a=function(e){return 1-Math.pow(1-e,1.5)}(r)*C;r<=1?(this._flyToFrame=L.Util.requestAnimFrame(n,this),this._move(this.unproject(o.add(i.subtract(o).multiplyBy(w(a)/u)),s),this.getScaleZoom(c/function(e){return c*(g(m)/g(m+d*e))}(a),s),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}.call(this),this},setZoomAround:function(e,t,n){if(this.getViewport()){var r=this.getZoomScale(t),o=this.getViewportBounds().getCenter(),i=(e instanceof L.Point?e:this.latLngToContainerPoint(e)).subtract(o).multiplyBy(1-1/r),a=this.containerPointToLatLng(o.add(i));return this.setView(a,t,{zoom:n})}return Rn.setZoomAround.call(this,e,t,n)},getBoundsZoom:function(e,t,n){e=L.latLngBounds(e),n=L.point(n||[0,0]);var r=this.getZoom()||0,o=this.getMinZoom(),i=this.getMaxZoom(),a=e.getNorthWest(),s=e.getSouthEast(),c=this.getViewport(),l=(c?L.point(c.clientWidth,c.clientHeight):this.getSize()).subtract(n),u=this.project(s,r).subtract(this.project(a,r)),d=L.Browser.any3d?this.options.zoomSnap:1,h=l.x/u.x,p=l.y/u.y,f=t?Math.max(h,p):Math.min(h,p);return r=this.getScaleZoom(f,r),d&&(r=Math.round(r/(d/100))*(d/100),r=t?Math.ceil(r/d)*d:Math.floor(r/d)*d),Math.max(o,Math.min(i,r))},setActiveArea:function(e,t,n){var r;if(t&&this._zoom&&(r=this.getCenter()),!this._viewport){var o=this.getContainer();this._viewport=L.DomUtil.create("div",""),o.insertBefore(this._viewport,o.firstChild)}return"string"==typeof e?this._viewport.className=e:L.extend(this._viewport.style,e),r&&this.setView(r,this.getZoom(),{animate:!!n}),this}}),L.Renderer.include({_onZoom:function(){this._updateTransform(this._map.getCenter(!0),this._map.getZoom())},_update:function(){Rn.RendererUpdate.call(this),this._center=this._map.getCenter(!0)}}),L.GridLayer.include({_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(L.DomUtil.remove(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[e],o=this._map;return r||((r=this._levels[e]={}).el=L.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=t,r.origin=o.project(o.unproject(o.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,o.getCenter(!0),o.getZoom()),L.Util.falseFn(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(!0),this._map.getZoom(),t,t)},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter(!0)),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(e),o=this._pxBoundsToTileRange(r),i=o.getCenter(),a=[],s=this.options.keepBuffer,c=new L.Bounds(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var u=this._tiles[l].coords;u.z===this._tileZoom&&c.contains(new L.Point(u.x,u.y))||(this._tiles[l].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var d=o.min.y;d<=o.max.y;d++)for(var h=o.min.x;h<=o.max.x;h++){var p=new L.Point(h,d);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:a.push(p)}}if(a.sort(function(e,t){return e.distanceTo(i)-t.distanceTo(i)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var g=document.createDocumentFragment();for(h=0;h<a.length;h++)this._addTile(a[h],g);this._level.el.appendChild(g)}}}}}}),L.Popup.include({_adjustPan:function(){if(this._map._viewport){if(!this.options.autoPan)return;this._map._panAnim&&this._map._panAnim.stop();var e=this._map,t=e._viewport,n=this._container.offsetHeight,r=this._containerWidth,o=L.point(t.offsetLeft,t.offsetTop),i=new L.Point(this._containerLeft-o.x,-n-this._containerBottom-o.y);i._add(L.DomUtil.getPosition(this._container));var a=e.layerPointToContainerPoint(i),s=L.point(this.options.autoPanPadding),c=L.point(this.options.autoPanPaddingTopLeft||s),l=L.point(this.options.autoPanPaddingBottomRight||s),u=L.point(t.clientWidth,t.clientHeight),d=0,h=0;a.x+r+l.x>u.x&&(d=a.x+r-u.x+l.x),a.x-d-c.x<0&&(d=a.x-c.x),a.y+n+l.y>u.y&&(h=a.y+n-u.y+l.y),a.y-h-c.y<0&&(h=a.y-c.y),(d||h)&&e.fire("autopanstart").panBy([d,h])}else Rn.PopupAdjustPan.call(this)}});var Pn=function(n){var i=r.useMap();t.useEffect(function(){i.setActiveArea("cortex-widget-viewport",!0,!0),o.Control.CenterActiveArea=o.Control.extend({onAdd:function(){var e=null;e=i.zoomControl&&!this.options.forceSeparateButton?i.zoomControl._container:o.DomUtil.create("div","leaflet-bar"),o.DomEvent.disableClickPropagation(e);var t=o.DomUtil.create("a","",e);return t.href="#",t.title="Centrer",t.innerHTML='\n <img src="'.concat(qn,'" width="15px" style="margin-top: 7px; filter: brightness(0%)" />\n '),t.setAttribute("role","button"),t.setAttribute("aria-label",t.title),o.DomEvent.on(t,"click",o.DomEvent.stop).on(t,"click",l),e}}),o.control.centerActiveArea=function(e){return new o.Control.CenterActiveArea(e)},o.control.centerActiveArea({position:"topleft"}).addTo(i),n.autoCenter&&c()},[]),t.useEffect(function(){n.autoCenter&&c()},[n.autoCenter]);var a=t.useCallback(function(){var e=o.featureGroup();return i.eachLayer(function(t){t instanceof o.Marker&&e.addLayer(t)}),e},[i]),s=t.useCallback(function(){var e=o.featureGroup();return i.eachLayer(function(t){t instanceof o.Polygon&&e.addLayer(t)}),e},[i]),c=t.useCallback(function(){var e=a().getBounds();s().eachLayer(function(t){e.extend(t.getBounds())}),e.isValid()&&i.fitBounds(e,{animate:!0})},[]),l=t.useCallback(function(){c()},[i]);return e.jsx(e.Fragment,{})},qn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAAB3RJTUUH4wMIFTgXULHJFAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAhUlEQVRo3u3asQ2AIBAF0MO4p42FI1nYOKlugAUnJvL+BLzwcxGw7Md5RUO2dSmRkNZ1TPGTgICADAIptbGXNVqzUluraoGADAKZv/rIy56UqvVFartVVEu1QEBAQEBAQEBAQEAaz+xuGlXrpWr1PlvbERAQEJCIhzfEnqPYLxwgICBjQW7ewSYPr/zk7gAAAABJRU5ErkJggg==",jn=function(n){var o=r.useMap();return t.useEffect(function(){s.leaflet.control.fullscreen(h({position:"topleft"},n||{})).addTo(o)},[]),e.jsx(e.Fragment,{})},Nn=function(t){var n,r,o={edit:!!(null==t?void 0:t.editable)&&{}};return e.jsx(c.EditControl,{onCreated:t.handleOnCreated,onDeleted:t.handleOnDeleted,onEdited:t.handleOnEdited,position:null!==(n=t.position)&&void 0!==n?n:"topright",draw:null!==(r=t.draw)&&void 0!==r?r:{rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},edit:o})},Gn=function(n){var s,c={polygon:!0,marker:!0,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},l=t.useState(c);l[0];var u=l[1],d=t.useState("standard"),p=d[0],f=d[1],g=t.useContext(Sn),w=g.locations,v=g.setLocations;t.useEffect(function(){var e;null===(e=null==n?void 0:n.onChange)||void 0===e||e.call(n,w)},[w]),t.useEffect(function(){o.Icon.Default.mergeOptions({iconRetinaUrl:i,shadowUrl:a,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}),w&&w.length>0&&u(function(e){var t=h({},e);return Object.keys(t).forEach(function(e){t[e]=!1}),t})},[]);var C=function(e){var t,n,r,o=e.layerType,i=e.layer;u(function(e){var t=h({},e);return Object.keys(t).forEach(function(e){t[e]=!1}),t});var a=[];"polygon"!==o&&"rectangle"!==o||(a=null===(n=null===(t=i._latlngs)||void 0===t?void 0:t[0])||void 0===n?void 0:n.map(function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})),"marker"!==o&&"circle"!==o&&"circlemarker"!==o||a.push({order:1,latitude:i._latlng.lat,longitude:i._latlng.lng,id:i._leaflet_id}),"polyline"===o&&(a=null===(r=i._latlngs)||void 0===r?void 0:r.map(function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})),v(function(e){return m(m([],e,!0),[{points:a,id:i._leaflet_id}],!1)})},y=function(e){var t=e.layers;v(function(e){var n=Object.values(t.getLayers());return e.filter(function(e){return(null==e?void 0:e.points)&&1===e.points.length}).map(function(e){var t=n.find(function(t){return t._leaflet_id===e.points[0].id});if(t){var r=h({},e.points[0]),o=t.getLatLng();return Math.abs(r.latitude-o.lat)>1e-6||Math.abs(r.longitude-o.lng)>1e-6?{points:[{id:e.id,latitude:n[0]._latlng.lat,longitude:n[0]._latlng.lng,order:e.points[0].order}],id:e.id,objId:e.objId}:e}return e})})},A=t.useMemo(function(){var e,t;if((null==n?void 0:n.singlePosition)&&w.length>(null!==(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.length)&&void 0!==t?t:0)){var r={draw:{marker:!1,polygon:!1,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1}};return"boolean"!=typeof(null==n?void 0:n.drawTools)&&(r=h(h({},null==n?void 0:n.drawTools),r)),r}return"boolean"!=typeof(null==n?void 0:n.drawTools)?null==n?void 0:n.drawTools:!0===(null==n?void 0:n.drawTools)?{draw:{marker:!0,polygon:!0,rectangle:!0,circle:!0,circlemarker:!0,polyline:!0}}:void 0},[null==n?void 0:n.singlePosition,null==n?void 0:n.drawTools,w,null==n?void 0:n.data]);return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:".leaflet-container { min-height: 80px; min-width: 80px; height: 100%; width: 100% }"}),e.jsxs(r.MapContainer,h({center:n.center||[0,0],zoom:n.zoom||13,maxZoom:n.maxZoom,minZoom:n.minZoom},n.MapContainerProps,{children:[e.jsx(r.TileLayer,{attribution:"standard"===p?'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors':'&copy; <a href="https://www.google.com/maps">Google Maps</a>',url:"standard"===p?"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png":"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}"},p),n.toggleSatelliteView&&e.jsx("div",{style:{position:"absolute",bottom:"10px",left:"10px",zIndex:1e3,background:"white",padding:"7px 10px",borderRadius:"5px"},children:e.jsxs("label",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:[e.jsx("input",{type:"checkbox",checked:"satellite"===p,onChange:function(){return f("standard"===p?"satellite":"standard")}}),"Satellite View"]})}),n.fullscreen&&e.jsx(jn,h({},"boolean"==typeof n.fullscreen?{}:n.fullscreen)),e.jsxs(r.FeatureGroup,{children:[n.drawTools&&w.length>0&&e.jsx(Nn,h({},A,{handleOnCreated:C,handleOnEdited:y})),0===w.length&&e.jsx(Nn,h({},A,{handleOnCreated:C,handleOnDeleted:function(e){0!==Object.keys(e.layers._layers).length&&(u(function(e){return h(h({},c),{workaround:Math.random()})}),v(w))},handleOnEdited:y})),(null==n?void 0:n.data)&&(null===(s=null==n?void 0:n.data)||void 0===s?void 0:s.map(function(t){return t.points.length>1?e.jsx(r.Polygon,{positions:t.points.map(function(e){return[e.latitude,e.longitude]})},"marker-".concat(t.objId)):e.jsx(r.Marker,{position:[t.points[0].latitude,t.points[0].longitude]},"marker-".concat(t.id))}))]}),n.centerActiveArea&&e.jsx(Pn,h({autoCenter:w&&w.length>0},"boolean"==typeof n.centerActiveArea?{}:n.centerActiveArea))]}))]})},Ln=function(n){var r=n.containerRef;n.className;var o=n.children,i=n.onClick;n.onClose;var a=t.useRef(null);return t.useEffect(function(){if(a&&r&&a.current&&r.current){var e=r.current.getBoundingClientRect(),t=a.current.getBoundingClientRect(),n=e.width,o="0px",i="unset";e.right+t.width>=window.innerWidth&&(n=-t.width),t.bottom>=window.innerHeight&&(i="".concat(-(window.innerHeight-e.bottom-15).toFixed(),"px"),o="unset"),a.current.setAttribute("style","opacity: 1; left: ".concat(n.toFixed(),"px; bottom: ").concat(i,"; top: ").concat(o,";"))}},[a,r]),e.jsx("div",{ref:a,className:"ui-menu",children:e.jsx("ul",{className:"ui-menuList",onClick:i,onContextMenu:i,children:o})})};function Vn(e){var t=d.useState(),n=t[0],r=t[1];return d.useEffect(function(){r(function(e){var t;if(e){if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:void 0}var r=e;return r&&void 0!==r.current?null!==(t=r.current)&&void 0!==t?t:void 0:e}}(e))},[e]),n}var Yn=function(t){var n=t.className;return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:y("ui-icon",n),transform:"rotate(90 0 0)",preserveAspectRatio:"xMidYMid meet",children:e.jsx("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"})})},On=function(t){var n=t.className;return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:y("ui-icon",n),children:e.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"})})},Qn=function(n){var r=n.label,o=n.icon,i=n.className,a=n.style;n.active;var s=n.disable,c=n.children,l=n.itemTemplate,u=n.onClick,d=t.useState(!1),h=d[0],p=d[1],f=t.useRef(null),g=t.useCallback(function(e){u&&!0!==s&&u(e)},[u,s]),m=null!=c;return e.jsxs("li",{className:y("ui-menuItem",!0===s?"ui-menuItem-disable":null,i),style:a,onMouseEnter:function(){p(!0)},onMouseLeave:function(){p(!1)},ref:f,children:[e.jsxs("button",{type:"button",className:"ui-menuItem-btn",onClick:g,children:[o&&e.jsx("div",{className:"ui-menuItem-icon",children:o}),e.jsx("span",{children:null!=l?l:r}),m&&e.jsx("div",{className:"ui-menuItem-menuIconContainer",children:e.jsx(Yn,{className:"ui-menuItem-menuIcon"})})]}),m&&h&&e.jsx(Ln,{containerRef:f,children:c})]})},Un=function(n){n.open;var r=n.width,o=n.fullWidth,i=n.fullHeight,a=n.className,s=n.children,c=n.onClose,l=t.useRef(),u=t.useRef(null),d=t.useRef(null);t.useEffect(function(){return l.current=document.body.style.overflow,document.body.style.overflow="hidden",function(){var e;document.body.style.overflow=null!==(e=l.current)&&void 0!==e?e:"initial"}},[]);var h=t.useCallback(function(){c&&c()},[c]);return e.jsx(v,{ref:u,children:e.jsxs("div",{ref:function(e){d.current=e},style:{position:"fixed",margin:"0"},role:"dialog",className:y("ui-dialog",a),children:[e.jsx("div",{role:"presentation",className:"ui-dialog-overlay",onClick:h}),e.jsx("div",{className:y("ui-dialog-container",r?"ui-dialog-size-".concat(r):null,!0===o?"ui-dialog-size-fullwidth":null,!0===i?"ui-dialog-size-fullheight":null),children:s})]})})},Kn=function(t){var n=t.className,r=t.children;return e.jsx("div",{className:y("ui-dialog-content",n),children:r})},Wn=function(t){var n=t.className,r=t.children;return e.jsx("footer",{className:y("ui-dialog-footer",n),children:r})},Jn=function(t){var n=t.className,r=t.children;return e.jsx("header",{className:y("ui-dialog-header",n),children:r})};exports.AuthDownloadLink=function(t){var n=t.url,r=t.queryParams,o=t.token,i=t.label,a=t.onStart,s=t.onCompleted,c=t.onError,l=function(e){var t=e.get("Content-Disposition");if(!t)return null;var n=t.split(";"),r="filename=",o=n.find(function(e){return e.indexOf(r)>-1});if(o){var i=o.search(r);if(i<0)return null;var a=o.substring(i+9).trim();if(0===a.length)return null;var s=a.substring(0,1);return'"'!==s&&"'"!==s?a:a.length<2||a[a.length-1]!==s?null:a.substring(1,a.length-1)}return null};return e.jsx(e.Fragment,{children:e.jsx(Qn,{label:i,onClick:function(e){return f(void 0,void 0,void 0,function(){var t,i,u,d,h,p,f,m;return g(this,function(g){switch(g.label){case 0:a&&a(e),g.label=1;case 1:if(g.trys.push([1,4,,5]),!o)throw new Error("INVALID_TOKEN");if(!n)throw new Error("INVALID_URL");return(t={}).ContentType="application/json",t.Authorization="Bearer ".concat(o),i={method:"get",headers:t},u=new URL(n),r&&Object.keys(r).forEach(function(e){return u.searchParams.append(e,r[e])}),[4,fetch(u,i)];case 2:if(!(d=g.sent())||200!==d.status)throw new Error("An error occured while generating file");return[4,d.blob()];case 3:return(h=g.sent())&&(p=window.URL.createObjectURL(h),(f=document.createElement("a")).href=p,f.download=l(d.headers)||"file",f.click(),URL.revokeObjectURL(p),f.remove()),[3,5];case 4:throw m=g.sent(),c&&c(m),m;case 5:return s&&s(),[2]}})})}})})},exports.BarLoader=function(t){var n=t.title,r=t.color,o=t.className,i=t.isComplete;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:y("loader",null!=r?"loader-color-".concat(r):"loader-color-blue",!0===i?"completed":"",o),children:e.jsx("div",{className:y("loaderBar",null!=r?"loaderBar-color-".concat(r):"loaderBar-color-blue")})}),e.jsx("div",{className:y("loaderBar-title"),children:e.jsx("span",{children:n})})]})},exports.Button=x,exports.Camera=function(n){var r=n.onCapture,o=n.isOffline,i=void 0!==o&&o,a=n.mode,s=void 0===a?"photo":a,c=n.validateText,l=void 0===c?"Valider":c,u=n.resetText,d=void 0===u?"Annuler":u,m=n.isShowOffline,w=void 0!==m&&m,v=n.isShowVideoButton,C=void 0!==v&&v,y=n.isShowSwitchButton,A=void 0!==y&&y,T=p(n,["onCapture","isOffline","mode","validateText","resetText","isShowOffline","isShowVideoButton","isShowSwitchButton"]),E=t.useRef(null),B=t.useRef(null),b=t.useRef(new En),R=t.useState(s),M=R[0],I=R[1],D=t.useState(!1),k=D[0],F=D[1],S=t.useState(!1),P=S[0],q=S[1],j=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0||"ontouchstart"in document.documentElement,N=yn,G=mn,L=An,V=Cn,Y=vn,O=wn,Q=function(){var e=t.useRef(null),n=t.useState(0),r=n[0],o=n[1],i=function(e){var t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60;return"".concat(t>0?t.toString().padStart(2,"0").concat(":"):"").concat(n>0?n.toString().padStart(2,"0").concat(":"):"").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))},a=t.useMemo(function(){return i(r)},[r]),s=t.useCallback(function(){o(0),e.current=setInterval(function(){o(function(e){return e+1})},1e3)},[]),c=t.useCallback(function(){e.current&&(clearInterval(e.current),e.current=null)},[]);return{formatTime:i,startTimer:s,stopTimer:c,formatedTime:a}}(),U=Q.formatedTime,K=Q.startTimer,W=Q.stopTimer,J=t.useState({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null}),Z=J[0],H=J[1],_=t.useState({facingMode:"environment",width:{min:200},height:{min:300}});_[0];var z=_[1];t.useEffect(function(){return z({facingMode:j?"environment":"user",width:{min:200},height:{min:300}}),function(){ee(),W(),te()}},[]),t.useEffect(function(){"video"===M&&F(!1)},[Z]);var X=t.useCallback(function(){return f(void 0,void 0,void 0,function(){var e,t,n,r,o,i,a,s,c,l;return g(this,function(u){if(e=null===(l=E.current)||void 0===l?void 0:l.getScreenshot()){for(t=atob(e.split(",")[1]),n=new Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);o=new Uint8Array(n),i=new Blob([o],{type:"image/jpeg"}),a="captured_image_".concat(Date.now().toString().slice(-7),".jpg"),s=new File([i],a,{type:"image/jpeg"}),c=URL.createObjectURL(s),H(function(e){return h(h({},e),{imageUrl:c,file:s})})}return[2]})})},[E,i,r]),$=t.useCallback(function(){if(E.current&&E.current.stream){var e="webm",t="video/".concat(e);MediaRecorder.isTypeSupported("video/mp4")&&(e="mp4",t="video/mp4");var n=new MediaRecorder(E.current.stream,{mimeType:t}),r=[];n.ondataavailable=function(e){e.data.size>0&&r.push(e.data)},n.onstop=function(){return f(void 0,void 0,void 0,function(){var n,o,i,a;return g(this,function(s){return n=new Blob(r,{type:t}),o="captured_video_".concat(Date.now(),".").concat(e),i=new File([n],o,{type:t}),a=URL.createObjectURL(i),H(function(e){return h(h({},e),{videoUrl:a,isRecording:!1,file:i})}),W(),[2]})})},n.start(),B.current=n,K(),H(function(e){return h(h({},e),{isRecording:!0})})}},[E,i,K,W,r]),ee=function(){H({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null})};return e.jsx("div",{className:"camera-container",children:Z.imageUrl||Z.videoUrl?e.jsxs("div",{className:"camera-preview camera-screen-animation",children:[Z.imageUrl&&e.jsx("img",{src:Z.imageUrl,alt:"Capturé",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"}}),Z.videoUrl&&e.jsxs("video",{width:"100%",height:"90%",id:"video",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"},onEnded:function(){return F(!1)},children:[e.jsx("source",{src:Z.videoUrl,type:"video/mp4"}),e.jsx("source",{src:Z.videoUrl,type:"video/webm"}),e.jsx("track",{kind:"captions",src:"",lang:"en",label:"English",default:!0}),"Your browser does not support the video."]}),Z.videoUrl&&e.jsx(x,{variant:"contained",className:"video-play-btn",onClick:function(){var e=document.getElementById("video");try{e.paused?e.play():e.pause(),F(!k)}catch(e){}},children:k?e.jsx(O,{}):e.jsx(Y,{})}),e.jsxs("div",{className:"camera-controls",children:[e.jsx(x,{variant:"contained",onClick:function(){return f(void 0,void 0,void 0,function(){var e;return g(this,function(t){switch(t.label){case 0:return i?[4,b.current.storeFile(Z.file)]:[3,2];case 1:e=t.sent(),r({fileRowId:e,fileStoreName:"capturedFiles"}),t.label=2;case 2:return i||"photo"!==M||r({file:Z.file,imageSrc:Z.imageUrl}),i||"video"!==M||r({file:Z.file,videoSrc:Z.videoUrl}),ee(),[2]}})})},className:"camera-button camera-button--download",children:l}),e.jsx(x,{variant:"outlined",onClick:ee,className:"camera-button camera-button--reset",children:d})]})]}):e.jsxs("div",{className:"camera-preview",children:[Z.isRecording&&e.jsxs("div",{className:"camera-recording-timer",style:{display:"video"===M?"flex":"none"},children:[e.jsx("span",{className:"camera-recording-dot"}),e.jsx("span",{children:U})]}),!Z.isRecording&&C&&e.jsx("button",{type:"button",onClick:function(){return I("photo"===M?"video":"photo"),void ee()},className:"camera-button camera-mode",children:e.jsx("span",{children:"photo"===M?"Video":"Photo"})}),j&&!Z.isRecording&&A&&e.jsx("button",{type:"button",onClick:function(){q(!P),z({facingMode:P?"environment":"user",width:{min:200},height:{min:300}})},className:"camera-button camera-switch",children:e.jsx(N,{size:18})}),i&&w&&e.jsx("div",{className:"camera-offline-mode",children:"Offline mode"}),e.jsx(rn,h({ref:E,videoConstraints:{facingMode:"environment",width:{min:200},height:{min:300}}},T,{style:{height:"90% !important",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center",margin:"0 auto"},screenshotFormat:"image/jpeg",allowFullScreen:!0})),e.jsxs("div",{className:"camera-controls",children:["photo"===M&&e.jsx(x,{variant:"contained",className:"camera-button camera-button--capture",onClick:X,children:e.jsx(G,{size:28})}),"video"===M&&!Z.isRecording&&e.jsx(x,{variant:"contained",onClick:$,className:"camera-button camera-button--record",children:e.jsx(L,{size:30})}),"video"===M&&Z.isRecording&&e.jsx(x,{variant:"contained",onClick:te,className:"camera-button camera-button--record",children:e.jsx(V,{size:28})})]})]})});function te(){B.current&&B.current.stop()}},exports.ChevronDownIcon=function(t){var n=t.className;return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:y("ui-icon",n),transform:"rotate(180 0 0)",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 8.29289C11.6834 7.90237 12.3166 7.90237 12.7071 8.29289L17.7071 13.2929C18.0976 13.6834 18.0976 14.3166 17.7071 14.7071C17.3166 15.0976 16.6834 15.0976 16.2929 14.7071L12 10.4142L7.70711 14.7071C7.31658 15.0976 6.68342 15.0976 6.29289 14.7071C5.90237 14.3166 5.90237 13.6834 6.29289 13.2929L11.2929 8.29289Z"})})},exports.ChevronLeftIcon=function(t){var n=t.className;return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:y("ui-icon",n),transform:"rotate(270 0 0)",preserveAspectRatio:"xMidYMid meet",children:e.jsx("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"})})},exports.ChevronRightIcon=Yn,exports.ConfirmDialog=function(n){var r=n.title,o=n.ok,i=n.cancel,a=n.children,s=n.className,c=n.onClose,l=t.useCallback(function(){c&&c(!1)},[c]),u=t.useCallback(function(){c&&c(!0)},[c]),d=null!=o?o:"oui",h=null!=i?i:"Annuler";return e.jsxs(Un,{open:!0,className:y("ui-dialog-box","ui-dialog-confirm",s),children:[e.jsx(Jn,{children:e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.5 438.5",children:[e.jsx("path",{d:"M409.1,109.2c-19.6-33.6-46.2-60.2-79.8-79.8C295.7,9.8,259.1,0,219.3,0c-39.8,0-76.5,9.8-110.1,29.4\r\n C75.6,49,49,75.6,29.4,109.2C9.8,142.8,0,179.5,0,219.3c0,39.8,9.8,76.5,29.4,110.1c19.6,33.6,46.2,60.2,79.8,79.8\r\n c33.6,19.6,70.3,29.4,110.1,29.4s76.5-9.8,110.1-29.4c33.6-19.6,60.2-46.2,79.8-79.8c19.6-33.6,29.4-70.3,29.4-110.1\r\n C438.5,179.5,428.7,142.8,409.1,109.2z M387.4,290.2c-9.7,22.6-22.7,42-39,58.2c-16.3,16.3-35.7,29.3-58.2,39\r\n c-22.6,9.7-46.2,14.6-70.9,14.6s-48.4-4.9-70.9-14.6c-22.6-9.7-42-22.7-58.2-39c-16.3-16.3-29.3-35.7-39-58.2\r\n c-9.7-22.6-14.6-46.2-14.6-70.9c0-24.7,4.9-48.4,14.6-70.9c9.7-22.6,22.7-42,39-58.2c16.3-16.3,35.7-29.3,58.2-39\r\n c22.6-9.7,46.2-14.6,70.9-14.6c24.7,0,48.4,4.9,70.9,14.6c22.6,9.7,42,22.7,58.2,39c16.3,16.3,29.3,35.7,39,58.2\r\n c9.7,22.6,14.6,46.2,14.6,70.9C402,244,397.1,267.7,387.4,290.2z"}),e.jsx("path",{d:"M217,294c-14.6,0-26.5,12.2-26.5,26.8c0,14.3,11.5,26.8,26.5,26.8s26.8-12.5,26.8-26.8C243.8,306.2,231.6,294,217,294z"}),e.jsx("path",{d:"M221.5,90.8c-47.1,0-68.7,27.9-68.7,46.7c0,13.6,11.5,19.9,20.9,19.9c18.8,0,11.2-26.8,46.7-26.8c17.4,0,31.4,7.7,31.4,23.7\r\n c0,18.8-19.5,29.6-31,39.4c-10.1,8.7-23.4,23-23.4,53c0,18.1,4.9,23.4,19.2,23.4c17.1,0,20.6-7.7,20.6-14.3\r\n c0-18.1,0.4-28.6,19.5-43.6c9.4-7.3,39-31,39-63.8S266.1,90.8,221.5,90.8z"})]}),e.jsx("h1",{className:"ui-dialog-title",children:r})]})}),e.jsx(Kn,{children:a}),e.jsxs(Wn,{children:[e.jsx(x,{className:"dialog-action-ok dialog-action",onClick:u,children:d}),e.jsx(x,{className:"dialog-action-close dialog-action",onClick:l,children:h})]})]})},exports.ContextMenu=function(n){var r=n.className,o=n.children,i=n.placement,a=n.open,s=n.container,c=n.onOpen,l=n.onClose,u=t.useRef(null),d=Vn(s),h=t.useState(null),p=h[0],f=h[1];bn(function(){a&&l&&l()},[u]);var g=t.useCallback(function(e){var t=e;t.preventDefault(),t.ctrlKey||(f({mouseX:t.pageX-2,mouseY:t.pageY-4}),c&&c())},[c]),m=function(e){e.preventDefault()};t.useEffect(function(){var e=null!=d?d:document;return e.addEventListener("contextmenu",g),e!==document&&document.addEventListener("contextmenu",m),function(){e.removeEventListener("contextmenu",g),document.removeEventListener("contextmenu",m)}},[d,g]);return e.jsx(E,{ref:u,anchorPosition:null!==p?{top:p.mouseY,left:p.mouseX}:void 0,placement:i,open:a,overflow:!1,children:e.jsx(Ln,{className:r,onClose:l,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:u,children:o})})},exports.CrossIcon=On,exports.Dialog=Un,exports.DialogActions=function(t){var n=t.className,r=t.children;return e.jsx("div",{className:y("ui-dialog-actions",n),children:r})},exports.DialogContent=Kn,exports.DialogFooter=Wn,exports.DialogHeader=Jn,exports.DialogTitle=function(n){var r=n.className,o=n.children,i=n.closeDisable,a=n.onClose,s=t.useCallback(function(){a&&!0!==i&&a()},[a,i]),c=void 0!==a;return e.jsxs("h3",{className:y("ui-dialog-title",r),children:[o,c&&e.jsx("button",{type:"button",className:y("ui-dialog-close",i?"ui-dialog-close-disable":null),tabIndex:0,onClick:s,children:e.jsx(On,{})})]})},exports.Divider=function(t){return t.className,e.jsx("hr",{})},exports.DomContainer=v,exports.ErrorDialog=function(n){var r=n.title,o=n.ok,i=n.children,a=n.className,s=n.onClose,c=t.useCallback(function(){s&&s(!0)},[s]),l=null!=o?o:"fermer";return e.jsxs(Un,{open:!0,className:y("ui-dialog-box","ui-dialog-error",a),children:[e.jsx(Jn,{children:e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.533 438.533",children:[e.jsx("path",{d:"M409.133,109.203c-19.608-33.592-46.205-60.189-79.798-79.796C295.736,9.801,259.058,0,219.273,0 c-39.781,0-76.47,9.801-110.063,29.407c-33.595,19.604-60.192,46.201-79.8,79.796C9.801,142.8,0,179.489,0,219.267 c0,39.78,9.804,76.463,29.407,110.062c19.607,33.592,46.204,60.189,79.799,79.798c33.597,19.605,70.283,29.407,110.063,29.407 s76.47-9.802,110.065-29.407c33.593-19.602,60.189-46.206,79.795-79.798c19.603-33.596,29.403-70.284,29.403-110.062 C438.533,179.485,428.732,142.795,409.133,109.203z M387.434,290.213c-9.709,22.556-22.696,41.97-38.969,58.245 c-16.271,16.269-35.689,29.26-58.245,38.965c-22.555,9.712-46.202,14.564-70.946,14.564c-24.744,0-48.391-4.853-70.948-14.564 c-22.554-9.705-41.971-22.696-58.245-38.965c-16.269-16.275-29.259-35.687-38.97-58.245 c-9.707-22.552-14.562-46.206-14.562-70.946c0-24.744,4.854-48.391,14.562-70.948c9.707-22.554,22.697-41.968,38.97-58.245 c16.274-16.269,35.691-29.26,58.245-38.97c22.554-9.704,46.205-14.558,70.948-14.558c24.74,0,48.395,4.851,70.946,14.558 c22.556,9.707,41.97,22.698,58.245,38.97c16.272,16.274,29.26,35.688,38.969,58.245c9.709,22.554,14.564,46.201,14.564,70.948 C402.002,244.011,397.143,267.664,387.434,290.213z"}),e.jsx("path",{d:"M284.368,258.668c-19.219-14.086-40.926-21.129-65.095-21.129c-24.172,0-45.871,7.039-65.096,21.129 c-19.224,14.085-32.358,32.641-39.397,55.671c-1.521,4.757-1.143,9.381,1.141,13.847c2.286,4.469,5.898,7.467,10.85,8.993 c4.758,1.526,9.373,1.143,13.846-1.144c4.471-2.285,7.467-5.899,8.991-10.848c4.759-15.235,13.562-27.556,26.409-36.979 c12.847-9.418,27.263-14.127,43.252-14.127c15.987,0,30.412,4.712,43.251,14.127c12.854,9.424,21.655,21.744,26.412,36.979 c1.52,4.948,4.564,8.562,9.134,10.848c4.568,2.286,9.236,2.67,13.989,1.144c4.761-1.526,8.278-4.524,10.564-8.993 c2.286-4.466,2.669-9.09,1.14-13.847C316.729,291.312,303.591,272.75,284.368,258.668z"}),e.jsx("path",{d:"M146.181,182.725c10.085,0,18.699-3.576,25.837-10.709c7.139-7.135,10.708-15.749,10.708-25.837 c0-10.089-3.569-18.699-10.708-25.837s-15.752-10.709-25.837-10.709c-10.088,0-18.702,3.571-25.84,10.709 c-7.135,7.139-10.707,15.749-10.707,25.837c0,10.088,3.568,18.702,10.707,25.837C127.482,179.152,136.093,182.725,146.181,182.725 z"}),e.jsx("path",{d:"M292.359,109.631c-10.089,0-18.706,3.571-25.845,10.709c-7.132,7.139-10.708,15.749-10.708,25.837 c0,10.088,3.576,18.702,10.708,25.837c7.139,7.137,15.756,10.709,25.845,10.709c10.081,0,18.698-3.576,25.837-10.709 c7.139-7.135,10.708-15.749,10.708-25.837c0-10.089-3.569-18.699-10.708-25.837S302.44,109.631,292.359,109.631z"})]}),e.jsx("h1",{className:"ui-dialog-title",children:r})]})}),e.jsx(Kn,{children:i}),e.jsx(Wn,{children:e.jsx(x,{className:"dialog-action-ok dialog-action",onClick:c,children:l})})]})},exports.Map=function(n){var r=n.customButtons,o=n.onClose,i=n.onSave,a=p(n,["customButtons","onClose","onSave"]),s=t.useState(a.data?a.data:[]),c=s[0],l=s[1],u=function(){return f(void 0,void 0,void 0,function(){return g(this,function(e){return null==i||i(c),[2]})})},d=function(){return f(void 0,void 0,void 0,function(){return g(this,function(e){return null==o||o(),[2]})})};t.useEffect(function(){var e,t,n=null===(e=null==r?void 0:r.saveButton)||void 0===e?void 0:e.addEventListener("click",function(){u()}),o=null===(t=null==r?void 0:r.cancelButton)||void 0===t?void 0:t.addEventListener("click",function(){d()});return function(){var e,t;null===(e=null==r?void 0:r.saveButton)||void 0===e||e.removeEventListener("click",n),null===(t=null==r?void 0:r.cancelButton)||void 0===t||t.removeEventListener("click",o)}},[c]);return e.jsx("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"90%",height:"400px",margin:"20px"},children:e.jsxs(Sn.Provider,{value:{locations:c,setLocations:l},children:[e.jsx(Gn,h({},a)),!r&&e.jsxs("div",{className:"cortex-widget-buttons",children:[e.jsx("button",{className:"cortex-widget-btn cortex-widget-btn-cancel",type:"button",onClick:d,children:"Cancel"}),e.jsx("button",{className:"cortex-widget-btn cortex-widget-btn-save",type:"button",onClick:u,children:"Save"})]})]})})},exports.Menu=Ln,exports.MenuGroup=function(t){var n=t.title,r=t.className,o=t.children;return e.jsxs(e.Fragment,{children:[e.jsx("li",{className:y("ui-group-title",r),children:n}),o]})},exports.MenuItem=Qn,exports.Popper=E,exports.PopupMenu=function(n){var r=n.className,o=n.children,i=n.placement,a=n.open,s=n.anchorPosition,c=n.anchorEl,l=n.onClose,u=t.useRef(null);bn(function(){a&&l&&l()},[u]);return a&&(s||c)?e.jsx(E,{ref:u,anchorPosition:s,anchorEl:c,placement:i,open:a,overflow:!1,className:"ui-menu-popper",children:e.jsx(Ln,{className:r,onClose:l,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:u,children:o})}):null},exports.Scanner=function(n){var r=n.scanConfirmation,o=void 0===r||r,i=n.scanTrackerType,a=void 0===i?"centerText":i,s=p(n,["scanConfirmation","scanTrackerType"]),c=t.useState(!1),l=c[0],u=c[1],d=t.useState(!1),f=d[0],g=d[1],m=t.useState([]),w=m[0],v=m[1],C=function(){u(!1),g(!1)},y=t.useMemo(function(){switch(a){case"outline":return Rt;case"boundingBox":return Mt;case"centerText":return It;default:return}},[a]),A=t.useCallback(function(){C(),s.onScan(w)},[s,w]),T=t.useCallback(function(e){o&&(u(!0),g(!0),v(e))},[s]);return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:"15px",margin:"20px"},children:e.jsx(Zt,h({formats:["qr_code","micro_qr_code","rm_qr_code","maxi_code","pdf417","aztec","data_matrix","matrix_codes","dx_film_edge","databar","databar_expanded","codabar","code_39","code_93","code_128","ean_8","ean_13","itf","linear_codes","upc_a","upc_e"],components:{onOff:!0,torch:!0,tracker:y,finder:!1},scanDelay:2e3,allowMultiple:!1},s,{onScan:T,paused:f}))}),e.jsx($t,h({open:l,onClose:C,onConfirm:A},null==s?void 0:s.scanConfirmDialog))]})},exports.Selected=function(t){var n=t.title,r=t.data,o=t.onClick;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:y("ui-selected-params"),children:[e.jsx("div",{className:y("ui-selected-title"),children:n}),e.jsx("div",{className:y("ui-selected-content"),children:e.jsx(e.Fragment,{children:Array.isArray(r)&&r.map(function(t,n){return e.jsx(e.Fragment,{children:e.jsx("div",{className:y("ui-selected-button"),children:e.jsx("button",{type:"button",onClick:function(){o(t)},className:1===t.selected?"ui-selected-btn":0===t.selected?"ui-not-selected":"ui-new-selected",children:t.name})},n)})})})})]})})},exports.Spinner=function(t){var n=t.className,r=t.variant,o=void 0===r?"indeterminate":r;return e.jsx("div",{className:y("ui-spinner","indeterminate"===o?"ui-spinner-indeterminate":"ui-spinner-determinate",n),children:"loading..."})},exports.TagInput=function(n){var r=n.tags;n.className;var o=n.suggestions,i=n.disableFilter,a=n.onTextChange,s=n.onChange,c=t.useRef(null),l=t.useRef(null),u=t.useRef(null),d=t.useState(""),h=d[0],p=d[1],f=t.useState(!1),g=f[0],w=f[1];bn(function(){w(!1)},[c,l]);var v=t.useCallback(function(e){if(s&&Array.isArray(r)){var t=r.findIndex(function(t){return t.id===e.id});if(!(t<0)){var n=m([],r,!0);n.splice(t,1),s(n)}}},[r,s]),C=t.useCallback(function(e){if(e){var t={id:e.id,label:e.label,value:e.value},n=Array.isArray(r)?m(m([],r,!0),[t],!1):[t];w(!1),s&&s(n),p(""),a&&a("")}},[r,s,a]),y=t.useCallback(function(e){p(e),a&&a(e)},[a]),A=Array.isArray(r)?r.map(function(t,n){return e.jsx(Mn,{tag:t,onDelete:function(){return v(t)}},n)}):[];return e.jsxs("div",{ref:u,className:"ui-taginput",children:[A,e.jsx(In,{ref:c,value:h,onChange:y,onClick:function(){w(!0)}}),e.jsx(Fn,{ref:l,open:g,anchorEl:c,filter:h,tags:r,suggestions:o,disableFilter:i,onSuggestionClick:C})]})},exports.ToggleButton=function(n){var r=n.selected,o=n.value,i=n.size,a=n.children,s=n.className,c=n.onChange,l=t.useCallback(function(){c&&c(o)},[c,o]);return e.jsx("button",{type:"button",className:y("ui-toggleBtn",void 0!==i?"ui-toggleBtn-size-".concat(i):"ui-toggleBtn-size-md",!0===r?"ui-toggleBtn-selected":null,s),onClick:l,children:a})},exports.Tooltip=function(n){var r=n.children,o=n.title;n.anchorEl;var i=n.enterDelay,a=void 0===i?0:i,s=n.leaveDelay,c=void 0===s?0:s,l=n.className,u=n.disabled,d=t.useState(void 0),p=d[0],f=d[1],g=t.useState(!1),m=g[0],w=g[1],v=t.useState(!0),C=v[0],A=v[1],T=t.useState(!1),x=T[0],B=T[1],b=t.useRef(),R=t.useRef();t.useEffect(function(){!0===u&&w(!1)},[u]);var M,I=function(){w(!0)},D=function(){w(!1)},k=function(e){x||(clearTimeout(b.current),clearTimeout(R.current),p||f(e.currentTarget),R.current=setTimeout(function(){D()},c))},F=function(e){x||(clearTimeout(b.current),clearTimeout(R.current),p||f(e.currentTarget),!0!==u&&(b.current=setTimeout(function(){I()},a)))},S=function(e){B(!0),clearTimeout(b.current),clearTimeout(R.current),p||f(e.currentTarget),!0!==u&&(b.current=setTimeout(function(){I()},2e3))},P=function(e){clearTimeout(b.current),clearTimeout(R.current),p||f(e.currentTarget),R.current=setTimeout(function(){D()},3e3)};if(r){var q=h(h({},r.props),{onFocus:function(e){p||f(e.currentTarget),b.current=setTimeout(function(){I()},a)},onMouseEnter:function(e){x||(clearTimeout(b.current),clearTimeout(R.current),p||f(e.currentTarget),!0!==u&&(b.current=setTimeout(function(){I()},a)))},onMouseLeave:k,onMouseOver:F,onTouchStart:S,onTouchEnd:P});M=t.cloneElement(r,q)}var j=m||!C;return e.jsxs(e.Fragment,{children:[M,e.jsx(E,{role:"tooltip",anchorEl:p,open:j,className:y("ui-tooltip",l),onMouseOver:x?void 0:F,onMouseLeave:x?void 0:k,onTouchStart:S,onTouchEnd:P,children:e.jsx(Bn,{trigger:m,onEnter:function(){A(!1)},onExited:function(){A(!0)},children:e.jsx("div",{className:"ui-tooltip-content",children:o})})})]})},exports.WarningDialog=function(n){var r=n.title,o=n.ok,i=n.children,a=n.className,s=n.onClose,c=t.useCallback(function(){s&&s(!0)},[s]),l=null!=o?o:"fermer";return e.jsxs(Un,{open:!0,className:y("ui-dialog-box","ui-dialog-warning",a),children:[e.jsx(Jn,{children:e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 512 512",children:[e.jsx("polygon",{fill:"#FFA418",points:"0,477.703 256,477.703 289.391,256 256,34.297"}),e.jsx("polygon",{fill:"#FF8A1E",points:"256,34.297 256,477.703 512,477.703"}),e.jsx("circle",{fill:"#324860",cx:"256",cy:"405.359",r:"16.696"}),e.jsx("rect",{x:"239.304",y:"177.185",fill:"#324860",width:"33.391",height:"178.087"})]}),e.jsx("h1",{className:"ui-dialog-title",children:r})]})}),e.jsx(Kn,{children:i}),e.jsx(Wn,{children:e.jsx(x,{className:"dialog-action-ok dialog-action",onClick:c,children:l})})]})},exports.forwardRef=w;
19
10
  //# sourceMappingURL=index.js.map