1 line
95 KiB
JavaScript
1 line
95 KiB
JavaScript
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t,r){"use strict";t.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getVersion=function(){return o},t.getConfig=function(e){if(Object.prototype.hasOwnProperty.call(a,e))return a[e];if(Object.prototype.hasOwnProperty.call(i,e))return i[e];return},t.setConfig=function(e){e&&"object"==(void 0===e?"undefined":n(e))&&Object.assign(a,e)};var o="0.0.1.0502.1346",i={embedProxyMode:"auto"},a={}},function(e,t,r){"use strict";t.__esModule=!0,t.createUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}},function(e,t,r){"use strict";t.__esModule=!0;var n={};n="undefined"!=typeof GameGlobal?Object.assign({},GameGlobal):"undefined"==typeof window?{setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return setTimeout.apply(void 0,arguments)})),setInterval:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return setInterval.apply(void 0,arguments)})),clearTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return clearTimeout.apply(void 0,arguments)})),clearInterval:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return clearInterval.apply(void 0,arguments)}))}:window,t.default=n},function(e,t,r){"use strict";t.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.toAny=function(e,t){if(null==e)return t;var r=function(e){if("string"!=typeof e)return void 0===e?"undefined":n(e);try{var t=JSON.parse(e);return void 0===t?"undefined":n(t)}catch(t){var r=parseFloat(e);return isNaN(r)||""+r!==e?"string":"number"}}(e);null!=t&&(r=void 0===t?"undefined":n(t));switch(r){case"number":return function(e){try{return JSON.parse(e)}catch(t){return parseFloat(e)}}(e);case"boolean":return function(e){return!!e&&"false"!=e&&"0"!=e}(e);case"object":return function(e,t){if("object"===(void 0===e?"undefined":n(e)))return e;try{return JSON.parse(e)}catch(e){}return t}(e,t);case"string":return function(e,t){try{var r=void 0===e?"undefined":n(e);if("string"===r)return e;if("boolean"===r)return e?"true":"false";if("number"===r)return""+e;if("object"===r)return JSON.stringify(e)}catch(e){}return t}(e,t)}return t}},function(e,t,r){"use strict";t.__esModule=!0,t.printError=function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(t=console).error.apply(t,["[IScan] ",e].concat(n))},t.printWarn=function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(t=console).warn.apply(t,["[IScan] ",e].concat(n))},t.printDebug=function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(t=console).log.apply(t,["[IScan] ",e].concat(n))}},function(e,t,r){"use strict";t.__esModule=!0,t.isReadyCalled=function(){return c},r(10);var n=r(15),o=r(0),i=r(6),a=r(4),u=null,c=!1;t.default=Object.assign({},{config:function(e){return e&&(0,o.setConfig)(e),u||(u=Promise.resolve().then((function(){return(0,a.printDebug)("-------------------------------------"),(0,a.printDebug)("sdk_version:",(0,o.getVersion)()),(0,a.printDebug)("support_list:",n.supportList.map((function(e){return e.name+":"+e.support})).join(", ")),(0,a.printDebug)("-------------------------------------"),(0,i.initWxJssdk)(),Promise.resolve().then((function(){c=!0})).catch((function(e){throw u=null,e}))})))},onScanListener:n.onScanListener,offScanListener:n.offScanListener,setStatusListener:n.setStatusListener,getStatus:n.getStatus,startScan:n.startScan,stopScan:n.stopScan,scanVideo:n.scanVideo,scanImage:n.scanImage,clear:n.clear})},function(e,t,r){"use strict";t.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.isWxEnv=p,t.isWxMiniProgramEnv=h,t.isSupportWxScan=function(){var e=l();if(h())return!0;if((0,a.resolveUseParentProxy)()&&p())return!0;return!!(p()&&A&&e&&e.scanQRCode)},t.initWxJssdk=v,t.startScanForWx=function(e){if(h())return function(e){return new Promise((function(t){var r=l();if(r&&r.scanCode){var n=e||{},o=n.scanType,i=void 0===o?["qrCode","barCode"]:o,a=n.onlyFromCamera,u=void 0!==a&&a;r.scanCode({onlyFromCamera:u,scanType:i,success:function(e){t({success:!0,result:e.result,code:e.result})},fail:function(e){t({success:!1,error:y(e)})}})}else t({success:!1,error:"微信小程序API不可用"})}))}(e);return v().then((function(){return new Promise((function(t,r){var n=e||{},o=n.needResult,i=void 0===o?1:o,a=n.scanType,u=void 0===a?["qrCode","barCode"]:a,c=l();c&&c.scanQRCode?c.scanQRCode({needResult:i,scanType:u,success:function(e){t({success:!0,result:e.resultStr,code:e.resultStr})},cancel:function(){t({success:!1,error:"用户取消扫码"})},fail:function(e){r(e)}}):r(new Error("wx.scanQRCode is not supported"))}))}))};var o=r(0),i=r(7),a=r(8),u=r(21),c=r(3),s=null,A=!1;function l(){return"undefined"!=typeof wx?wx:"undefined"!=typeof window?window.wx:null}function f(){var e=(0,o.getConfig)("wxJssdkSignatureUrl");if(e)return String(e).split("#")[0];if((0,a.resolveUseParentProxy)())try{if("undefined"!=typeof window&&window.parent&&window.parent!==window)return window.parent.location.href.split("#")[0]}catch(e){}return"undefined"==typeof window?"":window.location.href.split("#")[0]}function d(){var e=(0,c.toAny)((0,o.getConfig)("initWechatJssdk"),{});if(e.sdkConfig)return Promise.resolve((0,c.toAny)(e.sdkConfig,{}));var t=(0,c.toAny)(e.apiUrl,"");return t?(0,u.request)({url:t,method:"GET",data:{url:f()}}).then((function(e){var t=(0,c.toAny)(e.data,{});if(!t)return null;if(0!==t.code)throw new Error(t.msg||"wechat jssdk config fetch failed");return t.data?t.data:t})):Promise.reject(new Error("initWechatJssdk.apiUrl or initWechatJssdk.sdkConfig is required, but not found"))}function p(){if((0,i.readWxLikeEnvFromWindow)("undefined"!=typeof window?window:null))return!0;if("undefined"!=typeof window)try{if(window.top&&window.top!==window&&(0,i.readWxLikeEnvFromWindow)(window.top))return!0}catch(e){}return!(!(0,a.resolveUseParentProxy)()||!0!==(0,i.getParentWxEnvReport)())}function h(){var e=l();return!(!e||!e.scanCode)}function v(){return p()?s||(s=Promise.all([new Promise((function(e,t){var r=l();if(r&&r.config&&r.scanQRCode)e(r);else{var n=(0,c.toAny)((0,o.getConfig)("initWechatJssdk"),{}),i=(0,c.toAny)(n.sdkUrl,"https://res.wx.qq.com/open/js/jweixin-1.6.0.js");if(i){var a=document.getElementById("__wx_jssdk__");if(a)return a.addEventListener("load",(function(){return e(l())})),void a.addEventListener("error",t);(a=document.createElement("script")).id="__wx_jssdk__",a.src=i,a.onload=function(){return e(l())},a.onerror=t,document.head.appendChild(a)}else t(new Error("initWechatJssdk.sdkUrl is required, but not found"))}})),d()]).then((function(e){var t=e[0],r=e[1];if(!t||!t.config)throw new Error("wechat jssdk is not ready");if(!r)throw new Error("wechat jssdk config is empty");var n=r.jsApiList||[];return-1===n.indexOf("scanQRCode")&&n.push("scanQRCode"),new Promise((function(e,o){t.ready((function(){A=!0,e(t)})),t.error((function(e){A=!1,s=null,o(e)})),t.config(Object.assign({},r,{jsApiList:n}))}))})).catch((function(e){throw A=!1,s=null,e}))):Promise.resolve()}function y(e){if(!e)return"扫码失败";var t=e.errMsg||"扫码失败";if("object"===(void 0===e?"undefined":n(e))){var r=[];e.errCode&&r.push("错误代码: "+e.errCode),e.errDesc&&r.push("错误描述: "+e.errDesc);try{var o=JSON.stringify(e,null,2);o&&"{}"!==o&&o!=='{"errMsg":"'+t+'"}'?r.push(o):r.push(t)}catch(e){}r.length&&(t=r.join("\n"))}return t}},function(e,t,r){"use strict";t.__esModule=!0,t.setParentWxEnvReport=function(e){n=!!e},t.getParentWxEnvReport=function(){return n},t.readWxLikeEnvFromWindow=function(e){if(!e)return!1;try{var t=e.navigator;if(t){var r=t.userAgent||"";if(/micromessenger/i.test(r))return!0;if(/wxwork/i.test(r))return!0}if(e.WeixinJSBridge)return!0}catch(e){}return!1};var n=null},function(e,t,r){"use strict";t.__esModule=!0,t.hasDistinctParentWindow=o,t.resolveUseParentProxy=function(){var e=(0,n.getConfig)("embedProxyMode");if(!1===e||"local"===e||"off"===e)return!1;var t=o();if(!t)return!1;if(!0===e||"on"===e||"parent"===e)return!0;if("auto"===e||null==e)return t;return!!e};var n=r(0);function o(){if("undefined"==typeof window)return!1;try{return null!=window.parent&&window.parent!==window}catch(e){return!0}}},function(e,t,r){"use strict";var n=a(r(5)),o=a(r(2)),i=r(25);function a(e){return e&&e.__esModule?e:{default:e}}var u=(0,i.exportSDK)(n.default,null,"config","setStatusListener","onScanListener","offScanListener","stopScan","startScan","scanImage","clear");(0,i.installEmbedHost)(n.default),void 0!==o.default&&(o.default.IScan=u,function(){if(o.default.__IScanReady__&&o.default.__IScanReady__(),o.default.dispatchEvent)if("function"==typeof Event)o.default.dispatchEvent(new Event("IScanReady"));else if("undefined"!=typeof document){var e=document.createEvent("Event");e.initEvent("IScanReady",!0,!0),o.default.dispatchEvent(e)}}()),e.exports={IScan:u}},function(e,t,r){"use strict";r(2),r(11)},function(e,t,r){"use strict";var n=r(12);"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])}return r},writable:!0,configurable:!0}),(0,n.polyfill)()},function(e,t,r){(function(t,r){var n;n=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,i=void 0,a=void 0,u=function(e,t){p[o]=e,p[o+1]=t,2===(o+=2)&&(a?a(h):w())},c="undefined"!=typeof window?window:void 0,s=c||{},A=s.MutationObserver||s.WebKitMutationObserver,l="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(h,1)}}var p=new Array(1e3);function h(){for(var e=0;e<o;e+=2)(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0;o=0}var v,y,m,g,w=void 0;function b(e,t){var r=this,n=new this.constructor(E);void 0===n[C]&&B(n);var o=r._state;if(o){var i=arguments[o-1];u((function(){return D(o,n,i,r._result)}))}else P(r,n,e,t);return n}function S(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(E);return T(t,e),t}l?w=function(){return t.nextTick(h)}:A?(y=0,m=new A(h),g=document.createTextNode(""),m.observe(g,{characterData:!0}),w=function(){g.data=y=++y%2}):f?((v=new MessageChannel).port1.onmessage=h,w=function(){return v.port2.postMessage(0)}):w=void 0===c?function(){try{var e=Function("return this")().require("vertx");return void 0!==(i=e.runOnLoop||e.runOnContext)?function(){i(h)}:d()}catch(e){return d()}}():d();var C=Math.random().toString(36).substring(2);function E(){}var _={error:null};function I(e){try{return e.then}catch(e){return _.error=e,_}}function x(t,r,n){r.constructor===t.constructor&&n===b&&r.constructor.resolve===S?function(e,t){1===t._state?R(e,t._result):2===t._state?O(e,t._result):P(t,void 0,(function(t){return T(e,t)}),(function(t){return O(e,t)}))}(t,r):n===_?(O(t,_.error),_.error=null):void 0===n?R(t,r):e(n)?function(e,t,r){u((function(e){var n=!1,o=function(e,t,r,n){try{e.call(t,r,n)}catch(e){return e}}(r,t,(function(r){n||(n=!0,t!==r?T(e,r):R(e,r))}),(function(t){n||(n=!0,O(e,t))}),e._label);!n&&o&&(n=!0,O(e,o))}),e)}(t,r,n):R(t,r)}function T(e,t){var r,n;e===t?O(e,new TypeError("You cannot resolve a promise with itself")):(n=typeof(r=t),null===r||"object"!==n&&"function"!==n?R(e,t):x(e,t,I(t)))}function M(e){e._onerror&&e._onerror(e._result),k(e)}function R(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&u(k,e))}function O(e,t){void 0===e._state&&(e._state=2,e._result=t,u(M,e))}function P(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=r,o[i+2]=n,0===i&&e._state&&u(k,e)}function k(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)n=t[a],o=t[a+r],n?D(r,n,o,i):o(i);e._subscribers.length=0}}function D(t,r,n,o){var i=e(n),a=void 0,u=void 0,c=void 0,s=void 0;if(i){if((a=function(e,t){try{return e(t)}catch(e){return _.error=e,_}}(n,o))===_?(s=!0,u=a.error,a.error=null):c=!0,r===a)return void O(r,new TypeError("A promises callback cannot return that same promise."))}else a=o,c=!0;void 0!==r._state||(i&&c?T(r,a):s?O(r,u):1===t?R(r,a):2===t&&O(r,a))}var U=0;function B(e){e[C]=U++,e._state=void 0,e._result=void 0,e._subscribers=[]}var V=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(E),this.promise[C]||B(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?R(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&R(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===S){var o=I(e);if(o===b&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===j){var i=new r(E);x(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,r){var n=this.promise;void 0===n._state&&(this._remaining--,2===e?O(n,r):this._result[t]=r),0===this._remaining&&R(n,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;P(e,void 0,(function(e){return r._settledAt(1,t,e)}),(function(e){return r._settledAt(2,t,e)}))},e}(),j=function(){function t(e){this[C]=U++,this._result=this._state=void 0,this._subscribers=[],E!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){T(e,t)}),(function(t){O(e,t)}))}catch(t){O(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var r=this.constructor;return e(t)?this.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return j.prototype.then=b,j.all=function(e){return new V(this,e).promise},j.race=function(e){var t=this;return n(e)?new t((function(r,n){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(r,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},j.resolve=S,j.reject=function(e){var t=new this(E);return O(t,e),t},j._setScheduler=function(e){a=e},j._setAsap=function(e){u=e},j._asap=u,j.polyfill=function(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=j},j.Promise=j,j},e.exports=n()}).call(this,r(13),r(14))},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,s=[],A=!1,l=-1;function f(){A&&c&&(A=!1,c.length?s=c.concat(s):l=-1,s.length&&d())}function d(){if(!A){var e=u(f);A=!0;for(var t=s.length;t;){for(c=s,s=[];++l<t;)c&&c[l].run();l=-1,t=s.length}c=null,A=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new p(e,t)),1!==s.length||A||u(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";t.__esModule=!0,t.supportList=void 0,t.isScanning=C,t.clear=function(){for(var e=0;e<f.length;e++){f[e].cancel()}f.length=0,y()},t.onScanListener=function(e,t,r,n){if(!t||"string"!=typeof t)return;if("function"!=typeof e)return;for(var o=null,i=0;i<f.length;i++){var a=f[i];if(a.key===t){o=a;break}}o?(o.level=n,o.match=r,o.listener=e):(o={key:t,match:r||"",level:n||0,listener:e,cancel:function(){var e=f.indexOf(o);if(-1!==e)for(var t=f.splice(e,1),r=0;r<t.length;r++){var n=t[r];n.listener&&n.listener({cancel:1})}}},f.push(o));return f.sort((function(e,t){return t.level-e.level})),y(),o},t.offScanListener=function(e){for(var t=0;t<f.length;t++){var r=f[t];if("string"==typeof e){if(r.key===e){r.cancel();break}}else if(r.listener===e){r.cancel();break}}y()},t.setStatusListener=function(e){if("function"!=typeof e)return;l=e},t.getStatus=function(){return A},t.stopScan=function(){if(!C())return;S().then((function(){b()}))},t.startScan=function(){if(C()||p||Date.now()<h)return;Promise.resolve().then((function(){w();var e=new Promise((function(e){d=e})),t=Promise.resolve();return(0,n.inRuntime)()?t=function e(){return(0,n.bridgeAsync)("startScan",{closeable:!0}).then((function(t){return C()&&t&&t.result?g(t.result)?t:C()?e():t:t})).catch((function(t){return C()&&t&&t.result?g(t.result)?t:C()?e():t:t}))}():(0,i.isSupportWxScan)()?t=(0,i.startScanForWx)({needResult:1,scanType:["qrCode","barCode"]}).then((function(e){return C()&&e&&e.result?(g(e.result),e):e})).catch((function(e){return C()&&e&&e.result?(g(e.result),e):e})):(0,o.isSupportWebScan)()?((0,o.unlockScanBeep)(),t=(0,o.startScanForWeb)((0,u.getConfig)("webScanCanvasStyle"),g)):(0,o.isSupportImageScan)()?t=function e(){return(0,o.startScanForImage)().then((function(t){return C()&&t&&t.result?g(t.result)?t:C()?e():t:t})).catch((function(t){return C()&&t&&t.result?g(t.result)?t:C()?e():t:t}))}():(0,s.printDebug)("Not support scanner"),Promise.race([t,e])})).finally((function(){d=null,b()}))},t.scanVideo=function(){if(!(0,o.isSupportWebScan)())return void(0,s.printDebug)("Not support video scanner");if(C()||p||Date.now()<h)return;(0,o.unlockScanBeep)(),Promise.resolve().then((function(){return w(),(0,o.startScanForWeb)((0,u.getConfig)("webScanCanvasStyle"),g).then((function(e){throw e&&e.result&&g(e.result),e.error})).catch((function(e){}))})).finally((function(){b()}))},t.scanImage=function(){if(!(0,o.isSupportImageScan)())return void(0,s.printDebug)("Not support image scanner");if(C()||p||Date.now()<h)return;Promise.resolve().then((function(){return w(),(0,o.startScanForImage)().then((function(e){throw e&&e.result&&g(e.result),e.error})).catch((function(e){}))})).finally((function(){b()}))};var n=r(16),o=r(17),i=r(6),a=r(24),u=r(0),c=r(3),s=r(4),A="ready",l=null,f=[],d=null,p=!1,h=0;function v(e){if("string"!=typeof e)return e;var t=e.indexOf(",");if(-1===t)return e;var r=e.substring(0,t).trim(),n=e.substring(t+1).trim();if(""===r||""===n)return e;var o=r.toLowerCase();return{ean13:!0,"ean-13":!0,ean_13:!0,ean8:!0,"ean-8":!0,ean_8:!0,upca:!0,"upc-a":!0,upc_a:!0,upce:!0,"upc-e":!0,upc_e:!0,code128:!0,"code-128":!0,code_128:!0,code39:!0,"code-39":!0,code_39:!0,code93:!0,"code-93":!0,code_93:!0,itf:!0,itf14:!0,"itf-14":!0,itf_14:!0,codabar:!0,pdf417:!0,"pdf-417":!0,pdf_417:!0,qrcode:!0,"qr-code":!0,qr_code:!0,datamatrix:!0,"data-matrix":!0,data_matrix:!0,aztec:!0}.hasOwnProperty(o)?n:e}function y(){f.length>0?(0,a.startScanner)((function(e){!function(e){if(!function(e){for(var t=0;t<f.length;t++){var r=f[t];if(r.listener&&m(e,r.match))return!0}return!1}(e))return;if(C()){var t=function(){var e=d;return d=null,b(),e}();return p=!0,S().then((function(){setTimeout((function(){p=!1}),0)})),g(e),void(t&&t({result:e}))}g(e)}(e=v(e))})):(0,a.stopScanner)()}function m(e,t){var r=null;return t&&"string"==typeof t&&(r=new RegExp(t)),!r||r.test(e)}function g(e){e=v(e);for(var t=!1,r=0;r<f.length;r++){var n=f[r];if(n.listener&&m(e,n.match)){t=!0,n.listener({result:e,key:n.key});break}}return t&&(h=Date.now()+(0,c.toAny)((0,u.getConfig)("scanRestartDelay"),500)),t}function w(){"scanning"!==A&&(A="scanning",l&&l({status:"scanning"}))}function b(){"ready"!==A&&(A="ready",l&&l({status:"ready"}))}function S(){return(0,n.inRuntime)()?(0,n.bridgeAsync)("stopScan").catch((function(){})):(0,o.isSupportWebScan)()?(0,o.stopScanForWeb)().catch((function(){})):Promise.resolve()}function C(){return"scanning"===A}t.supportList=[{name:"bridge",support:(0,n.inRuntime)()},{name:"wx",support:(0,i.isSupportWxScan)()},{name:"web",support:(0,o.isSupportWebScan)()},{name:"image",support:(0,o.isSupportImageScan)()},{name:"scanner",support:!0}]},function(e,t,r){"use strict";t.__esModule=!0,t.inRuntime=f,t.onEvent=function(e,t){if(l(),e&&t&&"function"==typeof t){var r=u[e]||[];-1==r.indexOf(t)&&r.push(t),u[e]=r}},t.offEvent=function(e,t){if(l(),e&&t&&"function"==typeof t){var r=u[e]||[],n=r.indexOf(t);n>=0&&r.splice(n,1)}},t.bridgeSync=d,t.bridgeAsync=function(e,t,r){return new Promise((function(n,o){if(f()){var a=!1,u=null;r>0&&(u=setTimeout((function(){a=!0,u=null,o("bridgeAsync timeout")}),r));var s=(0,i.createUUID)()+"_"+Date.now();A=s,(l=function(e,t){a||(u&&clearTimeout(u),0==e?n(t):o(t))})&&"function"==typeof l&&(c[A]=l),d(e,Object.assign({request_id:s},t))}else o("Can't bridgeAsync, because not in runtime");var A,l})).then((function(r){var n=[e];return t&&(n.push("params:"),n.push(t)),r&&(n.push("resp:"),n.push(r)),o.printDebug.apply(void 0,["bridge resp >>>"].concat(n)),r})).catch((function(r){throw t?(0,o.printWarn)("bridge err >>>",e,"params:",t,r):(0,o.printWarn)("bridge err >>>",e,r),r}))};var n=r(3),o=r(4),i=r(1),a=r(0),u={},c={};function s(){return"undefined"==typeof window?null:window}function A(){return(0,a.getConfig)("bridgeName")?(0,a.getConfig)("bridgeName"):"__bridge_client__"}function l(){var e=s();if(e){var t=A()+"_handle_callback";e[t]||(e[t]=function(e){var t=(0,n.toAny)(e,{}),r=t.method,o=t.payload,i=t.code,a=t.request_id,s=(0,n.toAny)(o,{});a?c[a]&&c[a](i,s):u[r]&&u[r].forEach((function(e){e&&e(s)}))})}}function f(){var e=s();return!!e&&!!e[A()]&&!1!==(0,a.getConfig)("bridgeEnabled")}function d(e,t){l();var r=(0,n.toAny)(function(e){var t=e.split("."),r=s();if(r){for(;t.length>1;)r=r[t.shift()];if(r&&1==t.length&&r.hasOwnProperty(t[0])){for(var n,o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return(n=r)[t[0]].apply(n,i)}}}(A()+".call",e,(0,n.toAny)(t,""))),i=[e];return t&&(i.push("params:"),i.push(t)),r&&(i.push("result:"),i.push(r)),o.printDebug.apply(void 0,["bridge call >>>"].concat(i)),r}},function(e,t,r){"use strict";t.__esModule=!0,t.unlockScanBeep=function(){if(!1===(0,a.getConfig)("webScanBeepEnabled")||h)return;var e=_();if(!e)return;try{e.load&&e.load(),h=!0}catch(e){}},t.isSupportWebScan=function(){return"undefined"!=typeof navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&!!S()&&!1!==(0,a.getConfig)("webScanEnabled")},t.isSupportImageScan=function(){return"undefined"!=typeof document&&"undefined"!=typeof URL&&URL.createObjectURL},t.stopScanForWeb=function(){return Promise.resolve().then((function(){g()}))},t.startScanForImage=function(){return new Promise((function(e){var t=document.createElement("input");t.type="file",t.accept="image/*",t.style.display="none";var r=!1,n=function(t){r||(r=!0,v("__webscan_image_input__"),e(t))};t.id="__webscan_image_input__",t.onchange=function(){n(t.files&&t.files[0])},t.oncancel=function(){n(null)},document.body.appendChild(t),t.click()})).then((function(e){return e?E((0,a.getConfig)("webScanType")).then((function(t){return function(e,t){if(!t)return Promise.resolve(null);if("undefined"!=typeof createImageBitmap)return createImageBitmap(t).then((function(t){return e.detect(t).then((function(e){return t.close&&t.close(),e&&e[0]})).catch((function(e){throw t.close&&t.close(),e}))}));return new Promise((function(r,n){var o=new Image,i=URL.createObjectURL(t);o.onload=function(){e.detect(o).then((function(e){URL.revokeObjectURL(i),r(e&&e[0])})).catch((function(e){URL.revokeObjectURL(i),n(e)}))},o.onerror=function(e){URL.revokeObjectURL(i),n(e)},o.src=i}))}(t,e)})):null})).then((function(e){return e&&e.rawValue?{result:e.rawValue}:{success:!1,error:"未识别到二维码或条形码"}}))},t.startScanForWeb=function(e,t){var r=null;return new Promise((function(n,o){try{g(),s.uuid=(0,i.createUUID)(),s.finish=!1,r=s.uuid;var u,c=y("video","__webscan_video__","display: none",!1),A=!1!==(0,a.getConfig)("webScanCanvasEnabled"),l=e||"position: fixed; width: 300px; height: 300px; top: 0; left: 0; z-index: 9999;",f=y("canvas","__webscan_canvas__",l+" display: none;",!0);f.style.display,f.style.cssText=l,u=f.style.display;var d=function(e,t,r){var n=e.getBoundingClientRect(),o=n.width||parseFloat(e.style.width)||t,i=n.height||parseFloat(e.style.height)||r;return{width:Math.max(1,Math.round(o)),height:Math.max(1,Math.round(i))}}(f,300,240);f.style.display="none";var p=null;A&&((p=y("button","__webscan_close_button__","display: none;",!0)).type="button",p.innerHTML="x",p.setAttribute("aria-label","close"),p.onclick=function(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),s.uuid===r&&(s.uuid=null)},p.uuid=s.uuid);var h=f.getContext("2d");c.width=300,c.height=300,c.uuid=s.uuid,f.uuid=s.uuid,E((0,a.getConfig)("webScanType")).then((function(e){return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(t){return{detector:e,stream:t}}))})).then((function(e){var i=e.detector,l=e.stream;if(s.uuid!==r)return m(l),void o({cancel:1});s.stream=l,s.videoEl=c;var v=function(e){var t=(0,a.getConfig)("webScanVideoMirror");if("boolean"==typeof t)return t;try{var r=e&&e.getVideoTracks&&e.getVideoTracks()[0],n=r&&r.getSettings&&r.getSettings();if(n&&"environment"===n.facingMode)return!1;if(n&&"user"===n.facingMode)return!0}catch(e){}return!("undefined"!=typeof navigator&&/Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent||""))}(l),y=!0===(0,a.getConfig)("webScanVideoMirrorVertical");c.srcObject=l,c.setAttribute("playsinline",!0),c.play(),f.style.display="none";var g=!1,w=!1,S=!1,C=function(){if(!S){S=!0,m(l),s.uuid!==r&&s.stream!==l||(s.stream=null,s.videoEl=null);try{c.pause&&c.pause(),c.srcObject=null}catch(e){}p&&(p.style.display="none")}},E=function e(){try{if(c.readyState===c.HAVE_ENOUGH_DATA&&!g){f.width=d.width,f.height=d.height;var l=(m=c.videoWidth,S=c.videoHeight,E=f.width,I=f.height,{scale:x=Math.max(E/m,I/S),width:T=m*x,height:M=S*x,x:(E-T)/2,y:(I-M)/2});h.setTransform(v?-1:1,0,0,y?-1:1,v?f.width:0,y?f.height:0),h.drawImage(c,l.x,l.y,l.width,l.height),h.setTransform(1,0,0,1,0,0),A&&!w&&(w=!0,f.style.display=u||"",function(e,t){if(!e)return;var r=(0,a.getConfig)("webScanCloseButtonStyle")||"";e.style.cssText="width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 20px; line-height: 28px; text-align: center; cursor: pointer; z-index: 10000;"+function(e){var t=e.getBoundingClientRect(),r=Math.max(0,Math.round(t.top+6)),n=Math.max(0,Math.round(t.right-34));return"position: fixed; top: "+r+"px; left: "+n+"px;"}(t)+r}(p,f),p&&(p.style.display="block")),g=!0,i.detect(c).then((function(e){var o=e&&e[0];if(o&&o.rawValue&&s.uuid==r){if(!t||!t(o.rawValue))return;!function(e,t,r,n,o,i,a){var u=n.cornerPoints;if(u&&u.length){for(var c=0;c<u.length;c++)b(e,t,r,u[c],u[(c+1)%u.length],"#FF3B58",o,i,a);return}if(n.boundingBox)for(var s=n.boundingBox,A=[{x:s.x,y:s.y},{x:s.x+s.width,y:s.y},{x:s.x+s.width,y:s.y+s.height},{x:s.x,y:s.y+s.height}],l=0;l<A.length;l++)b(e,t,r,A[l],A[(l+1)%A.length],"#FF3B58",o,i,a)}(h,f.width,f.height,o,v,y,l),function(){if(!1===(0,a.getConfig)("webScanBeepEnabled"))return;var e=_();if(!e)return;try{e.muted=!1,e.volume=1,e.currentTime=0;var t=e.play();t&&t.catch&&t.catch((function(){}))}catch(e){}}(),s.uuid=null,s.finish=!0,C(),n({result:o.rawValue})}})).catch((function(){})).finally((function(){g=!1}))}}catch(e){g=!1}var m,S,E,I,x,T,M;s.uuid==r?requestAnimationFrame((function(){e()})):(s.finish||(o({cancel:1}),s.finish=!0),C()),s.finish&&C()};requestAnimationFrame((function(){E()}))})).catch((function(e){o({error:e})}))}catch(e){o({error:e})}})).finally((function(){v("__webscan_video__",r),v("__webscan_canvas__",r),v("__webscan_close_button__",r)}))};var n,o=r(18),i=r(1),a=r(0),u=r(20),c=(n=u)&&n.__esModule?n:{default:n};var s={uuid:null,finish:!0,stream:null,videoEl:null},A=c.default,l="undefined"!=typeof document&&document.currentScript&&document.currentScript.src,f=null,d=null,p=null,h=!1;function v(e,t){try{var r=document.getElementById(e);if(t&&r&&r.uuid!==t)return;document.body.removeChild(r)}catch(e){}}function y(e,t,r,n){var o=document.getElementById(t);return o||((o=document.createElement(e)).id=t,o.style=r,n&&document.body.appendChild(o)),o}function m(e){try{var t=e&&e.getTracks&&e.getTracks();if(t&&t.length)for(var r=0;r<t.length;r++)t[r].stop()}catch(e){}}function g(){s.uuid=null,m(s.stream);try{s.videoEl&&(s.videoEl.pause&&s.videoEl.pause(),s.videoEl.srcObject=null)}catch(e){}s.stream=null,s.videoEl=null}function w(e,t,r,n,o,i){var a=e.x,u=e.y;return i&&(a=i.x+e.x*i.scale,u=i.y+e.y*i.scale),{x:n?t-a:a,y:o?r-u:u}}function b(e,t,r,n,o,i,a,u,c){var s=w(n,t,r,a,u,c),A=w(o,t,r,a,u,c);e.beginPath(),e.moveTo(s.x,s.y),e.lineTo(A.x,A.y),e.lineWidth=4,e.strokeStyle=i,e.stroke()}function S(){return"undefined"!=typeof BarcodeDetector?BarcodeDetector:o.BarcodeDetector}function C(){var e=S();return"undefined"==typeof BarcodeDetector&&o.prepareZXingModule?(f||(f=(0,o.prepareZXingModule)({fireImmediately:!0,overrides:{locateFile:function(e){return e&&-1!==e.indexOf(".wasm")?l?new URL("lib/reader.wasm",l).href:"./lib/reader.wasm":e}}}).then((function(){return e}))),f):Promise.resolve(e)}function E(e){return C().then((function(t){if(!t)throw new Error("BarcodeDetector is not supported");var r=function(e){var t=[];return e||(e=["qrCode","barCode"]),e.includes("qrCode")&&t.push("qr_code"),e.includes("barCode")&&t.push("ean_13","ean_8","code_128","code_39","codabar","upc_a","upc_e","itf","aztec","data_matrix","pdf417"),t}(e);return t.getSupportedFormats?t.getSupportedFormats().then((function(e){var n=r.filter((function(t){return-1!==e.indexOf(t)}));if(!n.length)throw new Error("No supported barcode formats");return new t({formats:n})})):new t({formats:r})}))}function _(){var e=(0,a.getConfig)("webScanBeepAudio")||A;if(!e||"undefined"==typeof Audio)return null;if(!d||p!==e){p=e,h=!1,(d=new Audio(e)).preload="auto";try{d.load&&d.load()}catch(e){}}return d}},function(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n=r(19);t.BarcodeDetector=n.t,t.ZXING_CPP_COMMIT=n.s,t.ZXING_WASM_SHA256=n.i,t.ZXING_WASM_VERSION=n.o,t.prepareZXingModule=n.r,t.purgeZXingModule=n.a,t.setZXingModuleOverrides=n.n},function(e,t){var r=[["All","*","*"," ",0,"All"],["AllReadable","*","r"," ",0,"All Readable"],["AllCreatable","*","w"," ",0,"All Creatable"],["AllLinear","*","l"," ",0,"All Linear"],["AllMatrix","*","m"," ",0,"All Matrix"],["AllGS1","*","G"," ",0,"All GS1"],["AllRetail","*","R"," ",0,"All Retail"],["AllIndustrial","*","I"," ",0,"All Industrial"],["Codabar","F"," ","lrw ",18,"Codabar"],["Code39","A"," ","lrw I",8,"Code 39"],["Code39Std","A","s","lrw I",8,"Code 39 Standard"],["Code39Ext","A","e","lr I",9,"Code 39 Extended"],["Code32","A","2","lr I",129,"Code 32"],["PZN","A","p","lr I",52,"Pharmazentralnummer"],["Code93","G"," ","lrw I",25,"Code 93"],["Code128","C"," ","lrwGI",20,"Code 128"],["ITF","I"," ","lrw I",3,"ITF"],["ITF14","I","4","lr I",89,"ITF-14"],["DataBar","e"," ","lr GR",29,"DataBar"],["DataBarOmni","e","o","lr GR",29,"DataBar Omni"],["DataBarStk","e","s","lr GR",79,"DataBar Stacked"],["DataBarStkOmni","e","O","lr GR",80,"DataBar Stacked Omni"],["DataBarLtd","e","l","lr GR",30,"DataBar Limited"],["DataBarExp","e","e","lr GR",31,"DataBar Expanded"],["DataBarExpStk","e","E","lr GR",81,"DataBar Expanded Stacked"],["EANUPC","E"," ","lr R",15,"EAN/UPC"],["EAN13","E","1","lrw R",15,"EAN-13"],["EAN8","E","8","lrw R",10,"EAN-8"],["EAN5","E","5","l R",12,"EAN-5"],["EAN2","E","2","l R",11,"EAN-2"],["ISBN","E","i","lr R",69,"ISBN"],["UPCA","E","a","lrw R",34,"UPC-A"],["UPCE","E","e","lrw R",37,"UPC-E"],["OtherBarcode","X"," "," r ",0,"Other barcode"],["DXFilmEdge","X","x","lr ",147,"DX Film Edge"],["PDF417","L"," ","mrw ",55,"PDF417"],["CompactPDF417","L","c","mr ",56,"Compact PDF417"],["MicroPDF417","L","m","m ",84,"MicroPDF417"],["Aztec","z"," ","mr G ",92,"Aztec"],["AztecCode","z","c","mrwG ",92,"Aztec Code"],["AztecRune","z","r","mr ",128,"Aztec Rune"],["QRCode","Q"," ","mrwG ",58,"QR Code"],["QRCodeModel1","Q","1","mr ",0,"QR Code Model 1"],["QRCodeModel2","Q","2","mr ",58,"QR Code Model 2"],["MicroQRCode","Q","m","mr ",97,"Micro QR Code"],["RMQRCode","Q","r","mr G ",145,"rMQR Code"],["DataMatrix","d"," ","mrwG ",71,"Data Matrix"],["MaxiCode","U"," ","mr ",57,"MaxiCode"]],n={DataBarExpanded:"DataBarExp",DataBarLimited:"DataBarLtd","Linear-Codes":"AllLinear","Matrix-Codes":"AllMatrix",Any:"All",rMQRCode:"RMQRCode"};function o(e){var t;return null==(t=n[e])?e:t}function i(e){return e.map(o).join(",")}r.map(e=>e[5]),r.filter(e=>"*"===e[1]).map(e=>e[0]),r.filter(e=>"*"!==e[1]).map(e=>e[0]),r.filter(e=>" "===e[2]).map(e=>e[0]),r.filter(e=>"l"===e[3][0]).map(e=>e[0]),r.filter(e=>"m"===e[3][0]).map(e=>e[0]),r.filter(e=>"r"===e[3][1]).map(e=>e[0]),r.filter(e=>"w"===e[3][2]||0!==e[4]).map(e=>e[0]),r.filter(e=>"G"===e[3][3]).map(e=>e[0]),r.filter(e=>"R"===e[3][4]).map(e=>e[0]),r.filter(e=>"I"===e[3][4]).map(e=>e[0]);var a=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function u(e){return a.indexOf(e)}var c="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.UTF8.UTF16LE.UTF32BE.UTF32LE.BINARY".split(".");function s(e){return"UnicodeBig"===e?c.indexOf("UTF16BE"):c.indexOf(e)}var A=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function l(e){return A[e]}var f=["Ignore","Read","Require"];function d(e){return f.indexOf(e)}var p=["Plain","ECI","HRI","Escaped","Hex","HexECI"];function h(e){return p.indexOf(e)}var v={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,validateOptionalChecksum:!1,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown",tryCode39ExtendedMode:!0};function y(e){var t;return{...e,formats:i(e.formats),binarizer:u(e.binarizer),eanAddOnSymbol:d(e.eanAddOnSymbol),textMode:h(e.textMode),characterSet:s(e.characterSet),tryCode39ExtendedMode:null==(t=e.tryCode39ExtendedMode)||t}}function m(e){return{...e,format:e.format,symbology:e.symbology,contentType:l(e.contentType)}}var g={locateFile:(e,t)=>{let r=e.match(/_(.+?)\.wasm$/);return r?`https://fastly.jsdelivr.net/npm/zxing-wasm@3.0.2/dist/${r[1]}/${e}`:t+e}},w=new WeakMap;function b(e,t){return Object.is(e,t)||Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>Object.hasOwn(t,r)&&e[r]===t[r])}function S(e,{overrides:t,equalityFn:r=b,fireImmediately:n=!1}={}){var o,i;let a,[u,c]=null==(o=w.get(e))?[g]:o,s=null==t?u:t;if(n){if(c&&(a=r(u,s)))return c;let t=e({...s});return w.set(e,[s,t]),t}(null==(i=a)?r(u,s):i)||w.set(e,[s])}async function C(e,t,r=v){let n,o,i={...v,...r},a=await S(e,{fireImmediately:!0});if("width"in t&&"height"in t&&"data"in t){let{data:e,width:r,height:u}=t,c=function(e){let t=e.byteLength>>2,r=new Uint8Array(t);for(let n=0;n<t;n++){let t=n<<2;r[n]=306*e[t]+601*e[t+1]+117*e[t+2]+512>>10}return r}(e),s=c.byteLength;if(o=a._malloc(s),!o)throw Error(`Failed to allocate ${s} bytes in WASM memory`);try{a.HEAPU8.set(c,o),n=a.readBarcodesFromPixmap(o,r,u,y(i))}finally{a._free(o)}}else{let e,r;if("buffer"in t)[e,r]=[t.byteLength,t];else if("byteLength"in t)[e,r]=[t.byteLength,new Uint8Array(t)];else{if(!("size"in t))throw TypeError("Invalid input type");[e,r]=[t.size,new Uint8Array(await t.arrayBuffer())]}if(o=a._malloc(e),!o)throw Error(`Failed to allocate ${e} bytes in WASM memory`);try{a.HEAPU8.set(r,o),n=a.readBarcodesFromImage(o,e,y(i))}finally{a._free(o)}}let u=[];for(let e=0;e<n.size();++e)u.push(m(n.get(e)));return u}async function E(e={}){var t,r,n=e,o=!!globalThis.window,i=typeof Bun<"u",a=!!globalThis.WorkerGlobalScope;null!=(t=globalThis.process)&&null!=(t=t.versions)&&t.node&&(null==(r=globalThis.process)||r.type);var u,c,s="./this.program",A="";if(o||a||i){try{A=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)}),u=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw Error(t.status+" : "+t.url)}}var l,f,d,p,h=console.log.bind(console),v=console.error.bind(console),y=!1,m=!1;function g(){var e=Ot.buffer;I=new Int8Array(e),E=new Int16Array(e),n.HEAPU8=O=new Uint8Array(e),M=new Uint16Array(e),_=new Int32Array(e),R=new Uint32Array(e),x=new Float32Array(e),T=new Float64Array(e)}function w(e){var t,r;null==(t=n.onAbort)||t.call(n,e),v(e="Aborted("+e+")"),y=!0,e+=". Build with -sASSERTIONS for more info.";var o=new WebAssembly.RuntimeError(e);throw null==(r=d)||r(o),o}function b(){return function(e){return n.locateFile?n.locateFile(e,A):A+e}("zxing_reader.wasm")}async function S(e){if(!l)try{var t=await u(e);return new Uint8Array(t)}catch{}return function(e){if(e==p&&l)return new Uint8Array(l);if(c)return c(e);throw"both async and sync fetching of the wasm failed"}(e)}async function C(e,t,r){if(!e&&WebAssembly.instantiateStreaming)try{var n=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,r)}catch(e){v("wasm streaming compile failed: "+e),v("falling back to ArrayBuffer instantiation")}return async function(e,t){try{var r=await S(e);return await WebAssembly.instantiate(r,t)}catch(e){v("failed to asynchronously prepare wasm: "+e),w(e)}}(t,r)}var E,_,I,x,T,M,R,O,P=e=>{for(;e.length>0;)e.shift()(n)},k=[],D=e=>k.push(e),U=[],B=e=>U.push(e),V=e=>Et(e),j=()=>_t(),F=[],Q=0,W=0;class ${constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){R[this.ptr+4>>2]=e}get_type(){return R[this.ptr+4>>2]}set_destructor(e){R[this.ptr+8>>2]=e}get_destructor(){return R[this.ptr+8>>2]}set_caught(e){e=e?1:0,I[this.ptr+12]=e}get_caught(){return 0!=I[this.ptr+12]}set_rethrown(e){e=e?1:0,I[this.ptr+13]=e}get_rethrown(){return 0!=I[this.ptr+13]}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){R[this.ptr+16>>2]=e}get_adjusted_ptr(){return R[this.ptr+16>>2]}}var q=e=>Ct(e),L=e=>{var t=W;if(!t)return q(0),0;var r=new $(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return q(0),t;for(var o of e){if(0===o||o===n)break;var i=r.ptr+16;if(Tt(o,n,i))return q(o),t}return q(n),t},G={},K=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function N(e){return this.fromWireType(R[e>>2])}var H={},J={},Z={},z=class extends Error{constructor(e){super(e),this.name="InternalError"}},Y=e=>{throw new z(e)},X=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&Y("Mismatched type converter count");for(var o=0;o<e.length;++o)oe(e[o],n[o])}e.forEach(e=>Z[e]=t);var o=Array(t.length),i=[],a=0;{let e=t;for(let t=0;t<e.length;++t){let r=e[t];J.hasOwnProperty(r)?o[t]=J[r]:(i.push(r),H.hasOwnProperty(r)||(H[r]=[]),H[r].push(()=>{o[t]=J[r],++a===i.length&&n(o)}))}}0===i.length&&n(o)},ee=e=>{for(var t="";;){var r=O[e++];if(!r)return t;t+=String.fromCharCode(r)}},te=class extends Error{constructor(e){super(e),this.name="BindingError"}},re=e=>{throw new te(e)};function ne(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||re(`type "${n}" must have a positive integer typeid pointer`),J.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;re(`Cannot register type '${n}' twice`)}if(J[e]=t,delete Z[e],H.hasOwnProperty(e)){var o=H[e];delete H[e],o.forEach(e=>e())}}function oe(e,t){return ne(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}var ie=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),ae=e=>{re(function(e){return e.$$.ptrType.registeredClass.name}(e)+" instance already deleted")},ue=!1,ce=e=>{},se=e=>{--e.count.value,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},Ae=e=>globalThis.FinalizationRegistry?(ue=new FinalizationRegistry(e=>{se(e.$$)}),ce=e=>ue.unregister(e),(Ae=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};ue.register(e,r,e)}return e})(e)):(Ae=e=>e,e),le=[];function fe(){}var de=(e,t)=>Object.defineProperty(t,"name",{value:e}),pe={},he=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){var n=[...arguments];return e[t].overloadTable.hasOwnProperty(n.length)||re(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[n.length].apply(this,n)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},ve=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&re(`Cannot register public name '${e}' twice`),he(n,e,e),n[e].overloadTable.hasOwnProperty(r)&&re(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,n[e].argCount=r)};function ye(e,t,r,n,o,i,a,u){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=u,this.pureVirtualFunctions=[]}var me=(e,t,r)=>{for(;t!==r;)t.upcast||re(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},ge=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&&re("null is not a valid "+this.name),0;t.$$||re(`Cannot pass "${ge(t)}" as a ${this.name}`),t.$$.ptr||re("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return me(t.$$.ptr,r,this.registeredClass)}function be(e,t){var r;if(null===t)return this.isReference&&re("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&re(`Cannot pass "${ge(t)}" as a ${this.name}`),t.$$.ptr||re("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&re(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=me(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&re("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:re(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,Ke.toHandle(()=>o.delete())),null!==e&&e.push(this.rawDestructor,r)}break;default:re("Unsupported sharing policy")}return r}function Se(e,t){if(null===t)return this.isReference&&re("null is not a valid "+this.name),0;t.$$||re(`Cannot pass "${ge(t)}" as a ${this.name}`),t.$$.ptr||re("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&re(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return me(t.$$.ptr,r,this.registeredClass)}var Ce=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=Ce(e,t,r.baseClass);return null===n?null:r.downcast(n)},Ee={},_e=(e,t)=>(t=((e,t)=>{for(void 0===t&&re("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Ee[t]),Ie=(e,t)=>((!t.ptrType||!t.ptr)&&Y("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Y("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ae(Object.create(e,{$$:{value:t,writable:!0}})));function xe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=_e(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Ie(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ie(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i=pe[this.registeredClass.getActualType(t)];if(!i)return o.call(this);var a=this.isConst?i.constPointerType:i.pointerType,u=Ce(t,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ie(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:e}):Ie(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}function Te(e,t,r,n,o,i,a,u,c,s,A){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=u,this.rawConstructor=c,this.rawShare=s,this.rawDestructor=A,o||void 0!==t.baseClass?this.toWireType=be:n?(this.toWireType=we,this.destructorFunction=null):(this.toWireType=Se,this.destructorFunction=null)}var Me=(e,t,r)=>{n.hasOwnProperty(e)||Y("Replacing nonexistent public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},Re={},Oe=(e,t,r)=>(e=e.replace(/p/g,"i"),(0,Re[e])(t,...r)),Pe=[],ke=e=>{var t=Pe[e];return t||(Pe[e]=t=Pt.get(e)),t},De=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.includes("j"))return Oe(e,t,r);var n=ke(t)(...r);return n},Ue=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){return De(e,t,[...arguments],r)}},Be=function(e,t){function r(){return e.includes("j")?Ue(e,t):ke(t)}e=ee(e);var n=r();return"function"!=typeof n&&re(`unknown function pointer with signature ${e}: ${t}`),n};class Ve extends Error{}var je=e=>{var t=mt(e),r=ee(t);return gt(t),r},Fe=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){if(!n[t]&&!J[t]){if(Z[t])return void Z[t].forEach(e);r.push(t),n[t]=!0}})),new Ve(e+": "+r.map(je).join([", "]))},Qe=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(R[t+4*n>>2]);return r};function We(e,t,r,n,o,i){var a=t.length;a<2&&re("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=null!==t[1]&&null!==r,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),s=!t[0].isVoid,A=a-2,l=Array(A),f=[],d=[];return de(e,(function(){var e;d.length=0,f.length=u?2:1,f[0]=o,u&&(e=t[1].toWireType(d,this),f[1]=e);for(var r=0;r<A;++r)l[r]=t[r+2].toWireType(d,r<0||arguments.length<=r?void 0:arguments[r]),f.push(l[r]);var i=n(...f);function a(r){if(c)K(d);else for(var n=u?1:2;n<t.length;n++){var o=1===n?e:l[n-2];null!==t[n].destructorFunction&&t[n].destructorFunction(o)}if(s)return t[0].fromWireType(r)}return a(i)}))}var $e=e=>{let t=(e=e.trim()).indexOf("(");return-1===t?e:e.slice(0,t)},qe=[],Le=[0,1,,1,null,1,!0,1,!1,1],Ge=e=>{e>9&&0==--Le[e+1]&&(Le[e]=void 0,qe.push(e))},Ke={toValue:e=>(e||re("Cannot use deleted val. handle = "+e),Le[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=qe.pop()||Le.length;return Le[t]=e,Le[t+1]=1,t}}}},Ne={name:"emscripten::val",fromWireType:e=>{var t=Ke.toValue(e);return Ge(e),t},toWireType:(e,t)=>Ke.toHandle(t),readValueFromPointer:N,destructorFunction:null},He=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(x[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},Je=(e,t,r)=>{switch(t){case 1:return r?e=>I[e]:e=>O[e];case 2:return r?e=>E[e>>1]:e=>M[e>>1];case 4:return r?e=>_[e>>2]:e=>R[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Ze=(e,t,r)=>{let n=(e,t)=>{let r=0;return{next(){if(r>=e)return{done:!0};let n=r;return r++,{value:t(n),done:!1}},[Symbol.iterator](){return this}}};e[Symbol.iterator]||(e[Symbol.iterator]=function(){return n(this[t](),e=>this[r](e))})},ze=Object.assign({optional:!0},Ne),Ye=(e,t,r)=>((e,t,r,n)=>{if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var u=e.codePointAt(a);if(u<=127){if(r>=i)break;t[r++]=u}else if(u<=2047){if(r+1>=i)break;t[r++]=192|u>>6,t[r++]=128|63&u}else if(u<=65535){if(r+2>=i)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|63&u}else{if(r+3>=i)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|63&u,a++}}return t[r]=0,r-o})(e,O,t,r),Xe=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},et=globalThis.TextDecoder&&new TextDecoder,tt=(e,t,r,n)=>{var o=t+r;if(n)return o;for(;e[t]&&!(t>=o);)++t;return t},rt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var o=tt(e,t,r,n);if(o-t>16&&e.buffer&&et)return et.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var u=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if((a=224==(240&a)?(15&a)<<12|u<<6|c:(7&a)<<18|u<<12|c<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var s=a-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}}else i+=String.fromCharCode((31&a)<<6|u)}else i+=String.fromCharCode(a)}return i},nt=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,ot=(e,t,r)=>{var n=e>>1,o=tt(M,n,t/2,r);if(o-n>16&&nt)return nt.decode(M.subarray(n,o));for(var i="",a=n;a<o;++a){var u=M[a];i+=String.fromCharCode(u)}return i},it=(e,t,r)=>{if(null!=r||(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);E[t>>1]=a,t+=2}return E[t>>1]=0,t-n},at=e=>2*e.length,ut=(e,t,r)=>{for(var n="",o=e>>2,i=0;!(i>=t/4);i++){var a=R[o+i];if(!a&&!r)break;n+=String.fromCodePoint(a)}return n},ct=(e,t,r)=>{if(null!=r||(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.codePointAt(i);if(a>65535&&i++,_[t>>2]=a,(t+=4)+4>o)break}return _[t>>2]=0,t-n},st=e=>{for(var t=0,r=0;r<e.length;++r)e.codePointAt(r)>65535&&r++,t+=4;return t},At=[],lt=(e,t)=>{var r=J[e];return void 0===r&&re(`${t} has unknown type ${je(e)}`),r},ft={},dt=e=>{var t=ft[e];return void 0===t?ee(e):t},pt=(e,t)=>Math.ceil(e/t)*t,ht=e=>{var t=(e-Ot.buffer.byteLength+65535)/65536|0;try{return Ot.grow(t),g(),1}catch{}},vt={},yt=()=>{if(!yt.strings){var e,t,r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(null==(e=null==(t=globalThis.navigator)?void 0:t.language)?"C":e).replace("-","_")+".UTF-8",_:s||"./this.program"};for(var n in vt)void 0===vt[n]?delete r[n]:r[n]=vt[n];var o=[];for(var n in r)o.push(`${n}=${r[n]}`);yt.strings=o}return yt.strings};var mt,gt,wt,bt,St,Ct,Et,_t,It,xt,Tt,Mt,Rt,Ot,Pt,kt=[null,[],[]],Dt=(e,t)=>{var r=kt[e];0===t||10===t?((1===e?h:v)(rt(r)),r.length=0):r.push(t)};if((()=>{let e=fe.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof fe&&e instanceof fe))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o},clone(){if(this.$$.ptr||ae(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ae(Object.create(Object.getPrototypeOf(this),{$$:{value:ie(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||ae(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&re("Object already scheduled for deletion"),ce(this),se(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||ae(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&re("Object already scheduled for deletion"),le.push(this),le.length,this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)})(),Object.assign(Te.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;null==(t=this.rawDestructor)||t.call(this,e)},readValueFromPointer:N,fromWireType:xe}),n.noExitRuntime&&n.noExitRuntime,n.print&&(h=n.print),n.printErr&&(v=n.printErr),n.wasmBinary&&(l=n.wasmBinary),n.arguments&&n.arguments,n.thisProgram&&(s=n.thisProgram),n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.shift()();var Ut={s:e=>{var t=new $(e);return t.get_caught()||(t.set_caught(!0),Q--),t.set_rethrown(!1),F.push(t),bt(e)},x:()=>{St(0,0);var e=F.pop();It(e.excPtr),W=0},a:()=>L([]),i:e=>L([e]),m:(e,t)=>L([e,t]),Q:()=>{var e=F.pop();e||w("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(F.push(e),e.set_rethrown(!0),e.set_caught(!1),Q++),xt(t),W=t},q:(e,t,r)=>{throw new $(e).init(t,r),xt(e),Q++,W=e},fa:()=>Q,d:e=>{throw W||(W=e),W},ba:()=>w(""),wa:e=>{var t=G[e];delete G[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields,i=o.map(e=>e.getterReturnType).concat(o.map(e=>e.setterArgumentType));X([e],i,e=>{var i={};{let t=o;for(let r=0;r<t.length;++r){let n=t[r],a=e[r],u=n.getter,c=n.getterContext,s=e[r+o.length],A=n.setter,l=n.setterContext;i[n.fieldName]={read:e=>a.fromWireType(u(c,e)),write:(e,t)=>{var r=[];A(l,e,s.toWireType(r,t)),K(r)},optional:a.optional}}}return[{name:t.name,fromWireType:e=>{var t={};for(var r in i)t[r]=i[r].read(e);return n(e),t},toWireType:(e,t)=>{for(var o in i)if(!(o in t)&&!i[o].optional)throw TypeError(`Missing field: "${o}"`);var a=r();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(n,a),a},readValueFromPointer:N,destructorFunction:n}]})},aa:(e,t,r,n,o)=>{},qa:(e,t,r,n)=>{oe(e,{name:t=ee(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},readValueFromPointer:function(e){return this.fromWireType(O[e])},destructorFunction:null})},ua:(e,t,r,n,o,i,a,u,c,s,A,l,f)=>{A=ee(A),i=Be(o,i),u&&(u=Be(a,u)),s&&(s=Be(c,s)),f=Be(l,f);var d=(e=>{var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e})(A);ve(d,(function(){Fe(`Cannot construct ${A} due to unbound types`,[n])})),X([e,t,r],n?[n]:[],t=>{var r,o;t=t[0],n?o=(r=t.registeredClass).instancePrototype:o=fe.prototype;var a=de(A,(function(){if(Object.getPrototypeOf(this)!==c)throw new te("Use 'new' to construct "+A);if(void 0===p.constructor_body)throw new te(A+" has no accessible constructor");var e=[...arguments],t=p.constructor_body[e.length];if(void 0===t)throw new te(`Tried to invoke ctor of ${A} with invalid number of parameters (${e.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)})),c=Object.create(o,{constructor:{value:a}});a.prototype=c;var l,p=new ye(A,a,c,f,r,i,u,s);p.baseClass&&(null!=(l=p.baseClass).__derivedClasses||(l.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var h=new Te(A,p,!0,!1,!1),v=new Te(A+"*",p,!1,!1,!1),y=new Te(A+" const*",p,!1,!0,!1);return pe[e]={pointerType:v,constPointerType:y},Me(d,a),[h,v,y]})},ta:(e,t,r,n,o,i)=>{var a=Qe(t,r);o=Be(n,o),X([],[e],e=>{var r="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]=()=>{Fe(`Cannot construct ${e.name} due to unbound types`,a)},X([],a,n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=We(r,n,null,o,i),[])),[]})},F:(e,t,r,n,o,i,a,u,c,s)=>{var A=Qe(r,n);t=ee(t),t=$e(t),i=Be(o,i,c),X([],[e],e=>{var n=`${(e=e[0]).name}.${t}`;function o(){Fe(`Cannot call ${n} due to unbound types`,A)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),u&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,s=c[t];return void 0===s||void 0===s.overloadTable&&s.className!==e.name&&s.argCount===r-2?(o.argCount=r-2,o.className=e.name,c[t]=o):(he(c,t,n),c[t].overloadTable[r-2]=o),X([],A,o=>{var u=We(n,o,e,i,a);return void 0===c[t].overloadTable?(u.argCount=r-2,c[t]=u):c[t].overloadTable[r-2]=u,[]}),[]})},oa:e=>oe(e,Ne),X:(e,t,r)=>{oe(e,{name:t=ee(t),fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:He(t,r),destructorFunction:null})},Y:(e,t,r,n,o,i,a,u)=>{var c=Qe(t,r);e=ee(e),e=$e(e),o=Be(n,o,a),ve(e,(function(){Fe(`Cannot call ${e} due to unbound types`,c)}),t-1),X([],c,r=>{var n=[r[0],null].concat(r.slice(1));return Me(e,We(e,n,null,o,i),t-1),[]})},A:(e,t,r,n,o)=>{t=ee(t);let i=e=>e;if(0===n){var a=32-8*r;i=e=>e<<a>>>a,o=i(o)}oe(e,{name:t,fromWireType:i,toWireType:(e,t)=>t,readValueFromPointer:Je(t,r,0!==n),destructorFunction:null})},sa:(e,t,r,n)=>{r=ee(r),n=ee(n),X([],[e,t],e=>{let t=e[0];return Ze(t.registeredClass.instancePrototype,r,n),[]})},t:(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=R[e>>2],r=R[e+4>>2];return new n(I.buffer,r,t)}oe(e,{name:r=ee(r),fromWireType:o,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},va:(e,t)=>{oe(e,ze)},pa:(e,t)=>{t=ee(t);oe(e,{name:t,fromWireType(e){var t,r=R[e>>2],n=e+4;return t=((e,t,r)=>e?rt(O,e,t,r):"")(n,r,!0),gt(e),t},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,n="string"==typeof t;n||ArrayBuffer.isView(t)&&1==t.BYTES_PER_ELEMENT||re("Cannot pass non-string to std::string"),r=n?Xe(t):t.length;var o=wt(4+r+1),i=o+4;(R[o>>2]=r,n)?Ye(t,i,r+1):O.set(t,i);return null!==e&&e.push(gt,o),o},readValueFromPointer:N,destructorFunction(e){gt(e)}})},S:(e,t,r)=>{var n,o,i;r=ee(r),2===t?(n=ot,o=it,i=at):(n=ut,o=ct,i=st),oe(e,{name:r,fromWireType:e=>{var r=R[e>>2],o=n(e+4,r*t,!0);return gt(e),o},toWireType:(e,n)=>{"string"!=typeof n&&re("Cannot pass non-string to C++ string type "+r);var a=i(n),u=wt(4+a+t);return R[u>>2]=a/t,o(n,u+4,a+t),null!==e&&e.push(gt,u),u},readValueFromPointer:N,destructorFunction(e){gt(e)}})},G:(e,t,r,n,o,i)=>{G[e]={name:ee(t),rawConstructor:Be(r,n),rawDestructor:Be(o,i),fields:[]}},xa:(e,t,r,n,o,i,a,u,c,s)=>{G[e].fields.push({fieldName:ee(t),getterReturnType:r,getter:Be(n,o),getterContext:i,setterArgumentType:a,setter:Be(u,c),setterContext:s})},ra:(e,t)=>{oe(e,{isVoid:!0,name:t=ee(t),fromWireType:()=>{},toWireType:(e,t)=>{}})},N:(e,t,r)=>{var[n,...o]=((e,t)=>{for(var r=Array(e),n=0;n<e;++n)r[n]=lt(R[t+4*n>>2],"parameter "+n);return r})(e,t),i=n.toWireType.bind(n),a=o.map(e=>e.readValueFromPointer.bind(e));e--;var u=Array(e);return(e=>{var t=At.length;return At.push(e),t})(de(`methodCaller<(${o.map(e=>e.name)}) => ${n.name}>`,(t,n,o,c)=>{for(var s=0,A=0;A<e;++A)u[A]=a[A](c+s),s+=8;var l;switch(r){case 0:l=Ke.toValue(t).apply(null,u);break;case 2:l=Reflect.construct(Ke.toValue(t),u);break;case 3:l=u[0];break;case 1:l=Ke.toValue(t)[dt(n)](...u)}return((e,t,r)=>{var n=[],o=e(n,r);return n.length&&(R[t>>2]=Ke.toHandle(n)),o})(i,o,l)}))},ya:Ge,C:e=>e?(e=dt(e),Ke.toHandle(globalThis[e])):Ke.toHandle(globalThis),T:e=>{e>9&&(Le[e+1]+=1)},M:(e,t,r,n,o)=>At[e](t,r,n,o),ka:e=>{K(Ke.toValue(e)),Ge(e)},ca:(e,t,r,n)=>{var o=(new Date).getFullYear(),i=new Date(o,0,1),a=new Date(o,6,1),u=i.getTimezoneOffset(),c=a.getTimezoneOffset(),s=Math.max(u,c);R[e>>2]=60*s,_[t>>2]=Number(u!=c);var A=e=>{var t=e>=0?"-":"+",r=Math.abs(e);return`UTC${t}${String(Math.floor(r/60)).padStart(2,"0")}${String(r%60).padStart(2,"0")}`},l=A(u),f=A(c);c<u?(Ye(l,r,17),Ye(f,n,17)):(Ye(l,n,17),Ye(f,r,17))},ga:e=>{var t=O.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);if(o=Math.min(o,e+100663296),ht(Math.min(r,pt(Math.max(e,o),65536))))return!0}return!1},da:(e,t)=>{var r=0,n=0;for(var o of yt()){var i=t+r;R[e+n>>2]=i,r+=Ye(o,i,1/0)+1,n+=4}return 0},ea:(e,t)=>{var r=yt();R[e>>2]=r.length;var n=0;for(var o of r)n+=Xe(o)+1;return R[t>>2]=n,0},ha:e=>52,_:function(e,t,r,n,o){return((e,t)=>{})(t,r),70},V:(e,t,r,n)=>{for(var o=0,i=0;i<r;i++){var a=R[t>>2],u=R[t+4>>2];t+=8;for(var c=0;c<u;c++)Dt(e,O[a+c]);o+=u}return R[n>>2]=o,0},ma:function(e,t,r){var n=j();try{return ke(e)(t,r)}catch(e){if(V(n),e!==e+0)throw e;St(1,0)}},K:function(e,t,r,n){var o=j();try{return ke(e)(t,r,n)}catch(e){if(V(o),e!==e+0)throw e;St(1,0)}},B:function(e,t,r,n,o,i){var a=j();try{return ke(e)(t,r,n,o,i)}catch(e){if(V(a),e!==e+0)throw e;St(1,0)}},O:function(e,t,r,n,o,i){var a=j();try{return ke(e)(t,r,n,o,i)}catch(e){if(V(a),e!==e+0)throw e;St(1,0)}},U:function(e,t,r,n){var o=j();try{return ke(e)(t,r,n)}catch(e){if(V(o),e!==e+0)throw e;St(1,0)}},p:function(e){var t=j();try{return ke(e)()}catch(e){if(V(t),e!==e+0)throw e;St(1,0)}},b:function(e,t){var r=j();try{return ke(e)(t)}catch(e){if(V(r),e!==e+0)throw e;St(1,0)}},D:function(e,t,r,n){var o=j();try{return ke(e)(t,r,n)}catch(e){if(V(o),e!==e+0)throw e;St(1,0)}},ja:function(e,t,r){var n=j();try{return ke(e)(t,r)}catch(e){if(V(n),e!==e+0)throw e;St(1,0)}},c:function(e,t,r){var n=j();try{return ke(e)(t,r)}catch(e){if(V(n),e!==e+0)throw e;St(1,0)}},ia:function(e,t,r,n,o){var i=j();try{return ke(e)(t,r,n,o)}catch(e){if(V(i),e!==e+0)throw e;St(1,0)}},h:function(e,t,r,n){var o=j();try{return ke(e)(t,r,n)}catch(e){if(V(o),e!==e+0)throw e;St(1,0)}},j:function(e,t,r,n,o){var i=j();try{return ke(e)(t,r,n,o)}catch(e){if(V(i),e!==e+0)throw e;St(1,0)}},r:function(e,t,r,n,o,i){var a=j();try{return ke(e)(t,r,n,o,i)}catch(e){if(V(a),e!==e+0)throw e;St(1,0)}},P:function(e,t,r,n,o,i,a){var u=j();try{return ke(e)(t,r,n,o,i,a)}catch(e){if(V(u),e!==e+0)throw e;St(1,0)}},w:function(e,t,r,n,o,i,a){var u=j();try{return ke(e)(t,r,n,o,i,a)}catch(e){if(V(u),e!==e+0)throw e;St(1,0)}},E:function(e,t,r,n,o,i,a,u){var c=j();try{return ke(e)(t,r,n,o,i,a,u)}catch(e){if(V(c),e!==e+0)throw e;St(1,0)}},L:function(e,t,r,n,o,i,a,u,c){var s=j();try{return ke(e)(t,r,n,o,i,a,u,c)}catch(e){if(V(s),e!==e+0)throw e;St(1,0)}},I:function(e,t,r,n,o,i,a,u,c,s,A,l){var f=j();try{return ke(e)(t,r,n,o,i,a,u,c,s,A,l)}catch(e){if(V(f),e!==e+0)throw e;St(1,0)}},$:function(e,t,r,n,o,i,a){var u=j();try{return Mt(e,t,r,n,o,i,a)}catch(e){if(V(u),e!==e+0)throw e;St(1,0)}},Z:function(e,t,r,n,o){var i=j();try{return Rt(e,t,r,n,o)}catch(e){if(V(i),e!==e+0)throw e;St(1,0)}},f:function(e){var t=j();try{ke(e)()}catch(e){if(V(t),e!==e+0)throw e;St(1,0)}},l:function(e,t){var r=j();try{ke(e)(t)}catch(e){if(V(r),e!==e+0)throw e;St(1,0)}},e:function(e,t,r){var n=j();try{ke(e)(t,r)}catch(e){if(V(n),e!==e+0)throw e;St(1,0)}},W:function(e,t,r,n,o,i,a,u,c){var s=j();try{ke(e)(t,r,n,o,i,a,u,c)}catch(e){if(V(s),e!==e+0)throw e;St(1,0)}},g:function(e,t,r,n){var o=j();try{ke(e)(t,r,n)}catch(e){if(V(o),e!==e+0)throw e;St(1,0)}},J:function(e,t,r,n,o,i,a){var u=j();try{ke(e)(t,r,n,o,i,a)}catch(e){if(V(u),e!==e+0)throw e;St(1,0)}},k:function(e,t,r,n,o){var i=j();try{ke(e)(t,r,n,o)}catch(e){if(V(i),e!==e+0)throw e;St(1,0)}},la:function(e,t,r,n,o,i,a,u){var c=j();try{ke(e)(t,r,n,o,i,a,u)}catch(e){if(V(c),e!==e+0)throw e;St(1,0)}},o:function(e,t,r,n,o,i){var a=j();try{ke(e)(t,r,n,o,i)}catch(e){if(V(a),e!==e+0)throw e;St(1,0)}},y:function(e,t,r,n,o,i,a){var u=j();try{ke(e)(t,r,n,o,i,a)}catch(e){if(V(u),e!==e+0)throw e;St(1,0)}},u:function(e,t,r,n,o,i,a,u){var c=j();try{ke(e)(t,r,n,o,i,a,u)}catch(e){if(V(c),e!==e+0)throw e;St(1,0)}},R:function(e,t,r,n,o,i,a,u,c){var s=j();try{ke(e)(t,r,n,o,i,a,u,c)}catch(e){if(V(s),e!==e+0)throw e;St(1,0)}},v:function(e,t,r,n,o,i,a,u,c,s){var A=j();try{ke(e)(t,r,n,o,i,a,u,c,s)}catch(e){if(V(A),e!==e+0)throw e;St(1,0)}},n:function(e,t,r,n,o,i,a,u,c,s,A){var l=j();try{ke(e)(t,r,n,o,i,a,u,c,s,A)}catch(e){if(V(l),e!==e+0)throw e;St(1,0)}},H:function(e,t,r,n,o,i,a,u,c,s,A,l,f,d,p,h){var v=j();try{ke(e)(t,r,n,o,i,a,u,c,s,A,l,f,d,p,h)}catch(e){if(V(v),e!==e+0)throw e;St(1,0)}},na:function(e,t,r,n,o,i,a,u,c,s,A,l,f,d,p,h,v){var y=j();try{ke(e)(t,r,n,o,i,a,u,c,s,A,l,f,d,p,h,v)}catch(e){if(V(y),e!==e+0)throw e;St(1,0)}},z:e=>e};var Bt=await async function(){function e(e,t){return function(e){mt=e.Ba,gt=n._free=e.Ca,wt=n._malloc=e.Ea,bt=e.Fa,St=e.Ga,Ct=e.Ha,Et=e.Ia,_t=e.Ja,It=e.Ka,xt=e.La,Tt=e.Ma,Re.viijii=e.Na,Mt=Re.iiijj=e.Oa,Re.jiji=e.Pa,Rt=Re.jiiii=e.Qa,Re.iiiiij=e.Ra,Re.iiiiijj=e.Sa,Re.iiiiiijj=e.Ta,Ot=e.za,Pt=e.Da}(Bt=e.exports),g(),Bt}var t={a:Ut};return n.instantiateWasm?new Promise((r,o)=>{n.instantiateWasm(t,(t,n)=>{r(e(t))})}):(null!=p||(p=b()),function(t){return e(t.instance)}(await C(l,p,t)))}();return function(){function e(){var e,t;n.calledRun=!0,!y&&(m=!0,Bt.Aa(),null==(e=f)||e(n),null==(t=n.onRuntimeInitialized)||t.call(n),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)D(n.postRun.shift());P(k)}())}!function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)B(n.preRun.shift());P(U)}(),n.setStatus?(n.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>n.setStatus(""),1),e()},1)):e()}(),m?n:new Promise((e,t)=>{f=e,d=t})}function _(e){return S(E,e)}function I(){return function(e){w.delete(e)}(E)}function x(e){_({overrides:e,equalityFn:Object.is,fireImmediately:!1})}var T=[["aztec","Aztec"],["aztec_code","AztecCode"],["aztec_rune","AztecRune"],["code_128","Code128"],["code_39","Code39"],["code_39_standard","Code39Std"],["code_39_extended","Code39Ext"],["code_32","Code32"],["pzn","PZN"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_omni","DataBarOmni"],["databar_stacked","DataBarStk"],["databar_stacked_omni","DataBarStkOmni"],["databar_expanded","DataBarExp"],["databar_expanded_stacked","DataBarExpStk"],["databar_limited","DataBarLtd"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN13"],["ean_upc","EANUPC"],["isbn","ISBN"],["ean_8","EAN8"],["itf","ITF"],["itf_14","ITF14"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["compact_pdf417","CompactPDF417"],["qr_code","QRCode"],["qr_code_model_1","QRCodeModel1"],["qr_code_model_2","QRCodeModel2"],["rm_qr_code","RMQRCode"],["upc_a","UPCA"],["upc_e","UPCE"],["other_barcode","OtherBarcode"],["linear_codes","AllLinear"],["matrix_codes","AllMatrix"],["gs1_codes","AllGS1"],["retail_codes","AllRetail"],["industrial_codes","AllIndustrial"],["any","All"]],M=[...T,["unknown"]].map(e=>e[0]),R=new Map(T);function O(e){for(let[t,r]of R)if(e===r)return t;return"unknown"}function P(e){try{var t;return e instanceof(null==e||null==(t=e.ownerDocument)||null==(t=t.defaultView)?void 0:t.HTMLImageElement)}catch{return!1}}function k(e){try{var t;return e instanceof(null==e||null==(t=e.ownerDocument)||null==(t=t.defaultView)?void 0:t.SVGImageElement)}catch{return!1}}function D(e){try{var t;return e instanceof(null==e||null==(t=e.ownerDocument)||null==(t=t.defaultView)?void 0:t.HTMLVideoElement)}catch{return!1}}function U(e){try{var t;return e instanceof(null==e||null==(t=e.ownerDocument)||null==(t=t.defaultView)?void 0:t.HTMLCanvasElement)}catch{return!1}}function B(e){try{return e instanceof ImageBitmap||"[object ImageBitmap]"===Object.prototype.toString.call(e)}catch{return!1}}function V(e){try{return e instanceof OffscreenCanvas||"[object OffscreenCanvas]"===Object.prototype.toString.call(e)}catch{return!1}}function j(e){try{return e instanceof VideoFrame||"[object VideoFrame]"===Object.prototype.toString.call(e)}catch{return!1}}async function F(e){if(P(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(k(e)&&!await async function(e){try{var t;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(j(e)&&function(e){return null===e.format}(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(D(e)&&(0===e.readyState||1===e.readyState))throw new DOMException("Invalid element or state.","InvalidStateError");if(B(e)&&function(e){return 0===e.width&&0===e.height}(e))throw new DOMException("The image source is detached.","InvalidStateError");let{width:t,height:r}=function(e){if(P(e))return{width:e.naturalWidth,height:e.naturalHeight};if(k(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(D(e))return{width:e.videoWidth,height:e.videoHeight};if(B(e))return{width:e.width,height:e.height};if(j(e))return{width:e.displayWidth,height:e.displayHeight};if(U(e)||V(e))return{width:e.width,height:e.height};throw 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===r)return null;let n=function(e,t){try{let r=new OffscreenCanvas(e,t);if(r.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return r;throw void 0}catch{let r=document.createElement("canvas");return r.width=e,r.height=t,r}}(t,r).getContext("2d");n.drawImage(e,0,0);try{return n.getImageData(0,0,t,r)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Q(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 r="";try{r=URL.createObjectURL(e),t.src=r,await t.decode()}finally{URL.revokeObjectURL(r)}}}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await F(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 U(e)||V(e)?function(e){let{width:t,height:r}=e;if(0===t||0===r)return null;let n=e.getContext("2d");try{return n.getImageData(0,0,t,r)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}(e):await F(e)}function W(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}`):Error(`${t}: ${e}`)}function $(e,t,r){(function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function q(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw TypeError("Private element is not present on this object")}function L(e,t){return e.get(q(e,t))}var G=new WeakMap;Object.defineProperty(t,"a",{enumerable:!0,get:function(){return I}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return"98106d24a9bc2c4a24a6e6864e0f5729bd68cf73d6f5b45bb1c824521146370c"}}),Object.defineProperty(t,"n",{enumerable:!0,get:function(){return x}}),Object.defineProperty(t,"o",{enumerable:!0,get:function(){return"3.0.2"}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return _}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return"b304f6656b865be11b00741d430b7d0027bc0ab4"}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return class{constructor(e={}){$(this,G,void 0);try{var t;let r=null==e||null==(t=e.formats)?void 0:t.filter(e=>"unknown"!==e);if(0===(null==r?void 0:r.length))throw TypeError("Hint option provided, but is empty.");for(let e of null==r?[]:r)if(!R.has(e))throw TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${e}' is not a valid enum value of type BarcodeFormat.`);(function(e,t,r){e.set(q(e,t),r)})(G,this,null==r?[]:r),_({fireImmediately:!0}).catch(()=>{})}catch(e){throw W(e,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return M.filter(e=>"unknown"!==e)}async detect(e){try{let t=await Q(e);if(null===t)return[];let r,n={textMode:"Plain",formats:L(G,this).map(e=>R.get(e))};try{r=await async function(e,t){return C(E,e,t)}(t,n)}catch(e){throw console.error(e),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(e=>{let{topLeft:{x:t,y:r},topRight:{x:n,y:o},bottomLeft:{x:i,y:a},bottomRight:{x:u,y:c}}=e.position,s=Math.min(t,n,i,u),A=Math.min(r,o,a,c),l=Math.max(t,n,i,u),f=Math.max(r,o,a,c);return{boundingBox:new DOMRectReadOnly(s,A,l-s,f-A),rawValue:e.text,format:O(e.format),cornerPoints:[{x:t,y:r},{x:n,y:o},{x:u,y:c},{x:i,y:a}]}})}catch(e){throw W(e,"Failed to execute 'detect' on 'BarcodeDetector'")}}}}})},function(e,t){e.exports="data:audio/ogg;base64,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"},function(e,t,r){"use strict";t.__esModule=!0,t.request=function(e){var t=e.url,r=e.method,a=e.data,u=e.headers,c=e.json,s=e.timeout,A=Object.assign({request_id:(0,o.hex_md5)((0,n.createUUID)()+"_"+Date.now())},a);return new Promise((function(e,n){!function(e){var t,r=e.url||"",n=e.method||"GET",o=e.headers||{},a=e.data||{},u=e.json||!1,c=e.timeout||6e3,s=new XMLHttpRequest;if("GET"==n.toUpperCase())r=(0,i.appendQueryParams)(r,a),t=void 0;else{if("POST"!=n.toUpperCase())return void(e.fail&&e.fail({errMsg:"request:un support "+n}));u?t=JSON.stringify(a):(t=new FormData,Object.keys(a).forEach((function(e){var r=a[e];r instanceof File?t.append(e,r,r.name):t.append(e,r)})))}if(s.timeout=c,s.open(n.toUpperCase(),r,!0),o)for(var A in o)s.setRequestHeader(A,o[A]);u&&s.setRequestHeader("Content-Type","application/json");s.onreadystatechange=function(){if(4==s.readyState){var t=s.getAllResponseHeaders(),r={};if(t)t.split("\n").forEach((function(e){if(e){var t=e.split(": ");t.length>1&&(r[t[0]]=t[1])}}));if(s.status>=200&&s.status<300){var n={errMsg:"request:ok"};try{var o=JSON.parse(s.response);n.data=o}catch(e){n.data=s.response}n.header=r,n.statusCode=s.status,e.success&&e.success(n)}else e.fail&&e.fail({errMsg:"request:fail",data:s.response,header:r})}},s.send(t)}(Object.assign({},{url:t,method:r,data:A,headers:u,json:c,timeout:s},{success:e,fail:n}))})).then((function(e){if(e.statusCode&&200!=e.statusCode)throw e;return e}))};var n=r(1),o=r(22),i=r(23)},function(e,t,r){"use strict";t.__esModule=!0,t.hex_md5=function(e){return d(n(l(e),8*e.length))},t.b64_md5=function(e){return p(n(l(e),8*e.length))},t.str_md5=function(e){return f(n(l(e),8*e.length))},t.hex_hmac_md5=function(e,t){return d(s(e,t))},t.b64_hmac_md5=function(e,t){return p(s(e,t))},t.str_hmac_md5=function(e,t){return f(s(e,t))};function n(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=1732584193,n=-271733879,o=-1732584194,s=271733878,l=0;l<e.length;l+=16){var f=r,d=n,p=o,h=s;r=i(r,n,o,s,e[l+0],7,-680876936),s=i(s,r,n,o,e[l+1],12,-389564586),o=i(o,s,r,n,e[l+2],17,606105819),n=i(n,o,s,r,e[l+3],22,-1044525330),r=i(r,n,o,s,e[l+4],7,-176418897),s=i(s,r,n,o,e[l+5],12,1200080426),o=i(o,s,r,n,e[l+6],17,-1473231341),n=i(n,o,s,r,e[l+7],22,-45705983),r=i(r,n,o,s,e[l+8],7,1770035416),s=i(s,r,n,o,e[l+9],12,-1958414417),o=i(o,s,r,n,e[l+10],17,-42063),n=i(n,o,s,r,e[l+11],22,-1990404162),r=i(r,n,o,s,e[l+12],7,1804603682),s=i(s,r,n,o,e[l+13],12,-40341101),o=i(o,s,r,n,e[l+14],17,-1502002290),r=a(r,n=i(n,o,s,r,e[l+15],22,1236535329),o,s,e[l+1],5,-165796510),s=a(s,r,n,o,e[l+6],9,-1069501632),o=a(o,s,r,n,e[l+11],14,643717713),n=a(n,o,s,r,e[l+0],20,-373897302),r=a(r,n,o,s,e[l+5],5,-701558691),s=a(s,r,n,o,e[l+10],9,38016083),o=a(o,s,r,n,e[l+15],14,-660478335),n=a(n,o,s,r,e[l+4],20,-405537848),r=a(r,n,o,s,e[l+9],5,568446438),s=a(s,r,n,o,e[l+14],9,-1019803690),o=a(o,s,r,n,e[l+3],14,-187363961),n=a(n,o,s,r,e[l+8],20,1163531501),r=a(r,n,o,s,e[l+13],5,-1444681467),s=a(s,r,n,o,e[l+2],9,-51403784),o=a(o,s,r,n,e[l+7],14,1735328473),r=u(r,n=a(n,o,s,r,e[l+12],20,-1926607734),o,s,e[l+5],4,-378558),s=u(s,r,n,o,e[l+8],11,-2022574463),o=u(o,s,r,n,e[l+11],16,1839030562),n=u(n,o,s,r,e[l+14],23,-35309556),r=u(r,n,o,s,e[l+1],4,-1530992060),s=u(s,r,n,o,e[l+4],11,1272893353),o=u(o,s,r,n,e[l+7],16,-155497632),n=u(n,o,s,r,e[l+10],23,-1094730640),r=u(r,n,o,s,e[l+13],4,681279174),s=u(s,r,n,o,e[l+0],11,-358537222),o=u(o,s,r,n,e[l+3],16,-722521979),n=u(n,o,s,r,e[l+6],23,76029189),r=u(r,n,o,s,e[l+9],4,-640364487),s=u(s,r,n,o,e[l+12],11,-421815835),o=u(o,s,r,n,e[l+15],16,530742520),r=c(r,n=u(n,o,s,r,e[l+2],23,-995338651),o,s,e[l+0],6,-198630844),s=c(s,r,n,o,e[l+7],10,1126891415),o=c(o,s,r,n,e[l+14],15,-1416354905),n=c(n,o,s,r,e[l+5],21,-57434055),r=c(r,n,o,s,e[l+12],6,1700485571),s=c(s,r,n,o,e[l+3],10,-1894986606),o=c(o,s,r,n,e[l+10],15,-1051523),n=c(n,o,s,r,e[l+1],21,-2054922799),r=c(r,n,o,s,e[l+8],6,1873313359),s=c(s,r,n,o,e[l+15],10,-30611744),o=c(o,s,r,n,e[l+6],15,-1560198380),n=c(n,o,s,r,e[l+13],21,1309151649),r=c(r,n,o,s,e[l+4],6,-145523070),s=c(s,r,n,o,e[l+11],10,-1120210379),o=c(o,s,r,n,e[l+2],15,718787259),n=c(n,o,s,r,e[l+9],21,-343485551),r=A(r,f),n=A(n,d),o=A(o,p),s=A(s,h)}return Array(r,n,o,s)}function o(e,t,r,n,o,i){return A((a=A(A(t,e),A(n,i)))<<(u=o)|a>>>32-u,r);var a,u}function i(e,t,r,n,i,a,u){return o(t&r|~t&n,e,t,i,a,u)}function a(e,t,r,n,i,a,u){return o(t&n|r&~n,e,t,i,a,u)}function u(e,t,r,n,i,a,u){return o(t^r^n,e,t,i,a,u)}function c(e,t,r,n,i,a,u){return o(r^(t|~n),e,t,i,a,u)}function s(e,t){var r=l(e);r.length>16&&(r=n(r,8*e.length));for(var o=Array(16),i=Array(16),a=0;a<16;a++)o[a]=909522486^r[a],i[a]=1549556828^r[a];var u=n(o.concat(l(t)),512+8*t.length);return n(i.concat(u),640)}function A(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e){for(var t=Array(),r=0;r<8*e.length;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<r%32;return t}function f(e){for(var t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>r%32&255);return t}function d(e){for(var t="0123456789abcdef",r="",n=0;n<4*e.length;n++)r+=t.charAt(e[n>>2]>>n%4*8+4&15)+t.charAt(e[n>>2]>>n%4*8&15);return r}function p(e){for(var t="",r=0;r<4*e.length;r+=3)for(var n=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255,o=0;o<4;o++)8*r+6*o>32*e.length?t+="":t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-o)&63);return t}},function(e,t,r){"use strict";t.__esModule=!0,t.stringifyQuery=function(e){return Object.keys(e).map((function(t){var r=e[t];return t+"="+encodeURIComponent(r)})).join("&")},t.decodeQuery=function(e){return Object.keys(e).reduce((function(t,r){var n=e[r];return t[r]=decodeURIComponent(n),t}),{})},t.parseQueryParams=a,t.appendQueryParams=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a(e),n=r.url,o=r.params;Object.keys(t).forEach((function(e){var r=t[e];null!=r?o[e]=r:delete o[e]}));var i=Object.keys(o).map((function(e){var t=o[e];return e+"="+encodeURIComponent(t)})).join("&");if(!n)return i;if(!i)return n;return n+"?"+i},t.getQueryString=function(e,t){var r=i.default.location.search,n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=r.substr(1).match(n);if(null!=o)return decodeURIComponent(unescape(o[2]));return t};var n,o=r(2),i=(n=o)&&n.__esModule?n:{default:n};function a(e){var t="",r={};if(!e||"string"!=typeof e)return{url:t,params:r};var n="",o=e.indexOf("?"),i=e.indexOf("#"),a=e.indexOf("=");return o>=0?(t=e.substring(0,o),n=e.substring(o+1,i>0?i:e.length)):a>=0?(t="",n=e):(t=e,n=""),n.split("&").map((function(e){var t=e.indexOf("=");if(t>0){var n=e.substring(0,t),o=e.substring(t+1);r[n]=decodeURIComponent(o)}})),{url:t,params:r}}},function(e,t,r){"use strict";t.__esModule=!0,t.startScanner=function(e){if(!e||"function"!=typeof e)return;var t=c();if(!t)return;if(n=e,"scanning"===o)return;o="scanning",s(),t.addEventListener("keydown",A)},t.stopScanner=function(){if("scanning"!==o)return;o="ready",n=null,s();var e=c();e&&e.removeEventListener("keydown",A)};var n=null,o="ready",i="",a=null,u=0;function c(){return"undefined"==typeof window?null:window}function s(){i="",u=0,a&&(clearTimeout(a),a=null)}function A(e){if("scanning"===o)if(function(){var e=c(),t=e&&e.document&&e.document.activeElement;if(!t||t===e.document.body||t===e.document.documentElement)return!1;var r=t.tagName&&t.tagName.toLowerCase();return"input"===r||"textarea"===r||"select"===r||!0===t.isContentEditable}())s();else if(!(e.ctrlKey||e.metaKey||e.altKey)){if("Enter"===e.key){var t=i.replace(/[\uFF01-\uFF5E]/g,(function(e){return String.fromCharCode(e.charCodeAt(0)-65248)})).replace(/\u3002/g,".").replace(/\u2014/g,"_");return t&&function(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}(e),s(),void(t&&n&&n(t))}if(e.key&&1===e.key.length){var r=Date.now();u&&r-u>100&&s(),u=r,i+=e.key,a&&clearTimeout(a),a=setTimeout((function(){s()}),100)}}}},function(e,t,r){"use strict";t.__esModule=!0,t.resolveUseParentProxy=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.installEmbedHost=function(e){if(A||"undefined"==typeof window)return;A=!0,window.addEventListener("message",(function(t){var r=t.data;if(s(r))if("probeWxEnv"!==r.kind)"invoke"===r.kind&&r.id&&r.methodKey&&t.source&&t.source!==window&&function(e,t){var r=t.data,o=r.id,i=r.methodKey,a=function(e,t,r){return e.map((function e(o){if(o&&"object"===(void 0===o?"undefined":n(o))&&o.__IScanEmbedCb__){var i=o.__IScanEmbedCb__;return function(){var e=Array.prototype.slice.call(arguments);t.postMessage({source:"IScanEmbed",v:1,kind:"callback",cbId:i,args:e},r)}}if(null===o||"object"!==(void 0===o?"undefined":n(o)))return o;if(Array.isArray(o))return o.map(e);var a={};return Object.keys(o).forEach((function(t){a[t]=e(o[t])})),a}))}(r.params||[],t.source,t.origin);Promise.resolve().then((function(){return S.apply(void 0,[e,i].concat(a))})).then((function(e){var t=e;return t&&"function"==typeof t.then?t.then((function(e){return t=e})):t})).then((function(e){var r=function(e,t){if("onScanListener"===e&&t&&"object"===(void 0===t?"undefined":n(t))&&"string"==typeof t.key)return{__IScanEmbedListenerRef__:!0,key:t.key};return t}(i,e);t.source.postMessage({source:"IScanEmbed",v:1,kind:"invokeResult",id:o,methodKey:i,ok:!0,result:r},t.origin)})).catch((function(e){t.source.postMessage({source:"IScanEmbed",v:1,kind:"invokeResult",id:o,methodKey:i,ok:!1,error:"string"==typeof e?e:String(e&&e.message||e)},t.origin)}))}(e,t);else{if(!t.source||t.source===window)return;var o=(0,u.readWxLikeEnvFromWindow)(window);t.source.postMessage({source:"IScanEmbed",v:1,kind:"probeWxEnvResult",id:r.id,wx:o},t.origin)}}))},t.getEmbedProxyResolved=function(){return(0,o.resolveUseParentProxy)()};var o=r(8);Object.defineProperty(t,"resolveUseParentProxy",{enumerable:!0,get:function(){return o.resolveUseParentProxy}}),t.exportSDK=function(e,t){for(var r=arguments.length,o=Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];var a={};a=t&&"object"===(void 0===t?"undefined":n(t))?t:E(e);var u={};return Object.keys(a).forEach((function(t){var r=a[t],n=r&&r.method||t;C(u,t,I(e,t,n,o))})),m(),_(u),u};var i=r(5),a=r(0),u=r(7),c=r(1);function s(e){return e&&"IScanEmbed"===e.source&&1===e.v}var A=!1,l=!1,f=Object.create(null),d=Object.create(null);function p(e,t,r){if("function"==typeof e){var o=(0,c.createUUID)();return t[o]=e,{__IScanEmbedCb__:o}}if(null===e||"object"!==(void 0===e?"undefined":n(e)))return e;if(r||(r=new WeakMap),r.has(e))throw new Error("[IScan embed]: circular reference in arguments");if(r.set(e,!0),Array.isArray(e))return e.map((function(e){return p(e,t,r)}));var i={};return Object.keys(e).forEach((function(n){i[n]=p(e[n],t,r)})),i}var h=!1,v=0;function y(){if("undefined"==typeof window||!(0,o.hasDistinctParentWindow)())return!1;var e=(0,a.getConfig)("embedProxyMode");return!1!==e&&"local"!==e&&"off"!==e}function m(){y()&&(h||v>=4||(h=!0,v++,w(),window.parent.postMessage({source:"IScanEmbed",v:1,kind:"probeWxEnv",id:(0,c.createUUID)()},"*"),window.setTimeout((function(){h=!1,null===(0,u.getParentWxEnvReport)()&&y()&&m()}),600)))}function g(e){var t=e.data;if(s(t))if("probeWxEnvResult"!==t.kind){if("invokeResult"===t.kind){var r=f[t.id];if(!r)return;return delete f[t.id],void(t.ok?r.resolve(function(e,t){if("onScanListener"===e&&t&&t.__IScanEmbedListenerRef__&&"string"==typeof t.key){var r=t.key;return{key:r,cancel:function(){return b("offScanListener",[r])}}}return t}(t.methodKey,t.result)):r.reject(new Error(t.error||"[IScan embed]: invoke failed")))}if("callback"===t.kind){var n=d[t.cbId];"function"==typeof n&&n.apply(null,t.args||[])}}else(0,u.setParentWxEnvReport)(!!t.wx)}function w(){l||"undefined"==typeof window||(l=!0,window.addEventListener("message",g))}function b(e,t){w(),m();var r=(0,c.createUUID)(),n=function(e){for(var t=[],r={},n=0;n<e.length;n++)t.push(p(e[n],r));return{serialized:t,registry:r}}(t),o=n.serialized,i=n.registry;return Object.keys(i).forEach((function(e){d[e]=i[e]})),new Promise((function(t,n){f[r]={resolve:t,reject:n},window.parent.postMessage({source:"IScanEmbed",v:1,kind:"invoke",id:r,methodKey:e,params:o},"*")}))}function S(e,t){for(var r=e,n=t.split(".");n.length>1;)r=r[n.shift()];if(r&&1==n.length&&r.hasOwnProperty(n[0])){for(var o,i=arguments.length,a=Array(i>2?i-2:0),u=2;u<i;u++)a[u-2]=arguments[u];return(o=r)[n[0]].apply(o,a)}throw"IScan."+t+" not defined"}function C(e,t,r){var n=t.split(".");n.forEach((function(t,o){o==n.length-1?e[t]=r:e[t]||(e[t]={}),e=e[t]}))}function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r={};return Object.keys(e).forEach((function(o){var i=e[o];if("object"===(void 0===i?"undefined":n(i)))Object.assign(r,E(i,""+t+o+"."));else if("function"==typeof i){var a,u=""+t+o;Object.assign(r,((a={})[u]=u,a))}})),r}function _(e){Object.keys(e).forEach((function(t){var r=e[t];"object"===(void 0===r?"undefined":n(r))&&_(r)})),Object.freeze(e)}function I(e,t,r,n){return function(){for(var a=arguments.length,u=Array(a),c=0;c<a;c++)u[c]=arguments[c];if((0,o.resolveUseParentProxy)()){if("onScanListener"===r){var s=u[0],A=u[1];if(!A||"string"!=typeof A||"function"!=typeof s)return;return b(r,u).catch((function(){})),{key:A,cancel:function(){return b("offScanListener",[A])}}}return b(r,u)}if(!(0,i.isReadyCalled)()&&n&&n.indexOf(t)<0)throw"[IScan]:Can't call the \"IScan."+t+'" method, because "IScan" not ready, please confirm that "IScan.ready()" has been called. params: '+JSON.stringify(u);return S.apply(void 0,[e,r].concat(u))}}}]); |