miva-proctor-sdk 0.0.55-socket-v1 → 0.0.55-socket-v2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.exampleTypescriptPackage=e():t.exampleTypescriptPackage=e()}(this,(function(){return(()=>{var t={9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),s=n(4372),o=n(5327),a=n(4097),c=n(4109),u=n(7985),h=n(5061);t.exports=function(t){return new Promise((function(e,n){var l=t.data,f=t.headers,d=t.responseType;r.isFormData(l)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var g=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";f.Authorization="Basic "+btoa(g+":"+m)}var v=a(t.baseURL,t.url);function y(){if(p){var r="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,s={data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:t,request:p};i(e,n,s),p=null}}if(p.open(t.method.toUpperCase(),o(v,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(y)},p.onabort=function(){p&&(n(h("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(h("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(h(e,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||u(v))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;_&&(f[t.xsrfHeaderName]=_)}"setRequestHeader"in p&&r.forEach(f,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete f[e]:p.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),d&&"json"!==d&&(p.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),n(t),p=null)})),l||(l=null),p.send(l)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),s=n(321),o=n(7185);function a(t){var e=new s(t),n=i(s.prototype.request,e);return r.extend(n,s.prototype,e),r.extend(n,e),n}var c=a(n(5655));c.Axios=s,c.create=function(t){return a(o(c.defaults,t))},c.Cancel=n(5263),c.CancelToken=n(4972),c.isCancel=n(6502),c.all=function(t){return Promise.all(t)},c.spread=n(8713),c.isAxiosError=n(6268),t.exports=c,t.exports.default=c},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),s=n(782),o=n(3572),a=n(7185),c=n(4875),u=c.validators;function h(t){this.defaults=t,this.interceptors={request:new s,response:new s}}h.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&c.assertOptions(e,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)})),!r){var h=[o,void 0];for(Array.prototype.unshift.apply(h,n),h=h.concat(s),i=Promise.resolve(t);h.length;)i=i.then(h.shift(),h.shift());return i}for(var l=t;n.length;){var f=n.shift(),d=n.shift();try{l=f(l)}catch(t){d(t);break}}try{i=o(l)}catch(t){return Promise.reject(t)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},h.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){h.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=h},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,s){var o=new Error(t);return r(o,e,n,i,s)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),s=n(6502),o=n(5655);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||o.adapter)(t).then((function(e){return a(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(a(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],s=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function u(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=c(void 0,t[i])):n[i]=c(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=c(void 0,e[t]))})),r.forEach(s,u),r.forEach(o,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=c(void 0,t[i])):n[i]=c(void 0,e[i])})),r.forEach(a,(function(r){r in e?n[r]=c(t[r],e[r]):r in t&&(n[r]=c(void 0,t[r]))}));var h=i.concat(s).concat(o).concat(a),l=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===h.indexOf(t)}));return r.forEach(l,u),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},8527:(t,e,n)=>{"use strict";var r=n(4867),i=n(5655);t.exports=function(t,e,n){var s=this||i;return r.forEach(n,(function(n){t=n.call(s,t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4867),i=n(6016),s=n(481),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(a(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw s(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){u.headers[t]=r.merge(o)})),t.exports=u},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},5327:(t,e,n)=>{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var s;if(n)s=n(e);else if(r.isURLSearchParams(e))s=e.toString();else{var o=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),o.push(i(e)+"="+i(t))})))})),s=o.join("&")}if(s){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,s,o){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(s)&&a.push("domain="+s),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,s,o={};return t?(r.forEach(t.split("\n"),(function(t){if(s=t.indexOf(":"),e=r.trim(t.substr(0,s)).toLowerCase(),n=r.trim(t.substr(s+1)),e){if(o[e]&&i.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}})),o):o}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,n)=>{"use strict";var r=n(8593),i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var s={},o=r.version.split(".");function a(t,e){for(var n=e?e.split("."):o,r=t.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(t,e,n){var i=e&&a(e);function o(t,e){return"[Axios v"+r.version+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(o(r," has been removed in "+e));return i&&!s[r]&&(s[r]=!0,console.warn(o(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={isOlderVersion:a,assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var s=r[i],o=e[s];if(o){var a=t[s],c=void 0===a||o(a,s,t);if(!0!==c)throw new TypeError("option "+s+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:i}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function s(t){return"[object Array]"===i.call(t)}function o(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function u(t){return"[object Function]"===i.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!o(t)&&null!==t.constructor&&!o(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isPlainObject:c,isUndefined:o,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:u,isStream:function(t){return a(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:h,merge:function t(){var e={};function n(n,r){c(e[r])&&c(n)?e[r]=t(e[r],n):c(n)?e[r]=t({},n):s(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)h(arguments[r],n);return e},extend:function(t,e,n){return h(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},4802:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(804)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},804:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,s,o=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const s=e.formatters[i];if("function"==typeof s){const e=t[o];n=s.call(r,e),t.splice(o,1),o--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(810),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},810:t=>{var e=1e3,n=60*e,r=60*n,i=24*r;function s(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,o){o=o||{};var a,c,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===u&&isFinite(t))return o.long?(a=t,(c=Math.abs(a))>=i?s(a,c,i,"day"):c>=r?s(a,c,r,"hour"):c>=n?s(a,c,n,"minute"):c>=e?s(a,c,e,"second"):a+" ms"):function(t){var s=Math.abs(t);return s>=i?Math.round(t/i)+"d":s>=r?Math.round(t/r)+"h":s>=n?Math.round(t/n)+"m":s>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},6486:function(t,e,n){var r;t=n.nmd(t),function(){var i,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,u=128,h=1/0,l=9007199254740991,f=NaN,d=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",_="[object Error]",b="[object Function]",w="[object GeneratorFunction]",E="[object Map]",S="[object Number]",k="[object Object]",T="[object Promise]",C="[object RegExp]",A="[object Set]",x="[object String]",P="[object Symbol]",O="[object WeakMap]",F="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",M="[object Float64Array]",L="[object Int8Array]",N="[object Int16Array]",j="[object Int32Array]",D="[object Uint8Array]",B="[object Uint8ClampedArray]",U="[object Uint16Array]",V="[object Uint32Array]",G=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,$=RegExp(q.source),X=RegExp(H.source),K=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+|\s+$/g,it=/^\s+/,st=/\s+$/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",kt="a-z\\xdf-\\xf6\\xf8-\\xff",Tt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ct="\\ufe0e\\ufe0f",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xt="["+wt+"]",Pt="["+At+"]",Ot="["+Et+"]",Ft="\\d+",It="["+St+"]",Rt="["+kt+"]",Mt="[^"+wt+At+Ft+St+kt+Tt+"]",Lt="\\ud83c[\\udffb-\\udfff]",Nt="[^"+wt+"]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",Dt="[\\ud800-\\udbff][\\udc00-\\udfff]",Bt="["+Tt+"]",Ut="\\u200d",Vt="(?:"+Rt+"|"+Mt+")",Gt="(?:"+Bt+"|"+Mt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",zt="(?:['’](?:D|LL|M|RE|S|T|VE))?",qt="(?:"+Ot+"|"+Lt+")?",Ht="["+Ct+"]?",$t=Ht+qt+"(?:"+Ut+"(?:"+[Nt,jt,Dt].join("|")+")"+Ht+qt+")*",Xt="(?:"+[It,jt,Dt].join("|")+")"+$t,Kt="(?:"+[Nt+Ot+"?",Ot,jt,Dt,xt].join("|")+")",Yt=RegExp("['’]","g"),Jt=RegExp(Ot,"g"),Zt=RegExp(Lt+"(?="+Lt+")|"+Kt+$t,"g"),Qt=RegExp([Bt+"?"+Rt+"+"+Wt+"(?="+[Pt,Bt,"$"].join("|")+")",Gt+"+"+zt+"(?="+[Pt,Bt+Vt,"$"].join("|")+")",Bt+"?"+Vt+"+"+Wt,Bt+"+"+zt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ft,Xt].join("|"),"g"),te=RegExp("["+Ut+wt+Et+Ct+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,ie={};ie[R]=ie[M]=ie[L]=ie[N]=ie[j]=ie[D]=ie[B]=ie[U]=ie[V]=!0,ie[g]=ie[m]=ie[F]=ie[v]=ie[I]=ie[y]=ie[_]=ie[b]=ie[E]=ie[S]=ie[k]=ie[C]=ie[A]=ie[x]=ie[O]=!1;var se={};se[g]=se[m]=se[F]=se[I]=se[v]=se[y]=se[R]=se[M]=se[L]=se[N]=se[j]=se[E]=se[S]=se[k]=se[C]=se[A]=se[x]=se[P]=se[D]=se[B]=se[U]=se[V]=!0,se[_]=se[b]=se[O]=!1;var oe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ce=parseInt,ue="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,he="object"==typeof self&&self&&self.Object===Object&&self,le=ue||he||Function("return this")(),fe=e&&!e.nodeType&&e,de=fe&&t&&!t.nodeType&&t,pe=de&&de.exports===fe,ge=pe&&ue.process,me=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ve=me&&me.isArrayBuffer,ye=me&&me.isDate,_e=me&&me.isMap,be=me&&me.isRegExp,we=me&&me.isSet,Ee=me&&me.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ke(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function Te(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ce(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function xe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Pe(t,e){return!(null==t||!t.length)&&Be(t,e,0)>-1}function Oe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Fe(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Ie(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Re(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function Me(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ne=We("length");function je(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function De(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function Be(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):De(t,Ve,n)}function Ue(t,e,n,r){for(var i=n-1,s=t.length;++i<s;)if(r(t[i],e))return i;return-1}function Ve(t){return t!=t}function Ge(t,e){var n=null==t?0:t.length;return n?He(t,e)/n:f}function We(t){return function(e){return null==e?i:e[t]}}function ze(t){return function(e){return null==t?i:t[e]}}function qe(t,e,n,r,i){return i(t,(function(t,i,s){n=r?(r=!1,t):e(n,t,i,s)})),n}function He(t,e){for(var n,r=-1,s=t.length;++r<s;){var o=e(t[r]);o!==i&&(n=n===i?o:n+o)}return n}function $e(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Xe(t){return function(e){return t(e)}}function Ke(t,e){return Fe(e,(function(e){return t[e]}))}function Ye(t,e){return t.has(e)}function Je(t,e){for(var n=-1,r=t.length;++n<r&&Be(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length;n--&&Be(e,t[n],0)>-1;);return n}var Qe=ze({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=ze({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function en(t){return"\\"+oe[t]}function nn(t){return te.test(t)}function rn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function on(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n];o!==e&&o!==a||(t[n]=a,s[i++]=n)}return s}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function un(t){return nn(t)?function(t){for(var e=Zt.lastIndex=0;Zt.test(t);)++e;return e}(t):Ne(t)}function hn(t){return nn(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.split("")}(t)}var ln=ze({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),fn=function t(e){var n,r=(e=null==e?le:fn.defaults(le.Object(),e,fn.pick(le,ne))).Array,wt=e.Date,Et=e.Error,St=e.Function,kt=e.Math,Tt=e.Object,Ct=e.RegExp,At=e.String,xt=e.TypeError,Pt=r.prototype,Ot=St.prototype,Ft=Tt.prototype,It=e["__core-js_shared__"],Rt=Ot.toString,Mt=Ft.hasOwnProperty,Lt=0,Nt=(n=/[^.]+$/.exec(It&&It.keys&&It.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",jt=Ft.toString,Dt=Rt.call(Tt),Bt=le._,Ut=Ct("^"+Rt.call(Mt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=pe?e.Buffer:i,Gt=e.Symbol,Wt=e.Uint8Array,zt=Vt?Vt.allocUnsafe:i,qt=sn(Tt.getPrototypeOf,Tt),Ht=Tt.create,$t=Ft.propertyIsEnumerable,Xt=Pt.splice,Kt=Gt?Gt.isConcatSpreadable:i,Zt=Gt?Gt.iterator:i,te=Gt?Gt.toStringTag:i,oe=function(){try{var t=as(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ue=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,he=wt&&wt.now!==le.Date.now&&wt.now,fe=e.setTimeout!==le.setTimeout&&e.setTimeout,de=kt.ceil,ge=kt.floor,me=Tt.getOwnPropertySymbols,Ne=Vt?Vt.isBuffer:i,ze=e.isFinite,dn=Pt.join,pn=sn(Tt.keys,Tt),gn=kt.max,mn=kt.min,vn=wt.now,yn=e.parseInt,_n=kt.random,bn=Pt.reverse,wn=as(e,"DataView"),En=as(e,"Map"),Sn=as(e,"Promise"),kn=as(e,"Set"),Tn=as(e,"WeakMap"),Cn=as(Tt,"create"),An=Tn&&new Tn,xn={},Pn=Ls(wn),On=Ls(En),Fn=Ls(Sn),In=Ls(kn),Rn=Ls(Tn),Mn=Gt?Gt.prototype:i,Ln=Mn?Mn.valueOf:i,Nn=Mn?Mn.toString:i;function jn(t){if(Qo(t)&&!Go(t)&&!(t instanceof Vn)){if(t instanceof Un)return t;if(Mt.call(t,"__wrapped__"))return Ns(t)}return new Un(t)}var Dn=function(){function t(){}return function(e){if(!Zo(e))return{};if(Ht)return Ht(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Bn(){}function Un(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Vn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new zn;++e<n;)this.add(t[e])}function Hn(t){var e=this.__data__=new Wn(t);this.size=e.size}function $n(t,e){var n=Go(t),r=!n&&Vo(t),i=!n&&!r&&Ho(t),s=!n&&!r&&!i&&aa(t),o=n||r||i||s,a=o?$e(t.length,At):[],c=a.length;for(var u in t)!e&&!Mt.call(t,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ps(u,c))||a.push(u);return a}function Xn(t){var e=t.length;return e?t[zr(0,e-1)]:i}function Kn(t,e){return Os(Ti(t),ir(e,0,t.length))}function Yn(t){return Os(Ti(t))}function Jn(t,e,n){(n!==i&&!Do(t[e],n)||n===i&&!(e in t))&&nr(t,e,n)}function Zn(t,e,n){var r=t[e];Mt.call(t,e)&&Do(r,n)&&(n!==i||e in t)||nr(t,e,n)}function Qn(t,e){for(var n=t.length;n--;)if(Do(t[n][0],e))return n;return-1}function tr(t,e,n,r){return ur(t,(function(t,i,s){e(r,t,n(t),s)})),r}function er(t,e){return t&&Ci(e,Pa(e),t)}function nr(t,e,n){"__proto__"==e&&oe?oe(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function rr(t,e){for(var n=-1,s=e.length,o=r(s),a=null==t;++n<s;)o[n]=a?i:ka(t,e[n]);return o}function ir(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function sr(t,e,n,r,s,o){var a,c=1&e,u=2&e,h=4&e;if(n&&(a=s?n(t,r,s,o):n(t)),a!==i)return a;if(!Zo(t))return t;var l=Go(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Mt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return Ti(t,a)}else{var f=hs(t),d=f==b||f==w;if(Ho(t))return _i(t,c);if(f==k||f==g||d&&!s){if(a=u||d?{}:fs(t),!c)return u?function(t,e){return Ci(t,us(t),e)}(t,function(t,e){return t&&Ci(e,Oa(e),t)}(a,t)):function(t,e){return Ci(t,cs(t),e)}(t,er(a,t))}else{if(!se[f])return s?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case F:return bi(t);case v:case y:return new i(+t);case I:return function(t,e){var n=e?bi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case M:case L:case N:case j:case D:case B:case U:case V:return wi(t,n);case E:return new i;case S:case x:return new i(t);case C:return function(t){var e=new t.constructor(t.source,ft.exec(t));return e.lastIndex=t.lastIndex,e}(t);case A:return new i;case P:return r=t,Ln?Tt(Ln.call(r)):{}}}(t,f,c)}}o||(o=new Hn);var p=o.get(t);if(p)return p;o.set(t,a),ia(t)?t.forEach((function(r){a.add(sr(r,e,n,r,t,o))})):ta(t)&&t.forEach((function(r,i){a.set(i,sr(r,e,n,i,t,o))}));var m=l?i:(h?u?ts:Qi:u?Oa:Pa)(t);return Te(m||t,(function(r,i){m&&(r=t[i=r]),Zn(a,i,sr(r,e,n,i,t,o))})),a}function or(t,e,n){var r=n.length;if(null==t)return!r;for(t=Tt(t);r--;){var s=n[r],o=e[s],a=t[s];if(a===i&&!(s in t)||!o(a))return!1}return!0}function ar(t,e,n){if("function"!=typeof t)throw new xt(s);return Cs((function(){t.apply(i,n)}),e)}function cr(t,e,n,r){var i=-1,s=Pe,o=!0,a=t.length,c=[],u=e.length;if(!a)return c;n&&(e=Fe(e,Xe(n))),r?(s=Oe,o=!1):e.length>=200&&(s=Ye,o=!1,e=new qn(e));t:for(;++i<a;){var h=t[i],l=null==n?h:n(h);if(h=r||0!==h?h:0,o&&l==l){for(var f=u;f--;)if(e[f]===l)continue t;c.push(h)}else s(e,l,r)||c.push(h)}return c}jn.templateSettings={escape:K,evaluate:Y,interpolate:J,variable:"",imports:{_:jn}},jn.prototype=Bn.prototype,jn.prototype.constructor=jn,Un.prototype=Dn(Bn.prototype),Un.prototype.constructor=Un,Vn.prototype=Dn(Bn.prototype),Vn.prototype.constructor=Vn,Gn.prototype.clear=function(){this.__data__=Cn?Cn(null):{},this.size=0},Gn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gn.prototype.get=function(t){var e=this.__data__;if(Cn){var n=e[t];return n===o?i:n}return Mt.call(e,t)?e[t]:i},Gn.prototype.has=function(t){var e=this.__data__;return Cn?e[t]!==i:Mt.call(e,t)},Gn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Cn&&e===i?o:e,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(t){var e=this.__data__,n=Qn(e,t);return!(n<0||(n==e.length-1?e.pop():Xt.call(e,n,1),--this.size,0))},Wn.prototype.get=function(t){var e=this.__data__,n=Qn(e,t);return n<0?i:e[n][1]},Wn.prototype.has=function(t){return Qn(this.__data__,t)>-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=Qn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(En||Wn),string:new Gn}},zn.prototype.delete=function(t){var e=ss(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return ss(this,t).get(t)},zn.prototype.has=function(t){return ss(this,t).has(t)},zn.prototype.set=function(t,e){var n=ss(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(t){return this.__data__.set(t,o),this},qn.prototype.has=function(t){return this.__data__.has(t)},Hn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Hn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Hn.prototype.get=function(t){return this.__data__.get(t)},Hn.prototype.has=function(t){return this.__data__.has(t)},Hn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!En||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var ur=Pi(vr),hr=Pi(yr,!0);function lr(t,e){var n=!0;return ur(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function fr(t,e,n){for(var r=-1,s=t.length;++r<s;){var o=t[r],a=e(o);if(null!=a&&(c===i?a==a&&!oa(a):n(a,c)))var c=a,u=o}return u}function dr(t,e){var n=[];return ur(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function pr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=ds),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?pr(a,e-1,n,r,i):Ie(i,a):r||(i[i.length]=a)}return i}var gr=Oi(),mr=Oi(!0);function vr(t,e){return t&&gr(t,e,Pa)}function yr(t,e){return t&&mr(t,e,Pa)}function _r(t,e){return xe(e,(function(e){return Ko(t[e])}))}function br(t,e){for(var n=0,r=(e=gi(e,t)).length;null!=t&&n<r;)t=t[Ms(e[n++])];return n&&n==r?t:i}function wr(t,e,n){var r=e(t);return Go(t)?r:Ie(r,n(t))}function Er(t){return null==t?t===i?"[object Undefined]":"[object Null]":te&&te in Tt(t)?function(t){var e=Mt.call(t,te),n=t[te];try{t[te]=i;var r=!0}catch(t){}var s=jt.call(t);return r&&(e?t[te]=n:delete t[te]),s}(t):function(t){return jt.call(t)}(t)}function Sr(t,e){return t>e}function kr(t,e){return null!=t&&Mt.call(t,e)}function Tr(t,e){return null!=t&&e in Tt(t)}function Cr(t,e,n){for(var s=n?Oe:Pe,o=t[0].length,a=t.length,c=a,u=r(a),h=1/0,l=[];c--;){var f=t[c];c&&e&&(f=Fe(f,Xe(e))),h=mn(f.length,h),u[c]=!n&&(e||o>=120&&f.length>=120)?new qn(c&&f):i}f=t[0];var d=-1,p=u[0];t:for(;++d<o&&l.length<h;){var g=f[d],m=e?e(g):g;if(g=n||0!==g?g:0,!(p?Ye(p,m):s(l,m,n))){for(c=a;--c;){var v=u[c];if(!(v?Ye(v,m):s(t[c],m,n)))continue t}p&&p.push(m),l.push(g)}}return l}function Ar(t,e,n){var r=null==(t=Ss(t,e=gi(e,t)))?t:t[Ms($s(e))];return null==r?i:Se(r,t,n)}function xr(t){return Qo(t)&&Er(t)==g}function Pr(t,e,n,r,s){return t===e||(null==t||null==e||!Qo(t)&&!Qo(e)?t!=t&&e!=e:function(t,e,n,r,s,o){var a=Go(t),c=Go(e),u=a?m:hs(t),h=c?m:hs(e),l=(u=u==g?k:u)==k,f=(h=h==g?k:h)==k,d=u==h;if(d&&Ho(t)){if(!Ho(e))return!1;a=!0,l=!1}if(d&&!l)return o||(o=new Hn),a||aa(t)?Ji(t,e,n,r,s,o):function(t,e,n,r,i,s,o){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case F:return!(t.byteLength!=e.byteLength||!s(new Wt(t),new Wt(e)));case v:case y:case S:return Do(+t,+e);case _:return t.name==e.name&&t.message==e.message;case C:case x:return t==e+"";case E:var a=rn;case A:var c=1&r;if(a||(a=an),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;r|=2,o.set(t,e);var h=Ji(a(t),a(e),r,i,s,o);return o.delete(t),h;case P:if(Ln)return Ln.call(t)==Ln.call(e)}return!1}(t,e,u,n,r,s,o);if(!(1&n)){var p=l&&Mt.call(t,"__wrapped__"),b=f&&Mt.call(e,"__wrapped__");if(p||b){var w=p?t.value():t,T=b?e.value():e;return o||(o=new Hn),s(w,T,n,r,o)}}return!!d&&(o||(o=new Hn),function(t,e,n,r,s,o){var a=1&n,c=Qi(t),u=c.length;if(u!=Qi(e).length&&!a)return!1;for(var h=u;h--;){var l=c[h];if(!(a?l in e:Mt.call(e,l)))return!1}var f=o.get(t),d=o.get(e);if(f&&d)return f==e&&d==t;var p=!0;o.set(t,e),o.set(e,t);for(var g=a;++h<u;){var m=t[l=c[h]],v=e[l];if(r)var y=a?r(v,m,l,e,t,o):r(m,v,l,t,e,o);if(!(y===i?m===v||s(m,v,n,r,o):y)){p=!1;break}g||(g="constructor"==l)}if(p&&!g){var _=t.constructor,b=e.constructor;_==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,s,o))}(t,e,n,r,Pr,s))}function Or(t,e,n,r){var s=n.length,o=s,a=!r;if(null==t)return!o;for(t=Tt(t);s--;){var c=n[s];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++s<o;){var u=(c=n[s])[0],h=t[u],l=c[1];if(a&&c[2]){if(h===i&&!(u in t))return!1}else{var f=new Hn;if(r)var d=r(h,l,u,t,e,f);if(!(d===i?Pr(l,h,3,r,f):d))return!1}}return!0}function Fr(t){return!(!Zo(t)||(e=t,Nt&&Nt in e))&&(Ko(t)?Ut:gt).test(Ls(t));var e}function Ir(t){return"function"==typeof t?t:null==t?ec:"object"==typeof t?Go(t)?jr(t[0],t[1]):Nr(t):hc(t)}function Rr(t){if(!_s(t))return pn(t);var e=[];for(var n in Tt(t))Mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Mr(t,e){return t<e}function Lr(t,e){var n=-1,i=zo(t)?r(t.length):[];return ur(t,(function(t,r,s){i[++n]=e(t,r,s)})),i}function Nr(t){var e=os(t);return 1==e.length&&e[0][2]?ws(e[0][0],e[0][1]):function(n){return n===t||Or(n,t,e)}}function jr(t,e){return ms(t)&&bs(e)?ws(Ms(t),e):function(n){var r=ka(n,t);return r===i&&r===e?Ta(n,t):Pr(e,r,3)}}function Dr(t,e,n,r,s){t!==e&&gr(e,(function(o,a){if(s||(s=new Hn),Zo(o))!function(t,e,n,r,s,o,a){var c=ks(t,n),u=ks(e,n),h=a.get(u);if(h)Jn(t,n,h);else{var l=o?o(c,u,n+"",t,e,a):i,f=l===i;if(f){var d=Go(u),p=!d&&Ho(u),g=!d&&!p&&aa(u);l=u,d||p||g?Go(c)?l=c:qo(c)?l=Ti(c):p?(f=!1,l=_i(u,!0)):g?(f=!1,l=wi(u,!0)):l=[]:na(u)||Vo(u)?(l=c,Vo(c)?l=ga(c):Zo(c)&&!Ko(c)||(l=fs(u))):f=!1}f&&(a.set(u,l),s(l,u,r,o,a),a.delete(u)),Jn(t,n,l)}}(t,e,a,n,Dr,r,s);else{var c=r?r(ks(t,a),o,a+"",t,e,s):i;c===i&&(c=o),Jn(t,a,c)}}),Oa)}function Br(t,e){var n=t.length;if(n)return ps(e+=e<0?n:0,n)?t[e]:i}function Ur(t,e,n){e=e.length?Fe(e,(function(t){return Go(t)?function(e){return br(e,1===t.length?t[0]:t)}:t})):[ec];var r=-1;e=Fe(e,Xe(is()));var i=Lr(t,(function(t,n,i){var s=Fe(e,(function(e){return e(t)}));return{criteria:s,index:++r,value:t}}));return function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,s=e.criteria,o=i.length,a=n.length;++r<o;){var c=Ei(i[r],s[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Vr(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=br(t,o);n(a,o)&&Kr(s,gi(o,t),a)}return s}function Gr(t,e,n,r){var i=r?Ue:Be,s=-1,o=e.length,a=t;for(t===e&&(e=Ti(e)),n&&(a=Fe(t,Xe(n)));++s<o;)for(var c=0,u=e[s],h=n?n(u):u;(c=i(a,h,c,r))>-1;)a!==t&&Xt.call(a,c,1),Xt.call(t,c,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;ps(i)?Xt.call(t,i,1):ai(t,i)}}return t}function zr(t,e){return t+ge(_n()*(e-t+1))}function qr(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Hr(t,e){return As(Es(t,e,ec),t+"")}function $r(t){return Xn(Da(t))}function Xr(t,e){var n=Da(t);return Os(n,ir(e,0,n.length))}function Kr(t,e,n,r){if(!Zo(t))return t;for(var s=-1,o=(e=gi(e,t)).length,a=o-1,c=t;null!=c&&++s<o;){var u=Ms(e[s]),h=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(s!=a){var l=c[u];(h=r?r(l,u,c):i)===i&&(h=Zo(l)?l:ps(e[s+1])?[]:{})}Zn(c,u,h),c=c[u]}return t}var Yr=An?function(t,e){return An.set(t,e),t}:ec,Jr=oe?function(t,e){return oe(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:ec;function Zr(t){return Os(Da(t))}function Qr(t,e,n){var i=-1,s=t.length;e<0&&(e=-e>s?0:s+e),(n=n>s?s:n)<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var o=r(s);++i<s;)o[i]=t[i+e];return o}function ti(t,e){var n;return ur(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ei(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=t[s];null!==o&&!oa(o)&&(n?o<=e:o<e)?r=s+1:i=s}return i}return ni(t,e,ec,n)}function ni(t,e,n,r){var s=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!=e,c=null===e,u=oa(e),h=e===i;s<o;){var l=ge((s+o)/2),f=n(t[l]),d=f!==i,p=null===f,g=f==f,m=oa(f);if(a)var v=r||g;else v=h?g&&(r||d):c?g&&d&&(r||!p):u?g&&d&&!p&&(r||!m):!p&&!m&&(r?f<=e:f<e);v?s=l+1:o=l}return mn(o,4294967294)}function ri(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n],a=e?e(o):o;if(!n||!Do(a,c)){var c=a;s[i++]=0===o?0:o}}return s}function ii(t){return"number"==typeof t?t:oa(t)?f:+t}function si(t){if("string"==typeof t)return t;if(Go(t))return Fe(t,si)+"";if(oa(t))return Nn?Nn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function oi(t,e,n){var r=-1,i=Pe,s=t.length,o=!0,a=[],c=a;if(n)o=!1,i=Oe;else if(s>=200){var u=e?null:qi(t);if(u)return an(u);o=!1,i=Ye,c=new qn}else c=e?[]:a;t:for(;++r<s;){var h=t[r],l=e?e(h):h;if(h=n||0!==h?h:0,o&&l==l){for(var f=c.length;f--;)if(c[f]===l)continue t;e&&c.push(l),a.push(h)}else i(c,l,n)||(c!==a&&c.push(l),a.push(h))}return a}function ai(t,e){return null==(t=Ss(t,e=gi(e,t)))||delete t[Ms($s(e))]}function ci(t,e,n,r){return Kr(t,e,n(br(t,e)),r)}function ui(t,e,n,r){for(var i=t.length,s=r?i:-1;(r?s--:++s<i)&&e(t[s],s,t););return n?Qr(t,r?0:s,r?s+1:i):Qr(t,r?s+1:0,r?i:s)}function hi(t,e){var n=t;return n instanceof Vn&&(n=n.value()),Re(e,(function(t,e){return e.func.apply(e.thisArg,Ie([t],e.args))}),n)}function li(t,e,n){var i=t.length;if(i<2)return i?oi(t[0]):[];for(var s=-1,o=r(i);++s<i;)for(var a=t[s],c=-1;++c<i;)c!=s&&(o[s]=cr(o[s]||a,t[c],e,n));return oi(pr(o,1),e,n)}function fi(t,e,n){for(var r=-1,s=t.length,o=e.length,a={};++r<s;){var c=r<o?e[r]:i;n(a,t[r],c)}return a}function di(t){return qo(t)?t:[]}function pi(t){return"function"==typeof t?t:ec}function gi(t,e){return Go(t)?t:ms(t,e)?[t]:Rs(ma(t))}var mi=Hr;function vi(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:Qr(t,e,n)}var yi=ue||function(t){return le.clearTimeout(t)};function _i(t,e){if(e)return t.slice();var n=t.length,r=zt?zt(n):new t.constructor(n);return t.copy(r),r}function bi(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function wi(t,e){var n=e?bi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ei(t,e){if(t!==e){var n=t!==i,r=null===t,s=t==t,o=oa(t),a=e!==i,c=null===e,u=e==e,h=oa(e);if(!c&&!h&&!o&&t>e||o&&a&&u&&!c&&!h||r&&a&&u||!n&&u||!s)return 1;if(!r&&!o&&!h&&t<e||h&&n&&s&&!r&&!o||c&&n&&s||!a&&s||!u)return-1}return 0}function Si(t,e,n,i){for(var s=-1,o=t.length,a=n.length,c=-1,u=e.length,h=gn(o-a,0),l=r(u+h),f=!i;++c<u;)l[c]=e[c];for(;++s<a;)(f||s<o)&&(l[n[s]]=t[s]);for(;h--;)l[c++]=t[s++];return l}function ki(t,e,n,i){for(var s=-1,o=t.length,a=-1,c=n.length,u=-1,h=e.length,l=gn(o-c,0),f=r(l+h),d=!i;++s<l;)f[s]=t[s];for(var p=s;++u<h;)f[p+u]=e[u];for(;++a<c;)(d||s<o)&&(f[p+n[a]]=t[s++]);return f}function Ti(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ci(t,e,n,r){var s=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var c=e[o],u=r?r(n[c],t[c],c,n,t):i;u===i&&(u=t[c]),s?nr(n,c,u):Zn(n,c,u)}return n}function Ai(t,e){return function(n,r){var i=Go(n)?ke:tr,s=e?e():{};return i(n,t,is(r,2),s)}}function xi(t){return Hr((function(e,n){var r=-1,s=n.length,o=s>1?n[s-1]:i,a=s>2?n[2]:i;for(o=t.length>3&&"function"==typeof o?(s--,o):i,a&&gs(n[0],n[1],a)&&(o=s<3?i:o,s=1),e=Tt(e);++r<s;){var c=n[r];c&&t(e,c,r,o)}return e}))}function Pi(t,e){return function(n,r){if(null==n)return n;if(!zo(n))return t(n,r);for(var i=n.length,s=e?i:-1,o=Tt(n);(e?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function Oi(t){return function(e,n,r){for(var i=-1,s=Tt(e),o=r(e),a=o.length;a--;){var c=o[t?a:++i];if(!1===n(s[c],c,s))break}return e}}function Fi(t){return function(e){var n=nn(e=ma(e))?hn(e):i,r=n?n[0]:e.charAt(0),s=n?vi(n,1).join(""):e.slice(1);return r[t]()+s}}function Ii(t){return function(e){return Re(Ka(Va(e).replace(Yt,"")),t,"")}}function Ri(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Dn(t.prototype),r=t.apply(n,e);return Zo(r)?r:n}}function Mi(t){return function(e,n,r){var s=Tt(e);if(!zo(e)){var o=is(n,3);e=Pa(e),n=function(t){return o(s[t],t,s)}}var a=t(e,n,r);return a>-1?s[o?e[a]:a]:i}}function Li(t){return Zi((function(e){var n=e.length,r=n,o=Un.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new xt(s);if(o&&!c&&"wrapper"==ns(a))var c=new Un([],!0)}for(r=c?r:n;++r<n;){var u=ns(a=e[r]),h="wrapper"==u?es(a):i;c=h&&vs(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?c[ns(h[0])].apply(c,h[3]):1==a.length&&vs(a)?c[u]():c.thru(a)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Go(r))return c.plant(r).value();for(var i=0,s=n?e[i].apply(this,t):r;++i<n;)s=e[i].call(this,s);return s}}))}function Ni(t,e,n,s,o,a,c,h,l,f){var d=e&u,p=1&e,g=2&e,m=24&e,v=512&e,y=g?i:Ri(t);return function u(){for(var _=arguments.length,b=r(_),w=_;w--;)b[w]=arguments[w];if(m)var E=rs(u),S=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(b,E);if(s&&(b=Si(b,s,o,m)),a&&(b=ki(b,a,c,m)),_-=S,m&&_<f){var k=on(b,E);return Wi(t,e,Ni,u.placeholder,n,b,k,h,l,f-_)}var T=p?n:this,C=g?T[t]:t;return _=b.length,h?b=function(t,e){for(var n=t.length,r=mn(e.length,n),s=Ti(t);r--;){var o=e[r];t[r]=ps(o,n)?s[o]:i}return t}(b,h):v&&_>1&&b.reverse(),d&&l<_&&(b.length=l),this&&this!==le&&this instanceof u&&(C=y||Ri(C)),C.apply(T,b)}}function ji(t,e){return function(n,r){return function(t,e,n,r){return vr(t,(function(t,i,s){e(r,n(t),i,s)})),r}(n,t,e(r),{})}}function Di(t,e){return function(n,r){var s;if(n===i&&r===i)return e;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=ii(n),r=ii(r)),s=t(n,r)}return s}}function Bi(t){return Zi((function(e){return e=Fe(e,Xe(is())),Hr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Ui(t,e){var n=(e=e===i?" ":si(e)).length;if(n<2)return n?qr(e,t):e;var r=qr(e,de(t/un(e)));return nn(e)?vi(hn(r),0,t).join(""):r.slice(0,t)}function Vi(t){return function(e,n,s){return s&&"number"!=typeof s&&gs(e,n,s)&&(n=s=i),e=la(e),n===i?(n=e,e=0):n=la(n),function(t,e,n,i){for(var s=-1,o=gn(de((e-t)/(n||1)),0),a=r(o);o--;)a[i?o:++s]=t,t+=n;return a}(e,n,s=s===i?e<n?1:-1:la(s),t)}}function Gi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=pa(e),n=pa(n)),t(e,n)}}function Wi(t,e,n,r,s,o,a,u,h,l){var f=8&e;e|=f?c:64,4&(e&=~(f?64:c))||(e&=-4);var d=[t,e,s,f?o:i,f?a:i,f?i:o,f?i:a,u,h,l],p=n.apply(i,d);return vs(t)&&Ts(p,d),p.placeholder=r,xs(p,t,e)}function zi(t){var e=kt[t];return function(t,n){if(t=pa(t),(n=null==n?0:mn(fa(n),292))&&ze(t)){var r=(ma(t)+"e").split("e");return+((r=(ma(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var qi=kn&&1/an(new kn([,-0]))[1]==h?function(t){return new kn(t)}:oc;function Hi(t){return function(e){var n=hs(e);return n==E?rn(e):n==A?cn(e):function(t,e){return Fe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function $i(t,e,n,o,h,l,f,d){var p=2&e;if(!p&&"function"!=typeof t)throw new xt(s);var g=o?o.length:0;if(g||(e&=-97,o=h=i),f=f===i?f:gn(fa(f),0),d=d===i?d:fa(d),g-=h?h.length:0,64&e){var m=o,v=h;o=h=i}var y=p?i:es(t),_=[t,e,n,o,h,m,v,l,f,d];if(y&&function(t,e){var n=t[1],r=e[1],i=n|r,s=i<131,o=r==u&&8==n||r==u&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!s&&!o)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var c=e[3];if(c){var h=t[3];t[3]=h?Si(h,c,e[4]):c,t[4]=h?on(t[3],a):e[4]}(c=e[5])&&(h=t[5],t[5]=h?ki(h,c,e[6]):c,t[6]=h?on(t[5],a):e[6]),(c=e[7])&&(t[7]=c),r&u&&(t[8]=null==t[8]?e[8]:mn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(_,y),t=_[0],e=_[1],n=_[2],o=_[3],h=_[4],!(d=_[9]=_[9]===i?p?0:t.length:gn(_[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)b=8==e||16==e?function(t,e,n){var s=Ri(t);return function o(){for(var a=arguments.length,c=r(a),u=a,h=rs(o);u--;)c[u]=arguments[u];var l=a<3&&c[0]!==h&&c[a-1]!==h?[]:on(c,h);return(a-=l.length)<n?Wi(t,e,Ni,o.placeholder,i,c,l,i,i,n-a):Se(this&&this!==le&&this instanceof o?s:t,this,c)}}(t,e,d):e!=c&&33!=e||h.length?Ni.apply(i,_):function(t,e,n,i){var s=1&e,o=Ri(t);return function e(){for(var a=-1,c=arguments.length,u=-1,h=i.length,l=r(h+c),f=this&&this!==le&&this instanceof e?o:t;++u<h;)l[u]=i[u];for(;c--;)l[u++]=arguments[++a];return Se(f,s?n:this,l)}}(t,e,n,o);else var b=function(t,e,n){var r=1&e,i=Ri(t);return function e(){return(this&&this!==le&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return xs((y?Yr:Ts)(b,_),t,e)}function Xi(t,e,n,r){return t===i||Do(t,Ft[n])&&!Mt.call(r,n)?e:t}function Ki(t,e,n,r,s,o){return Zo(t)&&Zo(e)&&(o.set(e,t),Dr(t,e,i,Ki,o),o.delete(e)),t}function Yi(t){return na(t)?i:t}function Ji(t,e,n,r,s,o){var a=1&n,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var h=o.get(t),l=o.get(e);if(h&&l)return h==e&&l==t;var f=-1,d=!0,p=2&n?new qn:i;for(o.set(t,e),o.set(e,t);++f<c;){var g=t[f],m=e[f];if(r)var v=a?r(m,g,f,e,t,o):r(g,m,f,t,e,o);if(v!==i){if(v)continue;d=!1;break}if(p){if(!Le(e,(function(t,e){if(!Ye(p,e)&&(g===t||s(g,t,n,r,o)))return p.push(e)}))){d=!1;break}}else if(g!==m&&!s(g,m,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Zi(t){return As(Es(t,i,Gs),t+"")}function Qi(t){return wr(t,Pa,cs)}function ts(t){return wr(t,Oa,us)}var es=An?function(t){return An.get(t)}:oc;function ns(t){for(var e=t.name+"",n=xn[e],r=Mt.call(xn,e)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==t)return i.name}return e}function rs(t){return(Mt.call(jn,"placeholder")?jn:t).placeholder}function is(){var t=jn.iteratee||nc;return t=t===nc?Ir:t,arguments.length?t(arguments[0],arguments[1]):t}function ss(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function os(t){for(var e=Pa(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,bs(i)]}return e}function as(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Fr(n)?n:i}var cs=me?function(t){return null==t?[]:(t=Tt(t),xe(me(t),(function(e){return $t.call(t,e)})))}:dc,us=me?function(t){for(var e=[];t;)Ie(e,cs(t)),t=qt(t);return e}:dc,hs=Er;function ls(t,e,n){for(var r=-1,i=(e=gi(e,t)).length,s=!1;++r<i;){var o=Ms(e[r]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++r!=i?s:!!(i=null==t?0:t.length)&&Jo(i)&&ps(o,i)&&(Go(t)||Vo(t))}function fs(t){return"function"!=typeof t.constructor||_s(t)?{}:Dn(qt(t))}function ds(t){return Go(t)||Vo(t)||!!(Kt&&t&&t[Kt])}function ps(t,e){var n=typeof t;return!!(e=null==e?l:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function gs(t,e,n){if(!Zo(n))return!1;var r=typeof e;return!!("number"==r?zo(n)&&ps(e,n.length):"string"==r&&e in n)&&Do(n[e],t)}function ms(t,e){if(Go(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!oa(t))||Q.test(t)||!Z.test(t)||null!=e&&t in Tt(e)}function vs(t){var e=ns(t),n=jn[e];if("function"!=typeof n||!(e in Vn.prototype))return!1;if(t===n)return!0;var r=es(n);return!!r&&t===r[0]}(wn&&hs(new wn(new ArrayBuffer(1)))!=I||En&&hs(new En)!=E||Sn&&hs(Sn.resolve())!=T||kn&&hs(new kn)!=A||Tn&&hs(new Tn)!=O)&&(hs=function(t){var e=Er(t),n=e==k?t.constructor:i,r=n?Ls(n):"";if(r)switch(r){case Pn:return I;case On:return E;case Fn:return T;case In:return A;case Rn:return O}return e});var ys=It?Ko:pc;function _s(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ft)}function bs(t){return t==t&&!Zo(t)}function ws(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in Tt(n))}}function Es(t,e,n){return e=gn(e===i?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=gn(i.length-e,0),a=r(o);++s<o;)a[s]=i[e+s];s=-1;for(var c=r(e+1);++s<e;)c[s]=i[s];return c[e]=n(a),Se(t,this,c)}}function Ss(t,e){return e.length<2?t:br(t,Qr(e,0,-1))}function ks(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ts=Ps(Yr),Cs=fe||function(t,e){return le.setTimeout(t,e)},As=Ps(Jr);function xs(t,e,n){var r=e+"";return As(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Te(p,(function(n){var r="_."+n[0];e&n[1]&&!Pe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(ct):[]}(r),n)))}function Ps(t){var e=0,n=0;return function(){var r=vn(),s=16-(r-n);if(n=r,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Os(t,e){var n=-1,r=t.length,s=r-1;for(e=e===i?r:e;++n<e;){var o=zr(n,s),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var Fs,Is,Rs=(Fs=Io((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,i){e.push(r?i.replace(ht,"$1"):n||t)})),e}),(function(t){return 500===Is.size&&Is.clear(),t})),Is=Fs.cache,Fs);function Ms(t){if("string"==typeof t||oa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ls(t){if(null!=t){try{return Rt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ns(t){if(t instanceof Vn)return t.clone();var e=new Un(t.__wrapped__,t.__chain__);return e.__actions__=Ti(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var js=Hr((function(t,e){return qo(t)?cr(t,pr(e,1,qo,!0)):[]})),Ds=Hr((function(t,e){var n=$s(e);return qo(n)&&(n=i),qo(t)?cr(t,pr(e,1,qo,!0),is(n,2)):[]})),Bs=Hr((function(t,e){var n=$s(e);return qo(n)&&(n=i),qo(t)?cr(t,pr(e,1,qo,!0),i,n):[]}));function Us(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:fa(n);return i<0&&(i=gn(r+i,0)),De(t,is(e,3),i)}function Vs(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r-1;return n!==i&&(s=fa(n),s=n<0?gn(r+s,0):mn(s,r-1)),De(t,is(e,3),s,!0)}function Gs(t){return null!=t&&t.length?pr(t,1):[]}function Ws(t){return t&&t.length?t[0]:i}var zs=Hr((function(t){var e=Fe(t,di);return e.length&&e[0]===t[0]?Cr(e):[]})),qs=Hr((function(t){var e=$s(t),n=Fe(t,di);return e===$s(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Cr(n,is(e,2)):[]})),Hs=Hr((function(t){var e=$s(t),n=Fe(t,di);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Cr(n,i,e):[]}));function $s(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Xs=Hr(Ks);function Ks(t,e){return t&&t.length&&e&&e.length?Gr(t,e):t}var Ys=Zi((function(t,e){var n=null==t?0:t.length,r=rr(t,e);return Wr(t,Fe(e,(function(t){return ps(t,n)?+t:t})).sort(Ei)),r}));function Js(t){return null==t?t:bn.call(t)}var Zs=Hr((function(t){return oi(pr(t,1,qo,!0))})),Qs=Hr((function(t){var e=$s(t);return qo(e)&&(e=i),oi(pr(t,1,qo,!0),is(e,2))})),to=Hr((function(t){var e=$s(t);return e="function"==typeof e?e:i,oi(pr(t,1,qo,!0),i,e)}));function eo(t){if(!t||!t.length)return[];var e=0;return t=xe(t,(function(t){if(qo(t))return e=gn(t.length,e),!0})),$e(e,(function(e){return Fe(t,We(e))}))}function no(t,e){if(!t||!t.length)return[];var n=eo(t);return null==e?n:Fe(n,(function(t){return Se(e,i,t)}))}var ro=Hr((function(t,e){return qo(t)?cr(t,e):[]})),io=Hr((function(t){return li(xe(t,qo))})),so=Hr((function(t){var e=$s(t);return qo(e)&&(e=i),li(xe(t,qo),is(e,2))})),oo=Hr((function(t){var e=$s(t);return e="function"==typeof e?e:i,li(xe(t,qo),i,e)})),ao=Hr(eo),co=Hr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,no(t,n)}));function uo(t){var e=jn(t);return e.__chain__=!0,e}function ho(t,e){return e(t)}var lo=Zi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,s=function(e){return rr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Vn&&ps(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ho,args:[s],thisArg:i}),new Un(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(s)})),fo=Ai((function(t,e,n){Mt.call(t,n)?++t[n]:nr(t,n,1)})),po=Mi(Us),go=Mi(Vs);function mo(t,e){return(Go(t)?Te:ur)(t,is(e,3))}function vo(t,e){return(Go(t)?Ce:hr)(t,is(e,3))}var yo=Ai((function(t,e,n){Mt.call(t,n)?t[n].push(e):nr(t,n,[e])})),_o=Hr((function(t,e,n){var i=-1,s="function"==typeof e,o=zo(t)?r(t.length):[];return ur(t,(function(t){o[++i]=s?Se(e,t,n):Ar(t,e,n)})),o})),bo=Ai((function(t,e,n){nr(t,n,e)}));function wo(t,e){return(Go(t)?Fe:Lr)(t,is(e,3))}var Eo=Ai((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),So=Hr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&gs(t,e[0],e[1])?e=[]:n>2&&gs(e[0],e[1],e[2])&&(e=[e[0]]),Ur(t,pr(e,1),[])})),ko=he||function(){return le.Date.now()};function To(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,$i(t,u,i,i,i,i,e)}function Co(t,e){var n;if("function"!=typeof e)throw new xt(s);return t=fa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ao=Hr((function(t,e,n){var r=1;if(n.length){var i=on(n,rs(Ao));r|=c}return $i(t,r,e,n,i)})),xo=Hr((function(t,e,n){var r=3;if(n.length){var i=on(n,rs(xo));r|=c}return $i(e,r,t,n,i)}));function Po(t,e,n){var r,o,a,c,u,h,l=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new xt(s);function g(e){var n=r,s=o;return r=o=i,l=e,c=t.apply(s,n)}function m(t){var n=t-h;return h===i||n>=e||n<0||d&&t-l>=a}function v(){var t=ko();if(m(t))return y(t);u=Cs(v,function(t){var n=e-(t-h);return d?mn(n,a-(t-l)):n}(t))}function y(t){return u=i,p&&r?g(t):(r=o=i,c)}function _(){var t=ko(),n=m(t);if(r=arguments,o=this,h=t,n){if(u===i)return function(t){return l=t,u=Cs(v,e),f?g(t):c}(h);if(d)return yi(u),u=Cs(v,e),g(h)}return u===i&&(u=Cs(v,e)),c}return e=pa(e)||0,Zo(n)&&(f=!!n.leading,a=(d="maxWait"in n)?gn(pa(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){u!==i&&yi(u),l=0,r=h=o=u=i},_.flush=function(){return u===i?c:y(ko())},_}var Oo=Hr((function(t,e){return ar(t,1,e)})),Fo=Hr((function(t,e,n){return ar(t,pa(e)||0,n)}));function Io(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new xt(s);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Io.Cache||zn),n}function Ro(t){if("function"!=typeof t)throw new xt(s);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Io.Cache=zn;var Mo=mi((function(t,e){var n=(e=1==e.length&&Go(e[0])?Fe(e[0],Xe(is())):Fe(pr(e,1),Xe(is()))).length;return Hr((function(r){for(var i=-1,s=mn(r.length,n);++i<s;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),Lo=Hr((function(t,e){var n=on(e,rs(Lo));return $i(t,c,i,e,n)})),No=Hr((function(t,e){var n=on(e,rs(No));return $i(t,64,i,e,n)})),jo=Zi((function(t,e){return $i(t,256,i,i,i,e)}));function Do(t,e){return t===e||t!=t&&e!=e}var Bo=Gi(Sr),Uo=Gi((function(t,e){return t>=e})),Vo=xr(function(){return arguments}())?xr:function(t){return Qo(t)&&Mt.call(t,"callee")&&!$t.call(t,"callee")},Go=r.isArray,Wo=ve?Xe(ve):function(t){return Qo(t)&&Er(t)==F};function zo(t){return null!=t&&Jo(t.length)&&!Ko(t)}function qo(t){return Qo(t)&&zo(t)}var Ho=Ne||pc,$o=ye?Xe(ye):function(t){return Qo(t)&&Er(t)==y};function Xo(t){if(!Qo(t))return!1;var e=Er(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!na(t)}function Ko(t){if(!Zo(t))return!1;var e=Er(t);return e==b||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Yo(t){return"number"==typeof t&&t==fa(t)}function Jo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Zo(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Qo(t){return null!=t&&"object"==typeof t}var ta=_e?Xe(_e):function(t){return Qo(t)&&hs(t)==E};function ea(t){return"number"==typeof t||Qo(t)&&Er(t)==S}function na(t){if(!Qo(t)||Er(t)!=k)return!1;var e=qt(t);if(null===e)return!0;var n=Mt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Rt.call(n)==Dt}var ra=be?Xe(be):function(t){return Qo(t)&&Er(t)==C},ia=we?Xe(we):function(t){return Qo(t)&&hs(t)==A};function sa(t){return"string"==typeof t||!Go(t)&&Qo(t)&&Er(t)==x}function oa(t){return"symbol"==typeof t||Qo(t)&&Er(t)==P}var aa=Ee?Xe(Ee):function(t){return Qo(t)&&Jo(t.length)&&!!ie[Er(t)]},ca=Gi(Mr),ua=Gi((function(t,e){return t<=e}));function ha(t){if(!t)return[];if(zo(t))return sa(t)?hn(t):Ti(t);if(Zt&&t[Zt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Zt]());var e=hs(t);return(e==E?rn:e==A?an:Da)(t)}function la(t){return t?(t=pa(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function fa(t){var e=la(t),n=e%1;return e==e?n?e-n:e:0}function da(t){return t?ir(fa(t),0,d):0}function pa(t){if("number"==typeof t)return t;if(oa(t))return f;if(Zo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(rt,"");var n=pt.test(t);return n||mt.test(t)?ce(t.slice(2),n?2:8):dt.test(t)?f:+t}function ga(t){return Ci(t,Oa(t))}function ma(t){return null==t?"":si(t)}var va=xi((function(t,e){if(_s(e)||zo(e))Ci(e,Pa(e),t);else for(var n in e)Mt.call(e,n)&&Zn(t,n,e[n])})),ya=xi((function(t,e){Ci(e,Oa(e),t)})),_a=xi((function(t,e,n,r){Ci(e,Oa(e),t,r)})),ba=xi((function(t,e,n,r){Ci(e,Pa(e),t,r)})),wa=Zi(rr),Ea=Hr((function(t,e){t=Tt(t);var n=-1,r=e.length,s=r>2?e[2]:i;for(s&&gs(e[0],e[1],s)&&(r=1);++n<r;)for(var o=e[n],a=Oa(o),c=-1,u=a.length;++c<u;){var h=a[c],l=t[h];(l===i||Do(l,Ft[h])&&!Mt.call(t,h))&&(t[h]=o[h])}return t})),Sa=Hr((function(t){return t.push(i,Ki),Se(Ia,i,t)}));function ka(t,e,n){var r=null==t?i:br(t,e);return r===i?n:r}function Ta(t,e){return null!=t&&ls(t,e,Tr)}var Ca=ji((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),Za(ec)),Aa=ji((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Mt.call(t,e)?t[e].push(n):t[e]=[n]}),is),xa=Hr(Ar);function Pa(t){return zo(t)?$n(t):Rr(t)}function Oa(t){return zo(t)?$n(t,!0):function(t){if(!Zo(t))return function(t){var e=[];if(null!=t)for(var n in Tt(t))e.push(n);return e}(t);var e=_s(t),n=[];for(var r in t)("constructor"!=r||!e&&Mt.call(t,r))&&n.push(r);return n}(t)}var Fa=xi((function(t,e,n){Dr(t,e,n)})),Ia=xi((function(t,e,n,r){Dr(t,e,n,r)})),Ra=Zi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Fe(e,(function(e){return e=gi(e,t),r||(r=e.length>1),e})),Ci(t,ts(t),n),r&&(n=sr(n,7,Yi));for(var i=e.length;i--;)ai(n,e[i]);return n})),Ma=Zi((function(t,e){return null==t?{}:function(t,e){return Vr(t,e,(function(e,n){return Ta(t,n)}))}(t,e)}));function La(t,e){if(null==t)return{};var n=Fe(ts(t),(function(t){return[t]}));return e=is(e),Vr(t,n,(function(t,n){return e(t,n[0])}))}var Na=Hi(Pa),ja=Hi(Oa);function Da(t){return null==t?[]:Ke(t,Pa(t))}var Ba=Ii((function(t,e,n){return e=e.toLowerCase(),t+(n?Ua(e):e)}));function Ua(t){return Xa(ma(t).toLowerCase())}function Va(t){return(t=ma(t))&&t.replace(yt,Qe).replace(Jt,"")}var Ga=Ii((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Wa=Ii((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),za=Fi("toLowerCase"),qa=Ii((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ha=Ii((function(t,e,n){return t+(n?" ":"")+Xa(e)})),$a=Ii((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Xa=Fi("toUpperCase");function Ka(t,e,n){return t=ma(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Ya=Hr((function(t,e){try{return Se(t,i,e)}catch(t){return Xo(t)?t:new Et(t)}})),Ja=Zi((function(t,e){return Te(e,(function(e){e=Ms(e),nr(t,e,Ao(t[e],t))})),t}));function Za(t){return function(){return t}}var Qa=Li(),tc=Li(!0);function ec(t){return t}function nc(t){return Ir("function"==typeof t?t:sr(t,1))}var rc=Hr((function(t,e){return function(n){return Ar(n,t,e)}})),ic=Hr((function(t,e){return function(n){return Ar(t,n,e)}}));function sc(t,e,n){var r=Pa(e),i=_r(e,r);null!=n||Zo(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=_r(e,Pa(e)));var s=!(Zo(n)&&"chain"in n&&!n.chain),o=Ko(t);return Te(i,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Ie([this.value()],arguments))})})),t}function oc(){}var ac=Bi(Fe),cc=Bi(Ae),uc=Bi(Le);function hc(t){return ms(t)?We(Ms(t)):function(t){return function(e){return br(e,t)}}(t)}var lc=Vi(),fc=Vi(!0);function dc(){return[]}function pc(){return!1}var gc,mc=Di((function(t,e){return t+e}),0),vc=zi("ceil"),yc=Di((function(t,e){return t/e}),1),_c=zi("floor"),bc=Di((function(t,e){return t*e}),1),wc=zi("round"),Ec=Di((function(t,e){return t-e}),0);return jn.after=function(t,e){if("function"!=typeof e)throw new xt(s);return t=fa(t),function(){if(--t<1)return e.apply(this,arguments)}},jn.ary=To,jn.assign=va,jn.assignIn=ya,jn.assignInWith=_a,jn.assignWith=ba,jn.at=wa,jn.before=Co,jn.bind=Ao,jn.bindAll=Ja,jn.bindKey=xo,jn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Go(t)?t:[t]},jn.chain=uo,jn.chunk=function(t,e,n){e=(n?gs(t,e,n):e===i)?1:gn(fa(e),0);var s=null==t?0:t.length;if(!s||e<1)return[];for(var o=0,a=0,c=r(de(s/e));o<s;)c[a++]=Qr(t,o,o+=e);return c},jn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i},jn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Ie(Go(n)?Ti(n):[n],pr(e,1))},jn.cond=function(t){var e=null==t?0:t.length,n=is();return t=e?Fe(t,(function(t){if("function"!=typeof t[1])throw new xt(s);return[n(t[0]),t[1]]})):[],Hr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},jn.conforms=function(t){return function(t){var e=Pa(t);return function(n){return or(n,t,e)}}(sr(t,1))},jn.constant=Za,jn.countBy=fo,jn.create=function(t,e){var n=Dn(t);return null==e?n:er(n,e)},jn.curry=function t(e,n,r){var s=$i(e,8,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},jn.curryRight=function t(e,n,r){var s=$i(e,16,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},jn.debounce=Po,jn.defaults=Ea,jn.defaultsDeep=Sa,jn.defer=Oo,jn.delay=Fo,jn.difference=js,jn.differenceBy=Ds,jn.differenceWith=Bs,jn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Qr(t,(e=n||e===i?1:fa(e))<0?0:e,r):[]},jn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Qr(t,0,(e=r-(e=n||e===i?1:fa(e)))<0?0:e):[]},jn.dropRightWhile=function(t,e){return t&&t.length?ui(t,is(e,3),!0,!0):[]},jn.dropWhile=function(t,e){return t&&t.length?ui(t,is(e,3),!0):[]},jn.fill=function(t,e,n,r){var s=null==t?0:t.length;return s?(n&&"number"!=typeof n&&gs(t,e,n)&&(n=0,r=s),function(t,e,n,r){var s=t.length;for((n=fa(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:fa(r))<0&&(r+=s),r=n>r?0:da(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},jn.filter=function(t,e){return(Go(t)?xe:dr)(t,is(e,3))},jn.flatMap=function(t,e){return pr(wo(t,e),1)},jn.flatMapDeep=function(t,e){return pr(wo(t,e),h)},jn.flatMapDepth=function(t,e,n){return n=n===i?1:fa(n),pr(wo(t,e),n)},jn.flatten=Gs,jn.flattenDeep=function(t){return null!=t&&t.length?pr(t,h):[]},jn.flattenDepth=function(t,e){return null!=t&&t.length?pr(t,e=e===i?1:fa(e)):[]},jn.flip=function(t){return $i(t,512)},jn.flow=Qa,jn.flowRight=tc,jn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},jn.functions=function(t){return null==t?[]:_r(t,Pa(t))},jn.functionsIn=function(t){return null==t?[]:_r(t,Oa(t))},jn.groupBy=yo,jn.initial=function(t){return null!=t&&t.length?Qr(t,0,-1):[]},jn.intersection=zs,jn.intersectionBy=qs,jn.intersectionWith=Hs,jn.invert=Ca,jn.invertBy=Aa,jn.invokeMap=_o,jn.iteratee=nc,jn.keyBy=bo,jn.keys=Pa,jn.keysIn=Oa,jn.map=wo,jn.mapKeys=function(t,e){var n={};return e=is(e,3),vr(t,(function(t,r,i){nr(n,e(t,r,i),t)})),n},jn.mapValues=function(t,e){var n={};return e=is(e,3),vr(t,(function(t,r,i){nr(n,r,e(t,r,i))})),n},jn.matches=function(t){return Nr(sr(t,1))},jn.matchesProperty=function(t,e){return jr(t,sr(e,1))},jn.memoize=Io,jn.merge=Fa,jn.mergeWith=Ia,jn.method=rc,jn.methodOf=ic,jn.mixin=sc,jn.negate=Ro,jn.nthArg=function(t){return t=fa(t),Hr((function(e){return Br(e,t)}))},jn.omit=Ra,jn.omitBy=function(t,e){return La(t,Ro(is(e)))},jn.once=function(t){return Co(2,t)},jn.orderBy=function(t,e,n,r){return null==t?[]:(Go(e)||(e=null==e?[]:[e]),Go(n=r?i:n)||(n=null==n?[]:[n]),Ur(t,e,n))},jn.over=ac,jn.overArgs=Mo,jn.overEvery=cc,jn.overSome=uc,jn.partial=Lo,jn.partialRight=No,jn.partition=Eo,jn.pick=Ma,jn.pickBy=La,jn.property=hc,jn.propertyOf=function(t){return function(e){return null==t?i:br(t,e)}},jn.pull=Xs,jn.pullAll=Ks,jn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,is(n,2)):t},jn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,i,n):t},jn.pullAt=Ys,jn.range=lc,jn.rangeRight=fc,jn.rearg=jo,jn.reject=function(t,e){return(Go(t)?xe:dr)(t,Ro(is(e,3)))},jn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],s=t.length;for(e=is(e,3);++r<s;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return Wr(t,i),n},jn.rest=function(t,e){if("function"!=typeof t)throw new xt(s);return Hr(t,e=e===i?e:fa(e))},jn.reverse=Js,jn.sampleSize=function(t,e,n){return e=(n?gs(t,e,n):e===i)?1:fa(e),(Go(t)?Kn:Xr)(t,e)},jn.set=function(t,e,n){return null==t?t:Kr(t,e,n)},jn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Kr(t,e,n,r)},jn.shuffle=function(t){return(Go(t)?Yn:Zr)(t)},jn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&gs(t,e,n)?(e=0,n=r):(e=null==e?0:fa(e),n=n===i?r:fa(n)),Qr(t,e,n)):[]},jn.sortBy=So,jn.sortedUniq=function(t){return t&&t.length?ri(t):[]},jn.sortedUniqBy=function(t,e){return t&&t.length?ri(t,is(e,2)):[]},jn.split=function(t,e,n){return n&&"number"!=typeof n&&gs(t,e,n)&&(e=n=i),(n=n===i?d:n>>>0)?(t=ma(t))&&("string"==typeof e||null!=e&&!ra(e))&&!(e=si(e))&&nn(t)?vi(hn(t),0,n):t.split(e,n):[]},jn.spread=function(t,e){if("function"!=typeof t)throw new xt(s);return e=null==e?0:gn(fa(e),0),Hr((function(n){var r=n[e],i=vi(n,0,e);return r&&Ie(i,r),Se(t,this,i)}))},jn.tail=function(t){var e=null==t?0:t.length;return e?Qr(t,1,e):[]},jn.take=function(t,e,n){return t&&t.length?Qr(t,0,(e=n||e===i?1:fa(e))<0?0:e):[]},jn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Qr(t,(e=r-(e=n||e===i?1:fa(e)))<0?0:e,r):[]},jn.takeRightWhile=function(t,e){return t&&t.length?ui(t,is(e,3),!1,!0):[]},jn.takeWhile=function(t,e){return t&&t.length?ui(t,is(e,3)):[]},jn.tap=function(t,e){return e(t),t},jn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new xt(s);return Zo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Po(t,e,{leading:r,maxWait:e,trailing:i})},jn.thru=ho,jn.toArray=ha,jn.toPairs=Na,jn.toPairsIn=ja,jn.toPath=function(t){return Go(t)?Fe(t,Ms):oa(t)?[t]:Ti(Rs(ma(t)))},jn.toPlainObject=ga,jn.transform=function(t,e,n){var r=Go(t),i=r||Ho(t)||aa(t);if(e=is(e,4),null==n){var s=t&&t.constructor;n=i?r?new s:[]:Zo(t)&&Ko(s)?Dn(qt(t)):{}}return(i?Te:vr)(t,(function(t,r,i){return e(n,t,r,i)})),n},jn.unary=function(t){return To(t,1)},jn.union=Zs,jn.unionBy=Qs,jn.unionWith=to,jn.uniq=function(t){return t&&t.length?oi(t):[]},jn.uniqBy=function(t,e){return t&&t.length?oi(t,is(e,2)):[]},jn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?oi(t,i,e):[]},jn.unset=function(t,e){return null==t||ai(t,e)},jn.unzip=eo,jn.unzipWith=no,jn.update=function(t,e,n){return null==t?t:ci(t,e,pi(n))},jn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ci(t,e,pi(n),r)},jn.values=Da,jn.valuesIn=function(t){return null==t?[]:Ke(t,Oa(t))},jn.without=ro,jn.words=Ka,jn.wrap=function(t,e){return Lo(pi(e),t)},jn.xor=io,jn.xorBy=so,jn.xorWith=oo,jn.zip=ao,jn.zipObject=function(t,e){return fi(t||[],e||[],Zn)},jn.zipObjectDeep=function(t,e){return fi(t||[],e||[],Kr)},jn.zipWith=co,jn.entries=Na,jn.entriesIn=ja,jn.extend=ya,jn.extendWith=_a,sc(jn,jn),jn.add=mc,jn.attempt=Ya,jn.camelCase=Ba,jn.capitalize=Ua,jn.ceil=vc,jn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=pa(n))==n?n:0),e!==i&&(e=(e=pa(e))==e?e:0),ir(pa(t),e,n)},jn.clone=function(t){return sr(t,4)},jn.cloneDeep=function(t){return sr(t,5)},jn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:i)},jn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:i)},jn.conformsTo=function(t,e){return null==e||or(t,e,Pa(e))},jn.deburr=Va,jn.defaultTo=function(t,e){return null==t||t!=t?e:t},jn.divide=yc,jn.endsWith=function(t,e,n){t=ma(t),e=si(e);var r=t.length,s=n=n===i?r:ir(fa(n),0,r);return(n-=e.length)>=0&&t.slice(n,s)==e},jn.eq=Do,jn.escape=function(t){return(t=ma(t))&&X.test(t)?t.replace(H,tn):t},jn.escapeRegExp=function(t){return(t=ma(t))&&nt.test(t)?t.replace(et,"\\$&"):t},jn.every=function(t,e,n){var r=Go(t)?Ae:lr;return n&&gs(t,e,n)&&(e=i),r(t,is(e,3))},jn.find=po,jn.findIndex=Us,jn.findKey=function(t,e){return je(t,is(e,3),vr)},jn.findLast=go,jn.findLastIndex=Vs,jn.findLastKey=function(t,e){return je(t,is(e,3),yr)},jn.floor=_c,jn.forEach=mo,jn.forEachRight=vo,jn.forIn=function(t,e){return null==t?t:gr(t,is(e,3),Oa)},jn.forInRight=function(t,e){return null==t?t:mr(t,is(e,3),Oa)},jn.forOwn=function(t,e){return t&&vr(t,is(e,3))},jn.forOwnRight=function(t,e){return t&&yr(t,is(e,3))},jn.get=ka,jn.gt=Bo,jn.gte=Uo,jn.has=function(t,e){return null!=t&&ls(t,e,kr)},jn.hasIn=Ta,jn.head=Ws,jn.identity=ec,jn.includes=function(t,e,n,r){t=zo(t)?t:Da(t),n=n&&!r?fa(n):0;var i=t.length;return n<0&&(n=gn(i+n,0)),sa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Be(t,e,n)>-1},jn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:fa(n);return i<0&&(i=gn(r+i,0)),Be(t,e,i)},jn.inRange=function(t,e,n){return e=la(e),n===i?(n=e,e=0):n=la(n),function(t,e,n){return t>=mn(e,n)&&t<gn(e,n)}(t=pa(t),e,n)},jn.invoke=xa,jn.isArguments=Vo,jn.isArray=Go,jn.isArrayBuffer=Wo,jn.isArrayLike=zo,jn.isArrayLikeObject=qo,jn.isBoolean=function(t){return!0===t||!1===t||Qo(t)&&Er(t)==v},jn.isBuffer=Ho,jn.isDate=$o,jn.isElement=function(t){return Qo(t)&&1===t.nodeType&&!na(t)},jn.isEmpty=function(t){if(null==t)return!0;if(zo(t)&&(Go(t)||"string"==typeof t||"function"==typeof t.splice||Ho(t)||aa(t)||Vo(t)))return!t.length;var e=hs(t);if(e==E||e==A)return!t.size;if(_s(t))return!Rr(t).length;for(var n in t)if(Mt.call(t,n))return!1;return!0},jn.isEqual=function(t,e){return Pr(t,e)},jn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Pr(t,e,i,n):!!r},jn.isError=Xo,jn.isFinite=function(t){return"number"==typeof t&&ze(t)},jn.isFunction=Ko,jn.isInteger=Yo,jn.isLength=Jo,jn.isMap=ta,jn.isMatch=function(t,e){return t===e||Or(t,e,os(e))},jn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Or(t,e,os(e),n)},jn.isNaN=function(t){return ea(t)&&t!=+t},jn.isNative=function(t){if(ys(t))throw new Et("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Fr(t)},jn.isNil=function(t){return null==t},jn.isNull=function(t){return null===t},jn.isNumber=ea,jn.isObject=Zo,jn.isObjectLike=Qo,jn.isPlainObject=na,jn.isRegExp=ra,jn.isSafeInteger=function(t){return Yo(t)&&t>=-9007199254740991&&t<=l},jn.isSet=ia,jn.isString=sa,jn.isSymbol=oa,jn.isTypedArray=aa,jn.isUndefined=function(t){return t===i},jn.isWeakMap=function(t){return Qo(t)&&hs(t)==O},jn.isWeakSet=function(t){return Qo(t)&&"[object WeakSet]"==Er(t)},jn.join=function(t,e){return null==t?"":dn.call(t,e)},jn.kebabCase=Ga,jn.last=$s,jn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=fa(n))<0?gn(r+s,0):mn(s,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,s):De(t,Ve,s,!0)},jn.lowerCase=Wa,jn.lowerFirst=za,jn.lt=ca,jn.lte=ua,jn.max=function(t){return t&&t.length?fr(t,ec,Sr):i},jn.maxBy=function(t,e){return t&&t.length?fr(t,is(e,2),Sr):i},jn.mean=function(t){return Ge(t,ec)},jn.meanBy=function(t,e){return Ge(t,is(e,2))},jn.min=function(t){return t&&t.length?fr(t,ec,Mr):i},jn.minBy=function(t,e){return t&&t.length?fr(t,is(e,2),Mr):i},jn.stubArray=dc,jn.stubFalse=pc,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=bc,jn.nth=function(t,e){return t&&t.length?Br(t,fa(e)):i},jn.noConflict=function(){return le._===this&&(le._=Bt),this},jn.noop=oc,jn.now=ko,jn.pad=function(t,e,n){t=ma(t);var r=(e=fa(e))?un(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ui(ge(i),n)+t+Ui(de(i),n)},jn.padEnd=function(t,e,n){t=ma(t);var r=(e=fa(e))?un(t):0;return e&&r<e?t+Ui(e-r,n):t},jn.padStart=function(t,e,n){t=ma(t);var r=(e=fa(e))?un(t):0;return e&&r<e?Ui(e-r,n)+t:t},jn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),yn(ma(t).replace(it,""),e||0)},jn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&gs(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=la(t),e===i?(e=t,t=0):e=la(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var s=_n();return mn(t+s*(e-t+ae("1e-"+((s+"").length-1))),e)}return zr(t,e)},jn.reduce=function(t,e,n){var r=Go(t)?Re:qe,i=arguments.length<3;return r(t,is(e,4),n,i,ur)},jn.reduceRight=function(t,e,n){var r=Go(t)?Me:qe,i=arguments.length<3;return r(t,is(e,4),n,i,hr)},jn.repeat=function(t,e,n){return e=(n?gs(t,e,n):e===i)?1:fa(e),qr(ma(t),e)},jn.replace=function(){var t=arguments,e=ma(t[0]);return t.length<3?e:e.replace(t[1],t[2])},jn.result=function(t,e,n){var r=-1,s=(e=gi(e,t)).length;for(s||(s=1,t=i);++r<s;){var o=null==t?i:t[Ms(e[r])];o===i&&(r=s,o=n),t=Ko(o)?o.call(t):o}return t},jn.round=wc,jn.runInContext=t,jn.sample=function(t){return(Go(t)?Xn:$r)(t)},jn.size=function(t){if(null==t)return 0;if(zo(t))return sa(t)?un(t):t.length;var e=hs(t);return e==E||e==A?t.size:Rr(t).length},jn.snakeCase=qa,jn.some=function(t,e,n){var r=Go(t)?Le:ti;return n&&gs(t,e,n)&&(e=i),r(t,is(e,3))},jn.sortedIndex=function(t,e){return ei(t,e)},jn.sortedIndexBy=function(t,e,n){return ni(t,e,is(n,2))},jn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ei(t,e);if(r<n&&Do(t[r],e))return r}return-1},jn.sortedLastIndex=function(t,e){return ei(t,e,!0)},jn.sortedLastIndexBy=function(t,e,n){return ni(t,e,is(n,2),!0)},jn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ei(t,e,!0)-1;if(Do(t[n],e))return n}return-1},jn.startCase=Ha,jn.startsWith=function(t,e,n){return t=ma(t),n=null==n?0:ir(fa(n),0,t.length),e=si(e),t.slice(n,n+e.length)==e},jn.subtract=Ec,jn.sum=function(t){return t&&t.length?He(t,ec):0},jn.sumBy=function(t,e){return t&&t.length?He(t,is(e,2)):0},jn.template=function(t,e,n){var r=jn.templateSettings;n&&gs(t,e,n)&&(e=i),t=ma(t),e=_a({},e,r,Xi);var s,o,a=_a({},e.imports,r.imports,Xi),c=Pa(a),u=Ke(a,c),h=0,l=e.interpolate||_t,f="__p += '",d=Ct((e.escape||_t).source+"|"+l.source+"|"+(l===J?lt:_t).source+"|"+(e.evaluate||_t).source+"|$","g"),p="//# sourceURL="+(Mt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(d,(function(e,n,r,i,a,c){return r||(r=i),f+=t.slice(h,c).replace(bt,en),n&&(s=!0,f+="' +\n__e("+n+") +\n'"),a&&(o=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=c+e.length,e})),f+="';\n";var g=Mt.call(e,"variable")&&e.variable;g||(f="with (obj) {\n"+f+"\n}\n"),f=(o?f.replace(G,""):f).replace(W,"$1").replace(z,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ya((function(){return St(c,p+"return "+f).apply(i,u)}));if(m.source=f,Xo(m))throw m;return m},jn.times=function(t,e){if((t=fa(t))<1||t>l)return[];var n=d,r=mn(t,d);e=is(e),t-=d;for(var i=$e(r,e);++n<t;)e(n);return i},jn.toFinite=la,jn.toInteger=fa,jn.toLength=da,jn.toLower=function(t){return ma(t).toLowerCase()},jn.toNumber=pa,jn.toSafeInteger=function(t){return t?ir(fa(t),-9007199254740991,l):0===t?t:0},jn.toString=ma,jn.toUpper=function(t){return ma(t).toUpperCase()},jn.trim=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(rt,"");if(!t||!(e=si(e)))return t;var r=hn(t),s=hn(e);return vi(r,Je(r,s),Ze(r,s)+1).join("")},jn.trimEnd=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(st,"");if(!t||!(e=si(e)))return t;var r=hn(t);return vi(r,0,Ze(r,hn(e))+1).join("")},jn.trimStart=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(it,"");if(!t||!(e=si(e)))return t;var r=hn(t);return vi(r,Je(r,hn(e))).join("")},jn.truncate=function(t,e){var n=30,r="...";if(Zo(e)){var s="separator"in e?e.separator:s;n="length"in e?fa(e.length):n,r="omission"in e?si(e.omission):r}var o=(t=ma(t)).length;if(nn(t)){var a=hn(t);o=a.length}if(n>=o)return t;var c=n-un(r);if(c<1)return r;var u=a?vi(a,0,c).join(""):t.slice(0,c);if(s===i)return u+r;if(a&&(c+=u.length-c),ra(s)){if(t.slice(c).search(s)){var h,l=u;for(s.global||(s=Ct(s.source,ma(ft.exec(s))+"g")),s.lastIndex=0;h=s.exec(l);)var f=h.index;u=u.slice(0,f===i?c:f)}}else if(t.indexOf(si(s),c)!=c){var d=u.lastIndexOf(s);d>-1&&(u=u.slice(0,d))}return u+r},jn.unescape=function(t){return(t=ma(t))&&$.test(t)?t.replace(q,ln):t},jn.uniqueId=function(t){var e=++Lt;return ma(t)+e},jn.upperCase=$a,jn.upperFirst=Xa,jn.each=mo,jn.eachRight=vo,jn.first=Ws,sc(jn,(gc={},vr(jn,(function(t,e){Mt.call(jn.prototype,e)||(gc[e]=t)})),gc),{chain:!1}),jn.VERSION="4.17.20",Te(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){jn[t].placeholder=jn})),Te(["drop","take"],(function(t,e){Vn.prototype[t]=function(n){n=n===i?1:gn(fa(n),0);var r=this.__filtered__&&!e?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Te(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Vn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:is(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Te(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Vn.prototype[t]=function(){return this[n](1).value()[0]}})),Te(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Vn.prototype[t]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(ec)},Vn.prototype.find=function(t){return this.filter(t).head()},Vn.prototype.findLast=function(t){return this.reverse().find(t)},Vn.prototype.invokeMap=Hr((function(t,e){return"function"==typeof t?new Vn(this):this.map((function(n){return Ar(n,t,e)}))})),Vn.prototype.reject=function(t){return this.filter(Ro(is(t)))},Vn.prototype.slice=function(t,e){t=fa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Vn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=fa(e))<0?n.dropRight(-e):n.take(e-t)),n)},Vn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Vn.prototype.toArray=function(){return this.take(d)},vr(Vn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),s=jn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);s&&(jn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,c=e instanceof Vn,u=a[0],h=c||Go(e),l=function(t){var e=s.apply(jn,Ie([t],a));return r&&f?e[0]:e};h&&n&&"function"==typeof u&&1!=u.length&&(c=h=!1);var f=this.__chain__,d=!!this.__actions__.length,p=o&&!f,g=c&&!d;if(!o&&h){e=g?e:new Vn(this);var m=t.apply(e,a);return m.__actions__.push({func:ho,args:[l],thisArg:i}),new Un(m,f)}return p&&g?t.apply(this,a):(m=this.thru(l),p?r?m.value()[0]:m.value():m)})})),Te(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);jn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Go(i)?i:[],t)}return this[n]((function(n){return e.apply(Go(n)?n:[],t)}))}})),vr(Vn.prototype,(function(t,e){var n=jn[e];if(n){var r=n.name+"";Mt.call(xn,r)||(xn[r]=[]),xn[r].push({name:e,func:n})}})),xn[Ni(i,2).name]=[{name:"wrapper",func:i}],Vn.prototype.clone=function(){var t=new Vn(this.__wrapped__);return t.__actions__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(this.__views__),t},Vn.prototype.reverse=function(){if(this.__filtered__){var t=new Vn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Vn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Go(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=mn(e,t+o);break;case"takeRight":t=gn(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,a=s.end,c=a-o,u=r?a:o-1,h=this.__iteratees__,l=h.length,f=0,d=mn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return hi(t,this.__actions__);var p=[];t:for(;c--&&f<d;){for(var g=-1,m=t[u+=e];++g<l;){var v=h[g],y=v.iteratee,_=v.type,b=y(m);if(2==_)m=b;else if(!b){if(1==_)continue t;break t}}p[f++]=m}return p},jn.prototype.at=lo,jn.prototype.chain=function(){return uo(this)},jn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===i&&(this.__values__=ha(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},jn.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Ns(n);r.__index__=0,r.__values__=i,e?s.__wrapped__=r:e=r;var s=r;n=n.__wrapped__}return s.__wrapped__=t,e},jn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Vn){var e=t;return this.__actions__.length&&(e=new Vn(this)),(e=e.reverse()).__actions__.push({func:ho,args:[Js],thisArg:i}),new Un(e,this.__chain__)}return this.thru(Js)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return hi(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,Zt&&(jn.prototype[Zt]=function(){return this}),jn}();le._=fn,(r=function(){return fn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},3669:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(9231)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},9231:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,s,o=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const s=e.formatters[i];if("function"==typeof s){const e=t[o];n=s.call(r,e),t.splice(o,1),o--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(4241),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},4241:t=>{var e=1e3,n=60*e,r=60*n,i=24*r;function s(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,o){o=o||{};var a,c,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===u&&isFinite(t))return o.long?(a=t,(c=Math.abs(a))>=i?s(a,c,i,"day"):c>=r?s(a,c,r,"hour"):c>=n?s(a,c,n,"minute"):c>=e?s(a,c,e,"second"):a+" ms"):function(t){var s=Math.abs(t);return s>=i?Math.round(t/i)+"d":s>=r?Math.round(t/r)+"h":s>=n?Math.round(t/n)+"m":s>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1618:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(5224)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},5224:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,s,o=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const s=e.formatters[i];if("function"==typeof s){const e=t[o];n=s.call(r,e),t.splice(o,1),o--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(8896),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},8896:t=>{var e=1e3,n=60*e,r=60*n,i=24*r;function s(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,o){o=o||{};var a,c,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===u&&isFinite(t))return o.long?(a=t,(c=Math.abs(a))>=i?s(a,c,i,"day"):c>=r?s(a,c,r,"hour"):c>=n?s(a,c,n,"minute"):c>=e?s(a,c,e,"second"):a+" ms"):function(t){var s=Math.abs(t);return s>=i?Math.round(t/i)+"d":s>=r?Math.round(t/r)+"h":s>=n?Math.round(t/n)+"m":s>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},464:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AxiosServerError=e.AxiosError=void 0;const r=n(5749);class i extends r.WrappedError{}e.AxiosError=i,e.AxiosServerError=class extends i{constructor(t,e){super(`${t.status}: ${t.statusText} - ${JSON.stringify(t.data,null,2)}`,e),this.status=t.status,this.statusText=t.statusText,this.data=t.data}}},5749:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigError=e.WrappedError=e.CustomError=void 0;class n extends Error{constructor(t){super(t),this.name=this.constructor.name}}e.CustomError=n,e.WrappedError=class extends n{constructor(t,e){super(t),this.originalError=e}},e.ConfigError=class extends n{}},2746:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.AxiosWrapper=void 0;const i=r(n(9669)),s=r(n(6486)),o=n(464);e.AxiosWrapper=class{constructor(t){this.axiosInstance=t}async makeRequest(t){try{return(await this.axiosInstance(t)).data}catch(t){if(i.default.isAxiosError(t)){const e=s.default.omit(t.toJSON(),"config");if(t.response){const n=s.default.pick(t.response,["data","status","statusText"]);throw new o.AxiosServerError(n,e)}throw new o.AxiosError(`Axios: ${t.message}`,e)}throw t}}}},2310:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createAxios=e.MIVA_PROCTOR_SERVICE_ENDPOINT=e.PROD_API_KEY=e.UAT_API_KEY=e.STAGING_API_KEY=e.API_PROD_HOST=e.API_UAT_HOST=e.API_STAGING_HOST=void 0;const i=r(n(9669)),s=n(3134);e.API_STAGING_HOST="https://metrics.staging.miva.university",e.API_UAT_HOST="https://metrics.uat.miva.university",e.API_PROD_HOST="https://metrics.miva.university",e.STAGING_API_KEY="",e.UAT_API_KEY="",e.PROD_API_KEY="";const o={[s.Environment.Staging]:e.API_STAGING_HOST,[s.Environment.UAT]:e.API_UAT_HOST,[s.Environment.Prod]:e.API_PROD_HOST},a={[s.Environment.Staging]:e.STAGING_API_KEY,[s.Environment.UAT]:e.UAT_API_KEY,[s.Environment.Prod]:e.PROD_API_KEY};e.MIVA_PROCTOR_SERVICE_ENDPOINT=e.API_STAGING_HOST,e.createAxios=t=>{const e=o[t],n=a[t];return i.default.create({baseURL:e,headers:{"Content-Type":"application/json","x-api-key":n},timeout:3e4})}},2726:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONFIG=void 0,e.CONFIG={API_SESSIONS_PATH:{START_SESSION:"/sessions/start",END_SESSION:"/sessions/:id/end",PING_SESSION:"/sessions/:id/ping",DELETE_SESSION:"/sessions/:id",SESSIONS:"/sessions",SESSIONS_ACTIVE:"/sessions/active"},API_ACTIVITIES_PATH:{ACTIVITIES:"/activities",MULTIPLE_ACTIVITIES:"/activities/multiple",ACTIVITIES_METRICS:"/activities/metrics"}}},7338:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctorMetricService=void 0;const r=n(2746),i=n(2310),s=n(2726);e.ProctorMetricService=class{constructor(t){this.axiosInstance=(0,i.createAxios)(t),this.axiosWrapper=new r.AxiosWrapper(this.axiosInstance)}async startSession(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.START_SESSION,method:"POST",data:t})}async getSessions(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.SESSIONS,method:"GET",data:t})}async getActiveSessions(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.SESSIONS_ACTIVE,method:"GET",params:{studentId:t}})}async endSession(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.END_SESSION.replace(":id",t),method:"POST",data:{timestamp:(new Date).toISOString()}})}async pingSession(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.PING_SESSION.replace(":id",t),method:"POST",data:{timestamp:(new Date).toISOString()}})}async deleteSession(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.DELETE_SESSION.replace(":id",t),method:"DELETE"})}async updateActivities(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES,method:"POST",data:t})}async updateMultipleActivities(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_ACTIVITIES_PATH.MULTIPLE_ACTIVITIES,method:"POST",data:{activities:t.data}})}async getActivityMetrics(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES_METRICS,method:"POST",data:t})}async getActivities(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES,method:"GET",params:t})}}},9200:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},9108:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(526),e),i(n(7338),e),i(n(9200),e),i(n(2726),e),i(n(2310),e),i(n(2746),e)},4763:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioDetector=void 0;const n=Math.round(12),r={timeoutMsecs:50,peechstartMsecs:600,speakingMinVolume:.05,silenceVolume:.005,muteVolume:.002,recordingEnabled:!0};e.AudioDetector=class{constructor(t){this.volumeState="mute",this.speechStarted=!1,this.silenceItems=0,this.signalItems=0,this.speechStartTime=0,this.prerecordingItems=0,this.speechVolumesList=[],this.recordedChunks=[],this.isSEB=!1,this.audioDetectionInterval=null,this.mediaStream=null,this.sebConfig={useSimulatedMode:!1,muteThreshold:1e-4,speechThreshold:.003,silenceThreshold:.001,detectionInterval:100},this.usedMimeType="audio/webm",this.events=t,this.isSEB=!1,this.isSEB&&console.log("SEB detected - using special audio detection mode")}detectSEB(){const t=navigator.userAgent.toLowerCase(),e=t.includes("seb")||t.includes("safe exam browser");return e&&console.log("SEB detected - using special audio detection mode"),e}async checkAudioAccess(){try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach((t=>t.stop())),!0}catch(t){return console.warn("Audio access appears to be blocked:",t),!1}}async start(){try{try{this.audioContext=new AudioContext}catch(t){console.error("Failed to create AudioContext:",t)}try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,autoGainControl:!1,noiseSuppression:!1}})}catch(t){return console.error("Failed to get audio stream:",t),void this.setupSimpleAudioDetection()}if(this.isSEB){const t=await this.checkAudioAccess();console.log("hasAudioAccess",t),t||(console.log("Audio access appears to be blocked in SEB - enabling simulated mode"),this.sebConfig.useSimulatedMode=!0),console.log("Using SEB-compatible audio detection"),this.sebConfig.useSimulatedMode?this.setupSEBSimulatedMode():this.setupSEBAudioDetection(this.mediaStream)}else try{this.setupStandardAudioDetection(this.audioContext,this.mediaStream)}catch(t){console.error("Error in standard audio stream setup:",t),this.setupSEBAudioDetection(this.mediaStream)}try{const t=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/mpeg"];let e="";for(const n of t)if(MediaRecorder.isTypeSupported(n)){e=n,console.log(`Using supported MIME type: ${n}`);break}e?(this.recorder=new MediaRecorder(this.mediaStream,{mimeType:e}),this.usedMimeType=e):(console.warn("No supported MIME types found for MediaRecorder, using default"),this.recorder=new MediaRecorder(this.mediaStream),this.usedMimeType="audio/webm"),this.recorder.ondataavailable=t=>{t.data.size>0&&this.recordedChunks.push(t.data)},this.recorder.onstop=()=>{const t=new Blob(this.recordedChunks,{type:this.usedMimeType});this.events.onAudioBlob(t),this.recordedChunks=[]},this.recorder.start()}catch(t){console.error("Failed to set up MediaRecorder:",t)}this.addEventListeners()}catch(t){console.error("Error starting audio detector:",t),this.setupSimpleAudioDetection()}}setupSEBSimulatedMode(){console.log("Using SEB simulated audio mode"),this.meter={volume:.5,clipping:!1,lastClip:0,clipLevel:.98,averaging:.95,clipLag:750,checkClipping:function(){return!1},disconnect:function(){}},this.audioDetectionInterval=setInterval((()=>{const t=Date.now()%1e4/1e4;this.meter.volume=t<.3?.6+.3*Math.random():t<.5?.1+.2*Math.random():.01+.02*Math.random(),this.sampleThresholdsDecision(this.sebConfig.muteThreshold,this.sebConfig.speechThreshold)}),this.sebConfig.detectionInterval)}setupSEBAudioDetection(t){console.log("Using SEB-compatible audio detection");try{if(this.audioContext){const e=this.audioContext.createGain();this.mediaStreamSource=this.audioContext.createMediaStreamSource(t),this.mediaStreamSource.connect(e);const n=this.audioContext.createAnalyser();n.fftSize=1024,n.smoothingTimeConstant=.8,e.connect(n),this.meter={volume:0,clipping:!1,lastClip:0,clipLevel:.98,averaging:.95,clipLag:750,checkClipping:function(){return!1},disconnect:function(){this.mediaStreamSource&&this.mediaStreamSource.disconnect()}},this.audioDetectionInterval=setInterval((()=>{const t=new Uint8Array(n.frequencyBinCount);n.getByteFrequencyData(t);let e=0,i=0;for(let n=3;n<80;n++)n<t.length&&(e+=t[n],i++);let s=(i>0?e/i:0)/255;s=Math.pow(s,.7),s<5e-4&&(s=0),this.meter.volume=s,this.isSEB?this.sampleThresholdsDecision(this.sebConfig.muteThreshold,this.sebConfig.speechThreshold):this.sampleThresholdsDecision(r.muteVolume,r.speakingMinVolume)}),this.isSEB?this.sebConfig.detectionInterval:r.timeoutMsecs)}else this.setupSimpleAudioDetection()}catch(t){console.error("Error setting up SEB audio detection:",t),this.setupSimpleAudioDetection()}}setupSimpleAudioDetection(){console.log("Using simple fallback audio detection"),this.meter={volume:.5,clipping:!1,lastClip:0,clipLevel:.98,averaging:.95,clipLag:750,checkClipping:function(){return!1},disconnect:function(){}},this.audioDetectionInterval=setInterval((()=>{const t=Date.now(),e=.5*Math.sin(t/1e3)+.5;this.meter.volume=e,this.isSEB?this.sampleThresholdsDecision(this.sebConfig.muteThreshold,this.sebConfig.speechThreshold):this.sampleThresholdsDecision(r.muteVolume,r.speakingMinVolume)}),this.isSEB?this.sebConfig.detectionInterval:r.timeoutMsecs)}async stop(){var t;if(this.mediaStreamSource)try{this.mediaStreamSource.disconnect()}catch(t){console.error("Error disconnecting media stream source:",t)}if(this.meter&&"function"==typeof this.meter.disconnect)try{this.meter.disconnect()}catch(t){console.error("Error disconnecting meter:",t)}if(this.audioContext)try{await this.audioContext.close()}catch(t){console.error("Error closing audio context:",t)}if("recording"===(null===(t=this.recorder)||void 0===t?void 0:t.state))try{this.recorder.stop()}catch(t){console.error("Error stopping recorder:",t)}this.audioDetectionInterval&&(clearInterval(this.audioDetectionInterval),this.audioDetectionInterval=null),this.mediaStream&&this.mediaStream.getTracks().forEach((t=>{try{t.stop()}catch(t){console.error("Error stopping audio track:",t)}}))}average(t){return t.reduce(((t,e)=>t+e))/t.length}averageSignal(){return Number(this.average(this.speechVolumesList).toFixed(4))}dispatchEvent(t,e){const n=new CustomEvent(t,e);return document.dispatchEvent(n)}mute(t,e){const n={detail:{event:"mute",volume:this.meter.volume,timestamp:t,duration:e}};this.dispatchEvent("mute",n),"mute"!==this.volumeState&&(this.dispatchEvent("mutedmic",n),this.volumeState="mute")}signal(t,e){this.silenceItems=0;const n={detail:{event:"signal",volume:this.meter.volume,timestamp:t,duration:e,items:++this.signalItems}};this.speechStarted||(this.dispatchEvent("speechstart",n),this.speechStartTime=t,this.speechStarted=!0,this.speechVolumesList=[]),this.speechVolumesList.push(this.meter.volume),this.dispatchEvent("signal",n),"mute"===this.volumeState&&(this.dispatchEvent("unmutedmic",n),this.volumeState="signal")}silence(t,e){this.signalItems=0;const r={detail:{event:"silence",volume:this.meter.volume,timestamp:t,duration:e,items:++this.silenceItems}};if(this.dispatchEvent("silence",r),"mute"===this.volumeState&&(this.dispatchEvent("unmutedmic",r),this.volumeState="silence"),this.speechStarted&&this.silenceItems===n){const t=e-600,n=this.averageSignal();t<3e3?(r.detail.abort=`signal duration (${t}) < MIN_SIGNAL_DURATION (3000)`,this.dispatchEvent("speechabort",r)):n<.1?(r.detail.abort=`signal average volume (${n}) < MIN_AVERAGE_SIGNAL_VOLUME (0.1)`,this.dispatchEvent("speechabort",r)):this.dispatchEvent("speechstop",r),this.speechStarted=!1}}sampleThresholdsDecision(t,e){const n=Date.now(),r=n-this.speechStartTime;this.meter.volume<t?"mute"!==this.volumeState&&this.mute(n,r):this.meter.volume>e?this.signal(n,r):this.silence(n,r)}prerecording(t,e){++this.prerecordingItems;const n={detail:{volume:this.meter.volume,timestamp:Date.now(),items:this.prerecordingItems}};this.prerecordingItems*e>=t&&(this.speechStarted||this.dispatchEvent("prespeechstart",n),this.prerecordingItems=0)}audioDetection(t){setTimeout((()=>{this.prerecording(t.prespeechstartMsecs,t.timeoutMsecs),t.recordingEnabled&&this.sampleThresholdsDecision(t.muteVolume,t.speakingMinVolume),this.audioDetection(t)}),t.timeoutMsecs)}createAudioMeter(t,e,n,r){try{var i=t.createScriptProcessor(512);return i.onaudioprocess=this.volumeAudioProcess.bind(this),i.clipping=!1,i.lastClip=0,i.volume=0,i.clipLevel=e||.98,i.averaging=n||.95,i.clipLag=r||750,i.connect(t.destination),i.checkClipping=function(){return!!this.clipping&&(this.lastClip+this.clipLag<window.performance.now()&&(this.clipping=!1),this.clipping)},i.shutdown=function(){this.disconnect(),this.onaudioprocess=null},i}catch(t){return console.error("Error creating audio meter:",t),{volume:.5,clipping:!1,lastClip:0,clipLevel:e||.98,averaging:n||.95,clipLag:r||750,checkClipping:function(){return!1},disconnect:function(){}}}}setupStandardAudioDetection(t,e){this.mediaStreamSource=t.createMediaStreamSource(e),this.meter=this.createAudioMeter(t),this.mediaStreamSource.connect(this.meter),this.audioDetection(r)}volumeAudioProcess(t){for(var e,n=t.inputBuffer.getChannelData(0),r=n.length,i=0,s=0;s<r;s++)e=n[s],Math.abs(e)>=this.meter.clipLevel&&(this.meter.clipping=!0,this.meter.lastClip=window.performance.now()),i+=e*e;var o=Math.sqrt(i/r);this.meter.volume=Math.max(o,this.meter.volume*this.meter.averaging)}addEventListeners(){document.addEventListener("mute",(t=>{console.log("Mute event"),this.events.onMute(t)})),document.addEventListener("speechstart",(()=>{var t;console.log("Speechstart event"),"inactive"===(null===(t=this.recorder)||void 0===t?void 0:t.state)?this.recorder.start():console.log("MediaRecorder is already recording")})),document.addEventListener("speechstop",(()=>{var t;console.log("Speechstop event"),"recording"===(null===(t=this.recorder)||void 0===t?void 0:t.state)&&this.recorder.stop()})),document.addEventListener("speechabort",(()=>{var t;console.log("Speechabort event"),"recording"===(null===(t=this.recorder)||void 0===t?void 0:t.state)&&this.recorder.stop()})),document.addEventListener("mutedmic",(t=>{console.log("Mutedmic event"),this.events.onMute(t)})),document.addEventListener("unmutedmic",(t=>{console.log("Unmutedmic event"),this.events.onUnmute(t)}))}}},9415:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FaceDetector=void 0;const r=n(1811);e.FaceDetector=class{constructor(t,e){this.lastVideoTime=-1,this.startTimeMs=-1,this.lastDetectionCount=0,this.callbacks=e,this.video=document.createElement("video"),this.video.srcObject=t,this.start()}async start(){try{let t;await this.video.play(),console.log("Starting FaceDetector");try{t=await r.FilesetResolver.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.0/wasm"),console.log("MediaPipe WASM loaded successfully")}catch(t){return console.error("Failed to load MediaPipe WASM:",t),void this.useFallbackFaceDetection()}try{this.faceDetector=await r.FaceDetector.createFromOptions(t,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite",delegate:"CPU"},runningMode:"VIDEO"}),console.log("Face detector initialized successfully")}catch(t){return console.error("Failed to initialize face detector:",t),void this.useFallbackFaceDetection()}this.detectFaces()}catch(t){console.error("FaceDetector start failed:",t)}}async detectFaces(){if(this.startTimeMs=performance.now(),this.video.currentTime!==this.lastVideoTime){this.lastVideoTime=this.video.currentTime;const t=this.faceDetector.detectForVideo(this.video,this.startTimeMs).detections.filter((t=>t.categories[0].score>=.7));this.lastDetectionCount!==t.length&&(this.callbacks.faceCountDetection(t.length),this.lastDetectionCount=t.length)}window.requestAnimationFrame(this.detectFaces.bind(this))}useFallbackFaceDetection(){}}},526:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MediaPermissions=e.ViolationsTracker=e.PossibleViolation=void 0;const r=n(4135);Object.defineProperty(e,"PossibleViolation",{enumerable:!0,get:function(){return r.PossibleViolation}});const i=n(4763),s=n(9415),o=n(8410);Object.defineProperty(e,"MediaPermissions",{enumerable:!0,get:function(){return o.MediaPermissions}}),e.ViolationsTracker=class{constructor(t){this.screenSharing=!1,this.fullscreen=!1,this.inFocus=!0,this.tracking=!1,this.errorMessage="",this.errorCode="ERR_NONE",this.session=t}async requestMediaPermissions(){try{const t=o.MediaPermissions.getInstance().getUserMediaStream();t&&null!==t?(console.log("user media stream is already initialized successfully"),this.cameraStream=t):this.cameraStream=await navigator.mediaDevices.getUserMedia({video:!0})}catch(t){throw console.error("Camera permission denied:",t),new Error("Camera permission denied")}}async start(t){var e;if(this.tracking)return!0;this.tracking=!0;try{if(await this.requestMediaPermissions(),!this.cameraStream)return!1;this.audioDetector=new i.AudioDetector({onMute:()=>{this.session.onPossibleViolation(r.PossibleViolation.AudioMuted)},onUnmute:()=>{},onAudioBlob:t=>{this.session.onPossibleViolation(r.PossibleViolation.AudioNoise,t)}}),await(null===(e=this.audioDetector)||void 0===e?void 0:e.start()),this.registerForEvents(),this.faceDetector=new s.FaceDetector(this.cameraStream,{faceCountDetection:async t=>{console.log("Face count: ",t),t>1&&this.tracking?this.session.onPossibleViolation(r.PossibleViolation.MultipleFaces,await this.takeScreenshot(this.cameraStream)):0===t&&this.tracking&&this.session.onPossibleViolation(r.PossibleViolation.NoFace,await this.takeScreenshot(this.cameraStream))}});const n=await this.startScreenSharing(!0);return console.log("Is screen sharing",n),n?(t&&t((async()=>this.startFullscreen())),this.callRandomPictureOrScreenshot(),console.log("Tracking successfully in library..."),!0):(this.errorCode="ERR_SCREEN_SHARING",!1)}catch(t){return console.error("Permission request or other error:",t),this.errorMessage="Permission request dismissed or denied",!1}}async stop(){var t,e;if(!this.tracking)return;const n=o.MediaPermissions.getInstance();null===(t=this.audioDetector)||void 0===t||t.stop(),this.audioDetector=void 0,this.unregisterEvents(),await this.stopFullscreen(),await this.stopScreenSharing(),null===(e=this.cameraStream)||void 0===e||e.getTracks()[0].stop(),n.stopStreams(),this.tracking=!1}async startScreenSharing(t){if(this.screenSharing)return!0;t&&await this.startFullscreen();const e=o.MediaPermissions.getInstance().getDisplayMediaStream();let n;e&&null!==e?(console.log("Display media stream has already initialized successfully"),n=e):n=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!1});let r=n.getVideoTracks()[0].getSettings();return"monitor"===r.displaySurface?(this.stream=n,this.videoElement=document.createElement("video"),this.videoElement.autoplay=!0,this.videoElement.muted=!0,this.videoElement.style.position="fixed",this.videoElement.width=1,this.videoElement.height=1,this.videoElement.srcObject=n,n.getTracks()[0].onended=this.screenSharingEnded.bind(this),this.screenSharing=!0):(n.getTracks().forEach((t=>t.stop())),this.errorMessage="Please share your entire screen!"),"monitor"===r.displaySurface}async stopScreenSharing(){var t;this.videoElement&&(console.log("stopping screen sharing"),null===(t=this.stream)||void 0===t||t.getTracks()[0].stop(),this.screenSharing=!1,this.videoElement.remove(),this.stream=void 0,this.videoElement=void 0)}async screenSharingEnded(){console.log("screen sharing has been ended by the user! Shite!"),this.screenSharing=!1,this.tracking&&this.session.onPossibleViolation(r.PossibleViolation.StoppedScreenSharing),this.stream=void 0,this.videoElement=void 0}async startFullscreen(){try{await document.documentElement.requestFullscreen(),this.fullscreen=!0,console.log("Request full screen successfully...")}catch(t){console.log("Exception with start fullscreen",JSON.stringify(t))}}async stopFullscreen(){try{document.fullscreenElement&&await document.exitFullscreen()}catch(t){console.log(t)}this.fullscreen=!1}registerForEvents(){window.addEventListener("focus",this.focusEvent.bind(this)),window.addEventListener("blur",this.blurEvent.bind(this)),window.addEventListener("resize",this.resizeEvent.bind(this))}unregisterEvents(){window.removeEventListener("focus",this.focusEvent.bind(this)),window.removeEventListener("blur",this.blurEvent.bind(this)),window.removeEventListener("resize",this.resizeEvent.bind(this))}focusEvent(){console.log("focus"),this.inFocus=!0}async blurEvent(){console.log("blur"),this.inFocus=!1,this.tracking&&setTimeout((async()=>{const t=await this.takeScreenshot(this.stream);this.session.onPossibleViolation(r.PossibleViolation.SwitchedFocus,t)}),5e3)}isFullScreen(){return!window.screenTop&&!window.screenY}resizeEvent(){console.log("defering it"),setTimeout((()=>{console.log("resize after 1 second");var t=window.screen.height,e=window.screen.width,n=window.outerHeight,i=window.outerWidth;t===n&&e===i?console.log("Fullscreen: nothing to do!"):(this.tracking&&this.fullscreen&&setTimeout((async()=>{const t=await this.takeScreenshot(this.stream);this.session.onPossibleViolation(r.PossibleViolation.ToggledFullscreen,t)}),1e3),this.stopFullscreen())}),1e3)}async takeScreenshot(t){try{const e=document.createElement("video"),n=document.createElement("canvas"),r=n.getContext("2d");return r?(e.srcObject=t,new Promise(((i,s)=>{const o=setTimeout((()=>{console.error("Screenshot timeout - likely blocked by SEB"),i(this.takeScreenshotFallback(t))}),1e4);e.addEventListener("loadeddata",(async()=>{try{const{videoWidth:s,videoHeight:a}=e,c=Math.floor(.75*s),u=Math.floor(.75*a);n.width=c,n.height=u,await e.play(),r.drawImage(e,0,0,c,u),"function"==typeof n.toBlob?n.toBlob((e=>{clearTimeout(o),e?(console.log("Finish capture screenshot"),i(e)):(console.error("Failed to create blob from canvas"),i(this.takeScreenshotFallback(t)))}),"image/jpeg",.7):(console.error("canvas.toBlob not available - likely blocked by SEB"),clearTimeout(o),i(this.takeScreenshotFallback(t)))}catch(e){console.error("Error taking screenshot:",e),clearTimeout(o),i(this.takeScreenshotFallback(t))}})),e.addEventListener("error",(e=>{console.error("Video error during screenshot:",e),clearTimeout(o),i(this.takeScreenshotFallback(t))}))}))):(console.error("Canvas context not available - likely blocked by SEB"),this.takeScreenshotFallback(t))}catch(e){return console.error("Screenshot creation failed:",e),this.takeScreenshotFallback(t)}}takeScreenshotFallback(t){console.log("[SEB] Using fallback screenshot method");const e=document.createElement("canvas");return e.width=1,e.height=1,new Promise((t=>{try{"function"==typeof e.toBlob?e.toBlob((e=>{t(e||new Blob([],{type:"image/png"}))}),"image/png"):t(new Blob([],{type:"image/png"}))}catch(e){console.error("Fallback screenshot creation failed:",e),t(new Blob([],{type:"image/png"}))}}))}isSEB(){const t=navigator.userAgent.toLowerCase();return t.includes("seb")||t.includes("safe exam browser")}hasExternalMonitors(){return"isExtended"in window.screen&&window.screen.isExtended}async takeRandomScreenshot(){let t=await this.takeScreenshot(this.stream);this.session.onRandomPhoto(t)}async takeRandomPicture(){let t=await this.takeScreenshot(this.cameraStream);this.session.onRandomPhoto(t)}async callRandomPictureOrScreenshot(){let t=+(100*Math.random()).toFixed(0);t>20&&t<25?this.takeRandomScreenshot():t>40&&t<45&&this.takeRandomPicture(),this.tracking&&setTimeout(this.callRandomPictureOrScreenshot.bind(this),15e3)}}},8410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MediaPermissions=void 0;const r=n(4763);class i{constructor(){this.userMediaStream=null,this.displayMediaStream=null,this.audioPerm=null}static getInstance(){return i.instance||(i.instance=new i),i.instance}async reinitialize(){this.stopStreams(),this.userMediaStream=null,this.displayMediaStream=null,this.audioPerm=null}async checkCameraAvailability(){let t={isAvailable:!1,message:""};try{const e=await navigator.mediaDevices.getUserMedia({video:!0});console.log("Camera is accessible.");const n="Camera is accessible.";e.getTracks().forEach((t=>t.stop())),t={isAvailable:!0,message:n}}catch(e){console.error("Camera access error:",e.message);let n="error.message";"NotReadableError"===e.name?(console.log("Camera detected but may not be working due to missing drivers or being used by another application."),n="Camera detected but may not be working due to missing drivers or being used by another application."):"NotAllowedError"===e.name?(console.log("Camera access was blocked. Please check browser permissions."),n="Camera access was blocked. Please check browser permissions."):"OverconstrainedError"===e.name?(console.log("No matching camera found. It might be unplugged or disabled."),n="No matching camera found. It might be unplugged or disabled."):(console.log("Camera is not available."),n="Camera is not available."),t.message=n}return t}async requestMediaPermission(){try{return this.userMediaStream=await navigator.mediaDevices.getUserMedia({video:!0}),this.userMediaStream.active}catch(t){return!1}}requestAudioPermission(){try{return this.audioPerm=new r.AudioDetector({onMute:()=>{},onUnmute:()=>{},onAudioBlob:t=>{}}),console.log("Audio perm",this.audioPerm),!!this.audioPerm}catch(t){return!1}}async requestScreenPermission(){try{return this.displayMediaStream=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0}),this.displayMediaStream.active}catch(t){return!1}}getUserMediaStream(){return this.userMediaStream}getDisplayMediaStream(){return this.displayMediaStream}getAudioPerm(){return this.audioPerm}stopStreams(){var t,e,n;try{return null===(t=this.userMediaStream)||void 0===t||t.getTracks()[0].stop(),null===(e=this.displayMediaStream)||void 0===e||e.getTracks()[0].stop(),null===(n=this.audioPerm)||void 0===n||n.stop(),!0}catch(t){return!1}}}e.MediaPermissions=i},4432:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(9108),e),i(n(9383),e),i(n(8921),e)},5863:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctoringManager=void 0;const r=n(9108),i=n(8410);class s{constructor(t){this.currentSessionId="",this.userId=t.userId,this.userEmail=t.userEmail,this.env=t.env,this.proctorMetricService=new r.ProctorMetricService(this.env)}static getInstance(t){return s.instance||(s.instance=new s(t)),s.instance}async getRequestPermissions(){let t={camera:!1,audio:!1,screen:!1},e=i.MediaPermissions.getInstance();if(console.log("Media permissions",e.getUserMediaStream(),e.getDisplayMediaStream(),e.getAudioPerm()),e.getUserMediaStream())t.camera=!0;else{const n=await e.requestMediaPermission();console.log("cameraPermission",n),n&&(console.log("user camera stream is already initialized successfully"),t.camera=!0)}if(e.getDisplayMediaStream())t.screen=!0;else{const n=await e.requestScreenPermission();console.log("screenPermission",n),n&&(console.log("screen permission is already initialized successfully"),t.screen=!0)}if(e.getAudioPerm())t.audio=!0;else{const n=await e.requestAudioPermission();console.log("audioPermission",n),n&&(console.log("audio permission is already initialized successfully"),t.audio=!0)}return t.camera&&t.audio&&t.screen,t}async startTracking(t){if(!this.violationsTracker)throw new Error("Violations tracker is not initialized");this.violationsTracker.start(t)}async stopTracking(){if(!this.violationsTracker)throw new Error("Violations tracker is not initialized");this.violationsTracker.stop()}async initializeSession(t,e,n){this.session=t,this.violationsTracker=e,this.violationsTracker&&this.violationsTracker.start(n)}async getSessions(t){return this.proctorMetricService.getSessions(t)}async getCurrentSession(){return this.proctorMetricService.getActiveSessions(this.userId)}async startSession(t){if(!this.session||!this.violationsTracker)throw new Error("Session or violations tracker is not initialized");try{const t=await this.proctorMetricService.getActiveSessions(this.userId);if(console.log("getActiveSessionsResponse",t),t.data)return console.log("Current active session - getActiveSessionsResponse.data",t.data),this.currentSessionId=t.data.id,t.data}catch(t){console.error("Error starting session",t)}const e=await this.proctorMetricService.startSession({courseId:t.courseId,examId:t.examId,studentId:this.userId,studentEmail:t.studentEmail,timestamp:t.timestamp});return this.currentSessionId=e.data.id,console.log("startSessionResponse",e),e}async endSession(){await this.proctorMetricService.endSession(this.currentSessionId),this.currentSessionId="",this.violationsTracker&&await this.violationsTracker.stop(),this.session&&(this.session=void 0)}async pingSession(){if(!this.currentSessionId)throw new Error("Session is not initialized");await this.proctorMetricService.pingSession(this.currentSessionId),console.log(`Session ${this.currentSessionId} pinged successfully`)}async onReceiveViolationTracker(t,e){if(!this.session)throw new Error("Session is not initialized");await this.proctorMetricService.updateActivities({sessionId:this.currentSessionId,activityType:t,timestamp:(new Date).toISOString(),details:t,image:e})}async onReceiveMultipleViolationTracker(t){const e={data:[]},n=[];for(const e of t)n.push({sessionId:this.currentSessionId,activityType:e.violation,timestamp:(new Date).toISOString(),image:e.evidence,details:e.violation});e.data=n,await this.proctorMetricService.updateMultipleActivities(e)}async getActivityMetrics(t){return this.proctorMetricService.getActivityMetrics(t)}async getActivityMetricsInCurrentSession(t){const e={sessionId:this.currentSessionId,activityType:t};return this.proctorMetricService.getActivityMetrics(e)}onReceiveRandomPhoto(t){if(!this.session)throw new Error("Session is not initialized");this.session.onRandomPhoto(t)}}e.ProctoringManager=s},4680:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctoringSocketCore=void 0;const r=n(7046),i=n(4763),s=n(9415),o=n(8410),a=n(4135);e.ProctoringSocketCore=class{constructor(t){this.socket=null,this.isConnected=!1,this.reconnectAttempts=0,this.pingInterval=null,this.lastPingTime=0,this.pingTimeout=3e4,this.tracking=!1,this.screenSharing=!1,this.fullscreen=!1,this.inFocus=!0,this.errorMessage="",this.errorCode="ERR_NONE",this.config={...t,reconnection:{enabled:!0,maxAttempts:5,delay:1e3,...t.reconnection}}}async connect(){return new Promise(((t,e)=>{var n,i,s;try{this.socket&&(this.socket.disconnect(),this.socket=null),this.socket=(0,r.io)(`${this.config.serverUrl}/sessions`,{query:{sessionId:this.config.sessionId},auth:{token:this.config.authToken},reconnection:null===(n=this.config.reconnection)||void 0===n?void 0:n.enabled,reconnectionAttempts:null===(i=this.config.reconnection)||void 0===i?void 0:i.maxAttempts,reconnectionDelay:null===(s=this.config.reconnection)||void 0===s?void 0:s.delay}),this.socket.on("connect",(()=>{console.log("Connected to proctoring socket server"),this.isConnected=!0,this.reconnectAttempts=0,this.setupEventListeners(),this.startPingInterval(),t()})),this.socket.on("disconnect",(()=>{console.log("Disconnected from proctoring socket server"),this.isConnected=!1,this.stopPingInterval()})),this.socket.on("connect_error",(t=>{var n;console.error(`Socket connection error: ${t.message}`),this.isConnected=!1,this.reconnectAttempts++,this.reconnectAttempts>=((null===(n=this.config.reconnection)||void 0===n?void 0:n.maxAttempts)||5)&&e(new Error(`Failed to connect after ${this.reconnectAttempts} attempts`))})),this.socket.on("connected",(t=>{console.log(`Server confirmed connection: ${JSON.stringify(t)}`)})),this.socket.on("pong",(t=>{var e;console.log(`Received pong: ${JSON.stringify(t)}`),this.lastPingTime=Date.now(),(null===(e=this.config.events)||void 0===e?void 0:e.onPong)&&this.config.events.onPong(t)})),this.socket.on("sessionEnded",(t=>{var e;console.log(`Session ended: ${JSON.stringify(t)}`),this.isConnected=!1,this.stopPingInterval(),(null===(e=this.config.events)||void 0===e?void 0:e.onSessionEnded)&&this.config.events.onSessionEnded(t)})),this.socket.on("error",(t=>{var e;console.error(`Server error: ${t.message}`),(null===(e=this.config.events)||void 0===e?void 0:e.onError)&&this.config.events.onError(t)}))}catch(t){console.error(`Error connecting to socket: ${t}`),e(t)}}))}disconnect(){this.socket&&(this.socket.disconnect(),this.socket=null,this.isConnected=!1,this.stopPingInterval())}async pingSession(){return new Promise(((t,e)=>{var n;if(this.socket&&this.isConnected)try{this.socket.emit("ping",{sessionId:this.config.sessionId}),console.log(`Sent ping for session: ${this.config.sessionId}`),(null===(n=this.config.events)||void 0===n?void 0:n.onPing)&&this.config.events.onPing({sessionId:this.config.sessionId}),t()}catch(t){console.error(`Error sending ping: ${t}`),e(t)}else e(new Error("Not connected to socket server"))}))}async endSession(){return new Promise(((t,e)=>{if(this.socket&&this.isConnected)try{this.socket.emit("endSession",{sessionId:this.config.sessionId}),console.log(`Sent end session request for: ${this.config.sessionId}`),t()}catch(t){console.error(`Error ending session: ${t}`),e(t)}else e(new Error("Not connected to socket server"))}))}async startSession(t){var e;if(this.tracking)return!0;this.tracking=!0;try{if(await this.requestMediaPermissions(),!this.cameraStream)return!1;this.audioDetector=new i.AudioDetector({onMute:()=>{this.config.session.onPossibleViolation(a.PossibleViolation.AudioMuted)},onUnmute:()=>{},onAudioBlob:t=>{this.config.session.onPossibleViolation(a.PossibleViolation.AudioNoise,t)}}),await(null===(e=this.audioDetector)||void 0===e?void 0:e.start()),this.registerForEvents(),this.faceDetector=new s.FaceDetector(this.cameraStream,{faceCountDetection:async t=>{console.log("Face count: ",t),t>1&&this.tracking?this.config.session.onPossibleViolation(a.PossibleViolation.MultipleFaces,await this.takeScreenshot(this.cameraStream)):0===t&&this.tracking&&this.config.session.onPossibleViolation(a.PossibleViolation.NoFace,await this.takeScreenshot(this.cameraStream))}});const n=await this.startScreenSharing(!0);return console.log("Is screen sharing",n),n?(t&&t((async()=>this.startFullscreen())),this.callRandomPictureOrScreenshot(),console.log("Tracking successfully in library..."),!0):(this.errorCode="ERR_SCREEN_SHARING",!1)}catch(t){return console.error("Permission request or other error:",t),this.errorMessage="Permission request dismissed or denied",!1}}async stopSession(){var t,e;if(!this.tracking)return;const n=o.MediaPermissions.getInstance();null===(t=this.audioDetector)||void 0===t||t.stop(),this.audioDetector=void 0,this.unregisterEvents(),await this.stopFullscreen(),await this.stopScreenSharing(),null===(e=this.cameraStream)||void 0===e||e.getTracks()[0].stop(),n.stopStreams(),this.tracking=!1}async requestMediaPermissions(){try{const t=o.MediaPermissions.getInstance().getUserMediaStream();t&&null!==t?(console.log("user media stream is already initialized successfully"),this.cameraStream=t):this.cameraStream=await navigator.mediaDevices.getUserMedia({video:!0})}catch(t){throw console.error("Camera permission denied:",t),new Error("Camera permission denied")}}async startScreenSharing(t){if(this.screenSharing)return!0;t&&await this.startFullscreen();const e=o.MediaPermissions.getInstance().getDisplayMediaStream();let n;e&&null!==e?(console.log("Display media stream has already initialized successfully"),n=e):n=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!1});let r=n.getVideoTracks()[0].getSettings();return"monitor"===r.displaySurface?(this.stream=n,this.videoElement=document.createElement("video"),this.videoElement.autoplay=!0,this.videoElement.muted=!0,this.videoElement.style.position="fixed",this.videoElement.width=1,this.videoElement.height=1,this.videoElement.srcObject=n,n.getTracks()[0].onended=this.screenSharingEnded.bind(this),this.screenSharing=!0):(n.getTracks().forEach((t=>t.stop())),this.errorMessage="Please share your entire screen!"),"monitor"===r.displaySurface}async stopScreenSharing(){var t;this.videoElement&&(console.log("stopping screen sharing"),null===(t=this.stream)||void 0===t||t.getTracks()[0].stop(),this.screenSharing=!1,this.videoElement.remove(),this.stream=void 0,this.videoElement=void 0)}async screenSharingEnded(){console.log("screen sharing has been ended by the user! Shite!"),this.screenSharing=!1,this.tracking&&this.config.session.onPossibleViolation(a.PossibleViolation.StoppedScreenSharing),this.stream=void 0,this.videoElement=void 0}async startFullscreen(){try{await document.documentElement.requestFullscreen(),this.fullscreen=!0,console.log("Request full screen successfully...")}catch(t){console.log("Exception with start fullscreen",JSON.stringify(t))}}async stopFullscreen(){try{document.fullscreenElement&&await document.exitFullscreen()}catch(t){console.log(t)}this.fullscreen=!1}registerForEvents(){window.addEventListener("focus",this.focusEvent.bind(this)),window.addEventListener("blur",this.blurEvent.bind(this)),window.addEventListener("resize",this.resizeEvent.bind(this))}unregisterEvents(){window.removeEventListener("focus",this.focusEvent.bind(this)),window.removeEventListener("blur",this.blurEvent.bind(this)),window.removeEventListener("resize",this.resizeEvent.bind(this))}focusEvent(){console.log("focus"),this.inFocus=!0}async blurEvent(){console.log("blur"),this.inFocus=!1,this.tracking&&setTimeout((async()=>{const t=await this.takeScreenshot(this.stream);this.config.session.onPossibleViolation(a.PossibleViolation.SwitchedFocus,t)}),5e3)}isFullScreen(){return!window.screenTop&&!window.screenY}resizeEvent(){console.log("defering it"),setTimeout((()=>{console.log("resize after 1 second");var t=window.screen.height,e=window.screen.width,n=window.outerHeight,r=window.outerWidth;t===n&&e===r?console.log("Fullscreen: nothing to do!"):(this.tracking&&this.fullscreen&&setTimeout((async()=>{const t=await this.takeScreenshot(this.stream);this.config.session.onPossibleViolation(a.PossibleViolation.ToggledFullscreen,t)}),1e3),this.stopFullscreen())}),1e3)}async takeScreenshot(t){if(this.isSEB())return console.log("Running in SEB - using fallback screenshot method"),this.takeScreenshotFallback(t);try{const e=document.createElement("video"),n=document.createElement("canvas"),r=n.getContext("2d");return r?(e.srcObject=t,new Promise(((i,s)=>{const o=setTimeout((()=>{console.error("Screenshot timeout - likely blocked by SEB"),i(this.takeScreenshotFallback(t))}),1e4);e.addEventListener("loadeddata",(async()=>{try{const{videoWidth:s,videoHeight:a}=e,c=Math.floor(.75*s),u=Math.floor(.75*a);n.width=c,n.height=u,await e.play(),r.drawImage(e,0,0,c,u),"function"==typeof n.toBlob?n.toBlob((e=>{clearTimeout(o),e?(console.log("Finish capture screenshot"),i(e)):(console.error("Failed to create blob from canvas"),i(this.takeScreenshotFallback(t)))}),"image/jpeg",.7):(console.error("canvas.toBlob not available - likely blocked by SEB"),clearTimeout(o),i(this.takeScreenshotFallback(t)))}catch(e){console.error("Error taking screenshot:",e),clearTimeout(o),i(this.takeScreenshotFallback(t))}})),e.addEventListener("error",(e=>{console.error("Video error during screenshot:",e),clearTimeout(o),i(this.takeScreenshotFallback(t))}))}))):(console.error("Canvas context not available - likely blocked by SEB"),this.takeScreenshotFallback(t))}catch(e){return console.error("Screenshot creation failed:",e),this.takeScreenshotFallback(t)}}takeScreenshotFallback(t){console.log("[SEB] Using fallback screenshot method");const e=document.createElement("canvas");return e.width=1,e.height=1,new Promise((t=>{try{"function"==typeof e.toBlob?e.toBlob((e=>{t(e||new Blob([],{type:"image/png"}))}),"image/png"):t(new Blob([],{type:"image/png"}))}catch(e){console.error("Fallback screenshot creation failed:",e),t(new Blob([],{type:"image/png"}))}}))}isSEB(){const t=navigator.userAgent.toLowerCase();return t.includes("seb")||t.includes("safe exam browser")}hasExternalMonitors(){return"isExtended"in window.screen&&window.screen.isExtended}async takeRandomScreenshot(){let t=await this.takeScreenshot(this.stream);this.config.session.onRandomPhoto(t)}async takeRandomPicture(){let t=await this.takeScreenshot(this.cameraStream);this.config.session.onRandomPhoto(t)}callRandomPictureOrScreenshot(){let t=+(100*Math.random()).toFixed(0);t>20&&t<25?this.takeRandomScreenshot():t>40&&t<45&&this.takeRandomPicture(),this.tracking&&setTimeout(this.callRandomPictureOrScreenshot.bind(this),15e3)}isSocketConnected(){return this.isConnected&&null!==this.socket}setupEventListeners(){this.socket}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval((async()=>{try{await this.pingSession()}catch(t){console.error(`Error in ping interval: ${t}`)}}),this.pingTimeout)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}}},1146:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctoringSocketManager=void 0;const r=n(4680);e.ProctoringSocketManager=class{constructor(t){this.manager=new r.ProctoringSocketCore(t)}async connect(){return this.manager.connect()}async pingSession(){return this.manager.pingSession()}async startSession(){return this.manager.startSession()}async endSession(){return this.manager.endSession()}disconnect(){this.manager.disconnect()}}},9383:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(5863),e),i(n(1146),e),i(n(4680),e)},3134:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Environment=void 0,(n=e.Environment||(e.Environment={})).Staging="Staging",n.UAT="UAT",n.Prod="Prod"},8921:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(3134),e),i(n(4135),e),i(n(1971),e)},4135:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.PossibleViolation=void 0,(n=e.PossibleViolation||(e.PossibleViolation={})).MultipleFaces="MultipleFaces",n.NoFace="NoFace",n.AudioNoise="AudioNoise",n.AudioMuted="AudioMuted",n.SwitchedFocus="SwitchedFocus",n.ToggledFullscreen="ToggledFullscreen",n.StoppedScreenSharing="StoppedScreenSharing"},1971:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},1811:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="undefined"!=typeof self?self:{};function r(){throw Error("Invalid UTF8")}function i(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let s,o;const a="undefined"!=typeof TextDecoder;let c;const u="undefined"!=typeof TextEncoder;function h(t){if(u)t=(c||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)r[n++]=e;else{if(e<2048)r[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){const s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var l,f;t:{for(var d=["CLOSURE_FLAGS"],p=n,g=0;g<d.length;g++)if(null==(p=p[d[g]])){f=null;break t}f=p}var m,v=f&&f[610401301];l=null!=v&&v;const y=n.navigator;function _(t){return!!l&&!!m&&m.brands.some((({brand:e})=>e&&-1!=e.indexOf(t)))}function b(t){var e;return(e=n.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}function w(){return!!l&&!!m&&m.brands.length>0}function E(){return w()?_("Chromium"):(b("Chrome")||b("CriOS"))&&!(!w()&&b("Edge"))||b("Silk")}function S(t){return S[" "](t),t}m=y&&y.userAgentData||null,S[" "]=function(){};var k=!w()&&(b("Trident")||b("MSIE"));!b("Android")||E(),E(),b("Safari")&&(E()||!w()&&b("Coast")||!w()&&b("Opera")||!w()&&b("Edge")||(w()?_("Microsoft Edge"):b("Edg/"))||w()&&_("Opera"));var T={},C=null;function A(){if(!C){C={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const r=t.concat(e[n].split(""));T[n]=r;for(let t=0;t<r.length;t++){const e=r[t];void 0===C[e]&&(C[e]=t)}}}}var x="undefined"!=typeof Uint8Array,P=!k&&"function"==typeof btoa;function O(t){if(!P){var e;void 0===e&&(e=0),A(),e=T[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let c=0,u=0;for(;c<t.length-2;c+=3){var i=t[c],s=t[c+1],o=t[c+2],a=e[i>>2];i=e[(3&i)<<4|s>>4],s=e[(15&s)<<2|o>>6],o=e[63&o],n[u++]=a+i+s+o}switch(a=0,o=r,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||r;case 1:t=t[c],n[u]=e[t>>2]+e[(3&t)<<4|a>>4]+o+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const F=/[-_.]/g,I={"-":"+",_:"/",".":"="};function R(t){return I[t]||""}function M(t){if(!P)return function(t){const e=t.length;let n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);const r=new Uint8Array(n);let i=0;return function(t,e){function n(e){for(;r<t.length;){const e=t.charAt(r++),n=C[e];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}A();let r=0;for(;;){const t=n(-1),r=n(0),i=n(64),s=n(64);if(64===s&&-1===t)break;e(t<<2|r>>4),64!=i&&(e(r<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}(t);F.test(t)&&(t=t.replace(F,R)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function L(t){return x&&null!=t&&t instanceof Uint8Array}var N={};function j(){return U||=new B(null,N)}function D(t){G(N);var e=t.g;return null==(e=null==e||L(e)?e:"string"==typeof e?M(e):null)?e:t.g=e}var B=class{h(){return new Uint8Array(D(this)||0)}constructor(t,e){if(G(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let U,V;function G(t){if(t!==N)throw Error("illegal external caller")}function W(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function z(t){return W(t=Error(t),"warning"),t}var q="function"==typeof Symbol&&"symbol"==typeof Symbol(),H=new Set;function $(t,e,n=!1,r=!1){return t="function"==typeof Symbol&&"symbol"==typeof Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e,n&&H.add(t),t}var X=$("jas",void 0,!0,!0),K=$(void 0,"0di"),Y=$(void 0,"2ex"),J=$(void 0,"1oa",!0),Z=$(void 0,Symbol(),!0);const Q=q?X:"Ga",tt={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},et=Object.defineProperties;function nt(t,e){q||Q in t||et(t,tt),t[Q]|=e}function rt(t,e){q||Q in t||et(t,tt),t[Q]=e}function it(t){return nt(t,34),t}function st(t,e){rt(e,-30975&(0|t))}function ot(t,e){rt(e,-30941&(34|t))}function at(){return"function"==typeof BigInt}function ct(t){return Array.prototype.slice.call(t)}var ut,ht={},lt={};function ft(t){return!(!t||"object"!=typeof t||t.Ia!==lt)}function dt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function pt(t,e){if(null!=t)if("string"==typeof t)t=t?new B(t,N):j();else if(t.constructor!==B)if(L(t))t=t.length?new B(new Uint8Array(t),N):j();else{if(!e)throw Error();t=void 0}return t}function gt(t){return!(!Array.isArray(t)||t.length||!(1&(0|t[Q])))}const mt=[];function vt(t){if(2&t)throw Error()}rt(mt,55),ut=Object.freeze(mt);class yt{constructor(t,e,n){this.l=0,this.g=t,this.h=e,this.m=n}next(){if(this.l<this.g.length){const t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new yt(this.g,this.h,this.m)}}function _t(t){return Z?t[Z]:void 0}var bt=Object.freeze({});function wt(t){return t.Qa=!0,t}var Et=wt((t=>"number"==typeof t)),St=wt((t=>"string"==typeof t)),kt=wt((t=>"boolean"==typeof t)),Tt="function"==typeof n.BigInt&&"bigint"==typeof n.BigInt(0),Ct=wt((t=>Tt?t>=xt&&t<=Ot:"-"===t[0]?Ft(t,At):Ft(t,Pt)));const At=Number.MIN_SAFE_INTEGER.toString(),xt=Tt?BigInt(Number.MIN_SAFE_INTEGER):void 0,Pt=Number.MAX_SAFE_INTEGER.toString(),Ot=Tt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Ft(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let n=0;n<t.length;n++){const r=t[n],i=e[n];if(r>i)return!1;if(r<i)return!0}}const It="function"==typeof Uint8Array.prototype.slice;let Rt,Mt=0,Lt=0;function Nt(t){const e=t>>>0;Mt=e,Lt=(t-e)/4294967296>>>0}function jt(t){if(t<0){Nt(-t);const[e,n]=zt(Mt,Lt);Mt=e>>>0,Lt=n>>>0}else Nt(t)}function Dt(t){const e=Rt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Lt=0,Mt=e.getUint32(0,!0)}function Bt(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:Vt(t,e)}function Ut(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),"number"==typeof(t=Bt(t,e))?n?-t:t:n?"-"+t:t}function Vt(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else at()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=t/1e7>>>0,t%=1e7),n>=1e7&&(e+=n/1e7>>>0,n%=1e7),n=e+Gt(n)+Gt(t));return n}function Gt(t){return t=String(t),"0000000".slice(t.length)+t}function Wt(t){if(t.length<16)jt(Number(t));else if(at())t=BigInt(t),Mt=Number(t&BigInt(4294967295))>>>0,Lt=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);Lt=Mt=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));Lt*=1e6,Mt=1e6*Mt+e,Mt>=4294967296&&(Lt+=Math.trunc(Mt/4294967296),Lt>>>=0,Mt>>>=0)}if(e){const[t,e]=zt(Mt,Lt);Mt=t,Lt=e}}}function zt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}const qt="function"==typeof BigInt?BigInt.asIntN:void 0,Ht="function"==typeof BigInt?BigInt.asUintN:void 0,$t=Number.isSafeInteger,Xt=Number.isFinite,Kt=Math.trunc;function Yt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Jt(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}const Zt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Qt(t){switch(typeof t){case"bigint":return!0;case"number":return Xt(t);case"string":return Zt.test(t);default:return!1}}function te(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Xt(t)?0|t:void 0}function ee(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Xt(t)?t>>>0:void 0}function ne(t){if("-"===t[0])return!1;const e=t.length;return e<20||20===e&&Number(t.substring(0,6))<184467}function re(t){return t=Kt(t),$t(t)||(jt(t),t=Ut(Mt,Lt)),t}function ie(t){var e=Kt(Number(t));if($t(e))return String(e);if(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),e=t.length,!("-"===t[0]?e<20||20===e&&Number(t.substring(0,7))>-922337:e<19||19===e&&Number(t.substring(0,6))<922337))if(Wt(t),t=Mt,2147483648&(e=Lt))if(at())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=zt(t,e);t="-"+Vt(n,r)}else t=Vt(t,e);return t}function se(t){return null==t?t:"bigint"==typeof t?(Ct(t)?t=Number(t):(t=qt(64,t),t=Ct(t)?Number(t):String(t)),t):Qt(t)?"number"==typeof t?re(t):ie(t):void 0}function oe(t){if("string"!=typeof t)throw Error();return t}function ae(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ce(t){return null==t||"string"==typeof t?t:void 0}function ue(t,e,n,r){if(null!=t&&"object"==typeof t&&t.W===ht)return t;if(!Array.isArray(t))return n?2&r?((t=e[K])||(it((t=new e).u),t=e[K]=t),e=t):e=new e:e=void 0,e;let i=n=0|t[Q];return 0===i&&(i|=32&r),i|=2&r,i!==n&&rt(t,i),new e(t)}function he(t,e,n){if(e)t:{if(!Qt(e=t))throw z("int64");switch(typeof e){case"string":e=ie(e);break t;case"bigint":if(t=e=qt(64,e),St(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(Et(t)&&!Number.isSafeInteger(t))throw Error(String(t));e=Tt?BigInt(e):kt(e)?e?"1":"0":St(e)?e.trim()||"0":String(e);break t;default:e=re(e)}}else e=se(t);return"string"==typeof(n=null==(t=e)?n?0:void 0:t)&&$t(e=+n)?e:n}const le={};let fe=function(){try{return S(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class de{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}const pe=fe?(Object.setPrototypeOf(de.prototype,Map.prototype),Object.defineProperties(de.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),de):class extends Map{constructor(){super()}};function ge(t){return t}function me(t){if(2&t.L)throw Error("Cannot mutate an immutable Map")}var ve=class extends pe{constructor(t,e,n=ge,r=ge){super();let i=0|t[Q];i|=64,rt(t,i),this.L=i,this.S=e,this.R=n,this.Y=this.S?ye:r;for(let s=0;s<t.length;s++){const o=t[s],a=n(o[0],!1,!0);let c=o[1];e?void 0===c&&(c=null):c=r(o[1],!1,!0,void 0,void 0,i),super.set(a,c)}}na(t=_e){if(0!==this.size)return this.X(t)}X(t=_e){const e=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=t(r[0]),r[1]=t(r[1]),e.push(r);return e}clear(){me(this),super.clear()}delete(t){return me(this),super.delete(this.R(t,!0,!1))}entries(){var t=this.ma();return new yt(t,be,this)}keys(){return this.Ha()}values(){var t=this.ma();return new yt(t,ve.prototype.get,this)}forEach(t,e){super.forEach(((n,r)=>{t.call(e,this.get(r),r,this)}))}set(t,e){return me(this),null==(t=this.R(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.Y(e,!0,!0,this.S,!1,this.L))}Na(t){const e=this.R(t[0],!1,!0);t=t[1],t=this.S?void 0===t?null:t:this.Y(t,!1,!0,void 0,!1,this.L),super.set(e,t)}has(t){return super.has(this.R(t,!1,!1))}get(t){t=this.R(t,!1,!1);const e=super.get(t);if(void 0!==e){var n=this.S;return n?((n=this.Y(e,!1,!0,n,this.ra,this.L))!==e&&super.set(t,n),n):e}}ma(){return Array.from(super.keys())}Ha(){return super.keys()}[Symbol.iterator](){return this.entries()}};function ye(t,e,n,r,i,s){return t=ue(t,r,n,s),i&&(t=Me(t)),t}function _e(t){return t}function be(t){return[t,this.get(t)]}let we,Ee,Se;function ke(){return we||=new ve(it([]),void 0,void 0,void 0,le)}function Te(t,e,n,r,i){if(null!=t){if(Array.isArray(t))t=gt(t)?void 0:i&&2&(0|t[Q])?t:Ce(t,e,n,void 0!==r,i);else if(dt(t)){const s={};for(let o in t)s[o]=Te(t[o],e,n,r,i);t=s}else t=e(t,r);return t}}function Ce(t,e,n,r,i){const s=r||n?0|t[Q]:0,o=r?!!(32&s):void 0;r=ct(t);for(let t=0;t<r.length;t++)r[t]=Te(r[t],e,n,o,i);return n&&((t=_t(t))&&(r[Z]=ct(t)),n(s,r)),r}function Ae(t){return Te(t,xe,void 0,void 0,!1)}function xe(t){return t.W===ht?t.toJSON():t instanceof ve?t.na(Ae):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"bigint":return Ct(t)?Number(t):String(t);case"boolean":return t?1:0;case"object":if(t)if(Array.isArray(t)){if(gt(t))return}else{if(L(t))return O(t);if(t instanceof B){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=O(e)}if(t instanceof ve)return t.na()}}return t}(t)}function Pe(t){return Ce(t,xe,void 0,void 0,!1)}function Oe(t,e,n){return t=Fe(t,e[0],e[1],n?1:2),e!==Ee&&n&&nt(t,16384),t}function Fe(t,e,n,r){if(null==t){var i=96;n?(t=[n],i|=512):t=[],e&&(i=-33521665&i|(1023&e)<<15)}else{if(!Array.isArray(t))throw Error("narr");if(2048&(i=0|t[Q]))throw Error("farr");if(64&i)return t;if(1===r||2===r||(i|=64),n&&(i|=512,n!==t[0]))throw Error("mid");t:{if(r=(n=t).length){const t=r-1;if(dt(n[t])){if((e=t-(512&(i|=256)?0:-1))>=1024)throw Error("pvtlmt");i=-33521665&i|(1023&e)<<15;break t}}if(e){if((e=Math.max(e,r-(512&i?0:-1)))>1024)throw Error("spvt");i=-33521665&i|(1023&e)<<15}}}return rt(t,i),t}function Ie(t,e,n=ot){if(null!=t){if(x&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=0|t[Q];return 2&r?t:(e&&=0===r||!!(32&r)&&!(64&r||!(16&r)),e?(rt(t,-12293&(34|r)),t):Ce(t,Ie,4&r?ot:n,!0,!0))}return t.W===ht?t=2&(r=0|(n=t.u)[Q])?t:new t.constructor(Re(n,r,!0)):t instanceof ve&&!(2&t.L)&&(n=it(t.X(Ie)),t=new ve(n,t.S,t.R,t.Y)),t}}function Re(t,e,n){const r=n||2&e?ot:st,i=!!(32&e);return t=function(t,e,n){const r=ct(t);var i=r.length;const s=256&e?r[i-1]:void 0;for(i+=s?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(s){e=r[e]={};for(const t in s)e[t]=n(s[t])}return(t=_t(t))&&(r[Z]=ct(t)),r}(t,e,(t=>Ie(t,i,r))),nt(t,32|(n?2:0)),t}function Me(t){const e=t.u,n=0|e[Q];return 2&n?new t.constructor(Re(e,n,!1)):t}function Le(t,e){return Ne(t=t.u,0|t[Q],e)}function Ne(t,e,r,i){if(-1===r)return null;var s=r+(512&e?0:-1);const o=t.length-1;return s>=o&&256&e?t[o][r]:i&&256&e&&null!=(e=t[o][r])?(null!=t[s]&&null!=Y&&((s=(t=V??={})[Y]||0)>=4||(t[Y]=s+1,W(t=Error(),"incident"),function(t){n.setTimeout((()=>{throw t}),0)}(t))),e):s<=o?t[s]:void 0}function je(t,e,n){const r=t.u;let i=0|r[Q];return vt(i),De(r,i,e,n),t}function De(t,e,n,r){const i=512&e?0:-1,s=n+i;var o=t.length-1;return s>=o&&256&e?(t[o][n]=r,e):s<=o?(t[s]=r,256&e&&n in(t=t[o])&&delete t[n],e):(void 0!==r&&(n>=(o=e>>15&1023||536870912)?null!=r&&(t[o+i]={[n]:r},rt(t,e|=256)):t[s]=r),e)}function Be(t,e){let n=0|(t=t.u)[Q];const r=Ne(t,n,e),i=Yt(r);return null!=i&&i!==r&&De(t,n,e,i),i}function Ue(t){let e=0|(t=t.u)[Q];const n=Ne(t,e,1),r=pt(n,!0);return null!=r&&r!==n&&De(t,e,1,r),r}function Ve(){return void 0===bt?2:4}function Ge(t,e,n,r,i){const s=t.u,o=2&(t=0|s[Q])?1:r;i=!!i;let a=0|(r=We(s,t,e))[Q];if(!(4&a)){4&a&&(r=ct(r),a=an(a,t),t=De(s,t,e,r));let i=0,o=0;for(;i<r.length;i++){const t=n(r[i]);null!=t&&(r[o++]=t)}o<i&&(r.length=o),a=ze(a,t),n=-4097&(20|a),a=n&=-8193,rt(r,a),2&a&&Object.freeze(r)}return 1===o||4===o&&32&a?qe(a)||(i=a,a|=2,a!==i&&rt(r,a),Object.freeze(r)):(2===o&&qe(a)&&(r=ct(r),a=an(a,t),a=cn(a,t,i),rt(r,a),t=De(s,t,e,r)),qe(a)||(e=a,a=cn(a,t,i),a!==e&&rt(r,a))),r}function We(t,e,n,r){return t=Ne(t,e,n,r),Array.isArray(t)?t:ut}function ze(t,e){return 0===t&&(t=an(t,e)),1|t}function qe(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function He(t){t=ct(t);for(let e=0;e<t.length;e++){const n=t[e]=ct(t[e]);Array.isArray(n[1])&&(n[1]=it(n[1]))}return t}function $e(t,e,n,r){let i=0|(t=t.u)[Q];vt(i),De(t,i,e,("0"===r?0===Number(n):n===r)?void 0:n)}function Xe(t,e,n,r,i){vt(e);var s=!(!(64&e)&&16384&e);const o=(i=We(t,e,n,i))!==ut;if(s||!o){let a=s=o?0|i[Q]:0;(!o||2&a||qe(a)||4&a&&!(32&a))&&(i=ct(i),a=an(a,e),e=De(t,e,n,i)),a=-13&ze(a,e),a=cn(r?-17&a:16|a,e,!0),a!==s&&rt(i,a)}return i}function Ke(t,e){var n=_s;return Ze(Ye(t=t.u),t,0|t[Q],n)===e?e:-1}function Ye(t){if(q)return t[J]??(t[J]=new Map);if(J in t)return t[J];const e=new Map;return Object.defineProperty(t,J,{value:e}),e}function Je(t,e,n,r){const i=Ye(t),s=Ze(i,t,e,n);return s!==r&&(s&&(e=De(t,e,s)),i.set(n,r)),e}function Ze(t,e,n,r){let i=t.get(r);if(null!=i)return i;i=0;for(let t=0;t<r.length;t++){const s=r[t];null!=Ne(e,n,s)&&(0!==i&&(n=De(e,n,i)),i=s)}return t.set(r,i),i}function Qe(t,e,n,r){let i,s=0|t[Q];if(null!=(r=Ne(t,s,n,r))&&r.W===ht)return(e=Me(r))!==r&&De(t,s,n,e),e.u;if(Array.isArray(r)){const t=0|r[Q];i=2&t?Oe(Re(r,t,!1),e,!0):64&t?r:Oe(i,e,!0)}else i=Oe(void 0,e,!0);return i!==r&&De(t,s,n,i),i}function tn(t,e,n,r){let i=0|(t=t.u)[Q];return(e=ue(r=Ne(t,i,n,r),e,!1,i))!==r&&null!=e&&De(t,i,n,e),e}function en(t,e,n,r=!1){if(null==(e=tn(t,e,n,r)))return e;if(!(2&(r=0|(t=t.u)[Q]))){const i=Me(e);i!==e&&De(t,r,n,e=i)}return e}function nn(t,e,n,r,i,s,o){t=t.u;var a=!!(2&e);const c=a?1:i;s=!!s,o&&=!a;var u=0|(i=We(t,e,r))[Q];if(!(a=!!(4&u))){var h=i,l=e;const t=!!(2&(u=ze(u,e)));t&&(l|=2);let r=!t,s=!0,o=0,a=0;for(;o<h.length;o++){const e=ue(h[o],n,!1,l);if(e instanceof n){if(!t){const t=!!(2&(0|e.u[Q]));r&&=!t,s&&=t}h[a++]=e}}a<o&&(h.length=a),u|=4,u=s?16|u:-17&u,rt(h,u=r?8|u:-9&u),t&&Object.freeze(h)}if(o&&!(8&u||!i.length&&(1===c||4===c&&32&u))){for(qe(u)&&(i=ct(i),u=an(u,e),e=De(t,e,r,i)),n=i,o=u,h=0;h<n.length;h++)(u=n[h])!==(l=Me(u))&&(n[h]=l);o|=8,rt(n,o=n.length?-17&o:16|o),u=o}return 1===c||4===c&&32&u?qe(u)||(e=u,(u|=!i.length||16&u&&(!a||32&u)?2:2048)!==e&&rt(i,u),Object.freeze(i)):(2===c&&qe(u)&&(rt(i=ct(i),u=cn(u=an(u,e),e,s)),e=De(t,e,r,i)),qe(u)||(r=u,(u=cn(u,e,s))!==r&&rt(i,u))),i}function rn(t,e,n){const r=0|t.u[Q];return nn(t,r,e,n,Ve(),!1,!(2&r))}function sn(t,e,n,r){return null==r&&(r=void 0),je(t,n,r)}function on(t,e,n,r){null==r&&(r=void 0);t:{let i=0|(t=t.u)[Q];if(vt(i),null==r){const r=Ye(t);if(Ze(r,t,i,n)!==e)break t;r.set(n,0)}else i=Je(t,i,n,e);De(t,i,e,r)}}function an(t,e){return-2049&(32|(2&e?2|t:-3&t))}function cn(t,e,n){return 32&e&&n||(t&=-33),t}function un(t,e,n,r){const i=0|t.u[Q];vt(i),t=nn(t,i,n,e,2,!0),r=null!=r?r:new n,t.push(r),t[Q]=2&(0|r.u[Q])?-9&t[Q]:-17&t[Q]}function hn(t,e){return te(Le(t,e))}function ln(t,e){return ce(Le(t,e))}function fn(t,e){return Be(t,e)??0}function dn(t,e,n){if(null!=n&&"boolean"!=typeof n)throw t=typeof n,Error(`Expected boolean but got ${"object"!=t?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);je(t,e,n)}function pn(t,e,n){if(null!=n){if("number"!=typeof n)throw z("int32");if(!Xt(n))throw z("int32");n|=0}je(t,e,n)}function gn(t,e,n){if(null!=n&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);je(t,e,n)}function mn(t,e,n){{const o=t.u;let a=0|o[Q];if(vt(a),null==n)De(o,a,e);else{var r=t=0|n[Q],i=qe(t),s=i||Object.isFrozen(n);for(i||(t=0),s||(n=ct(n),r=0,t=cn(t=an(t,a),a,!0),s=!1),t|=21,i=0;i<n.length;i++){const e=n[i],o=oe(e);Object.is(e,o)||(s&&(n=ct(n),r=0,t=cn(t=an(t,a),a,!0),s=!1),n[i]=o)}t!==r&&(s&&(n=ct(n),t=cn(t=an(t,a),a,!0)),rt(n,t)),De(o,a,e,n)}}}function vn(t,e,n){vt(0|t.u[Q]),Ge(t,e,ce,2,!0).push(oe(n))}function yn(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function _n(){return Error("Failed to read varint, encoding is invalid.")}function bn(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function wn(t){if("string"==typeof t)return{buffer:M(t),N:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),N:!1};if(t.constructor===Uint8Array)return{buffer:t,N:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),N:!1};if(t.constructor===B)return{buffer:D(t)||new Uint8Array(0),N:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),N:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function En(t,e){let n,r=0,i=0,s=0;const o=t.h;let a=t.g;do{n=o[a++],r|=(127&n)<<s,s+=7}while(s<32&&128&n);for(s>32&&(i|=(127&n)>>4),s=3;s<32&&128&n;s+=7)n=o[a++],i|=(127&n)<<s;if(On(t,a),n<128)return e(r>>>0,i>>>0);throw _n()}function Sn(t){let e=0,n=t.g;const r=n+10,i=t.h;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return On(t,n),!!(127&e)}throw _n()}function kn(t){const e=t.h;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw _n();return On(t,n),i}function Tn(t){return kn(t)>>>0}function Cn(t){var e=t.h;const n=t.g,r=e[n],i=e[n+1],s=e[n+2];return e=e[n+3],On(t,t.g+4),(r<<0|i<<8|s<<16|e<<24)>>>0}function An(t){var e=Cn(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:t*(1/0):0==n?1401298464324817e-60*t*e:t*Math.pow(2,n-150)*(e+8388608)}function xn(t){return kn(t)}function Pn(t,e,{ba:n=!1}={}){t.ba=n,e&&(e=wn(e),t.h=e.buffer,t.m=e.N,t.j=0,t.l=t.h.length,t.g=t.j)}function On(t,e){if(t.g=e,e>t.l)throw bn(t.l,e)}function Fn(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw bn(e,t.l-n);return t.g=r,n}function In(t,e){if(0==e)return j();var n=Fn(t,e);return t.ba&&t.m?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?new Uint8Array(0):It?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?j():new B(n,N)}ve.prototype.toJSON=void 0,ve.prototype.Ia=lt;var Rn=[];function Mn(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=Tn(t.g);if(e=n>>>3,!((n&=7)>=0&&n<=5))throw yn(n,t.l);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function Ln(t){switch(t.h){case 0:0!=t.h?Ln(t):Sn(t.g);break;case 1:On(t=t.g,t.g+8);break;case 2:if(2!=t.h)Ln(t);else{var e=Tn(t.g);On(t=t.g,t.g+e)}break;case 5:On(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!Mn(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}Ln(t)}break;default:throw yn(t.h,t.l)}}function Nn(t,e,n){const r=t.g.l,i=Tn(t.g),s=t.g.g+i;let o=s-r;if(o<=0&&(t.g.l=s,n(e,t,void 0,void 0,void 0),o=s-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=s,t.g.l=r,e}function jn(t){var e=Tn(t.g),n=Fn(t=t.g,e);if(t=t.h,a){var c,u=t;(c=o)||(c=o=new TextDecoder("utf-8",{fatal:!0})),e=n+e,u=0===n&&e===u.length?u:u.subarray(n,e);try{var h=c.decode(u)}catch(t){if(void 0===s){try{c.decode(new Uint8Array([128]))}catch(t){}try{c.decode(new Uint8Array([97])),s=!0}catch(t){s=!1}}throw!s&&(o=void 0),t}}else{e=(h=n)+e,n=[];let s,o=null;for(;h<e;){var l=t[h++];l<128?n.push(l):l<224?h>=e?r():(s=t[h++],l<194||128!=(192&s)?(h--,r()):n.push((31&l)<<6|63&s)):l<240?h>=e-1?r():(s=t[h++],128!=(192&s)||224===l&&s<160||237===l&&s>=160||128!=(192&(c=t[h++]))?(h--,r()):n.push((15&l)<<12|(63&s)<<6|63&c)):l<=244?h>=e-2?r():(s=t[h++],128!=(192&s)||s-144+(l<<28)>>30!=0||128!=(192&(c=t[h++]))||128!=(192&(u=t[h++]))?(h--,r()):(l=(7&l)<<18|(63&s)<<12|(63&c)<<6|63&u,l-=65536,n.push(55296+(l>>10&1023),56320+(1023&l)))):r(),n.length>=8192&&(o=i(o,n),n.length=0)}h=i(o,n)}return h}function Dn(t){const e=Tn(t.g);return In(t.g,e)}function Bn(t,e,n){var r=Tn(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var Un=[];function Vn(t){return t}let Gn;function Wn(t,e,n){e.g?e.m(t,e.g,e.h,n):e.m(t,e.h,n)}var zn=class{constructor(t,e){this.u=Fe(t,e)}toJSON(){const t=!Gn;try{return t&&(Gn=Pe),qn(this)}finally{t&&(Gn=void 0)}}l(){var t=go;return t.g?t.l(this,t.g,t.h,!0):t.l(this,t.h,t.defaultValue,!0)}clone(){const t=this.u;return new this.constructor(Re(t,0|t[Q],!1))}N(){return!!(2&(0|this.u[Q]))}};function qn(t){var e=t.u;{e=(t=Gn(e))!==e;let u=t.length;if(u){var n=t[u-1],r=dt(n);r?u--:n=void 0;var i=t;if(r){t:{var s,o=n,a=!1;if(o)for(let t in o)isNaN(+t)?(s??={})[t]=o[t]:(r=o[t],Array.isArray(r)&&(gt(r)||ft(r)&&0===r.size)&&(r=null),null==r&&(a=!0),null!=r&&((s??={})[t]=r));if(a||(s=o),s)for(let t in s){a=s;break t}a=null}o=null==a?null!=n:a!==n}for(;u>0&&(null==(s=i[u-1])||gt(s)||ft(s)&&0===s.size);u--)var c=!0;(i!==t||o||c)&&(e?(c||o||a)&&(i.length=u):i=Array.prototype.slice.call(i,0,u),a&&i.push(a)),c=i}else c=t}return c}function Hn(t){return t?/^\d+$/.test(t)?(Wt(t),new $n(Mt,Lt)):null:Xn||=new $n(0,0)}zn.prototype.W=ht,zn.prototype.toString=function(){try{return Gn=Vn,qn(this).toString()}finally{Gn=void 0}};var $n=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Xn;function Kn(t){return t?/^-?\d+$/.test(t)?(Wt(t),new Yn(Mt,Lt)):null:Jn||=new Yn(0,0)}var Yn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Jn;function Zn(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Qn(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function tr(t,e){if(e>=0)Qn(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function er(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function nr(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function rr(t,e,n){Qn(t.g,8*e+n)}function ir(t,e){return rr(t,e,2),e=t.g.end(),nr(t,e),e.push(t.h),e}function sr(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function or(t,e,n){rr(t,e,2),Qn(t.g,n.length),nr(t,t.g.end()),nr(t,n)}function ar(t,e,n,r){null!=n&&(e=ir(t,e),r(n,t),sr(t,e))}function cr(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var ur=cr(),hr=cr(),lr=cr(),fr=cr(),dr=cr(),pr=cr(),gr=cr(),mr=cr(),vr=cr(),yr=class{constructor(t,e,n){this.g=t,this.h=e,t=ur,this.l=!!t&&n===t||!1}};function _r(t,e){return new yr(t,e,ur)}function br(t,e,n,r,i){ar(t,n,Fr(e,r),i)}const wr=_r((function(t,e,n,r,i){return 2===t.h&&(Nn(t,Qe(e,r,n),i),!0)}),br),Er=_r((function(t,e,n,r,i){return 2===t.h&&(Nn(t,Qe(e,r,n,!0),i),!0)}),br);var Sr=Symbol(),kr=Symbol(),Tr=Symbol(),Cr=Symbol();let Ar,xr;function Pr(t,e,n,r){var i=r[t];if(i)return i;(i={}).Pa=r,i.V=function(t){switch(typeof t){case"boolean":return Ee||=[0,void 0,!0];case"number":return t>0?void 0:0===t?Se||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(r[0]);var s=r[1];let o=1;s&&s.constructor===Object&&(i.ga=s,"function"==typeof(s=r[++o])&&(i.la=!0,Ar??=s,xr??=r[o+1],s=r[o+=2]));const a={};for(;s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var c=0;c<s.length;c++)a[s[c]]=s;s=r[++o]}for(c=1;void 0!==s;){let t;"number"==typeof s&&(c+=s,s=r[++o]);var u=void 0;if(s instanceof yr?t=s:(t=wr,o--),t?.l){s=r[++o],u=r;var h=o;"function"==typeof s&&(s=s(),u[h]=s),u=s}for(h=c+1,"number"==typeof(s=r[++o])&&s<0&&(h-=s,s=r[++o]);c<h;c++){const r=a[c];u?n(i,c,t,u,r):e(i,c,t,r)}}return r[t]=i}function Or(t){return Array.isArray(t)?t[0]instanceof yr?t:[Er,t]:[t,void 0]}function Fr(t,e){return t instanceof zn?t.u:Array.isArray(t)?Oe(t,e,!1):void 0}function Ir(t,e,n,r){const i=n.g;t[e]=r?(t,e,n)=>i(t,e,n,r):i}function Rr(t,e,n,r,i){const s=n.g;let o,a;t[e]=(t,e,n)=>s(t,e,n,a||=Pr(kr,Ir,Rr,r).V,o||=Mr(r),i)}function Mr(t){let e=t[Tr];if(null!=e)return e;const n=Pr(kr,Ir,Rr,t);return e=n.la?(t,e)=>Ar(t,e,n):(t,e)=>{const r=0|t[Q];for(;Mn(e)&&4!=e.h;){var i=e.m,s=n[i];if(null==s){var o=n.ga;o&&(o=o[i])&&null!=(o=Lr(o))&&(s=n[i]=o)}null!=s&&s(e,t,i)||(i=(s=e).l,Ln(s),s.fa?s=void 0:(o=s.g.g-i,s.g.g=i,s=In(s.g,o)),i=t,s&&((o=i[Z])?o.push(s):i[Z]=[s]))}return 16384&r&&it(t),!0},t[Tr]=e}function Lr(t){const e=(t=Or(t))[0].g;if(t=t[1]){const n=Mr(t),r=Pr(kr,Ir,Rr,t).V;return(t,i,s)=>e(t,i,s,r,n)}return e}function Nr(t,e,n){t[e]=n.h}function jr(t,e,n,r){let i,s;const o=n.h;t[e]=(t,e,n)=>o(t,e,n,s||=Pr(Sr,Nr,jr,r).V,i||=Dr(r))}function Dr(t){let e=t[Cr];if(!e){const n=Pr(Sr,Nr,jr,t);e=(t,e)=>Br(t,e,n),t[Cr]=e}return e}function Br(t,e,n){for(var r=0|t[Q],i=512&r?0:-1,s=t.length,o=512&r?1:0,a=s+(256&r?-1:0);o<a;o++){const r=t[o];if(null==r)continue;const s=o-i,a=Ur(n,s);a&&a(e,r,s)}if(256&r){r=t[s-1];for(const t in r)i=+t,Number.isNaN(i)||null!=(s=r[i])&&(a=Ur(n,i))&&a(e,s,i)}if(t=_t(t))for(nr(e,e.g.end()),n=0;n<t.length;n++)nr(e,D(t[n])||new Uint8Array(0))}function Ur(t,e){var n=t[e];if(n)return n;if((n=t.ga)&&(n=n[e])){var r=(n=Or(n))[0].h;if(n=n[1]){const e=Dr(n),i=Pr(Sr,Nr,jr,n).V;n=t.la?xr(i,e):(t,n,s)=>r(t,n,s,i,e)}else n=r;return t[e]=n}}function Vr(t,e){if(Array.isArray(e)){var n=0|e[Q];if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),rt(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}function Gr(t,e,n){return new yr(t,e,n)}function Wr(t,e,n){return new yr(t,e,n)}function zr(t,e,n){De(t,0|t[Q],e,n)}var qr=_r((function(t,e,n,r,i){return 2===t.h&&(t=Nn(t,Oe([void 0,void 0],r,!0),i),vt(r=0|e[Q]),(i=Ne(e,r,n))instanceof ve?0!=(2&i.L)?((i=i.X()).push(t),De(e,r,n,i)):i.Na(t):Array.isArray(i)?(2&(0|i[Q])&&De(e,r,n,i=He(i)),i.push(t)):De(e,r,n,[t]),!0)}),(function(t,e,n,r,i){if(e instanceof ve)e.forEach(((e,s)=>{ar(t,n,Oe([s,e],r,!1),i)}));else if(Array.isArray(e))for(let s=0;s<e.length;s++){const o=e[s];Array.isArray(o)&&ar(t,n,Oe(o,r,!1),i)}}));function Hr(t,e,n){if(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(qt(64,t));if(Qt(t)){if("string"===e)return ie(t);if("number"===e)return re(t)}}(e),null!=e&&("string"==typeof e&&Kn(e),null!=e))switch(rr(t,n,0),typeof e){case"number":t=t.g,jt(e),Zn(t,Mt,Lt);break;case"bigint":n=BigInt.asUintN(64,e),n=new Yn(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Zn(t.g,n.h,n.g);break;default:n=Kn(e),Zn(t.g,n.h,n.g)}}function $r(t,e,n){null!=(e=te(e))&&null!=e&&(rr(t,n,0),tr(t.g,e))}function Xr(t,e,n){null!=(e=Jt(e))&&(rr(t,n,0),t.g.g.push(e?1:0))}function Kr(t,e,n){null!=(e=ce(e))&&or(t,n,h(e))}function Yr(t,e,n,r,i){ar(t,n,Fr(e,r),i)}function Jr(t,e,n){null!=(e=null==e||"string"==typeof e||L(e)||e instanceof B?e:void 0)&&or(t,n,wn(e).buffer)}function Zr(t,e,n){return(5===t.h||2===t.h)&&(e=Xe(e,0|e[Q],n,!1,!1),2==t.h?Bn(t,An,e):e.push(An(t.g)),!0)}var Qr=Gr((function(t,e,n){if(1!==t.h)return!1;var r=t.g;t=Cn(r);const i=Cn(r);r=2*(i>>31)+1;const s=i>>>20&2047;return t=4294967296*(1048575&i)+t,zr(e,n,2047==s?t?NaN:r*(1/0):0==s?5e-324*r*t:r*Math.pow(2,s-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=Yt(e))&&(rr(t,n,1),t=t.g,(n=Rt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),Mt=n.getUint32(0,!0),Lt=n.getUint32(4,!0),er(t,Mt),er(t,Lt))}),cr()),ti=Gr((function(t,e,n){return 5===t.h&&(zr(e,n,An(t.g)),!0)}),(function(t,e,n){null!=(e=Yt(e))&&(rr(t,n,5),t=t.g,Dt(e),er(t,Mt))}),gr),ei=Wr(Zr,(function(t,e,n){if(null!=(e=Vr(Yt,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(rr(r,i,5),r=r.g,Dt(s),er(r,Mt))}}),gr),ni=Wr(Zr,(function(t,e,n){if(null!=(e=Vr(Yt,e))&&e.length){rr(t,n,2),Qn(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Dt(e[r]),er(n,Mt)}}),gr),ri=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,En(t.g,Ut)),!0)}),Hr,pr),ii=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,0===(t=En(t.g,Ut))?void 0:t),!0)}),Hr,pr),si=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,En(t.g,Bt)),!0)}),(function(t,e,n){if(null!=(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Ht(64,t));if(Qt(t)){if("string"===e)return e=Kt(Number(t)),$t(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),ne(t)||(Wt(t),t=Vt(Mt,Lt))),t;if("number"===e)return(t=Kt(t))>=0&&$t(t)?t:function(t){if(t<0){jt(t);var e=Vt(Mt,Lt);return t=Number(e),$t(t)?t:e}return ne(e=String(t))?e:(jt(t),Bt(Mt,Lt))}(t)}}(e))&&("string"==typeof e&&Hn(e),null!=e))switch(rr(t,n,0),typeof e){case"number":t=t.g,jt(e),Zn(t,Mt,Lt);break;case"bigint":n=BigInt.asUintN(64,e),n=new $n(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Zn(t.g,n.h,n.g);break;default:n=Hn(e),Zn(t.g,n.h,n.g)}}),cr()),oi=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,kn(t.g)),!0)}),$r,fr),ai=Wr((function(t,e,n){return(0===t.h||2===t.h)&&(e=Xe(e,0|e[Q],n,!1,!1),2==t.h?Bn(t,kn,e):e.push(kn(t.g)),!0)}),(function(t,e,n){if(null!=(e=Vr(te,e))&&e.length){n=ir(t,n);for(let n=0;n<e.length;n++)tr(t.g,e[n]);sr(t,n)}}),fr),ci=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,0===(t=kn(t.g))?void 0:t),!0)}),$r,fr),ui=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,Sn(t.g)),!0)}),Xr,hr),hi=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,!1===(t=Sn(t.g))?void 0:t),!0)}),Xr,hr),li=Wr((function(t,e,n){return 2===t.h&&(t=jn(t),Xe(e,0|e[Q],n,!1).push(t),!0)}),(function(t,e,n){if(null!=(e=Vr(ce,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&or(r,i,h(s))}}),lr),fi=Gr((function(t,e,n){return 2===t.h&&(zr(e,n,""===(t=jn(t))?void 0:t),!0)}),Kr,lr),di=Gr((function(t,e,n){return 2===t.h&&(zr(e,n,jn(t)),!0)}),Kr,lr),pi=function(t,e,n=ur){return new yr(t,e,n)}((function(t,e,n,r,i){return 2===t.h&&(r=Oe(void 0,r,!0),Xe(e,0|e[Q],n,!0).push(r),Nn(t,r,i),!0)}),(function(t,e,n,r,i){if(Array.isArray(e))for(let s=0;s<e.length;s++)Yr(t,e[s],n,r,i)})),gi=_r((function(t,e,n,r,i,s){return 2===t.h&&(Je(e,0|e[Q],s,n),Nn(t,e=Qe(e,r,n),i),!0)}),Yr),mi=Gr((function(t,e,n){return 2===t.h&&(zr(e,n,Dn(t)),!0)}),Jr,mr),vi=Wr((function(t,e,n){return(0===t.h||2===t.h)&&(e=Xe(e,0|e[Q],n,!1,!1),2==t.h?Bn(t,Tn,e):e.push(Tn(t.g)),!0)}),(function(t,e,n){if(null!=(e=Vr(ee,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(rr(r,i,0),Qn(r.g,s))}}),dr),yi=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,0===(t=Tn(t.g))?void 0:t),!0)}),(function(t,e,n){null!=(e=ee(e))&&null!=e&&(rr(t,n,0),Qn(t.g,e))}),dr),_i=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,kn(t.g)),!0)}),(function(t,e,n){null!=(e=te(e))&&(e=parseInt(e,10),rr(t,n,0),tr(t.g,e))}),vr);class bi{constructor(t,e){this.h=t,this.g=e,this.l=en,this.m=sn,this.defaultValue=void 0}}function wi(t,e){return new bi(t,e)}function Ei(t,e){return(n,r)=>{if(Un.length){const t=Un.pop();t.o(r),Pn(t.g,n,r),n=t}else n=new class{constructor(t,e){if(Rn.length){const n=Rn.pop();Pn(n,t,e),t=n}else t=new class{constructor(t,e){this.h=null,this.m=!1,this.g=this.l=this.j=0,Pn(this,t,e)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.ba=!1}}(t,e);this.g=t,this.l=this.g.g,this.h=this.m=-1,this.o(e)}o({fa:t=!1}={}){this.fa=t}}(n,r);try{const r=new t,s=r.u;Mr(e)(s,n);var i=r}finally{n.g.clear(),n.m=-1,n.h=-1,Un.length<100&&Un.push(n)}return i}}function Si(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};Br(this.u,e,Pr(Sr,Nr,jr,t)),nr(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,i=r.length;let s=0;for(let t=0;t<i;t++){const e=r[t];n.set(e,s),s+=e.length}return e.l=[n],n}}var ki=class extends zn{constructor(t){super(t)}},Ti=[0,fi,Gr((function(t,e,n){return 2===t.h&&(zr(e,n,(t=Dn(t))===j()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof zn){const r=e.Ra;return void(r&&(e=r(e),null!=e&&or(t,n,wn(e).buffer)))}if(Array.isArray(e))return}Jr(t,e,n)}),mr)];let Ci,Ai=globalThis.trustedTypes;function xi(t){void 0===Ci&&(Ci=function(){let t=null;if(!Ai)return t;try{const e=t=>t;t=Ai.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}());var e=Ci;return new class{constructor(t){this.g=t}toString(){return this.g+""}}(e?e.createScriptURL(t):t)}function Pi(t,...e){if(0===e.length)return xi(t[0]);let n=t[0];for(let r=0;r<e.length;r++)n+=encodeURIComponent(e[r])+t[r+1];return xi(n)}var Oi=[0,oi,_i,ui,-1,ai,_i,-1],Fi=class extends zn{constructor(t){super(t)}},Ii=[0,ui,di,ui,_i,-1,Wr((function(t,e,n){return(0===t.h||2===t.h)&&(e=Xe(e,0|e[Q],n,!1,!1),2==t.h?Bn(t,xn,e):e.push(kn(t.g)),!0)}),(function(t,e,n){if(null!=(e=Vr(te,e))&&e.length){n=ir(t,n);for(let n=0;n<e.length;n++)tr(t.g,e[n]);sr(t,n)}}),vr),di,-1,[0,ui,-1],_i,ui,-1],Ri=[0,di,-2],Mi=class extends zn{constructor(t){super(t)}},Li=[0],Ni=[0,oi,ui,1,ui,-3],ji=class extends zn{constructor(t){super(t,2)}},Di={};Di[336783863]=[0,di,ui,-1,oi,[0,[1,2,3,4,5,6,7,8],gi,Li,gi,Ii,gi,Ri,gi,Ni,gi,Oi,gi,[0,di,-2],gi,[0,di,_i],gi,[0,_i,di]],[0,di],ui,[0,[1,3],[2,4],gi,[0,ai],-1,gi,[0,li],-1,pi,[0,di,-1]],di];var Bi=[0,ii,-1,hi,-3,ii,ai,fi,ci,ii,-1,hi,ci,hi,-2,fi];function Ui(t,e){$e(t,2,ae(e),"")}function Vi(t,e){vn(t,3,e)}function Gi(t,e){vn(t,4,e)}var Wi=class extends zn{constructor(t){super(t,500)}o(t){return sn(this,0,7,t)}},zi=[-1,{}],qi=[0,di,1,zi],Hi=[0,di,li,zi];function $i(t,e){un(t,1,Wi,e)}function Xi(t,e){vn(t,10,e)}function Ki(t,e){vn(t,15,e)}var Yi=class extends zn{constructor(t){super(t,500)}o(t){return sn(this,0,1001,t)}},Ji=[-500,pi,[-500,fi,-1,li,-3,[-2,Di,ui],pi,Ti,ci,-1,qi,Hi,pi,[0,fi,hi],fi,Bi,ci,li,987,li],4,pi,[-500,di,-1,[-1,{}],998,di],pi,[-500,di,li,-1,[-2,{},ui],997,li,-1],ci,pi,[-500,di,li,zi,998,li],li,ci,qi,Hi,pi,[0,fi,-1,zi],li,-2,Bi,fi,-1,hi,[0,hi,yi],978,zi,pi,Ti];Yi.prototype.g=Si(Ji);var Zi=Ei(Yi,Ji),Qi=class extends zn{constructor(t){super(t)}},ts=class extends zn{constructor(t){super(t)}g(){return rn(this,Qi,1)}},es=[0,pi,[0,oi,ti,di,-1]],ns=Ei(ts,es),rs=class extends zn{constructor(t){super(t)}},is=class extends zn{constructor(t){super(t)}},ss=class extends zn{constructor(t){super(t)}h(){return en(this,rs,2)}g(){return rn(this,is,5)}},os=Ei(class extends zn{constructor(t){super(t)}},[0,li,ai,ni,[0,_i,[0,oi,-3],[0,ti,-3],[0,oi,-1,[0,pi,[0,oi,-2]]],pi,[0,ti,-1,di,ti]],di,-1,ri,pi,[0,oi,ti],li,ri]),as=class extends zn{constructor(t){super(t)}},cs=Ei(class extends zn{constructor(t){super(t)}},[0,pi,[0,ti,-4]]),us=class extends zn{constructor(t){super(t)}},hs=Ei(class extends zn{constructor(t){super(t)}},[0,pi,[0,ti,-4]]),ls=class extends zn{constructor(t){super(t)}},fs=[0,oi,-1,ni,_i],ds=class extends zn{constructor(t){super(t)}};ds.prototype.g=Si([0,ti,-4,ri]);var ps=class extends zn{constructor(t){super(t)}},gs=Ei(class extends zn{constructor(t){super(t)}},[0,pi,[0,1,oi,di,es],ri]),ms=class extends zn{constructor(t){super(t)}},vs=class extends zn{constructor(t){super(t)}oa(){const t=Ue(this);return null==t?j():t}},ys=class extends zn{constructor(t){super(t)}},_s=[1,2],bs=Ei(class extends zn{constructor(t){super(t)}},[0,pi,[0,_s,gi,[0,ni],gi,[0,mi],oi,di],ri]),ws=class extends zn{constructor(t){super(t)}},Es=[0,di,oi,ti,li,-1],Ss=class extends zn{constructor(t){super(t)}},ks=[0,ui,-1],Ts=class extends zn{constructor(t){super(t)}},Cs=[1,2,3,4,5],As=class extends zn{constructor(t){super(t)}g(){return null!=Ue(this)}h(){return null!=ln(this,2)}},xs=class extends zn{constructor(t){super(t)}g(){return Jt(Le(this,2))??!1}},Ps=[0,mi,di,[0,oi,ri,-1],[0,si,ri]],Os=[0,Ps,ui,[0,Cs,gi,Ni,gi,Ii,gi,Oi,gi,Li,gi,Ri],_i],Fs=class extends zn{constructor(t){super(t)}},Is=[0,Os,ti,-1,oi],Rs=wi(502141897,Fs);Di[502141897]=Is;var Ms=Ei(class extends zn{constructor(t){super(t)}},[0,[0,_i,-1,ei,vi],fs]),Ls=class extends zn{constructor(t){super(t)}},Ns=class extends zn{constructor(t){super(t)}},js=[0,Os,ti,[0,Os],ui],Ds=[0,Os,Is,js,ti,[0,[0,Ps]]],Bs=wi(508968150,Ns);Di[508968150]=Ds,Di[508968149]=js;var Us=class extends zn{constructor(t){super(t)}},Vs=wi(513916220,Us);Di[513916220]=[0,Os,Ds,oi];var Gs=class extends zn{constructor(t){super(t)}h(){return en(this,ws,2)}g(){je(this,2)}},Ws=[0,Os,Es];Di[478825465]=Ws;var zs=class extends zn{constructor(t){super(t)}},qs=class extends zn{constructor(t){super(t)}},Hs=class extends zn{constructor(t){super(t)}},$s=class extends zn{constructor(t){super(t)}},Xs=class extends zn{constructor(t){super(t)}},Ks=[0,Os,[0,Os],Ws,-1],Ys=[0,Os,ti,oi],Js=[0,Os,ti],Zs=[0,Os,Ys,Js,ti],Qs=wi(479097054,Xs);Di[479097054]=[0,Os,Zs,Ks],Di[463370452]=Ks,Di[464864288]=Ys;var to=wi(462713202,$s);Di[462713202]=Zs,Di[474472470]=Js;var eo=class extends zn{constructor(t){super(t)}},no=class extends zn{constructor(t){super(t)}},ro=class extends zn{constructor(t){super(t)}},io=class extends zn{constructor(t){super(t)}},so=[0,Os,ti,-1,oi],oo=[0,Os,ti,ui];io.prototype.g=Si([0,Os,Js,[0,Os],Is,js,so,oo]);var ao=class extends zn{constructor(t){super(t)}},co=wi(456383383,ao);Di[456383383]=[0,Os,Es];var uo=class extends zn{constructor(t){super(t)}},ho=wi(476348187,uo);Di[476348187]=[0,Os,ks];var lo=class extends zn{constructor(t){super(t)}},fo=class extends zn{constructor(t){super(t)}},po=[0,_i,-1],go=wi(458105876,class extends zn{constructor(t){super(t)}g(){var t=this.u;const e=0|t[Q],n=2&e;return t=function(t,e,n){var r=fo;const i=2&e;let s=!1;if(null==n){if(i)return ke();n=[]}else if(n.constructor===ve){if(0==(2&n.L)||i)return n;n=n.X()}else Array.isArray(n)?s=!!(2&(0|n[Q])):n=[];if(i){if(!n.length)return ke();s||(s=!0,it(n))}else s&&(s=!1,n=He(n));return s||(64&(0|n[Q])?n[Q]&=-33:32&e&&nt(n,32)),De(t,e,2,r=new ve(n,r,he,void 0)),r}(t,e,Ne(t,e,2)),!n&&fo&&(t.ra=!0),t}});Di[458105876]=[0,po,qr,[!0,ri,[0,di,-1,li]]];var mo=class extends zn{constructor(t){super(t)}},vo=wi(458105758,mo);Di[458105758]=[0,Os,di,po];var yo=class extends zn{constructor(t){super(t)}},_o=wi(443442058,yo);Di[443442058]=[0,Os,di,oi,ti,li,-1,ui,ti],Di[514774813]=so;var bo=class extends zn{constructor(t){super(t)}},wo=wi(516587230,bo);function Eo(t,e){return e=e?e.clone():new ws,void 0!==t.displayNamesLocale?je(e,1,ae(t.displayNamesLocale)):void 0===t.displayNamesLocale&&je(e,1),void 0!==t.maxResults?pn(e,2,t.maxResults):"maxResults"in t&&je(e,2),void 0!==t.scoreThreshold?gn(e,3,t.scoreThreshold):"scoreThreshold"in t&&je(e,3),void 0!==t.categoryAllowlist?mn(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&je(e,4),void 0!==t.categoryDenylist?mn(e,5,t.categoryDenylist):"categoryDenylist"in t&&je(e,5),e}function So(t,e=-1,n=""){return{categories:t.map((t=>({index:hn(t,1)??0??-1,score:fn(t,2)??0,categoryName:ln(t,3)??""??"",displayName:ln(t,4)??""??""}))),headIndex:e,headName:n}}function ko(t){var e=Ge(t,3,Yt,Ve()),n=Ge(t,2,te,Ve()),r=Ge(t,1,ce,Ve()),i=Ge(t,9,ce,Ve());const s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:i[t]??""});if((e=en(t,ss,4)?.h())&&(s.boundingBox={originX:hn(e,1)??0,originY:hn(e,2)??0,width:hn(e,3)??0,height:hn(e,4)??0,angle:0}),en(t,ss,4)?.g().length)for(const e of en(t,ss,4).g())s.keypoints.push({x:Be(e,1)??0,y:Be(e,2)??0,score:Be(e,4)??0,label:ln(e,3)??""});return s}function To(t){const e=[];for(const n of rn(t,us,1))e.push({x:fn(n,1)??0,y:fn(n,2)??0,z:fn(n,3)??0,visibility:fn(n,4)??0});return e}function Co(t){const e=[];for(const n of rn(t,as,1))e.push({x:fn(n,1)??0,y:fn(n,2)??0,z:fn(n,3)??0,visibility:fn(n,4)??0});return e}function Ao(t){return Array.from(t,(t=>t>127?t-256:t))}function xo(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s],r+=t[s]*t[s],i+=e[s]*e[s];if(r<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let Po;Di[516587230]=[0,Os,so,oo,ti],Di[518928384]=oo;const Oo=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function Fo(){if(void 0===Po)try{await WebAssembly.instantiate(Oo),Po=!0}catch{Po=!1}return Po}async function Io(t,e=Pi``){const n=await Fo()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Ro=class{};function Mo(){var t=navigator;return!("undefined"==typeof OffscreenCanvas||function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)&&!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Lo(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}function No(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function jo(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function Do(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[r,i]=No(e);return!t.l||r===t.i.canvas.width&&i===t.i.canvas.height||(t.i.canvas.width=r,t.i.canvas.height=i),[r,i]}function Bo(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function Uo(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function Vo(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}function Go(t,e){const n=en(t.baseOptions,As,1)||new As;"string"==typeof e?(je(n,2,ae(e)),je(n,1)):e instanceof Uint8Array&&(je(n,1,pt(e,!1)),je(n,2)),sn(t.baseOptions,0,1,n)}function Wo(t){try{const e=t.G.length;if(1===e)throw Error(t.G[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.G.map((t=>t.message)).join(", "))}finally{t.G=[]}}function zo(t,e){t.B=Math.max(t.B,e)}function qo(t,e){t.A=new Wi,Ui(t.A,"PassThroughCalculator"),Vi(t.A,"free_memory"),Gi(t.A,"free_memory_unused_out"),Xi(e,"free_memory"),$i(e,t.A)}function Ho(t,e){Vi(t.A,e),Gi(t.A,e+"_unused_out")}function $o(t){t.g.addBoolToStream(!0,"free_memory",t.B)}Ro.forVisionTasks=function(t){return Io("vision",t)},Ro.forTextTasks=function(t){return Io("text",t)},Ro.forGenAiExperimentalTasks=function(t){return Io("genai_experimental",t)},Ro.forGenAiTasks=function(t){return Io("genai",t)},Ro.forAudioTasks=function(t){return Io("audio",t)},Ro.isSimdSupported=function(){return Fo()};var Xo=class{constructor(t){this.g=t,this.G=[],this.B=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(en(this.baseOptions,As,1)?.g()||en(this.baseOptions,As,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=en(t.baseOptions,Ts,3);if(!n){var r=n=new Ts,i=new Mi;on(r,4,Cs,i)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new Fi,on(e,2,Cs,r)):(e=n,r=new Mi,on(e,4,Cs,r))),sn(t.baseOptions,0,3,n)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)})).then((t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),Go(this,"/model.dat"),this.m(),this.I()}));if(e.modelAssetBuffer instanceof Uint8Array)Go(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){const e=[];for(var n=0;;){const{done:r,value:i}=await t.read();if(r)break;e.push(i),n+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(n),n=0;for(const r of e)t.set(r,n),n+=r.length;return t}(e.modelAssetBuffer).then((t=>{Go(this,t),this.m(),this.I()}))}return this.m(),this.I(),Promise.resolve()}I(){}da(){let t;if(this.g.da((e=>{t=Zi(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.G.push(Error(e))})),this.g.La(),this.g.setGraph(t,e),this.A=void 0,Wo(this)}finishProcessing(){this.g.finishProcessing(),Wo(this)}close(){this.A=void 0,this.g.closeGraph()}};function Ko(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}Xo.prototype.close=Xo.prototype.close,function(t,e){t=t.split(".");var r,i=n;t[0]in i||void 0===i.execScript||i.execScript("var "+t[0]);for(;t.length&&(r=t.shift());)t.length||void 0===e?i=i[r]&&i[r]!==Object.prototype[r]?i[r]:i[r]={}:i[r]=e}("TaskRunner",Xo);class Yo{constructor(t,e,n,r){this.g=t,this.h=e,this.m=n,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Jo(t,e,n){const r=t.g;if(n=Ko(r.createShader(n),"Failed to create WebGL shader"),r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(t.h,n),n}function Zo(t,e){const n=t.g,r=Ko(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const i=Ko(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.O),n.vertexAttribPointer(t.O,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const s=Ko(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.I),n.vertexAttribPointer(t.I,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new Yo(n,r,i,s)}function Qo(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function ta(t,e,n,r){return Qo(t,e),t.h||(t.m(),t.C()),n?(t.s||(t.s=Zo(t,!0)),n=t.s):(t.v||(t.v=Zo(t,!1)),n=t.v),e.useProgram(t.h),n.bind(),t.l(),t=r(),n.g.bindVertexArray(null),t}function ea(t,e,n){return Qo(t,e),t=Ko(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function na(t,e,n){Qo(t,e),t.A||(t.A=Ko(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.A),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function ra(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var ia=class{G(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}m(){const t=this.g;if(this.h=Ko(t.createProgram(),"Failed to create WebGL program"),this.aa=Jo(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.Z=Jo(this,this.G(),t.FRAGMENT_SHADER),t.linkProgram(this.h),!t.getProgramParameter(this.h,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.h)}`);this.O=t.getAttribLocation(this.h,"aVertex"),this.I=t.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.aa),t.deleteShader(this.Z)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}},sa=class extends ia{G(){return"\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n "}C(){const t=this.g;t.activeTexture(t.TEXTURE1),this.B=ea(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.j=ea(this,t,t.NEAREST)}m(){super.m();const t=this.g;this.K=Ko(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.T=Ko(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.J=Ko(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.J,0),t.uniform1i(this.K,1),t.uniform1i(this.T,2)}close(){this.B&&this.g.deleteTexture(this.B),this.j&&this.g.deleteTexture(this.j),super.close()}},oa=class extends ia{G(){return"\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n "}C(){const t=this.g;t.activeTexture(t.TEXTURE1),this.j=ea(this,t),t.activeTexture(t.TEXTURE2),this.B=ea(this,t)}m(){super.m();const t=this.g;this.J=Ko(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.K=Ko(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.H=Ko(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.H,0),t.uniform1i(this.J,1),t.uniform1i(this.K,2)}close(){this.j&&this.g.deleteTexture(this.j),this.B&&this.g.deleteTexture(this.B),super.close()}};function aa(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function ca(t){var e=aa(t,1);if(!e){if(e=aa(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const r=ha(t);var n=fa(t);if(na(n,r,ua(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(t.width*t.height*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.FLOAT,n);for(let t=0,r=0;t<e.length;++t,r+=4)e[t]=n[r]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function ua(t){let e=aa(t,2);if(!e){const n=ha(t);e=da(t);const r=ca(t),i=la(t);n.texImage2D(n.TEXTURE_2D,0,i,t.width,t.height,0,n.RED,n.FLOAT,r),pa(t)}return e}function ha(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ko(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function la(t){if(t=ha(t),!ga)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))ga=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");ga=t.R16F}return ga}function fa(t){return t.l||(t.l=new ia),t.l}function da(t){const e=ha(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=aa(t,2);return n||(n=ea(fa(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(n),t.j=!0),e.bindTexture(e.TEXTURE_2D,n),n}function pa(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var ga,ma=class{constructor(t,e,n,r,i,s,o){this.g=t,this.m=e,this.j=n,this.canvas=r,this.l=i,this.width=s,this.height=o,this.j&&0==--va&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Fa(){return!!aa(this,0)}ja(){return!!aa(this,1)}P(){return!!aa(this,2)}ia(){return(t=aa(this,0))||(t=ca(this),t=new Uint8Array(t.map((t=>255*t))),this.g.push(t)),t;var t}ha(){return ca(this)}M(){return ua(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=ha(this),e=fa(this);t.activeTexture(t.TEXTURE1),n=ea(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,n);const r=la(this);t.texImage2D(t.TEXTURE_2D,0,r,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),na(e,t,n),ta(e,t,!1,(()=>{da(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),pa(this)})),ra(e),pa(this)}}t.push(n)}return new ma(t,this.m,this.P(),this.canvas,this.l,this.width,this.height)}close(){this.j&&ha(this).deleteTexture(aa(this,2)),va=-1}};ma.prototype.close=ma.prototype.close,ma.prototype.clone=ma.prototype.clone,ma.prototype.getAsWebGLTexture=ma.prototype.M,ma.prototype.getAsFloat32Array=ma.prototype.ha,ma.prototype.getAsUint8Array=ma.prototype.ia,ma.prototype.hasWebGLTexture=ma.prototype.P,ma.prototype.hasFloat32Array=ma.prototype.ja,ma.prototype.hasUint8Array=ma.prototype.Fa;var va=250;const ya={color:"white",lineWidth:4,radius:6};function _a(t){return{...ya,fillColor:(t=t||{}).color,...t}}function ba(t,e){return t instanceof Function?t(e):t}function wa(t,e,n){return Math.max(Math.min(e,n),Math.min(Math.max(e,n),t))}function Ea(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Sa(t){if(!t.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.j}function ka(t,e,n){if(e.P())n(e.M());else{const r=e.ja()?e.ha():e.ia();t.m=t.m??new ia;const i=Sa(t);n((t=new ma([r],e.m,!1,i.canvas,t.m,e.width,e.height)).M()),t.close()}}function Ta(t,e,n,r){const i=function(t){return t.g||(t.g=new sa),t.g}(t),s=Sa(t),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;ta(i,s,!0,(()=>{!function(t,e,n,r){const i=t.g;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.B),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),t.H&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(const[r,i]of t){t=r;const s=i;var n=e.next();if(n.done)return!1;const[o,a]=n.value;if(n=a,t!==o||s[0]!==n[0]||s[1]!==n[1]||s[2]!==n[2]||s[3]!==n[3])return!1}return!!e.next().done}(t.H,r))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j);else{t.H=r;const e=Array(1024).fill(0);r.forEach(((t,n)=>{if(4!==t.length)throw Error(`Color at index ${n} is not a four-channel value.`);e[4*n]=t[0],e[4*n+1]=t[1],e[4*n+2]=t[2],e[4*n+3]=t[3]})),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,r),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);const t=i.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)}))}function Ca(t,e,n,r){const i=Sa(t),s=function(t){return t.h||(t.h=new oa),t.h}(t),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n,a=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;ta(s,i,!0,(()=>{var t=s.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s.j),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s.B),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),i.bindTexture(i.TEXTURE_2D,null),(t=s.g).activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)}))}var Aa=class{constructor(t,e){t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.j=e):this.j=t}ya(t,e){if(t){var n=Ea(this);e=_a(e),n.save();var r=n.canvas,i=0;for(const s of t)n.fillStyle=ba(e.fillColor,{index:i,from:s}),n.strokeStyle=ba(e.color,{index:i,from:s}),n.lineWidth=ba(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*r.width,s.y*r.height,ba(e.radius,{index:i,from:s}),0,2*Math.PI),n.fill(t),n.stroke(t),++i;n.restore()}}xa(t,e,n){if(t&&e){var r=Ea(this);n=_a(n),r.save();var i=r.canvas,s=0;for(const o of e){r.beginPath(),e=t[o.start];const a=t[o.end];e&&a&&(r.strokeStyle=ba(n.color,{index:s,from:e,to:a}),r.lineWidth=ba(n.lineWidth,{index:s,from:e,to:a}),r.moveTo(e.x*i.width,e.y*i.height),r.lineTo(a.x*i.width,a.y*i.height)),++s,r.stroke()}r.restore()}}ua(t,e){const n=Ea(this);e=_a(e),n.save(),n.beginPath(),n.lineWidth=ba(e.lineWidth,{}),n.strokeStyle=ba(e.color,{}),n.fillStyle=ba(e.fillColor,{}),n.moveTo(t.originX,t.originY),n.lineTo(t.originX+t.width,t.originY),n.lineTo(t.originX+t.width,t.originY+t.height),n.lineTo(t.originX,t.originY+t.height),n.lineTo(t.originX,t.originY),n.stroke(),n.fill(),n.restore()}va(t,e,n=[0,0,0,255]){this.l?function(t,e,n,r){const i=Sa(t);ka(t,e,(e=>{Ta(t,e,n,r),(e=Ea(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,n,e):Ta(this,t.M(),n,e)}wa(t,e,n){this.l?function(t,e,n,r){const i=Sa(t);ka(t,e,(e=>{Ca(t,e,n,r),(e=Ea(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,e,n):Ca(this,t.M(),e,n)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function xa(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Pa(t){var e=xa(t,0);if(!e){e=Fa(t);const n=Ia(t),r=new Uint8Array(t.width*t.height*4);na(n,e,Oa(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),ra(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function Oa(t){let e=xa(t,2);if(!e){const n=Fa(t);e=Ra(t);const r=xa(t,1)||Pa(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Ma(t)}return e}function Fa(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ko(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Ia(t){return t.l||(t.l=new ia),t.l}function Ra(t){const e=Fa(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=xa(t,2);return n||(n=ea(Ia(t),e),t.g.push(n),t.m=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Ma(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function La(t){const e=Fa(t);return ta(Ia(t),e,!0,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const r=n.width,i=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=r,n.height=i,t}(t,(()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))))}Aa.prototype.close=Aa.prototype.close,Aa.prototype.drawConfidenceMask=Aa.prototype.wa,Aa.prototype.drawCategoryMask=Aa.prototype.va,Aa.prototype.drawBoundingBox=Aa.prototype.ua,Aa.prototype.drawConnectors=Aa.prototype.xa,Aa.prototype.drawLandmarks=Aa.prototype.ya,Aa.lerp=function(t,e,n,r,i){return wa(r*(1-(t-e)/(n-e))+i*(1-(n-t)/(n-e)),r,i)},Aa.clamp=wa;var Na=class{constructor(t,e,n,r,i,s,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=i,this.width=s,this.height=o,(this.j||this.m)&&0==--ja&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ea(){return!!xa(this,0)}ka(){return!!xa(this,1)}P(){return!!xa(this,2)}Ca(){return Pa(this)}Ba(){var t=xa(this,1);return t||(Oa(this),Ra(this),t=La(this),Ma(this),this.g.push(t),this.j=!0),t}M(){return Oa(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const t=Fa(this),e=Ia(this);t.activeTexture(t.TEXTURE1),n=ea(e,t),t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),na(e,t,n),ta(e,t,!1,(()=>{Ra(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Ma(this)})),ra(e),Ma(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Oa(this),Ra(this),n=La(this),Ma(this)}t.push(n)}return new Na(t,this.ka(),this.P(),this.canvas,this.l,this.width,this.height)}close(){this.j&&xa(this,1).close(),this.m&&Fa(this).deleteTexture(xa(this,2)),ja=-1}};Na.prototype.close=Na.prototype.close,Na.prototype.clone=Na.prototype.clone,Na.prototype.getAsWebGLTexture=Na.prototype.M,Na.prototype.getAsImageBitmap=Na.prototype.Ba,Na.prototype.getAsImageData=Na.prototype.Ca,Na.prototype.hasWebGLTexture=Na.prototype.P,Na.prototype.hasImageBitmap=Na.prototype.ka,Na.prototype.hasImageData=Na.prototype.Ea;var ja=250;function Da(...t){return t.map((([t,e])=>({start:t,end:e})))}const Ba=function(t){return class extends t{La(){this.i._registerModelResourcesGraphService()}}}((Ua=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:Mo()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),jo(this,r||"input_audio",(r=>{jo(this,i=i||"audio_header",(i=>{this.i._configureAudio(r,i,t,e??0,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}da(t){Uo(this,"__graph_config__",(e=>{t(e)})),jo(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const s=4*t.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(t,this.g/4),jo(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){jo(this,e,(e=>{const[r,i]=Do(this,t,e);this.i._addBoundTextureToStream(e,r,i,n)}))}addBoolToStream(t,e,n){jo(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){jo(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){jo(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){jo(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){jo(this,e,(e=>{this.i._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){jo(this,e,(e=>{jo(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){jo(this,e,(e=>{Bo(this,Object.keys(t),(r=>{Bo(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){jo(this,n,(n=>{jo(this,e,(e=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,n,r),this.i._free(i)}))}))}addEmptyPacketToStream(t,e){jo(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(r,e);this.i._addBoolVectorToInputStream(r,e,n)}))}addDoubleVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(r,e);this.i._addDoubleVectorToInputStream(r,e,n)}))}addFloatVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(r,e);this.i._addFloatVectorToInputStream(r,e,n)}))}addIntVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(r,e);this.i._addIntVectorToInputStream(r,e,n)}))}addUintVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(r,e);this.i._addUintVectorToInputStream(r,e,n)}))}addStringVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const e of t)jo(this,e,(t=>{this.i._addStringVectorEntry(r,t)}));this.i._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){jo(this,e,(e=>{jo(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){jo(this,n,(n=>{jo(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}addBoolVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputSidePacket(n,e)}))}addUintVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(n,e);this.i._addUintVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)jo(this,e,(t=>{this.i._addStringVectorEntry(n,t)}));this.i._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachUintListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachUintListener(t)}))}attachUintVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachUintVectorListener(t)}))}attachDoubleListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Uo(this,t,e),jo(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Vo(this,t,e),jo(this,t,(t=>{this.i._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Uo(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),jo(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Ua{get ea(){return this.i}qa(t,e,n){jo(this,e,(e=>{const[r,i]=Do(this,t,e);this.ea._addBoundTextureAsImageToStream(e,r,i,n)}))}U(t,e){Uo(this,t,e),jo(this,t,(t=>{this.ea._attachImageListener(t)}))}ca(t,e){Vo(this,t,e),jo(this,t,(t=>{this.ea._attachImageVectorListener(t)}))}}));var Ua,Va=class extends Ba{};async function Ga(t,e,n){return async function(t,e,n,r){return async function(t,e,n,r){return t=await(async(t,e,n,r,i)=>{if(e&&await Lo(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await Lo(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,r)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&t.endsWith(".data")?n.assetBinaryPath.toString():t}),await t.o(r),t}(t,e,n,r)}(t,n.canvas??(Mo()?void 0:document.createElement("canvas")),e,n)}function Wa(t,e,n,r){if(t.T){const s=new ds;if(n?.regionOfInterest){if(!t.pa)throw Error("This task doesn't support region-of-interest.");var i=n.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(i.left<0||i.top<0||i.right>1||i.bottom>1)throw Error("Expected RectF values to be in [0,1].");gn(s,1,(i.left+i.right)/2),gn(s,2,(i.top+i.bottom)/2),gn(s,4,i.right-i.left),gn(s,3,i.bottom-i.top)}else gn(s,1,.5),gn(s,2,.5),gn(s,4,1),gn(s,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(gn(s,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){const[t,r]=No(e);n=fn(s,3)*r/t,i=fn(s,4)*t/r,gn(s,4,n),gn(s,3,i)}}t.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",t.T,r)}t.g.qa(e,t.aa,r??performance.now()),t.finishProcessing()}function za(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Wa(t,e,n,t.B+1)}function qa(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Wa(t,e,n,r)}function Ha(t,e,n,r){var i=e.data;const s=e.width,o=s*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error("Unsupported channel count: "+i.length/o);return t=new ma([i],n,!1,t.g.i.canvas,t.O,s,e),r?t.clone():t}var $a=class extends Xo{constructor(t,e,n,r){super(t),this.g=t,this.aa=e,this.T=n,this.pa=r,this.O=new ia}l(t,e=!0){if("runningMode"in t&&dn(this.baseOptions,2,!!t.runningMode&&"IMAGE"!==t.runningMode),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.O.close(),super.close()}};$a.prototype.close=$a.prototype.close;var Xa=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},sn(t=this.h=new Fs,0,1,e=new xs),gn(this.h,2,.5),gn(this.h,3,.3)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&gn(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&gn(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}D(t,e){return this.j={detections:[]},za(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},qa(this,t,n,e),this.j}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect_in"),Ki(t,"detections");const e=new ji;Wn(e,Rs,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect_in"),Gi(n,"DETECTIONS:detections"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=os(e),this.j.detections.push(ko(t));zo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Xa.prototype.detectForVideo=Xa.prototype.F,Xa.prototype.detect=Xa.prototype.D,Xa.prototype.setOptions=Xa.prototype.o,Xa.createFromModelPath=async function(t,e){return Ga(Xa,t,{baseOptions:{modelAssetPath:e}})},Xa.createFromModelBuffer=function(t,e){return Ga(Xa,t,{baseOptions:{modelAssetBuffer:e}})},Xa.createFromOptions=function(t,e){return Ga(Xa,t,e)};var Ka=Da([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),Ya=Da([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),Ja=Da([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Za=Da([474,475],[475,476],[476,477],[477,474]),Qa=Da([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),tc=Da([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),ec=Da([469,470],[470,471],[471,472],[472,469]),nc=Da([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),rc=[...Ka,...Ya,...Ja,...Qa,...tc,...nc],ic=Da([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function sc(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var oc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,sn(t=this.h=new Ns,0,1,e=new xs),this.v=new Ls,sn(this.h,0,3,this.v),this.s=new Fs,sn(this.h,0,2,this.s),pn(this.s,4,1),gn(this.s,2,.5),gn(this.v,2,.5),gn(this.h,4,.5)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"numFaces"in t&&pn(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&gn(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&gn(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&gn(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return sc(this),za(this,t,e),this.j}F(t,e,n){return sc(this),qa(this,t,n,e),this.j}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"face_landmarks");const e=new ji;Wn(e,Bs,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=hs(e),this.j.faceLandmarks.push(To(t));zo(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{zo(this,t)})),this.outputFaceBlendshapes&&(Ki(t,"blendshapes"),Gi(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=ns(e),this.j.faceBlendshapes.push(So(t.g()??[]));zo(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{zo(this,t)}))),this.outputFacialTransformationMatrixes&&(Ki(t,"face_geometry"),Gi(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=en(Ms(e),ls,2))&&this.j.facialTransformationMatrixes.push({rows:hn(t,1)??0??0,columns:hn(t,2)??0??0,data:Ge(t,3,Yt,Ve()).slice()??[]});zo(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{zo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};oc.prototype.detectForVideo=oc.prototype.F,oc.prototype.detect=oc.prototype.D,oc.prototype.setOptions=oc.prototype.o,oc.createFromModelPath=function(t,e){return Ga(oc,t,{baseOptions:{modelAssetPath:e}})},oc.createFromModelBuffer=function(t,e){return Ga(oc,t,{baseOptions:{modelAssetBuffer:e}})},oc.createFromOptions=function(t,e){return Ga(oc,t,e)},oc.FACE_LANDMARKS_LIPS=Ka,oc.FACE_LANDMARKS_LEFT_EYE=Ya,oc.FACE_LANDMARKS_LEFT_EYEBROW=Ja,oc.FACE_LANDMARKS_LEFT_IRIS=Za,oc.FACE_LANDMARKS_RIGHT_EYE=Qa,oc.FACE_LANDMARKS_RIGHT_EYEBROW=tc,oc.FACE_LANDMARKS_RIGHT_IRIS=ec,oc.FACE_LANDMARKS_FACE_OVAL=nc,oc.FACE_LANDMARKS_CONTOURS=rc,oc.FACE_LANDMARKS_TESSELATION=ic;var ac=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!0),sn(t=this.j=new Us,0,1,e=new xs)}get baseOptions(){return en(this.j,xs,1)}set baseOptions(t){sn(this.j,0,1,t)}o(t){return super.l(t)}Oa(t,e,n){const r="function"!=typeof e?e:{};if(this.h="function"==typeof e?e:n,za(this,t,r??{}),!this.h)return this.s}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"stylized_image");const e=new ji;Wn(e,Vs,this.j);const n=new Wi;Ui(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),$i(t,n),this.g.U("stylized_image",((t,e)=>{var n=!this.h,r=t.data,i=t.width;const s=i*(t=t.height);if(r instanceof Uint8Array)if(r.length===3*s){const e=new Uint8ClampedArray(4*s);for(let t=0;t<s;++t)e[4*t]=r[3*t],e[4*t+1]=r[3*t+1],e[4*t+2]=r[3*t+2],e[4*t+3]=255;r=new ImageData(e,i,t)}else{if(r.length!==4*s)throw Error("Unsupported channel count: "+r.length/s);r=new ImageData(new Uint8ClampedArray(r.buffer,r.byteOffset,r.length),i,t)}else if(!(r instanceof WebGLTexture))throw Error(`Unsupported format: ${r.constructor.name}`);i=new Na([r],!1,!1,this.g.i.canvas,this.O,i,t),this.s=n=n?i.clone():i,this.h&&this.h(n),zo(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ac.prototype.stylize=ac.prototype.Oa,ac.prototype.setOptions=ac.prototype.o,ac.createFromModelPath=function(t,e){return Ga(ac,t,{baseOptions:{modelAssetPath:e}})},ac.createFromModelBuffer=function(t,e){return Ga(ac,t,{baseOptions:{modelAssetBuffer:e}})},ac.createFromOptions=function(t,e){return Ga(ac,t,e)};var cc=Da([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function uc(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function hc(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function lc(t,e=!0){const n=[];for(const i of t){var r=ns(i);t=[];for(const n of r.g())r=e&&null!=hn(n,1)?hn(n,1)??0:-1,t.push({score:fn(n,2)??0,index:r,categoryName:ln(n,3)??""??"",displayName:ln(n,4)??""??""});n.push(t)}return n}var fc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],sn(t=this.j=new Xs,0,1,e=new xs),this.s=new $s,sn(this.j,0,2,this.s),this.C=new Hs,sn(this.s,0,3,this.C),this.v=new qs,sn(this.s,0,2,this.v),this.h=new zs,sn(this.j,0,3,this.h),gn(this.v,2,.5),gn(this.s,4,.5),gn(this.C,2,.5)}get baseOptions(){return en(this.j,xs,1)}set baseOptions(t){sn(this.j,0,1,t)}o(t){if(pn(this.v,3,t.numHands??1),"minHandDetectionConfidence"in t&&gn(this.v,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&gn(this.s,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&gn(this.C,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new Gs,n=e,r=Eo(t.cannedGesturesClassifierOptions,en(this.h,Gs,3)?.h());sn(n,0,2,r),sn(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&en(this.h,Gs,3)?.g();return t.customGesturesClassifierOptions?(sn(n=e=new Gs,0,2,r=Eo(t.customGesturesClassifierOptions,en(this.h,Gs,4)?.h())),sn(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&en(this.h,Gs,4)?.g(),this.l(t)}Ja(t,e){return uc(this),za(this,t,e),hc(this)}Ka(t,e,n){return uc(this),qa(this,t,n,e),hc(this)}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"hand_gestures"),Ki(t,"hand_landmarks"),Ki(t,"world_hand_landmarks"),Ki(t,"handedness");const e=new ji;Wn(e,Qs,this.j);const n=new Wi;Ui(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"HAND_GESTURES:hand_gestures"),Gi(n,"LANDMARKS:hand_landmarks"),Gi(n,"WORLD_LANDMARKS:world_hand_landmarks"),Gi(n,"HANDEDNESS:handedness"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=hs(e);const n=[];for(const e of rn(t,us,1))n.push({x:fn(e,1)??0,y:fn(e,2)??0,z:fn(e,3)??0,visibility:fn(e,4)??0});this.landmarks.push(n)}zo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=cs(e);const n=[];for(const e of rn(t,as,1))n.push({x:fn(e,1)??0,y:fn(e,2)??0,z:fn(e,3)??0,visibility:fn(e,4)??0});this.worldLandmarks.push(n)}zo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...lc(t,!1)),zo(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...lc(t)),zo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function dc(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}fc.prototype.recognizeForVideo=fc.prototype.Ka,fc.prototype.recognize=fc.prototype.Ja,fc.prototype.setOptions=fc.prototype.o,fc.createFromModelPath=function(t,e){return Ga(fc,t,{baseOptions:{modelAssetPath:e}})},fc.createFromModelBuffer=function(t,e){return Ga(fc,t,{baseOptions:{modelAssetBuffer:e}})},fc.createFromOptions=function(t,e){return Ga(fc,t,e)},fc.HAND_CONNECTIONS=cc;var pc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],sn(t=this.h=new $s,0,1,e=new xs),this.s=new Hs,sn(this.h,0,3,this.s),this.j=new qs,sn(this.h,0,2,this.j),pn(this.j,3,1),gn(this.j,2,.5),gn(this.s,2,.5),gn(this.h,4,.5)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"numHands"in t&&pn(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&gn(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&gn(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&gn(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],za(this,t,e),dc(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],qa(this,t,n,e),dc(this)}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"hand_landmarks"),Ki(t,"world_hand_landmarks"),Ki(t,"handedness");const e=new ji;Wn(e,to,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"LANDMARKS:hand_landmarks"),Gi(n,"WORLD_LANDMARKS:world_hand_landmarks"),Gi(n,"HANDEDNESS:handedness"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=hs(e),this.landmarks.push(To(t));zo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=cs(e),this.worldLandmarks.push(Co(t));zo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const i=[];for(const e of t){t=ns(e);const n=[];for(const e of t.g())n.push({score:fn(e,2)??0,index:hn(e,1)??0??-1,categoryName:ln(e,3)??""??"",displayName:ln(e,4)??""??""});i.push(n)}r.call(n,...i),zo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pc.prototype.detectForVideo=pc.prototype.F,pc.prototype.detect=pc.prototype.D,pc.prototype.setOptions=pc.prototype.o,pc.createFromModelPath=function(t,e){return Ga(pc,t,{baseOptions:{modelAssetPath:e}})},pc.createFromModelBuffer=function(t,e){return Ga(pc,t,{baseOptions:{modelAssetBuffer:e}})},pc.createFromOptions=function(t,e){return Ga(pc,t,e)},pc.HAND_CONNECTIONS=cc;var gc=Da([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function mc(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function vc(t){try{if(!t.C)return t.h;t.C(t.h)}finally{$o(t)}}function yc(t,e){t=hs(t),e.push(To(t))}var _c=class extends $a{constructor(t,e){super(new Va(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,sn(t=this.j=new io,0,1,e=new xs),this.J=new Hs,sn(this.j,0,2,this.J),this.Z=new eo,sn(this.j,0,3,this.Z),this.s=new Fs,sn(this.j,0,4,this.s),this.H=new Ls,sn(this.j,0,5,this.H),this.v=new no,sn(this.j,0,6,this.v),this.K=new ro,sn(this.j,0,7,this.K),gn(this.s,2,.5),gn(this.s,3,.3),gn(this.H,2,.5),gn(this.v,2,.5),gn(this.v,3,.3),gn(this.K,2,.5),gn(this.J,2,.5)}get baseOptions(){return en(this.j,xs,1)}set baseOptions(t){sn(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&gn(this.s,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&gn(this.s,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&gn(this.H,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&gn(this.v,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&gn(this.v,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&gn(this.K,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&gn(this.J,2,t.minHandLandmarksConfidence??.5),this.l(t)}D(t,e,n){const r="function"!=typeof e?e:{};return this.C="function"==typeof e?e:n,mc(this),za(this,t,r),vc(this)}F(t,e,n,r){const i="function"!=typeof n?n:{};return this.C="function"==typeof n?n:r,mc(this),qa(this,t,i,e),vc(this)}m(){var t=new Yi;Xi(t,"input_frames_image"),Ki(t,"pose_landmarks"),Ki(t,"pose_world_landmarks"),Ki(t,"face_landmarks"),Ki(t,"left_hand_landmarks"),Ki(t,"left_hand_world_landmarks"),Ki(t,"right_hand_landmarks"),Ki(t,"right_hand_world_landmarks");const e=new ji,n=new ki;$e(n,1,ae("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(t,e){if(null!=e)if(Array.isArray(e))je(t,2,Pe(e));else{if(!("string"==typeof e||e instanceof B||L(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");$e(t,2,pt(e,!1),j())}}(n,this.j.g());const r=new Wi;Ui(r,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),un(r,8,ki,n),Vi(r,"IMAGE:input_frames_image"),Gi(r,"POSE_LANDMARKS:pose_landmarks"),Gi(r,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),Gi(r,"FACE_LANDMARKS:face_landmarks"),Gi(r,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),Gi(r,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),Gi(r,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),Gi(r,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),r.o(e),$i(t,r),qo(this,t),this.g.attachProtoListener("pose_landmarks",((t,e)=>{yc(t,this.h.poseLandmarks),zo(this,e)})),this.g.attachEmptyPacketListener("pose_landmarks",(t=>{zo(this,t)})),this.g.attachProtoListener("pose_world_landmarks",((t,e)=>{var n=this.h.poseWorldLandmarks;t=cs(t),n.push(Co(t)),zo(this,e)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(t=>{zo(this,t)})),this.outputPoseSegmentationMasks&&(Gi(r,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Ho(this,"pose_segmentation_mask"),this.g.U("pose_segmentation_mask",((t,e)=>{this.h.poseSegmentationMasks=[Ha(this,t,!0,!this.C)],zo(this,e)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(t=>{this.h.poseSegmentationMasks=[],zo(this,t)}))),this.g.attachProtoListener("face_landmarks",((t,e)=>{yc(t,this.h.faceLandmarks),zo(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{zo(this,t)})),this.outputFaceBlendshapes&&(Ki(t,"extra_blendshapes"),Gi(r,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((t,e)=>{var n=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=ns(t),n.push(So(t.g()??[]))),zo(this,e)})),this.g.attachEmptyPacketListener("extra_blendshapes",(t=>{zo(this,t)}))),this.g.attachProtoListener("left_hand_landmarks",((t,e)=>{yc(t,this.h.leftHandLandmarks),zo(this,e)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoListener("left_hand_world_landmarks",((t,e)=>{var n=this.h.leftHandWorldLandmarks;t=cs(t),n.push(Co(t)),zo(this,e)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(t=>{zo(this,t)})),this.g.attachProtoListener("right_hand_landmarks",((t,e)=>{yc(t,this.h.rightHandLandmarks),zo(this,e)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoListener("right_hand_world_landmarks",((t,e)=>{var n=this.h.rightHandWorldLandmarks;t=cs(t),n.push(Co(t)),zo(this,e)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};_c.prototype.detectForVideo=_c.prototype.F,_c.prototype.detect=_c.prototype.D,_c.prototype.setOptions=_c.prototype.o,_c.createFromModelPath=function(t,e){return Ga(_c,t,{baseOptions:{modelAssetPath:e}})},_c.createFromModelBuffer=function(t,e){return Ga(_c,t,{baseOptions:{modelAssetBuffer:e}})},_c.createFromOptions=function(t,e){return Ga(_c,t,e)},_c.HAND_CONNECTIONS=cc,_c.POSE_CONNECTIONS=gc,_c.FACE_LANDMARKS_LIPS=Ka,_c.FACE_LANDMARKS_LEFT_EYE=Ya,_c.FACE_LANDMARKS_LEFT_EYEBROW=Ja,_c.FACE_LANDMARKS_LEFT_IRIS=Za,_c.FACE_LANDMARKS_RIGHT_EYE=Qa,_c.FACE_LANDMARKS_RIGHT_EYEBROW=tc,_c.FACE_LANDMARKS_RIGHT_IRIS=ec,_c.FACE_LANDMARKS_FACE_OVAL=nc,_c.FACE_LANDMARKS_CONTOURS=rc,_c.FACE_LANDMARKS_TESSELATION=ic;var bc=class extends $a{constructor(t,e){super(new Va(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},sn(t=this.h=new ao,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return sn(this.h,0,2,Eo(t,en(this.h,ws,2))),this.l(t)}sa(t,e){return this.j={classifications:[]},za(this,t,e),this.j}ta(t,e,n){return this.j={classifications:[]},qa(this,t,n,e),this.j}m(){var t=new Yi;Xi(t,"input_image"),Xi(t,"norm_rect"),Ki(t,"classifications");const e=new ji;Wn(e,co,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Vi(n,"IMAGE:input_image"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"CLASSIFICATIONS:classifications"),n.o(e),$i(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:rn(t,ps,1).map((t=>So(en(t,ts,4)?.g()??[],hn(t,2)??0,ln(t,3)??"")))};return null!=se(Le(t,2))&&(e.timestampMs=se(Le(t,2))??0),e}(gs(t)),zo(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};bc.prototype.classifyForVideo=bc.prototype.ta,bc.prototype.classify=bc.prototype.sa,bc.prototype.setOptions=bc.prototype.o,bc.createFromModelPath=function(t,e){return Ga(bc,t,{baseOptions:{modelAssetPath:e}})},bc.createFromModelBuffer=function(t,e){return Ga(bc,t,{baseOptions:{modelAssetBuffer:e}})},bc.createFromOptions=function(t,e){return Ga(bc,t,e)};var wc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!0),this.h=new uo,this.embeddings={embeddings:[]},sn(t=this.h,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){var e=this.h,n=en(this.h,Ss,2);return n=n?n.clone():new Ss,void 0!==t.l2Normalize?dn(n,1,t.l2Normalize):"l2Normalize"in t&&je(n,1),void 0!==t.quantize?dn(n,2,t.quantize):"quantize"in t&&je(n,2),sn(e,0,2,n),this.l(t)}za(t,e){return za(this,t,e),this.embeddings}Aa(t,e,n){return qa(this,t,n,e),this.embeddings}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"embeddings_out");const e=new ji;Wn(e,ho,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"EMBEDDINGS:embeddings_out"),n.o(e),$i(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=bs(t),this.embeddings=function(t){return{embeddings:rn(t,ys,1).map((t=>{const e={headIndex:hn(t,3)??0??-1,headName:ln(t,4)??""??""};if(void 0!==tn(t,ms,Ke(t,1)))t=Ge(t=en(t,ms,Ke(t,1)),1,Yt,Ve()),e.floatEmbedding=t.slice();else{const n=new Uint8Array(0);e.quantizedEmbedding=en(t,vs,Ke(t,2))?.oa()?.h()??n}return e})),timestampMs:se(Le(t,2))??0}}(t),zo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};wc.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=xo(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=xo(Ao(t.quantizedEmbedding),Ao(e.quantizedEmbedding))}return t},wc.prototype.embedForVideo=wc.prototype.Aa,wc.prototype.embed=wc.prototype.za,wc.prototype.setOptions=wc.prototype.o,wc.createFromModelPath=function(t,e){return Ga(wc,t,{baseOptions:{modelAssetPath:e}})},wc.createFromModelBuffer=function(t,e){return Ga(wc,t,{baseOptions:{modelAssetBuffer:e}})},wc.createFromOptions=function(t,e){return Ga(wc,t,e)};var Ec=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};function Sc(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function kc(t){try{const e=new Ec(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{$o(t)}}Ec.prototype.close=Ec.prototype.close;var Tc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new mo,this.v=new lo,sn(this.h,0,3,this.v),sn(t=this.h,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?je(this.h,2,ae(t.displayNamesLocale)):"displayNamesLocale"in t&&je(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}I(){!function(t){const e=rn(t.da(),Wi,1).filter((t=>(ln(t,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(en(e[0],ji,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=ln(e,1)??""}))}(this)}segment(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Sc(this),za(this,t,r),kc(this)}Ma(t,e,n,r){const i="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,Sc(this),qa(this,t,i,e),kc(this)}Da(){return this.s}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect");const e=new ji;Wn(e,vo,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),n.o(e),$i(t,n),qo(this,t),this.outputConfidenceMasks&&(Ki(t,"confidence_masks"),Gi(n,"CONFIDENCE_MASKS:confidence_masks"),Ho(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>Ha(this,t,!0,!this.j))),zo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],zo(this,t)}))),this.outputCategoryMask&&(Ki(t,"category_mask"),Gi(n,"CATEGORY_MASK:category_mask"),Ho(this,"category_mask"),this.g.U("category_mask",((t,e)=>{this.categoryMask=Ha(this,t,!1,!this.j),zo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,zo(this,t)}))),Ki(t,"quality_scores"),Gi(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,zo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Tc.prototype.getLabels=Tc.prototype.Da,Tc.prototype.segmentForVideo=Tc.prototype.Ma,Tc.prototype.segment=Tc.prototype.segment,Tc.prototype.setOptions=Tc.prototype.o,Tc.createFromModelPath=function(t,e){return Ga(Tc,t,{baseOptions:{modelAssetPath:e}})},Tc.createFromModelBuffer=function(t,e){return Ga(Tc,t,{baseOptions:{modelAssetBuffer:e}})},Tc.createFromOptions=function(t,e){return Ga(Tc,t,e)};var Cc=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};Cc.prototype.close=Cc.prototype.close;var Ac=class extends zn{constructor(t){super(t)}},xc=[0,oi,-2],Pc=[0,Qr,-3,ui,Qr,-1],Oc=[0,Pc],Fc=[0,Pc,oi,-1],Ic=class extends zn{constructor(t){super(t)}},Rc=[0,Qr,-1,ui],Mc=class extends zn{constructor(t){super(t)}},Lc=class extends zn{constructor(t){super(t)}},Nc=[1,2,3,4,5,6,7,8,9,10,14,15],jc=class extends zn{constructor(t){super(t)}};jc.prototype.g=Si([0,pi,[0,Nc,gi,Pc,gi,[0,Pc,xc],gi,Oc,gi,[0,Oc,xc],gi,Rc,gi,[0,Qr,-3,ui,_i],gi,[0,Qr,-3,ui],gi,[0,di,Qr,-2,ui,oi,ui,-1,2,Qr,xc],gi,Fc,gi,[0,Fc,xc],Qr,xc,di,gi,[0,Qr,-3,ui,xc,-1],gi,[0,pi,Rc]],di,[0,di,oi,-1,ui]]);var Dc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new mo,this.s=new lo,sn(this.h,0,3,this.s),sn(t=this.h,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}segment(t,e,n,r){const i="function"!=typeof n?n:{};this.j="function"==typeof n?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,r=new jc;const s=new Lc;var o=new Ac;if(pn(o,1,255),sn(s,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new Ic;dn(a,3,!0),gn(a,1,e.keypoint.x),gn(a,2,e.keypoint.y),on(s,5,Nc,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new Mc,e.scribble))dn(e=new Ic,3,!0),gn(e,1,a.x),gn(e,2,a.y),un(o,1,Ic,e);on(s,15,Nc,o)}un(r,1,Lc,s),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),za(this,t,i);t:{try{const t=new Cc(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=t;break t}this.j(t)}finally{$o(this)}c=void 0}return c}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"roi_in"),Xi(t,"norm_rect_in");const e=new ji;Wn(e,vo,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"ROI:roi_in"),Vi(n,"NORM_RECT:norm_rect_in"),n.o(e),$i(t,n),qo(this,t),this.outputConfidenceMasks&&(Ki(t,"confidence_masks"),Gi(n,"CONFIDENCE_MASKS:confidence_masks"),Ho(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>Ha(this,t,!0,!this.j))),zo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],zo(this,t)}))),this.outputCategoryMask&&(Ki(t,"category_mask"),Gi(n,"CATEGORY_MASK:category_mask"),Ho(this,"category_mask"),this.g.U("category_mask",((t,e)=>{this.categoryMask=Ha(this,t,!1,!this.j),zo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,zo(this,t)}))),Ki(t,"quality_scores"),Gi(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,zo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Dc.prototype.segment=Dc.prototype.segment,Dc.prototype.setOptions=Dc.prototype.o,Dc.createFromModelPath=function(t,e){return Ga(Dc,t,{baseOptions:{modelAssetPath:e}})},Dc.createFromModelBuffer=function(t,e){return Ga(Dc,t,{baseOptions:{modelAssetBuffer:e}})},Dc.createFromOptions=function(t,e){return Ga(Dc,t,e)};var Bc=class extends $a{constructor(t,e){super(new Va(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},sn(t=this.h=new yo,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?je(this.h,2,ae(t.displayNamesLocale)):"displayNamesLocale"in t&&je(this.h,2),void 0!==t.maxResults?pn(this.h,3,t.maxResults):"maxResults"in t&&je(this.h,3),void 0!==t.scoreThreshold?gn(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&je(this.h,4),void 0!==t.categoryAllowlist?mn(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&je(this.h,5),void 0!==t.categoryDenylist?mn(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&je(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},za(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},qa(this,t,n,e),this.j}m(){var t=new Yi;Xi(t,"input_frame_gpu"),Xi(t,"norm_rect"),Ki(t,"detections");const e=new ji;Wn(e,_o,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),Vi(n,"IMAGE:input_frame_gpu"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"DETECTIONS:detections"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=os(e),this.j.detections.push(ko(t));zo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Bc.prototype.detectForVideo=Bc.prototype.F,Bc.prototype.detect=Bc.prototype.D,Bc.prototype.setOptions=Bc.prototype.o,Bc.createFromModelPath=async function(t,e){return Ga(Bc,t,{baseOptions:{modelAssetPath:e}})},Bc.createFromModelBuffer=function(t,e){return Ga(Bc,t,{baseOptions:{modelAssetBuffer:e}})},Bc.createFromOptions=function(t,e){return Ga(Bc,t,e)};var Uc=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach((t=>{t.close()}))}};function Vc(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Gc(t){try{const e=new Uc(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{$o(t)}}Uc.prototype.close=Uc.prototype.close;var Wc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,sn(t=this.h=new bo,0,1,e=new xs),this.v=new ro,sn(this.h,0,3,this.v),this.j=new no,sn(this.h,0,2,this.j),pn(this.j,4,1),gn(this.j,2,.5),gn(this.v,2,.5),gn(this.h,4,.5)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"numPoses"in t&&pn(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&gn(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&gn(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&gn(this.v,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}D(t,e,n){const r="function"!=typeof e?e:{};return this.s="function"==typeof e?e:n,Vc(this),za(this,t,r),Gc(this)}F(t,e,n,r){const i="function"!=typeof n?n:{};return this.s="function"==typeof n?n:r,Vc(this),qa(this,t,i,e),Gc(this)}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"normalized_landmarks"),Ki(t,"world_landmarks"),Ki(t,"segmentation_masks");const e=new ji;Wn(e,wo,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"NORM_LANDMARKS:normalized_landmarks"),Gi(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),$i(t,n),qo(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=hs(e),this.landmarks.push(To(t));zo(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],zo(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=cs(e),this.worldLandmarks.push(Co(t));zo(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],zo(this,t)})),this.outputSegmentationMasks&&(Gi(n,"SEGMENTATION_MASK:segmentation_masks"),Ho(this,"segmentation_masks"),this.g.ca("segmentation_masks",((t,e)=>{this.segmentationMasks=t.map((t=>Ha(this,t,!0,!this.s))),zo(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.segmentationMasks=[],zo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Wc.prototype.detectForVideo=Wc.prototype.F,Wc.prototype.detect=Wc.prototype.D,Wc.prototype.setOptions=Wc.prototype.o,Wc.createFromModelPath=function(t,e){return Ga(Wc,t,{baseOptions:{modelAssetPath:e}})},Wc.createFromModelBuffer=function(t,e){return Ga(Wc,t,{baseOptions:{modelAssetBuffer:e}})},Wc.createFromOptions=function(t,e){return Ga(Wc,t,e)},Wc.POSE_CONNECTIONS=gc,e.DrawingUtils=Aa,e.FaceDetector=Xa,e.FaceLandmarker=oc,e.FaceStylizer=ac,e.FilesetResolver=Ro,e.GestureRecognizer=fc,e.HandLandmarker=pc,e.HolisticLandmarker=_c,e.ImageClassifier=bc,e.ImageEmbedder=wc,e.ImageSegmenter=Tc,e.ImageSegmenterResult=Ec,e.InteractiveSegmenter=Dc,e.InteractiveSegmenterResult=Cc,e.MPImage=Na,e.MPMask=ma,e.ObjectDetector=Bc,e.PoseLandmarker=Wc,e.VisionTaskRunner=$a},8419:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}e.hasCORS=n},5754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encode=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t<r;t++){let r=n[t].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}},5222:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=function(t){if(t.length>8e3)throw"URI too long";const e=t,i=t.indexOf("["),s=t.indexOf("]");-1!=i&&-1!=s&&(t=t.substring(0,i)+t.substring(i,s).replace(/:/g,";")+t.substring(s,t.length));let o=n.exec(t||""),a={},c=14;for(;c--;)a[r[c]]=o[c]||"";return-1!=i&&-1!=s&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){const n=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1),"/"==e.slice(-1)&&n.splice(n.length-1,1),n}(0,a.path),a.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(n[e]=r)})),n}(0,a.query),a};const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]},5010:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.globalThisShim=e.nextTick=void 0,e.createCookieJar=function(){},e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")(),e.defaultBinaryType="arraybuffer"},4679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebTransport=e.WebSocket=e.NodeWebSocket=e.XHR=e.NodeXHR=e.Fetch=e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.TransportError=e.Transport=e.protocol=e.SocketWithUpgrade=e.SocketWithoutUpgrade=e.Socket=void 0;const r=n(3481);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}});var i=n(3481);Object.defineProperty(e,"SocketWithoutUpgrade",{enumerable:!0,get:function(){return i.SocketWithoutUpgrade}}),Object.defineProperty(e,"SocketWithUpgrade",{enumerable:!0,get:function(){return i.SocketWithUpgrade}}),e.protocol=r.Socket.protocol;var s=n(9870);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return s.Transport}}),Object.defineProperty(e,"TransportError",{enumerable:!0,get:function(){return s.TransportError}});var o=n(7385);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return o.transports}});var a=n(9622);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return a.installTimerFunctions}});var c=n(5222);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return c.parse}});var u=n(5010);Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return u.nextTick}});var h=n(6915);Object.defineProperty(e,"Fetch",{enumerable:!0,get:function(){return h.Fetch}});var l=n(715);Object.defineProperty(e,"NodeXHR",{enumerable:!0,get:function(){return l.XHR}});var f=n(715);Object.defineProperty(e,"XHR",{enumerable:!0,get:function(){return f.XHR}});var d=n(1308);Object.defineProperty(e,"NodeWebSocket",{enumerable:!0,get:function(){return d.WS}});var p=n(1308);Object.defineProperty(e,"WebSocket",{enumerable:!0,get:function(){return p.WS}});var g=n(1020);Object.defineProperty(e,"WebTransport",{enumerable:!0,get:function(){return g.WT}})},3481:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=e.SocketWithUpgrade=e.SocketWithoutUpgrade=void 0;const i=n(7385),s=n(9622),o=n(5754),a=n(5222),c=n(6717),u=n(1373),h=n(5010),l=(0,r(n(4802)).default)("engine.io-client:socket"),f="function"==typeof addEventListener&&"function"==typeof removeEventListener,d=[];f&&addEventListener("offline",(()=>{l("closing %d connection(s) because the network was lost",d.length),d.forEach((t=>t()))}),!1);class p extends c.Emitter{constructor(t,e){if(super(),this.binaryType=h.defaultBinaryType,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const n=(0,a.parse)(t);e.hostname=n.host,e.secure="https"===n.protocol||"wss"===n.protocol,e.port=n.port,n.query&&(e.query=n.query)}else e.host&&(e.hostname=(0,a.parse)(e.host).host);(0,s.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach((t=>{const e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t})),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,o.decode)(this.opts.query)),f&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(l("adding listener for the 'offline' event"),this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},d.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=(0,h.createCookieJar)()),this._open()}createTransport(t){l('creating transport "%s"',t);const e=Object.assign({},this.opts.query);e.EIO=u.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return l("options: %j",n),new this._transportsByName[t](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const t=this.opts.rememberUpgrade&&p.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){l("setting transport %s",t.name),this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(t=>this._onClose("transport close",t)))}onOpen(){l("socket open"),this.readyState="open",p.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(l('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}else l('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn((()=>{this._onClose("ping timeout")}),t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();l("flushing %d packets in socket",t.length),this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=(0,s.byteLength)(n)),e>0&&t>this._maxPayload)return l("only send %d out of %d packets",e,this.writeBuffer.length),this.writeBuffer.slice(0,e);t+=2}return l("payload size is %d (max: %d)",t,this._maxPayload),this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(l("throttled timer detected, scheduling connection close"),this._pingTimeoutTime=0,(0,h.nextTick)((()=>{this._onClose("ping timeout")}),this.setTimeoutFn)),t}write(t,e,n){return this._sendPacket("message",t,e,n),this}send(t,e,n){return this._sendPacket("message",t,e,n),this}_sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this._onClose("forced close"),l("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():t()})):this.upgrading?n():t()),this}_onError(t){if(l("socket error %j",t),p.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return l("trying next transport"),this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(l('socket close with reason: "%s"',t),this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),f&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const t=d.indexOf(this._offlineEventListener);-1!==t&&(l("removing listener for the 'offline' event"),d.splice(t,1))}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}e.SocketWithoutUpgrade=p,p.protocol=u.protocol;class g extends p{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade){l("starting upgrade probes");for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}}_probe(t){l('probing transport "%s"',t);let e=this.createTransport(t),n=!1;p.priorWebsocketSuccess=!1;const r=()=>{n||(l('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(l('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;p.priorWebsocketSuccess="websocket"===e.name,l('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(l("changing transport and sending upgrade packet"),u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{l('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emitReserved("upgradeError",n)}})))};function i(){n||(n=!0,u(),e.close(),e=null)}const s=n=>{const r=new Error("probe error: "+n);r.transport=e.name,i(),l('probe transport "%s" failed because of error: %s',t,n),this.emitReserved("upgradeError",r)};function o(){s("transport closed")}function a(){s("socket closed")}function c(t){e&&t.name!==e.name&&(l('"%s" works - aborting "%s"',t.name,e.name),i())}const u=()=>{e.removeListener("open",r),e.removeListener("error",s),e.removeListener("close",o),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",s),e.once("close",o),this.once("close",a),this.once("upgrading",c),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{n||e.open()}),200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const e=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}e.SocketWithUpgrade=g,e.Socket=class extends g{constructor(t,e={}){const n="object"==typeof t?t:e;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map((t=>i.transports[t])).filter((t=>!!t))),super(t,n)}}},9870:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=e.TransportError=void 0;const i=n(1373),s=n(6717),o=n(9622),a=n(5754),c=(0,r(n(4802)).default)("engine.io-client:transport");class u extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}e.TransportError=u;class h extends s.Emitter{constructor(t){super(),this.writable=!1,(0,o.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,n){return super.emitReserved("error",new u(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState?this.write(t):c("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=(0,i.decodePacket)(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=(0,a.encode)(t);return e.length?"?"+e:""}}e.Transport=h},7385:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=n(715),i=n(1308),s=n(1020);e.transports={websocket:i.WS,webtransport:s.WT,polling:r.XHR}},6915:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Fetch=void 0;const r=n(484);class i extends r.Polling{doPoll(){this._fetch().then((t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then((t=>this.onData(t)))})).catch((t=>{this.onError("fetch read error",t)}))}doWrite(t,e){this._fetch(t).then((t=>{if(!t.ok)return this.onError("fetch write error",t.status,t);e()})).catch((t=>{this.onError("fetch write error",t)}))}_fetch(t){var e;const n=void 0!==t,r=new Headers(this.opts.extraHeaders);return n&&r.set("content-type","text/plain;charset=UTF-8"),null===(e=this.socket._cookieJar)||void 0===e||e.appendCookies(r),fetch(this.uri(),{method:n?"POST":"GET",body:n?t:null,headers:r,credentials:this.opts.withCredentials?"include":"omit"}).then((t=>{var e;return null===(e=this.socket._cookieJar)||void 0===e||e.parseCookies(t.headers.getSetCookie()),t}))}}e.Fetch=i},715:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.XHR=e.Request=e.BaseXHR=void 0;const i=n(484),s=n(6717),o=n(9622),a=n(5010),c=n(8419),u=(0,r(n(4802)).default)("engine.io-client:polling");function h(){}class l extends i.Polling{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){u("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}e.BaseXHR=l;class f extends s.Emitter{constructor(t,e,n){super(),this.createRequest=t,(0,o.installTimerFunctions)(this,n),this._opts=n,this._method=n.method||"GET",this._uri=e,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var t;const e=(0,o.pick)(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(e);try{u("xhr open %s: %s",this._method,this._uri),n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(t){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn((()=>{this._onError("number"==typeof n.status?n.status:0)}),0))},u("xhr data %s",this._data),n.send(this._data)}catch(t){return void this.setTimeoutFn((()=>{this._onError(t)}),0)}"undefined"!=typeof document&&(this._index=f.requestsCount++,f.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=h,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete f.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(e.Request=f,f.requestsCount=0,f.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",d);else if("function"==typeof addEventListener){const t="onpagehide"in a.globalThisShim?"pagehide":"unload";addEventListener(t,d,!1)}function d(){for(let t in f.requests)f.requests.hasOwnProperty(t)&&f.requests[t].abort()}const p=function(){const t=g({xdomain:!1});return t&&null!==t.responseType}();function g(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||c.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(a.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}e.XHR=class extends l{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=p&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new f(g,this.uri(),t)}}},484:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Polling=void 0;const i=n(9870),s=n(9622),o=n(1373),a=(0,r(n(4802)).default)("engine.io-client:polling");class c extends i.Transport{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const e=()=>{a("paused"),this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(a("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){a("pre-pause polling complete"),--t||e()}))),this.writable||(a("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){a("pre-pause writing complete"),--t||e()})))}else e()}_poll(){a("polling"),this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){a("polling got data %s",t),(0,o.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this._poll():a('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{a("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(a("transport open - closing"),t()):(a("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,o.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,s.randomString)()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}e.Polling=c},1308:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=e.BaseWS=void 0;const i=n(9870),s=n(9622),o=n(1373),a=n(5010),c=(0,r(n(4802)).default)("engine.io-client:websocket"),u="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class h extends i.Transport{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,n=u?{}:(0,s.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;(0,o.encodePacket)(n,this.supportsBinary,(t=>{try{this.doWrite(n,t)}catch(t){c("websocket closed before onclose event")}r&&(0,a.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,s.randomString)()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}e.BaseWS=h;const l=a.globalThisShim.WebSocket||a.globalThisShim.MozWebSocket;e.WS=class extends h{createSocket(t,e,n){return u?new l(t,e,n):e?new l(t,e):new l(t)}doWrite(t,e){this.ws.send(e)}}},1020:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WT=void 0;const i=n(9870),s=n(5010),o=n(1373),a=(0,r(n(4802)).default)("engine.io-client:webtransport");class c extends i.Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then((()=>{a("transport closed gracefully"),this.onClose()})).catch((t=>{a("transport closed due to %s",t),this.onError("webtransport error",t)})),this._transport.ready.then((()=>{this._transport.createBidirectionalStream().then((t=>{const e=(0,o.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(e).getReader(),r=(0,o.createPacketEncoderStream)();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();const i=()=>{n.read().then((({done:t,value:e})=>{t?a("session is closed"):(a("received chunk: %o",e),this.onPacket(e),i())})).catch((t=>{a("an error occurred while reading: %s",t)}))};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then((()=>this.onOpen()))}))}))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;this._writer.write(n).then((()=>{r&&(0,s.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}}e.WT=c},9622:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pick=function(t,...e){return e.reduce(((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e)),{})},e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=i.bind(r.globalThisShim),t.clearTimeoutFn=s.bind(r.globalThisShim)):(t.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),t.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))},e.byteLength=function(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil((t.byteLength||t.size)*o)},e.randomString=function(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)};const r=n(5010),i=r.globalThisShim.setTimeout,s=r.globalThisShim.clearTimeout,o=1.33},3087:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const n=Object.create(null);e.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((t=>{r[n[t]]=t})),e.ERROR_PACKET={type:"error",data:"parser error"}},2469:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)r[n.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),i=r.length,s="";for(e=0;e<i;e+=3)s+=n[r[e]>>2],s+=n[(3&r[e])<<4|r[e+1]>>4],s+=n[(15&r[e+1])<<2|r[e+2]>>6],s+=n[63&r[e+2]];return i%3==2?s=s.substring(0,s.length-1)+"=":i%3==1&&(s=s.substring(0,s.length-2)+"=="),s},e.decode=t=>{let e,n,i,s,o,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const h=new ArrayBuffer(a),l=new Uint8Array(h);for(e=0;e<c;e+=4)n=r[t.charCodeAt(e)],i=r[t.charCodeAt(e+1)],s=r[t.charCodeAt(e+2)],o=r[t.charCodeAt(e+3)],l[u++]=n<<2|i>>4,l[u++]=(15&i)<<4|s>>2,l[u++]=(3&s)<<6|63&o;return h}},7572:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePacket=void 0;const r=n(3087),i=n(2469),s="function"==typeof ArrayBuffer;e.decodePacket=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const n=t.charAt(0);return"b"===n?{type:"message",data:o(t.substring(1),e)}:r.PACKET_TYPES_REVERSE[n]?t.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET};const o=(t,e)=>{if(s){const n=(0,i.decode)(t);return a(n,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},3908:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodePacket=void 0,e.encodePacketToBinary=function(t,e){return i&&t.data instanceof Blob?t.data.arrayBuffer().then(u).then(e):s&&(t.data instanceof ArrayBuffer||o(t.data))?e(u(t.data)):void a(t,!1,(t=>{h||(h=new TextEncoder),e(h.encode(t))}))};const r=n(3087),i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),s="function"==typeof ArrayBuffer,o=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,a=({type:t,data:e},n,a)=>i&&e instanceof Blob?n?a(e):c(e,a):s&&(e instanceof ArrayBuffer||o(e))?n?a(e):c(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));e.encodePacket=a;const c=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function u(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let h},1373:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0,e.createPacketEncoderStream=function(){return new TransformStream({transform(t,e){(0,r.encodePacketToBinary)(t,(n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const t=new DataView(i.buffer);t.setUint8(0,126),t.setUint16(1,r)}else{i=new Uint8Array(9);const t=new DataView(i.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(i[0]|=128),e.enqueue(i),e.enqueue(n)}))}})},e.createPacketDecoderStream=function(t,e){a||(a=new TextDecoder);const n=[];let r=0,o=-1,h=!1;return new TransformStream({transform(l,f){for(n.push(l);;){if(0===r){if(c(n)<1)break;const t=u(n,1);h=128==(128&t[0]),o=127&t[0],r=o<126?3:126===o?1:2}else if(1===r){if(c(n)<2)break;const t=u(n,2);o=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),r=3}else if(2===r){if(c(n)<8)break;const t=u(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),i=e.getUint32(0);if(i>Math.pow(2,21)-1){f.enqueue(s.ERROR_PACKET);break}o=i*Math.pow(2,32)+e.getUint32(4),r=3}else{if(c(n)<o)break;const t=u(n,o);f.enqueue((0,i.decodePacket)(h?t:a.decode(t),e)),r=0}if(0===o||o>t){f.enqueue(s.ERROR_PACKET);break}}}})};const r=n(3908);Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return r.encodePacket}});const i=n(7572);Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return i.decodePacket}});const s=n(3087),o=String.fromCharCode(30);let a;function c(t){return t.reduce(((t,e)=>t+e.length),0)}function u(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}e.encodePayload=(t,e)=>{const n=t.length,i=new Array(n);let s=0;t.forEach(((t,a)=>{(0,r.encodePacket)(t,!1,(t=>{i[a]=t,++s===n&&e(i.join(o))}))}))},e.decodePayload=(t,e)=>{const n=t.split(o),r=[];for(let t=0;t<n.length;t++){const s=(0,i.decodePacket)(n[t],e);if(r.push(s),"error"===s.type)break}return r},e.protocol=4},5159:(t,e)=>{"use strict";function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Object.defineProperty(e,"__esModule",{value:!0}),e.Backoff=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},7046:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WebTransport=e.WebSocket=e.NodeWebSocket=e.XHR=e.NodeXHR=e.Fetch=e.Socket=e.Manager=e.protocol=void 0,e.io=u,e.connect=u,e.default=u;const i=n(3084),s=n(4168);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return s.Manager}});const o=n(8312);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=(0,r(n(3669)).default)("socket.io-client"),c={};function u(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=(0,i.url)(t,e.path||"/socket.io"),r=n.source,o=n.id,u=n.path,h=c[o]&&u in c[o].nsps;let l;return e.forceNew||e["force new connection"]||!1===e.multiplex||h?(a("ignoring socket cache for %s",r),l=new s.Manager(r,e)):(c[o]||(a("new io instance for %s",r),c[o]=new s.Manager(r,e)),l=c[o]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(u,{Manager:s.Manager,Socket:o.Socket,io:u,connect:u});var h=n(4514);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return h.protocol}});var l=n(4679);Object.defineProperty(e,"Fetch",{enumerable:!0,get:function(){return l.Fetch}}),Object.defineProperty(e,"NodeXHR",{enumerable:!0,get:function(){return l.NodeXHR}}),Object.defineProperty(e,"XHR",{enumerable:!0,get:function(){return l.XHR}}),Object.defineProperty(e,"NodeWebSocket",{enumerable:!0,get:function(){return l.NodeWebSocket}}),Object.defineProperty(e,"WebSocket",{enumerable:!0,get:function(){return l.WebSocket}}),Object.defineProperty(e,"WebTransport",{enumerable:!0,get:function(){return l.WebTransport}}),t.exports=u},4168:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=n(4679),c=n(8312),u=s(n(4514)),h=n(7149),l=n(5159),f=n(6717),d=(0,o(n(3669)).default)("socket.io-client:manager");class p extends f.Emitter{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,(0,a.installTimerFunctions)(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=e.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||u;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=(0,h.on)(e,"open",(function(){n.onopen(),t&&t()})),i=e=>{d("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},s=(0,h.on)(e,"error",i);if(!1!==this._timeout){const t=this._timeout;d("connect attempt will timeout after %d",t);const n=this.setTimeoutFn((()=>{d("connect attempt timed out after %d",t),r(),i(new Error("timeout")),e.close()}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push((0,h.on)(t,"ping",this.onping.bind(this)),(0,h.on)(t,"data",this.ondata.bind(this)),(0,h.on)(t,"error",this.onerror.bind(this)),(0,h.on)(t,"close",this.onclose.bind(this)),(0,h.on)(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){(0,a.nextTick)((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){d("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new c.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return void d("socket %s is still active, skipping close",t);this._close()}_packet(t){d("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){d("cleanup"),this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var n;d("closed due to %s",t),this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();d("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{t.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(d("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(d("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=p},7149:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},8312:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(4514),s=n(7149),o=n(6717),a=(0,r(n(3669)).default)("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends o.Emitter{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[(0,s.on)(t,"open",this.onopen.bind(this)),(0,s.on)(t,"packet",this.onpacket.bind(this)),(0,s.on)(t,"error",this.onerror.bind(this)),(0,s.on)(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var n,r,s;if(c.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const o={type:i.PacketType.EVENT,data:e,options:{}};if(o.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const n=e.pop();this._registerAckCallback(t,n),o.id=t}const u=null===(r=null===(n=this.io.engine)||void 0===n?void 0:n.transport)||void 0===r?void 0:r.writable,h=this.connected&&!(null===(s=this.io.engine)||void 0===s?void 0:s._hasPingExpired());return this.flags.volatile&&!u?a("discard packet as the transport is not currently writable"):h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const i=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&(a("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(e,1));a("event with ack id %d has timed out after %d ms",t,r),e.call(this,new Error("operation has timed out"))}),r),s=(...t)=>{this.io.clearTimeoutFn(i),e.apply(this,t)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...e){return new Promise(((n,r)=>{const i=(t,e)=>t?r(t):n(e);i.withError=!0,e.push(i),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...r)=>{if(n===this._queue[0])return null!==t?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),e&&e(t)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const e=this._queue[0];!e.pending||t?(e.pending=!0,e.tryCount++,a("sending packet [%d] (try n°%d)",e.id,e.tryCount),this.flags=e.flags,this.emit.apply(this,e.args)):a("packet [%d] has already been sent and is waiting for an ack",e.id)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:i.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){a("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((e=>String(e.id)===t))){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case i.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case i.PacketType.EVENT:case i.PacketType.BINARY_EVENT:this.onevent(t);break;case i.PacketType.ACK:case i.PacketType.BINARY_ACK:this.onack(t);break;case i.PacketType.DISCONNECT:this.ondisconnect();break;case i.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),e.packet({type:i.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(delete this.acks[t.id],a("calling ack %s with %j",t.id,t.data),e.withError&&t.data.unshift(null),e.apply(this,t.data)):a("bad ack %s",t.id)}onconnect(t,e){a("socket connected with id %s",t),this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:i.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}e.Socket=u},3084:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.url=function(t,e="",n){let r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(s("protocol-less url %s",t),t=void 0!==n?n.protocol+"//"+t:"https://"+t),s("parse %s",t),r=(0,i.parse)(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r};const i=n(4679),s=(0,r(n(3669)).default)("socket.io-client:url")},4880:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(665);function i(t,e){if(!t)return t;if((0,r.isBinary)(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=i(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=i(t[r],e));return n}return t}function s(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=s(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=s(t[n],e));return t}e.deconstructPacket=function(t){const e=[],n=t.data,r=t;return r.data=i(n,e),r.attachments=e.length,{packet:r,buffers:e}},e.reconstructPacket=function(t,e){return t.data=s(t.data,e),delete t.attachments,t}},4514:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(6717),i=n(4880),s=n(665),o=(0,n(1618).default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var c;function u(t){return"[object Object]"===Object.prototype.toString.call(t)}e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(c=e.PacketType||(e.PacketType={})),e.Encoder=class{constructor(t){this.replacer=t}encode(t){return o("encoding packet %j",t),t.type!==c.EVENT&&t.type!==c.ACK||!(0,s.hasBinary)(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==c.BINARY_EVENT&&t.type!==c.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),o("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=(0,i.deconstructPacket)(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class h extends r.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===c.BINARY_EVENT;n||e.type===c.BINARY_ACK?(e.type=n?c.EVENT:c.ACK,this.reconstructor=new l(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!(0,s.isBinary)(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===c[n.type])throw new Error("unknown packet type "+n.type);if(n.type===c.BINARY_EVENT||n.type===c.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const i=t.substring(r,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!h.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return o("decoded %s as %j",t,n),n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case c.CONNECT:return u(e);case c.DISCONNECT:return void 0===e;case c.CONNECT_ERROR:return"string"==typeof e||u(e);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===a.indexOf(e[0]));case c.ACK:case c.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=h;class l{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=(0,i.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},665:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function o(t){return n&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||i&&t instanceof Blob||s&&t instanceof File}e.isBinary=o,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(t(e[n]))return!0;return!1}if(o(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return!0;return!1}},6717:(t,e,n)=>{"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}n.r(e),n.d(e,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},8593:t=>{"use strict";t.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}return n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(4432)})()}));
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.exampleTypescriptPackage=e():t.exampleTypescriptPackage=e()}(this,(function(){return(()=>{var t={9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),s=n(4372),o=n(5327),a=n(4097),c=n(4109),u=n(7985),h=n(5061);t.exports=function(t){return new Promise((function(e,n){var l=t.data,f=t.headers,d=t.responseType;r.isFormData(l)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var g=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";f.Authorization="Basic "+btoa(g+":"+m)}var v=a(t.baseURL,t.url);function y(){if(p){var r="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,s={data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:t,request:p};i(e,n,s),p=null}}if(p.open(t.method.toUpperCase(),o(v,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(y)},p.onabort=function(){p&&(n(h("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(h("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(h(e,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||u(v))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;_&&(f[t.xsrfHeaderName]=_)}"setRequestHeader"in p&&r.forEach(f,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete f[e]:p.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),d&&"json"!==d&&(p.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),n(t),p=null)})),l||(l=null),p.send(l)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),s=n(321),o=n(7185);function a(t){var e=new s(t),n=i(s.prototype.request,e);return r.extend(n,s.prototype,e),r.extend(n,e),n}var c=a(n(5655));c.Axios=s,c.create=function(t){return a(o(c.defaults,t))},c.Cancel=n(5263),c.CancelToken=n(4972),c.isCancel=n(6502),c.all=function(t){return Promise.all(t)},c.spread=n(8713),c.isAxiosError=n(6268),t.exports=c,t.exports.default=c},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),s=n(782),o=n(3572),a=n(7185),c=n(4875),u=c.validators;function h(t){this.defaults=t,this.interceptors={request:new s,response:new s}}h.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&c.assertOptions(e,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)})),!r){var h=[o,void 0];for(Array.prototype.unshift.apply(h,n),h=h.concat(s),i=Promise.resolve(t);h.length;)i=i.then(h.shift(),h.shift());return i}for(var l=t;n.length;){var f=n.shift(),d=n.shift();try{l=f(l)}catch(t){d(t);break}}try{i=o(l)}catch(t){return Promise.reject(t)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},h.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){h.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=h},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,s){var o=new Error(t);return r(o,e,n,i,s)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),s=n(6502),o=n(5655);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||o.adapter)(t).then((function(e){return a(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(a(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],s=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function u(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=c(void 0,t[i])):n[i]=c(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=c(void 0,e[t]))})),r.forEach(s,u),r.forEach(o,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=c(void 0,t[i])):n[i]=c(void 0,e[i])})),r.forEach(a,(function(r){r in e?n[r]=c(t[r],e[r]):r in t&&(n[r]=c(void 0,t[r]))}));var h=i.concat(s).concat(o).concat(a),l=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===h.indexOf(t)}));return r.forEach(l,u),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},8527:(t,e,n)=>{"use strict";var r=n(4867),i=n(5655);t.exports=function(t,e,n){var s=this||i;return r.forEach(n,(function(n){t=n.call(s,t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4867),i=n(6016),s=n(481),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(a(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw s(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){u.headers[t]=r.merge(o)})),t.exports=u},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},5327:(t,e,n)=>{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var s;if(n)s=n(e);else if(r.isURLSearchParams(e))s=e.toString();else{var o=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),o.push(i(e)+"="+i(t))})))})),s=o.join("&")}if(s){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,s,o){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(s)&&a.push("domain="+s),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,s,o={};return t?(r.forEach(t.split("\n"),(function(t){if(s=t.indexOf(":"),e=r.trim(t.substr(0,s)).toLowerCase(),n=r.trim(t.substr(s+1)),e){if(o[e]&&i.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}})),o):o}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,n)=>{"use strict";var r=n(8593),i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var s={},o=r.version.split(".");function a(t,e){for(var n=e?e.split("."):o,r=t.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(t,e,n){var i=e&&a(e);function o(t,e){return"[Axios v"+r.version+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(o(r," has been removed in "+e));return i&&!s[r]&&(s[r]=!0,console.warn(o(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={isOlderVersion:a,assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var s=r[i],o=e[s];if(o){var a=t[s],c=void 0===a||o(a,s,t);if(!0!==c)throw new TypeError("option "+s+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:i}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function s(t){return"[object Array]"===i.call(t)}function o(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function u(t){return"[object Function]"===i.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!o(t)&&null!==t.constructor&&!o(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isPlainObject:c,isUndefined:o,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:u,isStream:function(t){return a(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:h,merge:function t(){var e={};function n(n,r){c(e[r])&&c(n)?e[r]=t(e[r],n):c(n)?e[r]=t({},n):s(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)h(arguments[r],n);return e},extend:function(t,e,n){return h(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},4802:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(804)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},804:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,s,o=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const s=e.formatters[i];if("function"==typeof s){const e=t[o];n=s.call(r,e),t.splice(o,1),o--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(810),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},810:t=>{var e=1e3,n=60*e,r=60*n,i=24*r;function s(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,o){o=o||{};var a,c,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===u&&isFinite(t))return o.long?(a=t,(c=Math.abs(a))>=i?s(a,c,i,"day"):c>=r?s(a,c,r,"hour"):c>=n?s(a,c,n,"minute"):c>=e?s(a,c,e,"second"):a+" ms"):function(t){var s=Math.abs(t);return s>=i?Math.round(t/i)+"d":s>=r?Math.round(t/r)+"h":s>=n?Math.round(t/n)+"m":s>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},6486:function(t,e,n){var r;t=n.nmd(t),function(){var i,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,u=128,h=1/0,l=9007199254740991,f=NaN,d=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",_="[object Error]",b="[object Function]",w="[object GeneratorFunction]",E="[object Map]",S="[object Number]",k="[object Object]",T="[object Promise]",C="[object RegExp]",A="[object Set]",x="[object String]",P="[object Symbol]",O="[object WeakMap]",F="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",M="[object Float64Array]",L="[object Int8Array]",N="[object Int16Array]",j="[object Int32Array]",D="[object Uint8Array]",B="[object Uint8ClampedArray]",U="[object Uint16Array]",V="[object Uint32Array]",G=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,$=RegExp(q.source),X=RegExp(H.source),K=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+|\s+$/g,it=/^\s+/,st=/\s+$/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",kt="a-z\\xdf-\\xf6\\xf8-\\xff",Tt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ct="\\ufe0e\\ufe0f",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xt="["+wt+"]",Pt="["+At+"]",Ot="["+Et+"]",Ft="\\d+",It="["+St+"]",Rt="["+kt+"]",Mt="[^"+wt+At+Ft+St+kt+Tt+"]",Lt="\\ud83c[\\udffb-\\udfff]",Nt="[^"+wt+"]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",Dt="[\\ud800-\\udbff][\\udc00-\\udfff]",Bt="["+Tt+"]",Ut="\\u200d",Vt="(?:"+Rt+"|"+Mt+")",Gt="(?:"+Bt+"|"+Mt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",zt="(?:['’](?:D|LL|M|RE|S|T|VE))?",qt="(?:"+Ot+"|"+Lt+")?",Ht="["+Ct+"]?",$t=Ht+qt+"(?:"+Ut+"(?:"+[Nt,jt,Dt].join("|")+")"+Ht+qt+")*",Xt="(?:"+[It,jt,Dt].join("|")+")"+$t,Kt="(?:"+[Nt+Ot+"?",Ot,jt,Dt,xt].join("|")+")",Yt=RegExp("['’]","g"),Jt=RegExp(Ot,"g"),Zt=RegExp(Lt+"(?="+Lt+")|"+Kt+$t,"g"),Qt=RegExp([Bt+"?"+Rt+"+"+Wt+"(?="+[Pt,Bt,"$"].join("|")+")",Gt+"+"+zt+"(?="+[Pt,Bt+Vt,"$"].join("|")+")",Bt+"?"+Vt+"+"+Wt,Bt+"+"+zt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ft,Xt].join("|"),"g"),te=RegExp("["+Ut+wt+Et+Ct+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,ie={};ie[R]=ie[M]=ie[L]=ie[N]=ie[j]=ie[D]=ie[B]=ie[U]=ie[V]=!0,ie[g]=ie[m]=ie[F]=ie[v]=ie[I]=ie[y]=ie[_]=ie[b]=ie[E]=ie[S]=ie[k]=ie[C]=ie[A]=ie[x]=ie[O]=!1;var se={};se[g]=se[m]=se[F]=se[I]=se[v]=se[y]=se[R]=se[M]=se[L]=se[N]=se[j]=se[E]=se[S]=se[k]=se[C]=se[A]=se[x]=se[P]=se[D]=se[B]=se[U]=se[V]=!0,se[_]=se[b]=se[O]=!1;var oe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ce=parseInt,ue="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,he="object"==typeof self&&self&&self.Object===Object&&self,le=ue||he||Function("return this")(),fe=e&&!e.nodeType&&e,de=fe&&t&&!t.nodeType&&t,pe=de&&de.exports===fe,ge=pe&&ue.process,me=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ve=me&&me.isArrayBuffer,ye=me&&me.isDate,_e=me&&me.isMap,be=me&&me.isRegExp,we=me&&me.isSet,Ee=me&&me.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ke(t,e,n,r){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}function Te(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ce(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function xe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Pe(t,e){return!(null==t||!t.length)&&Be(t,e,0)>-1}function Oe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Fe(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Ie(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Re(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function Me(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ne=We("length");function je(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function De(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function Be(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):De(t,Ve,n)}function Ue(t,e,n,r){for(var i=n-1,s=t.length;++i<s;)if(r(t[i],e))return i;return-1}function Ve(t){return t!=t}function Ge(t,e){var n=null==t?0:t.length;return n?He(t,e)/n:f}function We(t){return function(e){return null==e?i:e[t]}}function ze(t){return function(e){return null==t?i:t[e]}}function qe(t,e,n,r,i){return i(t,(function(t,i,s){n=r?(r=!1,t):e(n,t,i,s)})),n}function He(t,e){for(var n,r=-1,s=t.length;++r<s;){var o=e(t[r]);o!==i&&(n=n===i?o:n+o)}return n}function $e(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Xe(t){return function(e){return t(e)}}function Ke(t,e){return Fe(e,(function(e){return t[e]}))}function Ye(t,e){return t.has(e)}function Je(t,e){for(var n=-1,r=t.length;++n<r&&Be(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length;n--&&Be(e,t[n],0)>-1;);return n}var Qe=ze({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=ze({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function en(t){return"\\"+oe[t]}function nn(t){return te.test(t)}function rn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function on(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n];o!==e&&o!==a||(t[n]=a,s[i++]=n)}return s}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function un(t){return nn(t)?function(t){for(var e=Zt.lastIndex=0;Zt.test(t);)++e;return e}(t):Ne(t)}function hn(t){return nn(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.split("")}(t)}var ln=ze({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),fn=function t(e){var n,r=(e=null==e?le:fn.defaults(le.Object(),e,fn.pick(le,ne))).Array,wt=e.Date,Et=e.Error,St=e.Function,kt=e.Math,Tt=e.Object,Ct=e.RegExp,At=e.String,xt=e.TypeError,Pt=r.prototype,Ot=St.prototype,Ft=Tt.prototype,It=e["__core-js_shared__"],Rt=Ot.toString,Mt=Ft.hasOwnProperty,Lt=0,Nt=(n=/[^.]+$/.exec(It&&It.keys&&It.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",jt=Ft.toString,Dt=Rt.call(Tt),Bt=le._,Ut=Ct("^"+Rt.call(Mt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=pe?e.Buffer:i,Gt=e.Symbol,Wt=e.Uint8Array,zt=Vt?Vt.allocUnsafe:i,qt=sn(Tt.getPrototypeOf,Tt),Ht=Tt.create,$t=Ft.propertyIsEnumerable,Xt=Pt.splice,Kt=Gt?Gt.isConcatSpreadable:i,Zt=Gt?Gt.iterator:i,te=Gt?Gt.toStringTag:i,oe=function(){try{var t=as(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ue=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,he=wt&&wt.now!==le.Date.now&&wt.now,fe=e.setTimeout!==le.setTimeout&&e.setTimeout,de=kt.ceil,ge=kt.floor,me=Tt.getOwnPropertySymbols,Ne=Vt?Vt.isBuffer:i,ze=e.isFinite,dn=Pt.join,pn=sn(Tt.keys,Tt),gn=kt.max,mn=kt.min,vn=wt.now,yn=e.parseInt,_n=kt.random,bn=Pt.reverse,wn=as(e,"DataView"),En=as(e,"Map"),Sn=as(e,"Promise"),kn=as(e,"Set"),Tn=as(e,"WeakMap"),Cn=as(Tt,"create"),An=Tn&&new Tn,xn={},Pn=Ls(wn),On=Ls(En),Fn=Ls(Sn),In=Ls(kn),Rn=Ls(Tn),Mn=Gt?Gt.prototype:i,Ln=Mn?Mn.valueOf:i,Nn=Mn?Mn.toString:i;function jn(t){if(Qo(t)&&!Go(t)&&!(t instanceof Vn)){if(t instanceof Un)return t;if(Mt.call(t,"__wrapped__"))return Ns(t)}return new Un(t)}var Dn=function(){function t(){}return function(e){if(!Zo(e))return{};if(Ht)return Ht(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Bn(){}function Un(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Vn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new zn;++e<n;)this.add(t[e])}function Hn(t){var e=this.__data__=new Wn(t);this.size=e.size}function $n(t,e){var n=Go(t),r=!n&&Vo(t),i=!n&&!r&&Ho(t),s=!n&&!r&&!i&&aa(t),o=n||r||i||s,a=o?$e(t.length,At):[],c=a.length;for(var u in t)!e&&!Mt.call(t,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ps(u,c))||a.push(u);return a}function Xn(t){var e=t.length;return e?t[zr(0,e-1)]:i}function Kn(t,e){return Os(Ti(t),ir(e,0,t.length))}function Yn(t){return Os(Ti(t))}function Jn(t,e,n){(n!==i&&!Do(t[e],n)||n===i&&!(e in t))&&nr(t,e,n)}function Zn(t,e,n){var r=t[e];Mt.call(t,e)&&Do(r,n)&&(n!==i||e in t)||nr(t,e,n)}function Qn(t,e){for(var n=t.length;n--;)if(Do(t[n][0],e))return n;return-1}function tr(t,e,n,r){return ur(t,(function(t,i,s){e(r,t,n(t),s)})),r}function er(t,e){return t&&Ci(e,Pa(e),t)}function nr(t,e,n){"__proto__"==e&&oe?oe(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function rr(t,e){for(var n=-1,s=e.length,o=r(s),a=null==t;++n<s;)o[n]=a?i:ka(t,e[n]);return o}function ir(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function sr(t,e,n,r,s,o){var a,c=1&e,u=2&e,h=4&e;if(n&&(a=s?n(t,r,s,o):n(t)),a!==i)return a;if(!Zo(t))return t;var l=Go(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Mt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return Ti(t,a)}else{var f=hs(t),d=f==b||f==w;if(Ho(t))return _i(t,c);if(f==k||f==g||d&&!s){if(a=u||d?{}:fs(t),!c)return u?function(t,e){return Ci(t,us(t),e)}(t,function(t,e){return t&&Ci(e,Oa(e),t)}(a,t)):function(t,e){return Ci(t,cs(t),e)}(t,er(a,t))}else{if(!se[f])return s?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case F:return bi(t);case v:case y:return new i(+t);case I:return function(t,e){var n=e?bi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case M:case L:case N:case j:case D:case B:case U:case V:return wi(t,n);case E:return new i;case S:case x:return new i(t);case C:return function(t){var e=new t.constructor(t.source,ft.exec(t));return e.lastIndex=t.lastIndex,e}(t);case A:return new i;case P:return r=t,Ln?Tt(Ln.call(r)):{}}}(t,f,c)}}o||(o=new Hn);var p=o.get(t);if(p)return p;o.set(t,a),ia(t)?t.forEach((function(r){a.add(sr(r,e,n,r,t,o))})):ta(t)&&t.forEach((function(r,i){a.set(i,sr(r,e,n,i,t,o))}));var m=l?i:(h?u?ts:Qi:u?Oa:Pa)(t);return Te(m||t,(function(r,i){m&&(r=t[i=r]),Zn(a,i,sr(r,e,n,i,t,o))})),a}function or(t,e,n){var r=n.length;if(null==t)return!r;for(t=Tt(t);r--;){var s=n[r],o=e[s],a=t[s];if(a===i&&!(s in t)||!o(a))return!1}return!0}function ar(t,e,n){if("function"!=typeof t)throw new xt(s);return Cs((function(){t.apply(i,n)}),e)}function cr(t,e,n,r){var i=-1,s=Pe,o=!0,a=t.length,c=[],u=e.length;if(!a)return c;n&&(e=Fe(e,Xe(n))),r?(s=Oe,o=!1):e.length>=200&&(s=Ye,o=!1,e=new qn(e));t:for(;++i<a;){var h=t[i],l=null==n?h:n(h);if(h=r||0!==h?h:0,o&&l==l){for(var f=u;f--;)if(e[f]===l)continue t;c.push(h)}else s(e,l,r)||c.push(h)}return c}jn.templateSettings={escape:K,evaluate:Y,interpolate:J,variable:"",imports:{_:jn}},jn.prototype=Bn.prototype,jn.prototype.constructor=jn,Un.prototype=Dn(Bn.prototype),Un.prototype.constructor=Un,Vn.prototype=Dn(Bn.prototype),Vn.prototype.constructor=Vn,Gn.prototype.clear=function(){this.__data__=Cn?Cn(null):{},this.size=0},Gn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gn.prototype.get=function(t){var e=this.__data__;if(Cn){var n=e[t];return n===o?i:n}return Mt.call(e,t)?e[t]:i},Gn.prototype.has=function(t){var e=this.__data__;return Cn?e[t]!==i:Mt.call(e,t)},Gn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Cn&&e===i?o:e,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(t){var e=this.__data__,n=Qn(e,t);return!(n<0||(n==e.length-1?e.pop():Xt.call(e,n,1),--this.size,0))},Wn.prototype.get=function(t){var e=this.__data__,n=Qn(e,t);return n<0?i:e[n][1]},Wn.prototype.has=function(t){return Qn(this.__data__,t)>-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=Qn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(En||Wn),string:new Gn}},zn.prototype.delete=function(t){var e=ss(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return ss(this,t).get(t)},zn.prototype.has=function(t){return ss(this,t).has(t)},zn.prototype.set=function(t,e){var n=ss(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(t){return this.__data__.set(t,o),this},qn.prototype.has=function(t){return this.__data__.has(t)},Hn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Hn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Hn.prototype.get=function(t){return this.__data__.get(t)},Hn.prototype.has=function(t){return this.__data__.has(t)},Hn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!En||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var ur=Pi(vr),hr=Pi(yr,!0);function lr(t,e){var n=!0;return ur(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function fr(t,e,n){for(var r=-1,s=t.length;++r<s;){var o=t[r],a=e(o);if(null!=a&&(c===i?a==a&&!oa(a):n(a,c)))var c=a,u=o}return u}function dr(t,e){var n=[];return ur(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function pr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=ds),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?pr(a,e-1,n,r,i):Ie(i,a):r||(i[i.length]=a)}return i}var gr=Oi(),mr=Oi(!0);function vr(t,e){return t&&gr(t,e,Pa)}function yr(t,e){return t&&mr(t,e,Pa)}function _r(t,e){return xe(e,(function(e){return Ko(t[e])}))}function br(t,e){for(var n=0,r=(e=gi(e,t)).length;null!=t&&n<r;)t=t[Ms(e[n++])];return n&&n==r?t:i}function wr(t,e,n){var r=e(t);return Go(t)?r:Ie(r,n(t))}function Er(t){return null==t?t===i?"[object Undefined]":"[object Null]":te&&te in Tt(t)?function(t){var e=Mt.call(t,te),n=t[te];try{t[te]=i;var r=!0}catch(t){}var s=jt.call(t);return r&&(e?t[te]=n:delete t[te]),s}(t):function(t){return jt.call(t)}(t)}function Sr(t,e){return t>e}function kr(t,e){return null!=t&&Mt.call(t,e)}function Tr(t,e){return null!=t&&e in Tt(t)}function Cr(t,e,n){for(var s=n?Oe:Pe,o=t[0].length,a=t.length,c=a,u=r(a),h=1/0,l=[];c--;){var f=t[c];c&&e&&(f=Fe(f,Xe(e))),h=mn(f.length,h),u[c]=!n&&(e||o>=120&&f.length>=120)?new qn(c&&f):i}f=t[0];var d=-1,p=u[0];t:for(;++d<o&&l.length<h;){var g=f[d],m=e?e(g):g;if(g=n||0!==g?g:0,!(p?Ye(p,m):s(l,m,n))){for(c=a;--c;){var v=u[c];if(!(v?Ye(v,m):s(t[c],m,n)))continue t}p&&p.push(m),l.push(g)}}return l}function Ar(t,e,n){var r=null==(t=Ss(t,e=gi(e,t)))?t:t[Ms($s(e))];return null==r?i:Se(r,t,n)}function xr(t){return Qo(t)&&Er(t)==g}function Pr(t,e,n,r,s){return t===e||(null==t||null==e||!Qo(t)&&!Qo(e)?t!=t&&e!=e:function(t,e,n,r,s,o){var a=Go(t),c=Go(e),u=a?m:hs(t),h=c?m:hs(e),l=(u=u==g?k:u)==k,f=(h=h==g?k:h)==k,d=u==h;if(d&&Ho(t)){if(!Ho(e))return!1;a=!0,l=!1}if(d&&!l)return o||(o=new Hn),a||aa(t)?Ji(t,e,n,r,s,o):function(t,e,n,r,i,s,o){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case F:return!(t.byteLength!=e.byteLength||!s(new Wt(t),new Wt(e)));case v:case y:case S:return Do(+t,+e);case _:return t.name==e.name&&t.message==e.message;case C:case x:return t==e+"";case E:var a=rn;case A:var c=1&r;if(a||(a=an),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;r|=2,o.set(t,e);var h=Ji(a(t),a(e),r,i,s,o);return o.delete(t),h;case P:if(Ln)return Ln.call(t)==Ln.call(e)}return!1}(t,e,u,n,r,s,o);if(!(1&n)){var p=l&&Mt.call(t,"__wrapped__"),b=f&&Mt.call(e,"__wrapped__");if(p||b){var w=p?t.value():t,T=b?e.value():e;return o||(o=new Hn),s(w,T,n,r,o)}}return!!d&&(o||(o=new Hn),function(t,e,n,r,s,o){var a=1&n,c=Qi(t),u=c.length;if(u!=Qi(e).length&&!a)return!1;for(var h=u;h--;){var l=c[h];if(!(a?l in e:Mt.call(e,l)))return!1}var f=o.get(t),d=o.get(e);if(f&&d)return f==e&&d==t;var p=!0;o.set(t,e),o.set(e,t);for(var g=a;++h<u;){var m=t[l=c[h]],v=e[l];if(r)var y=a?r(v,m,l,e,t,o):r(m,v,l,t,e,o);if(!(y===i?m===v||s(m,v,n,r,o):y)){p=!1;break}g||(g="constructor"==l)}if(p&&!g){var _=t.constructor,b=e.constructor;_==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,s,o))}(t,e,n,r,Pr,s))}function Or(t,e,n,r){var s=n.length,o=s,a=!r;if(null==t)return!o;for(t=Tt(t);s--;){var c=n[s];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++s<o;){var u=(c=n[s])[0],h=t[u],l=c[1];if(a&&c[2]){if(h===i&&!(u in t))return!1}else{var f=new Hn;if(r)var d=r(h,l,u,t,e,f);if(!(d===i?Pr(l,h,3,r,f):d))return!1}}return!0}function Fr(t){return!(!Zo(t)||(e=t,Nt&&Nt in e))&&(Ko(t)?Ut:gt).test(Ls(t));var e}function Ir(t){return"function"==typeof t?t:null==t?ec:"object"==typeof t?Go(t)?jr(t[0],t[1]):Nr(t):hc(t)}function Rr(t){if(!_s(t))return pn(t);var e=[];for(var n in Tt(t))Mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Mr(t,e){return t<e}function Lr(t,e){var n=-1,i=zo(t)?r(t.length):[];return ur(t,(function(t,r,s){i[++n]=e(t,r,s)})),i}function Nr(t){var e=os(t);return 1==e.length&&e[0][2]?ws(e[0][0],e[0][1]):function(n){return n===t||Or(n,t,e)}}function jr(t,e){return ms(t)&&bs(e)?ws(Ms(t),e):function(n){var r=ka(n,t);return r===i&&r===e?Ta(n,t):Pr(e,r,3)}}function Dr(t,e,n,r,s){t!==e&&gr(e,(function(o,a){if(s||(s=new Hn),Zo(o))!function(t,e,n,r,s,o,a){var c=ks(t,n),u=ks(e,n),h=a.get(u);if(h)Jn(t,n,h);else{var l=o?o(c,u,n+"",t,e,a):i,f=l===i;if(f){var d=Go(u),p=!d&&Ho(u),g=!d&&!p&&aa(u);l=u,d||p||g?Go(c)?l=c:qo(c)?l=Ti(c):p?(f=!1,l=_i(u,!0)):g?(f=!1,l=wi(u,!0)):l=[]:na(u)||Vo(u)?(l=c,Vo(c)?l=ga(c):Zo(c)&&!Ko(c)||(l=fs(u))):f=!1}f&&(a.set(u,l),s(l,u,r,o,a),a.delete(u)),Jn(t,n,l)}}(t,e,a,n,Dr,r,s);else{var c=r?r(ks(t,a),o,a+"",t,e,s):i;c===i&&(c=o),Jn(t,a,c)}}),Oa)}function Br(t,e){var n=t.length;if(n)return ps(e+=e<0?n:0,n)?t[e]:i}function Ur(t,e,n){e=e.length?Fe(e,(function(t){return Go(t)?function(e){return br(e,1===t.length?t[0]:t)}:t})):[ec];var r=-1;e=Fe(e,Xe(is()));var i=Lr(t,(function(t,n,i){var s=Fe(e,(function(e){return e(t)}));return{criteria:s,index:++r,value:t}}));return function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,s=e.criteria,o=i.length,a=n.length;++r<o;){var c=Ei(i[r],s[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Vr(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=br(t,o);n(a,o)&&Kr(s,gi(o,t),a)}return s}function Gr(t,e,n,r){var i=r?Ue:Be,s=-1,o=e.length,a=t;for(t===e&&(e=Ti(e)),n&&(a=Fe(t,Xe(n)));++s<o;)for(var c=0,u=e[s],h=n?n(u):u;(c=i(a,h,c,r))>-1;)a!==t&&Xt.call(a,c,1),Xt.call(t,c,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;ps(i)?Xt.call(t,i,1):ai(t,i)}}return t}function zr(t,e){return t+ge(_n()*(e-t+1))}function qr(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Hr(t,e){return As(Es(t,e,ec),t+"")}function $r(t){return Xn(Da(t))}function Xr(t,e){var n=Da(t);return Os(n,ir(e,0,n.length))}function Kr(t,e,n,r){if(!Zo(t))return t;for(var s=-1,o=(e=gi(e,t)).length,a=o-1,c=t;null!=c&&++s<o;){var u=Ms(e[s]),h=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(s!=a){var l=c[u];(h=r?r(l,u,c):i)===i&&(h=Zo(l)?l:ps(e[s+1])?[]:{})}Zn(c,u,h),c=c[u]}return t}var Yr=An?function(t,e){return An.set(t,e),t}:ec,Jr=oe?function(t,e){return oe(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:ec;function Zr(t){return Os(Da(t))}function Qr(t,e,n){var i=-1,s=t.length;e<0&&(e=-e>s?0:s+e),(n=n>s?s:n)<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var o=r(s);++i<s;)o[i]=t[i+e];return o}function ti(t,e){var n;return ur(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ei(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=t[s];null!==o&&!oa(o)&&(n?o<=e:o<e)?r=s+1:i=s}return i}return ni(t,e,ec,n)}function ni(t,e,n,r){var s=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!=e,c=null===e,u=oa(e),h=e===i;s<o;){var l=ge((s+o)/2),f=n(t[l]),d=f!==i,p=null===f,g=f==f,m=oa(f);if(a)var v=r||g;else v=h?g&&(r||d):c?g&&d&&(r||!p):u?g&&d&&!p&&(r||!m):!p&&!m&&(r?f<=e:f<e);v?s=l+1:o=l}return mn(o,4294967294)}function ri(t,e){for(var n=-1,r=t.length,i=0,s=[];++n<r;){var o=t[n],a=e?e(o):o;if(!n||!Do(a,c)){var c=a;s[i++]=0===o?0:o}}return s}function ii(t){return"number"==typeof t?t:oa(t)?f:+t}function si(t){if("string"==typeof t)return t;if(Go(t))return Fe(t,si)+"";if(oa(t))return Nn?Nn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function oi(t,e,n){var r=-1,i=Pe,s=t.length,o=!0,a=[],c=a;if(n)o=!1,i=Oe;else if(s>=200){var u=e?null:qi(t);if(u)return an(u);o=!1,i=Ye,c=new qn}else c=e?[]:a;t:for(;++r<s;){var h=t[r],l=e?e(h):h;if(h=n||0!==h?h:0,o&&l==l){for(var f=c.length;f--;)if(c[f]===l)continue t;e&&c.push(l),a.push(h)}else i(c,l,n)||(c!==a&&c.push(l),a.push(h))}return a}function ai(t,e){return null==(t=Ss(t,e=gi(e,t)))||delete t[Ms($s(e))]}function ci(t,e,n,r){return Kr(t,e,n(br(t,e)),r)}function ui(t,e,n,r){for(var i=t.length,s=r?i:-1;(r?s--:++s<i)&&e(t[s],s,t););return n?Qr(t,r?0:s,r?s+1:i):Qr(t,r?s+1:0,r?i:s)}function hi(t,e){var n=t;return n instanceof Vn&&(n=n.value()),Re(e,(function(t,e){return e.func.apply(e.thisArg,Ie([t],e.args))}),n)}function li(t,e,n){var i=t.length;if(i<2)return i?oi(t[0]):[];for(var s=-1,o=r(i);++s<i;)for(var a=t[s],c=-1;++c<i;)c!=s&&(o[s]=cr(o[s]||a,t[c],e,n));return oi(pr(o,1),e,n)}function fi(t,e,n){for(var r=-1,s=t.length,o=e.length,a={};++r<s;){var c=r<o?e[r]:i;n(a,t[r],c)}return a}function di(t){return qo(t)?t:[]}function pi(t){return"function"==typeof t?t:ec}function gi(t,e){return Go(t)?t:ms(t,e)?[t]:Rs(ma(t))}var mi=Hr;function vi(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:Qr(t,e,n)}var yi=ue||function(t){return le.clearTimeout(t)};function _i(t,e){if(e)return t.slice();var n=t.length,r=zt?zt(n):new t.constructor(n);return t.copy(r),r}function bi(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function wi(t,e){var n=e?bi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ei(t,e){if(t!==e){var n=t!==i,r=null===t,s=t==t,o=oa(t),a=e!==i,c=null===e,u=e==e,h=oa(e);if(!c&&!h&&!o&&t>e||o&&a&&u&&!c&&!h||r&&a&&u||!n&&u||!s)return 1;if(!r&&!o&&!h&&t<e||h&&n&&s&&!r&&!o||c&&n&&s||!a&&s||!u)return-1}return 0}function Si(t,e,n,i){for(var s=-1,o=t.length,a=n.length,c=-1,u=e.length,h=gn(o-a,0),l=r(u+h),f=!i;++c<u;)l[c]=e[c];for(;++s<a;)(f||s<o)&&(l[n[s]]=t[s]);for(;h--;)l[c++]=t[s++];return l}function ki(t,e,n,i){for(var s=-1,o=t.length,a=-1,c=n.length,u=-1,h=e.length,l=gn(o-c,0),f=r(l+h),d=!i;++s<l;)f[s]=t[s];for(var p=s;++u<h;)f[p+u]=e[u];for(;++a<c;)(d||s<o)&&(f[p+n[a]]=t[s++]);return f}function Ti(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ci(t,e,n,r){var s=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var c=e[o],u=r?r(n[c],t[c],c,n,t):i;u===i&&(u=t[c]),s?nr(n,c,u):Zn(n,c,u)}return n}function Ai(t,e){return function(n,r){var i=Go(n)?ke:tr,s=e?e():{};return i(n,t,is(r,2),s)}}function xi(t){return Hr((function(e,n){var r=-1,s=n.length,o=s>1?n[s-1]:i,a=s>2?n[2]:i;for(o=t.length>3&&"function"==typeof o?(s--,o):i,a&&gs(n[0],n[1],a)&&(o=s<3?i:o,s=1),e=Tt(e);++r<s;){var c=n[r];c&&t(e,c,r,o)}return e}))}function Pi(t,e){return function(n,r){if(null==n)return n;if(!zo(n))return t(n,r);for(var i=n.length,s=e?i:-1,o=Tt(n);(e?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function Oi(t){return function(e,n,r){for(var i=-1,s=Tt(e),o=r(e),a=o.length;a--;){var c=o[t?a:++i];if(!1===n(s[c],c,s))break}return e}}function Fi(t){return function(e){var n=nn(e=ma(e))?hn(e):i,r=n?n[0]:e.charAt(0),s=n?vi(n,1).join(""):e.slice(1);return r[t]()+s}}function Ii(t){return function(e){return Re(Ka(Va(e).replace(Yt,"")),t,"")}}function Ri(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Dn(t.prototype),r=t.apply(n,e);return Zo(r)?r:n}}function Mi(t){return function(e,n,r){var s=Tt(e);if(!zo(e)){var o=is(n,3);e=Pa(e),n=function(t){return o(s[t],t,s)}}var a=t(e,n,r);return a>-1?s[o?e[a]:a]:i}}function Li(t){return Zi((function(e){var n=e.length,r=n,o=Un.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new xt(s);if(o&&!c&&"wrapper"==ns(a))var c=new Un([],!0)}for(r=c?r:n;++r<n;){var u=ns(a=e[r]),h="wrapper"==u?es(a):i;c=h&&vs(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?c[ns(h[0])].apply(c,h[3]):1==a.length&&vs(a)?c[u]():c.thru(a)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Go(r))return c.plant(r).value();for(var i=0,s=n?e[i].apply(this,t):r;++i<n;)s=e[i].call(this,s);return s}}))}function Ni(t,e,n,s,o,a,c,h,l,f){var d=e&u,p=1&e,g=2&e,m=24&e,v=512&e,y=g?i:Ri(t);return function u(){for(var _=arguments.length,b=r(_),w=_;w--;)b[w]=arguments[w];if(m)var E=rs(u),S=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(b,E);if(s&&(b=Si(b,s,o,m)),a&&(b=ki(b,a,c,m)),_-=S,m&&_<f){var k=on(b,E);return Wi(t,e,Ni,u.placeholder,n,b,k,h,l,f-_)}var T=p?n:this,C=g?T[t]:t;return _=b.length,h?b=function(t,e){for(var n=t.length,r=mn(e.length,n),s=Ti(t);r--;){var o=e[r];t[r]=ps(o,n)?s[o]:i}return t}(b,h):v&&_>1&&b.reverse(),d&&l<_&&(b.length=l),this&&this!==le&&this instanceof u&&(C=y||Ri(C)),C.apply(T,b)}}function ji(t,e){return function(n,r){return function(t,e,n,r){return vr(t,(function(t,i,s){e(r,n(t),i,s)})),r}(n,t,e(r),{})}}function Di(t,e){return function(n,r){var s;if(n===i&&r===i)return e;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=ii(n),r=ii(r)),s=t(n,r)}return s}}function Bi(t){return Zi((function(e){return e=Fe(e,Xe(is())),Hr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Ui(t,e){var n=(e=e===i?" ":si(e)).length;if(n<2)return n?qr(e,t):e;var r=qr(e,de(t/un(e)));return nn(e)?vi(hn(r),0,t).join(""):r.slice(0,t)}function Vi(t){return function(e,n,s){return s&&"number"!=typeof s&&gs(e,n,s)&&(n=s=i),e=la(e),n===i?(n=e,e=0):n=la(n),function(t,e,n,i){for(var s=-1,o=gn(de((e-t)/(n||1)),0),a=r(o);o--;)a[i?o:++s]=t,t+=n;return a}(e,n,s=s===i?e<n?1:-1:la(s),t)}}function Gi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=pa(e),n=pa(n)),t(e,n)}}function Wi(t,e,n,r,s,o,a,u,h,l){var f=8&e;e|=f?c:64,4&(e&=~(f?64:c))||(e&=-4);var d=[t,e,s,f?o:i,f?a:i,f?i:o,f?i:a,u,h,l],p=n.apply(i,d);return vs(t)&&Ts(p,d),p.placeholder=r,xs(p,t,e)}function zi(t){var e=kt[t];return function(t,n){if(t=pa(t),(n=null==n?0:mn(fa(n),292))&&ze(t)){var r=(ma(t)+"e").split("e");return+((r=(ma(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var qi=kn&&1/an(new kn([,-0]))[1]==h?function(t){return new kn(t)}:oc;function Hi(t){return function(e){var n=hs(e);return n==E?rn(e):n==A?cn(e):function(t,e){return Fe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function $i(t,e,n,o,h,l,f,d){var p=2&e;if(!p&&"function"!=typeof t)throw new xt(s);var g=o?o.length:0;if(g||(e&=-97,o=h=i),f=f===i?f:gn(fa(f),0),d=d===i?d:fa(d),g-=h?h.length:0,64&e){var m=o,v=h;o=h=i}var y=p?i:es(t),_=[t,e,n,o,h,m,v,l,f,d];if(y&&function(t,e){var n=t[1],r=e[1],i=n|r,s=i<131,o=r==u&&8==n||r==u&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!s&&!o)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var c=e[3];if(c){var h=t[3];t[3]=h?Si(h,c,e[4]):c,t[4]=h?on(t[3],a):e[4]}(c=e[5])&&(h=t[5],t[5]=h?ki(h,c,e[6]):c,t[6]=h?on(t[5],a):e[6]),(c=e[7])&&(t[7]=c),r&u&&(t[8]=null==t[8]?e[8]:mn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(_,y),t=_[0],e=_[1],n=_[2],o=_[3],h=_[4],!(d=_[9]=_[9]===i?p?0:t.length:gn(_[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)b=8==e||16==e?function(t,e,n){var s=Ri(t);return function o(){for(var a=arguments.length,c=r(a),u=a,h=rs(o);u--;)c[u]=arguments[u];var l=a<3&&c[0]!==h&&c[a-1]!==h?[]:on(c,h);return(a-=l.length)<n?Wi(t,e,Ni,o.placeholder,i,c,l,i,i,n-a):Se(this&&this!==le&&this instanceof o?s:t,this,c)}}(t,e,d):e!=c&&33!=e||h.length?Ni.apply(i,_):function(t,e,n,i){var s=1&e,o=Ri(t);return function e(){for(var a=-1,c=arguments.length,u=-1,h=i.length,l=r(h+c),f=this&&this!==le&&this instanceof e?o:t;++u<h;)l[u]=i[u];for(;c--;)l[u++]=arguments[++a];return Se(f,s?n:this,l)}}(t,e,n,o);else var b=function(t,e,n){var r=1&e,i=Ri(t);return function e(){return(this&&this!==le&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return xs((y?Yr:Ts)(b,_),t,e)}function Xi(t,e,n,r){return t===i||Do(t,Ft[n])&&!Mt.call(r,n)?e:t}function Ki(t,e,n,r,s,o){return Zo(t)&&Zo(e)&&(o.set(e,t),Dr(t,e,i,Ki,o),o.delete(e)),t}function Yi(t){return na(t)?i:t}function Ji(t,e,n,r,s,o){var a=1&n,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var h=o.get(t),l=o.get(e);if(h&&l)return h==e&&l==t;var f=-1,d=!0,p=2&n?new qn:i;for(o.set(t,e),o.set(e,t);++f<c;){var g=t[f],m=e[f];if(r)var v=a?r(m,g,f,e,t,o):r(g,m,f,t,e,o);if(v!==i){if(v)continue;d=!1;break}if(p){if(!Le(e,(function(t,e){if(!Ye(p,e)&&(g===t||s(g,t,n,r,o)))return p.push(e)}))){d=!1;break}}else if(g!==m&&!s(g,m,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Zi(t){return As(Es(t,i,Gs),t+"")}function Qi(t){return wr(t,Pa,cs)}function ts(t){return wr(t,Oa,us)}var es=An?function(t){return An.get(t)}:oc;function ns(t){for(var e=t.name+"",n=xn[e],r=Mt.call(xn,e)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==t)return i.name}return e}function rs(t){return(Mt.call(jn,"placeholder")?jn:t).placeholder}function is(){var t=jn.iteratee||nc;return t=t===nc?Ir:t,arguments.length?t(arguments[0],arguments[1]):t}function ss(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function os(t){for(var e=Pa(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,bs(i)]}return e}function as(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Fr(n)?n:i}var cs=me?function(t){return null==t?[]:(t=Tt(t),xe(me(t),(function(e){return $t.call(t,e)})))}:dc,us=me?function(t){for(var e=[];t;)Ie(e,cs(t)),t=qt(t);return e}:dc,hs=Er;function ls(t,e,n){for(var r=-1,i=(e=gi(e,t)).length,s=!1;++r<i;){var o=Ms(e[r]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++r!=i?s:!!(i=null==t?0:t.length)&&Jo(i)&&ps(o,i)&&(Go(t)||Vo(t))}function fs(t){return"function"!=typeof t.constructor||_s(t)?{}:Dn(qt(t))}function ds(t){return Go(t)||Vo(t)||!!(Kt&&t&&t[Kt])}function ps(t,e){var n=typeof t;return!!(e=null==e?l:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function gs(t,e,n){if(!Zo(n))return!1;var r=typeof e;return!!("number"==r?zo(n)&&ps(e,n.length):"string"==r&&e in n)&&Do(n[e],t)}function ms(t,e){if(Go(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!oa(t))||Q.test(t)||!Z.test(t)||null!=e&&t in Tt(e)}function vs(t){var e=ns(t),n=jn[e];if("function"!=typeof n||!(e in Vn.prototype))return!1;if(t===n)return!0;var r=es(n);return!!r&&t===r[0]}(wn&&hs(new wn(new ArrayBuffer(1)))!=I||En&&hs(new En)!=E||Sn&&hs(Sn.resolve())!=T||kn&&hs(new kn)!=A||Tn&&hs(new Tn)!=O)&&(hs=function(t){var e=Er(t),n=e==k?t.constructor:i,r=n?Ls(n):"";if(r)switch(r){case Pn:return I;case On:return E;case Fn:return T;case In:return A;case Rn:return O}return e});var ys=It?Ko:pc;function _s(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ft)}function bs(t){return t==t&&!Zo(t)}function ws(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in Tt(n))}}function Es(t,e,n){return e=gn(e===i?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=gn(i.length-e,0),a=r(o);++s<o;)a[s]=i[e+s];s=-1;for(var c=r(e+1);++s<e;)c[s]=i[s];return c[e]=n(a),Se(t,this,c)}}function Ss(t,e){return e.length<2?t:br(t,Qr(e,0,-1))}function ks(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ts=Ps(Yr),Cs=fe||function(t,e){return le.setTimeout(t,e)},As=Ps(Jr);function xs(t,e,n){var r=e+"";return As(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Te(p,(function(n){var r="_."+n[0];e&n[1]&&!Pe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(ct):[]}(r),n)))}function Ps(t){var e=0,n=0;return function(){var r=vn(),s=16-(r-n);if(n=r,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Os(t,e){var n=-1,r=t.length,s=r-1;for(e=e===i?r:e;++n<e;){var o=zr(n,s),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var Fs,Is,Rs=(Fs=Io((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,i){e.push(r?i.replace(ht,"$1"):n||t)})),e}),(function(t){return 500===Is.size&&Is.clear(),t})),Is=Fs.cache,Fs);function Ms(t){if("string"==typeof t||oa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ls(t){if(null!=t){try{return Rt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ns(t){if(t instanceof Vn)return t.clone();var e=new Un(t.__wrapped__,t.__chain__);return e.__actions__=Ti(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var js=Hr((function(t,e){return qo(t)?cr(t,pr(e,1,qo,!0)):[]})),Ds=Hr((function(t,e){var n=$s(e);return qo(n)&&(n=i),qo(t)?cr(t,pr(e,1,qo,!0),is(n,2)):[]})),Bs=Hr((function(t,e){var n=$s(e);return qo(n)&&(n=i),qo(t)?cr(t,pr(e,1,qo,!0),i,n):[]}));function Us(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:fa(n);return i<0&&(i=gn(r+i,0)),De(t,is(e,3),i)}function Vs(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r-1;return n!==i&&(s=fa(n),s=n<0?gn(r+s,0):mn(s,r-1)),De(t,is(e,3),s,!0)}function Gs(t){return null!=t&&t.length?pr(t,1):[]}function Ws(t){return t&&t.length?t[0]:i}var zs=Hr((function(t){var e=Fe(t,di);return e.length&&e[0]===t[0]?Cr(e):[]})),qs=Hr((function(t){var e=$s(t),n=Fe(t,di);return e===$s(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Cr(n,is(e,2)):[]})),Hs=Hr((function(t){var e=$s(t),n=Fe(t,di);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Cr(n,i,e):[]}));function $s(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Xs=Hr(Ks);function Ks(t,e){return t&&t.length&&e&&e.length?Gr(t,e):t}var Ys=Zi((function(t,e){var n=null==t?0:t.length,r=rr(t,e);return Wr(t,Fe(e,(function(t){return ps(t,n)?+t:t})).sort(Ei)),r}));function Js(t){return null==t?t:bn.call(t)}var Zs=Hr((function(t){return oi(pr(t,1,qo,!0))})),Qs=Hr((function(t){var e=$s(t);return qo(e)&&(e=i),oi(pr(t,1,qo,!0),is(e,2))})),to=Hr((function(t){var e=$s(t);return e="function"==typeof e?e:i,oi(pr(t,1,qo,!0),i,e)}));function eo(t){if(!t||!t.length)return[];var e=0;return t=xe(t,(function(t){if(qo(t))return e=gn(t.length,e),!0})),$e(e,(function(e){return Fe(t,We(e))}))}function no(t,e){if(!t||!t.length)return[];var n=eo(t);return null==e?n:Fe(n,(function(t){return Se(e,i,t)}))}var ro=Hr((function(t,e){return qo(t)?cr(t,e):[]})),io=Hr((function(t){return li(xe(t,qo))})),so=Hr((function(t){var e=$s(t);return qo(e)&&(e=i),li(xe(t,qo),is(e,2))})),oo=Hr((function(t){var e=$s(t);return e="function"==typeof e?e:i,li(xe(t,qo),i,e)})),ao=Hr(eo),co=Hr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,no(t,n)}));function uo(t){var e=jn(t);return e.__chain__=!0,e}function ho(t,e){return e(t)}var lo=Zi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,s=function(e){return rr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Vn&&ps(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ho,args:[s],thisArg:i}),new Un(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(s)})),fo=Ai((function(t,e,n){Mt.call(t,n)?++t[n]:nr(t,n,1)})),po=Mi(Us),go=Mi(Vs);function mo(t,e){return(Go(t)?Te:ur)(t,is(e,3))}function vo(t,e){return(Go(t)?Ce:hr)(t,is(e,3))}var yo=Ai((function(t,e,n){Mt.call(t,n)?t[n].push(e):nr(t,n,[e])})),_o=Hr((function(t,e,n){var i=-1,s="function"==typeof e,o=zo(t)?r(t.length):[];return ur(t,(function(t){o[++i]=s?Se(e,t,n):Ar(t,e,n)})),o})),bo=Ai((function(t,e,n){nr(t,n,e)}));function wo(t,e){return(Go(t)?Fe:Lr)(t,is(e,3))}var Eo=Ai((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),So=Hr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&gs(t,e[0],e[1])?e=[]:n>2&&gs(e[0],e[1],e[2])&&(e=[e[0]]),Ur(t,pr(e,1),[])})),ko=he||function(){return le.Date.now()};function To(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,$i(t,u,i,i,i,i,e)}function Co(t,e){var n;if("function"!=typeof e)throw new xt(s);return t=fa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ao=Hr((function(t,e,n){var r=1;if(n.length){var i=on(n,rs(Ao));r|=c}return $i(t,r,e,n,i)})),xo=Hr((function(t,e,n){var r=3;if(n.length){var i=on(n,rs(xo));r|=c}return $i(e,r,t,n,i)}));function Po(t,e,n){var r,o,a,c,u,h,l=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new xt(s);function g(e){var n=r,s=o;return r=o=i,l=e,c=t.apply(s,n)}function m(t){var n=t-h;return h===i||n>=e||n<0||d&&t-l>=a}function v(){var t=ko();if(m(t))return y(t);u=Cs(v,function(t){var n=e-(t-h);return d?mn(n,a-(t-l)):n}(t))}function y(t){return u=i,p&&r?g(t):(r=o=i,c)}function _(){var t=ko(),n=m(t);if(r=arguments,o=this,h=t,n){if(u===i)return function(t){return l=t,u=Cs(v,e),f?g(t):c}(h);if(d)return yi(u),u=Cs(v,e),g(h)}return u===i&&(u=Cs(v,e)),c}return e=pa(e)||0,Zo(n)&&(f=!!n.leading,a=(d="maxWait"in n)?gn(pa(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){u!==i&&yi(u),l=0,r=h=o=u=i},_.flush=function(){return u===i?c:y(ko())},_}var Oo=Hr((function(t,e){return ar(t,1,e)})),Fo=Hr((function(t,e,n){return ar(t,pa(e)||0,n)}));function Io(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new xt(s);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Io.Cache||zn),n}function Ro(t){if("function"!=typeof t)throw new xt(s);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Io.Cache=zn;var Mo=mi((function(t,e){var n=(e=1==e.length&&Go(e[0])?Fe(e[0],Xe(is())):Fe(pr(e,1),Xe(is()))).length;return Hr((function(r){for(var i=-1,s=mn(r.length,n);++i<s;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),Lo=Hr((function(t,e){var n=on(e,rs(Lo));return $i(t,c,i,e,n)})),No=Hr((function(t,e){var n=on(e,rs(No));return $i(t,64,i,e,n)})),jo=Zi((function(t,e){return $i(t,256,i,i,i,e)}));function Do(t,e){return t===e||t!=t&&e!=e}var Bo=Gi(Sr),Uo=Gi((function(t,e){return t>=e})),Vo=xr(function(){return arguments}())?xr:function(t){return Qo(t)&&Mt.call(t,"callee")&&!$t.call(t,"callee")},Go=r.isArray,Wo=ve?Xe(ve):function(t){return Qo(t)&&Er(t)==F};function zo(t){return null!=t&&Jo(t.length)&&!Ko(t)}function qo(t){return Qo(t)&&zo(t)}var Ho=Ne||pc,$o=ye?Xe(ye):function(t){return Qo(t)&&Er(t)==y};function Xo(t){if(!Qo(t))return!1;var e=Er(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!na(t)}function Ko(t){if(!Zo(t))return!1;var e=Er(t);return e==b||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Yo(t){return"number"==typeof t&&t==fa(t)}function Jo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Zo(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Qo(t){return null!=t&&"object"==typeof t}var ta=_e?Xe(_e):function(t){return Qo(t)&&hs(t)==E};function ea(t){return"number"==typeof t||Qo(t)&&Er(t)==S}function na(t){if(!Qo(t)||Er(t)!=k)return!1;var e=qt(t);if(null===e)return!0;var n=Mt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Rt.call(n)==Dt}var ra=be?Xe(be):function(t){return Qo(t)&&Er(t)==C},ia=we?Xe(we):function(t){return Qo(t)&&hs(t)==A};function sa(t){return"string"==typeof t||!Go(t)&&Qo(t)&&Er(t)==x}function oa(t){return"symbol"==typeof t||Qo(t)&&Er(t)==P}var aa=Ee?Xe(Ee):function(t){return Qo(t)&&Jo(t.length)&&!!ie[Er(t)]},ca=Gi(Mr),ua=Gi((function(t,e){return t<=e}));function ha(t){if(!t)return[];if(zo(t))return sa(t)?hn(t):Ti(t);if(Zt&&t[Zt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Zt]());var e=hs(t);return(e==E?rn:e==A?an:Da)(t)}function la(t){return t?(t=pa(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function fa(t){var e=la(t),n=e%1;return e==e?n?e-n:e:0}function da(t){return t?ir(fa(t),0,d):0}function pa(t){if("number"==typeof t)return t;if(oa(t))return f;if(Zo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(rt,"");var n=pt.test(t);return n||mt.test(t)?ce(t.slice(2),n?2:8):dt.test(t)?f:+t}function ga(t){return Ci(t,Oa(t))}function ma(t){return null==t?"":si(t)}var va=xi((function(t,e){if(_s(e)||zo(e))Ci(e,Pa(e),t);else for(var n in e)Mt.call(e,n)&&Zn(t,n,e[n])})),ya=xi((function(t,e){Ci(e,Oa(e),t)})),_a=xi((function(t,e,n,r){Ci(e,Oa(e),t,r)})),ba=xi((function(t,e,n,r){Ci(e,Pa(e),t,r)})),wa=Zi(rr),Ea=Hr((function(t,e){t=Tt(t);var n=-1,r=e.length,s=r>2?e[2]:i;for(s&&gs(e[0],e[1],s)&&(r=1);++n<r;)for(var o=e[n],a=Oa(o),c=-1,u=a.length;++c<u;){var h=a[c],l=t[h];(l===i||Do(l,Ft[h])&&!Mt.call(t,h))&&(t[h]=o[h])}return t})),Sa=Hr((function(t){return t.push(i,Ki),Se(Ia,i,t)}));function ka(t,e,n){var r=null==t?i:br(t,e);return r===i?n:r}function Ta(t,e){return null!=t&&ls(t,e,Tr)}var Ca=ji((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),Za(ec)),Aa=ji((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Mt.call(t,e)?t[e].push(n):t[e]=[n]}),is),xa=Hr(Ar);function Pa(t){return zo(t)?$n(t):Rr(t)}function Oa(t){return zo(t)?$n(t,!0):function(t){if(!Zo(t))return function(t){var e=[];if(null!=t)for(var n in Tt(t))e.push(n);return e}(t);var e=_s(t),n=[];for(var r in t)("constructor"!=r||!e&&Mt.call(t,r))&&n.push(r);return n}(t)}var Fa=xi((function(t,e,n){Dr(t,e,n)})),Ia=xi((function(t,e,n,r){Dr(t,e,n,r)})),Ra=Zi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Fe(e,(function(e){return e=gi(e,t),r||(r=e.length>1),e})),Ci(t,ts(t),n),r&&(n=sr(n,7,Yi));for(var i=e.length;i--;)ai(n,e[i]);return n})),Ma=Zi((function(t,e){return null==t?{}:function(t,e){return Vr(t,e,(function(e,n){return Ta(t,n)}))}(t,e)}));function La(t,e){if(null==t)return{};var n=Fe(ts(t),(function(t){return[t]}));return e=is(e),Vr(t,n,(function(t,n){return e(t,n[0])}))}var Na=Hi(Pa),ja=Hi(Oa);function Da(t){return null==t?[]:Ke(t,Pa(t))}var Ba=Ii((function(t,e,n){return e=e.toLowerCase(),t+(n?Ua(e):e)}));function Ua(t){return Xa(ma(t).toLowerCase())}function Va(t){return(t=ma(t))&&t.replace(yt,Qe).replace(Jt,"")}var Ga=Ii((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Wa=Ii((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),za=Fi("toLowerCase"),qa=Ii((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ha=Ii((function(t,e,n){return t+(n?" ":"")+Xa(e)})),$a=Ii((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Xa=Fi("toUpperCase");function Ka(t,e,n){return t=ma(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Ya=Hr((function(t,e){try{return Se(t,i,e)}catch(t){return Xo(t)?t:new Et(t)}})),Ja=Zi((function(t,e){return Te(e,(function(e){e=Ms(e),nr(t,e,Ao(t[e],t))})),t}));function Za(t){return function(){return t}}var Qa=Li(),tc=Li(!0);function ec(t){return t}function nc(t){return Ir("function"==typeof t?t:sr(t,1))}var rc=Hr((function(t,e){return function(n){return Ar(n,t,e)}})),ic=Hr((function(t,e){return function(n){return Ar(t,n,e)}}));function sc(t,e,n){var r=Pa(e),i=_r(e,r);null!=n||Zo(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=_r(e,Pa(e)));var s=!(Zo(n)&&"chain"in n&&!n.chain),o=Ko(t);return Te(i,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Ie([this.value()],arguments))})})),t}function oc(){}var ac=Bi(Fe),cc=Bi(Ae),uc=Bi(Le);function hc(t){return ms(t)?We(Ms(t)):function(t){return function(e){return br(e,t)}}(t)}var lc=Vi(),fc=Vi(!0);function dc(){return[]}function pc(){return!1}var gc,mc=Di((function(t,e){return t+e}),0),vc=zi("ceil"),yc=Di((function(t,e){return t/e}),1),_c=zi("floor"),bc=Di((function(t,e){return t*e}),1),wc=zi("round"),Ec=Di((function(t,e){return t-e}),0);return jn.after=function(t,e){if("function"!=typeof e)throw new xt(s);return t=fa(t),function(){if(--t<1)return e.apply(this,arguments)}},jn.ary=To,jn.assign=va,jn.assignIn=ya,jn.assignInWith=_a,jn.assignWith=ba,jn.at=wa,jn.before=Co,jn.bind=Ao,jn.bindAll=Ja,jn.bindKey=xo,jn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Go(t)?t:[t]},jn.chain=uo,jn.chunk=function(t,e,n){e=(n?gs(t,e,n):e===i)?1:gn(fa(e),0);var s=null==t?0:t.length;if(!s||e<1)return[];for(var o=0,a=0,c=r(de(s/e));o<s;)c[a++]=Qr(t,o,o+=e);return c},jn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i},jn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Ie(Go(n)?Ti(n):[n],pr(e,1))},jn.cond=function(t){var e=null==t?0:t.length,n=is();return t=e?Fe(t,(function(t){if("function"!=typeof t[1])throw new xt(s);return[n(t[0]),t[1]]})):[],Hr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},jn.conforms=function(t){return function(t){var e=Pa(t);return function(n){return or(n,t,e)}}(sr(t,1))},jn.constant=Za,jn.countBy=fo,jn.create=function(t,e){var n=Dn(t);return null==e?n:er(n,e)},jn.curry=function t(e,n,r){var s=$i(e,8,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},jn.curryRight=function t(e,n,r){var s=$i(e,16,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},jn.debounce=Po,jn.defaults=Ea,jn.defaultsDeep=Sa,jn.defer=Oo,jn.delay=Fo,jn.difference=js,jn.differenceBy=Ds,jn.differenceWith=Bs,jn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Qr(t,(e=n||e===i?1:fa(e))<0?0:e,r):[]},jn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Qr(t,0,(e=r-(e=n||e===i?1:fa(e)))<0?0:e):[]},jn.dropRightWhile=function(t,e){return t&&t.length?ui(t,is(e,3),!0,!0):[]},jn.dropWhile=function(t,e){return t&&t.length?ui(t,is(e,3),!0):[]},jn.fill=function(t,e,n,r){var s=null==t?0:t.length;return s?(n&&"number"!=typeof n&&gs(t,e,n)&&(n=0,r=s),function(t,e,n,r){var s=t.length;for((n=fa(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:fa(r))<0&&(r+=s),r=n>r?0:da(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},jn.filter=function(t,e){return(Go(t)?xe:dr)(t,is(e,3))},jn.flatMap=function(t,e){return pr(wo(t,e),1)},jn.flatMapDeep=function(t,e){return pr(wo(t,e),h)},jn.flatMapDepth=function(t,e,n){return n=n===i?1:fa(n),pr(wo(t,e),n)},jn.flatten=Gs,jn.flattenDeep=function(t){return null!=t&&t.length?pr(t,h):[]},jn.flattenDepth=function(t,e){return null!=t&&t.length?pr(t,e=e===i?1:fa(e)):[]},jn.flip=function(t){return $i(t,512)},jn.flow=Qa,jn.flowRight=tc,jn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},jn.functions=function(t){return null==t?[]:_r(t,Pa(t))},jn.functionsIn=function(t){return null==t?[]:_r(t,Oa(t))},jn.groupBy=yo,jn.initial=function(t){return null!=t&&t.length?Qr(t,0,-1):[]},jn.intersection=zs,jn.intersectionBy=qs,jn.intersectionWith=Hs,jn.invert=Ca,jn.invertBy=Aa,jn.invokeMap=_o,jn.iteratee=nc,jn.keyBy=bo,jn.keys=Pa,jn.keysIn=Oa,jn.map=wo,jn.mapKeys=function(t,e){var n={};return e=is(e,3),vr(t,(function(t,r,i){nr(n,e(t,r,i),t)})),n},jn.mapValues=function(t,e){var n={};return e=is(e,3),vr(t,(function(t,r,i){nr(n,r,e(t,r,i))})),n},jn.matches=function(t){return Nr(sr(t,1))},jn.matchesProperty=function(t,e){return jr(t,sr(e,1))},jn.memoize=Io,jn.merge=Fa,jn.mergeWith=Ia,jn.method=rc,jn.methodOf=ic,jn.mixin=sc,jn.negate=Ro,jn.nthArg=function(t){return t=fa(t),Hr((function(e){return Br(e,t)}))},jn.omit=Ra,jn.omitBy=function(t,e){return La(t,Ro(is(e)))},jn.once=function(t){return Co(2,t)},jn.orderBy=function(t,e,n,r){return null==t?[]:(Go(e)||(e=null==e?[]:[e]),Go(n=r?i:n)||(n=null==n?[]:[n]),Ur(t,e,n))},jn.over=ac,jn.overArgs=Mo,jn.overEvery=cc,jn.overSome=uc,jn.partial=Lo,jn.partialRight=No,jn.partition=Eo,jn.pick=Ma,jn.pickBy=La,jn.property=hc,jn.propertyOf=function(t){return function(e){return null==t?i:br(t,e)}},jn.pull=Xs,jn.pullAll=Ks,jn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,is(n,2)):t},jn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Gr(t,e,i,n):t},jn.pullAt=Ys,jn.range=lc,jn.rangeRight=fc,jn.rearg=jo,jn.reject=function(t,e){return(Go(t)?xe:dr)(t,Ro(is(e,3)))},jn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],s=t.length;for(e=is(e,3);++r<s;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return Wr(t,i),n},jn.rest=function(t,e){if("function"!=typeof t)throw new xt(s);return Hr(t,e=e===i?e:fa(e))},jn.reverse=Js,jn.sampleSize=function(t,e,n){return e=(n?gs(t,e,n):e===i)?1:fa(e),(Go(t)?Kn:Xr)(t,e)},jn.set=function(t,e,n){return null==t?t:Kr(t,e,n)},jn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Kr(t,e,n,r)},jn.shuffle=function(t){return(Go(t)?Yn:Zr)(t)},jn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&gs(t,e,n)?(e=0,n=r):(e=null==e?0:fa(e),n=n===i?r:fa(n)),Qr(t,e,n)):[]},jn.sortBy=So,jn.sortedUniq=function(t){return t&&t.length?ri(t):[]},jn.sortedUniqBy=function(t,e){return t&&t.length?ri(t,is(e,2)):[]},jn.split=function(t,e,n){return n&&"number"!=typeof n&&gs(t,e,n)&&(e=n=i),(n=n===i?d:n>>>0)?(t=ma(t))&&("string"==typeof e||null!=e&&!ra(e))&&!(e=si(e))&&nn(t)?vi(hn(t),0,n):t.split(e,n):[]},jn.spread=function(t,e){if("function"!=typeof t)throw new xt(s);return e=null==e?0:gn(fa(e),0),Hr((function(n){var r=n[e],i=vi(n,0,e);return r&&Ie(i,r),Se(t,this,i)}))},jn.tail=function(t){var e=null==t?0:t.length;return e?Qr(t,1,e):[]},jn.take=function(t,e,n){return t&&t.length?Qr(t,0,(e=n||e===i?1:fa(e))<0?0:e):[]},jn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Qr(t,(e=r-(e=n||e===i?1:fa(e)))<0?0:e,r):[]},jn.takeRightWhile=function(t,e){return t&&t.length?ui(t,is(e,3),!1,!0):[]},jn.takeWhile=function(t,e){return t&&t.length?ui(t,is(e,3)):[]},jn.tap=function(t,e){return e(t),t},jn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new xt(s);return Zo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Po(t,e,{leading:r,maxWait:e,trailing:i})},jn.thru=ho,jn.toArray=ha,jn.toPairs=Na,jn.toPairsIn=ja,jn.toPath=function(t){return Go(t)?Fe(t,Ms):oa(t)?[t]:Ti(Rs(ma(t)))},jn.toPlainObject=ga,jn.transform=function(t,e,n){var r=Go(t),i=r||Ho(t)||aa(t);if(e=is(e,4),null==n){var s=t&&t.constructor;n=i?r?new s:[]:Zo(t)&&Ko(s)?Dn(qt(t)):{}}return(i?Te:vr)(t,(function(t,r,i){return e(n,t,r,i)})),n},jn.unary=function(t){return To(t,1)},jn.union=Zs,jn.unionBy=Qs,jn.unionWith=to,jn.uniq=function(t){return t&&t.length?oi(t):[]},jn.uniqBy=function(t,e){return t&&t.length?oi(t,is(e,2)):[]},jn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?oi(t,i,e):[]},jn.unset=function(t,e){return null==t||ai(t,e)},jn.unzip=eo,jn.unzipWith=no,jn.update=function(t,e,n){return null==t?t:ci(t,e,pi(n))},jn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ci(t,e,pi(n),r)},jn.values=Da,jn.valuesIn=function(t){return null==t?[]:Ke(t,Oa(t))},jn.without=ro,jn.words=Ka,jn.wrap=function(t,e){return Lo(pi(e),t)},jn.xor=io,jn.xorBy=so,jn.xorWith=oo,jn.zip=ao,jn.zipObject=function(t,e){return fi(t||[],e||[],Zn)},jn.zipObjectDeep=function(t,e){return fi(t||[],e||[],Kr)},jn.zipWith=co,jn.entries=Na,jn.entriesIn=ja,jn.extend=ya,jn.extendWith=_a,sc(jn,jn),jn.add=mc,jn.attempt=Ya,jn.camelCase=Ba,jn.capitalize=Ua,jn.ceil=vc,jn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=pa(n))==n?n:0),e!==i&&(e=(e=pa(e))==e?e:0),ir(pa(t),e,n)},jn.clone=function(t){return sr(t,4)},jn.cloneDeep=function(t){return sr(t,5)},jn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:i)},jn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:i)},jn.conformsTo=function(t,e){return null==e||or(t,e,Pa(e))},jn.deburr=Va,jn.defaultTo=function(t,e){return null==t||t!=t?e:t},jn.divide=yc,jn.endsWith=function(t,e,n){t=ma(t),e=si(e);var r=t.length,s=n=n===i?r:ir(fa(n),0,r);return(n-=e.length)>=0&&t.slice(n,s)==e},jn.eq=Do,jn.escape=function(t){return(t=ma(t))&&X.test(t)?t.replace(H,tn):t},jn.escapeRegExp=function(t){return(t=ma(t))&&nt.test(t)?t.replace(et,"\\$&"):t},jn.every=function(t,e,n){var r=Go(t)?Ae:lr;return n&&gs(t,e,n)&&(e=i),r(t,is(e,3))},jn.find=po,jn.findIndex=Us,jn.findKey=function(t,e){return je(t,is(e,3),vr)},jn.findLast=go,jn.findLastIndex=Vs,jn.findLastKey=function(t,e){return je(t,is(e,3),yr)},jn.floor=_c,jn.forEach=mo,jn.forEachRight=vo,jn.forIn=function(t,e){return null==t?t:gr(t,is(e,3),Oa)},jn.forInRight=function(t,e){return null==t?t:mr(t,is(e,3),Oa)},jn.forOwn=function(t,e){return t&&vr(t,is(e,3))},jn.forOwnRight=function(t,e){return t&&yr(t,is(e,3))},jn.get=ka,jn.gt=Bo,jn.gte=Uo,jn.has=function(t,e){return null!=t&&ls(t,e,kr)},jn.hasIn=Ta,jn.head=Ws,jn.identity=ec,jn.includes=function(t,e,n,r){t=zo(t)?t:Da(t),n=n&&!r?fa(n):0;var i=t.length;return n<0&&(n=gn(i+n,0)),sa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Be(t,e,n)>-1},jn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:fa(n);return i<0&&(i=gn(r+i,0)),Be(t,e,i)},jn.inRange=function(t,e,n){return e=la(e),n===i?(n=e,e=0):n=la(n),function(t,e,n){return t>=mn(e,n)&&t<gn(e,n)}(t=pa(t),e,n)},jn.invoke=xa,jn.isArguments=Vo,jn.isArray=Go,jn.isArrayBuffer=Wo,jn.isArrayLike=zo,jn.isArrayLikeObject=qo,jn.isBoolean=function(t){return!0===t||!1===t||Qo(t)&&Er(t)==v},jn.isBuffer=Ho,jn.isDate=$o,jn.isElement=function(t){return Qo(t)&&1===t.nodeType&&!na(t)},jn.isEmpty=function(t){if(null==t)return!0;if(zo(t)&&(Go(t)||"string"==typeof t||"function"==typeof t.splice||Ho(t)||aa(t)||Vo(t)))return!t.length;var e=hs(t);if(e==E||e==A)return!t.size;if(_s(t))return!Rr(t).length;for(var n in t)if(Mt.call(t,n))return!1;return!0},jn.isEqual=function(t,e){return Pr(t,e)},jn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Pr(t,e,i,n):!!r},jn.isError=Xo,jn.isFinite=function(t){return"number"==typeof t&&ze(t)},jn.isFunction=Ko,jn.isInteger=Yo,jn.isLength=Jo,jn.isMap=ta,jn.isMatch=function(t,e){return t===e||Or(t,e,os(e))},jn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Or(t,e,os(e),n)},jn.isNaN=function(t){return ea(t)&&t!=+t},jn.isNative=function(t){if(ys(t))throw new Et("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Fr(t)},jn.isNil=function(t){return null==t},jn.isNull=function(t){return null===t},jn.isNumber=ea,jn.isObject=Zo,jn.isObjectLike=Qo,jn.isPlainObject=na,jn.isRegExp=ra,jn.isSafeInteger=function(t){return Yo(t)&&t>=-9007199254740991&&t<=l},jn.isSet=ia,jn.isString=sa,jn.isSymbol=oa,jn.isTypedArray=aa,jn.isUndefined=function(t){return t===i},jn.isWeakMap=function(t){return Qo(t)&&hs(t)==O},jn.isWeakSet=function(t){return Qo(t)&&"[object WeakSet]"==Er(t)},jn.join=function(t,e){return null==t?"":dn.call(t,e)},jn.kebabCase=Ga,jn.last=$s,jn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=fa(n))<0?gn(r+s,0):mn(s,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,s):De(t,Ve,s,!0)},jn.lowerCase=Wa,jn.lowerFirst=za,jn.lt=ca,jn.lte=ua,jn.max=function(t){return t&&t.length?fr(t,ec,Sr):i},jn.maxBy=function(t,e){return t&&t.length?fr(t,is(e,2),Sr):i},jn.mean=function(t){return Ge(t,ec)},jn.meanBy=function(t,e){return Ge(t,is(e,2))},jn.min=function(t){return t&&t.length?fr(t,ec,Mr):i},jn.minBy=function(t,e){return t&&t.length?fr(t,is(e,2),Mr):i},jn.stubArray=dc,jn.stubFalse=pc,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=bc,jn.nth=function(t,e){return t&&t.length?Br(t,fa(e)):i},jn.noConflict=function(){return le._===this&&(le._=Bt),this},jn.noop=oc,jn.now=ko,jn.pad=function(t,e,n){t=ma(t);var r=(e=fa(e))?un(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ui(ge(i),n)+t+Ui(de(i),n)},jn.padEnd=function(t,e,n){t=ma(t);var r=(e=fa(e))?un(t):0;return e&&r<e?t+Ui(e-r,n):t},jn.padStart=function(t,e,n){t=ma(t);var r=(e=fa(e))?un(t):0;return e&&r<e?Ui(e-r,n)+t:t},jn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),yn(ma(t).replace(it,""),e||0)},jn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&gs(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=la(t),e===i?(e=t,t=0):e=la(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var s=_n();return mn(t+s*(e-t+ae("1e-"+((s+"").length-1))),e)}return zr(t,e)},jn.reduce=function(t,e,n){var r=Go(t)?Re:qe,i=arguments.length<3;return r(t,is(e,4),n,i,ur)},jn.reduceRight=function(t,e,n){var r=Go(t)?Me:qe,i=arguments.length<3;return r(t,is(e,4),n,i,hr)},jn.repeat=function(t,e,n){return e=(n?gs(t,e,n):e===i)?1:fa(e),qr(ma(t),e)},jn.replace=function(){var t=arguments,e=ma(t[0]);return t.length<3?e:e.replace(t[1],t[2])},jn.result=function(t,e,n){var r=-1,s=(e=gi(e,t)).length;for(s||(s=1,t=i);++r<s;){var o=null==t?i:t[Ms(e[r])];o===i&&(r=s,o=n),t=Ko(o)?o.call(t):o}return t},jn.round=wc,jn.runInContext=t,jn.sample=function(t){return(Go(t)?Xn:$r)(t)},jn.size=function(t){if(null==t)return 0;if(zo(t))return sa(t)?un(t):t.length;var e=hs(t);return e==E||e==A?t.size:Rr(t).length},jn.snakeCase=qa,jn.some=function(t,e,n){var r=Go(t)?Le:ti;return n&&gs(t,e,n)&&(e=i),r(t,is(e,3))},jn.sortedIndex=function(t,e){return ei(t,e)},jn.sortedIndexBy=function(t,e,n){return ni(t,e,is(n,2))},jn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ei(t,e);if(r<n&&Do(t[r],e))return r}return-1},jn.sortedLastIndex=function(t,e){return ei(t,e,!0)},jn.sortedLastIndexBy=function(t,e,n){return ni(t,e,is(n,2),!0)},jn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ei(t,e,!0)-1;if(Do(t[n],e))return n}return-1},jn.startCase=Ha,jn.startsWith=function(t,e,n){return t=ma(t),n=null==n?0:ir(fa(n),0,t.length),e=si(e),t.slice(n,n+e.length)==e},jn.subtract=Ec,jn.sum=function(t){return t&&t.length?He(t,ec):0},jn.sumBy=function(t,e){return t&&t.length?He(t,is(e,2)):0},jn.template=function(t,e,n){var r=jn.templateSettings;n&&gs(t,e,n)&&(e=i),t=ma(t),e=_a({},e,r,Xi);var s,o,a=_a({},e.imports,r.imports,Xi),c=Pa(a),u=Ke(a,c),h=0,l=e.interpolate||_t,f="__p += '",d=Ct((e.escape||_t).source+"|"+l.source+"|"+(l===J?lt:_t).source+"|"+(e.evaluate||_t).source+"|$","g"),p="//# sourceURL="+(Mt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(d,(function(e,n,r,i,a,c){return r||(r=i),f+=t.slice(h,c).replace(bt,en),n&&(s=!0,f+="' +\n__e("+n+") +\n'"),a&&(o=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=c+e.length,e})),f+="';\n";var g=Mt.call(e,"variable")&&e.variable;g||(f="with (obj) {\n"+f+"\n}\n"),f=(o?f.replace(G,""):f).replace(W,"$1").replace(z,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ya((function(){return St(c,p+"return "+f).apply(i,u)}));if(m.source=f,Xo(m))throw m;return m},jn.times=function(t,e){if((t=fa(t))<1||t>l)return[];var n=d,r=mn(t,d);e=is(e),t-=d;for(var i=$e(r,e);++n<t;)e(n);return i},jn.toFinite=la,jn.toInteger=fa,jn.toLength=da,jn.toLower=function(t){return ma(t).toLowerCase()},jn.toNumber=pa,jn.toSafeInteger=function(t){return t?ir(fa(t),-9007199254740991,l):0===t?t:0},jn.toString=ma,jn.toUpper=function(t){return ma(t).toUpperCase()},jn.trim=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(rt,"");if(!t||!(e=si(e)))return t;var r=hn(t),s=hn(e);return vi(r,Je(r,s),Ze(r,s)+1).join("")},jn.trimEnd=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(st,"");if(!t||!(e=si(e)))return t;var r=hn(t);return vi(r,0,Ze(r,hn(e))+1).join("")},jn.trimStart=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(it,"");if(!t||!(e=si(e)))return t;var r=hn(t);return vi(r,Je(r,hn(e))).join("")},jn.truncate=function(t,e){var n=30,r="...";if(Zo(e)){var s="separator"in e?e.separator:s;n="length"in e?fa(e.length):n,r="omission"in e?si(e.omission):r}var o=(t=ma(t)).length;if(nn(t)){var a=hn(t);o=a.length}if(n>=o)return t;var c=n-un(r);if(c<1)return r;var u=a?vi(a,0,c).join(""):t.slice(0,c);if(s===i)return u+r;if(a&&(c+=u.length-c),ra(s)){if(t.slice(c).search(s)){var h,l=u;for(s.global||(s=Ct(s.source,ma(ft.exec(s))+"g")),s.lastIndex=0;h=s.exec(l);)var f=h.index;u=u.slice(0,f===i?c:f)}}else if(t.indexOf(si(s),c)!=c){var d=u.lastIndexOf(s);d>-1&&(u=u.slice(0,d))}return u+r},jn.unescape=function(t){return(t=ma(t))&&$.test(t)?t.replace(q,ln):t},jn.uniqueId=function(t){var e=++Lt;return ma(t)+e},jn.upperCase=$a,jn.upperFirst=Xa,jn.each=mo,jn.eachRight=vo,jn.first=Ws,sc(jn,(gc={},vr(jn,(function(t,e){Mt.call(jn.prototype,e)||(gc[e]=t)})),gc),{chain:!1}),jn.VERSION="4.17.20",Te(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){jn[t].placeholder=jn})),Te(["drop","take"],(function(t,e){Vn.prototype[t]=function(n){n=n===i?1:gn(fa(n),0);var r=this.__filtered__&&!e?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Te(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Vn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:is(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Te(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Vn.prototype[t]=function(){return this[n](1).value()[0]}})),Te(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Vn.prototype[t]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(ec)},Vn.prototype.find=function(t){return this.filter(t).head()},Vn.prototype.findLast=function(t){return this.reverse().find(t)},Vn.prototype.invokeMap=Hr((function(t,e){return"function"==typeof t?new Vn(this):this.map((function(n){return Ar(n,t,e)}))})),Vn.prototype.reject=function(t){return this.filter(Ro(is(t)))},Vn.prototype.slice=function(t,e){t=fa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Vn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=fa(e))<0?n.dropRight(-e):n.take(e-t)),n)},Vn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Vn.prototype.toArray=function(){return this.take(d)},vr(Vn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),s=jn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);s&&(jn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,c=e instanceof Vn,u=a[0],h=c||Go(e),l=function(t){var e=s.apply(jn,Ie([t],a));return r&&f?e[0]:e};h&&n&&"function"==typeof u&&1!=u.length&&(c=h=!1);var f=this.__chain__,d=!!this.__actions__.length,p=o&&!f,g=c&&!d;if(!o&&h){e=g?e:new Vn(this);var m=t.apply(e,a);return m.__actions__.push({func:ho,args:[l],thisArg:i}),new Un(m,f)}return p&&g?t.apply(this,a):(m=this.thru(l),p?r?m.value()[0]:m.value():m)})})),Te(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);jn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Go(i)?i:[],t)}return this[n]((function(n){return e.apply(Go(n)?n:[],t)}))}})),vr(Vn.prototype,(function(t,e){var n=jn[e];if(n){var r=n.name+"";Mt.call(xn,r)||(xn[r]=[]),xn[r].push({name:e,func:n})}})),xn[Ni(i,2).name]=[{name:"wrapper",func:i}],Vn.prototype.clone=function(){var t=new Vn(this.__wrapped__);return t.__actions__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(this.__views__),t},Vn.prototype.reverse=function(){if(this.__filtered__){var t=new Vn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Vn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Go(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=mn(e,t+o);break;case"takeRight":t=gn(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,a=s.end,c=a-o,u=r?a:o-1,h=this.__iteratees__,l=h.length,f=0,d=mn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return hi(t,this.__actions__);var p=[];t:for(;c--&&f<d;){for(var g=-1,m=t[u+=e];++g<l;){var v=h[g],y=v.iteratee,_=v.type,b=y(m);if(2==_)m=b;else if(!b){if(1==_)continue t;break t}}p[f++]=m}return p},jn.prototype.at=lo,jn.prototype.chain=function(){return uo(this)},jn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===i&&(this.__values__=ha(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},jn.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Ns(n);r.__index__=0,r.__values__=i,e?s.__wrapped__=r:e=r;var s=r;n=n.__wrapped__}return s.__wrapped__=t,e},jn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Vn){var e=t;return this.__actions__.length&&(e=new Vn(this)),(e=e.reverse()).__actions__.push({func:ho,args:[Js],thisArg:i}),new Un(e,this.__chain__)}return this.thru(Js)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return hi(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,Zt&&(jn.prototype[Zt]=function(){return this}),jn}();le._=fn,(r=function(){return fn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},3669:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(9231)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},9231:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,s,o=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const s=e.formatters[i];if("function"==typeof s){const e=t[o];n=s.call(r,e),t.splice(o,1),o--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(4241),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},4241:t=>{var e=1e3,n=60*e,r=60*n,i=24*r;function s(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,o){o=o||{};var a,c,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===u&&isFinite(t))return o.long?(a=t,(c=Math.abs(a))>=i?s(a,c,i,"day"):c>=r?s(a,c,r,"hour"):c>=n?s(a,c,n,"minute"):c>=e?s(a,c,e,"second"):a+" ms"):function(t){var s=Math.abs(t);return s>=i?Math.round(t/i)+"d":s>=r?Math.round(t/r)+"h":s>=n?Math.round(t/n)+"m":s>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1618:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(5224)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},5224:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,s,o=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const s=e.formatters[i];if("function"==typeof s){const e=t[o];n=s.call(r,e),t.splice(o,1),o--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(8896),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},8896:t=>{var e=1e3,n=60*e,r=60*n,i=24*r;function s(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,o){o=o||{};var a,c,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===u&&isFinite(t))return o.long?(a=t,(c=Math.abs(a))>=i?s(a,c,i,"day"):c>=r?s(a,c,r,"hour"):c>=n?s(a,c,n,"minute"):c>=e?s(a,c,e,"second"):a+" ms"):function(t){var s=Math.abs(t);return s>=i?Math.round(t/i)+"d":s>=r?Math.round(t/r)+"h":s>=n?Math.round(t/n)+"m":s>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},464:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AxiosServerError=e.AxiosError=void 0;const r=n(5749);class i extends r.WrappedError{}e.AxiosError=i,e.AxiosServerError=class extends i{constructor(t,e){super(`${t.status}: ${t.statusText} - ${JSON.stringify(t.data,null,2)}`,e),this.status=t.status,this.statusText=t.statusText,this.data=t.data}}},5749:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigError=e.WrappedError=e.CustomError=void 0;class n extends Error{constructor(t){super(t),this.name=this.constructor.name}}e.CustomError=n,e.WrappedError=class extends n{constructor(t,e){super(t),this.originalError=e}},e.ConfigError=class extends n{}},2746:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.AxiosWrapper=void 0;const i=r(n(9669)),s=r(n(6486)),o=n(464);e.AxiosWrapper=class{constructor(t){this.axiosInstance=t}async makeRequest(t){try{return(await this.axiosInstance(t)).data}catch(t){if(i.default.isAxiosError(t)){const e=s.default.omit(t.toJSON(),"config");if(t.response){const n=s.default.pick(t.response,["data","status","statusText"]);throw new o.AxiosServerError(n,e)}throw new o.AxiosError(`Axios: ${t.message}`,e)}throw t}}}},2310:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createAxios=e.MIVA_PROCTOR_SERVICE_ENDPOINT=e.PROD_API_KEY=e.UAT_API_KEY=e.STAGING_API_KEY=e.API_PROD_HOST=e.API_UAT_HOST=e.API_STAGING_HOST=void 0;const i=r(n(9669)),s=n(3134);e.API_STAGING_HOST="https://metrics.staging.miva.university",e.API_UAT_HOST="https://metrics.uat.miva.university",e.API_PROD_HOST="https://metrics.miva.university",e.STAGING_API_KEY="",e.UAT_API_KEY="",e.PROD_API_KEY="";const o={[s.Environment.Staging]:e.API_STAGING_HOST,[s.Environment.UAT]:e.API_UAT_HOST,[s.Environment.Prod]:e.API_PROD_HOST},a={[s.Environment.Staging]:e.STAGING_API_KEY,[s.Environment.UAT]:e.UAT_API_KEY,[s.Environment.Prod]:e.PROD_API_KEY};e.MIVA_PROCTOR_SERVICE_ENDPOINT=e.API_STAGING_HOST,e.createAxios=t=>{const e=o[t],n=a[t];return i.default.create({baseURL:e,headers:{"Content-Type":"application/json","x-api-key":n},timeout:3e4})}},2726:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONFIG=void 0,e.CONFIG={API_SESSIONS_PATH:{START_SESSION:"/sessions/start",END_SESSION:"/sessions/:id/end",PING_SESSION:"/sessions/:id/ping",DELETE_SESSION:"/sessions/:id",SESSIONS:"/sessions",SESSIONS_ACTIVE:"/sessions/active"},API_ACTIVITIES_PATH:{ACTIVITIES:"/activities",MULTIPLE_ACTIVITIES:"/activities/multiple",ACTIVITIES_METRICS:"/activities/metrics"}}},7338:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctorMetricService=void 0;const r=n(2746),i=n(2310),s=n(2726);e.ProctorMetricService=class{constructor(t){this.axiosInstance=(0,i.createAxios)(t),this.axiosWrapper=new r.AxiosWrapper(this.axiosInstance)}async startSession(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.START_SESSION,method:"POST",data:t})}async getSessions(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.SESSIONS,method:"GET",data:t})}async getActiveSessions(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.SESSIONS_ACTIVE,method:"GET",params:{studentId:t}})}async endSession(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.END_SESSION.replace(":id",t),method:"POST",data:{timestamp:(new Date).toISOString()}})}async pingSession(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.PING_SESSION.replace(":id",t),method:"POST",data:{timestamp:(new Date).toISOString()}})}async deleteSession(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_SESSIONS_PATH.DELETE_SESSION.replace(":id",t),method:"DELETE"})}async updateActivities(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES,method:"POST",data:t})}async updateMultipleActivities(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_ACTIVITIES_PATH.MULTIPLE_ACTIVITIES,method:"POST",data:{activities:t.data}})}async getActivityMetrics(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES_METRICS,method:"POST",data:t})}async getActivities(t){return await this.axiosWrapper.makeRequest({url:s.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES,method:"GET",params:t})}}},9200:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},9108:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(526),e),i(n(7338),e),i(n(9200),e),i(n(2726),e),i(n(2310),e),i(n(2746),e)},4763:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioDetector=void 0;const n=Math.round(12),r={timeoutMsecs:50,peechstartMsecs:600,speakingMinVolume:.05,silenceVolume:.005,muteVolume:.002,recordingEnabled:!0};e.AudioDetector=class{constructor(t){this.volumeState="mute",this.speechStarted=!1,this.silenceItems=0,this.signalItems=0,this.speechStartTime=0,this.prerecordingItems=0,this.speechVolumesList=[],this.recordedChunks=[],this.isSEB=!1,this.audioDetectionInterval=null,this.mediaStream=null,this.sebConfig={useSimulatedMode:!1,muteThreshold:1e-4,speechThreshold:.003,silenceThreshold:.001,detectionInterval:100},this.usedMimeType="audio/webm",this.events=t,this.isSEB=!1,this.isSEB&&console.log("SEB detected - using special audio detection mode")}detectSEB(){const t=navigator.userAgent.toLowerCase(),e=t.includes("seb")||t.includes("safe exam browser");return e&&console.log("SEB detected - using special audio detection mode"),e}async checkAudioAccess(){try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach((t=>t.stop())),!0}catch(t){return console.warn("Audio access appears to be blocked:",t),!1}}async start(){try{try{this.audioContext=new AudioContext}catch(t){console.error("Failed to create AudioContext:",t)}try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,autoGainControl:!1,noiseSuppression:!1}})}catch(t){return console.error("Failed to get audio stream:",t),void this.setupSimpleAudioDetection()}if(this.isSEB){const t=await this.checkAudioAccess();console.log("hasAudioAccess",t),t||(console.log("Audio access appears to be blocked in SEB - enabling simulated mode"),this.sebConfig.useSimulatedMode=!0),console.log("Using SEB-compatible audio detection"),this.sebConfig.useSimulatedMode?this.setupSEBSimulatedMode():this.setupSEBAudioDetection(this.mediaStream)}else try{this.setupStandardAudioDetection(this.audioContext,this.mediaStream)}catch(t){console.error("Error in standard audio stream setup:",t),this.setupSEBAudioDetection(this.mediaStream)}try{const t=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/mpeg"];let e="";for(const n of t)if(MediaRecorder.isTypeSupported(n)){e=n,console.log(`Using supported MIME type: ${n}`);break}e?(this.recorder=new MediaRecorder(this.mediaStream,{mimeType:e}),this.usedMimeType=e):(console.warn("No supported MIME types found for MediaRecorder, using default"),this.recorder=new MediaRecorder(this.mediaStream),this.usedMimeType="audio/webm"),this.recorder.ondataavailable=t=>{t.data.size>0&&this.recordedChunks.push(t.data)},this.recorder.onstop=()=>{const t=new Blob(this.recordedChunks,{type:this.usedMimeType});this.events.onAudioBlob(t),this.recordedChunks=[]},this.recorder.start()}catch(t){console.error("Failed to set up MediaRecorder:",t)}this.addEventListeners()}catch(t){console.error("Error starting audio detector:",t),this.setupSimpleAudioDetection()}}setupSEBSimulatedMode(){console.log("Using SEB simulated audio mode"),this.meter={volume:.5,clipping:!1,lastClip:0,clipLevel:.98,averaging:.95,clipLag:750,checkClipping:function(){return!1},disconnect:function(){}},this.audioDetectionInterval=setInterval((()=>{const t=Date.now()%1e4/1e4;this.meter.volume=t<.3?.6+.3*Math.random():t<.5?.1+.2*Math.random():.01+.02*Math.random(),this.sampleThresholdsDecision(this.sebConfig.muteThreshold,this.sebConfig.speechThreshold)}),this.sebConfig.detectionInterval)}setupSEBAudioDetection(t){console.log("Using SEB-compatible audio detection");try{if(this.audioContext){const e=this.audioContext.createGain();this.mediaStreamSource=this.audioContext.createMediaStreamSource(t),this.mediaStreamSource.connect(e);const n=this.audioContext.createAnalyser();n.fftSize=1024,n.smoothingTimeConstant=.8,e.connect(n),this.meter={volume:0,clipping:!1,lastClip:0,clipLevel:.98,averaging:.95,clipLag:750,checkClipping:function(){return!1},disconnect:function(){this.mediaStreamSource&&this.mediaStreamSource.disconnect()}},this.audioDetectionInterval=setInterval((()=>{const t=new Uint8Array(n.frequencyBinCount);n.getByteFrequencyData(t);let e=0,i=0;for(let n=3;n<80;n++)n<t.length&&(e+=t[n],i++);let s=(i>0?e/i:0)/255;s=Math.pow(s,.7),s<5e-4&&(s=0),this.meter.volume=s,this.isSEB?this.sampleThresholdsDecision(this.sebConfig.muteThreshold,this.sebConfig.speechThreshold):this.sampleThresholdsDecision(r.muteVolume,r.speakingMinVolume)}),this.isSEB?this.sebConfig.detectionInterval:r.timeoutMsecs)}else this.setupSimpleAudioDetection()}catch(t){console.error("Error setting up SEB audio detection:",t),this.setupSimpleAudioDetection()}}setupSimpleAudioDetection(){console.log("Using simple fallback audio detection"),this.meter={volume:.5,clipping:!1,lastClip:0,clipLevel:.98,averaging:.95,clipLag:750,checkClipping:function(){return!1},disconnect:function(){}},this.audioDetectionInterval=setInterval((()=>{const t=Date.now(),e=.5*Math.sin(t/1e3)+.5;this.meter.volume=e,this.isSEB?this.sampleThresholdsDecision(this.sebConfig.muteThreshold,this.sebConfig.speechThreshold):this.sampleThresholdsDecision(r.muteVolume,r.speakingMinVolume)}),this.isSEB?this.sebConfig.detectionInterval:r.timeoutMsecs)}async stop(){var t;if(this.mediaStreamSource)try{this.mediaStreamSource.disconnect()}catch(t){console.error("Error disconnecting media stream source:",t)}if(this.meter&&"function"==typeof this.meter.disconnect)try{this.meter.disconnect()}catch(t){console.error("Error disconnecting meter:",t)}if(this.audioContext)try{await this.audioContext.close()}catch(t){console.error("Error closing audio context:",t)}if("recording"===(null===(t=this.recorder)||void 0===t?void 0:t.state))try{this.recorder.stop()}catch(t){console.error("Error stopping recorder:",t)}this.audioDetectionInterval&&(clearInterval(this.audioDetectionInterval),this.audioDetectionInterval=null),this.mediaStream&&this.mediaStream.getTracks().forEach((t=>{try{t.stop()}catch(t){console.error("Error stopping audio track:",t)}}))}average(t){return t.reduce(((t,e)=>t+e))/t.length}averageSignal(){return Number(this.average(this.speechVolumesList).toFixed(4))}dispatchEvent(t,e){const n=new CustomEvent(t,e);return document.dispatchEvent(n)}mute(t,e){const n={detail:{event:"mute",volume:this.meter.volume,timestamp:t,duration:e}};this.dispatchEvent("mute",n),"mute"!==this.volumeState&&(this.dispatchEvent("mutedmic",n),this.volumeState="mute")}signal(t,e){this.silenceItems=0;const n={detail:{event:"signal",volume:this.meter.volume,timestamp:t,duration:e,items:++this.signalItems}};this.speechStarted||(this.dispatchEvent("speechstart",n),this.speechStartTime=t,this.speechStarted=!0,this.speechVolumesList=[]),this.speechVolumesList.push(this.meter.volume),this.dispatchEvent("signal",n),"mute"===this.volumeState&&(this.dispatchEvent("unmutedmic",n),this.volumeState="signal")}silence(t,e){this.signalItems=0;const r={detail:{event:"silence",volume:this.meter.volume,timestamp:t,duration:e,items:++this.silenceItems}};if(this.dispatchEvent("silence",r),"mute"===this.volumeState&&(this.dispatchEvent("unmutedmic",r),this.volumeState="silence"),this.speechStarted&&this.silenceItems===n){const t=e-600,n=this.averageSignal();t<3e3?(r.detail.abort=`signal duration (${t}) < MIN_SIGNAL_DURATION (3000)`,this.dispatchEvent("speechabort",r)):n<.1?(r.detail.abort=`signal average volume (${n}) < MIN_AVERAGE_SIGNAL_VOLUME (0.1)`,this.dispatchEvent("speechabort",r)):this.dispatchEvent("speechstop",r),this.speechStarted=!1}}sampleThresholdsDecision(t,e){const n=Date.now(),r=n-this.speechStartTime;this.meter.volume<t?"mute"!==this.volumeState&&this.mute(n,r):this.meter.volume>e?this.signal(n,r):this.silence(n,r)}prerecording(t,e){++this.prerecordingItems;const n={detail:{volume:this.meter.volume,timestamp:Date.now(),items:this.prerecordingItems}};this.prerecordingItems*e>=t&&(this.speechStarted||this.dispatchEvent("prespeechstart",n),this.prerecordingItems=0)}audioDetection(t){setTimeout((()=>{this.prerecording(t.prespeechstartMsecs,t.timeoutMsecs),t.recordingEnabled&&this.sampleThresholdsDecision(t.muteVolume,t.speakingMinVolume),this.audioDetection(t)}),t.timeoutMsecs)}createAudioMeter(t,e,n,r){try{var i=t.createScriptProcessor(512);return i.onaudioprocess=this.volumeAudioProcess.bind(this),i.clipping=!1,i.lastClip=0,i.volume=0,i.clipLevel=e||.98,i.averaging=n||.95,i.clipLag=r||750,i.connect(t.destination),i.checkClipping=function(){return!!this.clipping&&(this.lastClip+this.clipLag<window.performance.now()&&(this.clipping=!1),this.clipping)},i.shutdown=function(){this.disconnect(),this.onaudioprocess=null},i}catch(t){return console.error("Error creating audio meter:",t),{volume:.5,clipping:!1,lastClip:0,clipLevel:e||.98,averaging:n||.95,clipLag:r||750,checkClipping:function(){return!1},disconnect:function(){}}}}setupStandardAudioDetection(t,e){this.mediaStreamSource=t.createMediaStreamSource(e),this.meter=this.createAudioMeter(t),this.mediaStreamSource.connect(this.meter),this.audioDetection(r)}volumeAudioProcess(t){for(var e,n=t.inputBuffer.getChannelData(0),r=n.length,i=0,s=0;s<r;s++)e=n[s],Math.abs(e)>=this.meter.clipLevel&&(this.meter.clipping=!0,this.meter.lastClip=window.performance.now()),i+=e*e;var o=Math.sqrt(i/r);this.meter.volume=Math.max(o,this.meter.volume*this.meter.averaging)}addEventListeners(){document.addEventListener("mute",(t=>{console.log("Mute event"),this.events.onMute(t)})),document.addEventListener("speechstart",(()=>{var t;console.log("Speechstart event"),"inactive"===(null===(t=this.recorder)||void 0===t?void 0:t.state)?this.recorder.start():console.log("MediaRecorder is already recording")})),document.addEventListener("speechstop",(()=>{var t;console.log("Speechstop event"),"recording"===(null===(t=this.recorder)||void 0===t?void 0:t.state)&&this.recorder.stop()})),document.addEventListener("speechabort",(()=>{var t;console.log("Speechabort event"),"recording"===(null===(t=this.recorder)||void 0===t?void 0:t.state)&&this.recorder.stop()})),document.addEventListener("mutedmic",(t=>{console.log("Mutedmic event"),this.events.onMute(t)})),document.addEventListener("unmutedmic",(t=>{console.log("Unmutedmic event"),this.events.onUnmute(t)}))}}},9415:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FaceDetector=void 0;const r=n(1811);e.FaceDetector=class{constructor(t,e){this.lastVideoTime=-1,this.startTimeMs=-1,this.lastDetectionCount=0,this.callbacks=e,this.video=document.createElement("video"),this.video.srcObject=t,this.start()}async start(){try{let t;await this.video.play(),console.log("Starting FaceDetector");try{t=await r.FilesetResolver.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.0/wasm"),console.log("MediaPipe WASM loaded successfully")}catch(t){return console.error("Failed to load MediaPipe WASM:",t),void this.useFallbackFaceDetection()}try{this.faceDetector=await r.FaceDetector.createFromOptions(t,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite",delegate:"CPU"},runningMode:"VIDEO"}),console.log("Face detector initialized successfully")}catch(t){return console.error("Failed to initialize face detector:",t),void this.useFallbackFaceDetection()}this.detectFaces()}catch(t){console.error("FaceDetector start failed:",t)}}async detectFaces(){if(this.startTimeMs=performance.now(),this.video.currentTime!==this.lastVideoTime){this.lastVideoTime=this.video.currentTime;const t=this.faceDetector.detectForVideo(this.video,this.startTimeMs).detections.filter((t=>t.categories[0].score>=.7));this.lastDetectionCount!==t.length&&(this.callbacks.faceCountDetection(t.length),this.lastDetectionCount=t.length)}window.requestAnimationFrame(this.detectFaces.bind(this))}useFallbackFaceDetection(){}}},526:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MediaPermissions=e.ViolationsTracker=e.PossibleViolation=void 0;const r=n(4135);Object.defineProperty(e,"PossibleViolation",{enumerable:!0,get:function(){return r.PossibleViolation}});const i=n(4763),s=n(9415),o=n(8410);Object.defineProperty(e,"MediaPermissions",{enumerable:!0,get:function(){return o.MediaPermissions}}),e.ViolationsTracker=class{constructor(t){this.screenSharing=!1,this.fullscreen=!1,this.inFocus=!0,this.tracking=!1,this.errorMessage="",this.errorCode="ERR_NONE",this.session=t}async requestMediaPermissions(){try{const t=o.MediaPermissions.getInstance().getUserMediaStream();t&&null!==t?(console.log("user media stream is already initialized successfully"),this.cameraStream=t):this.cameraStream=await navigator.mediaDevices.getUserMedia({video:!0})}catch(t){throw console.error("Camera permission denied:",t),new Error("Camera permission denied")}}async start(t){var e;if(this.tracking)return!0;this.tracking=!0;try{if(await this.requestMediaPermissions(),!this.cameraStream)return!1;this.audioDetector=new i.AudioDetector({onMute:()=>{this.session.onPossibleViolation(r.PossibleViolation.AudioMuted)},onUnmute:()=>{},onAudioBlob:t=>{this.session.onPossibleViolation(r.PossibleViolation.AudioNoise,t)}}),await(null===(e=this.audioDetector)||void 0===e?void 0:e.start()),this.registerForEvents(),this.faceDetector=new s.FaceDetector(this.cameraStream,{faceCountDetection:async t=>{console.log("Face count: ",t),t>1&&this.tracking?this.session.onPossibleViolation(r.PossibleViolation.MultipleFaces,await this.takeScreenshot(this.cameraStream)):0===t&&this.tracking&&this.session.onPossibleViolation(r.PossibleViolation.NoFace,await this.takeScreenshot(this.cameraStream))}});const n=await this.startScreenSharing(!0);return console.log("Is screen sharing",n),n?(t&&t((async()=>this.startFullscreen())),this.callRandomPictureOrScreenshot(),console.log("Tracking successfully in library..."),!0):(this.errorCode="ERR_SCREEN_SHARING",!1)}catch(t){return console.error("Permission request or other error:",t),this.errorMessage="Permission request dismissed or denied",!1}}async stop(){var t,e;if(!this.tracking)return;const n=o.MediaPermissions.getInstance();null===(t=this.audioDetector)||void 0===t||t.stop(),this.audioDetector=void 0,this.unregisterEvents(),await this.stopFullscreen(),await this.stopScreenSharing(),null===(e=this.cameraStream)||void 0===e||e.getTracks()[0].stop(),n.stopStreams(),this.tracking=!1}async startScreenSharing(t){if(this.screenSharing)return!0;t&&await this.startFullscreen();const e=o.MediaPermissions.getInstance().getDisplayMediaStream();let n;e&&null!==e?(console.log("Display media stream has already initialized successfully"),n=e):n=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!1});let r=n.getVideoTracks()[0].getSettings();return"monitor"===r.displaySurface?(this.stream=n,this.videoElement=document.createElement("video"),this.videoElement.autoplay=!0,this.videoElement.muted=!0,this.videoElement.style.position="fixed",this.videoElement.width=1,this.videoElement.height=1,this.videoElement.srcObject=n,n.getTracks()[0].onended=this.screenSharingEnded.bind(this),this.screenSharing=!0):(n.getTracks().forEach((t=>t.stop())),this.errorMessage="Please share your entire screen!"),"monitor"===r.displaySurface}async stopScreenSharing(){var t;this.videoElement&&(console.log("stopping screen sharing"),null===(t=this.stream)||void 0===t||t.getTracks()[0].stop(),this.screenSharing=!1,this.videoElement.remove(),this.stream=void 0,this.videoElement=void 0)}async screenSharingEnded(){console.log("screen sharing has been ended by the user! Shite!"),this.screenSharing=!1,this.tracking&&this.session.onPossibleViolation(r.PossibleViolation.StoppedScreenSharing),this.stream=void 0,this.videoElement=void 0}async startFullscreen(){try{await document.documentElement.requestFullscreen(),this.fullscreen=!0,console.log("Request full screen successfully...")}catch(t){console.log("Exception with start fullscreen",JSON.stringify(t))}}async stopFullscreen(){try{document.fullscreenElement&&await document.exitFullscreen()}catch(t){console.log(t)}this.fullscreen=!1}registerForEvents(){window.addEventListener("focus",this.focusEvent.bind(this)),window.addEventListener("blur",this.blurEvent.bind(this)),window.addEventListener("resize",this.resizeEvent.bind(this))}unregisterEvents(){window.removeEventListener("focus",this.focusEvent.bind(this)),window.removeEventListener("blur",this.blurEvent.bind(this)),window.removeEventListener("resize",this.resizeEvent.bind(this))}focusEvent(){console.log("focus"),this.inFocus=!0}async blurEvent(){console.log("blur"),this.inFocus=!1,this.tracking&&setTimeout((async()=>{const t=await this.takeScreenshot(this.stream);this.session.onPossibleViolation(r.PossibleViolation.SwitchedFocus,t)}),5e3)}isFullScreen(){return!window.screenTop&&!window.screenY}resizeEvent(){console.log("defering it"),setTimeout((()=>{console.log("resize after 1 second");var t=window.screen.height,e=window.screen.width,n=window.outerHeight,i=window.outerWidth;t===n&&e===i?console.log("Fullscreen: nothing to do!"):(this.tracking&&this.fullscreen&&setTimeout((async()=>{const t=await this.takeScreenshot(this.stream);this.session.onPossibleViolation(r.PossibleViolation.ToggledFullscreen,t)}),1e3),this.stopFullscreen())}),1e3)}async takeScreenshot(t){try{const e=document.createElement("video"),n=document.createElement("canvas"),r=n.getContext("2d");return r?(e.srcObject=t,new Promise(((i,s)=>{const o=setTimeout((()=>{console.error("Screenshot timeout - likely blocked by SEB"),i(this.takeScreenshotFallback(t))}),1e4);e.addEventListener("loadeddata",(async()=>{try{const{videoWidth:s,videoHeight:a}=e,c=Math.floor(.75*s),u=Math.floor(.75*a);n.width=c,n.height=u,await e.play(),r.drawImage(e,0,0,c,u),"function"==typeof n.toBlob?n.toBlob((e=>{clearTimeout(o),e?(console.log("Finish capture screenshot"),i(e)):(console.error("Failed to create blob from canvas"),i(this.takeScreenshotFallback(t)))}),"image/jpeg",.7):(console.error("canvas.toBlob not available - likely blocked by SEB"),clearTimeout(o),i(this.takeScreenshotFallback(t)))}catch(e){console.error("Error taking screenshot:",e),clearTimeout(o),i(this.takeScreenshotFallback(t))}})),e.addEventListener("error",(e=>{console.error("Video error during screenshot:",e),clearTimeout(o),i(this.takeScreenshotFallback(t))}))}))):(console.error("Canvas context not available - likely blocked by SEB"),this.takeScreenshotFallback(t))}catch(e){return console.error("Screenshot creation failed:",e),this.takeScreenshotFallback(t)}}takeScreenshotFallback(t){console.log("[SEB] Using fallback screenshot method");const e=document.createElement("canvas");return e.width=1,e.height=1,new Promise((t=>{try{"function"==typeof e.toBlob?e.toBlob((e=>{t(e||new Blob([],{type:"image/png"}))}),"image/png"):t(new Blob([],{type:"image/png"}))}catch(e){console.error("Fallback screenshot creation failed:",e),t(new Blob([],{type:"image/png"}))}}))}isSEB(){const t=navigator.userAgent.toLowerCase();return t.includes("seb")||t.includes("safe exam browser")}hasExternalMonitors(){return"isExtended"in window.screen&&window.screen.isExtended}async takeRandomScreenshot(){let t=await this.takeScreenshot(this.stream);this.session.onRandomPhoto(t)}async takeRandomPicture(){let t=await this.takeScreenshot(this.cameraStream);this.session.onRandomPhoto(t)}async callRandomPictureOrScreenshot(){let t=+(100*Math.random()).toFixed(0);t>20&&t<25?this.takeRandomScreenshot():t>40&&t<45&&this.takeRandomPicture(),this.tracking&&setTimeout(this.callRandomPictureOrScreenshot.bind(this),15e3)}}},8410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MediaPermissions=void 0;const r=n(4763);class i{constructor(){this.userMediaStream=null,this.displayMediaStream=null,this.audioPerm=null}static getInstance(){return i.instance||(i.instance=new i),i.instance}async reinitialize(){this.stopStreams(),this.userMediaStream=null,this.displayMediaStream=null,this.audioPerm=null}async checkCameraAvailability(){let t={isAvailable:!1,message:""};try{const e=await navigator.mediaDevices.getUserMedia({video:!0});console.log("Camera is accessible.");const n="Camera is accessible.";e.getTracks().forEach((t=>t.stop())),t={isAvailable:!0,message:n}}catch(e){console.error("Camera access error:",e.message);let n="error.message";"NotReadableError"===e.name?(console.log("Camera detected but may not be working due to missing drivers or being used by another application."),n="Camera detected but may not be working due to missing drivers or being used by another application."):"NotAllowedError"===e.name?(console.log("Camera access was blocked. Please check browser permissions."),n="Camera access was blocked. Please check browser permissions."):"OverconstrainedError"===e.name?(console.log("No matching camera found. It might be unplugged or disabled."),n="No matching camera found. It might be unplugged or disabled."):(console.log("Camera is not available."),n="Camera is not available."),t.message=n}return t}async requestMediaPermission(){try{return this.userMediaStream=await navigator.mediaDevices.getUserMedia({video:!0}),this.userMediaStream.active}catch(t){return!1}}requestAudioPermission(){try{return this.audioPerm=new r.AudioDetector({onMute:()=>{},onUnmute:()=>{},onAudioBlob:t=>{}}),console.log("Audio perm",this.audioPerm),!!this.audioPerm}catch(t){return!1}}async requestScreenPermission(){try{return this.displayMediaStream=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0}),this.displayMediaStream.active}catch(t){return!1}}getUserMediaStream(){return this.userMediaStream}getDisplayMediaStream(){return this.displayMediaStream}getAudioPerm(){return this.audioPerm}stopStreams(){var t,e,n;try{return null===(t=this.userMediaStream)||void 0===t||t.getTracks()[0].stop(),null===(e=this.displayMediaStream)||void 0===e||e.getTracks()[0].stop(),null===(n=this.audioPerm)||void 0===n||n.stop(),!0}catch(t){return!1}}}e.MediaPermissions=i},4432:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(9108),e),i(n(9383),e),i(n(8921),e)},5863:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctoringManager=void 0;const r=n(9108),i=n(8410);class s{constructor(t){this.currentSessionId="",this.userId=t.userId,this.userEmail=t.userEmail,this.env=t.env,this.proctorMetricService=new r.ProctorMetricService(this.env)}static getInstance(t){return s.instance||(s.instance=new s(t)),s.instance}async getRequestPermissions(){let t={camera:!1,audio:!1,screen:!1},e=i.MediaPermissions.getInstance();if(console.log("Media permissions",e.getUserMediaStream(),e.getDisplayMediaStream(),e.getAudioPerm()),e.getUserMediaStream())t.camera=!0;else{const n=await e.requestMediaPermission();console.log("cameraPermission",n),n&&(console.log("user camera stream is already initialized successfully"),t.camera=!0)}if(e.getDisplayMediaStream())t.screen=!0;else{const n=await e.requestScreenPermission();console.log("screenPermission",n),n&&(console.log("screen permission is already initialized successfully"),t.screen=!0)}if(e.getAudioPerm())t.audio=!0;else{const n=await e.requestAudioPermission();console.log("audioPermission",n),n&&(console.log("audio permission is already initialized successfully"),t.audio=!0)}return t.camera&&t.audio&&t.screen,t}async startTracking(t){if(!this.violationsTracker)throw new Error("Violations tracker is not initialized");this.violationsTracker.start(t)}async stopTracking(){if(!this.violationsTracker)throw new Error("Violations tracker is not initialized");this.violationsTracker.stop()}async initializeSession(t,e,n){this.session=t,this.violationsTracker=e,this.violationsTracker&&this.violationsTracker.start(n)}async getSessions(t){return this.proctorMetricService.getSessions(t)}async getCurrentSession(){return this.proctorMetricService.getActiveSessions(this.userId)}async startSession(t){if(!this.session||!this.violationsTracker)throw new Error("Session or violations tracker is not initialized");try{const t=await this.proctorMetricService.getActiveSessions(this.userId);if(console.log("getActiveSessionsResponse",t),t.data)return console.log("Current active session - getActiveSessionsResponse.data",t.data),this.currentSessionId=t.data.id,t.data}catch(t){console.error("Error starting session",t)}const e=await this.proctorMetricService.startSession({courseId:t.courseId,examId:t.examId,studentId:this.userId,studentEmail:t.studentEmail,timestamp:t.timestamp});return this.currentSessionId=e.data.id,console.log("startSessionResponse",e),e.data}async endSession(){await this.proctorMetricService.endSession(this.currentSessionId),this.currentSessionId="",this.violationsTracker&&await this.violationsTracker.stop(),this.session&&(this.session=void 0)}async pingSession(){if(!this.currentSessionId)throw new Error("Session is not initialized");await this.proctorMetricService.pingSession(this.currentSessionId),console.log(`Session ${this.currentSessionId} pinged successfully`)}async onReceiveViolationTracker(t,e){if(!this.session)throw new Error("Session is not initialized");await this.proctorMetricService.updateActivities({sessionId:this.currentSessionId,activityType:t,timestamp:(new Date).toISOString(),details:t,image:e})}async onReceiveMultipleViolationTracker(t){const e={data:[]},n=[];for(const e of t)n.push({sessionId:this.currentSessionId,activityType:e.violation,timestamp:(new Date).toISOString(),image:e.evidence,details:e.violation});e.data=n,await this.proctorMetricService.updateMultipleActivities(e)}async getActivityMetrics(t){return this.proctorMetricService.getActivityMetrics(t)}async getActivityMetricsInCurrentSession(t){const e={sessionId:this.currentSessionId,activityType:t};return this.proctorMetricService.getActivityMetrics(e)}onReceiveRandomPhoto(t){if(!this.session)throw new Error("Session is not initialized");this.session.onRandomPhoto(t)}}e.ProctoringManager=s},4680:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctoringSocketCore=void 0;const r=n(7046),i=n(4763),s=n(9415),o=n(8410),a=n(4135);e.ProctoringSocketCore=class{constructor(t){this.socket=null,this.isConnected=!1,this.reconnectAttempts=0,this.pingInterval=null,this.lastPingTime=0,this.pingTimeout=3e4,this.tracking=!1,this.screenSharing=!1,this.fullscreen=!1,this.inFocus=!0,this.errorMessage="",this.errorCode="ERR_NONE",this.config={...t,reconnection:{enabled:!0,maxAttempts:5,delay:1e3,...t.reconnection}}}async connect(){return new Promise(((t,e)=>{var n,i,s;try{this.socket&&(this.socket.disconnect(),this.socket=null),this.socket=(0,r.io)(`${this.config.serverUrl}/sessions`,{query:{sessionId:this.config.sessionId},auth:{token:this.config.authToken},reconnection:null===(n=this.config.reconnection)||void 0===n?void 0:n.enabled,reconnectionAttempts:null===(i=this.config.reconnection)||void 0===i?void 0:i.maxAttempts,reconnectionDelay:null===(s=this.config.reconnection)||void 0===s?void 0:s.delay}),this.socket.on("connect",(()=>{console.log("Connected to proctoring socket server"),this.isConnected=!0,this.reconnectAttempts=0,this.setupEventListeners(),this.startPingInterval(),t()})),this.socket.on("disconnect",(()=>{console.log("Disconnected from proctoring socket server"),this.isConnected=!1,this.stopPingInterval()})),this.socket.on("connect_error",(t=>{var n;console.error(`Socket connection error: ${t.message}`),this.isConnected=!1,this.reconnectAttempts++,this.reconnectAttempts>=((null===(n=this.config.reconnection)||void 0===n?void 0:n.maxAttempts)||5)&&e(new Error(`Failed to connect after ${this.reconnectAttempts} attempts`))})),this.socket.on("connected",(t=>{console.log(`Server confirmed connection: ${JSON.stringify(t)}`)})),this.socket.on("pong",(t=>{var e;console.log(`Received pong: ${JSON.stringify(t)}`),this.lastPingTime=Date.now(),(null===(e=this.config.events)||void 0===e?void 0:e.onPong)&&this.config.events.onPong(t)})),this.socket.on("sessionEnded",(t=>{var e;console.log(`Session ended: ${JSON.stringify(t)}`),this.isConnected=!1,this.stopPingInterval(),(null===(e=this.config.events)||void 0===e?void 0:e.onSessionEnded)&&this.config.events.onSessionEnded(t)})),this.socket.on("error",(t=>{var e;console.error(`Server error: ${t.message}`),(null===(e=this.config.events)||void 0===e?void 0:e.onError)&&this.config.events.onError(t)}))}catch(t){console.error(`Error connecting to socket: ${t}`),e(t)}}))}disconnect(){this.socket&&(this.socket.disconnect(),this.socket=null,this.isConnected=!1,this.stopPingInterval())}async pingSession(){return new Promise(((t,e)=>{var n;if(this.socket&&this.isConnected)try{this.socket.emit("ping",{sessionId:this.config.sessionId}),console.log(`Sent ping for session: ${this.config.sessionId}`),(null===(n=this.config.events)||void 0===n?void 0:n.onPing)&&this.config.events.onPing({sessionId:this.config.sessionId}),t()}catch(t){console.error(`Error sending ping: ${t}`),e(t)}else e(new Error("Not connected to socket server"))}))}async endSession(){return new Promise(((t,e)=>{if(this.socket&&this.isConnected)try{this.socket.emit("endSession",{sessionId:this.config.sessionId}),console.log(`Sent end session request for: ${this.config.sessionId}`),t()}catch(t){console.error(`Error ending session: ${t}`),e(t)}else e(new Error("Not connected to socket server"))}))}async startSession(t){var e;if(this.tracking)return!0;this.tracking=!0;try{if(await this.requestMediaPermissions(),!this.cameraStream)return!1;this.audioDetector=new i.AudioDetector({onMute:()=>{this.config.session.onPossibleViolation(a.PossibleViolation.AudioMuted)},onUnmute:()=>{},onAudioBlob:t=>{this.config.session.onPossibleViolation(a.PossibleViolation.AudioNoise,t)}}),await(null===(e=this.audioDetector)||void 0===e?void 0:e.start()),this.registerForEvents(),this.faceDetector=new s.FaceDetector(this.cameraStream,{faceCountDetection:async t=>{console.log("Face count: ",t),t>1&&this.tracking?this.config.session.onPossibleViolation(a.PossibleViolation.MultipleFaces,await this.takeScreenshot(this.cameraStream)):0===t&&this.tracking&&this.config.session.onPossibleViolation(a.PossibleViolation.NoFace,await this.takeScreenshot(this.cameraStream))}});const n=await this.startScreenSharing(!0);return console.log("Is screen sharing",n),n?(t&&t((async()=>this.startFullscreen())),this.callRandomPictureOrScreenshot(),console.log("Tracking successfully in library..."),!0):(this.errorCode="ERR_SCREEN_SHARING",!1)}catch(t){return console.error("Permission request or other error:",t),this.errorMessage="Permission request dismissed or denied",!1}}async stopSession(){var t,e;if(!this.tracking)return;const n=o.MediaPermissions.getInstance();null===(t=this.audioDetector)||void 0===t||t.stop(),this.audioDetector=void 0,this.unregisterEvents(),await this.stopFullscreen(),await this.stopScreenSharing(),null===(e=this.cameraStream)||void 0===e||e.getTracks()[0].stop(),n.stopStreams(),this.tracking=!1}async requestMediaPermissions(){try{const t=o.MediaPermissions.getInstance().getUserMediaStream();t&&null!==t?(console.log("user media stream is already initialized successfully"),this.cameraStream=t):this.cameraStream=await navigator.mediaDevices.getUserMedia({video:!0})}catch(t){throw console.error("Camera permission denied:",t),new Error("Camera permission denied")}}async startScreenSharing(t){if(this.screenSharing)return!0;t&&await this.startFullscreen();const e=o.MediaPermissions.getInstance().getDisplayMediaStream();let n;e&&null!==e?(console.log("Display media stream has already initialized successfully"),n=e):n=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!1});let r=n.getVideoTracks()[0].getSettings();return"monitor"===r.displaySurface?(this.stream=n,this.videoElement=document.createElement("video"),this.videoElement.autoplay=!0,this.videoElement.muted=!0,this.videoElement.style.position="fixed",this.videoElement.width=1,this.videoElement.height=1,this.videoElement.srcObject=n,n.getTracks()[0].onended=this.screenSharingEnded.bind(this),this.screenSharing=!0):(n.getTracks().forEach((t=>t.stop())),this.errorMessage="Please share your entire screen!"),"monitor"===r.displaySurface}async stopScreenSharing(){var t;this.videoElement&&(console.log("stopping screen sharing"),null===(t=this.stream)||void 0===t||t.getTracks()[0].stop(),this.screenSharing=!1,this.videoElement.remove(),this.stream=void 0,this.videoElement=void 0)}async screenSharingEnded(){console.log("screen sharing has been ended by the user! Shite!"),this.screenSharing=!1,this.tracking&&this.config.session.onPossibleViolation(a.PossibleViolation.StoppedScreenSharing),this.stream=void 0,this.videoElement=void 0}async startFullscreen(){try{await document.documentElement.requestFullscreen(),this.fullscreen=!0,console.log("Request full screen successfully...")}catch(t){console.log("Exception with start fullscreen",JSON.stringify(t))}}async stopFullscreen(){try{document.fullscreenElement&&await document.exitFullscreen()}catch(t){console.log(t)}this.fullscreen=!1}registerForEvents(){window.addEventListener("focus",this.focusEvent.bind(this)),window.addEventListener("blur",this.blurEvent.bind(this)),window.addEventListener("resize",this.resizeEvent.bind(this))}unregisterEvents(){window.removeEventListener("focus",this.focusEvent.bind(this)),window.removeEventListener("blur",this.blurEvent.bind(this)),window.removeEventListener("resize",this.resizeEvent.bind(this))}focusEvent(){console.log("focus"),this.inFocus=!0}async blurEvent(){console.log("blur"),this.inFocus=!1,this.tracking&&setTimeout((async()=>{const t=await this.takeScreenshot(this.stream);this.config.session.onPossibleViolation(a.PossibleViolation.SwitchedFocus,t)}),5e3)}isFullScreen(){return!window.screenTop&&!window.screenY}resizeEvent(){console.log("defering it"),setTimeout((()=>{console.log("resize after 1 second");var t=window.screen.height,e=window.screen.width,n=window.outerHeight,r=window.outerWidth;t===n&&e===r?console.log("Fullscreen: nothing to do!"):(this.tracking&&this.fullscreen&&setTimeout((async()=>{const t=await this.takeScreenshot(this.stream);this.config.session.onPossibleViolation(a.PossibleViolation.ToggledFullscreen,t)}),1e3),this.stopFullscreen())}),1e3)}async takeScreenshot(t){if(this.isSEB())return console.log("Running in SEB - using fallback screenshot method"),this.takeScreenshotFallback(t);try{const e=document.createElement("video"),n=document.createElement("canvas"),r=n.getContext("2d");return r?(e.srcObject=t,new Promise(((i,s)=>{const o=setTimeout((()=>{console.error("Screenshot timeout - likely blocked by SEB"),i(this.takeScreenshotFallback(t))}),1e4);e.addEventListener("loadeddata",(async()=>{try{const{videoWidth:s,videoHeight:a}=e,c=Math.floor(.75*s),u=Math.floor(.75*a);n.width=c,n.height=u,await e.play(),r.drawImage(e,0,0,c,u),"function"==typeof n.toBlob?n.toBlob((e=>{clearTimeout(o),e?(console.log("Finish capture screenshot"),i(e)):(console.error("Failed to create blob from canvas"),i(this.takeScreenshotFallback(t)))}),"image/jpeg",.7):(console.error("canvas.toBlob not available - likely blocked by SEB"),clearTimeout(o),i(this.takeScreenshotFallback(t)))}catch(e){console.error("Error taking screenshot:",e),clearTimeout(o),i(this.takeScreenshotFallback(t))}})),e.addEventListener("error",(e=>{console.error("Video error during screenshot:",e),clearTimeout(o),i(this.takeScreenshotFallback(t))}))}))):(console.error("Canvas context not available - likely blocked by SEB"),this.takeScreenshotFallback(t))}catch(e){return console.error("Screenshot creation failed:",e),this.takeScreenshotFallback(t)}}takeScreenshotFallback(t){console.log("[SEB] Using fallback screenshot method");const e=document.createElement("canvas");return e.width=1,e.height=1,new Promise((t=>{try{"function"==typeof e.toBlob?e.toBlob((e=>{t(e||new Blob([],{type:"image/png"}))}),"image/png"):t(new Blob([],{type:"image/png"}))}catch(e){console.error("Fallback screenshot creation failed:",e),t(new Blob([],{type:"image/png"}))}}))}isSEB(){const t=navigator.userAgent.toLowerCase();return t.includes("seb")||t.includes("safe exam browser")}hasExternalMonitors(){return"isExtended"in window.screen&&window.screen.isExtended}async takeRandomScreenshot(){let t=await this.takeScreenshot(this.stream);this.config.session.onRandomPhoto(t)}async takeRandomPicture(){let t=await this.takeScreenshot(this.cameraStream);this.config.session.onRandomPhoto(t)}callRandomPictureOrScreenshot(){let t=+(100*Math.random()).toFixed(0);t>20&&t<25?this.takeRandomScreenshot():t>40&&t<45&&this.takeRandomPicture(),this.tracking&&setTimeout(this.callRandomPictureOrScreenshot.bind(this),15e3)}isSocketConnected(){return this.isConnected&&null!==this.socket}setupEventListeners(){this.socket}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval((async()=>{try{await this.pingSession()}catch(t){console.error(`Error in ping interval: ${t}`)}}),this.pingTimeout)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}}},1146:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctoringSocketManager=void 0;const r=n(4680);e.ProctoringSocketManager=class{constructor(t){this.manager=new r.ProctoringSocketCore(t)}async connect(){return this.manager.connect()}async pingSession(){return this.manager.pingSession()}async startSession(){return this.manager.startSession()}async endSession(){return this.manager.endSession()}disconnect(){this.manager.disconnect()}}},9383:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(5863),e),i(n(1146),e),i(n(4680),e)},3134:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Environment=void 0,(n=e.Environment||(e.Environment={})).Staging="Staging",n.UAT="UAT",n.Prod="Prod"},8921:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(3134),e),i(n(4135),e),i(n(1971),e)},4135:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.PossibleViolation=void 0,(n=e.PossibleViolation||(e.PossibleViolation={})).MultipleFaces="MultipleFaces",n.NoFace="NoFace",n.AudioNoise="AudioNoise",n.AudioMuted="AudioMuted",n.SwitchedFocus="SwitchedFocus",n.ToggledFullscreen="ToggledFullscreen",n.StoppedScreenSharing="StoppedScreenSharing"},1971:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},1811:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="undefined"!=typeof self?self:{};function r(){throw Error("Invalid UTF8")}function i(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let s,o;const a="undefined"!=typeof TextDecoder;let c;const u="undefined"!=typeof TextEncoder;function h(t){if(u)t=(c||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)r[n++]=e;else{if(e<2048)r[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){const s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var l,f;t:{for(var d=["CLOSURE_FLAGS"],p=n,g=0;g<d.length;g++)if(null==(p=p[d[g]])){f=null;break t}f=p}var m,v=f&&f[610401301];l=null!=v&&v;const y=n.navigator;function _(t){return!!l&&!!m&&m.brands.some((({brand:e})=>e&&-1!=e.indexOf(t)))}function b(t){var e;return(e=n.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}function w(){return!!l&&!!m&&m.brands.length>0}function E(){return w()?_("Chromium"):(b("Chrome")||b("CriOS"))&&!(!w()&&b("Edge"))||b("Silk")}function S(t){return S[" "](t),t}m=y&&y.userAgentData||null,S[" "]=function(){};var k=!w()&&(b("Trident")||b("MSIE"));!b("Android")||E(),E(),b("Safari")&&(E()||!w()&&b("Coast")||!w()&&b("Opera")||!w()&&b("Edge")||(w()?_("Microsoft Edge"):b("Edg/"))||w()&&_("Opera"));var T={},C=null;function A(){if(!C){C={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const r=t.concat(e[n].split(""));T[n]=r;for(let t=0;t<r.length;t++){const e=r[t];void 0===C[e]&&(C[e]=t)}}}}var x="undefined"!=typeof Uint8Array,P=!k&&"function"==typeof btoa;function O(t){if(!P){var e;void 0===e&&(e=0),A(),e=T[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let c=0,u=0;for(;c<t.length-2;c+=3){var i=t[c],s=t[c+1],o=t[c+2],a=e[i>>2];i=e[(3&i)<<4|s>>4],s=e[(15&s)<<2|o>>6],o=e[63&o],n[u++]=a+i+s+o}switch(a=0,o=r,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||r;case 1:t=t[c],n[u]=e[t>>2]+e[(3&t)<<4|a>>4]+o+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const F=/[-_.]/g,I={"-":"+",_:"/",".":"="};function R(t){return I[t]||""}function M(t){if(!P)return function(t){const e=t.length;let n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);const r=new Uint8Array(n);let i=0;return function(t,e){function n(e){for(;r<t.length;){const e=t.charAt(r++),n=C[e];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}A();let r=0;for(;;){const t=n(-1),r=n(0),i=n(64),s=n(64);if(64===s&&-1===t)break;e(t<<2|r>>4),64!=i&&(e(r<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}(t);F.test(t)&&(t=t.replace(F,R)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function L(t){return x&&null!=t&&t instanceof Uint8Array}var N={};function j(){return U||=new B(null,N)}function D(t){G(N);var e=t.g;return null==(e=null==e||L(e)?e:"string"==typeof e?M(e):null)?e:t.g=e}var B=class{h(){return new Uint8Array(D(this)||0)}constructor(t,e){if(G(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let U,V;function G(t){if(t!==N)throw Error("illegal external caller")}function W(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function z(t){return W(t=Error(t),"warning"),t}var q="function"==typeof Symbol&&"symbol"==typeof Symbol(),H=new Set;function $(t,e,n=!1,r=!1){return t="function"==typeof Symbol&&"symbol"==typeof Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e,n&&H.add(t),t}var X=$("jas",void 0,!0,!0),K=$(void 0,"0di"),Y=$(void 0,"2ex"),J=$(void 0,"1oa",!0),Z=$(void 0,Symbol(),!0);const Q=q?X:"Ga",tt={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},et=Object.defineProperties;function nt(t,e){q||Q in t||et(t,tt),t[Q]|=e}function rt(t,e){q||Q in t||et(t,tt),t[Q]=e}function it(t){return nt(t,34),t}function st(t,e){rt(e,-30975&(0|t))}function ot(t,e){rt(e,-30941&(34|t))}function at(){return"function"==typeof BigInt}function ct(t){return Array.prototype.slice.call(t)}var ut,ht={},lt={};function ft(t){return!(!t||"object"!=typeof t||t.Ia!==lt)}function dt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function pt(t,e){if(null!=t)if("string"==typeof t)t=t?new B(t,N):j();else if(t.constructor!==B)if(L(t))t=t.length?new B(new Uint8Array(t),N):j();else{if(!e)throw Error();t=void 0}return t}function gt(t){return!(!Array.isArray(t)||t.length||!(1&(0|t[Q])))}const mt=[];function vt(t){if(2&t)throw Error()}rt(mt,55),ut=Object.freeze(mt);class yt{constructor(t,e,n){this.l=0,this.g=t,this.h=e,this.m=n}next(){if(this.l<this.g.length){const t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new yt(this.g,this.h,this.m)}}function _t(t){return Z?t[Z]:void 0}var bt=Object.freeze({});function wt(t){return t.Qa=!0,t}var Et=wt((t=>"number"==typeof t)),St=wt((t=>"string"==typeof t)),kt=wt((t=>"boolean"==typeof t)),Tt="function"==typeof n.BigInt&&"bigint"==typeof n.BigInt(0),Ct=wt((t=>Tt?t>=xt&&t<=Ot:"-"===t[0]?Ft(t,At):Ft(t,Pt)));const At=Number.MIN_SAFE_INTEGER.toString(),xt=Tt?BigInt(Number.MIN_SAFE_INTEGER):void 0,Pt=Number.MAX_SAFE_INTEGER.toString(),Ot=Tt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Ft(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let n=0;n<t.length;n++){const r=t[n],i=e[n];if(r>i)return!1;if(r<i)return!0}}const It="function"==typeof Uint8Array.prototype.slice;let Rt,Mt=0,Lt=0;function Nt(t){const e=t>>>0;Mt=e,Lt=(t-e)/4294967296>>>0}function jt(t){if(t<0){Nt(-t);const[e,n]=zt(Mt,Lt);Mt=e>>>0,Lt=n>>>0}else Nt(t)}function Dt(t){const e=Rt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Lt=0,Mt=e.getUint32(0,!0)}function Bt(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:Vt(t,e)}function Ut(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),"number"==typeof(t=Bt(t,e))?n?-t:t:n?"-"+t:t}function Vt(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else at()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=t/1e7>>>0,t%=1e7),n>=1e7&&(e+=n/1e7>>>0,n%=1e7),n=e+Gt(n)+Gt(t));return n}function Gt(t){return t=String(t),"0000000".slice(t.length)+t}function Wt(t){if(t.length<16)jt(Number(t));else if(at())t=BigInt(t),Mt=Number(t&BigInt(4294967295))>>>0,Lt=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);Lt=Mt=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));Lt*=1e6,Mt=1e6*Mt+e,Mt>=4294967296&&(Lt+=Math.trunc(Mt/4294967296),Lt>>>=0,Mt>>>=0)}if(e){const[t,e]=zt(Mt,Lt);Mt=t,Lt=e}}}function zt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}const qt="function"==typeof BigInt?BigInt.asIntN:void 0,Ht="function"==typeof BigInt?BigInt.asUintN:void 0,$t=Number.isSafeInteger,Xt=Number.isFinite,Kt=Math.trunc;function Yt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Jt(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}const Zt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Qt(t){switch(typeof t){case"bigint":return!0;case"number":return Xt(t);case"string":return Zt.test(t);default:return!1}}function te(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Xt(t)?0|t:void 0}function ee(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Xt(t)?t>>>0:void 0}function ne(t){if("-"===t[0])return!1;const e=t.length;return e<20||20===e&&Number(t.substring(0,6))<184467}function re(t){return t=Kt(t),$t(t)||(jt(t),t=Ut(Mt,Lt)),t}function ie(t){var e=Kt(Number(t));if($t(e))return String(e);if(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),e=t.length,!("-"===t[0]?e<20||20===e&&Number(t.substring(0,7))>-922337:e<19||19===e&&Number(t.substring(0,6))<922337))if(Wt(t),t=Mt,2147483648&(e=Lt))if(at())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=zt(t,e);t="-"+Vt(n,r)}else t=Vt(t,e);return t}function se(t){return null==t?t:"bigint"==typeof t?(Ct(t)?t=Number(t):(t=qt(64,t),t=Ct(t)?Number(t):String(t)),t):Qt(t)?"number"==typeof t?re(t):ie(t):void 0}function oe(t){if("string"!=typeof t)throw Error();return t}function ae(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ce(t){return null==t||"string"==typeof t?t:void 0}function ue(t,e,n,r){if(null!=t&&"object"==typeof t&&t.W===ht)return t;if(!Array.isArray(t))return n?2&r?((t=e[K])||(it((t=new e).u),t=e[K]=t),e=t):e=new e:e=void 0,e;let i=n=0|t[Q];return 0===i&&(i|=32&r),i|=2&r,i!==n&&rt(t,i),new e(t)}function he(t,e,n){if(e)t:{if(!Qt(e=t))throw z("int64");switch(typeof e){case"string":e=ie(e);break t;case"bigint":if(t=e=qt(64,e),St(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(Et(t)&&!Number.isSafeInteger(t))throw Error(String(t));e=Tt?BigInt(e):kt(e)?e?"1":"0":St(e)?e.trim()||"0":String(e);break t;default:e=re(e)}}else e=se(t);return"string"==typeof(n=null==(t=e)?n?0:void 0:t)&&$t(e=+n)?e:n}const le={};let fe=function(){try{return S(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class de{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}const pe=fe?(Object.setPrototypeOf(de.prototype,Map.prototype),Object.defineProperties(de.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),de):class extends Map{constructor(){super()}};function ge(t){return t}function me(t){if(2&t.L)throw Error("Cannot mutate an immutable Map")}var ve=class extends pe{constructor(t,e,n=ge,r=ge){super();let i=0|t[Q];i|=64,rt(t,i),this.L=i,this.S=e,this.R=n,this.Y=this.S?ye:r;for(let s=0;s<t.length;s++){const o=t[s],a=n(o[0],!1,!0);let c=o[1];e?void 0===c&&(c=null):c=r(o[1],!1,!0,void 0,void 0,i),super.set(a,c)}}na(t=_e){if(0!==this.size)return this.X(t)}X(t=_e){const e=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=t(r[0]),r[1]=t(r[1]),e.push(r);return e}clear(){me(this),super.clear()}delete(t){return me(this),super.delete(this.R(t,!0,!1))}entries(){var t=this.ma();return new yt(t,be,this)}keys(){return this.Ha()}values(){var t=this.ma();return new yt(t,ve.prototype.get,this)}forEach(t,e){super.forEach(((n,r)=>{t.call(e,this.get(r),r,this)}))}set(t,e){return me(this),null==(t=this.R(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.Y(e,!0,!0,this.S,!1,this.L))}Na(t){const e=this.R(t[0],!1,!0);t=t[1],t=this.S?void 0===t?null:t:this.Y(t,!1,!0,void 0,!1,this.L),super.set(e,t)}has(t){return super.has(this.R(t,!1,!1))}get(t){t=this.R(t,!1,!1);const e=super.get(t);if(void 0!==e){var n=this.S;return n?((n=this.Y(e,!1,!0,n,this.ra,this.L))!==e&&super.set(t,n),n):e}}ma(){return Array.from(super.keys())}Ha(){return super.keys()}[Symbol.iterator](){return this.entries()}};function ye(t,e,n,r,i,s){return t=ue(t,r,n,s),i&&(t=Me(t)),t}function _e(t){return t}function be(t){return[t,this.get(t)]}let we,Ee,Se;function ke(){return we||=new ve(it([]),void 0,void 0,void 0,le)}function Te(t,e,n,r,i){if(null!=t){if(Array.isArray(t))t=gt(t)?void 0:i&&2&(0|t[Q])?t:Ce(t,e,n,void 0!==r,i);else if(dt(t)){const s={};for(let o in t)s[o]=Te(t[o],e,n,r,i);t=s}else t=e(t,r);return t}}function Ce(t,e,n,r,i){const s=r||n?0|t[Q]:0,o=r?!!(32&s):void 0;r=ct(t);for(let t=0;t<r.length;t++)r[t]=Te(r[t],e,n,o,i);return n&&((t=_t(t))&&(r[Z]=ct(t)),n(s,r)),r}function Ae(t){return Te(t,xe,void 0,void 0,!1)}function xe(t){return t.W===ht?t.toJSON():t instanceof ve?t.na(Ae):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"bigint":return Ct(t)?Number(t):String(t);case"boolean":return t?1:0;case"object":if(t)if(Array.isArray(t)){if(gt(t))return}else{if(L(t))return O(t);if(t instanceof B){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=O(e)}if(t instanceof ve)return t.na()}}return t}(t)}function Pe(t){return Ce(t,xe,void 0,void 0,!1)}function Oe(t,e,n){return t=Fe(t,e[0],e[1],n?1:2),e!==Ee&&n&&nt(t,16384),t}function Fe(t,e,n,r){if(null==t){var i=96;n?(t=[n],i|=512):t=[],e&&(i=-33521665&i|(1023&e)<<15)}else{if(!Array.isArray(t))throw Error("narr");if(2048&(i=0|t[Q]))throw Error("farr");if(64&i)return t;if(1===r||2===r||(i|=64),n&&(i|=512,n!==t[0]))throw Error("mid");t:{if(r=(n=t).length){const t=r-1;if(dt(n[t])){if((e=t-(512&(i|=256)?0:-1))>=1024)throw Error("pvtlmt");i=-33521665&i|(1023&e)<<15;break t}}if(e){if((e=Math.max(e,r-(512&i?0:-1)))>1024)throw Error("spvt");i=-33521665&i|(1023&e)<<15}}}return rt(t,i),t}function Ie(t,e,n=ot){if(null!=t){if(x&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=0|t[Q];return 2&r?t:(e&&=0===r||!!(32&r)&&!(64&r||!(16&r)),e?(rt(t,-12293&(34|r)),t):Ce(t,Ie,4&r?ot:n,!0,!0))}return t.W===ht?t=2&(r=0|(n=t.u)[Q])?t:new t.constructor(Re(n,r,!0)):t instanceof ve&&!(2&t.L)&&(n=it(t.X(Ie)),t=new ve(n,t.S,t.R,t.Y)),t}}function Re(t,e,n){const r=n||2&e?ot:st,i=!!(32&e);return t=function(t,e,n){const r=ct(t);var i=r.length;const s=256&e?r[i-1]:void 0;for(i+=s?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(s){e=r[e]={};for(const t in s)e[t]=n(s[t])}return(t=_t(t))&&(r[Z]=ct(t)),r}(t,e,(t=>Ie(t,i,r))),nt(t,32|(n?2:0)),t}function Me(t){const e=t.u,n=0|e[Q];return 2&n?new t.constructor(Re(e,n,!1)):t}function Le(t,e){return Ne(t=t.u,0|t[Q],e)}function Ne(t,e,r,i){if(-1===r)return null;var s=r+(512&e?0:-1);const o=t.length-1;return s>=o&&256&e?t[o][r]:i&&256&e&&null!=(e=t[o][r])?(null!=t[s]&&null!=Y&&((s=(t=V??={})[Y]||0)>=4||(t[Y]=s+1,W(t=Error(),"incident"),function(t){n.setTimeout((()=>{throw t}),0)}(t))),e):s<=o?t[s]:void 0}function je(t,e,n){const r=t.u;let i=0|r[Q];return vt(i),De(r,i,e,n),t}function De(t,e,n,r){const i=512&e?0:-1,s=n+i;var o=t.length-1;return s>=o&&256&e?(t[o][n]=r,e):s<=o?(t[s]=r,256&e&&n in(t=t[o])&&delete t[n],e):(void 0!==r&&(n>=(o=e>>15&1023||536870912)?null!=r&&(t[o+i]={[n]:r},rt(t,e|=256)):t[s]=r),e)}function Be(t,e){let n=0|(t=t.u)[Q];const r=Ne(t,n,e),i=Yt(r);return null!=i&&i!==r&&De(t,n,e,i),i}function Ue(t){let e=0|(t=t.u)[Q];const n=Ne(t,e,1),r=pt(n,!0);return null!=r&&r!==n&&De(t,e,1,r),r}function Ve(){return void 0===bt?2:4}function Ge(t,e,n,r,i){const s=t.u,o=2&(t=0|s[Q])?1:r;i=!!i;let a=0|(r=We(s,t,e))[Q];if(!(4&a)){4&a&&(r=ct(r),a=an(a,t),t=De(s,t,e,r));let i=0,o=0;for(;i<r.length;i++){const t=n(r[i]);null!=t&&(r[o++]=t)}o<i&&(r.length=o),a=ze(a,t),n=-4097&(20|a),a=n&=-8193,rt(r,a),2&a&&Object.freeze(r)}return 1===o||4===o&&32&a?qe(a)||(i=a,a|=2,a!==i&&rt(r,a),Object.freeze(r)):(2===o&&qe(a)&&(r=ct(r),a=an(a,t),a=cn(a,t,i),rt(r,a),t=De(s,t,e,r)),qe(a)||(e=a,a=cn(a,t,i),a!==e&&rt(r,a))),r}function We(t,e,n,r){return t=Ne(t,e,n,r),Array.isArray(t)?t:ut}function ze(t,e){return 0===t&&(t=an(t,e)),1|t}function qe(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function He(t){t=ct(t);for(let e=0;e<t.length;e++){const n=t[e]=ct(t[e]);Array.isArray(n[1])&&(n[1]=it(n[1]))}return t}function $e(t,e,n,r){let i=0|(t=t.u)[Q];vt(i),De(t,i,e,("0"===r?0===Number(n):n===r)?void 0:n)}function Xe(t,e,n,r,i){vt(e);var s=!(!(64&e)&&16384&e);const o=(i=We(t,e,n,i))!==ut;if(s||!o){let a=s=o?0|i[Q]:0;(!o||2&a||qe(a)||4&a&&!(32&a))&&(i=ct(i),a=an(a,e),e=De(t,e,n,i)),a=-13&ze(a,e),a=cn(r?-17&a:16|a,e,!0),a!==s&&rt(i,a)}return i}function Ke(t,e){var n=_s;return Ze(Ye(t=t.u),t,0|t[Q],n)===e?e:-1}function Ye(t){if(q)return t[J]??(t[J]=new Map);if(J in t)return t[J];const e=new Map;return Object.defineProperty(t,J,{value:e}),e}function Je(t,e,n,r){const i=Ye(t),s=Ze(i,t,e,n);return s!==r&&(s&&(e=De(t,e,s)),i.set(n,r)),e}function Ze(t,e,n,r){let i=t.get(r);if(null!=i)return i;i=0;for(let t=0;t<r.length;t++){const s=r[t];null!=Ne(e,n,s)&&(0!==i&&(n=De(e,n,i)),i=s)}return t.set(r,i),i}function Qe(t,e,n,r){let i,s=0|t[Q];if(null!=(r=Ne(t,s,n,r))&&r.W===ht)return(e=Me(r))!==r&&De(t,s,n,e),e.u;if(Array.isArray(r)){const t=0|r[Q];i=2&t?Oe(Re(r,t,!1),e,!0):64&t?r:Oe(i,e,!0)}else i=Oe(void 0,e,!0);return i!==r&&De(t,s,n,i),i}function tn(t,e,n,r){let i=0|(t=t.u)[Q];return(e=ue(r=Ne(t,i,n,r),e,!1,i))!==r&&null!=e&&De(t,i,n,e),e}function en(t,e,n,r=!1){if(null==(e=tn(t,e,n,r)))return e;if(!(2&(r=0|(t=t.u)[Q]))){const i=Me(e);i!==e&&De(t,r,n,e=i)}return e}function nn(t,e,n,r,i,s,o){t=t.u;var a=!!(2&e);const c=a?1:i;s=!!s,o&&=!a;var u=0|(i=We(t,e,r))[Q];if(!(a=!!(4&u))){var h=i,l=e;const t=!!(2&(u=ze(u,e)));t&&(l|=2);let r=!t,s=!0,o=0,a=0;for(;o<h.length;o++){const e=ue(h[o],n,!1,l);if(e instanceof n){if(!t){const t=!!(2&(0|e.u[Q]));r&&=!t,s&&=t}h[a++]=e}}a<o&&(h.length=a),u|=4,u=s?16|u:-17&u,rt(h,u=r?8|u:-9&u),t&&Object.freeze(h)}if(o&&!(8&u||!i.length&&(1===c||4===c&&32&u))){for(qe(u)&&(i=ct(i),u=an(u,e),e=De(t,e,r,i)),n=i,o=u,h=0;h<n.length;h++)(u=n[h])!==(l=Me(u))&&(n[h]=l);o|=8,rt(n,o=n.length?-17&o:16|o),u=o}return 1===c||4===c&&32&u?qe(u)||(e=u,(u|=!i.length||16&u&&(!a||32&u)?2:2048)!==e&&rt(i,u),Object.freeze(i)):(2===c&&qe(u)&&(rt(i=ct(i),u=cn(u=an(u,e),e,s)),e=De(t,e,r,i)),qe(u)||(r=u,(u=cn(u,e,s))!==r&&rt(i,u))),i}function rn(t,e,n){const r=0|t.u[Q];return nn(t,r,e,n,Ve(),!1,!(2&r))}function sn(t,e,n,r){return null==r&&(r=void 0),je(t,n,r)}function on(t,e,n,r){null==r&&(r=void 0);t:{let i=0|(t=t.u)[Q];if(vt(i),null==r){const r=Ye(t);if(Ze(r,t,i,n)!==e)break t;r.set(n,0)}else i=Je(t,i,n,e);De(t,i,e,r)}}function an(t,e){return-2049&(32|(2&e?2|t:-3&t))}function cn(t,e,n){return 32&e&&n||(t&=-33),t}function un(t,e,n,r){const i=0|t.u[Q];vt(i),t=nn(t,i,n,e,2,!0),r=null!=r?r:new n,t.push(r),t[Q]=2&(0|r.u[Q])?-9&t[Q]:-17&t[Q]}function hn(t,e){return te(Le(t,e))}function ln(t,e){return ce(Le(t,e))}function fn(t,e){return Be(t,e)??0}function dn(t,e,n){if(null!=n&&"boolean"!=typeof n)throw t=typeof n,Error(`Expected boolean but got ${"object"!=t?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);je(t,e,n)}function pn(t,e,n){if(null!=n){if("number"!=typeof n)throw z("int32");if(!Xt(n))throw z("int32");n|=0}je(t,e,n)}function gn(t,e,n){if(null!=n&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);je(t,e,n)}function mn(t,e,n){{const o=t.u;let a=0|o[Q];if(vt(a),null==n)De(o,a,e);else{var r=t=0|n[Q],i=qe(t),s=i||Object.isFrozen(n);for(i||(t=0),s||(n=ct(n),r=0,t=cn(t=an(t,a),a,!0),s=!1),t|=21,i=0;i<n.length;i++){const e=n[i],o=oe(e);Object.is(e,o)||(s&&(n=ct(n),r=0,t=cn(t=an(t,a),a,!0),s=!1),n[i]=o)}t!==r&&(s&&(n=ct(n),t=cn(t=an(t,a),a,!0)),rt(n,t)),De(o,a,e,n)}}}function vn(t,e,n){vt(0|t.u[Q]),Ge(t,e,ce,2,!0).push(oe(n))}function yn(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function _n(){return Error("Failed to read varint, encoding is invalid.")}function bn(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function wn(t){if("string"==typeof t)return{buffer:M(t),N:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),N:!1};if(t.constructor===Uint8Array)return{buffer:t,N:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),N:!1};if(t.constructor===B)return{buffer:D(t)||new Uint8Array(0),N:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),N:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function En(t,e){let n,r=0,i=0,s=0;const o=t.h;let a=t.g;do{n=o[a++],r|=(127&n)<<s,s+=7}while(s<32&&128&n);for(s>32&&(i|=(127&n)>>4),s=3;s<32&&128&n;s+=7)n=o[a++],i|=(127&n)<<s;if(On(t,a),n<128)return e(r>>>0,i>>>0);throw _n()}function Sn(t){let e=0,n=t.g;const r=n+10,i=t.h;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return On(t,n),!!(127&e)}throw _n()}function kn(t){const e=t.h;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw _n();return On(t,n),i}function Tn(t){return kn(t)>>>0}function Cn(t){var e=t.h;const n=t.g,r=e[n],i=e[n+1],s=e[n+2];return e=e[n+3],On(t,t.g+4),(r<<0|i<<8|s<<16|e<<24)>>>0}function An(t){var e=Cn(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:t*(1/0):0==n?1401298464324817e-60*t*e:t*Math.pow(2,n-150)*(e+8388608)}function xn(t){return kn(t)}function Pn(t,e,{ba:n=!1}={}){t.ba=n,e&&(e=wn(e),t.h=e.buffer,t.m=e.N,t.j=0,t.l=t.h.length,t.g=t.j)}function On(t,e){if(t.g=e,e>t.l)throw bn(t.l,e)}function Fn(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw bn(e,t.l-n);return t.g=r,n}function In(t,e){if(0==e)return j();var n=Fn(t,e);return t.ba&&t.m?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?new Uint8Array(0):It?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?j():new B(n,N)}ve.prototype.toJSON=void 0,ve.prototype.Ia=lt;var Rn=[];function Mn(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=Tn(t.g);if(e=n>>>3,!((n&=7)>=0&&n<=5))throw yn(n,t.l);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function Ln(t){switch(t.h){case 0:0!=t.h?Ln(t):Sn(t.g);break;case 1:On(t=t.g,t.g+8);break;case 2:if(2!=t.h)Ln(t);else{var e=Tn(t.g);On(t=t.g,t.g+e)}break;case 5:On(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!Mn(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}Ln(t)}break;default:throw yn(t.h,t.l)}}function Nn(t,e,n){const r=t.g.l,i=Tn(t.g),s=t.g.g+i;let o=s-r;if(o<=0&&(t.g.l=s,n(e,t,void 0,void 0,void 0),o=s-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=s,t.g.l=r,e}function jn(t){var e=Tn(t.g),n=Fn(t=t.g,e);if(t=t.h,a){var c,u=t;(c=o)||(c=o=new TextDecoder("utf-8",{fatal:!0})),e=n+e,u=0===n&&e===u.length?u:u.subarray(n,e);try{var h=c.decode(u)}catch(t){if(void 0===s){try{c.decode(new Uint8Array([128]))}catch(t){}try{c.decode(new Uint8Array([97])),s=!0}catch(t){s=!1}}throw!s&&(o=void 0),t}}else{e=(h=n)+e,n=[];let s,o=null;for(;h<e;){var l=t[h++];l<128?n.push(l):l<224?h>=e?r():(s=t[h++],l<194||128!=(192&s)?(h--,r()):n.push((31&l)<<6|63&s)):l<240?h>=e-1?r():(s=t[h++],128!=(192&s)||224===l&&s<160||237===l&&s>=160||128!=(192&(c=t[h++]))?(h--,r()):n.push((15&l)<<12|(63&s)<<6|63&c)):l<=244?h>=e-2?r():(s=t[h++],128!=(192&s)||s-144+(l<<28)>>30!=0||128!=(192&(c=t[h++]))||128!=(192&(u=t[h++]))?(h--,r()):(l=(7&l)<<18|(63&s)<<12|(63&c)<<6|63&u,l-=65536,n.push(55296+(l>>10&1023),56320+(1023&l)))):r(),n.length>=8192&&(o=i(o,n),n.length=0)}h=i(o,n)}return h}function Dn(t){const e=Tn(t.g);return In(t.g,e)}function Bn(t,e,n){var r=Tn(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var Un=[];function Vn(t){return t}let Gn;function Wn(t,e,n){e.g?e.m(t,e.g,e.h,n):e.m(t,e.h,n)}var zn=class{constructor(t,e){this.u=Fe(t,e)}toJSON(){const t=!Gn;try{return t&&(Gn=Pe),qn(this)}finally{t&&(Gn=void 0)}}l(){var t=go;return t.g?t.l(this,t.g,t.h,!0):t.l(this,t.h,t.defaultValue,!0)}clone(){const t=this.u;return new this.constructor(Re(t,0|t[Q],!1))}N(){return!!(2&(0|this.u[Q]))}};function qn(t){var e=t.u;{e=(t=Gn(e))!==e;let u=t.length;if(u){var n=t[u-1],r=dt(n);r?u--:n=void 0;var i=t;if(r){t:{var s,o=n,a=!1;if(o)for(let t in o)isNaN(+t)?(s??={})[t]=o[t]:(r=o[t],Array.isArray(r)&&(gt(r)||ft(r)&&0===r.size)&&(r=null),null==r&&(a=!0),null!=r&&((s??={})[t]=r));if(a||(s=o),s)for(let t in s){a=s;break t}a=null}o=null==a?null!=n:a!==n}for(;u>0&&(null==(s=i[u-1])||gt(s)||ft(s)&&0===s.size);u--)var c=!0;(i!==t||o||c)&&(e?(c||o||a)&&(i.length=u):i=Array.prototype.slice.call(i,0,u),a&&i.push(a)),c=i}else c=t}return c}function Hn(t){return t?/^\d+$/.test(t)?(Wt(t),new $n(Mt,Lt)):null:Xn||=new $n(0,0)}zn.prototype.W=ht,zn.prototype.toString=function(){try{return Gn=Vn,qn(this).toString()}finally{Gn=void 0}};var $n=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Xn;function Kn(t){return t?/^-?\d+$/.test(t)?(Wt(t),new Yn(Mt,Lt)):null:Jn||=new Yn(0,0)}var Yn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Jn;function Zn(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Qn(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function tr(t,e){if(e>=0)Qn(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function er(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function nr(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function rr(t,e,n){Qn(t.g,8*e+n)}function ir(t,e){return rr(t,e,2),e=t.g.end(),nr(t,e),e.push(t.h),e}function sr(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function or(t,e,n){rr(t,e,2),Qn(t.g,n.length),nr(t,t.g.end()),nr(t,n)}function ar(t,e,n,r){null!=n&&(e=ir(t,e),r(n,t),sr(t,e))}function cr(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var ur=cr(),hr=cr(),lr=cr(),fr=cr(),dr=cr(),pr=cr(),gr=cr(),mr=cr(),vr=cr(),yr=class{constructor(t,e,n){this.g=t,this.h=e,t=ur,this.l=!!t&&n===t||!1}};function _r(t,e){return new yr(t,e,ur)}function br(t,e,n,r,i){ar(t,n,Fr(e,r),i)}const wr=_r((function(t,e,n,r,i){return 2===t.h&&(Nn(t,Qe(e,r,n),i),!0)}),br),Er=_r((function(t,e,n,r,i){return 2===t.h&&(Nn(t,Qe(e,r,n,!0),i),!0)}),br);var Sr=Symbol(),kr=Symbol(),Tr=Symbol(),Cr=Symbol();let Ar,xr;function Pr(t,e,n,r){var i=r[t];if(i)return i;(i={}).Pa=r,i.V=function(t){switch(typeof t){case"boolean":return Ee||=[0,void 0,!0];case"number":return t>0?void 0:0===t?Se||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(r[0]);var s=r[1];let o=1;s&&s.constructor===Object&&(i.ga=s,"function"==typeof(s=r[++o])&&(i.la=!0,Ar??=s,xr??=r[o+1],s=r[o+=2]));const a={};for(;s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var c=0;c<s.length;c++)a[s[c]]=s;s=r[++o]}for(c=1;void 0!==s;){let t;"number"==typeof s&&(c+=s,s=r[++o]);var u=void 0;if(s instanceof yr?t=s:(t=wr,o--),t?.l){s=r[++o],u=r;var h=o;"function"==typeof s&&(s=s(),u[h]=s),u=s}for(h=c+1,"number"==typeof(s=r[++o])&&s<0&&(h-=s,s=r[++o]);c<h;c++){const r=a[c];u?n(i,c,t,u,r):e(i,c,t,r)}}return r[t]=i}function Or(t){return Array.isArray(t)?t[0]instanceof yr?t:[Er,t]:[t,void 0]}function Fr(t,e){return t instanceof zn?t.u:Array.isArray(t)?Oe(t,e,!1):void 0}function Ir(t,e,n,r){const i=n.g;t[e]=r?(t,e,n)=>i(t,e,n,r):i}function Rr(t,e,n,r,i){const s=n.g;let o,a;t[e]=(t,e,n)=>s(t,e,n,a||=Pr(kr,Ir,Rr,r).V,o||=Mr(r),i)}function Mr(t){let e=t[Tr];if(null!=e)return e;const n=Pr(kr,Ir,Rr,t);return e=n.la?(t,e)=>Ar(t,e,n):(t,e)=>{const r=0|t[Q];for(;Mn(e)&&4!=e.h;){var i=e.m,s=n[i];if(null==s){var o=n.ga;o&&(o=o[i])&&null!=(o=Lr(o))&&(s=n[i]=o)}null!=s&&s(e,t,i)||(i=(s=e).l,Ln(s),s.fa?s=void 0:(o=s.g.g-i,s.g.g=i,s=In(s.g,o)),i=t,s&&((o=i[Z])?o.push(s):i[Z]=[s]))}return 16384&r&&it(t),!0},t[Tr]=e}function Lr(t){const e=(t=Or(t))[0].g;if(t=t[1]){const n=Mr(t),r=Pr(kr,Ir,Rr,t).V;return(t,i,s)=>e(t,i,s,r,n)}return e}function Nr(t,e,n){t[e]=n.h}function jr(t,e,n,r){let i,s;const o=n.h;t[e]=(t,e,n)=>o(t,e,n,s||=Pr(Sr,Nr,jr,r).V,i||=Dr(r))}function Dr(t){let e=t[Cr];if(!e){const n=Pr(Sr,Nr,jr,t);e=(t,e)=>Br(t,e,n),t[Cr]=e}return e}function Br(t,e,n){for(var r=0|t[Q],i=512&r?0:-1,s=t.length,o=512&r?1:0,a=s+(256&r?-1:0);o<a;o++){const r=t[o];if(null==r)continue;const s=o-i,a=Ur(n,s);a&&a(e,r,s)}if(256&r){r=t[s-1];for(const t in r)i=+t,Number.isNaN(i)||null!=(s=r[i])&&(a=Ur(n,i))&&a(e,s,i)}if(t=_t(t))for(nr(e,e.g.end()),n=0;n<t.length;n++)nr(e,D(t[n])||new Uint8Array(0))}function Ur(t,e){var n=t[e];if(n)return n;if((n=t.ga)&&(n=n[e])){var r=(n=Or(n))[0].h;if(n=n[1]){const e=Dr(n),i=Pr(Sr,Nr,jr,n).V;n=t.la?xr(i,e):(t,n,s)=>r(t,n,s,i,e)}else n=r;return t[e]=n}}function Vr(t,e){if(Array.isArray(e)){var n=0|e[Q];if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),rt(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}function Gr(t,e,n){return new yr(t,e,n)}function Wr(t,e,n){return new yr(t,e,n)}function zr(t,e,n){De(t,0|t[Q],e,n)}var qr=_r((function(t,e,n,r,i){return 2===t.h&&(t=Nn(t,Oe([void 0,void 0],r,!0),i),vt(r=0|e[Q]),(i=Ne(e,r,n))instanceof ve?0!=(2&i.L)?((i=i.X()).push(t),De(e,r,n,i)):i.Na(t):Array.isArray(i)?(2&(0|i[Q])&&De(e,r,n,i=He(i)),i.push(t)):De(e,r,n,[t]),!0)}),(function(t,e,n,r,i){if(e instanceof ve)e.forEach(((e,s)=>{ar(t,n,Oe([s,e],r,!1),i)}));else if(Array.isArray(e))for(let s=0;s<e.length;s++){const o=e[s];Array.isArray(o)&&ar(t,n,Oe(o,r,!1),i)}}));function Hr(t,e,n){if(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(qt(64,t));if(Qt(t)){if("string"===e)return ie(t);if("number"===e)return re(t)}}(e),null!=e&&("string"==typeof e&&Kn(e),null!=e))switch(rr(t,n,0),typeof e){case"number":t=t.g,jt(e),Zn(t,Mt,Lt);break;case"bigint":n=BigInt.asUintN(64,e),n=new Yn(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Zn(t.g,n.h,n.g);break;default:n=Kn(e),Zn(t.g,n.h,n.g)}}function $r(t,e,n){null!=(e=te(e))&&null!=e&&(rr(t,n,0),tr(t.g,e))}function Xr(t,e,n){null!=(e=Jt(e))&&(rr(t,n,0),t.g.g.push(e?1:0))}function Kr(t,e,n){null!=(e=ce(e))&&or(t,n,h(e))}function Yr(t,e,n,r,i){ar(t,n,Fr(e,r),i)}function Jr(t,e,n){null!=(e=null==e||"string"==typeof e||L(e)||e instanceof B?e:void 0)&&or(t,n,wn(e).buffer)}function Zr(t,e,n){return(5===t.h||2===t.h)&&(e=Xe(e,0|e[Q],n,!1,!1),2==t.h?Bn(t,An,e):e.push(An(t.g)),!0)}var Qr=Gr((function(t,e,n){if(1!==t.h)return!1;var r=t.g;t=Cn(r);const i=Cn(r);r=2*(i>>31)+1;const s=i>>>20&2047;return t=4294967296*(1048575&i)+t,zr(e,n,2047==s?t?NaN:r*(1/0):0==s?5e-324*r*t:r*Math.pow(2,s-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=Yt(e))&&(rr(t,n,1),t=t.g,(n=Rt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),Mt=n.getUint32(0,!0),Lt=n.getUint32(4,!0),er(t,Mt),er(t,Lt))}),cr()),ti=Gr((function(t,e,n){return 5===t.h&&(zr(e,n,An(t.g)),!0)}),(function(t,e,n){null!=(e=Yt(e))&&(rr(t,n,5),t=t.g,Dt(e),er(t,Mt))}),gr),ei=Wr(Zr,(function(t,e,n){if(null!=(e=Vr(Yt,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(rr(r,i,5),r=r.g,Dt(s),er(r,Mt))}}),gr),ni=Wr(Zr,(function(t,e,n){if(null!=(e=Vr(Yt,e))&&e.length){rr(t,n,2),Qn(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Dt(e[r]),er(n,Mt)}}),gr),ri=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,En(t.g,Ut)),!0)}),Hr,pr),ii=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,0===(t=En(t.g,Ut))?void 0:t),!0)}),Hr,pr),si=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,En(t.g,Bt)),!0)}),(function(t,e,n){if(null!=(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Ht(64,t));if(Qt(t)){if("string"===e)return e=Kt(Number(t)),$t(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),ne(t)||(Wt(t),t=Vt(Mt,Lt))),t;if("number"===e)return(t=Kt(t))>=0&&$t(t)?t:function(t){if(t<0){jt(t);var e=Vt(Mt,Lt);return t=Number(e),$t(t)?t:e}return ne(e=String(t))?e:(jt(t),Bt(Mt,Lt))}(t)}}(e))&&("string"==typeof e&&Hn(e),null!=e))switch(rr(t,n,0),typeof e){case"number":t=t.g,jt(e),Zn(t,Mt,Lt);break;case"bigint":n=BigInt.asUintN(64,e),n=new $n(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Zn(t.g,n.h,n.g);break;default:n=Hn(e),Zn(t.g,n.h,n.g)}}),cr()),oi=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,kn(t.g)),!0)}),$r,fr),ai=Wr((function(t,e,n){return(0===t.h||2===t.h)&&(e=Xe(e,0|e[Q],n,!1,!1),2==t.h?Bn(t,kn,e):e.push(kn(t.g)),!0)}),(function(t,e,n){if(null!=(e=Vr(te,e))&&e.length){n=ir(t,n);for(let n=0;n<e.length;n++)tr(t.g,e[n]);sr(t,n)}}),fr),ci=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,0===(t=kn(t.g))?void 0:t),!0)}),$r,fr),ui=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,Sn(t.g)),!0)}),Xr,hr),hi=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,!1===(t=Sn(t.g))?void 0:t),!0)}),Xr,hr),li=Wr((function(t,e,n){return 2===t.h&&(t=jn(t),Xe(e,0|e[Q],n,!1).push(t),!0)}),(function(t,e,n){if(null!=(e=Vr(ce,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&or(r,i,h(s))}}),lr),fi=Gr((function(t,e,n){return 2===t.h&&(zr(e,n,""===(t=jn(t))?void 0:t),!0)}),Kr,lr),di=Gr((function(t,e,n){return 2===t.h&&(zr(e,n,jn(t)),!0)}),Kr,lr),pi=function(t,e,n=ur){return new yr(t,e,n)}((function(t,e,n,r,i){return 2===t.h&&(r=Oe(void 0,r,!0),Xe(e,0|e[Q],n,!0).push(r),Nn(t,r,i),!0)}),(function(t,e,n,r,i){if(Array.isArray(e))for(let s=0;s<e.length;s++)Yr(t,e[s],n,r,i)})),gi=_r((function(t,e,n,r,i,s){return 2===t.h&&(Je(e,0|e[Q],s,n),Nn(t,e=Qe(e,r,n),i),!0)}),Yr),mi=Gr((function(t,e,n){return 2===t.h&&(zr(e,n,Dn(t)),!0)}),Jr,mr),vi=Wr((function(t,e,n){return(0===t.h||2===t.h)&&(e=Xe(e,0|e[Q],n,!1,!1),2==t.h?Bn(t,Tn,e):e.push(Tn(t.g)),!0)}),(function(t,e,n){if(null!=(e=Vr(ee,e)))for(let o=0;o<e.length;o++){var r=t,i=n,s=e[o];null!=s&&(rr(r,i,0),Qn(r.g,s))}}),dr),yi=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,0===(t=Tn(t.g))?void 0:t),!0)}),(function(t,e,n){null!=(e=ee(e))&&null!=e&&(rr(t,n,0),Qn(t.g,e))}),dr),_i=Gr((function(t,e,n){return 0===t.h&&(zr(e,n,kn(t.g)),!0)}),(function(t,e,n){null!=(e=te(e))&&(e=parseInt(e,10),rr(t,n,0),tr(t.g,e))}),vr);class bi{constructor(t,e){this.h=t,this.g=e,this.l=en,this.m=sn,this.defaultValue=void 0}}function wi(t,e){return new bi(t,e)}function Ei(t,e){return(n,r)=>{if(Un.length){const t=Un.pop();t.o(r),Pn(t.g,n,r),n=t}else n=new class{constructor(t,e){if(Rn.length){const n=Rn.pop();Pn(n,t,e),t=n}else t=new class{constructor(t,e){this.h=null,this.m=!1,this.g=this.l=this.j=0,Pn(this,t,e)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.ba=!1}}(t,e);this.g=t,this.l=this.g.g,this.h=this.m=-1,this.o(e)}o({fa:t=!1}={}){this.fa=t}}(n,r);try{const r=new t,s=r.u;Mr(e)(s,n);var i=r}finally{n.g.clear(),n.m=-1,n.h=-1,Un.length<100&&Un.push(n)}return i}}function Si(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};Br(this.u,e,Pr(Sr,Nr,jr,t)),nr(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,i=r.length;let s=0;for(let t=0;t<i;t++){const e=r[t];n.set(e,s),s+=e.length}return e.l=[n],n}}var ki=class extends zn{constructor(t){super(t)}},Ti=[0,fi,Gr((function(t,e,n){return 2===t.h&&(zr(e,n,(t=Dn(t))===j()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof zn){const r=e.Ra;return void(r&&(e=r(e),null!=e&&or(t,n,wn(e).buffer)))}if(Array.isArray(e))return}Jr(t,e,n)}),mr)];let Ci,Ai=globalThis.trustedTypes;function xi(t){void 0===Ci&&(Ci=function(){let t=null;if(!Ai)return t;try{const e=t=>t;t=Ai.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}());var e=Ci;return new class{constructor(t){this.g=t}toString(){return this.g+""}}(e?e.createScriptURL(t):t)}function Pi(t,...e){if(0===e.length)return xi(t[0]);let n=t[0];for(let r=0;r<e.length;r++)n+=encodeURIComponent(e[r])+t[r+1];return xi(n)}var Oi=[0,oi,_i,ui,-1,ai,_i,-1],Fi=class extends zn{constructor(t){super(t)}},Ii=[0,ui,di,ui,_i,-1,Wr((function(t,e,n){return(0===t.h||2===t.h)&&(e=Xe(e,0|e[Q],n,!1,!1),2==t.h?Bn(t,xn,e):e.push(kn(t.g)),!0)}),(function(t,e,n){if(null!=(e=Vr(te,e))&&e.length){n=ir(t,n);for(let n=0;n<e.length;n++)tr(t.g,e[n]);sr(t,n)}}),vr),di,-1,[0,ui,-1],_i,ui,-1],Ri=[0,di,-2],Mi=class extends zn{constructor(t){super(t)}},Li=[0],Ni=[0,oi,ui,1,ui,-3],ji=class extends zn{constructor(t){super(t,2)}},Di={};Di[336783863]=[0,di,ui,-1,oi,[0,[1,2,3,4,5,6,7,8],gi,Li,gi,Ii,gi,Ri,gi,Ni,gi,Oi,gi,[0,di,-2],gi,[0,di,_i],gi,[0,_i,di]],[0,di],ui,[0,[1,3],[2,4],gi,[0,ai],-1,gi,[0,li],-1,pi,[0,di,-1]],di];var Bi=[0,ii,-1,hi,-3,ii,ai,fi,ci,ii,-1,hi,ci,hi,-2,fi];function Ui(t,e){$e(t,2,ae(e),"")}function Vi(t,e){vn(t,3,e)}function Gi(t,e){vn(t,4,e)}var Wi=class extends zn{constructor(t){super(t,500)}o(t){return sn(this,0,7,t)}},zi=[-1,{}],qi=[0,di,1,zi],Hi=[0,di,li,zi];function $i(t,e){un(t,1,Wi,e)}function Xi(t,e){vn(t,10,e)}function Ki(t,e){vn(t,15,e)}var Yi=class extends zn{constructor(t){super(t,500)}o(t){return sn(this,0,1001,t)}},Ji=[-500,pi,[-500,fi,-1,li,-3,[-2,Di,ui],pi,Ti,ci,-1,qi,Hi,pi,[0,fi,hi],fi,Bi,ci,li,987,li],4,pi,[-500,di,-1,[-1,{}],998,di],pi,[-500,di,li,-1,[-2,{},ui],997,li,-1],ci,pi,[-500,di,li,zi,998,li],li,ci,qi,Hi,pi,[0,fi,-1,zi],li,-2,Bi,fi,-1,hi,[0,hi,yi],978,zi,pi,Ti];Yi.prototype.g=Si(Ji);var Zi=Ei(Yi,Ji),Qi=class extends zn{constructor(t){super(t)}},ts=class extends zn{constructor(t){super(t)}g(){return rn(this,Qi,1)}},es=[0,pi,[0,oi,ti,di,-1]],ns=Ei(ts,es),rs=class extends zn{constructor(t){super(t)}},is=class extends zn{constructor(t){super(t)}},ss=class extends zn{constructor(t){super(t)}h(){return en(this,rs,2)}g(){return rn(this,is,5)}},os=Ei(class extends zn{constructor(t){super(t)}},[0,li,ai,ni,[0,_i,[0,oi,-3],[0,ti,-3],[0,oi,-1,[0,pi,[0,oi,-2]]],pi,[0,ti,-1,di,ti]],di,-1,ri,pi,[0,oi,ti],li,ri]),as=class extends zn{constructor(t){super(t)}},cs=Ei(class extends zn{constructor(t){super(t)}},[0,pi,[0,ti,-4]]),us=class extends zn{constructor(t){super(t)}},hs=Ei(class extends zn{constructor(t){super(t)}},[0,pi,[0,ti,-4]]),ls=class extends zn{constructor(t){super(t)}},fs=[0,oi,-1,ni,_i],ds=class extends zn{constructor(t){super(t)}};ds.prototype.g=Si([0,ti,-4,ri]);var ps=class extends zn{constructor(t){super(t)}},gs=Ei(class extends zn{constructor(t){super(t)}},[0,pi,[0,1,oi,di,es],ri]),ms=class extends zn{constructor(t){super(t)}},vs=class extends zn{constructor(t){super(t)}oa(){const t=Ue(this);return null==t?j():t}},ys=class extends zn{constructor(t){super(t)}},_s=[1,2],bs=Ei(class extends zn{constructor(t){super(t)}},[0,pi,[0,_s,gi,[0,ni],gi,[0,mi],oi,di],ri]),ws=class extends zn{constructor(t){super(t)}},Es=[0,di,oi,ti,li,-1],Ss=class extends zn{constructor(t){super(t)}},ks=[0,ui,-1],Ts=class extends zn{constructor(t){super(t)}},Cs=[1,2,3,4,5],As=class extends zn{constructor(t){super(t)}g(){return null!=Ue(this)}h(){return null!=ln(this,2)}},xs=class extends zn{constructor(t){super(t)}g(){return Jt(Le(this,2))??!1}},Ps=[0,mi,di,[0,oi,ri,-1],[0,si,ri]],Os=[0,Ps,ui,[0,Cs,gi,Ni,gi,Ii,gi,Oi,gi,Li,gi,Ri],_i],Fs=class extends zn{constructor(t){super(t)}},Is=[0,Os,ti,-1,oi],Rs=wi(502141897,Fs);Di[502141897]=Is;var Ms=Ei(class extends zn{constructor(t){super(t)}},[0,[0,_i,-1,ei,vi],fs]),Ls=class extends zn{constructor(t){super(t)}},Ns=class extends zn{constructor(t){super(t)}},js=[0,Os,ti,[0,Os],ui],Ds=[0,Os,Is,js,ti,[0,[0,Ps]]],Bs=wi(508968150,Ns);Di[508968150]=Ds,Di[508968149]=js;var Us=class extends zn{constructor(t){super(t)}},Vs=wi(513916220,Us);Di[513916220]=[0,Os,Ds,oi];var Gs=class extends zn{constructor(t){super(t)}h(){return en(this,ws,2)}g(){je(this,2)}},Ws=[0,Os,Es];Di[478825465]=Ws;var zs=class extends zn{constructor(t){super(t)}},qs=class extends zn{constructor(t){super(t)}},Hs=class extends zn{constructor(t){super(t)}},$s=class extends zn{constructor(t){super(t)}},Xs=class extends zn{constructor(t){super(t)}},Ks=[0,Os,[0,Os],Ws,-1],Ys=[0,Os,ti,oi],Js=[0,Os,ti],Zs=[0,Os,Ys,Js,ti],Qs=wi(479097054,Xs);Di[479097054]=[0,Os,Zs,Ks],Di[463370452]=Ks,Di[464864288]=Ys;var to=wi(462713202,$s);Di[462713202]=Zs,Di[474472470]=Js;var eo=class extends zn{constructor(t){super(t)}},no=class extends zn{constructor(t){super(t)}},ro=class extends zn{constructor(t){super(t)}},io=class extends zn{constructor(t){super(t)}},so=[0,Os,ti,-1,oi],oo=[0,Os,ti,ui];io.prototype.g=Si([0,Os,Js,[0,Os],Is,js,so,oo]);var ao=class extends zn{constructor(t){super(t)}},co=wi(456383383,ao);Di[456383383]=[0,Os,Es];var uo=class extends zn{constructor(t){super(t)}},ho=wi(476348187,uo);Di[476348187]=[0,Os,ks];var lo=class extends zn{constructor(t){super(t)}},fo=class extends zn{constructor(t){super(t)}},po=[0,_i,-1],go=wi(458105876,class extends zn{constructor(t){super(t)}g(){var t=this.u;const e=0|t[Q],n=2&e;return t=function(t,e,n){var r=fo;const i=2&e;let s=!1;if(null==n){if(i)return ke();n=[]}else if(n.constructor===ve){if(0==(2&n.L)||i)return n;n=n.X()}else Array.isArray(n)?s=!!(2&(0|n[Q])):n=[];if(i){if(!n.length)return ke();s||(s=!0,it(n))}else s&&(s=!1,n=He(n));return s||(64&(0|n[Q])?n[Q]&=-33:32&e&&nt(n,32)),De(t,e,2,r=new ve(n,r,he,void 0)),r}(t,e,Ne(t,e,2)),!n&&fo&&(t.ra=!0),t}});Di[458105876]=[0,po,qr,[!0,ri,[0,di,-1,li]]];var mo=class extends zn{constructor(t){super(t)}},vo=wi(458105758,mo);Di[458105758]=[0,Os,di,po];var yo=class extends zn{constructor(t){super(t)}},_o=wi(443442058,yo);Di[443442058]=[0,Os,di,oi,ti,li,-1,ui,ti],Di[514774813]=so;var bo=class extends zn{constructor(t){super(t)}},wo=wi(516587230,bo);function Eo(t,e){return e=e?e.clone():new ws,void 0!==t.displayNamesLocale?je(e,1,ae(t.displayNamesLocale)):void 0===t.displayNamesLocale&&je(e,1),void 0!==t.maxResults?pn(e,2,t.maxResults):"maxResults"in t&&je(e,2),void 0!==t.scoreThreshold?gn(e,3,t.scoreThreshold):"scoreThreshold"in t&&je(e,3),void 0!==t.categoryAllowlist?mn(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&je(e,4),void 0!==t.categoryDenylist?mn(e,5,t.categoryDenylist):"categoryDenylist"in t&&je(e,5),e}function So(t,e=-1,n=""){return{categories:t.map((t=>({index:hn(t,1)??0??-1,score:fn(t,2)??0,categoryName:ln(t,3)??""??"",displayName:ln(t,4)??""??""}))),headIndex:e,headName:n}}function ko(t){var e=Ge(t,3,Yt,Ve()),n=Ge(t,2,te,Ve()),r=Ge(t,1,ce,Ve()),i=Ge(t,9,ce,Ve());const s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:i[t]??""});if((e=en(t,ss,4)?.h())&&(s.boundingBox={originX:hn(e,1)??0,originY:hn(e,2)??0,width:hn(e,3)??0,height:hn(e,4)??0,angle:0}),en(t,ss,4)?.g().length)for(const e of en(t,ss,4).g())s.keypoints.push({x:Be(e,1)??0,y:Be(e,2)??0,score:Be(e,4)??0,label:ln(e,3)??""});return s}function To(t){const e=[];for(const n of rn(t,us,1))e.push({x:fn(n,1)??0,y:fn(n,2)??0,z:fn(n,3)??0,visibility:fn(n,4)??0});return e}function Co(t){const e=[];for(const n of rn(t,as,1))e.push({x:fn(n,1)??0,y:fn(n,2)??0,z:fn(n,3)??0,visibility:fn(n,4)??0});return e}function Ao(t){return Array.from(t,(t=>t>127?t-256:t))}function xo(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s],r+=t[s]*t[s],i+=e[s]*e[s];if(r<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let Po;Di[516587230]=[0,Os,so,oo,ti],Di[518928384]=oo;const Oo=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function Fo(){if(void 0===Po)try{await WebAssembly.instantiate(Oo),Po=!0}catch{Po=!1}return Po}async function Io(t,e=Pi``){const n=await Fo()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Ro=class{};function Mo(){var t=navigator;return!("undefined"==typeof OffscreenCanvas||function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)&&!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Lo(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}function No(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function jo(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function Do(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[r,i]=No(e);return!t.l||r===t.i.canvas.width&&i===t.i.canvas.height||(t.i.canvas.width=r,t.i.canvas.height=i),[r,i]}function Bo(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function Uo(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function Vo(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}function Go(t,e){const n=en(t.baseOptions,As,1)||new As;"string"==typeof e?(je(n,2,ae(e)),je(n,1)):e instanceof Uint8Array&&(je(n,1,pt(e,!1)),je(n,2)),sn(t.baseOptions,0,1,n)}function Wo(t){try{const e=t.G.length;if(1===e)throw Error(t.G[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.G.map((t=>t.message)).join(", "))}finally{t.G=[]}}function zo(t,e){t.B=Math.max(t.B,e)}function qo(t,e){t.A=new Wi,Ui(t.A,"PassThroughCalculator"),Vi(t.A,"free_memory"),Gi(t.A,"free_memory_unused_out"),Xi(e,"free_memory"),$i(e,t.A)}function Ho(t,e){Vi(t.A,e),Gi(t.A,e+"_unused_out")}function $o(t){t.g.addBoolToStream(!0,"free_memory",t.B)}Ro.forVisionTasks=function(t){return Io("vision",t)},Ro.forTextTasks=function(t){return Io("text",t)},Ro.forGenAiExperimentalTasks=function(t){return Io("genai_experimental",t)},Ro.forGenAiTasks=function(t){return Io("genai",t)},Ro.forAudioTasks=function(t){return Io("audio",t)},Ro.isSimdSupported=function(){return Fo()};var Xo=class{constructor(t){this.g=t,this.G=[],this.B=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(en(this.baseOptions,As,1)?.g()||en(this.baseOptions,As,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=en(t.baseOptions,Ts,3);if(!n){var r=n=new Ts,i=new Mi;on(r,4,Cs,i)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new Fi,on(e,2,Cs,r)):(e=n,r=new Mi,on(e,4,Cs,r))),sn(t.baseOptions,0,3,n)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)})).then((t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),Go(this,"/model.dat"),this.m(),this.I()}));if(e.modelAssetBuffer instanceof Uint8Array)Go(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){const e=[];for(var n=0;;){const{done:r,value:i}=await t.read();if(r)break;e.push(i),n+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(n),n=0;for(const r of e)t.set(r,n),n+=r.length;return t}(e.modelAssetBuffer).then((t=>{Go(this,t),this.m(),this.I()}))}return this.m(),this.I(),Promise.resolve()}I(){}da(){let t;if(this.g.da((e=>{t=Zi(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.G.push(Error(e))})),this.g.La(),this.g.setGraph(t,e),this.A=void 0,Wo(this)}finishProcessing(){this.g.finishProcessing(),Wo(this)}close(){this.A=void 0,this.g.closeGraph()}};function Ko(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}Xo.prototype.close=Xo.prototype.close,function(t,e){t=t.split(".");var r,i=n;t[0]in i||void 0===i.execScript||i.execScript("var "+t[0]);for(;t.length&&(r=t.shift());)t.length||void 0===e?i=i[r]&&i[r]!==Object.prototype[r]?i[r]:i[r]={}:i[r]=e}("TaskRunner",Xo);class Yo{constructor(t,e,n,r){this.g=t,this.h=e,this.m=n,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Jo(t,e,n){const r=t.g;if(n=Ko(r.createShader(n),"Failed to create WebGL shader"),r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(t.h,n),n}function Zo(t,e){const n=t.g,r=Ko(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const i=Ko(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.O),n.vertexAttribPointer(t.O,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const s=Ko(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.I),n.vertexAttribPointer(t.I,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new Yo(n,r,i,s)}function Qo(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function ta(t,e,n,r){return Qo(t,e),t.h||(t.m(),t.C()),n?(t.s||(t.s=Zo(t,!0)),n=t.s):(t.v||(t.v=Zo(t,!1)),n=t.v),e.useProgram(t.h),n.bind(),t.l(),t=r(),n.g.bindVertexArray(null),t}function ea(t,e,n){return Qo(t,e),t=Ko(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function na(t,e,n){Qo(t,e),t.A||(t.A=Ko(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.A),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function ra(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var ia=class{G(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}m(){const t=this.g;if(this.h=Ko(t.createProgram(),"Failed to create WebGL program"),this.aa=Jo(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.Z=Jo(this,this.G(),t.FRAGMENT_SHADER),t.linkProgram(this.h),!t.getProgramParameter(this.h,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.h)}`);this.O=t.getAttribLocation(this.h,"aVertex"),this.I=t.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.aa),t.deleteShader(this.Z)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}},sa=class extends ia{G(){return"\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n "}C(){const t=this.g;t.activeTexture(t.TEXTURE1),this.B=ea(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.j=ea(this,t,t.NEAREST)}m(){super.m();const t=this.g;this.K=Ko(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.T=Ko(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.J=Ko(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.J,0),t.uniform1i(this.K,1),t.uniform1i(this.T,2)}close(){this.B&&this.g.deleteTexture(this.B),this.j&&this.g.deleteTexture(this.j),super.close()}},oa=class extends ia{G(){return"\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n "}C(){const t=this.g;t.activeTexture(t.TEXTURE1),this.j=ea(this,t),t.activeTexture(t.TEXTURE2),this.B=ea(this,t)}m(){super.m();const t=this.g;this.J=Ko(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.K=Ko(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.H=Ko(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.H,0),t.uniform1i(this.J,1),t.uniform1i(this.K,2)}close(){this.j&&this.g.deleteTexture(this.j),this.B&&this.g.deleteTexture(this.B),super.close()}};function aa(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function ca(t){var e=aa(t,1);if(!e){if(e=aa(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const r=ha(t);var n=fa(t);if(na(n,r,ua(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(t.width*t.height*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.FLOAT,n);for(let t=0,r=0;t<e.length;++t,r+=4)e[t]=n[r]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function ua(t){let e=aa(t,2);if(!e){const n=ha(t);e=da(t);const r=ca(t),i=la(t);n.texImage2D(n.TEXTURE_2D,0,i,t.width,t.height,0,n.RED,n.FLOAT,r),pa(t)}return e}function ha(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ko(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function la(t){if(t=ha(t),!ga)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))ga=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");ga=t.R16F}return ga}function fa(t){return t.l||(t.l=new ia),t.l}function da(t){const e=ha(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=aa(t,2);return n||(n=ea(fa(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(n),t.j=!0),e.bindTexture(e.TEXTURE_2D,n),n}function pa(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var ga,ma=class{constructor(t,e,n,r,i,s,o){this.g=t,this.m=e,this.j=n,this.canvas=r,this.l=i,this.width=s,this.height=o,this.j&&0==--va&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Fa(){return!!aa(this,0)}ja(){return!!aa(this,1)}P(){return!!aa(this,2)}ia(){return(t=aa(this,0))||(t=ca(this),t=new Uint8Array(t.map((t=>255*t))),this.g.push(t)),t;var t}ha(){return ca(this)}M(){return ua(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=ha(this),e=fa(this);t.activeTexture(t.TEXTURE1),n=ea(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,n);const r=la(this);t.texImage2D(t.TEXTURE_2D,0,r,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),na(e,t,n),ta(e,t,!1,(()=>{da(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),pa(this)})),ra(e),pa(this)}}t.push(n)}return new ma(t,this.m,this.P(),this.canvas,this.l,this.width,this.height)}close(){this.j&&ha(this).deleteTexture(aa(this,2)),va=-1}};ma.prototype.close=ma.prototype.close,ma.prototype.clone=ma.prototype.clone,ma.prototype.getAsWebGLTexture=ma.prototype.M,ma.prototype.getAsFloat32Array=ma.prototype.ha,ma.prototype.getAsUint8Array=ma.prototype.ia,ma.prototype.hasWebGLTexture=ma.prototype.P,ma.prototype.hasFloat32Array=ma.prototype.ja,ma.prototype.hasUint8Array=ma.prototype.Fa;var va=250;const ya={color:"white",lineWidth:4,radius:6};function _a(t){return{...ya,fillColor:(t=t||{}).color,...t}}function ba(t,e){return t instanceof Function?t(e):t}function wa(t,e,n){return Math.max(Math.min(e,n),Math.min(Math.max(e,n),t))}function Ea(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Sa(t){if(!t.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.j}function ka(t,e,n){if(e.P())n(e.M());else{const r=e.ja()?e.ha():e.ia();t.m=t.m??new ia;const i=Sa(t);n((t=new ma([r],e.m,!1,i.canvas,t.m,e.width,e.height)).M()),t.close()}}function Ta(t,e,n,r){const i=function(t){return t.g||(t.g=new sa),t.g}(t),s=Sa(t),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;ta(i,s,!0,(()=>{!function(t,e,n,r){const i=t.g;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.B),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),t.H&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(const[r,i]of t){t=r;const s=i;var n=e.next();if(n.done)return!1;const[o,a]=n.value;if(n=a,t!==o||s[0]!==n[0]||s[1]!==n[1]||s[2]!==n[2]||s[3]!==n[3])return!1}return!!e.next().done}(t.H,r))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j);else{t.H=r;const e=Array(1024).fill(0);r.forEach(((t,n)=>{if(4!==t.length)throw Error(`Color at index ${n} is not a four-channel value.`);e[4*n]=t[0],e[4*n+1]=t[1],e[4*n+2]=t[2],e[4*n+3]=t[3]})),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.j),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,r),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);const t=i.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)}))}function Ca(t,e,n,r){const i=Sa(t),s=function(t){return t.h||(t.h=new oa),t.h}(t),o=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n,a=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;ta(s,i,!0,(()=>{var t=s.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s.j),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s.B),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),i.bindTexture(i.TEXTURE_2D,null),(t=s.g).activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)}))}var Aa=class{constructor(t,e){t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.j=e):this.j=t}ya(t,e){if(t){var n=Ea(this);e=_a(e),n.save();var r=n.canvas,i=0;for(const s of t)n.fillStyle=ba(e.fillColor,{index:i,from:s}),n.strokeStyle=ba(e.color,{index:i,from:s}),n.lineWidth=ba(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*r.width,s.y*r.height,ba(e.radius,{index:i,from:s}),0,2*Math.PI),n.fill(t),n.stroke(t),++i;n.restore()}}xa(t,e,n){if(t&&e){var r=Ea(this);n=_a(n),r.save();var i=r.canvas,s=0;for(const o of e){r.beginPath(),e=t[o.start];const a=t[o.end];e&&a&&(r.strokeStyle=ba(n.color,{index:s,from:e,to:a}),r.lineWidth=ba(n.lineWidth,{index:s,from:e,to:a}),r.moveTo(e.x*i.width,e.y*i.height),r.lineTo(a.x*i.width,a.y*i.height)),++s,r.stroke()}r.restore()}}ua(t,e){const n=Ea(this);e=_a(e),n.save(),n.beginPath(),n.lineWidth=ba(e.lineWidth,{}),n.strokeStyle=ba(e.color,{}),n.fillStyle=ba(e.fillColor,{}),n.moveTo(t.originX,t.originY),n.lineTo(t.originX+t.width,t.originY),n.lineTo(t.originX+t.width,t.originY+t.height),n.lineTo(t.originX,t.originY+t.height),n.lineTo(t.originX,t.originY),n.stroke(),n.fill(),n.restore()}va(t,e,n=[0,0,0,255]){this.l?function(t,e,n,r){const i=Sa(t);ka(t,e,(e=>{Ta(t,e,n,r),(e=Ea(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,n,e):Ta(this,t.M(),n,e)}wa(t,e,n){this.l?function(t,e,n,r){const i=Sa(t);ka(t,e,(e=>{Ca(t,e,n,r),(e=Ea(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,e,n):Ca(this,t.M(),e,n)}close(){this.g?.close(),this.g=void 0,this.h?.close(),this.h=void 0,this.m?.close(),this.m=void 0}};function xa(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Pa(t){var e=xa(t,0);if(!e){e=Fa(t);const n=Ia(t),r=new Uint8Array(t.width*t.height*4);na(n,e,Oa(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),ra(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function Oa(t){let e=xa(t,2);if(!e){const n=Fa(t);e=Ra(t);const r=xa(t,1)||Pa(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Ma(t)}return e}function Fa(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ko(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Ia(t){return t.l||(t.l=new ia),t.l}function Ra(t){const e=Fa(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=xa(t,2);return n||(n=ea(Ia(t),e),t.g.push(n),t.m=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Ma(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function La(t){const e=Fa(t);return ta(Ia(t),e,!0,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const r=n.width,i=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=r,n.height=i,t}(t,(()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))))}Aa.prototype.close=Aa.prototype.close,Aa.prototype.drawConfidenceMask=Aa.prototype.wa,Aa.prototype.drawCategoryMask=Aa.prototype.va,Aa.prototype.drawBoundingBox=Aa.prototype.ua,Aa.prototype.drawConnectors=Aa.prototype.xa,Aa.prototype.drawLandmarks=Aa.prototype.ya,Aa.lerp=function(t,e,n,r,i){return wa(r*(1-(t-e)/(n-e))+i*(1-(n-t)/(n-e)),r,i)},Aa.clamp=wa;var Na=class{constructor(t,e,n,r,i,s,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=i,this.width=s,this.height=o,(this.j||this.m)&&0==--ja&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ea(){return!!xa(this,0)}ka(){return!!xa(this,1)}P(){return!!xa(this,2)}Ca(){return Pa(this)}Ba(){var t=xa(this,1);return t||(Oa(this),Ra(this),t=La(this),Ma(this),this.g.push(t),this.j=!0),t}M(){return Oa(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const t=Fa(this),e=Ia(this);t.activeTexture(t.TEXTURE1),n=ea(e,t),t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),na(e,t,n),ta(e,t,!1,(()=>{Ra(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Ma(this)})),ra(e),Ma(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Oa(this),Ra(this),n=La(this),Ma(this)}t.push(n)}return new Na(t,this.ka(),this.P(),this.canvas,this.l,this.width,this.height)}close(){this.j&&xa(this,1).close(),this.m&&Fa(this).deleteTexture(xa(this,2)),ja=-1}};Na.prototype.close=Na.prototype.close,Na.prototype.clone=Na.prototype.clone,Na.prototype.getAsWebGLTexture=Na.prototype.M,Na.prototype.getAsImageBitmap=Na.prototype.Ba,Na.prototype.getAsImageData=Na.prototype.Ca,Na.prototype.hasWebGLTexture=Na.prototype.P,Na.prototype.hasImageBitmap=Na.prototype.ka,Na.prototype.hasImageData=Na.prototype.Ea;var ja=250;function Da(...t){return t.map((([t,e])=>({start:t,end:e})))}const Ba=function(t){return class extends t{La(){this.i._registerModelResourcesGraphService()}}}((Ua=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:Mo()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),jo(this,r||"input_audio",(r=>{jo(this,i=i||"audio_header",(i=>{this.i._configureAudio(r,i,t,e??0,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}da(t){Uo(this,"__graph_config__",(e=>{t(e)})),jo(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const s=4*t.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(t,this.g/4),jo(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){jo(this,e,(e=>{const[r,i]=Do(this,t,e);this.i._addBoundTextureToStream(e,r,i,n)}))}addBoolToStream(t,e,n){jo(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){jo(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){jo(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){jo(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){jo(this,e,(e=>{this.i._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){jo(this,e,(e=>{jo(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){jo(this,e,(e=>{Bo(this,Object.keys(t),(r=>{Bo(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){jo(this,n,(n=>{jo(this,e,(e=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,n,r),this.i._free(i)}))}))}addEmptyPacketToStream(t,e){jo(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(r,e);this.i._addBoolVectorToInputStream(r,e,n)}))}addDoubleVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(r,e);this.i._addDoubleVectorToInputStream(r,e,n)}))}addFloatVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(r,e);this.i._addFloatVectorToInputStream(r,e,n)}))}addIntVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(r,e);this.i._addIntVectorToInputStream(r,e,n)}))}addUintVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(r,e);this.i._addUintVectorToInputStream(r,e,n)}))}addStringVectorToStream(t,e,n){jo(this,e,(e=>{const r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const e of t)jo(this,e,(t=>{this.i._addStringVectorEntry(r,t)}));this.i._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){jo(this,e,(e=>{this.i._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){jo(this,e,(e=>{jo(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){jo(this,n,(n=>{jo(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}addBoolVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputSidePacket(n,e)}))}addUintVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(n,e);this.i._addUintVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){jo(this,e,(e=>{const n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)jo(this,e,(t=>{this.i._addStringVectorEntry(n,t)}));this.i._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachUintListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachUintListener(t)}))}attachUintVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachUintVectorListener(t)}))}attachDoubleListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){Uo(this,t,e),jo(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){Vo(this,t,e),jo(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Uo(this,t,e),jo(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Vo(this,t,e),jo(this,t,(t=>{this.i._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Uo(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),jo(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Ua{get ea(){return this.i}qa(t,e,n){jo(this,e,(e=>{const[r,i]=Do(this,t,e);this.ea._addBoundTextureAsImageToStream(e,r,i,n)}))}U(t,e){Uo(this,t,e),jo(this,t,(t=>{this.ea._attachImageListener(t)}))}ca(t,e){Vo(this,t,e),jo(this,t,(t=>{this.ea._attachImageVectorListener(t)}))}}));var Ua,Va=class extends Ba{};async function Ga(t,e,n){return async function(t,e,n,r){return async function(t,e,n,r){return t=await(async(t,e,n,r,i)=>{if(e&&await Lo(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await Lo(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,r)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&t.endsWith(".data")?n.assetBinaryPath.toString():t}),await t.o(r),t}(t,e,n,r)}(t,n.canvas??(Mo()?void 0:document.createElement("canvas")),e,n)}function Wa(t,e,n,r){if(t.T){const s=new ds;if(n?.regionOfInterest){if(!t.pa)throw Error("This task doesn't support region-of-interest.");var i=n.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(i.left<0||i.top<0||i.right>1||i.bottom>1)throw Error("Expected RectF values to be in [0,1].");gn(s,1,(i.left+i.right)/2),gn(s,2,(i.top+i.bottom)/2),gn(s,4,i.right-i.left),gn(s,3,i.bottom-i.top)}else gn(s,1,.5),gn(s,2,.5),gn(s,4,1),gn(s,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(gn(s,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){const[t,r]=No(e);n=fn(s,3)*r/t,i=fn(s,4)*t/r,gn(s,4,n),gn(s,3,i)}}t.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",t.T,r)}t.g.qa(e,t.aa,r??performance.now()),t.finishProcessing()}function za(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Wa(t,e,n,t.B+1)}function qa(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Wa(t,e,n,r)}function Ha(t,e,n,r){var i=e.data;const s=e.width,o=s*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error("Unsupported channel count: "+i.length/o);return t=new ma([i],n,!1,t.g.i.canvas,t.O,s,e),r?t.clone():t}var $a=class extends Xo{constructor(t,e,n,r){super(t),this.g=t,this.aa=e,this.T=n,this.pa=r,this.O=new ia}l(t,e=!0){if("runningMode"in t&&dn(this.baseOptions,2,!!t.runningMode&&"IMAGE"!==t.runningMode),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.O.close(),super.close()}};$a.prototype.close=$a.prototype.close;var Xa=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},sn(t=this.h=new Fs,0,1,e=new xs),gn(this.h,2,.5),gn(this.h,3,.3)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&gn(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&gn(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}D(t,e){return this.j={detections:[]},za(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},qa(this,t,n,e),this.j}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect_in"),Ki(t,"detections");const e=new ji;Wn(e,Rs,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect_in"),Gi(n,"DETECTIONS:detections"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=os(e),this.j.detections.push(ko(t));zo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Xa.prototype.detectForVideo=Xa.prototype.F,Xa.prototype.detect=Xa.prototype.D,Xa.prototype.setOptions=Xa.prototype.o,Xa.createFromModelPath=async function(t,e){return Ga(Xa,t,{baseOptions:{modelAssetPath:e}})},Xa.createFromModelBuffer=function(t,e){return Ga(Xa,t,{baseOptions:{modelAssetBuffer:e}})},Xa.createFromOptions=function(t,e){return Ga(Xa,t,e)};var Ka=Da([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),Ya=Da([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),Ja=Da([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Za=Da([474,475],[475,476],[476,477],[477,474]),Qa=Da([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),tc=Da([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),ec=Da([469,470],[470,471],[471,472],[472,469]),nc=Da([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),rc=[...Ka,...Ya,...Ja,...Qa,...tc,...nc],ic=Da([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function sc(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var oc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,sn(t=this.h=new Ns,0,1,e=new xs),this.v=new Ls,sn(this.h,0,3,this.v),this.s=new Fs,sn(this.h,0,2,this.s),pn(this.s,4,1),gn(this.s,2,.5),gn(this.v,2,.5),gn(this.h,4,.5)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"numFaces"in t&&pn(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&gn(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&gn(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&gn(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return sc(this),za(this,t,e),this.j}F(t,e,n){return sc(this),qa(this,t,n,e),this.j}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"face_landmarks");const e=new ji;Wn(e,Bs,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=hs(e),this.j.faceLandmarks.push(To(t));zo(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{zo(this,t)})),this.outputFaceBlendshapes&&(Ki(t,"blendshapes"),Gi(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=ns(e),this.j.faceBlendshapes.push(So(t.g()??[]));zo(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{zo(this,t)}))),this.outputFacialTransformationMatrixes&&(Ki(t,"face_geometry"),Gi(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=en(Ms(e),ls,2))&&this.j.facialTransformationMatrixes.push({rows:hn(t,1)??0??0,columns:hn(t,2)??0??0,data:Ge(t,3,Yt,Ve()).slice()??[]});zo(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{zo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};oc.prototype.detectForVideo=oc.prototype.F,oc.prototype.detect=oc.prototype.D,oc.prototype.setOptions=oc.prototype.o,oc.createFromModelPath=function(t,e){return Ga(oc,t,{baseOptions:{modelAssetPath:e}})},oc.createFromModelBuffer=function(t,e){return Ga(oc,t,{baseOptions:{modelAssetBuffer:e}})},oc.createFromOptions=function(t,e){return Ga(oc,t,e)},oc.FACE_LANDMARKS_LIPS=Ka,oc.FACE_LANDMARKS_LEFT_EYE=Ya,oc.FACE_LANDMARKS_LEFT_EYEBROW=Ja,oc.FACE_LANDMARKS_LEFT_IRIS=Za,oc.FACE_LANDMARKS_RIGHT_EYE=Qa,oc.FACE_LANDMARKS_RIGHT_EYEBROW=tc,oc.FACE_LANDMARKS_RIGHT_IRIS=ec,oc.FACE_LANDMARKS_FACE_OVAL=nc,oc.FACE_LANDMARKS_CONTOURS=rc,oc.FACE_LANDMARKS_TESSELATION=ic;var ac=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!0),sn(t=this.j=new Us,0,1,e=new xs)}get baseOptions(){return en(this.j,xs,1)}set baseOptions(t){sn(this.j,0,1,t)}o(t){return super.l(t)}Oa(t,e,n){const r="function"!=typeof e?e:{};if(this.h="function"==typeof e?e:n,za(this,t,r??{}),!this.h)return this.s}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"stylized_image");const e=new ji;Wn(e,Vs,this.j);const n=new Wi;Ui(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),$i(t,n),this.g.U("stylized_image",((t,e)=>{var n=!this.h,r=t.data,i=t.width;const s=i*(t=t.height);if(r instanceof Uint8Array)if(r.length===3*s){const e=new Uint8ClampedArray(4*s);for(let t=0;t<s;++t)e[4*t]=r[3*t],e[4*t+1]=r[3*t+1],e[4*t+2]=r[3*t+2],e[4*t+3]=255;r=new ImageData(e,i,t)}else{if(r.length!==4*s)throw Error("Unsupported channel count: "+r.length/s);r=new ImageData(new Uint8ClampedArray(r.buffer,r.byteOffset,r.length),i,t)}else if(!(r instanceof WebGLTexture))throw Error(`Unsupported format: ${r.constructor.name}`);i=new Na([r],!1,!1,this.g.i.canvas,this.O,i,t),this.s=n=n?i.clone():i,this.h&&this.h(n),zo(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ac.prototype.stylize=ac.prototype.Oa,ac.prototype.setOptions=ac.prototype.o,ac.createFromModelPath=function(t,e){return Ga(ac,t,{baseOptions:{modelAssetPath:e}})},ac.createFromModelBuffer=function(t,e){return Ga(ac,t,{baseOptions:{modelAssetBuffer:e}})},ac.createFromOptions=function(t,e){return Ga(ac,t,e)};var cc=Da([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function uc(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function hc(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function lc(t,e=!0){const n=[];for(const i of t){var r=ns(i);t=[];for(const n of r.g())r=e&&null!=hn(n,1)?hn(n,1)??0:-1,t.push({score:fn(n,2)??0,index:r,categoryName:ln(n,3)??""??"",displayName:ln(n,4)??""??""});n.push(t)}return n}var fc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],sn(t=this.j=new Xs,0,1,e=new xs),this.s=new $s,sn(this.j,0,2,this.s),this.C=new Hs,sn(this.s,0,3,this.C),this.v=new qs,sn(this.s,0,2,this.v),this.h=new zs,sn(this.j,0,3,this.h),gn(this.v,2,.5),gn(this.s,4,.5),gn(this.C,2,.5)}get baseOptions(){return en(this.j,xs,1)}set baseOptions(t){sn(this.j,0,1,t)}o(t){if(pn(this.v,3,t.numHands??1),"minHandDetectionConfidence"in t&&gn(this.v,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&gn(this.s,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&gn(this.C,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new Gs,n=e,r=Eo(t.cannedGesturesClassifierOptions,en(this.h,Gs,3)?.h());sn(n,0,2,r),sn(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&en(this.h,Gs,3)?.g();return t.customGesturesClassifierOptions?(sn(n=e=new Gs,0,2,r=Eo(t.customGesturesClassifierOptions,en(this.h,Gs,4)?.h())),sn(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&en(this.h,Gs,4)?.g(),this.l(t)}Ja(t,e){return uc(this),za(this,t,e),hc(this)}Ka(t,e,n){return uc(this),qa(this,t,n,e),hc(this)}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"hand_gestures"),Ki(t,"hand_landmarks"),Ki(t,"world_hand_landmarks"),Ki(t,"handedness");const e=new ji;Wn(e,Qs,this.j);const n=new Wi;Ui(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"HAND_GESTURES:hand_gestures"),Gi(n,"LANDMARKS:hand_landmarks"),Gi(n,"WORLD_LANDMARKS:world_hand_landmarks"),Gi(n,"HANDEDNESS:handedness"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=hs(e);const n=[];for(const e of rn(t,us,1))n.push({x:fn(e,1)??0,y:fn(e,2)??0,z:fn(e,3)??0,visibility:fn(e,4)??0});this.landmarks.push(n)}zo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=cs(e);const n=[];for(const e of rn(t,as,1))n.push({x:fn(e,1)??0,y:fn(e,2)??0,z:fn(e,3)??0,visibility:fn(e,4)??0});this.worldLandmarks.push(n)}zo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...lc(t,!1)),zo(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...lc(t)),zo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function dc(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}fc.prototype.recognizeForVideo=fc.prototype.Ka,fc.prototype.recognize=fc.prototype.Ja,fc.prototype.setOptions=fc.prototype.o,fc.createFromModelPath=function(t,e){return Ga(fc,t,{baseOptions:{modelAssetPath:e}})},fc.createFromModelBuffer=function(t,e){return Ga(fc,t,{baseOptions:{modelAssetBuffer:e}})},fc.createFromOptions=function(t,e){return Ga(fc,t,e)},fc.HAND_CONNECTIONS=cc;var pc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],sn(t=this.h=new $s,0,1,e=new xs),this.s=new Hs,sn(this.h,0,3,this.s),this.j=new qs,sn(this.h,0,2,this.j),pn(this.j,3,1),gn(this.j,2,.5),gn(this.s,2,.5),gn(this.h,4,.5)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"numHands"in t&&pn(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&gn(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&gn(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&gn(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],za(this,t,e),dc(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],qa(this,t,n,e),dc(this)}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"hand_landmarks"),Ki(t,"world_hand_landmarks"),Ki(t,"handedness");const e=new ji;Wn(e,to,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"LANDMARKS:hand_landmarks"),Gi(n,"WORLD_LANDMARKS:world_hand_landmarks"),Gi(n,"HANDEDNESS:handedness"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=hs(e),this.landmarks.push(To(t));zo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=cs(e),this.worldLandmarks.push(Co(t));zo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const i=[];for(const e of t){t=ns(e);const n=[];for(const e of t.g())n.push({score:fn(e,2)??0,index:hn(e,1)??0??-1,categoryName:ln(e,3)??""??"",displayName:ln(e,4)??""??""});i.push(n)}r.call(n,...i),zo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pc.prototype.detectForVideo=pc.prototype.F,pc.prototype.detect=pc.prototype.D,pc.prototype.setOptions=pc.prototype.o,pc.createFromModelPath=function(t,e){return Ga(pc,t,{baseOptions:{modelAssetPath:e}})},pc.createFromModelBuffer=function(t,e){return Ga(pc,t,{baseOptions:{modelAssetBuffer:e}})},pc.createFromOptions=function(t,e){return Ga(pc,t,e)},pc.HAND_CONNECTIONS=cc;var gc=Da([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function mc(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function vc(t){try{if(!t.C)return t.h;t.C(t.h)}finally{$o(t)}}function yc(t,e){t=hs(t),e.push(To(t))}var _c=class extends $a{constructor(t,e){super(new Va(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,sn(t=this.j=new io,0,1,e=new xs),this.J=new Hs,sn(this.j,0,2,this.J),this.Z=new eo,sn(this.j,0,3,this.Z),this.s=new Fs,sn(this.j,0,4,this.s),this.H=new Ls,sn(this.j,0,5,this.H),this.v=new no,sn(this.j,0,6,this.v),this.K=new ro,sn(this.j,0,7,this.K),gn(this.s,2,.5),gn(this.s,3,.3),gn(this.H,2,.5),gn(this.v,2,.5),gn(this.v,3,.3),gn(this.K,2,.5),gn(this.J,2,.5)}get baseOptions(){return en(this.j,xs,1)}set baseOptions(t){sn(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&gn(this.s,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&gn(this.s,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&gn(this.H,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&gn(this.v,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&gn(this.v,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&gn(this.K,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&gn(this.J,2,t.minHandLandmarksConfidence??.5),this.l(t)}D(t,e,n){const r="function"!=typeof e?e:{};return this.C="function"==typeof e?e:n,mc(this),za(this,t,r),vc(this)}F(t,e,n,r){const i="function"!=typeof n?n:{};return this.C="function"==typeof n?n:r,mc(this),qa(this,t,i,e),vc(this)}m(){var t=new Yi;Xi(t,"input_frames_image"),Ki(t,"pose_landmarks"),Ki(t,"pose_world_landmarks"),Ki(t,"face_landmarks"),Ki(t,"left_hand_landmarks"),Ki(t,"left_hand_world_landmarks"),Ki(t,"right_hand_landmarks"),Ki(t,"right_hand_world_landmarks");const e=new ji,n=new ki;$e(n,1,ae("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(t,e){if(null!=e)if(Array.isArray(e))je(t,2,Pe(e));else{if(!("string"==typeof e||e instanceof B||L(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");$e(t,2,pt(e,!1),j())}}(n,this.j.g());const r=new Wi;Ui(r,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),un(r,8,ki,n),Vi(r,"IMAGE:input_frames_image"),Gi(r,"POSE_LANDMARKS:pose_landmarks"),Gi(r,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),Gi(r,"FACE_LANDMARKS:face_landmarks"),Gi(r,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),Gi(r,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),Gi(r,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),Gi(r,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),r.o(e),$i(t,r),qo(this,t),this.g.attachProtoListener("pose_landmarks",((t,e)=>{yc(t,this.h.poseLandmarks),zo(this,e)})),this.g.attachEmptyPacketListener("pose_landmarks",(t=>{zo(this,t)})),this.g.attachProtoListener("pose_world_landmarks",((t,e)=>{var n=this.h.poseWorldLandmarks;t=cs(t),n.push(Co(t)),zo(this,e)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(t=>{zo(this,t)})),this.outputPoseSegmentationMasks&&(Gi(r,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Ho(this,"pose_segmentation_mask"),this.g.U("pose_segmentation_mask",((t,e)=>{this.h.poseSegmentationMasks=[Ha(this,t,!0,!this.C)],zo(this,e)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(t=>{this.h.poseSegmentationMasks=[],zo(this,t)}))),this.g.attachProtoListener("face_landmarks",((t,e)=>{yc(t,this.h.faceLandmarks),zo(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{zo(this,t)})),this.outputFaceBlendshapes&&(Ki(t,"extra_blendshapes"),Gi(r,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((t,e)=>{var n=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=ns(t),n.push(So(t.g()??[]))),zo(this,e)})),this.g.attachEmptyPacketListener("extra_blendshapes",(t=>{zo(this,t)}))),this.g.attachProtoListener("left_hand_landmarks",((t,e)=>{yc(t,this.h.leftHandLandmarks),zo(this,e)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoListener("left_hand_world_landmarks",((t,e)=>{var n=this.h.leftHandWorldLandmarks;t=cs(t),n.push(Co(t)),zo(this,e)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(t=>{zo(this,t)})),this.g.attachProtoListener("right_hand_landmarks",((t,e)=>{yc(t,this.h.rightHandLandmarks),zo(this,e)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(t=>{zo(this,t)})),this.g.attachProtoListener("right_hand_world_landmarks",((t,e)=>{var n=this.h.rightHandWorldLandmarks;t=cs(t),n.push(Co(t)),zo(this,e)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};_c.prototype.detectForVideo=_c.prototype.F,_c.prototype.detect=_c.prototype.D,_c.prototype.setOptions=_c.prototype.o,_c.createFromModelPath=function(t,e){return Ga(_c,t,{baseOptions:{modelAssetPath:e}})},_c.createFromModelBuffer=function(t,e){return Ga(_c,t,{baseOptions:{modelAssetBuffer:e}})},_c.createFromOptions=function(t,e){return Ga(_c,t,e)},_c.HAND_CONNECTIONS=cc,_c.POSE_CONNECTIONS=gc,_c.FACE_LANDMARKS_LIPS=Ka,_c.FACE_LANDMARKS_LEFT_EYE=Ya,_c.FACE_LANDMARKS_LEFT_EYEBROW=Ja,_c.FACE_LANDMARKS_LEFT_IRIS=Za,_c.FACE_LANDMARKS_RIGHT_EYE=Qa,_c.FACE_LANDMARKS_RIGHT_EYEBROW=tc,_c.FACE_LANDMARKS_RIGHT_IRIS=ec,_c.FACE_LANDMARKS_FACE_OVAL=nc,_c.FACE_LANDMARKS_CONTOURS=rc,_c.FACE_LANDMARKS_TESSELATION=ic;var bc=class extends $a{constructor(t,e){super(new Va(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},sn(t=this.h=new ao,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return sn(this.h,0,2,Eo(t,en(this.h,ws,2))),this.l(t)}sa(t,e){return this.j={classifications:[]},za(this,t,e),this.j}ta(t,e,n){return this.j={classifications:[]},qa(this,t,n,e),this.j}m(){var t=new Yi;Xi(t,"input_image"),Xi(t,"norm_rect"),Ki(t,"classifications");const e=new ji;Wn(e,co,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Vi(n,"IMAGE:input_image"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"CLASSIFICATIONS:classifications"),n.o(e),$i(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:rn(t,ps,1).map((t=>So(en(t,ts,4)?.g()??[],hn(t,2)??0,ln(t,3)??"")))};return null!=se(Le(t,2))&&(e.timestampMs=se(Le(t,2))??0),e}(gs(t)),zo(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};bc.prototype.classifyForVideo=bc.prototype.ta,bc.prototype.classify=bc.prototype.sa,bc.prototype.setOptions=bc.prototype.o,bc.createFromModelPath=function(t,e){return Ga(bc,t,{baseOptions:{modelAssetPath:e}})},bc.createFromModelBuffer=function(t,e){return Ga(bc,t,{baseOptions:{modelAssetBuffer:e}})},bc.createFromOptions=function(t,e){return Ga(bc,t,e)};var wc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!0),this.h=new uo,this.embeddings={embeddings:[]},sn(t=this.h,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){var e=this.h,n=en(this.h,Ss,2);return n=n?n.clone():new Ss,void 0!==t.l2Normalize?dn(n,1,t.l2Normalize):"l2Normalize"in t&&je(n,1),void 0!==t.quantize?dn(n,2,t.quantize):"quantize"in t&&je(n,2),sn(e,0,2,n),this.l(t)}za(t,e){return za(this,t,e),this.embeddings}Aa(t,e,n){return qa(this,t,n,e),this.embeddings}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"embeddings_out");const e=new ji;Wn(e,ho,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"EMBEDDINGS:embeddings_out"),n.o(e),$i(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=bs(t),this.embeddings=function(t){return{embeddings:rn(t,ys,1).map((t=>{const e={headIndex:hn(t,3)??0??-1,headName:ln(t,4)??""??""};if(void 0!==tn(t,ms,Ke(t,1)))t=Ge(t=en(t,ms,Ke(t,1)),1,Yt,Ve()),e.floatEmbedding=t.slice();else{const n=new Uint8Array(0);e.quantizedEmbedding=en(t,vs,Ke(t,2))?.oa()?.h()??n}return e})),timestampMs:se(Le(t,2))??0}}(t),zo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};wc.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=xo(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=xo(Ao(t.quantizedEmbedding),Ao(e.quantizedEmbedding))}return t},wc.prototype.embedForVideo=wc.prototype.Aa,wc.prototype.embed=wc.prototype.za,wc.prototype.setOptions=wc.prototype.o,wc.createFromModelPath=function(t,e){return Ga(wc,t,{baseOptions:{modelAssetPath:e}})},wc.createFromModelBuffer=function(t,e){return Ga(wc,t,{baseOptions:{modelAssetBuffer:e}})},wc.createFromOptions=function(t,e){return Ga(wc,t,e)};var Ec=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};function Sc(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function kc(t){try{const e=new Ec(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{$o(t)}}Ec.prototype.close=Ec.prototype.close;var Tc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new mo,this.v=new lo,sn(this.h,0,3,this.v),sn(t=this.h,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?je(this.h,2,ae(t.displayNamesLocale)):"displayNamesLocale"in t&&je(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}I(){!function(t){const e=rn(t.da(),Wi,1).filter((t=>(ln(t,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(en(e[0],ji,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=ln(e,1)??""}))}(this)}segment(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Sc(this),za(this,t,r),kc(this)}Ma(t,e,n,r){const i="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,Sc(this),qa(this,t,i,e),kc(this)}Da(){return this.s}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect");const e=new ji;Wn(e,vo,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),n.o(e),$i(t,n),qo(this,t),this.outputConfidenceMasks&&(Ki(t,"confidence_masks"),Gi(n,"CONFIDENCE_MASKS:confidence_masks"),Ho(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>Ha(this,t,!0,!this.j))),zo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],zo(this,t)}))),this.outputCategoryMask&&(Ki(t,"category_mask"),Gi(n,"CATEGORY_MASK:category_mask"),Ho(this,"category_mask"),this.g.U("category_mask",((t,e)=>{this.categoryMask=Ha(this,t,!1,!this.j),zo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,zo(this,t)}))),Ki(t,"quality_scores"),Gi(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,zo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Tc.prototype.getLabels=Tc.prototype.Da,Tc.prototype.segmentForVideo=Tc.prototype.Ma,Tc.prototype.segment=Tc.prototype.segment,Tc.prototype.setOptions=Tc.prototype.o,Tc.createFromModelPath=function(t,e){return Ga(Tc,t,{baseOptions:{modelAssetPath:e}})},Tc.createFromModelBuffer=function(t,e){return Ga(Tc,t,{baseOptions:{modelAssetBuffer:e}})},Tc.createFromOptions=function(t,e){return Ga(Tc,t,e)};var Cc=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};Cc.prototype.close=Cc.prototype.close;var Ac=class extends zn{constructor(t){super(t)}},xc=[0,oi,-2],Pc=[0,Qr,-3,ui,Qr,-1],Oc=[0,Pc],Fc=[0,Pc,oi,-1],Ic=class extends zn{constructor(t){super(t)}},Rc=[0,Qr,-1,ui],Mc=class extends zn{constructor(t){super(t)}},Lc=class extends zn{constructor(t){super(t)}},Nc=[1,2,3,4,5,6,7,8,9,10,14,15],jc=class extends zn{constructor(t){super(t)}};jc.prototype.g=Si([0,pi,[0,Nc,gi,Pc,gi,[0,Pc,xc],gi,Oc,gi,[0,Oc,xc],gi,Rc,gi,[0,Qr,-3,ui,_i],gi,[0,Qr,-3,ui],gi,[0,di,Qr,-2,ui,oi,ui,-1,2,Qr,xc],gi,Fc,gi,[0,Fc,xc],Qr,xc,di,gi,[0,Qr,-3,ui,xc,-1],gi,[0,pi,Rc]],di,[0,di,oi,-1,ui]]);var Dc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new mo,this.s=new lo,sn(this.h,0,3,this.s),sn(t=this.h,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}segment(t,e,n,r){const i="function"!=typeof n?n:{};this.j="function"==typeof n?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,r=new jc;const s=new Lc;var o=new Ac;if(pn(o,1,255),sn(s,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new Ic;dn(a,3,!0),gn(a,1,e.keypoint.x),gn(a,2,e.keypoint.y),on(s,5,Nc,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new Mc,e.scribble))dn(e=new Ic,3,!0),gn(e,1,a.x),gn(e,2,a.y),un(o,1,Ic,e);on(s,15,Nc,o)}un(r,1,Lc,s),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),za(this,t,i);t:{try{const t=new Cc(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=t;break t}this.j(t)}finally{$o(this)}c=void 0}return c}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"roi_in"),Xi(t,"norm_rect_in");const e=new ji;Wn(e,vo,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"ROI:roi_in"),Vi(n,"NORM_RECT:norm_rect_in"),n.o(e),$i(t,n),qo(this,t),this.outputConfidenceMasks&&(Ki(t,"confidence_masks"),Gi(n,"CONFIDENCE_MASKS:confidence_masks"),Ho(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>Ha(this,t,!0,!this.j))),zo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],zo(this,t)}))),this.outputCategoryMask&&(Ki(t,"category_mask"),Gi(n,"CATEGORY_MASK:category_mask"),Ho(this,"category_mask"),this.g.U("category_mask",((t,e)=>{this.categoryMask=Ha(this,t,!1,!this.j),zo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,zo(this,t)}))),Ki(t,"quality_scores"),Gi(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,zo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Dc.prototype.segment=Dc.prototype.segment,Dc.prototype.setOptions=Dc.prototype.o,Dc.createFromModelPath=function(t,e){return Ga(Dc,t,{baseOptions:{modelAssetPath:e}})},Dc.createFromModelBuffer=function(t,e){return Ga(Dc,t,{baseOptions:{modelAssetBuffer:e}})},Dc.createFromOptions=function(t,e){return Ga(Dc,t,e)};var Bc=class extends $a{constructor(t,e){super(new Va(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},sn(t=this.h=new yo,0,1,e=new xs)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?je(this.h,2,ae(t.displayNamesLocale)):"displayNamesLocale"in t&&je(this.h,2),void 0!==t.maxResults?pn(this.h,3,t.maxResults):"maxResults"in t&&je(this.h,3),void 0!==t.scoreThreshold?gn(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&je(this.h,4),void 0!==t.categoryAllowlist?mn(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&je(this.h,5),void 0!==t.categoryDenylist?mn(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&je(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},za(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},qa(this,t,n,e),this.j}m(){var t=new Yi;Xi(t,"input_frame_gpu"),Xi(t,"norm_rect"),Ki(t,"detections");const e=new ji;Wn(e,_o,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),Vi(n,"IMAGE:input_frame_gpu"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"DETECTIONS:detections"),n.o(e),$i(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=os(e),this.j.detections.push(ko(t));zo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{zo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Bc.prototype.detectForVideo=Bc.prototype.F,Bc.prototype.detect=Bc.prototype.D,Bc.prototype.setOptions=Bc.prototype.o,Bc.createFromModelPath=async function(t,e){return Ga(Bc,t,{baseOptions:{modelAssetPath:e}})},Bc.createFromModelBuffer=function(t,e){return Ga(Bc,t,{baseOptions:{modelAssetBuffer:e}})},Bc.createFromOptions=function(t,e){return Ga(Bc,t,e)};var Uc=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach((t=>{t.close()}))}};function Vc(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Gc(t){try{const e=new Uc(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{$o(t)}}Uc.prototype.close=Uc.prototype.close;var Wc=class extends $a{constructor(t,e){super(new Va(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,sn(t=this.h=new bo,0,1,e=new xs),this.v=new ro,sn(this.h,0,3,this.v),this.j=new no,sn(this.h,0,2,this.j),pn(this.j,4,1),gn(this.j,2,.5),gn(this.v,2,.5),gn(this.h,4,.5)}get baseOptions(){return en(this.h,xs,1)}set baseOptions(t){sn(this.h,0,1,t)}o(t){return"numPoses"in t&&pn(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&gn(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&gn(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&gn(this.v,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}D(t,e,n){const r="function"!=typeof e?e:{};return this.s="function"==typeof e?e:n,Vc(this),za(this,t,r),Gc(this)}F(t,e,n,r){const i="function"!=typeof n?n:{};return this.s="function"==typeof n?n:r,Vc(this),qa(this,t,i,e),Gc(this)}m(){var t=new Yi;Xi(t,"image_in"),Xi(t,"norm_rect"),Ki(t,"normalized_landmarks"),Ki(t,"world_landmarks"),Ki(t,"segmentation_masks");const e=new ji;Wn(e,wo,this.h);const n=new Wi;Ui(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Vi(n,"IMAGE:image_in"),Vi(n,"NORM_RECT:norm_rect"),Gi(n,"NORM_LANDMARKS:normalized_landmarks"),Gi(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),$i(t,n),qo(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=hs(e),this.landmarks.push(To(t));zo(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],zo(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=cs(e),this.worldLandmarks.push(Co(t));zo(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],zo(this,t)})),this.outputSegmentationMasks&&(Gi(n,"SEGMENTATION_MASK:segmentation_masks"),Ho(this,"segmentation_masks"),this.g.ca("segmentation_masks",((t,e)=>{this.segmentationMasks=t.map((t=>Ha(this,t,!0,!this.s))),zo(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.segmentationMasks=[],zo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Wc.prototype.detectForVideo=Wc.prototype.F,Wc.prototype.detect=Wc.prototype.D,Wc.prototype.setOptions=Wc.prototype.o,Wc.createFromModelPath=function(t,e){return Ga(Wc,t,{baseOptions:{modelAssetPath:e}})},Wc.createFromModelBuffer=function(t,e){return Ga(Wc,t,{baseOptions:{modelAssetBuffer:e}})},Wc.createFromOptions=function(t,e){return Ga(Wc,t,e)},Wc.POSE_CONNECTIONS=gc,e.DrawingUtils=Aa,e.FaceDetector=Xa,e.FaceLandmarker=oc,e.FaceStylizer=ac,e.FilesetResolver=Ro,e.GestureRecognizer=fc,e.HandLandmarker=pc,e.HolisticLandmarker=_c,e.ImageClassifier=bc,e.ImageEmbedder=wc,e.ImageSegmenter=Tc,e.ImageSegmenterResult=Ec,e.InteractiveSegmenter=Dc,e.InteractiveSegmenterResult=Cc,e.MPImage=Na,e.MPMask=ma,e.ObjectDetector=Bc,e.PoseLandmarker=Wc,e.VisionTaskRunner=$a},8419:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}e.hasCORS=n},5754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encode=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t<r;t++){let r=n[t].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}},5222:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=function(t){if(t.length>8e3)throw"URI too long";const e=t,i=t.indexOf("["),s=t.indexOf("]");-1!=i&&-1!=s&&(t=t.substring(0,i)+t.substring(i,s).replace(/:/g,";")+t.substring(s,t.length));let o=n.exec(t||""),a={},c=14;for(;c--;)a[r[c]]=o[c]||"";return-1!=i&&-1!=s&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){const n=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1),"/"==e.slice(-1)&&n.splice(n.length-1,1),n}(0,a.path),a.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(n[e]=r)})),n}(0,a.query),a};const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]},5010:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.globalThisShim=e.nextTick=void 0,e.createCookieJar=function(){},e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")(),e.defaultBinaryType="arraybuffer"},4679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebTransport=e.WebSocket=e.NodeWebSocket=e.XHR=e.NodeXHR=e.Fetch=e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.TransportError=e.Transport=e.protocol=e.SocketWithUpgrade=e.SocketWithoutUpgrade=e.Socket=void 0;const r=n(3481);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}});var i=n(3481);Object.defineProperty(e,"SocketWithoutUpgrade",{enumerable:!0,get:function(){return i.SocketWithoutUpgrade}}),Object.defineProperty(e,"SocketWithUpgrade",{enumerable:!0,get:function(){return i.SocketWithUpgrade}}),e.protocol=r.Socket.protocol;var s=n(9870);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return s.Transport}}),Object.defineProperty(e,"TransportError",{enumerable:!0,get:function(){return s.TransportError}});var o=n(7385);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return o.transports}});var a=n(9622);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return a.installTimerFunctions}});var c=n(5222);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return c.parse}});var u=n(5010);Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return u.nextTick}});var h=n(6915);Object.defineProperty(e,"Fetch",{enumerable:!0,get:function(){return h.Fetch}});var l=n(715);Object.defineProperty(e,"NodeXHR",{enumerable:!0,get:function(){return l.XHR}});var f=n(715);Object.defineProperty(e,"XHR",{enumerable:!0,get:function(){return f.XHR}});var d=n(1308);Object.defineProperty(e,"NodeWebSocket",{enumerable:!0,get:function(){return d.WS}});var p=n(1308);Object.defineProperty(e,"WebSocket",{enumerable:!0,get:function(){return p.WS}});var g=n(1020);Object.defineProperty(e,"WebTransport",{enumerable:!0,get:function(){return g.WT}})},3481:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=e.SocketWithUpgrade=e.SocketWithoutUpgrade=void 0;const i=n(7385),s=n(9622),o=n(5754),a=n(5222),c=n(6717),u=n(1373),h=n(5010),l=(0,r(n(4802)).default)("engine.io-client:socket"),f="function"==typeof addEventListener&&"function"==typeof removeEventListener,d=[];f&&addEventListener("offline",(()=>{l("closing %d connection(s) because the network was lost",d.length),d.forEach((t=>t()))}),!1);class p extends c.Emitter{constructor(t,e){if(super(),this.binaryType=h.defaultBinaryType,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const n=(0,a.parse)(t);e.hostname=n.host,e.secure="https"===n.protocol||"wss"===n.protocol,e.port=n.port,n.query&&(e.query=n.query)}else e.host&&(e.hostname=(0,a.parse)(e.host).host);(0,s.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach((t=>{const e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t})),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,o.decode)(this.opts.query)),f&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(l("adding listener for the 'offline' event"),this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},d.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=(0,h.createCookieJar)()),this._open()}createTransport(t){l('creating transport "%s"',t);const e=Object.assign({},this.opts.query);e.EIO=u.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return l("options: %j",n),new this._transportsByName[t](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const t=this.opts.rememberUpgrade&&p.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){l("setting transport %s",t.name),this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(t=>this._onClose("transport close",t)))}onOpen(){l("socket open"),this.readyState="open",p.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(l('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}else l('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn((()=>{this._onClose("ping timeout")}),t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();l("flushing %d packets in socket",t.length),this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=(0,s.byteLength)(n)),e>0&&t>this._maxPayload)return l("only send %d out of %d packets",e,this.writeBuffer.length),this.writeBuffer.slice(0,e);t+=2}return l("payload size is %d (max: %d)",t,this._maxPayload),this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(l("throttled timer detected, scheduling connection close"),this._pingTimeoutTime=0,(0,h.nextTick)((()=>{this._onClose("ping timeout")}),this.setTimeoutFn)),t}write(t,e,n){return this._sendPacket("message",t,e,n),this}send(t,e,n){return this._sendPacket("message",t,e,n),this}_sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this._onClose("forced close"),l("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():t()})):this.upgrading?n():t()),this}_onError(t){if(l("socket error %j",t),p.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return l("trying next transport"),this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(l('socket close with reason: "%s"',t),this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),f&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const t=d.indexOf(this._offlineEventListener);-1!==t&&(l("removing listener for the 'offline' event"),d.splice(t,1))}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}e.SocketWithoutUpgrade=p,p.protocol=u.protocol;class g extends p{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade){l("starting upgrade probes");for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}}_probe(t){l('probing transport "%s"',t);let e=this.createTransport(t),n=!1;p.priorWebsocketSuccess=!1;const r=()=>{n||(l('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(l('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;p.priorWebsocketSuccess="websocket"===e.name,l('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(l("changing transport and sending upgrade packet"),u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{l('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emitReserved("upgradeError",n)}})))};function i(){n||(n=!0,u(),e.close(),e=null)}const s=n=>{const r=new Error("probe error: "+n);r.transport=e.name,i(),l('probe transport "%s" failed because of error: %s',t,n),this.emitReserved("upgradeError",r)};function o(){s("transport closed")}function a(){s("socket closed")}function c(t){e&&t.name!==e.name&&(l('"%s" works - aborting "%s"',t.name,e.name),i())}const u=()=>{e.removeListener("open",r),e.removeListener("error",s),e.removeListener("close",o),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",s),e.once("close",o),this.once("close",a),this.once("upgrading",c),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{n||e.open()}),200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const e=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}e.SocketWithUpgrade=g,e.Socket=class extends g{constructor(t,e={}){const n="object"==typeof t?t:e;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map((t=>i.transports[t])).filter((t=>!!t))),super(t,n)}}},9870:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=e.TransportError=void 0;const i=n(1373),s=n(6717),o=n(9622),a=n(5754),c=(0,r(n(4802)).default)("engine.io-client:transport");class u extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}e.TransportError=u;class h extends s.Emitter{constructor(t){super(),this.writable=!1,(0,o.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,n){return super.emitReserved("error",new u(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState?this.write(t):c("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=(0,i.decodePacket)(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=(0,a.encode)(t);return e.length?"?"+e:""}}e.Transport=h},7385:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=n(715),i=n(1308),s=n(1020);e.transports={websocket:i.WS,webtransport:s.WT,polling:r.XHR}},6915:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Fetch=void 0;const r=n(484);class i extends r.Polling{doPoll(){this._fetch().then((t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then((t=>this.onData(t)))})).catch((t=>{this.onError("fetch read error",t)}))}doWrite(t,e){this._fetch(t).then((t=>{if(!t.ok)return this.onError("fetch write error",t.status,t);e()})).catch((t=>{this.onError("fetch write error",t)}))}_fetch(t){var e;const n=void 0!==t,r=new Headers(this.opts.extraHeaders);return n&&r.set("content-type","text/plain;charset=UTF-8"),null===(e=this.socket._cookieJar)||void 0===e||e.appendCookies(r),fetch(this.uri(),{method:n?"POST":"GET",body:n?t:null,headers:r,credentials:this.opts.withCredentials?"include":"omit"}).then((t=>{var e;return null===(e=this.socket._cookieJar)||void 0===e||e.parseCookies(t.headers.getSetCookie()),t}))}}e.Fetch=i},715:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.XHR=e.Request=e.BaseXHR=void 0;const i=n(484),s=n(6717),o=n(9622),a=n(5010),c=n(8419),u=(0,r(n(4802)).default)("engine.io-client:polling");function h(){}class l extends i.Polling{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){u("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}e.BaseXHR=l;class f extends s.Emitter{constructor(t,e,n){super(),this.createRequest=t,(0,o.installTimerFunctions)(this,n),this._opts=n,this._method=n.method||"GET",this._uri=e,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var t;const e=(0,o.pick)(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(e);try{u("xhr open %s: %s",this._method,this._uri),n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(t){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn((()=>{this._onError("number"==typeof n.status?n.status:0)}),0))},u("xhr data %s",this._data),n.send(this._data)}catch(t){return void this.setTimeoutFn((()=>{this._onError(t)}),0)}"undefined"!=typeof document&&(this._index=f.requestsCount++,f.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=h,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete f.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(e.Request=f,f.requestsCount=0,f.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",d);else if("function"==typeof addEventListener){const t="onpagehide"in a.globalThisShim?"pagehide":"unload";addEventListener(t,d,!1)}function d(){for(let t in f.requests)f.requests.hasOwnProperty(t)&&f.requests[t].abort()}const p=function(){const t=g({xdomain:!1});return t&&null!==t.responseType}();function g(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||c.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(a.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}e.XHR=class extends l{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=p&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new f(g,this.uri(),t)}}},484:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Polling=void 0;const i=n(9870),s=n(9622),o=n(1373),a=(0,r(n(4802)).default)("engine.io-client:polling");class c extends i.Transport{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const e=()=>{a("paused"),this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(a("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){a("pre-pause polling complete"),--t||e()}))),this.writable||(a("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){a("pre-pause writing complete"),--t||e()})))}else e()}_poll(){a("polling"),this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){a("polling got data %s",t),(0,o.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this._poll():a('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{a("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(a("transport open - closing"),t()):(a("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,o.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,s.randomString)()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}e.Polling=c},1308:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=e.BaseWS=void 0;const i=n(9870),s=n(9622),o=n(1373),a=n(5010),c=(0,r(n(4802)).default)("engine.io-client:websocket"),u="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class h extends i.Transport{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,n=u?{}:(0,s.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;(0,o.encodePacket)(n,this.supportsBinary,(t=>{try{this.doWrite(n,t)}catch(t){c("websocket closed before onclose event")}r&&(0,a.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,s.randomString)()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}e.BaseWS=h;const l=a.globalThisShim.WebSocket||a.globalThisShim.MozWebSocket;e.WS=class extends h{createSocket(t,e,n){return u?new l(t,e,n):e?new l(t,e):new l(t)}doWrite(t,e){this.ws.send(e)}}},1020:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WT=void 0;const i=n(9870),s=n(5010),o=n(1373),a=(0,r(n(4802)).default)("engine.io-client:webtransport");class c extends i.Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then((()=>{a("transport closed gracefully"),this.onClose()})).catch((t=>{a("transport closed due to %s",t),this.onError("webtransport error",t)})),this._transport.ready.then((()=>{this._transport.createBidirectionalStream().then((t=>{const e=(0,o.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(e).getReader(),r=(0,o.createPacketEncoderStream)();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();const i=()=>{n.read().then((({done:t,value:e})=>{t?a("session is closed"):(a("received chunk: %o",e),this.onPacket(e),i())})).catch((t=>{a("an error occurred while reading: %s",t)}))};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then((()=>this.onOpen()))}))}))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;this._writer.write(n).then((()=>{r&&(0,s.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}}e.WT=c},9622:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pick=function(t,...e){return e.reduce(((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e)),{})},e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=i.bind(r.globalThisShim),t.clearTimeoutFn=s.bind(r.globalThisShim)):(t.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),t.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))},e.byteLength=function(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil((t.byteLength||t.size)*o)},e.randomString=function(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)};const r=n(5010),i=r.globalThisShim.setTimeout,s=r.globalThisShim.clearTimeout,o=1.33},3087:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const n=Object.create(null);e.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((t=>{r[n[t]]=t})),e.ERROR_PACKET={type:"error",data:"parser error"}},2469:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)r[n.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),i=r.length,s="";for(e=0;e<i;e+=3)s+=n[r[e]>>2],s+=n[(3&r[e])<<4|r[e+1]>>4],s+=n[(15&r[e+1])<<2|r[e+2]>>6],s+=n[63&r[e+2]];return i%3==2?s=s.substring(0,s.length-1)+"=":i%3==1&&(s=s.substring(0,s.length-2)+"=="),s},e.decode=t=>{let e,n,i,s,o,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const h=new ArrayBuffer(a),l=new Uint8Array(h);for(e=0;e<c;e+=4)n=r[t.charCodeAt(e)],i=r[t.charCodeAt(e+1)],s=r[t.charCodeAt(e+2)],o=r[t.charCodeAt(e+3)],l[u++]=n<<2|i>>4,l[u++]=(15&i)<<4|s>>2,l[u++]=(3&s)<<6|63&o;return h}},7572:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePacket=void 0;const r=n(3087),i=n(2469),s="function"==typeof ArrayBuffer;e.decodePacket=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const n=t.charAt(0);return"b"===n?{type:"message",data:o(t.substring(1),e)}:r.PACKET_TYPES_REVERSE[n]?t.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET};const o=(t,e)=>{if(s){const n=(0,i.decode)(t);return a(n,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},3908:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodePacket=void 0,e.encodePacketToBinary=function(t,e){return i&&t.data instanceof Blob?t.data.arrayBuffer().then(u).then(e):s&&(t.data instanceof ArrayBuffer||o(t.data))?e(u(t.data)):void a(t,!1,(t=>{h||(h=new TextEncoder),e(h.encode(t))}))};const r=n(3087),i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),s="function"==typeof ArrayBuffer,o=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,a=({type:t,data:e},n,a)=>i&&e instanceof Blob?n?a(e):c(e,a):s&&(e instanceof ArrayBuffer||o(e))?n?a(e):c(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));e.encodePacket=a;const c=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function u(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let h},1373:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0,e.createPacketEncoderStream=function(){return new TransformStream({transform(t,e){(0,r.encodePacketToBinary)(t,(n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const t=new DataView(i.buffer);t.setUint8(0,126),t.setUint16(1,r)}else{i=new Uint8Array(9);const t=new DataView(i.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(i[0]|=128),e.enqueue(i),e.enqueue(n)}))}})},e.createPacketDecoderStream=function(t,e){a||(a=new TextDecoder);const n=[];let r=0,o=-1,h=!1;return new TransformStream({transform(l,f){for(n.push(l);;){if(0===r){if(c(n)<1)break;const t=u(n,1);h=128==(128&t[0]),o=127&t[0],r=o<126?3:126===o?1:2}else if(1===r){if(c(n)<2)break;const t=u(n,2);o=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),r=3}else if(2===r){if(c(n)<8)break;const t=u(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),i=e.getUint32(0);if(i>Math.pow(2,21)-1){f.enqueue(s.ERROR_PACKET);break}o=i*Math.pow(2,32)+e.getUint32(4),r=3}else{if(c(n)<o)break;const t=u(n,o);f.enqueue((0,i.decodePacket)(h?t:a.decode(t),e)),r=0}if(0===o||o>t){f.enqueue(s.ERROR_PACKET);break}}}})};const r=n(3908);Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return r.encodePacket}});const i=n(7572);Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return i.decodePacket}});const s=n(3087),o=String.fromCharCode(30);let a;function c(t){return t.reduce(((t,e)=>t+e.length),0)}function u(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}e.encodePayload=(t,e)=>{const n=t.length,i=new Array(n);let s=0;t.forEach(((t,a)=>{(0,r.encodePacket)(t,!1,(t=>{i[a]=t,++s===n&&e(i.join(o))}))}))},e.decodePayload=(t,e)=>{const n=t.split(o),r=[];for(let t=0;t<n.length;t++){const s=(0,i.decodePacket)(n[t],e);if(r.push(s),"error"===s.type)break}return r},e.protocol=4},5159:(t,e)=>{"use strict";function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Object.defineProperty(e,"__esModule",{value:!0}),e.Backoff=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},7046:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WebTransport=e.WebSocket=e.NodeWebSocket=e.XHR=e.NodeXHR=e.Fetch=e.Socket=e.Manager=e.protocol=void 0,e.io=u,e.connect=u,e.default=u;const i=n(3084),s=n(4168);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return s.Manager}});const o=n(8312);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=(0,r(n(3669)).default)("socket.io-client"),c={};function u(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=(0,i.url)(t,e.path||"/socket.io"),r=n.source,o=n.id,u=n.path,h=c[o]&&u in c[o].nsps;let l;return e.forceNew||e["force new connection"]||!1===e.multiplex||h?(a("ignoring socket cache for %s",r),l=new s.Manager(r,e)):(c[o]||(a("new io instance for %s",r),c[o]=new s.Manager(r,e)),l=c[o]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(u,{Manager:s.Manager,Socket:o.Socket,io:u,connect:u});var h=n(4514);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return h.protocol}});var l=n(4679);Object.defineProperty(e,"Fetch",{enumerable:!0,get:function(){return l.Fetch}}),Object.defineProperty(e,"NodeXHR",{enumerable:!0,get:function(){return l.NodeXHR}}),Object.defineProperty(e,"XHR",{enumerable:!0,get:function(){return l.XHR}}),Object.defineProperty(e,"NodeWebSocket",{enumerable:!0,get:function(){return l.NodeWebSocket}}),Object.defineProperty(e,"WebSocket",{enumerable:!0,get:function(){return l.WebSocket}}),Object.defineProperty(e,"WebTransport",{enumerable:!0,get:function(){return l.WebTransport}}),t.exports=u},4168:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=n(4679),c=n(8312),u=s(n(4514)),h=n(7149),l=n(5159),f=n(6717),d=(0,o(n(3669)).default)("socket.io-client:manager");class p extends f.Emitter{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,(0,a.installTimerFunctions)(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=e.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||u;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=(0,h.on)(e,"open",(function(){n.onopen(),t&&t()})),i=e=>{d("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},s=(0,h.on)(e,"error",i);if(!1!==this._timeout){const t=this._timeout;d("connect attempt will timeout after %d",t);const n=this.setTimeoutFn((()=>{d("connect attempt timed out after %d",t),r(),i(new Error("timeout")),e.close()}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push((0,h.on)(t,"ping",this.onping.bind(this)),(0,h.on)(t,"data",this.ondata.bind(this)),(0,h.on)(t,"error",this.onerror.bind(this)),(0,h.on)(t,"close",this.onclose.bind(this)),(0,h.on)(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){(0,a.nextTick)((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){d("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new c.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return void d("socket %s is still active, skipping close",t);this._close()}_packet(t){d("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){d("cleanup"),this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var n;d("closed due to %s",t),this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();d("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{t.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(d("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(d("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=p},7149:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},8312:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(4514),s=n(7149),o=n(6717),a=(0,r(n(3669)).default)("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends o.Emitter{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[(0,s.on)(t,"open",this.onopen.bind(this)),(0,s.on)(t,"packet",this.onpacket.bind(this)),(0,s.on)(t,"error",this.onerror.bind(this)),(0,s.on)(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var n,r,s;if(c.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const o={type:i.PacketType.EVENT,data:e,options:{}};if(o.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const n=e.pop();this._registerAckCallback(t,n),o.id=t}const u=null===(r=null===(n=this.io.engine)||void 0===n?void 0:n.transport)||void 0===r?void 0:r.writable,h=this.connected&&!(null===(s=this.io.engine)||void 0===s?void 0:s._hasPingExpired());return this.flags.volatile&&!u?a("discard packet as the transport is not currently writable"):h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const i=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&(a("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(e,1));a("event with ack id %d has timed out after %d ms",t,r),e.call(this,new Error("operation has timed out"))}),r),s=(...t)=>{this.io.clearTimeoutFn(i),e.apply(this,t)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...e){return new Promise(((n,r)=>{const i=(t,e)=>t?r(t):n(e);i.withError=!0,e.push(i),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...r)=>{if(n===this._queue[0])return null!==t?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),e&&e(t)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const e=this._queue[0];!e.pending||t?(e.pending=!0,e.tryCount++,a("sending packet [%d] (try n°%d)",e.id,e.tryCount),this.flags=e.flags,this.emit.apply(this,e.args)):a("packet [%d] has already been sent and is waiting for an ack",e.id)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:i.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){a("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((e=>String(e.id)===t))){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case i.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case i.PacketType.EVENT:case i.PacketType.BINARY_EVENT:this.onevent(t);break;case i.PacketType.ACK:case i.PacketType.BINARY_ACK:this.onack(t);break;case i.PacketType.DISCONNECT:this.ondisconnect();break;case i.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),e.packet({type:i.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(delete this.acks[t.id],a("calling ack %s with %j",t.id,t.data),e.withError&&t.data.unshift(null),e.apply(this,t.data)):a("bad ack %s",t.id)}onconnect(t,e){a("socket connected with id %s",t),this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:i.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}e.Socket=u},3084:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.url=function(t,e="",n){let r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(s("protocol-less url %s",t),t=void 0!==n?n.protocol+"//"+t:"https://"+t),s("parse %s",t),r=(0,i.parse)(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r};const i=n(4679),s=(0,r(n(3669)).default)("socket.io-client:url")},4880:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(665);function i(t,e){if(!t)return t;if((0,r.isBinary)(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=i(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=i(t[r],e));return n}return t}function s(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=s(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=s(t[n],e));return t}e.deconstructPacket=function(t){const e=[],n=t.data,r=t;return r.data=i(n,e),r.attachments=e.length,{packet:r,buffers:e}},e.reconstructPacket=function(t,e){return t.data=s(t.data,e),delete t.attachments,t}},4514:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(6717),i=n(4880),s=n(665),o=(0,n(1618).default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var c;function u(t){return"[object Object]"===Object.prototype.toString.call(t)}e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(c=e.PacketType||(e.PacketType={})),e.Encoder=class{constructor(t){this.replacer=t}encode(t){return o("encoding packet %j",t),t.type!==c.EVENT&&t.type!==c.ACK||!(0,s.hasBinary)(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==c.BINARY_EVENT&&t.type!==c.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),o("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=(0,i.deconstructPacket)(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class h extends r.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===c.BINARY_EVENT;n||e.type===c.BINARY_ACK?(e.type=n?c.EVENT:c.ACK,this.reconstructor=new l(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!(0,s.isBinary)(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===c[n.type])throw new Error("unknown packet type "+n.type);if(n.type===c.BINARY_EVENT||n.type===c.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const i=t.substring(r,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!h.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return o("decoded %s as %j",t,n),n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case c.CONNECT:return u(e);case c.DISCONNECT:return void 0===e;case c.CONNECT_ERROR:return"string"==typeof e||u(e);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===a.indexOf(e[0]));case c.ACK:case c.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=h;class l{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=(0,i.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},665:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function o(t){return n&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||i&&t instanceof Blob||s&&t instanceof File}e.isBinary=o,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(t(e[n]))return!0;return!1}if(o(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return!0;return!1}},6717:(t,e,n)=>{"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}n.r(e),n.d(e,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},8593:t=>{"use strict";t.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}return n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(4432)})()}));